Introduction
Deep learning has revolutionized the processing of high-dimensional data, yet it remains challenged by requirements for massive datasets, limited explainability, and difficulty integrating prior domain knowledge. Conversely, symbolic reasoning excels at rule-based logic but struggles with raw, "subsymbolic" inputs like video or sensor data. NeSyA (Neurosymbolic Automata) is a novel framework designed to bridge this gap by combining the perceptual capabilities of deep learning with the temporal reasoning of symbolic automata.
The Challenge of Temporal Reasoning
Existing neurosymbolic (NeSy) systems often face a trade-off between scalability and accuracy. Probabilistic systems like DeepStochLog offer rigorous semantics but suffer from exponential slowdowns as sequence lengths increase. On the other hand, systems like FUZZYA utilize fuzzy logic to maintain speed, which can compromise predictive accuracy. NeSyA addresses these limitations, providing a mathematically robust and computationally efficient method for reasoning over sequences of raw data.
The NeSyA Framework
The core of NeSyA is the integration of Symbolic Automata (SFA) into a differentiable neural pipeline. Unlike classical automata, SFAs use propositional logic formulas on their transitions, allowing them to handle complex, overlapping conditions efficiently.
The pipeline consists of three main stages:
- Neural Extraction: A neural network (e.g., a CNN) processes raw input frames and outputs probabilities for various logical propositions (e.g., "is the driver tired?").
- Symbolic Automaton (SFA): These probabilities serve as inputs to an SFA, where transitions are governed by logical formulas like
tired ∨ blocked. - Differentiable Inference: To enable end-to-end training, NeSyA compiles logical formulas into d-DNNF circuits. Using Weighted Model Counting (WMC) and matrix-based α-recursion, the system computes the probability of sequence acceptance in linear time, making it highly parallelizable on GPUs.
Evaluation and Results
NeSyA was evaluated on two benchmarks: a synthetic "driving emoji" dataset and the real-world CAVIAR event recognition dataset.
Performance and Scalability
NeSyA demonstrates significant improvements in both speed and accuracy:
- Efficiency: NeSyA is approximately two orders of magnitude faster than DeepStochLog. For sequences of length 30, NeSyA processes batches in 0.08 seconds, compared to 30 seconds for the baseline.
- Robustness: On synthetic benchmarks, NeSyA maintained near-perfect accuracy (0.94–1.0) even as sequences grew, whereas fuzzy-logic baselines saw performance drop to 0.5.
- Data Efficiency: In low-data regimes (CAVIAR), NeSyA outperformed purely neural models like Transformers and LSTMs. By hard-coding logic into the SFA, NeSyA achieved superior results with 10x fewer parameters.
Key Insights
- Probabilistic Semantics: True probabilistic reasoning provides a more stable learning signal than fuzzy logic for temporal tasks.
- Distant Supervision: NeSyA can learn to ground symbols (e.g., identifying "tired" behavior) using only high-level sequence labels, eliminating the need for frame-by-frame manual annotations.
- SFAs as Intermediate Representations: Symbolic automata are powerful enough to capture complex temporal logic (like LTLf) while remaining structured enough for efficient compilation into arithmetic circuits.
Conclusion and Future Work
NeSyA represents a significant step forward in neurosymbolic AI, offering a scalable and accurate framework for temporal reasoning. While the current version requires hand-crafted logic, future research will explore Automata Learning to automatically discover rules from data and scaling the system to handle larger vocabularies and first-order logic.
Summary updated