[Paper Review] TensorLog: Deep Learning Meets Probabilistic DBs
TensorLog integrates probabilistic first-order logic with deep learning by compiling logical queries into differentiable functions executable on GPU-accelerated frameworks like TensorFlow. It enables scalable, differentiable inference over large knowledge bases—handling up to 420,000 triples and 10,000 examples in ~200 seconds per epoch—by restricting inference to tractable ptree-SDKG structures and using dynamic programming for belief propagation.
We present an implementation of a probabilistic first-order logic called TensorLog, in which classes of logical queries are compiled into differentiable functions in a neural-network infrastructure such as Tensorflow or Theano. This leads to a close integration of probabilistic logical reasoning with deep-learning infrastructure: in particular, it enables high-performance deep learning frameworks to be used for tuning the parameters of a probabilistic logic. Experimental results show that TensorLog scales to problems involving hundreds of thousands of knowledge-base triples and tens of thousands of examples.
Motivation & Objective
- To bridge probabilistic first-order logic reasoning with deep learning infrastructure, enabling end-to-end differentiable training.
- To address the scalability bottleneck of traditional grounding-based inference in probabilistic logic systems, which becomes infeasible for large knowledge bases.
- To enable parameter learning in probabilistic deductive databases using gradient-based optimization, rather than hand-labeled data or direct supervision on soft predicates.
- To formalize a tractable subclass of probabilistic deductive databases (ptree-SDKGs) that supports efficient, differentiable inference while preserving sufficient expressiveness.
- To demonstrate that differentiable inference over logical queries can be efficiently executed on modern deep learning platforms like TensorFlow and Theano.
Proposed method
- Compiles first-order logical queries into differentiable computational graphs using a restricted class of probabilistic deductive databases called ptree-SDKGs.
- Employs dynamic programming via belief propagation on a factor graph where each random variable corresponds to a possible binding of a logical variable in a proof.
- Represents soft predicates (e.g., indicatesLabel, important) as differentiable parameters whose weights are tuned via gradient descent.
- Uses a grounding-free inference algorithm that avoids the exponential blowup of full grounding by exploiting polytree-structured dependencies.
- Embeds logical reasoning into neural network frameworks by expressing inference as a differentiable function, enabling backpropagation through logical queries.
- Applies differentiable soft constraints and probabilistic inference to enable joint learning of logical rules and their parameters from question-answer pairs.
Experimental results
Research questions
- RQ1Can probabilistic first-order logic reasoning be efficiently integrated into deep learning frameworks like TensorFlow and Theano?
- RQ2Is it possible to perform scalable, differentiable inference over large probabilistic knowledge bases without full grounding?
- RQ3Can parameter learning for soft predicates (e.g., indicating label relevance) be achieved indirectly from question-answer supervision rather than direct labeling?
- RQ4What restrictions on the logical structure preserve tractable inference while maintaining sufficient expressiveness for real-world reasoning tasks?
- RQ5Can the computational complexity of #P-hard inference tasks be mitigated through architectural constraints like ptree-SDKGs?
Key findings
- TensorLog scales to knowledge bases with up to 420,000 triples and 10,000 training examples, achieving inference in approximately 200 seconds per epoch on a single GPU.
- The system supports end-to-end differentiable training of soft predicate weights using gradient descent, enabling indirect supervision from question-answer pairs.
- The ptree-SDKG formalism ensures tractable inference by restricting dependency structures to polytree-liked graphs, avoiding the exponential blowup of full grounding.
- Theoretical analysis shows that general probabilistic logic inference remains #P-hard under standard semantics, justifying the need for structural restrictions like ptree-SDKGs.
- Empirical results demonstrate that the system can learn meaningful logical parameters (e.g., for indicating label relevance) from natural language question-answering data.
- The framework enables high-performance training by leveraging GPU-accelerated deep learning platforms, making it feasible to scale logical reasoning to real-world datasets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.