Table of Contents
Fetching ...

DeepDFA: Injecting Temporal Logic in Deep Learning for Sequential Subsymbolic Applications

Elena Umili, Francesco Argenziano, Roberto Capobianco

TL;DR

DeepDFA introduces a differentiable, probabilistic automaton layer that encodes temporal logic as $DFA$ or Moore Machines to bridge subsymbolic perception and symbolic reasoning. The framework supports knowledge injection (via prior automata) and, in extended form, probabilistic symbol grounding, enabling learning and reasoning in both static sequence classification and non-Markovian RL. Empirical results across MNIST-Declare and CAVIAR, plus Minecraft-inspired RL tasks, show DeepDFA consistently outperforms purely neural models and competitive neuro-symbolic baselines, while requiring fewer trainable parameters. The work highlights a practical pathway to integrate temporal knowledge into deep learning, with potential extensions to automata induction and constrained sequence generation.

Abstract

Integrating logical knowledge into deep neural network training is still a hard challenge, especially for sequential or temporally extended domains involving subsymbolic observations. To address this problem, we propose DeepDFA, a neurosymbolic framework that integrates high-level temporal logic - expressed as Deterministic Finite Automata (DFA) or Moore Machines - into neural architectures. DeepDFA models temporal rules as continuous, differentiable layers, enabling symbolic knowledge injection into subsymbolic domains. We demonstrate how DeepDFA can be used in two key settings: (i) static image sequence classification, and (ii) policy learning in interactive non-Markovian environments. Across extensive experiments, DeepDFA outperforms traditional deep learning models (e.g., LSTMs, GRUs, Transformers) and novel neuro-symbolic systems, achieving state-of-the-art results in temporal knowledge integration. These results highlight the potential of DeepDFA to bridge subsymbolic learning and symbolic reasoning in sequential tasks.

DeepDFA: Injecting Temporal Logic in Deep Learning for Sequential Subsymbolic Applications

TL;DR

DeepDFA introduces a differentiable, probabilistic automaton layer that encodes temporal logic as or Moore Machines to bridge subsymbolic perception and symbolic reasoning. The framework supports knowledge injection (via prior automata) and, in extended form, probabilistic symbol grounding, enabling learning and reasoning in both static sequence classification and non-Markovian RL. Empirical results across MNIST-Declare and CAVIAR, plus Minecraft-inspired RL tasks, show DeepDFA consistently outperforms purely neural models and competitive neuro-symbolic baselines, while requiring fewer trainable parameters. The work highlights a practical pathway to integrate temporal knowledge into deep learning, with potential extensions to automata induction and constrained sequence generation.

Abstract

Integrating logical knowledge into deep neural network training is still a hard challenge, especially for sequential or temporally extended domains involving subsymbolic observations. To address this problem, we propose DeepDFA, a neurosymbolic framework that integrates high-level temporal logic - expressed as Deterministic Finite Automata (DFA) or Moore Machines - into neural architectures. DeepDFA models temporal rules as continuous, differentiable layers, enabling symbolic knowledge injection into subsymbolic domains. We demonstrate how DeepDFA can be used in two key settings: (i) static image sequence classification, and (ii) policy learning in interactive non-Markovian environments. Across extensive experiments, DeepDFA outperforms traditional deep learning models (e.g., LSTMs, GRUs, Transformers) and novel neuro-symbolic systems, achieving state-of-the-art results in temporal knowledge integration. These results highlight the potential of DeepDFA to bridge subsymbolic learning and symbolic reasoning in sequential tasks.
Paper Structure (34 sections, 17 equations, 8 figures, 2 tables)

This paper contains 34 sections, 17 equations, 8 figures, 2 tables.

Figures (8)

  • Figure 1: a) Expressivity of different temporal formalisms. b-c) An example of a PFA (b) and a DFA (c) with three states and two symbols. For both we show: (i) the graph describing the automaton, (i) its equivalent representation in matrix form, and (ii) produced states and output probabilities while processing the string "ab".
  • Figure 2: Example of use of LTLf and DFA in non-Markovian RL. a) An example of non-Markovian navigation environment inspired by the Minecraft videogame. b) Moore Machine for the task: Moore Machine for the task: the agent has to visit the pickaxe and the gem (in any order), before reaching the door, while always avoiding the lava. We draw in green a trajectory accomplishing the task and in dashed red a trajectory failing the task, in both the environment (a) and the automaton (b).
  • Figure 3: Neural architecture used for semi-supervised symbol grounding through knowledge injection with DeepDFA
  • Figure 4: A visual representation of our algorithm for integrating knowledge through DeepDFA within non-Markovian RL
  • Figure 5: Example of different automata-based reward schemes. a) Environment for LTLf navigation tasks. b -c) Moore Machine for the task: Moore Machine for the task: the agent has to visit the pickaxe (P), the lava (L) and the door (D) cells in any order. In (b) the machine is labeled with a sparse reward signal that only distinguish the final state from the others. In (c) the machine is labeled using a dense reward signal based on the distance from the final state
  • ...and 3 more figures