LNN

LNN

โ˜… 3.6 ๐Ÿ”– 600 saves ๐Ÿ’ฐ Free GitHub

LNN, short for Logical Neural Networks, is an open-source neuro-symbolic AI framework from IBM. Published on GitHub under the Apache-2.0 license with about 335 stars and updated in October 2026, it implements a framework the project describes as Neural equals Symbolic, for sound and complete weighted real-value logic.

Overview

In an LNN, every neuron has a meaning as a component of a formula in a weighted real-valued logic, which yields a highly interpretable, disentangled representation instead of a black box. Inference is omnidirectional rather than aimed at predefined target variables, and it corresponds to logical reasoning, with classical first-order logic theorem proving as a special case. The model is end-to-end differentiable, and learning minimizes a novel loss function that captures logical contradiction, giving resilience to inconsistent knowledge. It also supports the open-world assumption by maintaining bounds on truth values with probabilistic semantics, which helps when knowledge is incomplete. The framework requires Python 3.11 or newer.

IBM publishes full documentation for the framework, including an API overview, links to the academic papers behind the method, and educational resources on neuro-symbolic AI. Contributions are welcome through the GitHub repository, and the codebase follows standard Python tooling conventions, which makes it straightforward to embed LNN models inside existing research pipelines and to evaluate them alongside conventional neural networks.

Key Features

  • Neuro-symbolic models where neurons correspond to logical formula components
  • Omnidirectional inference that amounts to logical reasoning and theorem proving
  • End-to-end differentiable training with a contradiction-based loss function
  • Open-world reasoning with bounded truth values for incomplete knowledge
  • Interpretable representations that can be inspected formula by formula
  • Python package with documentation, papers, and educational resources

๐Ÿ’ณ Pricing

LNN is free and open source under the Apache-2.0 license. There is no commercial edition or hosted service; you install the Python framework and run it in your own research environment.

Who Is It For

LNN is for AI researchers and advanced practitioners working on neuro-symbolic methods, knowledge-rich reasoning, and applications where a model must explain and justify its conclusions logically.

๐Ÿš€ Visit LNN Official Site

๐Ÿšฉ Report an issue