Back to AI Research

AI Research

sLTN: Structural Logic Tensor Networks | AI Research

Key Takeaways

  • sLTN: Structural Logic Tensor Networks introduces a neurosymbolic framework that extends Logic Tensor Networks (LTN) to explicitly handle structured data.
  • 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.
  • 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.
Paper AbstractExpand

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 this https URL .

sLTN: Structural Logic Tensor Networks introduces a neurosymbolic framework that extends Logic Tensor Networks (LTN) to explicitly handle structured data. While traditional LTN models data as flat collections of individuals, sLTN treats structural organization—such as temporal order, sequence positions, or graph connectivity—as a first-class element of the logical language. This allows researchers to express relational and sequential constraints directly within a differentiable learning environment.

Addressing Structural Limitations

The original LTN framework is effective for integrating first-order logic with neural networks, but it struggles when data semantics depend on specific organizational patterns. For example, reasoning about time series or graph-based dependencies requires referring to positions or neighbors. sLTN addresses this by introducing "structural dimensions," which are named tensor axes that represent domain-specific organizations. By formalizing these dimensions, the framework enables logical expressions to quantify over structural indices and apply constraints based on structural relations, such as adjacency in a sequence or graph.

How the Framework Works

sLTN operates by separating the syntax of a theory from its tensorial interpretation. The process involves three main steps:

  • Signature Declaration: Users define a signature that includes sorts, structural dimensions, constants, variables, and structural relations. This step establishes the vocabulary and the dimensional profiles of the symbols.

  • Formula Parsing: The framework uses a grammar that supports both standard first-order logic and structural extensions. This includes structural quantifiers, guarded quantification (where formulas are evaluated only on specific subsets of data), and axis annotations for renaming or slicing tensors.

  • Tensorial Interpretation: Once defined, the system maps these logical constructs to PyTorch-based tensor operations. Because the framework maintains differentiable fuzzy semantics, it allows for gradient-based optimization, where the goal is to maximize the truth value of the logical formulas provided.

Implementation and Reasoning

The authors, Davide Rinaldi and Luciano Serafini, provide a PyTorch-based implementation that supports these structural features. The framework is designed to be modular, allowing users to define complex constraints, such as temporal persistence (e.g., if a property holds at one time step, it must hold at the next) or boundary conditions (e.g., specific states at the start or end of a sequence). In the absence of structural dimensions, the sLTN framework recovers the original LTN semantics, ensuring backward compatibility with existing LTN applications.

Franklin Analysis

The evidence provided suggests that sLTN is a targeted extension of the existing LTN neurosymbolic paradigm. By moving structural organization from an implicit implementation detail to an explicit part of the logical language, the authors provide a more formal way to inject domain knowledge into neural models. The framework’s reliance on PyTorch and its ability to handle guarded structural quantification suggests it is intended for tasks where data structure is inherently tied to the reasoning process, such as video classification or sequential process monitoring. The authors note that this work serves as a companion to the open-source sLTN library.

Comments (0)

No comments yet

Be the first to share your thoughts!