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.
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.
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.
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.