sLTN: Structural Logic Tensor Networks
Davide Rinaldi, Luciano Serafini
Nokia Bell Labs · Fondazione Bruno Kessler
cs.AI
Submitted: 2026-08-11
Updated: 2026-08-12
Code: https://github.com/logictensornetworks/sltn
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 75/100
The gist: sLTN: Structural Logic Tensor Networks introduces an extension of Logic Tensor Networks (LTN) designed to handle structured data, such as temporal sequences, graphs, or other positional organizations.
Terminology
Summary
sLTN: Structural Logic Tensor Networks introduces an extension of Logic Tensor Networks (LTN) designed to handle structured data, such as temporal sequences, graphs, or other positional organizations. The paper formalizes the syntax and semantics of sLTN, describes its implementation, and illustrates its use with a running example.
The core problem addressed is that the original LTN framework is primarily suited to data represented as flat collections of individuals, and does not explicitly capture structural organization such as temporal order, sequential position, or graph connectivity.
To overcome this, sLTN makes structural dimensions first-class elements of the language.
These dimensions represent named tensor axes associated with domain-specific organization, such as time steps, sequence positions, or graph nodes.
They can be quantified, related through structural relations, and used to express temporal, sequential, and relational constraints directly at the logical level.
The paper's contributions are threefold: "First, we extend the language of LTN with structural dimensions and structural formulas, making structured organization an explicit object of logical modelling. Second, we provide a semantics that integrates these extensions with differentiable fuzzy connectives and quantifier aggregation. Third, we describe a modular implementation of the resulting framework in Python and PyTorch."
The formal language of sLTN is built on a signature that includes sorts, dimensions, constants, individual variables, functions, predicates, structural variables, and structural relations. Structural variables range over indices of a declared structural dimension, and structural relations are interpreted as Boolean or fuzzy masks over structural dimensions. For example, a structural relation next(t, t1) can express adjacency between consecutive time steps, enabling constraints like @t, t1 nextpt, t1 q: Apxt q Ñ Apxt1 q, which states that a property holding at one time step should hold at the next.
The semantics of sLTN assigns denotations to expressions as annotated tensors,
which are tensors with explicitly named axes that have semantic roles (variable, structural, or domain). The interpretation of terms and formulas is compositional, with operations for named-axis alignment, broadcasting, and aggregation. The framework supports both ordinary first-order quantification and structural quantification, as well as guarded and diagonal quantification. A key feature is that in the absence of structural dimensions, the framework recovers the original LTN semantics as a special case.
Learning in sLTN is formulated as maximizing the satisfaction of a knowledge base, which is a finite set of closed formulas. The paper describes both scalarized learning, where clause satisfactions are combined into a single objective using an aggregation operator, and multi-objective learning, where per-clause gradients are combined using Jacobian-descent methods like PCGrad.
The implementation is organized into packages that follow the syntax-semantics separation: sltn.signature, sltn.fol, sltn.parse, and sltn.interpretation. A Signature validates typed symbols, formulas are parsed into abstract syntax trees, and an Interpretation binds symbols to concrete tensors and fuzzy operators. The library supports batching by allowing variable groundings to be updated between training steps.
The paper also includes an appendix detailing the fuzzy operators and aggregators implemented in sLTN, including their algebraic properties, gradient behaviors, and stability mechanisms. It discusses standard fuzzy logic families (Gödel, Product/Goguen, Łukasiewicz) and provides default configurations for the logic object.
In conclusion, the paper states that sLTN "treats structural dimensions, structural variables, and structural relations as explicit components of the logical language, thereby enabling formulas to refer not only to individuals but also to their organization within a structured domain." Future work includes developing dedicated structured theories for concrete applications, extending the language with recursive computational primitives, and investigating principled schedules for the power-mean exponent.
Improvements for AI systems
Improvements to AI Systems:
- Structured Temporal Reasoning in Neural-Symbolic Models
-
Improvement: Integrate sLTN’s structural dimensions (e.g., time steps) as first-class axes in neural-symbolic architectures, replacing flat tensor encodings.
-
Capability: The AI can enforce logical constraints like “if a property holds at time t, it must hold at t+1” directly during training, enabling robust sequence prediction, anomaly detection in time-series, and action planning with explicit temporal consistency.
- Graph-Aware Logical Constraint Propagation
-
Improvement: Use structural relations (e.g., adjacency, reachability) as differentiable masks over graph nodes, allowing logical formulas to reference connectivity patterns.
-
Capability: The AI can learn on graph-structured data (e.g., social networks, molecular graphs) while enforcing domain rules like “neighboring nodes must have similar labels” or “no two connected nodes can be in the same class,” improving node classification, link prediction, and drug discovery with guaranteed relational consistency.
- Multi-Objective Learning with Per-Clause Gradients
-
Improvement: Adopt sLTN’s multi-objective optimization (e.g., PCGrad) to combine gradients from individual logical clauses, avoiding scalarization pitfalls like gradient conflicts.
-
Capability: The AI can jointly satisfy conflicting constraints (e.g., “maximize accuracy” vs. “ensure fairness across groups”) without manual weighting, leading to more balanced and trustworthy models in high-stakes applications like credit scoring or medical diagnosis.
- Compositional Annotated Tensor Semantics for Explainable AI
-
Improvement: Implement named-axis tensors with semantic roles (variable, structural, domain) to track how each logical term contributes to the final output.
-
Capability: The AI can provide fine-grained explanations of its reasoning, showing which structural positions (e.g., time steps, graph nodes) and logical rules drove a prediction, enhancing interpretability in regulatory or scientific contexts.
- Domain-Specific Structural Theories for Few-Shot Learning
-
Improvement: Predefine structural relations (e.g.,
next,connected,part of) as reusable templates for new tasks, reducing the need for task-specific feature engineering. -
Capability: The AI can rapidly adapt to new structured domains (e.g., video frames, sensor arrays, knowledge graphs) with minimal labeled data by leveraging logical priors on structure, improving generalization in robotics, IoT, and spatiotemporal forecasting.
- Guarded and Diagonal Quantification for Efficient Constraint Enforcement
-
Improvement: Use sLTN’s guarded quantification (e.g.,
@t valid(t): φ(t)) to restrict logical rules to relevant structural subsets, reducing computational overhead. -
Capability: The AI can scale to large structured datasets (e.g., long sequences, massive graphs) by only applying constraints where they matter, enabling real-time inference in edge devices or streaming data pipelines.
- Recursive Computational Primitives for Hierarchical Structures
-
Improvement: Extend sLTN with recursive structural relations (e.g., tree depth, path traversal) to model nested or hierarchical organizations.
-
Capability: The AI can reason over recursive structures like parse trees, file systems, or biological taxonomies, enforcing logical consistency across levels (e.g., “if a parent node has property X, at least one child must have property Y”), improving tasks like code generation, document summarization, and protein structure prediction.
Abstract
Logic Tensor Networks (LTN) provide a neurosymbolic framework in which first-order logic is interpreted through tensor operations, enabling logical constraints to be integrated with differentiable learning. However, the original formulation of LTN is primarily suited to data represented as flat collections of individuals, and does not explicitly capture structural organization such as temporal order, sequential position, or graph connectivity. We introduce sLTN, an extension of LTN that makes structural dimensions first-class elements of the language. Structural dimensions represent named tensor axes associated with domain-specific organization, such as time steps, sequence positions, or graph nodes. They can be quantified explicitly, related through structural relations, and used to express temporal, sequential, and relational constraints directly at the logical level. We formalize the syntax and fuzzy tensor semantics of sLTN and show that, in the absence of structural dimensions, the framework recovers the original LTN semantics as a special case. We further describe a PyTorch implementation based on a declarative signature, formula parsing, and tensorial interpretation. The framework is illustrated on representative temporal and sequential reasoning examples. This paper serves as a companion to the sltn library, available at https://github.com/logictensornetworks/sltn.
Sources
- Squareplus: A Softplus-Like Algebraic Rectifier
- First-Order Temporal Logic Tensor Networks
- LTNtorch: PyTorch Implementation of Logic Tensor Networks
- Weakly Supervised Segmentation as Semantic-Based Regularization
- Jacobian Descent for Multi-Objective Optimization
- Logical Neural Networks
- Logic Tensor Network-Enhanced Generative Adversarial Network
- Analyzing Differentiable Fuzzy Logic Operators
- Neuro-Symbolic Artificial Intelligence: Towards Improving the Reasoning Abilities of Large Language Models
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems
- VSAL: A Vision Solver with Adaptive Layouts for Graph Property Detection