Papers
Topics
Authors
Recent
Search
2000 character limit reached

DeepLog: Neurosymbolic AI Framework

Updated 3 July 2026
  • DeepLog is a neurosymbolic AI framework integrating logic and neural predicates to compile hybrid models into optimized GPU-executable arithmetic circuits.
  • It offers a high-level language for model specification, automatic circuit compilation, and seamless Python/PyTorch integration for neurosymbolic modeling.
  • It delivers 10–100× performance speedups with GPU acceleration and robust extensibility for emulating diverse logical paradigms such as Boolean, fuzzy, and probabilistic.

DeepLog refers to two distinct paradigms within artificial intelligence research: (1) a neurosymbolic AI framework and abstract machine, and (2) an LSTM-based log anomaly detection method. This entry concentrates on the neurosymbolic framework DeepLog, synthesizing formal definitions, software architecture, integration modes, empirical results, and extensibility, as developed in recent literature (Derkinderen et al., 19 Aug 2025, Manhaeve et al., 11 May 2026). For the sequence-modeling anomaly detection system, see the original LSTM formulation (Chen et al., 2021).

1. Foundations and Goals

DeepLog is a unifying software framework and formal machine for neurosymbolic AI (NeSy), designed to bridge logic-based and deep learning–based models by compiling mixed logical-neural specifications into efficient, GPU-executable arithmetic (algebraic) circuits (Derkinderen et al., 19 Aug 2025, Manhaeve et al., 11 May 2026). Its central goals are the abstraction over logic types (Boolean, fuzzy, probabilistic), native integration within PyTorch, and support for rapid prototyping and benchmarking across the "neurosymbolic alphabet soup" (e.g., DeepProbLog, Logic Tensor Networks).

The system offers:

  • A high-level language for specifying neurosymbolic models that interleave logic and neural predicates.
  • Automatic compilation of this language into optimized arithmetic circuits compatible with dense and sparse GPU evaluation.
  • A modular Python/PyTorch API permitting symbolic modules, constraints, and reasoning layers to function as ordinary nn.Module components.
  • Backend independence to emulate a broad range of established NeSy paradigms, lowering barriers for machine learning practitioners to incorporate logical constraints and for symbolic AI researchers to build and compare hybrid integrations (Manhaeve et al., 11 May 2026).

2. Formal Language and Logic Abstraction

Algebraic Structures and Syntax

DeepLog operates at an intermediate level combining grounded first-order logic with neural annotation, parameterizing semantics using algebraic structures. An algebraic structure is a triple

R=(AR,UR,BR)R = (\mathcal{A}_R, \mathcal{U}_R, \mathcal{B}_R)

where AR\mathcal{A}_R is the value set (e.g., {true,false},[0,1]\{true, false\}, [0,1]), UR\mathcal{U}_R unary operations, and BR\mathcal{B}_R binary operations. The logic type (Boolean, fuzzy, probabilistic) is specified by choosing RR.

A DeepLog formula over RR is constructed from algebraic atoms p(t1,,tn)Rp(t_1,\dots,t_n)_R, unary and binary connectives, aggregations, and optional transformations between algebraic domains (Derkinderen et al., 19 Aug 2025).

Semantics and Inference

Interpretations map ground atoms to truth values. The semantics are determined by recursive labelling: atomic labels (neural or parameterized), connectives, aggregations (\sum over groundings or variable assignments), and structure-shifting transformations. By merely swapping RR, a single formula can instantiate as classical probabilistic logic, fuzzy logic (with user-supplied t-norms), or hybrids.

Example:

  • Boolean: AR\mathcal{A}_R0
  • Probabilistic: AR\mathcal{A}_R1
  • Fuzzy: AR\mathcal{A}_R2

This abstraction allows DeepLog to emulate systems such as DeepProbLog and Logic Tensor Networks by altering only algebraic structure and labelling (Derkinderen et al., 19 Aug 2025).

3. Compilation to Arithmetic Circuits and Architecture

System Pipeline

  1. Specification: The user defines a neurosymbolic model by combining logic (e.g., in Prolog, DIMACS, or Python) with neural predicates.
  2. Compilation: DeepLogModuleFactory parses the specification, compiles logic into an arithmetic circuit AR\mathcal{A}_R3 via backends (KLay, SDD), and emits a composite DeepLogModule (Manhaeve et al., 11 May 2026).
  3. Circuit Evaluation: AR\mathcal{A}_R4 is a DAG where internal nodes are sums or products, and leaves are neural outputs or symbolic constants. Full GPU-native evaluation is realized by expressing AR\mathcal{A}_R5 in terms of PyTorch tensors and custom CUDA kernels.
  4. Runtime: Neural components yield scores, which propagate through the arithmetic circuit to yield symbolic-logic–aware outputs (Manhaeve et al., 11 May 2026).

Arithmetic Circuit Formal Definition

AR\mathcal{A}_R6

where AR\mathcal{A}_R7 are weights (fixed or learnable), AR\mathcal{A}_R8 are input features (neural predicate outputs or subcircuit values), and AR\mathcal{A}_R9 index sum/product structure as defined by the compiled logic (Manhaeve et al., 11 May 2026).

Integration Modes

  • Logic in the architecture: Compiles the logic directly into the computational graph, ensuring logical constraints are hard-enforced by construction. Typically yields strong inductive bias and is reflected in the executable PyTorch module.
  • Logic as loss: Logic is applied as a semantic-logic penalty in the loss function, enabling softer enforcement but with weaker guarantees at inference (Derkinderen et al., 19 Aug 2025).

4. Modular API and System Emulation

Python/PyTorch API

DeepLog provides:

  • SymTensor: extends torch.Tensor to carry symbolic annotations.
  • DeepLogModule: subclass of nn.Module implementing .forward(SymTensor), executes neural and symbolic logic in-line.
  • DeepLogModuleFactory: orchestrates predicate definition, logical connectives (and, or, not, exists, forall), and outputs the integrated DeepLogModule.

Modules for parsing (e.g., parse_dimacs_to_module, parse_prolog), node construction, and reshaping inputs are provided. Integration into the PyTorch workflow is seamless; symbolic constraints can be backpropagated through in the standard optimizer/training loop (Manhaeve et al., 11 May 2026).

System Emulation

By composing custom structures and predicates, DeepLog emulates existing NeSy architectures:

  • DeepProbLog: probabilistic logic semantics, with neural predicates mapping inputs to distributions (e.g., CNN→softmax), simulated using appropriate connectives and Prolog-style clauses.
  • Logic Tensor Networks: fuzzy semantics, t-norm connectives, with neural predicates as continuous-valued logic functions, existential aggregation, and fuzzy quantification implemented natively (Manhaeve et al., 11 May 2026).

5. Empirical Benchmarks and Optimization

Performance

Representative results on hybrid tasks include MNIST-Addition and Visual 4×4 Sudoku. Logic-in-architecture (especially with probabilistic or product t-norm semantics) yields near-perfect accuracy ({true,false},[0,1]\{true, false\}, [0,1]0 on Sudoku) and dramatically outperforms logic-as-loss and pure neural baselines.

Inference Time

Digits DeepProbLog CPU DeepLog CPU DeepLog GPU
1 {true,false},[0,1]\{true, false\}, [0,1]1 s {true,false},[0,1]\{true, false\}, [0,1]2 s {true,false},[0,1]\{true, false\}, [0,1]3 s
2 {true,false},[0,1]\{true, false\}, [0,1]4 s {true,false},[0,1]\{true, false\}, [0,1]5 s {true,false},[0,1]\{true, false\}, [0,1]6 s
3 {true,false},[0,1]\{true, false\}, [0,1]7 s {true,false},[0,1]\{true, false\}, [0,1]8 s {true,false},[0,1]\{true, false\}, [0,1]9 s
4 UR\mathcal{U}_R0 s UR\mathcal{U}_R1 s

DeepLog achieves 10–100× speedups over CPU-based probabilistic logic frameworks when run on GPU (Manhaeve et al., 11 May 2026).

Optimization Strategies

  • GPU-accelerated circuit execution (KLay backend).
  • Circuit simplification (dead-node removal, subcircuit memoization).
  • Exploiting PyTorch’s asynchronous execution for compute interleaving.
  • Backend selection (SDD/decomposable DNNF/KLay) conditional on logic semantics.

Probabilistic and product t-norm semantics perform similarly on most tasks; certain t-norm choices (G\"odel/Łukasiewicz) may suffer from vanishing gradients (Derkinderen et al., 19 Aug 2025).

6. Extensibility, Limitations, and Future Work

DeepLog is designed for extensibility and declarative model design:

  • New algebraic structures or logical paradigms can be instantiated by specifying operations and labelling functions, without altering underlying software.
  • Planned extensions include deeper circuit-level rewriting, automated inference backend selection, dynamic circuit support (streaming logic), broader front-end language coverage (e.g., ASP, higher-order logic), and structure learning for discovering logical modules (Manhaeve et al., 11 May 2026).

Practical limitations include potential circuit growth for highly expressive logic, integration challenges with OOV (out-of-vocabulary) symbols in symbolic front-ends, and the need for backend-specific optimizations to maintain runtime efficiency.

This summary focuses on the neurosymbolic DeepLog line. For the LSTM-based anomaly detection DeepLog used in large-scale log analysis, see (Chen et al., 2021).

References

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DeepLog.