Reactive Knowledge Representation and Asynchronous Reasoning

Simon Kohaut, Benedict Flade, Julian Eggert, Kristian Kersting, Devendra Singh DhamiarXiv 2026

TL;DR

Exact probabilistic reasoning in real-time autonomous systems is often bottlenecked because traditional models recompute everything from scratch whenever a single input changes. This paper introduces Resin, a reactive probabilistic programming language, and Reactive Circuits (RCs), which dynamically restructure their internal computational graphs based on how frequently individual inputs change. By memoizing stable sub-problems and only updating volatile components, RCs achieve multiple orders of magnitude speedup in dynamic environments like drone swarm simulations.

What Problem Does This Paper Address?

Autonomous agents, such as self-driving cars and robotic swarms, must constantly make safe decisions in uncertain, fast-changing environments. While probabilistic logic frameworks provide the formal safety guarantees required for these tasks, executing exact inference in real time is computationally punishing.

A major flaw in existing tractable inference models (like standard Probabilistic Circuits) is that they are "frequency-agnostic." They treat all data streams equally, re-evaluating the entire model whenever any input updates. In reality, environmental data is highly heterogeneous: an autonomous drone's GPS coordinates might change continuously (high frequency), traffic lights change intermittently (medium frequency), and weather conditions or map layouts remain static for hours (low frequency). Re-evaluating static parts of a model alongside highly volatile ones creates massive computational redundancy, leading to high latency that can be dangerous in safety-critical applications.

Methods

The authors introduce an asynchronous reasoning architecture consisting of two core components:

  1. Resin (Reactive Signal Inference): A high-level, declarative probabilistic programming language. It allows developers to define background logic constraints using first-order logic and Answer Set Programming (ASP) while explicitly connecting them to asynchronous data streams (e.g., via ROS2/DDS channels).
  2. Reactive Circuits (RCs): An adaptive inference engine built as a meta-structure over Algebraic Circuits.
Fig. 1. The Asynchronous Reasoning architecture: For each target of a Resin program, the compiler parses the program into a constrained Answer Set Program and generates the respective stable models. This causes an initial Reactive Circuit (RC) to be created and connected to datastreams, which is then, over time, adapted to reflect the volatility of its inputs.

How It Works:

  • Compilation: The Resin compiler translates the logic program into stable models using an off-the-shelf ASP solver (Clingo), generating an initial Weighted Model Counting (WMC) problem represented as a Directed Acyclic Graph (DAG).
  • Online Frequency Tracking: RCs employ an online Kalman filter for each input signal to estimate its Frequency of Change (FoC). A "Predicate of Change" ($\phi$) filters out minor sensor noise so the system only reacts to meaningful updates.
  • Circuit Plasticity (Lift & Drop): Based on the estimated FoC, signals are partitioned into discrete frequency bands. The circuit dynamically restructures itself using semantic-preserving lift and drop operations. Highly volatile inputs are isolated into specific sub-formulas, while stable inputs are grouped together.
  • Reactive Evaluation: When a high-frequency signal updates, the RC uses a topologically sorted queue to re-evaluate only the specific components of the DAG affected by that signal. The rest of the circuit relies on strategically memoized intermediate results.
Fig. 2. Reactive Circuits enable Asynchronous Reasoning: After compiling a Resin program (a) into an initial Reactive Circuit, its structure is adapted over time to facilitate an optimized inference scheme (b) by dividing the original formula into memorized sub-formulas according to the volatility of the respective input signals (c). Here, the 𝑠𝑝𝑒𝑒𝑑, 𝑐𝑙𝑒𝑎𝑟𝑎𝑛𝑐𝑒, and 𝑟𝑎𝑖𝑛 signals are assumed to have a descending volatility, thereby being assigned to separate depths of the RC’s DAG.

Datasets

The framework was evaluated using two distinct setups:

  • Synthetic Benchmarks: Randomly generated WMC problems evaluated over $10^5$ models with $10^3$ sources chosen from $2 \times 10^3$ overall signals. This setup was used to isolate and analyze the trade-offs between partitioning granularity, circuit depth, and memory footprint.
  • AirSim Simulation: A high-fidelity physics simulation representing an Advanced Air Mobility scenario. It tracked 7 Unmanned Aircraft Systems (UAS) performing randomized journeys in a suburban environment, continually asserting a safety target (unsafe if any two drones flew closer than 25 meters).

Key Insights and Ideas

  • Computational Plasticity: Instead of relying on a static computation graph compiled offline, the inference engine's structure should actively morph to mirror the temporal dynamics of the physical world.
  • Isolating Volatility: By pushing highly volatile inputs to separate branches of the DAG, you prevent their frequent updates from "invalidating" the cached computations of more stable variables.
  • The Granularity Trade-off: Finer frequency partitioning (smaller bin sizes) results in deeper circuits with a larger memory footprint due to increased memoization. However, this extra memory allocation directly translates to significantly faster inference times.

Key Results

  • Orders of Magnitude Speedup: In the AirSim drone swarm tracking task, the fully "reactive" circuit (combining structural adaptation with partial re-computation) achieved runtime speedups of several orders of magnitude compared to a traditional "flat" baseline.
Fig. 3. Asynchronous Inference in Resin via Reactive Circuits: For each inference target of a Resin program, a Reactive Circuit (RC) is initialized. Over time, the RC’s structure is adapted to facilitate memorized intermediate results (green) and offload sub-formulas of the sum-product problem (yellow), enabling efficient updates based on a partitioning of the frequency of new values arriving through the source nodes (blue).
  • Dynamic Adaptation: As drones transitioned between high-volatility maneuvers and low-volatility states, the Kalman filters accurately tracked the shifting frequencies, prompting the RC to dynamically redistribute source nodes between layers in real time.

Limitations and Future Work

  • Heterogeneous Node Models: Currently, formula nodes in the RC assume uniform algebraic operations. The authors note that performance could be improved by integrating different types of computational models into the nodes depending on the size of the sub-formula.
  • Broader Neuro-Symbolic Integration: While Resin connects well with basic data streams, future work aims to tightly couple RCs with complex deep learning models and broader probabilistic frameworks.
  • Active Upstream Querying: Instead of purely reacting to incoming data, a future iteration of the circuit could use its frequency tracking to actively request updates from upstream sensors or neural models at optimized time intervals, further saving bandwidth and compute.

Summary updated

BibTeX
@misc{kohaut2026reactive,
  author = {Simon Kohaut and Benedict Flade and Julian Eggert and Kristian Kersting and Devendra Singh Dhami},
  title = {{Reactive Knowledge Representation and Asynchronous Reasoning}},
  year = {2026},
  eprint = {2602.05625},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05625},
}
Figure