Papers
Topics
Authors
Recent
Search
2000 character limit reached

Reactive Message Passing: Patterns & Models

Updated 4 July 2026
  • Reactive Message Passing is a computational pattern where local entities update their state based on dynamic dependencies rather than following a fixed global schedule.
  • It underpins diverse applications such as incremental constraint satisfaction in distributed systems, schedule-free Bayesian inference, and dynamic routing in graph neural networks.
  • Implementations leverage reactive streams, direct thread communication in LLMs, and protocol-agnostic component reactivity to enhance system efficiency.

Reactive message passing denotes a family of computational models in which local entities update their state, outputs, or communication patterns in response to changes in neighboring entities, incoming evidence, or protocol-governed interactions. Across the literature, the term does not refer to a single formalism. In distributed systems, it has been used to question whether message passing should be treated as temporal propagation at all, and to reconstruct “reactivity” as incremental constraint satisfaction on symmetric compatibility relations (Borrill, 2 Mar 2026). In probabilistic inference, it denotes schedule-free execution of factor-graph algorithms through reactive streams, observables, subscriptions, and operators such as map and combineLatest (Bagaev et al., 2021). In graph learning, it appears as dynamic, state-dependent message passing in which graph nodes and pseudo nodes move in a common space and continuously reconfigure communication pathways (Sun et al., 2024). In language-model reasoning, it denotes persistent LLM threads that communicate through explicit spawn, send, recv, and stop directives and react to partial results through preemption (Liu et al., 1 Jul 2026). In component-based distributed systems, it describes protocol-independent components that are always receptive on input ports and whose compatibility with a governing choreography is checked through a behavioral type language (Savanović et al., 2020).

1. Conceptual range of the term

The literature uses reactive message passing to describe several distinct but structurally related ideas. A common pattern is that behavior is driven by local dependencies rather than by a monolithic global control loop. What changes across domains is the object being propagated: constraint evidence, probabilistic messages, learned features, LLM subproblem summaries, or typed protocol actions.

Research setting Reactive element Representative source
Distributed systems semantics Incremental discovery and enforcement of constraints (Borrill, 2 Mar 2026)
Bayesian inference on factor graphs Observable streams of messages and marginals (Bagaev et al., 2021)
Graph neural networks Dynamic pathways induced by evolving state-space relations (Sun et al., 2024)
LLM reasoning Persistent threads exchanging lightweight messages (Liu et al., 1 Jul 2026)
Component-based systems Flexible reactions filtered by a global protocol (Savanović et al., 2020)
Combinatorial optimization Local factor updates propagating through BP-style solvers (Ravanbakhsh, 2015)

In the factor-graph setting, Reactive Message Passing (RMP) is defined as “a framework for executing message-passing Bayesian inference where all messages and marginals are represented as reactive streams that automatically recompute when their dependencies change, without a pre-defined explicit schedule” (Bagaev et al., 2021). In the distributed-systems critique, reactive message passing is “usually understood as ‘components react to incoming messages over time, causing new messages to be sent,’” but that description is argued to conceal a category mistake by treating logical relations as temporal transport processes (Borrill, 2 Mar 2026). In governed components, reactivity means that components are “independent from the protocol, and reactive to messages in a flexible way,” while protocol adherence is handled separately through typing and conformance (Savanović et al., 2020).

This diversity suggests that reactive message passing is better understood as a recurring design pattern than as a single algorithm. A plausible implication is that the shared core lies in locality, incremental recomputation, and explicit dependence management, while temporal, probabilistic, neural, and protocol-theoretic interpretations are domain-specific specializations.

2. Formal semantics: from temporal propagation to dependency structure

A major semantic strand treats conventional message passing as representational rather than ontological. The critique centers on the Forward-In-Time-Only (FITO) assumption, formalized as a strict partial order (E,)(E,\prec) with irreflexivity, transitivity, and antisymmetry, together with the added commitment that causality flows along \prec and that admissible system narratives must move “forward” along it (Borrill, 2 Mar 2026). On this view, a category mistake occurs when “a logical relation (compatibility, entailment, constraint) is treated as a temporal transport process (propagation of an object from past to future)” (Borrill, 2 Mar 2026).

The proposed alternative is a constraint system (S,C)(S,C), where SS is a set of local states and CC is a compatibility relation. In the binary case, CS×SC \subseteq S \times S, and symmetric compatibility is defined by

(s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.

The claim is that compatibility does not carry an inherent direction of influence; it only specifies which combinations are allowed (Borrill, 2 Mar 2026). Messages are then reinterpreted not as moving objects but as “evidence-bearing certificates” that restrict the receiver’s possible commitments.

This semantics is accompanied by two equivalence theorems. First, any finite message-passing protocol execution in which each message is a verifiable claim about a sender local commitment and the protocol acceptance condition is a predicate over local commitments induces a constraint system (S,C)(S,C) whose satisfying valuations coincide with the accepted outcomes of the execution (Borrill, 2 Mar 2026). Second, any finite constraint system (S,C)(S,C) over participants with local domains SiS_i, under the assumption that participants can propose local values and verify constraints by exchanging finite certificates, can be realized by a message-passing protocol whose terminal outcomes are exactly the satisfying valuations of \prec0 (Borrill, 2 Mar 2026). The result is existential rather than efficiency-preserving.

Within this interpretation, “reaction” becomes incremental constraint satisfaction or distributed fixed-point computation, and clocks are treated as derived indices. A clock \prec1 satisfying \prec2 embeds a chosen order into a total order, but does not generate dependencies (Borrill, 2 Mar 2026). Scheduling is correspondingly reclassified as an algorithmic strategy for exploring a space of commitments rather than as part of the core semantics. The same general move appears, in a different idiom, in typed component systems: base components are always receptive on input ports, outputs become possible when tracked dependencies are satisfied, and only protocol-compatible reactions are admitted at composition time (Savanović et al., 2020).

In the type-theoretic account, a component type \prec3 records an input interface and output constraints with boundaries and dependencies, including “per-each” and “initial” dependencies on ports (Savanović et al., 2020). The type LTS updates dependency counters under inputs and consumes them under outputs. Subject Reduction states that if \prec4 and \prec5, then \prec6 and \prec7, where \prec8 has basic type \prec9 (Savanović et al., 2020). Progress states that if a type can perform a non-(S,C)(S,C)0 action, then the component can eventually perform the corresponding concrete I/O action and reach a state with the successor type (Savanović et al., 2020). This gives a formal notion of reactivity in which type-level possibility corresponds to implementation-level eventual behavior.

3. Schedule-free factor graphs and Bayesian inference

In probabilistic modeling, reactive message passing preserves standard factor-graph semantics while changing the execution model. The starting point is a factorized generative model (S,C)(S,C)1, represented as a Forney-style factor graph with variable nodes or edges (S,C)(S,C)2, factor nodes (S,C)(S,C)3, messages (S,C)(S,C)4 and (S,C)(S,C)5, local posteriors (S,C)(S,C)6, and marginals (S,C)(S,C)7 (Bagaev et al., 2021). Classical implementations are described as imperative, schedule-based, tightly coupled to static graphs, and essentially synchronous. RMP replaces this with a reactive, event-driven dataflow in which messages and marginals are observables that recompute when dependencies change.

The basic reactive constructs are observables, subscriptions, and operators such as map and combineLatest (Bagaev et al., 2021). Each factor node subscribes to selected inbound message or marginal streams, combines their current values, and applies a local update rule. For Belief Propagation, a factor-to-variable message has the form

(S,C)(S,C)8

whereas for Variational Message Passing the update may depend on marginals: (S,C)(S,C)9 Schedule-free execution means that no explicit sequential order is written; only local dependencies and local update rules are specified, and the runtime propagates updates as needed (Bagaev et al., 2021).

A central theoretical unifier is the Constrained Bethe Free Energy (CBFE) formulation. With Bethe factorization,

SS0

subject to normalization and local consistency constraints, the Bethe free energy decomposes as

SS1

where SS2 and SS3 are local energy and entropy terms (Bagaev et al., 2021). By adding form constraints and factorization constraints, the same reactive execution substrate realizes BP, VMP, EP, EM, and hybrids thereof. EP is represented by replacing exact marginal consistency with moment matching; in ReactiveMP.jl this is expressed by an added pipeline stage such as moment_matching() (Bagaev et al., 2021).

The implementation is embodied in ReactiveMP.jl, built on Rocket.jl, Distributions.jl, and GraphPPL.jl (Bagaev et al., 2021). It supports datavar, randomvar, getmarginal, update!, score(BetheFreeEnergy(), model), @model, @node, and @rule constructs, with Julia multiple dispatch selecting outbound message rules from node type, edge, constraint type, and inbound types (Bagaev et al., 2021). Reported experiments show execution on “large-scale probabilistic state space models with hundreds of thousands of random variables on a standard laptop computer” (Bagaev et al., 2021). For a linear Gaussian state space model, ReactiveMP.jl reports runtimes of 10 / 22 / 33 / 1,971 / 68,765 ms for 100 / 200 / 300 / 10,000 / 100,000 observations, while ForneyLab.jl reports compilation times of 112,753 / 374,830 / 1,057,691 ms for 100 / 200 / 300 observations and no values for 10,000 and 100,000; Turing HMC is also reported only on smaller instances (Bagaev et al., 2021). Similar large-scale results are given for HMMs and Hierarchical Gaussian Filters, with linear scaling in the number of observations and, where applicable, the number of VMP iterations (Bagaev et al., 2021).

The probabilistic strand therefore treats reactive message passing not as a new inference semantics but as a schedule-free execution model for existing message-passing mathematics. This distinguishes it from the atemporal constraint critique, which challenges the semantic primacy of temporal propagation itself (Borrill, 2 Mar 2026).

4. Dynamic pathways in graph neural networks

In graph learning, reactive message passing appears as dynamic, state-dependent construction of communication pathways. Standard message passing in GNNs aggregates over a fixed adjacency,

SS4

which the literature associates with over-smoothing, over-squashing, limited receptive field, and high cost for dense global communication (Sun et al., 2024). The proposed alternative introduces graph nodes and learnable pseudo nodes embedded in a common state space SS5, with graph-node states SS6 and pseudo-node states SS7 (Sun et al., 2024).

Relations are defined through a piecewise weighted inner product, termed “proximity”: SS8 with SS9 (Sun et al., 2024). The same CC0 is used for node-node, pseudo-pseudo, and pseudo-node relations. Because the states evolve over recurrent steps, the relation matrices CC1, CC2, and CC3 are recomputed repeatedly, and the message-passing topology changes over time.

Global message passing is factorized through pseudo nodes. A diffuse step sends node messages to pseudo nodes,

CC4

a refine step updates pseudo-node states through pseudo-pseudo interaction, and a collect step returns information from pseudo nodes to graph nodes,

CC5

with pseudo-node displacements CC6 produced by nonlinear transforms of the aggregated global signal (Sun et al., 2024). Local message passing on the original graph is retained: CC7 In the full CC8 model, pseudo-node adaptation, local message passing, and dynamic global message passing are interleaved recurrently, with shared parameters across steps (Sun et al., 2024).

The model is explicitly positioned as a dynamic message-passing mechanism with linear complexity in the number of nodes for fixed CC9 and CS×SC \subseteq S \times S0, namely CS×SC \subseteq S \times S1, in contrast to CS×SC \subseteq S \times S2 dense attention (Sun et al., 2024). Evaluation on eighteen benchmarks is reported, including graph classification, node classification, and long-range regression tasks. The paper reports, for example, 33.90% AP on OGB-molpcba with approximately 516K parameters, compared with 31.39% AP for Graphormer with 119.5M parameters, and 58.69% on arXiv-year compared with 56.00 for LINKX (Sun et al., 2024). It also reports higher Dirichlet energy across steps than static baselines and improved performance on TreesMatch and Peptides-struct, supporting the claim that dynamic pseudo-node connections alleviate over-squashing and over-smoothing (Sun et al., 2024).

Here reactivity means that connectivity is a function of evolving internal state. Unlike schedule-free factor-graph inference, the graph-learning use of the term is architectural and representational: message routes are not fixed by the input topology but emerge from recurrent interaction between node and pseudo-node states.

5. Persistent threads, direct communication, and LLM reasoning

A recent strand extends reactive message passing to inference-time organization of LLMs. Message Passing LLMs (MPLMs) replace a single autoregressive stream or fork-join tree with multiple persistent LLM threads that communicate directly through special directives interpreted by a controller atop a batched inference engine such as vLLM or SGLang (Liu et al., 1 Jul 2026). Threads have distinct prompts and persistent contexts, are decoded concurrently, and emit explicit control substrings:

  • <spawn[id1, id2, ..., idN]> prompt </spawn>
  • <send[id1, id2, ..., idN]> message </send>
  • <recv[id1, id2, ..., idN]>
  • <stop> (Liu et al., 1 Jul 2026)

The controller maintains Running, Runnable, per-thread inboxes, and waiting sets; it blocks threads on receive, delivers (sender_id, msg) pairs to inboxes, and resumes threads when receive conditions are met (Liu et al., 1 Jul 2026). Two receive semantics are defined: asynchronous wait-for-all and asynchronous wait-for-any (Liu et al., 1 Jul 2026). Threads are persistent rather than transient, so follow-up interaction does not require reconstruction of full context.

The two stated efficiency mechanisms are reduced communication costs and preemption (Liu et al., 1 Jul 2026). A general asymptotic comparison is given under the assumptions of CS×SC \subseteq S \times S3 iterations, CS×SC \subseteq S \times S4 workers, at most CS×SC \subseteq S \times S5 incoming dependencies per worker per iteration, message length at most CS×SC \subseteq S \times S6, and bounded local processing CS×SC \subseteq S \times S7: CS×SC \subseteq S \times S8 For Sudoku on an CS×SC \subseteq S \times S9 grid, the fork-join parent has context (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.0, whereas MPLM has (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.1; the same asymptotic improvement appears in sequential token counts (Liu et al., 1 Jul 2026). Empirically, the paper reports power-law exponents of approximately (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.2 for serial and fork-join sequential tokens and max context, compared with approximately (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.3 and (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.4 for MPLM (Liu et al., 1 Jul 2026).

Task protocols instantiate reactivity differently. In Sudoku, there is one worker per cell, neighbors correspond to row, column, and subgrid, and a worker with a single remaining candidate sends its value to the master and all neighbors before stopping (Liu et al., 1 Jul 2026). In 3-SAT, MPLM implements a distributed DPLL procedure, where parents can terminate search as soon as a child reports SAT, and the controller cancels irrelevant descendant subtrees (Liu et al., 1 Jul 2026). The paper reports that MPLMs are consistently faster than fork-join and serial baselines, with up to about (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.5 speedups on hard 3-SAT instances with highly unbalanced search trees (Liu et al., 1 Jul 2026). In long-context question answering, a parent spawns workers over context chunks, receives summaries, and then iteratively queries only relevant workers. On LongBench-v2 with Qwen3-30B-A3B, the paper reports 37.8% accuracy and 61.3 s latency for MPLM, compared with 29.7% and 105.7 s for RLM; with Qwen3.6-35B-A3B, it reports 46.5% and 102.2 s for MPLM versus 46.7% and 223.5 s for RLM (Liu et al., 1 Jul 2026).

This strand makes reactivity explicit at the protocol level: partial information from one thread changes the future execution of others through direct messages, blocked receives, and controller-mediated subtree cancellation. It is therefore the most literal realization of reactive message passing as runtime behavior among autonomous communicating agents.

6. Protocols, algebraic generality, and recurrent limitations

Reactive message passing also has a component-theoretic and algebraic foundation. In the Governed Components model, systems are assembled from base components and composite components constrained by a global protocol (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.6 (Savanović et al., 2020). Base components are defined by input ports, output ports, and local binders (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.7 with FIFO queues of partial stores; they are always receptive on inputs, and outputs become available once complete tuples of required values exist (Savanović et al., 2020). Composite components combine subcomponents with role assignments, distribution binders, and interface forwarders, while operational rules such as OutChor and InpChor ensure that internal sends and receives occur only when the protocol currently allows the corresponding labeled interaction (Savanović et al., 2020). This yields a notion of flexible local reactivity disciplined by external choreography.

At a broader level, the algebraic perspective on message passing treats graphical models as factor graphs over semirings (s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.8, with joint expansion

(s1,s2)C    (s2,s1)C.(s_1,s_2)\in C \implies (s_2,s_1)\in C.9

and inference defined by marginalization with (S,C)(S,C)0 (Ravanbakhsh, 2015). Belief Propagation on a general semiring has the generic updates

(S,C)(S,C)1

(S,C)(S,C)2

which specialize to sum-product, min-sum, max-product, min-max, and Boolean CSP settings (Ravanbakhsh, 2015). The thesis emphasizes that local factors specify global behavior implicitly and that local changes can be absorbed by local message recomputation, a pattern closely aligned with reactive execution. It further develops loop corrections, Survey Propagation, and hybrid methods interpolating between deterministic message passing and MCMC, and applies them to satisfiability, coloring, packing, clustering, assignment, graph morphisms, symmetries, and traveling salesman formulations (Ravanbakhsh, 2015).

Across these strands, several limitations recur. In loopy factor graphs, RMP does not guarantee global convergence, and message updates may oscillate; Bethe free energy monitoring and stopping criteria are therefore exposed explicitly (Bagaev et al., 2021). In dynamic GNNs, shared recurrent dynamics may saturate when the number of recursive steps becomes large, and the current model embeds only a subset of “neurons” in the common state space (Sun et al., 2024). In MPLMs, effective performance depends on the ability of workers to determine whom to communicate with and when, and failure modes such as deadlock or infinite looping are implied by the protocol design problem even though they are not formally developed (Liu et al., 1 Jul 2026). In the component model, the present treatment is limited to a choice-free protocol fragment with static roles and basic-value communication (Savanović et al., 2020). In the atemporal semantics, the equivalence between message protocols and constraint systems is existential and does not assert efficiency (Borrill, 2 Mar 2026).

Taken together, these works show that reactive message passing is not reducible to one ontology, one semantics, or one implementation style. It can denote schedule-free inference over factor graphs, state-dependent routing in graph learning, thread-level point-to-point reasoning in LLM systems, protocol-filtered component interaction, or an atemporal constraint reinterpretation of distributed execution. The unifying feature is that global behavior is induced by local reactions to changing dependencies rather than by a fixed global schedule or a single centralized computational trace (Borrill, 2 Mar 2026).

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 Reactive Message Passing.