# TensorLog: A Differentiable Deductive Database

arXiv: https://arxiv.org/abs/1605.06523 · HTML: https://mlsanity.com/paper/1605.06523/

## Key facts

- Cited by 29 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 20 May 2016.

## Built on by (most cited first, 29 of 29)

- [Towards Data-and Knowledge-Driven Artificial Intelligence: A Survey on Neuro-Symbolic Computing](https://mlsanity.com/paper/2210.15889/) (2022)
- [Neurosymbolic AI for Reasoning over Knowledge Graphs: A Survey](https://mlsanity.com/paper/2302.07200/) (2023)
- [Neural-Symbolic Reasoning over Knowledge Graphs: A Survey from a Query Perspective](https://mlsanity.com/paper/2412.10390/) (2024)
- [FF-NSL: Feed-Forward Neural-Symbolic Learner](https://mlsanity.com/paper/2106.13103/) (2021)
- [Evaluating Deep Unlearning in Large Language Models](https://mlsanity.com/paper/2410.15153/) (2024)
- [Rethinking Complex Queries on Knowledge Graphs with Neural Link Predictors](https://mlsanity.com/paper/2304.07063/) (2023)
- [Explicit Planning Helps Language Models in Logical Reasoning](https://mlsanity.com/paper/2303.15714/) (2023)
- [Assessing SATNet's Ability to Solve the Symbol Grounding Problem](https://mlsanity.com/paper/2312.11522/) (2023)
- [pix2rule: End-to-end Neuro-symbolic Rule Learning](https://mlsanity.com/paper/2106.07487/) (2021)
- [ULLER: A Unified Language for Learning and Reasoning](https://mlsanity.com/paper/2405.00532/) (2024)
- [Disconnected Emerging Knowledge Graph Oriented Inductive Link Prediction](https://mlsanity.com/paper/2209.01397/) (2022)
- [Intelligent Computing: The Latest Advances, Challenges and Future](https://mlsanity.com/paper/2211.11281/) (2022)
- [Quant 4.0: Engineering Quantitative Investment with Automated, Explainable and Knowledge-driven Artificial Intelligence](https://mlsanity.com/paper/2301.04020/) (2022)
- [KERMIT: Knowledge Graph Completion of Enhanced Relation Modeling with Inverse Transformation](https://mlsanity.com/paper/2309.14770/) (2023)
- [Learning First-Order Rules with Relational Path Contrast for Inductive Relation Reasoning](https://mlsanity.com/paper/2110.08810/) (2021)
- [Reasoning over Logically Interacted Conditions for Question Answering](https://mlsanity.com/paper/2205.12898/) (2022)
- [Knowledge Enhanced Neural Networks for relational domains](https://mlsanity.com/paper/2205.15762/) (2022)
- [CLAUSE: Agentic Neuro-Symbolic Knowledge Graph Reasoning via Dynamic Learnable Context Engineering](https://mlsanity.com/paper/2509.21035/) (2025)
- [Neurosymbolic Methods for Rule Mining](https://mlsanity.com/paper/2408.05773/) (2024)
- [Human-Inspired Neuro-Symbolic World Modeling and Logic Reasoning for Interpretable Safe UAV Landing Site Assessment](https://mlsanity.com/paper/2510.22204/) (2025)
- [A Statistical Relational Approach to Learning Distance-based GCNs](https://mlsanity.com/paper/2102.07007/) (2021)
- [An original model for multi-target learning of logical rules for knowledge graph reasoning](https://mlsanity.com/paper/2112.06189/) (2021)
- [DegreEmbed: incorporating entity embedding into logic rule learning for knowledge graph reasoning](https://mlsanity.com/paper/2112.09933/) (2021)
- [Deep Explainable Learning with Graph Based Data Assessing and Rule Reasoning](https://mlsanity.com/paper/2211.04693/) (2022)
- [Reinforcement Logic Rule Learning for Temporal Point Processes](https://mlsanity.com/paper/2308.06094/) (2023)
- [Learning Complete Topology-Aware Correlations Between Relations for Inductive Link Prediction](https://mlsanity.com/paper/2309.11528/) (2023)
- [From Primes to Paths: Enabling Fast Multi-Relational Graph Analysis](https://mlsanity.com/paper/2411.11149/) (2024)
- [A Survey of Task-Oriented Knowledge Graph Reasoning: Status, Applications, and Prospects](https://mlsanity.com/paper/2506.11012/) (2025)
- [SoftReason: A Fully Differentiable Neuro-Soft-Symbolic Deductive Reasoning Architecture over High-Dimensional Perceptual Data](https://mlsanity.com/paper/2607.20402/) (2026)

## Abstract (arXiv)

Large knowledge bases (KBs) are useful in many tasks, but it is unclear how to integrate this sort of knowledge into "deep" gradient-based learning systems. To address this problem, we describe a probabilistic deductive database, called TensorLog, in which reasoning uses a differentiable process. In TensorLog, each clause in a logical theory is first converted into certain type of factor graph. Then, for each type of query to the factor graph, the message-passing steps required to perform belief propagation (BP) are "unrolled" into a function, which is differentiable. We show that these functions can be composed recursively to perform inference in non-trivial logical theories containing multiple interrelated clauses and predicates. Both compilation and inference in TensorLog are efficient: compilation is linear in theory size and proof depth, and inference is linear in database size and the number of message-passing steps used in BP. We also present experimental results with TensorLog and discuss its relationship to other first-order probabilistic logics.
