MEKAWIRE
ExpertarXiv

REINS: A Self-Evolving Agent Harness for Real-Time Trajectory Planning

Zhihong Cui, Hengyu Liu, Haoran Tang, Shijun Liu, Amir Taherkordi, Tor Skeie
From the abstract

Agent harnesses -- runtime scaffolds that wrap an LLM's reasoning loop with tool dispatch, verification, and persistent memory -- have become the standard substrate for deploying LLMs as autonomous agents, as demonstrated by Claude Code and Codex in software engineering. In trajectory planning, however, this paradigm has not taken hold: existing LLM-based trajectory planning methods either keep the LLM in the decision loop, exceeding the millisecond-level control budget, or offload it to offline rules or training-time supervision -- leaving the runtime planner non-evolving.

From the abstract. Our summary is in progress.

Full paper

REINS: A Self-Evolving Agent Harness for Real-Time Trajectory Planning

Zhihong Cui, Hengyu Liu, Haoran Tang, Shijun Liu, Amir Taherkordi, Tor Skeie

Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.10748 (PDF).

Abstract

Agent harnesses—runtime scaffolds that wrap an LLM’s reasoning loop with tool dispatch, verification, and persistent memory—have become the standard substrate for deploying LLMs as autonomous agents, as demonstrated by Claude Code and Codex in software engineering. In trajectory planning, however, this paradigm has not taken hold: existing LLM-based trajectory planning methods either keep the LLM in the decision loop, exceeding the millisecond-level control budget, or offload it to offline rules or training-time supervision—leaving the runtime planner non-evolving. Intermediate hybrids still lack the verification-and-consolidation loop that makes harnesses reliable. We ask: what runtime harness would let an LLM planner meet real-time constraints while self-evolving into a deployable one? We propose REINS, a harness built on three LLM–planner couplings: LLM outputs are (i) grounded to a learned variable-level dynamics model, (ii) verified via calibrated predicates and forward rollout, and (iii) consolidated into an indexed rule memory that serves future scenes in \mathcal{O}(\log n) without re-invoking the LLM. The harness closes a self-evolution loop: familiar scenes resolve by memory lookup; novel scenes invoke the LLM, whose verified outputs enrich the memory. Without modifying LLM weights, REINS attains 98%+ compliance, nearly 50% collision reduction, and 1.9–4.6 ms latency on simulated and real-world benchmarks at the tactical decision layer, with LLM invocation rate monotonically declining as memory matures. Code: https://github.com/ZhihongCui/REINS.

†

1 Introduction

Figure 1: Three couplings an agent harness must enforce on the LLM planner, illustrated on a car-following scene with a 25-m gap. The LLM utterance “keep a safe distance” is (1) grounded to physical state variables (TTC, THW, DHW), (2) verified by forward rollout over a multi-step horizon, and (3) consolidated as an indexed rule keyed by these variables for instant reuse.

Trajectory planning is the safety-critical core of autonomous driving: each decision must respect traffic rules, anticipate other agents, and complete within a millisecond-level control budget (e.g., 50 ms at 20 Hz) (Zhang et al., 2021a; Falcone et al., 2007; Lenz et al., 2016; Li et al., 2024b; Montgomery, 1983). Recent work shows that large language models (LLMs) bring rich semantic priors over traffic norms, agent intent, and safety reasoning that classical planners lack (Manas et al., 2025; Fu et al., 2024; Mao et al., 2024; Sha et al., 2023; Cai et al., 2024; Li et al., 2024a), yet integrating their reasoning into the runtime loop is bottlenecked: each LLM query takes seconds—orders of magnitude over the control budget—and naive integration leaves the planner either too slow to act or unable to adapt as deployment proceeds.

This is precisely the kind of deployment problem—running a stochastic LLM inside a low-latency, safety-sensitive loop—that the agent harness paradigm has recently addressed in software engineering. An agent harness wraps the LLM with a thin runtime layer of tool dispatch, intermediate-result verification, persistent memory, and safety enforcement—as exemplified by systems like Claude Code, Codex, and Cursor-Agent. On Terminal-Bench (Merrill et al., 2026), harness design has emerged as a primary driver of ranking, with automatic harness optimization surpassing hand-engineered baselines (Lee et al., 2026). Trajectory planning, however, is a sharp test of the paradigm: its millisecond-level control budget is much tighter than the seconds-to-minutes scale at which coding harnesses operate, and the safety stakes are higher. In this regime, the harness’s generic functions specialize into three couplings between LLM and planner, illustrated in Figure 1: when an LLM suggests “keep a safe distance” in a car-following scene, the runtime must (i) ground the suggestion to physical state variables (TTC, THW, DHW), (ii) verify the resulting maneuver via forward rollout over a multi-step horizon, and (iii) consolidate the verified maneuver into an indexed rule memory.

Existing LLM-based trajectory planning methods span two extremes plus intermediate hybrids, none of which constitutes a harness in the above sense: runtime invocation methods keep the LLM in the decision loop but exceed the millisecond-level budget by orders of magnitude (Fu et al., 2024; Mao et al., 2024; Sha et al., 2023); offline extraction methods discard the LLM at runtime and freeze the planner against scenarios the offline corpus did not anticipate (Li et al., 2024a; Tang et al., 2025); and hybrid designs partially orchestrate the LLM at runtime but stop short of a full harness, lacking explicit verification of LLM commitments and consolidation of verified ones into reusable structure (Cui et al., 2026; Zhang et al., 2025). Across all three, the LLM’s reasoning is either too slow to act on or too detached from the loop to evolve with deployment.

This raises our central question: what runtime harness would let an LLM planner satisfy real-time constraints while self-evolving into a deployable one? Each of the three couplings is non-trivial under real-time control: grounding requires bridging natural-language commitments to the planner’s threshold semantics (Wang et al., 2025; Zhai et al., 2025); verification must catch stochastic, occasionally unsafe LLM outputs before they reach control (Manas et al., 2025; Zeng et al., 2025); and consolidation must escape per-call LLM latency (Fu et al., 2024; Mao et al., 2024) via a memory pattern emerging in agentic AI (Wang et al., 2023; Zhao et al., 2024; Ma et al., 2024) but not yet transferred to real-time planning. The three are also jointly necessary: without grounding, verification has nothing to check; without verification, consolidation stores unverified content; without consolidation, every scene re-pays the LLM latency cost. When all three are addressed, a self-evolution loop emerges: familiar scenes resolve from the consolidated memory in \mathcal{O}(\log n) time, novel scenes invoke the LLM, whose verified outputs enrich the memory, and reliance on the LLM decreases monotonically as memory matures, with no LLM weight update.

We propose REINS, a concrete realization of this harness pattern, instantiated for trajectory planning in driving, that addresses each coupling as follows. Grounding. We learn a world dynamics model over a factored variable space, fusing LLM-derived semantic priors with data-driven dependency discovery. Group-weighted ridge regression selects each variable’s parents, and a per-variable Transformer predicts its evolution under the discovered graph. Every LLM output can then be projected onto this variable space and rolled out under the learned dynamics. Verification. We compile each LLM-proposed maneuver into calibrated predicates with thresholds derived from data (z-score, quantile, or absolute). Predicates are evaluated against the rollout produced by the dynamics model, and only commitments whose predicted trajectory satisfies all guards are released to control. Hallucinated or unsafe commitments are filtered before any maneuver is issued. Consolidation. We persist verified commitments in an indexed rule memory backed by a graph database, keyed by the grounding variables that triggered them. At runtime, parameterized graph queries retrieve scene-relevant rules in \mathcal{O}(\log n) time without any LLM call. Recurring scenes are thus served by memory lookup, and the LLM is invoked only on a miss. Together, the three close the self-evolution loop: at each scene the planner first consults the memory; on a miss the LLM is invoked, its output grounded against the dynamics model, verified by rollout, and—if it passes—committed to memory for the next encounter. We provide an empirical demonstration that, under such a harness, an LLM planner monotonically reduces its own LLM-call rate while preserving safety and compliance. Our contributions can be summarized as:

  • We extend the agent-harness paradigm to real-time trajectory planning, identifying three couplings—grounding, verification, consolidation—any such harness must enforce, and instantiate it for driving; only the variable schema and the action space are domain-specific (Appendix D.1).
  • We design REINS, a harness that instantiates the three couplings via a learned world dynamics model, calibrated predicates with rollout verification, and an indexed rule memory.
  • We provide the first empirical evidence of self-evolution in real-time LLM trajectory planning: LLM invocation rate decreases monotonically over deployment with no LLM weight update.
  • We evaluate REINS on simulated and real-world driving benchmarks at the tactical decision layer, achieving 98%+ compliance, nearly 50% collision reduction, and 1.9–4.6 ms planning latency—well within the real-time control budget.

2 Related Work

LLM-Based Trajectory Planning. Recent LLM-based trajectory planners fall along three lines, each realizing some couplings while leaving others open. Runtime invocation methods keep the LLM in the decision loop. DiLu (Fu et al., 2024) pairs LLM reasoning with an experience-replay memory; Agent-Driver (Mao et al., 2024) treats the LLM as an orchestrator over perception and planning tools; LanguageMPC (Sha et al., 2023) feeds chain-of-thought outputs into MPC. These systems gain semantic flexibility, but each LLM query takes seconds, and any output that reaches the planner is implicitly trusted, lacking the calibrated checks proposed for stochastic LLM outputs in safety-critical settings (Manas et al., 2025; Zeng et al., 2025).

Offline extraction methods sit at the opposite end. LLaDA (Li et al., 2024a) extracts location-specific rules from driver handbooks, DriReg (Cai et al., 2024) retrieves regulatory text via RAG, and Plan-R1 (Tang et al., 2025) distills LLM-shaped rewards into a reinforcement-learning policy. Removing the LLM at runtime buys real-time inference, but the planner becomes static, unable to consolidate new commitments against learned driving dynamics (Wang et al., 2025; Zhai et al., 2025) or to adapt to scenarios the offline corpus did not anticipate.

Hybrid designs partially orchestrate the LLM at runtime. C-TRAIL (Cui et al., 2026) runs a closed-loop Recall–Plan–Update cycle with trust-weighted MCTS injection; LeAD (Zhang et al., 2025) pairs an end-to-end planner with a redundant LLM reasoning track. These improve over either extreme but lack explicit verification of LLM commitments and consolidation of verified ones into reusable structure; none grounds, verifies, and consolidates LLM outputs jointly under a real-time harness.

Agent Harnesses for LLM Deployment. Outside trajectory planning, the deployment of LLMs into real-world tasks has converged on the agent harness pattern: a thin runtime layer that wraps the LLM with tool dispatch, intermediate-result verification, persistent memory, and safety enforcement. In autonomous coding, systems such as Claude Code and Codex turn general-purpose LLMs into reliable software engineers, and harness design has become a primary driver of ranking on Terminal-Bench (Merrill et al., 2026; Lee et al., 2026). In open-ended decision-making, Voyager (Wang et al., 2023) accumulates a skill library of executable code through curiosity-driven exploration; Eureka (Ma et al., 2024) iteratively refines reward functions by evolutionary search over LLM proposals; ExpeL (Zhao et al., 2024) distills task-specific experience into a retrievable knowledge base. These harnesses share three structural elements with REINS—grounding into a domain primitive space, verification of LLM outputs, and persistent reuse of verified ones—but none operate under millisecond real-time budgets nor expose their LLMs to the safety-critical constraints.

3 Preliminaries

We formalize the harness’s primitives: a factored variable space (Section 3.1); a world dynamics model for grounding (Section 3.2); an executable rule representation for verification and consolidation (Section 3.3); and the problem definition (Section 3.4). Full variable lists, template specifications, and the macro-group dependency enumeration appear in Appendix A.

3.1 Driving Environment

Definition 3.1 (Factored Variable Structure).

A factored variable structure is (\mathcal{X},\mathcal{H},\mathcal{E}_{\mathcal{G}},\mathcal{E}_{\mathcal{H}}): \mathcal{X}=\{X_{1},\ldots,X_{d}\} are observable variables (e.g., TTC, THW, DHW, ego_speed, lead_speed, road_friction); \mathcal{H}=\{\textsc{Env},\textsc{Traffic},\textsc{Ego},\textsc{Action},\textsc{Outcome}\} groups them by semantic role (Chen et al., 2025); \mathcal{E}_{\mathcal{G}}\subseteq\mathcal{X}\times\mathcal{H} assigns each variable to a group; and \mathcal{E}_{\mathcal{H}}\subseteq\mathcal{H}\times\mathcal{H} specifies permissible group-level dependencies (Eq. 10 in Appendix A.1).

Definition 3.2 (State and Action Spaces).

The state s_{t}\in\mathcal{S}=\prod_{i}\mathrm{dom}(X_{i}) is a complete variable assignment. The action space \mathcal{A}=\{\texttt{LANE\_LEFT},\texttt{LANE\_RIGHT},\texttt{FASTER},\texttt{SLOWER},\texttt{IDLE}\} is a finite set of discrete meta-actions for the ego vehicle.

The meta-actions are the interface of the tactical (behavior-planning) layer in the standard stack decomposition (Paden et al., 2016); continuous low-level controllers execute them, and all safety reasoning below (TTC, headway, accelerations) remains continuous.

3.2 World Dynamics Model

Definition 3.3 (Dependency Graph and Dynamics).

A dependency graph is a weighted DAG \mathcal{G}=(\mathcal{X},\mathcal{E},w) with w:\mathcal{E}\to\mathbb{R}, where edges (X_{i},X_{j})\in\mathcal{E} are admissible only if (h(X_{i}),h(X_{j}))\in\mathcal{E}_{\mathcal{H}} (Giamattei et al., 2024). A dynamics function set \mathcal{F}=\{f_{i}\}_{i=1}^{d} predicts each variable from its parents over a temporal lag L (Peters et al., 2017):

\hat{X}_{i}^{t+1}=f_{i}\big(\mathrm{Pa}(X_{i})^{t-L+1:t}\big),\quad\mathrm{Pa}(X_{i})=\{X_{j}\mid(X_{j},X_{i})\in\mathcal{E}\}.
(1)

An H-step rollout from s_{t} under (a_{t},\ldots,a_{t+H-1}) yields \hat{\xi}=(\hat{s}_{t+1},\ldots,\hat{s}_{t+H}).

3.3 Rule Representation

Definition 3.4 (Predicate).

A predicate is a Boolean function p(s)=\mathbb{I}[s[X_{i}]\prec\tau] with comparison operator \prec\in\{<,>,\leq,\geq\} and threshold \tau\in\mathbb{R}.

TTC and THW guards are the surrogate safety measures of traffic engineering (Gettman and Head, 2003); their calibrated thresholds act as RSS-style safe-distance bounds (Shalev-Shwartz et al., 2017).

Definition 3.5 (Rule Template).

A rule template T specifies how predicates compose (Manas et al., 2024). We use seven templates: IF-THEN, AND-THEN, THRESHOLD, PRIORITY, MULTI-ACTION, WEIGHTED-ACTION, and TEMPORAL-CHAIN (specifications and examples in Appendix A.2).

Definition 3.6 (Executable Rule).

An executable rule is a tuple r=(T,\mathcal{P}_{r},a_{r},c_{r}) with template T, guard predicates \mathcal{P}_{r}, recommended action a_{r}\in\mathcal{A}, and confidence c_{r}\in[0,1]. Activation requires all guards to hold:

\mathrm{Exec}(r,s_{t})=\bigwedge_{p\in\mathcal{P}_{r}}p(s_{t}).
(2)

3.4 Problem Definition

Definition 3.7 (Self-Evolving Agent Harness for Trajectory Planning).

Let \mathcal{D}=\{(s_{t},a_{t},s_{t+1})\} be a driving dataset and \mathcal{M} a pre-trained LLM. The harness problem is to construct \langle\hat{\mathcal{G}},\hat{\mathcal{F}},\mathcal{R},\pi\rangle where \hat{\mathcal{G}},\hat{\mathcal{F}} are learned from \mathcal{D} with priors from \mathcal{M} (Def. 3.3), \mathcal{R} is an indexed rule memory compiled offline from \mathcal{M} (Def. 3.6), and \pi:\mathcal{S}\to\mathcal{A} is a policy that, at each s_{t}, retrieves \mathcal{R}_{t}=\mathrm{Retrieve}(s_{t},\mathcal{R})\subseteq\mathcal{R} and proceeds as follows:

  • (hit) if \mathcal{R}_{t}\neq\emptyset, \pi scores actions over \mathcal{R}_{t} and verifies them by rollout under \hat{\mathcal{F}} within a real-time budget;
  • (miss) otherwise, \mathcal{M} proposes a candidate commitment, which is grounded via (\hat{\mathcal{G}},\hat{\mathcal{F}}) and verified by rollout; if all predicates pass, the commitment is compiled into a rule r and \mathcal{R}\leftarrow\mathcal{R}\cup\{r\}.

The parameters of \mathcal{M} remain unchanged, and \mathcal{R} is monotone non-decreasing; under stationarity of the scene distribution, the per-scene LLM invocation rate \Pr[\mathcal{R}_{t}=\emptyset] is non-increasing.

4 Methodology

Figure 2: The REINS framework. Phase 1 (offline): learn dynamics \hat{\mathcal{G}},\hat{\mathcal{F}} and compile rules into initial memory \mathcal{R}_{0}. Phase 2 (online): per-scene retrieval and rollout-based verification produce control; on a miss, the LLM proposes a rule that is grounded, verified, and written back to \mathcal{R}, closing the self-evolution loop without any LLM weight update.

REINS realizes the harness as a two-phase system (Figure 2). Offline Preparation (Section 4.1) prepares the world dynamics \hat{\mathcal{G}},\hat{\mathcal{F}} for grounding and an initial rule memory \mathcal{R}_{0} for offline consolidation. Online Runtime (Section 4.2) executes a per-scene loop: rule-guided planning performs retrieval, scoring, and verification over \mathcal{R}, and online rule acquisition handles memory misses by querying \mathcal{M} and writing verified rules back to \mathcal{R}, closing the self-evolution loop.

4.1 Offline Preparation

4.1.1 World Dynamics Learning

This module realizes grounding: we jointly learn dependency graph \hat{\mathcal{G}} and dynamics functions \hat{\mathcal{F}} by combining LLM semantic priors with data-driven structure discovery. The full derivation and the dynamics loss are in Appendix A.4.1.

Dependency Graph. The LLM provides edge confidence \pi_{ij}\in[0,1] for each candidate edge X_{j}\to X_{i} (Appendix A.5); combined with macro-group constraints (Eq. 10), the unified prior is \tilde{\pi}_{ij}=\alpha\,\pi_{ij}+(1-\alpha)\,\mathbb{I}\{(h(X_{j}),h(X_{i}))\in\mathcal{E}_{\mathcal{H}}\}. For each X_{i}, prior-guided ridge regression (Hoerl and Kennard, 1970) predicts its value from lagged neighbors with adaptive penalty \lambda_{ij}=\lambda_{0}(1-\tilde{\pi}_{ij})^{\rho}, so high-prior edges are weakly regularized:

\hat{\mathbf{w}}_{i}=\arg\min_{\mathbf{w}}\sum_{t=L}^{N}\Big(X_{i}^{t}-\textstyle\sum_{j\neq i,\ell}w_{j\ell}X_{j}^{t-\ell}\Big)^{2}+\sum_{j\neq i}\lambda_{ij}\|\mathbf{w}_{j}\|_{2}^{2}.
(3)

\mathrm{Pa}(X_{i}) retains the top-K variables by \sum_{\ell}|\hat{w}_{j\ell}|, yielding \hat{\mathcal{E}} and weights \hat{w}(X_{j},X_{i})=\sum_{\ell}|\hat{w}_{j\ell}|.

Dynamics Functions. Given \hat{\mathcal{G}}, each f_{i} is a multi-head Transformer (Vaswani et al., 2017) trained to predict X_{i}^{t+1} from \mathrm{Pa}(X_{i})^{t-L+1:t} via mean squared error (loss form in Eq. 14). Training curves and hyperparameters are in Appendix C.1.

4.1.2 Rule Compilation

This module realizes offline consolidation: compiling LLM knowledge into executable rules. Full equations and per-step prose are in Appendix A.4.2.

Rule Structure Generation. For each edge (X_{j},X_{i})\in\hat{\mathcal{E}}, the LLM generates a rule r=(T,\mathcal{P}_{r},a_{r},c_{r}) (Eq. 15) with template T (Def. 3.5), guard predicates \mathcal{P}_{r} with symbolic thresholds, recommended action a_{r}\in\mathcal{A}, and confidence c_{r} derived from edge weight \hat{w}(X_{j},X_{i}) (prompts in Appendix A.5).

Threshold Calibration. Each predicate’s threshold \tau_{i} is calibrated from \mathcal{D} in three forms (Luo et al., 2024)—z-score \mu_{i}+\zeta\sigma_{i}, quantile Q_{i}(\zeta), or absolute constant \tau_{0}—and the comparison operator \prec is selected to maximize separability of safety outcome y\in\{0,1\}:

\prec^{*}=\arg\max_{\prec\in\{<,>\}}\big|\mathbb{E}[y\mid X_{i}\prec\tau_{i}]-\mathbb{E}[y\mid X_{i}\not\prec\tau_{i}]\big|.
(4)

Rule activation then follows Eq. 2.

Graph Database Storage. Compiled rules are stored in a Neo4j graph database (Webber, 2012) with rule nodes connected to variable nodes via TRIGGERS (input) and AFFECTS (output) edges, enabling O(\log|\mathcal{R}|) retrieval. The full schema (Figure 3) is in Appendix A.4.2; database statistics are in Appendix C.7.1.

4.2 Online Runtime

4.2.1 Rule-Guided Planning

This module realizes the runtime planning loop of Def. 3.7—retrieval, scoring, and verification (details in Appendix A.4.3).

Scene-Aware Retrieval. Given s_{t}, active variables \{X_{i}\} trigger parameterized Cypher queries (Francis et al., 2018) generated by the LLM (read-only, schema-constrained; Appendix A.5). The retrieval map G:(\{X_{i}\},K)\mapsto\mathcal{R}_{t}\subseteq\mathcal{R} (Eq. 17) returns up to K rules ranked by confidence, restricted to triggers whose dependency direction respects the macro-group constraints.

Action Scoring. For each r\in\mathcal{R}_{t} activated via Eq. 2, a Transformer-based scorer (Liang et al., 2022) produces relevance S_{\text{rel}}(r,s_{t})\in[0,1] and action preference S_{\text{act}}(r,s_{t},a), yielding combined score f(r,a\mid s_{t})=S_{\text{rel}}\cdot S_{\text{act}}\cdot c_{r} (Eqs. 18–19; training loss in Eq. 20). Multiple rules recommending action a, denoted \mathcal{R}_{t}(a)=\{r\in\mathcal{R}_{t}\mid a_{r}=a\}, are aggregated by noisy-OR:

P(a\mid s_{t})\;\propto\;1-\prod_{r\in\mathcal{R}_{t}(a)}\big(1-f(r,a\mid s_{t})\big).
(5)

The full normalized form and argmax decoder are in Appendix A.4.3.

Trajectory Verification. The learned dynamics \hat{\mathcal{F}} verifies safety via forward rollout. For the top-M actions ranked by P(a\mid s_{t}), we predict H-step trajectories \hat{\xi}(a)=(\hat{s}_{t+1},\ldots,\hat{s}_{t+H}) via \hat{s}_{t+h+1}=\Phi(\hat{s}_{t+h},a;\hat{\mathcal{G}},\hat{\mathcal{F}}) (Eq. 22), and select a^{\star}_{t}=\arg\max_{a\in\mathcal{A}_{M}}J(\hat{\xi}(a)), where J penalizes collisions, rule violations, and control effort (Appendix B.2); the first control is executed in receding-horizon (Zhang et al., 2021b).

4.2.2 Online Rule Acquisition

This module realizes Def. 3.7’s miss-handling path through four steps (full equations and the monotonicity argument in Appendix A.4.4).

Miss Detection. We operationalize the miss criterion (\mathcal{R}_{t}=\emptyset) with an additional confidence guard against weakly supported matches:

\mathrm{Miss}(s_{t})\;=\;\mathbb{I}\!\left[\mathcal{R}_{t}=\emptyset\right]\;\vee\;\mathbb{I}\!\left[\max_{r\in\mathcal{R}_{t},\,a\in\mathcal{A}}f(r,a\mid s_{t})<\eta\right],
(6)

with tuned threshold \eta\in(0,1).

Rule Proposal and Online Verification. On a miss, \mathcal{M} proposes \tilde{r}=(\tilde{T},\tilde{\mathcal{P}},\tilde{a},\tilde{c}) (Eq. 23) conforming to Defs. 3.4–3.5 (Appendix A.5). Symbolic thresholds in \tilde{\mathcal{P}} are calibrated on a sliding window \mathcal{D}_{t}^{W}=\{s_{t-W+1},\ldots,s_{t}\} so they track the current distribution. The harness then rolls out \tilde{a} from s_{t} under \hat{\mathcal{F}} and accepts \tilde{r} iff every predicate holds along the rollout:

\mathrm{Accept}(\tilde{r},s_{t})\;=\;\bigwedge_{p\in\tilde{\mathcal{P}}}\bigwedge_{h=1}^{H}p(\hat{s}_{t+h}).
(7)

On rejection the planner falls back to \arg\max_{a}P(a\mid s_{t}) over \mathcal{R}_{t} if \mathcal{R}_{t}\neq\emptyset; otherwise the harness raises a human-takeover alert and executes the safest action under \hat{\mathcal{F}} by maximizing minimum lookahead TTC (Eq. 24 in Appendix A.4.4).

Memory Update. Accepted \tilde{r} is keyed by content hash \kappa(\tilde{r}):=\kappa(\tilde{T},\tilde{\mathcal{P}},\tilde{a}) and inserted into Neo4j; on collision, confidences are averaged instead of duplicating the node:

\mathcal{R}\;\longleftarrow\;\begin{cases}\mathcal{R}\cup\{\tilde{r}\}&\kappa(\tilde{r})\notin\mathrm{Keys}(\mathcal{R}),\\[2.0pt]
\mathcal{R}\text{ with }c_{r^{\prime}}\leftarrow\tfrac{1}{2}(c_{r^{\prime}}+\tilde{c})&\exists\,r^{\prime}\in\mathcal{R}:\kappa(r^{\prime})=\kappa(\tilde{r}).\end{cases}
(8)

The collision-branch rationale (averaging vs. duplication, exclusion of \tilde{c} from \kappa) is in Appendix A.4.4.

Self-Evolution Properties. Eq. 8 structurally enforces |\mathcal{R}_{t+1}|\geq|\mathcal{R}_{t}| (memory monotonicity) and \theta_{\mathcal{M}}\equiv\theta_{\mathcal{M}}^{(0)} (no LLM update). Under stationarity of the scene distribution, the per-state miss rate is non-increasing as \mathcal{R} accumulates coverage:

|\mathcal{R}_{t+1}|\geq|\mathcal{R}_{t}|,\quad\Pr[\mathrm{Miss}(s_{t+1})]\leq\Pr[\mathrm{Miss}(s_{t})],\quad\theta_{\mathcal{M}}\equiv\theta_{\mathcal{M}}^{(0)},
(9)

so the per-scene LLM invocation rate decays monotonically with \Pr[\mathrm{Miss}] (full argument in Appendix A.4.4; validated in Section 5.4).

5 Experiment

The main body reports overall comparison (Section 5.2), ablation (Section 5.3), self-evolution dynamics on Highway (Section 5.4), and a summary of the robustness, transfer, and scalability results. Appendices C and D report trajectory accuracy, sensitivity, extended self-evolution traces, a case study, the rule database, and the fairness and robustness studies.

5.1 Experiment Setting

Datasets and Protocols. We evaluate REINS on four highway-env (Leurent, 2018) scenarios—Highway, Merge, Roundabout, Intersection (100 steps at 5 Hz, 15 observable vehicles per episode)—and two drone-captured real-world datasets (Krajewski et al., 2018; Krajewski et al., 2020): highD (German highway, 4,237 vehicles, 578 lane changes) and rounD (German roundabouts, 2,156 vehicles, 423 yield/merge events). Surrounding vehicles in simulation are reactive (IDM car-following (Treiber et al., 2000) with MOBIL lane changes (Kesting et al., 2007)), so they brake, yield, and change lanes in response to the ego. The real-world datasets run in closed-loop replay: one recorded vehicle is controlled by the planner while the others follow their recorded trajectories, so these rows reflect human behavior rather than a simulator’s; a collision is registered when bounding boxes overlap or the ego leaves the drivable lane. A reactive-replay variant following the nuPlan protocol (Caesar et al., 2021) is in Appendix D.6. All methods observe clean factored variables; perception, tracking, and map errors lie outside the evaluated layer (Section 6).

Evaluation Metrics. Compl. (Rule Compliance) is the fraction of steps at which all active rules hold, measured for each method against its own executable rule set; an audit of all methods against REINS’s compiled set as a common reference leaves the ordering unchanged (Appendix D.2). RE (Risk-aware Efficiency) is task reward minus a TTC-based risk penalty. CR (Collision Rate) is the fraction of episodes with at least one contact among the 15 vehicles over 100 steps, an episode-level rate in deliberately stressed traffic. PE (Planning Efficiency) is the mean wall-clock ms of the synchronous action-selection computation per step for every method; for REINS it excludes the asynchronous rule-acquisition pipeline, profiled separately in Appendix D.8. TTC and THW, which underlie the guards and the RE penalty, are the surrogate safety measures of traffic engineering (Gettman and Head, 2003), and Compl. and CR echo the rule-conformance and collision outcomes reported in scenario-based safety assessment (Riedmaier et al., 2020). Results are averaged over five seeds; formal definitions in Appendix B.2.

Baselines. We compare with eight baselines covering the regimes from Section 2 plus classical anchors: (i) classical (MPC (Falcone et al., 2007), MCTS (Lenz et al., 2016)); (ii) runtime invocation (DriveSpeak (Cui et al., 2024)); (iii) offline extraction (LLaDA (Li et al., 2024a), DriReg (Cai et al., 2024), Plan-R1 (Tang et al., 2025)); (iv) symbolic/hybrid (PDDL (Guan et al., 2023; Liu et al., 2023), SymAgent (Liu et al., 2025)). All methods share the observation space, action space, episodes, and LLM backbone (GPT-4o, temperature 0); descriptions, the shared and unshared conditions, and a matched re-run of PDDL and DriReg over REINS’s vocabulary and calibration pipeline are in Appendices B.3 and D.2.

Table 1: Performance comparison across simulated scenarios and real-world datasets. Methods without explicit rule representations (MPC, MCTS, DriveSpeak, LLaDA) cannot report Compliance against their own rules as they lack executable rule constraints; their compliance against REINS’s compiled set as a common reference is given in Table 15.
  • Simulation
    Scenario
    Hig.
    Metric
    Compl. (\uparrow)
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    -
    PDDL
    0.9123
    DriReg
    0.9452
    SymAgent
    0.9561
    Plan-R1
    0.9717
    REINS
    0.9956
  • RE (\uparrow)
    Scenario
    -6.0360
    Metric
    -5.8537
    DriveSpeak
    -5.5613
    LLaDA
    -5.2311
    MPC
    -4.7868
    MCTS
    -4.1282
    PDDL
    -3.8662
    DriReg
    -3.5623
    SymAgent
    0.5228
  • CR (\downarrow,%)
    Scenario
    38.28
    Metric
    35.51
    DriveSpeak
    14.27
    LLaDA
    16.76
    MPC
    25.93
    MCTS
    21.76
    PDDL
    16.52
    DriReg
    12.83
    SymAgent
    5.67
  • PE (\downarrow, ms)
    Scenario
    5.8921
    Metric
    5.2995
    DriveSpeak
    2.4742
    LLaDA
    2.3591
    MPC
    4.9521
    MCTS
    4.3127
    PDDL
    3.9621
    DriReg
    3.7391
    SymAgent
    2.4998
  • Mer.
    Scenario
    Compl. (\uparrow)
    Metric
    -
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    0.9011
    PDDL
    0.9382
    DriReg
    0.9572
    SymAgent
    0.9641
    Plan-R1
    0.9924
  • RE (\uparrow)
    Scenario
    -5.5730
    Metric
    -5.2621
    DriveSpeak
    -5.3891
    LLaDA
    -5.1890
    MPC
    -4.7129
    MCTS
    -4.1067
    PDDL
    -3.5622
    DriReg
    -3.1023
    SymAgent
    -0.0400
  • CR (\downarrow,%)
    Scenario
    35.62
    Metric
    22.84
    DriveSpeak
    27.91
    LLaDA
    23.64
    MPC
    21.52
    MCTS
    20.56
    PDDL
    16.83
    DriReg
    14.78
    SymAgent
    6.86
  • PE (\downarrow, ms)
    Scenario
    5.2120
    Metric
    4.3615
    DriveSpeak
    1.7354
    LLaDA
    1.6526
    MPC
    3.8549
    MCTS
    2.8122
    PDDL
    2.5697
    DriReg
    2.2418
    SymAgent
    1.8928
  • Rou.
    Scenario
    Compl. (\uparrow)
    Metric
    -
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    0.8838
    PDDL
    0.9129
    DriReg
    0.9411
    SymAgent
    0.9568
    Plan-R1
    0.9925
  • RE (\uparrow)
    Scenario
    -7.6873
    Metric
    -7.1069
    DriveSpeak
    -6.7722
    LLaDA
    -6.5113
    MPC
    -6.4895
    MCTS
    -6.3457
    PDDL
    -6.2313
    DriReg
    -6.0256
    SymAgent
    -0.5444
  • CR (\downarrow,%)
    Scenario
    39.19
    Metric
    36.63
    DriveSpeak
    24.27
    LLaDA
    21.62
    MPC
    23.84
    MCTS
    25.13
    PDDL
    24.74
    DriReg
    18.57
    SymAgent
    9.01
  • PE (\downarrow, ms)
    Scenario
    8.2673
    Metric
    7.6541
    DriveSpeak
    4.2134
    LLaDA
    4.0267
    MPC
    5.3793
    MCTS
    5.1682
    PDDL
    5.0713
    DriReg
    4.8621
    SymAgent
    3.6243
  • Int.
    Scenario
    Compl. (\uparrow)
    Metric
    -
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    0.8789
    PDDL
    0.9153
    DriReg
    0.9274
    SymAgent
    0.9553
    Plan-R1
    0.9838
  • RE (\uparrow)
    Scenario
    -7.9740
    Metric
    -7.5800
    DriveSpeak
    -7.1345
    LLaDA
    -7.0273
    MPC
    -6.9792
    MCTS
    -6.7632
    PDDL
    -6.3314
    DriReg
    -6.0322
    SymAgent
    -0.5747
  • CR (\downarrow,%)
    Scenario
    44.27
    Metric
    42.22
    DriveSpeak
    25.38
    LLaDA
    23.78
    MPC
    32.12
    MCTS
    29.89
    PDDL
    25.34
    DriReg
    20.37
    SymAgent
    9.08
  • PE (\downarrow, ms)
    Scenario
    10.9324
    Metric
    9.3549
    DriveSpeak
    4.9653
    LLaDA
    4.7519
    MPC
    6.7682
    MCTS
    6.2793
    PDDL
    5.9932
    DriReg
    5.5733
    SymAgent
    4.5807
  • Real-world
    Scenario
    highD
    Metric
    Compl. (\uparrow)
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    -
    PDDL
    0.9078
    DriReg
    0.9289
    SymAgent
    0.9423
    Plan-R1
    0.9612
    REINS
    0.9867
  • RE (\uparrow)
    Scenario
    -5.8234
    Metric
    -5.5127
    DriveSpeak
    -5.2891
    LLaDA
    -5.0124
    MPC
    -4.6523
    MCTS
    -4.2178
    PDDL
    -3.7856
    DriReg
    -3.4521
    SymAgent
    0.3847
  • CR (\downarrow,%)
    Scenario
    35.21
    Metric
    32.87
    DriveSpeak
    18.34
    LLaDA
    19.56
    MPC
    23.12
    MCTS
    20.89
    PDDL
    17.23
    DriReg
    12.78
    SymAgent
    6.12
  • PE (\downarrow, ms)
    Scenario
    6.1234
    Metric
    5.5672
    DriveSpeak
    2.6123
    LLaDA
    2.4891
    MPC
    5.1234
    MCTS
    4.5623
    PDDL
    4.1234
    DriReg
    3.8912
    SymAgent
    2.6234
  • rounD
    Scenario
    Compl. (\uparrow)
    Metric
    -
    DriveSpeak
    -
    LLaDA
    -
    MPC
    -
    MCTS
    0.8956
    PDDL
    0.9187
    DriReg
    0.9378
    SymAgent
    0.9534
    Plan-R1
    0.9856
  • RE (\uparrow)
    Scenario
    -7.4521
    Metric
    -6.9834
    DriveSpeak
    -6.5123
    LLaDA
    -6.2478
    MPC
    -6.1234
    MCTS
    -5.8912
    PDDL
    -5.6234
    DriReg
    -5.3178
    SymAgent
    -0.4123
  • CR (\downarrow,%)
    Scenario
    41.23
    Metric
    38.56
    DriveSpeak
    25.34
    LLaDA
    23.12
    MPC
    26.78
    MCTS
    24.23
    PDDL
    20.89
    DriReg
    18.47
    SymAgent
    9.45
  • PE (\downarrow, ms)
    Scenario
    8.5621
    Metric
    7.8923
    DriveSpeak
    4.3521
    LLaDA
    4.1234
    MPC
    5.6234
    MCTS
    5.2178
    PDDL
    4.8912
    DriReg
    4.5623
    SymAgent
    3.8912

5.2 Performance Evaluation

Performance evaluation results are reported in Table 1, with trajectory accuracy analysis in Appendix C.2.

Effectiveness Analysis. (i) REINS beats all baselines, improving over Plan-R1 by 2.4%–3.6% Compl., 3.06–5.48 RE, and 49%–56% CR reduction—validating that grounding, verification, and consolidation act jointly. (ii) All methods incur higher CR on complex scenarios (Roundabout, Intersection) than structured ones (Highway, Merge); REINS degrades least, owing to context-aware retrieval. (iii) On highD and rounD, REINS maintains Compl. above 0.98 with 6.6–9.0-point CR reduction over Plan-R1, transferring to naturalistic driving without domain-specific tuning. (iv) Executable rule methods (PDDL, DriReg, SymAgent, Plan-R1) beat language-guided ones (DriveSpeak, LLaDA, with 22%–44% CR for ungrounded rules), yet their static thresholds and uniform activation still trail REINS’s data-driven calibration and variable-indexed retrieval; a matched re-run over REINS’s vocabulary and calibration narrows PDDL’s and DriReg’s CR by 3–5 points but leaves the gap intact (Appendix D.2). (v) Classical planners (MPC, MCTS) are fast but unsafe (CR 14%–28%); Plan-R1 is the best baseline but plateaus under uniform rule application.

Efficiency Analysis. REINS completes planning in 1.9–4.6 ms per step, up to 58% faster than runtime LLM baselines (DriveSpeak, LLaDA) and 15–33% faster than Plan-R1. Two factors contribute: (i) variable-indexed retrieval activates only 2–3 rules per step via O(\log|\mathcal{R}|) queries, and (ii) learned dynamics enable closed-form rollout without iterative LLM calls. PDDL makes no runtime LLM call either, yet re-grounds every precondition at each step (3.71 of its 4.95 ms on Highway; Appendix D.3), exactly the cost that indexed consolidation removes.

Table 2: Ablation study across four driving scenarios.
  • Hig.
    Metric World
    Compl. (\uparrow)
    w/o Prior
    0.9521
    w/o LLM Generation
    0.9628
    w/o Rule Retrieval
    0.9312
    w/o
    0.9845
    Full
    0.9956
  • RE (\uparrow)
    Metric World
    -1.9234
    w/o Prior
    -1.5390
    w/o LLM Generation
    -2.4156
    w/o Rule Retrieval
    -0.8921
    w/o
    0.5228
  • CR (\downarrow,%)
    Metric World
    8.47
    w/o Prior
    8.26
    w/o LLM Generation
    11.23
    w/o Rule Retrieval
    8.12
    w/o
    5.67
  • PE (\downarrow, ms)
    Metric World
    2.9532
    w/o Prior
    2.6831
    w/o LLM Generation
    2.5124
    w/o Rule Retrieval
    3.8921
    w/o
    2.4998
  • Mer.
    Metric World
    Compl. (\uparrow)
    w/o Prior
    0.9687
    w/o LLM Generation
    0.9738
    w/o Rule Retrieval
    0.9198
    w/o
    0.9812
    Full
    0.9924
  • RE (\uparrow)
    Metric World
    -1.5621
    w/o Prior
    -1.2619
    w/o LLM Generation
    -2.1893
    w/o Rule Retrieval
    -0.7234
    w/o
    -0.0400
  • CR (\downarrow,%)
    Metric World
    9.23
    w/o Prior
    9.08
    w/o LLM Generation
    12.87
    w/o Rule Retrieval
    8.89
    w/o
    6.86
  • PE (\downarrow, ms)
    Metric World
    2.6234
    w/o Prior
    2.1832
    w/o LLM Generation
    1.9021
    w/o Rule Retrieval
    2.9834
    w/o
    1.8928
  • Rou.
    Metric World
    Compl. (\uparrow)
    w/o Prior
    0.9534
    w/o LLM Generation
    0.9611
    w/o Rule Retrieval
    0.9087
    w/o
    0.9756
    Full
    0.9925
  • RE (\uparrow)
    Metric World
    -2.3456
    w/o Prior
    -1.1783
    w/o LLM Generation
    -3.1234
    w/o Rule Retrieval
    -1.2134
    w/o
    -0.5444
  • CR (\downarrow,%)
    Metric World
    12.34
    w/o Prior
    11.84
    w/o LLM Generation
    15.89
    w/o Rule Retrieval
    11.23
    w/o
    9.01
  • PE (\downarrow, ms)
    Metric World
    4.1245
    w/o Prior
    3.8011
    w/o LLM Generation
    3.6521
    w/o Rule Retrieval
    5.2134
    w/o
    3.6243
  • Int.
    Metric World
    Compl. (\uparrow)
    w/o Prior
    0.9456
    w/o LLM Generation
    0.9582
    w/o Rule Retrieval
    0.8923
    w/o
    0.9689
    Full
    0.9838
  • RE (\uparrow)
    Metric World
    -2.5678
    w/o Prior
    -1.9812
    w/o LLM Generation
    -3.4521
    w/o Rule Retrieval
    -1.3456
    w/o
    -0.5747
  • CR (\downarrow,%)
    Metric World
    13.45
    w/o Prior
    12.23
    w/o LLM Generation
    17.56
    w/o Rule Retrieval
    11.12
    w/o
    9.08
  • PE (\downarrow, ms)
    Metric World
    4.9521
    w/o Prior
    4.7214
    w/o LLM Generation
    4.6234
    w/o Rule Retrieval
    6.1234
    w/o
    4.5807

5.3 Ablation Study

We conduct ablation experiments on all four simulated scenarios to evaluate component contributions. Table 2 reports results for four variants: (i) w/o World Model: replacing learned dynamics with constant-velocity propagation; (ii) w/o LLM Prior: using purely data-driven structure learning without semantic guidance; (iii) w/o Rule Generation: substituting LLM-generated rules with hand-crafted ones; (iv) w/o Retrieval: applying all rules uniformly without context-aware selection.

Removing the world dynamics model causes the largest safety degradation (CR +49%/+48% on Highway/Intersection), confirming multi-step prediction is essential. Without LLM priors, CR rises 31–46%, showing that semantic guidance regularizes dependency discovery beyond purely data-driven methods. Hand-crafted rules yield the largest compliance drop (0.9956\to0.9312 on Highway) and nearly double CR, exposing the limited coverage of manual engineering; even so, they remain safer inside the harness than every matched no-harness baseline (Appendix D.2). Disabling context-aware retrieval raises both CR (22–43%) and PE (34–58%) via conflicting constraints. The four roles are complementary: dynamics enables predictive verification, LLM priors regularize structure, rule generation ensures coverage, and selective retrieval prevents conflicts.

5.4 Self-Evolution Analysis

Table 3: Self-evolution dynamics on Highway over 1000 episodes; LLM call rate is the miss rate (Eq. 6) in the 250-episode window ending at each checkpoint.
  • ep. 250
    |\mathcal{R}|
    113
    LLM Call Rate (%)
    70.0
    Compl. (\uparrow)
    0.9885
    CR (%) (\downarrow)
    7.05
  • ep. 500
    |\mathcal{R}|
    127
    LLM Call Rate (%)
    48.44
    Compl. (\uparrow)
    0.9920
    CR (%) (\downarrow)
    6.11
  • ep. 750
    |\mathcal{R}|
    138
    LLM Call Rate (%)
    25.0
    Compl. (\uparrow)
    0.9942
    CR (%) (\downarrow)
    5.83
  • ep. 1000 (final)
    |\mathcal{R}|
    145
    LLM Call Rate (%)
    12.81
    Compl. (\uparrow)
    0.9956
    CR (%) (\downarrow)
    5.67
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    |\mathcal{R}|
    88
    LLM Call Rate (%)
    —
    Compl. (\uparrow)
    0.9800
    CR (%) (\downarrow)
    9.63

We deploy REINS for 1000 episodes on Highway from the offline-compiled memory \mathcal{R}_{0} (|\mathcal{R}_{0}|{=}88), reporting four checkpoint snapshots alongside a Frozen \mathcal{R}_{0} control that runs the same window with acquisition disabled (Table 3; other scenarios in Appendix C.5). Across deployment, |\mathcal{R}| grows from 88 to 145 (saturating after ep. 500; Eq. 9), the LLM call rate decays from 70.0% to 12.81% (a 5.5\times reduction with no weight update), Compl. rises from 0.9885 to 0.9956, and CR drops from 7.05% to 5.67%. Against the Frozen \mathcal{R}_{0} control over the same horizon (0.9800 Compl., 9.63% CR), online acquisition adds +0.0156 Compl. and removes 3.96 CR points—the headline self-evolution gain. Mapped to the three couplings: monotone |\mathcal{R}| under \kappa-hash deduplication validates consolidation, the joint Compl. \uparrow/CR \downarrow trajectory validates rollout-based verification, and the 5.5\times call-rate drop validates the grounding–consolidation loop, as variable-keyed memory hits replace LLM calls on similar scenes.

Of the roughly 39,000 proposals implied by these call rates, 2.1% failed schema validation, 18.0% were rejected by rollout verification, and the accepted remainder deduplicated to 57 unique rules, 54 of which an audit judged consistent with domain guidelines (Appendix D.5).

Robustness, Transfer, and Scalability. Appendix D stresses these results. Rules regenerated with Claude Sonnet 4.5 or Qwen2.5-72B-Instruct keep Highway CR at 5.89% and 6.24% (vs. 5.67%), and prompt paraphrases span 5.58–5.91%. Under 2.5–10% observation noise and 5% frame drops, REINS CR rises to at most 8.14% while Plan-R1 rises to 19.87%. A memory compiled only from highD/rounD starts at an 86.2% call rate on highway-env and recovers to within 0.5–1.1 CR points of the native memory within 1000 episodes, whereas a frozen transferred memory does not. Inflating the memory to 100,000 rules keeps retrieval under 0.8 ms, and the 1.59 s miss cycle, dominated by the LLM call, runs off the control path behind a 2.6 ms verified fallback.

6 Limitations

Abstraction gap and action interface. The evaluation sits at the tactical decision layer: perception is assumed as clean factored variables, highD and rounD run in replay (reactive-replay variant in Appendix D.6), and occlusion, tracking, and map errors are absent; the five meta-actions are the standard interface of this layer and of all eight baselines, and continuous maneuvers would change only the scorer’s output head. The claims are harness results at this layer, not a deployable AV stack, and the episode-level collision rates of 5.7–9.5% in deliberately stressed traffic are not deployment grade; the supported claim is relative (49–56% below the best learned baseline). Correlational dynamics. The learned dynamics are prior-constrained but not causally identified; verification is conservative, so misattribution degrades toward rejecting actions rather than accepting unsafe ones, yet its quality depends on dynamics fidelity (constant-velocity propagation raises CR by 48–49%; 3 of the 57 acquired rules were over-specific in audit, Appendix D.5). Limited zero-shot cross-domain reusability. Zero-shot cross-domain reusability of the compiled memory is limited: a memory compiled solely from highD/rounD begins at an 86.2% call rate on highway-env, indicating that many target-domain encounters still require online acquisition. REINS is accordingly scoped to the self-evolution loop rather than assuming universal cross-domain memory transfer (Appendix D.7). Scope. The monotone miss-rate property assumes a stationary scene distribution, and the implementation is specialized to driving: only the variable schema and the action space must be re-authored for another domain (Appendix D.1).

7 Conclusion

We present REINS, a self-evolving agent harness that adapts the agent-harness paradigm from software engineering to real-time, safety-critical trajectory planning through three LLM–planner couplings: grounding, verification, and consolidation. Familiar scenes resolve from an indexed rule memory in \mathcal{O}(\log|\mathcal{R}|) time, while memory misses trigger LLM-driven rule acquisition that grounds, verifies, and writes back new rules, closing the self-evolution loop without any LLM weight update. At the tactical decision layer, REINS attains 98%+ compliance, nearly 50% collision reduction, and 1.9–4.6 ms latency, with gains that survive matched baselines, observation noise, reactive replay, and cross-domain memory transfer. Future work will couple the harness to perception uncertainty and continuous maneuvers, extend it to multi-agent coordination, and move the learned dynamics toward interventional identification with incremental updates.

Acknowledgments and Disclosure of Funding

This work was supported by the European Union’s Horizon Europe research and innovation programme under Marie Skłodowska-Curie grant agreement No. 101126636 (DSTrain) and by the Technical Faculty of IT and Design at Aalborg University. This work was partly supported by the European Union under Grant 101123471 (EDGE-Skills project funded under the Digital Europe Programme). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Commission. Neither the European Union nor the granting authority can be held responsible for them. The authors declare no competing interests.

References

  1. Alkhazraji et al. (2020) Y. Alkhazraji, M. Frorath, M. Grützner, M. Helmert, T. Liebetraut, R. Mattmüller, M. Ortlieb, J. Seipp, T. Springenberg, P. Stahl, and J. Wülfing Pyperplan. Note: Zenodo, https://doi.org/10.5281/zenodo.3700819
  2. Caesar et al. (2021) H. Caesar, J. Kabzan, K. S. Tan, W. K. Fong, E. Wolff, A. Lang, L. Fletcher, O. Beijbom, and S. Omari NuPlan: a closed-loop ML-based planning benchmark for autonomous vehicles. arXiv preprint arXiv:2106.11810.
  3. Cai et al. (2024) T. Cai, Y. Liu, Z. Zhou, H. Ma, S. Z. Zhao, Z. Wu, X. Han, Z. Huang, and J. Ma Driving with regulation: trustworthy and interpretable decision-making for autonomous driving with retrieval-augmented reasoning. arXiv preprint arXiv:2410.04759.
  4. Chen et al. (2025) H. Chen, J. Sun, Y. Liu, Z. Peng, and D. Hu Causal confusion in pedestrian crossing intention prediction for autonomous vehicles: the role of ego-vehicle speed. IEEE Transactions on Intelligent Transportation Systems.
  5. Cui et al. (2024) C. Cui, Y. Ma, X. Cao, W. Ye, and Z. Wang Drive as you speak: enabling human-like interaction with large language models in autonomous vehicles. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 902–909.
  6. Cui et al. (2026) Z. Cui, H. Tang, T. Li, Y. Li, P. Guan, A. Taherkordi, and T. Skeie C-TRAIL: a commonsense world framework for trajectory planning in autonomous driving. IEEE Transactions on Vehicular Technology.
  7. Falcone et al. (2007) P. Falcone, F. Borrelli, J. Asgari, H. E. Tseng, and D. Hrovat Predictive active steering control for autonomous vehicle systems. IEEE Transactions on Control Systems Technology 15 (3), pp. 566–580.
  8. Francis et al. (2018) N. Francis, A. Green, P. Guagliardo, L. Libkin, T. Lindaaker, V. Marsault, S. Plantikow, M. Rydberg, P. Selmer, and A. Taylor Cypher: an evolving query language for property graphs. In Proceedings of the 2018 International Conference on Management of Data, pp. 1433–1445.
  9. Fu et al. (2024) D. Fu, X. Li, L. Wen, M. Dou, P. Cai, B. Shi, and Y. Qiao Drive like a human: rethinking autonomous driving with large language models. In IEEE/CVF Winter Conference on Applications of Computer Vision Workshops (WACVW), pp. 910–919.
  10. Gettman and Head (2003) D. Gettman and L. Head Surrogate safety measures from traffic simulation models. Transportation Research Record 1840 (1), pp. 104–115.
  11. Giamattei et al. (2024) L. Giamattei, A. Guerriero, R. Pietrantuono, and S. Russo Causality-driven testing of autonomous driving systems. ACM Transactions on Software Engineering and Methodology 33 (3), pp. 1–35.
  12. Guan et al. (2023) L. Guan, K. Valmeekam, S. Sreedharan, and S. Kambhampati Leveraging pre-trained large language models to construct and utilize world models for model-based task planning. In Advances in Neural Information Processing Systems, Vol. 36.
  13. Hoerl and Kennard (1970) A. E. Hoerl and R. W. Kennard Ridge regression: biased estimation for nonorthogonal problems. Technometrics 12 (1), pp. 55–67.
  14. Kesting et al. (2007) A. Kesting, M. Treiber, and D. Helbing General lane-changing model MOBIL for car-following models. Transportation Research Record 1999 (1), pp. 86–94.
  15. Krajewski et al. (2018) R. Krajewski, J. Bock, L. Kloeker, and L. Eckstein The highD dataset: a drone dataset of naturalistic vehicle trajectories on German highways for validation of highly automated driving systems. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC), pp. 2118–2125.
  16. Krajewski et al. (2020) R. Krajewski, T. Moers, J. Bock, L. Vater, and L. Eckstein The rounD dataset: a drone dataset of road user trajectories at roundabouts in Germany. In 2020 IEEE 23rd International Conference on Intelligent Transportation Systems (ITSC), pp. 1–6.
  17. Lee et al. (2026) Y. Lee, R. Nair, Q. Zhang, K. Lee, O. Khattab, and C. Finn Meta-harness: end-to-end optimization of model harnesses. In CoRR abs/2603.28052,
  18. Lenz et al. (2016) D. Lenz, T. Kessler, and A. Knoll Tactical cooperative planning for autonomous highway driving using Monte-Carlo tree search. In 2016 IEEE Intelligent Vehicles Symposium (IV), pp. 447–453.
  19. Leurent (2018) E. Leurent An environment for autonomous driving decision-making. GitHub. Note: https://github.com/eleurent/highway-env
  20. Li et al. (2024a) B. Li, Y. Wang, J. Mao, B. Ivanovic, S. Veer, K. Leung, and M. Pavone Driving everywhere with large language model policy adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14948–14957.
  21. Li et al. (2024b) Y. Li, C. Fan, C. Ge, Z. Zhao, C. Li, C. Xu, H. Yao, M. Tomizuka, B. Zhou, C. Tang, M. Ding, and W. Zhan WOMD-Reasoning: a large-scale dataset for interaction reasoning in driving. arXiv preprint arXiv:2407.04281.
  22. Liang et al. (2022) Y. Liang, K. Ouyang, Y. Wang, X. Liu, H. Chen, J. Zhang, Y. Zheng, and R. Zimmermann TrajFormer: efficient trajectory classification with transformers. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pp. 1229–1237.
  23. Liu et al. (2025) B. Liu, J. Zhang, F. Lin, C. Yang, M. Peng, and W. Yin SymAgent: a neural-symbolic self-learning agent framework for complex reasoning over knowledge graphs. In Proceedings of the ACM on Web Conference 2025, pp. 98–108.
  24. Liu et al. (2023) B. Liu, Y. Jiang, X. Zhang, Q. Liu, S. Zhang, J. Biswas, and P. Stone LLM+P: empowering large language models with optimal planning proficiency. arXiv preprint arXiv:2304.11477.
  25. Luo et al. (2024) L. Luo, Z. Zhao, G. Haffari, Y. Li, C. Gong, and S. Pan Graph-constrained reasoning: faithful reasoning on knowledge graphs with large language models. arXiv preprint arXiv:2410.13080.
  26. Ma et al. (2024) Y. J. Ma, W. Liang, G. Wang, D. Huang, O. Bastani, D. Jayaraman, Y. Zhu, L. Fan, and A. Anandkumar Eureka: human-level reward design via coding large language models. In ICLR,
  27. Manas et al. (2025) K. Manas, M. Keser, and A. Knoll Integrating legal and logical specifications in perception, prediction, and planning for automated driving: a survey of methods. arXiv preprint arXiv:2510.25386.
  28. Manas et al. (2024) K. Manas, S. Zwicklbauer, and A. Paschke TR2MTL: LLM based framework for metric temporal logic formalization of traffic rules. In 2024 IEEE Intelligent Vehicles Symposium (IV), pp. 1206–1213.
  29. Mao et al. (2024) J. Mao, J. Ye, Y. Qian, M. Pavone, and Y. Wang A language agent for autonomous driving. In First Conference on Language Modeling (COLM),
  30. Merrill et al. (2026) M. A. Merrill, A. G. Shaw, N. Carlini, B. Li, H. Raj, I. Bercovich, L. Shi, J. Y. Shin, T. Walshe, E. K. Buchanan, et al. Terminal-bench: benchmarking agents on hard, realistic tasks in command line interfaces. In CoRR abs/2601.11868,
  31. Montgomery (1983) H. Montgomery Decision rules and the search for a dominance structure: towards a process model of decision making. In Advances in Psychology, Vol. 14, pp. 343–369.
  32. Paden et al. (2016) B. Paden, M. Čáp, S. Z. Yong, D. Yershov, and E. Frazzoli A survey of motion planning and control techniques for self-driving urban vehicles. IEEE Transactions on Intelligent Vehicles 1 (1), pp. 33–55.
  33. Peters et al. (2017) J. Peters, D. Janzing, and B. Schölkopf Elements of causal inference: foundations and learning algorithms. The MIT Press.
  34. Riedmaier et al. (2020) S. Riedmaier, T. Ponn, D. Ludwig, B. Schick, and F. Diermeyer Survey on scenario-based safety assessment of automated vehicles. IEEE Access 8, pp. 87456–87477.
  35. Sha et al. (2023) H. Sha, Y. Mu, Y. Jiang, L. Chen, C. Xu, P. Luo, S. E. Li, M. Tomizuka, W. Zhan, and M. Ding LanguageMPC: large language models as decision makers for autonomous driving. arXiv preprint arXiv:2310.03026.
  36. Shalev-Shwartz et al. (2017) S. Shalev-Shwartz, S. Shammah, and A. Shashua On a formal model of safe and scalable self-driving cars. arXiv preprint arXiv:1708.06374.
  37. Tang et al. (2025) X. Tang, M. Kan, S. Shan, and X. Chen Plan-R1: safe and feasible trajectory planning as language modeling. arXiv preprint arXiv:2505.17659.
  38. Treiber et al. (2000) M. Treiber, A. Hennecke, and D. Helbing Congested traffic states in empirical observations and microscopic simulations. Physical Review E 62 (2), pp. 1805–1824.
  39. Vaswani et al. (2017) A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin Attention is all you need. In Advances in Neural Information Processing Systems, Vol. 30.
  40. Wang et al. (2023) G. Wang, Y. Xie, Y. Jiang, A. Mandlekar, C. Xiao, Y. Zhu, L. Fan, and A. Anandkumar Voyager: an open-ended embodied agent with large language models. In CoRR abs/2305.16291,
  41. Wang et al. (2025) Y. Wang, R. Yu, S. Wan, L. Gan, and D. Zhan FOUNDER: grounding foundation models in world models for open-ended embodied decision making. In Forty-Second International Conference on Machine Learning,
  42. Webber (2012) J. Webber A programmatic introduction to Neo4j. In Proceedings of the 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity, pp. 217–218.
  43. Zeng et al. (2025) F. Zeng, S. Wang, C. Zhu, and L. Li ADRD: LLM-driven autonomous driving based on rule-based decision systems. arXiv preprint arXiv:2506.14299.
  44. Zhai et al. (2025) M. Zhai, C. Li, Z. Guo, N. Yang, X. Qin, S. Zhao, J. Han, J. Tao, Y. Wu, and Y. Jia World knowledge-enhanced reasoning using instruction-guided interactor in autonomous driving. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 39, pp. 9842–9850.
  45. Zhang et al. (2021a) J. Zhang, Z. Jian, J. Fu, Z. Nan, J. Xin, and N. Zheng Trajectory planning with comfort and safety in dynamic traffic scenarios for autonomous driving. In 2021 IEEE Intelligent Vehicles Symposium Workshops (IV Workshops), pp. 342–349.
  46. Zhang et al. (2021b) L. Zhang, G. Yang, and B. C. Stadie World model as a graph: learning latent landmarks for planning. In International Conference on Machine Learning, pp. 12611–12620.
  47. Zhang et al. (2025) Y. Zhang, J. Liu, C. Xu, P. Hang, and J. Sun LeAD: the LLM enhanced planning system converged with end-to-end autonomous driving. In CoRR abs/2507.05754,
  48. Zhao et al. (2024) A. Zhao, D. Huang, Q. Xu, M. Lin, Y. Liu, and G. Huang ExpeL: LLM agents are experiential learners. In AAAI,

Appendix A More Details about REINS

A.1 Variable Definitions

We define macro and micro variables shown in Table 4. The macro variables represent high-level semantic categories, while micro variables are the specific measurable quantities used in the world dynamics model and rule system.

The variables are organized into five functional groups: Environment variables capture external conditions (weather, visibility, road surface, speed limits) that affect driving but are not directly controllable. Traffic variables describe spatial and temporal relationships with surrounding vehicles, including headway distances, relative speeds, TTC, and lane density metrics. Ego variables represent the controlled vehicle’s kinematic state (position, velocity, acceleration, orientation). Action defines the discrete action space: five high-level maneuvers executed by low-level controllers. Outcome variables measure action consequences, including safety (collision risk), comfort (jerk-based), and task completion indicators. This hierarchical organization enables structured rule retrieval via variable-group indexing.

The macro-group dependency set \mathcal{E}_{\mathcal{H}} in Def. 3.1 encodes the admissible group-level edges:

\displaystyle\mathcal{E}_{\mathcal{H}}=\{ \\ \displaystyle(\textsc{Env},\textsc{Traffic}),(\textsc{Env},\textsc{Ego}),(\textsc{Env},\textsc{Outcome}), \\ \displaystyle(\textsc{Traffic},\textsc{Traffic}),(\textsc{Traffic},\textsc{Ego}),(\textsc{Traffic},\textsc{Outcome}), \\ \displaystyle(\textsc{Ego},\textsc{Traffic}),(\textsc{Ego},\textsc{Ego}),(\textsc{Ego},\textsc{Outcome}), \\ \displaystyle(\textsc{Action},\textsc{Ego}),(\textsc{Action},\textsc{Outcome})\}.

Environment factors influence Traffic, Ego, and Outcome; Traffic and Ego variables interact bidirectionally and feed into Outcome; Action affects only Ego state and Outcome.

Table 4: Macro and micro variable definitions used in REINS.
  • Environment
    Micro Variable
    weather_type
    Description
    Weather condition (clear/rain/fog/snow)
  • visibility_distance
    Micro Variable
    Visibility range (m)
  • road_friction
    Micro Variable
    Road surface friction coefficient
  • road_type
    Micro Variable
    Scenario type (highway/merge/intersection/roundabout)
  • time_of_day
    Micro Variable
    Time period (day/night/dawn/dusk)
  • speed_limit
    Micro Variable
    Posted speed limit (km/h)
  • Traffic
    Micro Variable
    headway_distance
    Description
    Distance to lead vehicle (m)
  • lead_speed
    Micro Variable
    Lead vehicle speed (m/s)
  • lead_rel_speed
    Micro Variable
    Relative speed to lead vehicle (m/s)
  • lead_ttc
    Micro Variable
    Time-to-collision with lead vehicle (s)
  • lead_thw
    Micro Variable
    Time headway to lead vehicle (s)
  • rear_distance
    Micro Variable
    Distance to rear vehicle (m)
  • rear_speed
    Micro Variable
    Rear vehicle speed (m/s)
  • rear_rel_speed
    Micro Variable
    Relative speed to rear vehicle (m/s)
  • rear_ttc
    Micro Variable
    Time-to-collision with rear vehicle (s)
  • left_front_distance
    Micro Variable
    Distance to left-front vehicle (m)
  • left_front_speed
    Micro Variable
    Left-front vehicle speed (m/s)
  • left_rear_distance
    Micro Variable
    Distance to left-rear vehicle (m)
  • left_rear_speed
    Micro Variable
    Left-rear vehicle speed (m/s)
  • right_front_distance
    Micro Variable
    Distance to right-front vehicle (m)
  • right_front_speed
    Micro Variable
    Right-front vehicle speed (m/s)
  • right_rear_distance
    Micro Variable
    Distance to right-rear vehicle (m)
  • right_rear_speed
    Micro Variable
    Right-rear vehicle speed (m/s)
  • lane_density_left
    Micro Variable
    Left lane density (vehicles/100m)
  • lane_density_right
    Micro Variable
    Right lane density (vehicles/100m)
  • available_gap_left
    Micro Variable
    Available gap in left lane (m)
  • available_gap_right
    Micro Variable
    Available gap in right lane (m)
  • cutin_risk
    Micro Variable
    Cut-in risk indicator (0–1)
  • Ego
    Micro Variable
    ego_x
    Description
    Ego vehicle longitudinal position (m)
  • ego_y
    Micro Variable
    Ego vehicle lateral position (m)
  • ego_vx
    Micro Variable
    Ego vehicle longitudinal velocity (m/s)
  • ego_vy
    Micro Variable
    Ego vehicle lateral velocity (m/s)
  • ego_speed
    Micro Variable
    Ego vehicle total speed (m/s)
  • ego_acceleration
    Micro Variable
    Ego vehicle acceleration (m/s2)
  • yaw_rate
    Micro Variable
    Ego vehicle yaw rate (rad/s)
  • jerk
    Micro Variable
    Ego vehicle jerk (m/s3)
  • lane_id
    Micro Variable
    Current lane identifier
  • lateral_offset
    Micro Variable
    Lateral offset from lane center (m)
  • Action
    Micro Variable
    action_type
    Description
    Discrete action (IDLE/FASTER/SLOWER/LANE_LEFT/LANE_RIGHT)
  • Outcome
    Micro Variable
    risk_score
    Description
    Collision probability (0–1)
  • comfort_score
    Micro Variable
    Comfort metric (jerk-based)
  • energy_consumption
    Micro Variable
    Energy usage metric
  • success_flag
    Micro Variable
    Goal completion indicator (boolean)
  • violation_flag
    Micro Variable
    Rule violation indicator (boolean)

A.2 Rule Templates

Seven rule templates are defined to capture different logical structures for driving knowledge:

  • IF-THEN: Conditional implication for basic conditional relations. Example: IF TTC < 2s THEN decelerate
  • AND-THEN: Conjunctive trigger requiring multiple conditions. Example: IF visibility < 50m AND raining THEN reduce_speed_by_30%
  • THRESHOLD: Numeric constraint with calibrated boundaries. Example: IF speed > speed_limit THEN violation = true
  • PRIORITY: Decision hierarchy for conflicting actions. Example: yield \succ accelerate (yield takes priority)
  • MULTI-ACTION: Compound actions under one condition. Example: IF collision_risk = high THEN brake AND steer_away
  • WEIGHTED-ACTION: Weighted action selection. Example: IF crash_risk THEN {brake: 0.7, steer: 0.3}
  • TEMPORAL-CHAIN: Temporal constraints between triggers. Example: IF obstacle_detected THEN brake within 1.5s

A.3 Rule Conflict Resolution

When multiple rules are activated simultaneously, conflicts may arise if they recommend different actions. REINS resolves conflicts through a three-level arbitration mechanism:

Priority-based ordering. Rules are assigned priority levels based on their functional category: Safety > Compliance > Navigation > Efficiency. When rules from different categories conflict, the higher-priority rule takes precedence. For example, if an Efficiency rule (consider lane change) and a Safety rule (maintain gap) both fire, the Safety rule overrides.

Confidence-weighted aggregation. For rules within the same priority level, REINS aggregates their scores using the noisy-OR formula (Eq. (5)). This allows multiple supporting rules to reinforce an action while remaining robust to individual noisy predictions. The action with the highest aggregated probability is selected.

Dynamics-based verification. When the aggregated action prior is below a confidence threshold (\tau=0.7), REINS falls back to dynamics-based verification. The top-M candidate actions are simulated via forward rollout using the world dynamics model, and the action yielding the safest predicted trajectory is selected.

This hierarchical approach ensures that safety-critical rules are never overridden by efficiency considerations, while still allowing flexible action selection in non-critical situations.

A.4 Method Details

This subsection contains the full equations, architectural details, and explanatory prose deferred from the methodology to keep the main body concise. The structure mirrors Section 4.1–4.2.

A.4.1 World Dynamics Learning Details

We learn the dependency graph \hat{\mathcal{G}}=(\mathcal{X},\hat{\mathcal{E}},\hat{w}) in three steps, then train a per-variable dynamics function on the resulting parent sets.

Step 1: Edge Prior Estimation. We query the LLM with variable dependency prompts (Appendix A.5) to obtain an edge confidence \pi_{ij}\in[0,1] for each candidate edge X_{j}\to X_{i}. This is combined with the macro-group constraints (Eq. 10) to form a unified prior:

\tilde{\pi}_{ij}=\alpha\,\pi_{ij}+(1-\alpha)\,\mathbb{I}\{(h(X_{j}),h(X_{i}))\in\mathcal{E}_{\mathcal{H}}\},
(11)

where \alpha\in[0,1] balances LLM confidence against structural constraints. Edges that violate the macro-group constraints carry indicator 0 and are reduced to \alpha\,\pi_{ij}, while semantically aligned edges are pushed toward 1.

Step 2: Prior-Guided Regression. For each target variable X_{i}, we predict its value from the lagged values of other variables via ridge regression [Hoerl and Kennard, 1970] with prior-adaptive penalties \lambda_{ij}=\lambda_{0}(1-\tilde{\pi}_{ij})^{\rho}:

\hat{\mathbf{w}}_{i}=\arg\min_{\mathbf{w}}\sum_{t=L}^{N}\Big(X_{i}^{t}-\textstyle\sum_{j\neq i}\sum_{\ell=1}^{L}w_{j\ell}X_{j}^{t-\ell}\Big)^{2}+\sum_{j\neq i}\lambda_{ij}\|\mathbf{w}_{j}\|_{2}^{2},
(12)

where w_{j\ell} is the regression coefficient for variable X_{j} at lag \ell\in\{1,\ldots,L\}, \mathbf{w}_{j}=(w_{j1},\ldots,w_{jL})^{\top} groups all lags for X_{j}, \lambda_{0} is the base penalty, and \rho>0 controls penalty sharpness. High-prior edges (\tilde{\pi}_{ij}\to 1) receive weak regularization and survive; low-prior edges are shrunk toward zero.

Step 3: Graph Construction. The parent set \mathrm{Pa}(X_{i}) retains the top-K variables ranked by aggregated coefficient magnitude \sum_{\ell=1}^{L}|\hat{w}_{j\ell}|. The learned edge set and weights are

\hat{\mathcal{E}}=\{(X_{j},X_{i})\mid X_{j}\in\mathrm{Pa}(X_{i})\},\quad\hat{w}(X_{j},X_{i})=\textstyle\sum_{\ell=1}^{L}|\hat{w}_{j\ell}|.
(13)

Dynamics Function Loss. Given \hat{\mathcal{G}}, each f_{i} is implemented as a multi-head Transformer [Vaswani et al., 2017] and trained by mean squared error over its parent trajectory:

\mathcal{L}_{\text{dyn}}^{(i)}=\frac{1}{N}\sum_{t}\big(X_{i}^{t+1}-f_{i}(\mathrm{Pa}(X_{i})^{t-L+1:t})\big)^{2}.
(14)

Optimizer, batch size, and convergence curves are reported in Appendix C.1.

A.4.2 Rule Compilation Details

Rule Structure Generation. For each dependency edge (X_{j},X_{i})\in\hat{\mathcal{E}}, the LLM generates a rule structure

r=(T,\mathcal{P}_{r},a_{r},c_{r}),
(15)

where T is the rule template (Def. 3.5), \mathcal{P}_{r} is a set of guard predicates with symbolic thresholds, a_{r}\in\mathcal{A} is the recommended action (Def. 3.2), and c_{r} is the confidence derived from edge weight \hat{w}(X_{j},X_{i}). Prompt details are in Appendix A.5.

Threshold Calibration. Each predicate p\in\mathcal{P}_{r} (Def. 3.4) requires a concrete threshold \tau_{i}, calibrated from \mathcal{D} in three forms [Luo et al., 2024]:

\tau_{i}=\begin{cases}\mu_{i}+\zeta\sigma_{i}&\text{(z-score)},\\
Q_{i}(\zeta)&\text{(quantile)},\\
\tau_{0}&\text{(absolute)},\end{cases}
(16)

where \mu_{i},\sigma_{i} are empirical mean and standard deviation of X_{i}, Q_{i}(\zeta) is the \zeta-quantile, and \tau_{0} is a fixed constant (e.g., speed limits). The comparison operator \prec is selected to maximize safety separability between the two sides of the threshold under safety outcome y\in\{0,1\} (Section 4.1.2).

Graph Database Storage. Compiled rules are stored in a Neo4j graph database [Webber, 2012] with a variable-indexed schema (Figure 3). Each rule node stores the complete tuple (T,\mathcal{P}_{r},a_{r},c_{r}), where T is the template type, \mathcal{P}_{r} contains calibrated predicates with concrete thresholds \tau and operators \prec, a_{r} is the recommended action, and c_{r} is the confidence. Rule nodes connect to variable nodes via TRIGGERS (input variables) and AFFECTS (output variables) edges. This enables O(\log|\mathcal{R}|) retrieval via parameterized Cypher queries on variables active in the current state. Database statistics are provided in Appendix C.7.1.

Figure 3: Rule database schema.
A.4.3 Rule-Guided Planning Details

Scene-Aware Rule Retrieval. Given s_{t}\in\mathcal{S}, we identify active variables \{X_{i}\} and retrieve context-relevant rules via parameterized Cypher queries [Francis et al., 2018] generated by the LLM (read-only and schema-constrained; Appendix A.5). The retrieval map

G:(\{X_{i}\},K)\longmapsto\mathcal{R}_{t}\subseteq\mathcal{R}
(17)

returns up to K rules ranked by confidence c_{r}. A rule r is retrieved if its trigger variables \{X_{j}\mid(X_{j},r)\in\texttt{TRIGGERS}\} intersect with the active set \{X_{i}\} and the dependency direction satisfies the macro-group constraints \mathcal{E}_{\mathcal{H}}.

Action Scorer Architecture. The Transformer scorer [Liang et al., 2022] takes state encoding \mathbf{x}_{t} and rule embedding \mathbf{u}_{r} and emits relevance and action heads:

\displaystyle\mathbf{h}_{t,r} \\ \displaystyle=\text{TransformerEnc}([\mathbf{x}_{t};\mathbf{u}_{r}]), \\ \displaystyle S_{\text{rel}}(r,s_{t}) \\ \displaystyle=\sigma(\text{Dec}_{\text{rel}}(\mathbf{h}_{t,r}))\in[0,1], \\ \displaystyle S_{\text{act}}(r,s_{t},a) \\ \displaystyle=\mathrm{softmax}(\text{Dec}_{\text{act}}(\mathbf{h}_{t,r}))_{a},

where S_{\text{rel}} predicts whether r should influence the current decision, and S_{\text{act}} predicts the action preference given r. The combined rule-action score multiplies relevance, action preference, and rule confidence:

f(r,a\mid s_{t})=S_{\text{rel}}(r,s_{t})\cdot S_{\text{act}}(r,s_{t},a)\cdot c_{r}.
(19)

Scorer Training. The scorer is trained on expert trajectories \{(s_{t},a^{*}_{t})\} with a joint relevance + action objective:

\mathcal{L}=\sum_{t,r}\big[\mathrm{BCE}(\mathrm{Exec}(r,s_{t}),S_{\text{rel}}(r,s_{t}))-\log S_{\text{act}}(r,s_{t},a^{*}_{t})\big],
(20)

where \mathrm{Exec}(r,s_{t})\in\{0,1\} is the ground-truth rule activation (Eq. 2) and a^{*}_{t} is the expert action.

Action Aggregation. The full noisy-OR action distribution corresponding to Eq. 5 is

\displaystyle P(a\mid s_{t}) \\ \displaystyle=\frac{1-\prod_{r\in\mathcal{R}_{t}(a)}\big(1-f(r,a\mid s_{t})\big)}{Z}, \\ \displaystyle a^{*}_{\text{rule}} \\ \displaystyle=\arg\max_{a\in\mathcal{A}}P(a\mid s_{t}),

where \mathcal{R}_{t}(a)\subseteq\mathcal{R}_{t} denotes the rules with recommended action a_{r}=a and Z normalizes over \mathcal{A}. The formulation favors actions supported by multiple high-confidence rules.

Trajectory Verification. For the top-M actions ranked by P(a\mid s_{t}), we predict H-step future states:

\hat{s}_{t+h+1}=\Phi(\hat{s}_{t+h},a;\hat{\mathcal{G}},\hat{\mathcal{F}}),\quad h=0,\ldots,H-1,
(22)

where \Phi applies each f_{i}\in\hat{\mathcal{F}} to predict X_{i} from \mathrm{Pa}(X_{i}) under \hat{\mathcal{G}}. Each rollout produces a candidate trajectory \hat{\xi}(a)=(\hat{s}_{t+1},\ldots,\hat{s}_{t+H}), consistent with Def. 3.3. The planner selects a^{\star}_{t}=\arg\max_{a\in\mathcal{A}_{M}}J(\hat{\xi}(a)), where J:\mathcal{S}^{H}\to\mathbb{R} penalizes collisions, rule violations, and control effort (Appendix B.2); the first control of the selected trajectory is executed in receding-horizon [Zhang et al., 2021b].

A.4.4 Online Rule Acquisition Details

LLM-Driven Rule Proposal. On a miss, the harness queries \mathcal{M} with the current state and active variables:

\tilde{r}=(\tilde{T},\tilde{\mathcal{P}},\tilde{a},\tilde{c})\;\sim\;\mathcal{M}(s_{t}),
(23)

where \tilde{r} conforms to the rule template (Def. 3.5) and uses only variables in \mathcal{X} and operators from the predicate grammar (Def. 3.4). Prompt details are in Appendix A.5.

Safe-Action Selection. When online rule acquisition rejects \tilde{r} and \mathcal{R}_{t}=\emptyset, the harness raises a human-takeover alert and executes the action that maximizes minimum lookahead time-to-collision under \hat{\mathcal{F}}:

a^{\mathrm{safe}}_{t}=\arg\max_{a\in\mathcal{A}}\;\min_{h\in[1,H]}\mathrm{TTC}\!\left(\hat{s}_{t+h}(a)\right).
(24)

Memory-Update Collision Branch. Eq. 8’s collision branch averages confidences instead of creating a duplicate node, so |\mathcal{R}| counts distinct rule structures rather than LLM-noise replicas. The hash \kappa is computed over the structural triple (\tilde{T},\tilde{\mathcal{P}},\tilde{a}) but excludes \tilde{c}, so semantically identical proposals collide regardless of confidence noise. Collisions are common during early deployment when \mathcal{R} is small, then taper off as coverage saturates.

Self-Evolution Properties. Eq. 8 structurally enforces |\mathcal{R}_{t+1}|\geq|\mathcal{R}_{t}| (memory monotonicity) and \theta_{\mathcal{M}}\equiv\theta_{\mathcal{M}}^{(0)} (no LLM parameter update). Under stationarity of the scene distribution, the per-state miss rate is non-increasing as \mathcal{R} accumulates coverage, since any state s that triggered a miss and produced an accepted \tilde{r} is now matched by a rule keyed on the variables active at s. Since \mathcal{M} is invoked only on misses, its per-scene invocation rate decays monotonically with \Pr[\mathrm{Miss}]. We validate this behavior empirically in Section 5.4 and Appendix C.5.

A.5 Prompts

We provide three prompt templates used in REINS’s offline compilation pipeline. Figure 4 shows the Variable Dependency Prompt, which instructs the LLM to infer dependencies between driving variables based on domain knowledge; the output serves as semantic priors for structure learning in the world dynamics model. Figure 5 presents the Rule Extraction Prompt, which converts dependency edges into executable driving rules with parameterized guards and discrete actions; these rules are stored in the Neo4j graph database. Figure 6 displays the Parameterized Cypher Query Prompt, which generates parameterized queries for context-aware rule retrieval during planning. All prompts enforce read-only constraints and structured output formats to ensure safety and parseability.

Figure 4: Variable dependency prompt. Given a list of driving-related variables, the LLM infers directed dependency relationships as structural priors for the world dynamics model.
Figure 5: Rule extraction prompt from dependency structure.
Figure 6: Parameterized Cypher query prompt.

Appendix B Implementation Details

B.1 Experiment Settings

Table 5 summarizes the key hyperparameters and training configurations used in our experiments. The settings are organized into six categories: Simulation Environment specifies the highway-env simulator settings, including four driving scenarios with varying complexity and a discrete action space of five high-level maneuvers. Real-world Datasets describes the highD (highway) and rounD (roundabout) drone datasets used for real-world evaluation, including recording statistics and sampling rates. World Dynamics Model details the structure learning parameters (LLM prior weight, regularization) and neural network architecture (Transformer layers, attention heads). Rule Compilation covers the offline LLM-based rule generation process, including the backbone model, sampling strategy, and threshold calibration. Training & Evaluation specifies the data splits, random seeds, and hardware configuration. Planning & Deployment reports inference-time parameters and latency measurements demonstrating real-time capability. All hyperparameter configurations follow standard practices unless otherwise stated.

Table 5: Experiment settings and hyperparameters for REINS.
  • Simulation Environment
  • Simulator
    Setting
    highway-env v1.8.2
  • Scenarios
    Setting
    Highway, Merge, Roundabout,
  • No data
    Setting
    Intersection
  • Episode length
    Setting
    100 steps (20s at 5 Hz)
  • Observation
    Setting
    15 nearest vehicles
  • Action space
    Setting
    {IDLE, FASTER, SLOWER,
  • No data
    Setting
    LANE_LEFT, LANE_RIGHT}
  • Weather conditions
    Setting
    Clear, Rain, Fog, Snow
  • Real-world Datasets
  • highD source
    Setting
    German Autobahn (drone)
  • highD recordings
    Setting
    01, 02, 03, 04
  • highD vehicles
    Setting
    4,237 (578 lane-change events)
  • rounD source
    Setting
    German roundabouts
  • rounD recordings
    Setting
    00, 01, 02
  • rounD vehicles
    Setting
    2,156 (423 yield/merge events)
  • Sampling rate
    Setting
    25 Hz
  • World Dynamics Model
  • Structure learning
    Setting
    Ridge regression + LLM prior
  • LLM prior weight \alpha
    Setting
    0.6
  • Penalty exponent \rho
    Setting
    2.0
  • Base regularization \lambda_{0}
    Setting
    0.1
  • Lag length L
    Setting
    6 steps
  • Top-K parents
    Setting
    5
  • Transformer layers
    Setting
    2
  • Attention heads
    Setting
    4
  • Optimizer
    Setting
    Adam
  • Learning rate
    Setting
    2\times 10^{-4}
  • Batch size
    Setting
    64
  • Training episodes
    Setting
    50k
  • Rule Compilation (Offline)
  • LLM backbone
    Setting
    GPT-4o (2024-08-06)
  • LLM temperature
    Setting
    0.0 (deterministic)
  • Max output tokens
    Setting
    4096
  • Prompt tokens (avg.)
    Setting
    \sim1.2k per query
  • Total LLM calls
    Setting
    \sim50 (one-time offline)
  • Rule templates
    Setting
    7 types
  • Neo4j version
    Setting
    5.12
  • Threshold calibration
    Setting
    Gaussian (\mu+\zeta\sigma), \zeta=1.5
  • Confidence \tau
    Setting
    0.7
  • Training & Evaluation
  • Training data
    Setting
    50k episodes
  • Test episodes
    Setting
    1000 per scenario
  • Random seeds
    Setting
    5 (0, 42, 123, 456, 789)
  • Training hardware
    Setting
    4\times A100 (40GB)
  • Training time
    Setting
    \sim8 hours
  • Planning & Deployment
  • Retrieval count k
    Setting
    10
  • Planning horizon H
    Setting
    5 steps
  • Rollout discount \gamma
    Setting
    0.99
  • Safety weight \lambda_{\text{safe}}
    Setting
    1.0
  • Comfort weight \lambda_{\text{comf}}
    Setting
    0.1
  • Progress weight \lambda_{\text{prog}}
    Setting
    0.5
  • Inference hardware
    Setting
    RTX 3090 or above
  • GPU memory
    Setting
    \sim4 GB
  • Neo4j query latency
    Setting
    <1 ms
  • Planning latency
    Setting
    1.9–4.6 ms per decision
  • Real-time capability
    Setting
    200–500 Hz

B.2 Evaluation Metrics

Rule Compliance (Compl.) measures the fraction of timesteps where all active rules are satisfied:

\text{Compl.}=\frac{1}{T}\sum_{t=1}^{T}\prod_{k=1}^{K}\bigl(1-v_{k,t}\bigr),
(25)

where v_{k,t}\in\{0,1\} indicates whether rule k is violated at time t.

Collision Rate (CR) measures the fraction of episodes in which at least one collision occurs:

\text{CR}=\frac{1}{N}\sum_{i=1}^{N}\mathbb{I}(\text{collision in episode }i),
(26)

where N is the number of test episodes. A lower CR indicates safer planning.

Risk-aware Efficiency (RE) balances task performance against safety:

\displaystyle=R_{\text{task}}(\tau)-\lambda_{\text{risk}}R_{\text{risk}}(\tau), \\ \displaystyle R_{\text{risk}}(\tau) \\ \displaystyle=\sum_{t=1}^{T}\max(0,\delta_{\text{ttc}}-\text{TTC}_{t}),
(27) (28)

where R_{\text{task}} is the task reward, R_{\text{risk}} penalizes low TTC states, \lambda_{\text{risk}}=0.5 is the risk penalty weight, and \delta_{\text{ttc}}=3.0s is the TTC threshold.

Planning Efficiency (PE) measures average computation time per decision:

\text{PE}=\frac{1}{T}\sum_{t=1}^{T}t_{\text{plan}},
(29)

where t_{\text{plan}} (ms) is the wall-clock time for action selection.

Trajectory Objective J(\hat{\xi}). The trajectory-level objective used in dynamics-based verification is defined as:

\displaystyle J(\hat{\xi}) \\ \displaystyle=\sum_{h=1}^{H}\gamma^{h-1}\Big[-\lambda_{\text{safe}}\cdot\mathbb{I}(\text{TTC}_{t+h}<\tau_{\text{ttc}}) \\ \displaystyle+\lambda_{\text{prog}}\cdot\Delta d_{t+h}-\lambda_{\text{comf}}\cdot|j_{t+h}|\Big],

where \text{TTC}_{t+h} is the predicted time-to-collision, \Delta d_{t+h} is the progress toward the goal, j_{t+h} is the jerk, and \tau_{\text{ttc}}=2.0s is the safety threshold. The weights \lambda_{\text{safe}}=1.0, \lambda_{\text{prog}}=0.5, \lambda_{\text{comf}}=0.1 prioritize safety over progress and comfort.

Real-world Evaluation Protocol. We use closed-loop replay: one recorded vehicle is controlled by the planner while others follow recorded trajectories. Collisions are detected when bounding boxes overlap or the ego deviates beyond lane boundaries. In the simulated scenarios the surrounding vehicles instead react to the ego (IDM with MOBIL); a reactive-replay variant of highD is reported in Appendix D.6.

B.3 Baseline Descriptions

We select baselines from three categories to comprehensively evaluate REINS: (i) classical planners (MPC, MCTS) that represent traditional optimization and search-based approaches without rule guidance; (ii) LLM-based planners (DriveSpeak, PDDL, LLaDA, DriReg) that leverage language models for driving decisions but differ in how they integrate linguistic knowledge; and (iii) hybrid methods (SymAgent, Plan-R1) that combine learning with symbolic reasoning. This selection covers the spectrum from rule-free to rule-guided planning, enabling analysis of how different rule representation and retrieval strategies affect safety and efficiency.

  • MPC [Falcone et al., 2007]: Classical optimization-based planner solving finite-horizon control under kinematic and safety constraints. We use a 5-step horizon with quadratic cost on acceleration and jerk.
  • MCTS [Lenz et al., 2016]: Sampling-based planning via tree search and rollout evaluation. We use 1000 simulations per decision with UCB exploration.
  • DriveSpeak [Cui et al., 2024]: LLM-based method mapping natural-language scene descriptions directly to driving actions. Uses GPT-4o with scene prompts at each timestep.
  • PDDL [Guan et al., 2023, Liu et al., 2023]: the LLM writes the domain’s symbolic preconditions and effects once offline; at runtime a classical STRIPS solver (Pyperplan [Alkhazraji et al., 2020]) is invoked in process at each decision step with no LLM call. Its runtime profile is in Appendix D.3.
  • LLaDA [Li et al., 2024a]: LLM interpretation of region-specific traffic rules from driver handbooks. Uses pre-extracted rule sets with LLM-based rule matching.
  • DriReg [Cai et al., 2024]: RAG-based traffic regulation retrieval with LLM reasoning for action legality. Retrieves top-5 regulations per query using embedding similarity.
  • SymAgent [Liu et al., 2025]: Neural-symbolic agent integrating LLMs with structured knowledge graphs. Uses the same Neo4j backend as REINS for fair comparison.
  • Plan-R1 [Tang et al., 2025]: Two-stage learning-based planner with rule-shaped rewards and reinforcement learning. Trained on the same 50k episodes as REINS’s world model.

All baselines use identical observation spaces, action spaces, episodes, and evaluation protocols. For LLM-based methods, we use GPT-4o (2024-08-06) with temperature 0 for deterministic outputs. Hyperparameters for each baseline follow their original papers or are tuned on a held-out validation set. The conditions that are shared with REINS and those that each rule-based baseline keeps by design, together with a matched re-run and a common-reference compliance audit, are documented in Appendix D.2.

Appendix C Additional Results

Figure 7: Training loss convergence for the World Dynamics Learning. Each subplot shows one variable’s dynamics learning across four scenarios (Highway, Intersection, Merge, Roundabout). All variables converge within 150 epochs, with scenario-dependent convergence rates reflecting inherent complexity differences.

C.1 Training Convergence

We train the world dynamics model for 300 epochs using the Adam optimizer with a learning rate of 2\times 10^{-4} and batch size 64. Each variable-specific dynamics function f_{i} is implemented as a two-layer Transformer with four attention heads. Training is conducted on 50k episodes collected from four scenarios (Highway, Intersection, Merge, and Roundabout) using NVIDIA A100 GPUs. The model learns 20 variable-specific dynamics functions, including ego-state variables (ego_speed, ego_acceleration, ego_vx, ego_vy, ego_x, ego_y, yaw_rate, jerk, lane_id), traffic-related variables (lead_ttc, lead_thw, lead_rel_speed, rear_rel_speed, lane_density_left, lane_density_right, cutin_risk), and outcome variables (risk_score, comfort_score, violation_flag, energy_consumption). Figure 7 shows the training loss curves for all dynamics functions across the four scenarios.

The results suggest that the learned world dynamics are scenario-adaptive not only in difficulty but also in structural composition: different scenarios activate and learn different subsets of variable-specific dynamics functions. Interaction-heavy variables such as cutin_risk, lane_density_left/right, and rear_rel_speed are prominent in Merge and Intersection, where lane changes and merging behaviors are frequent, but are weakly activated or effectively absent in Highway, where traffic flow is comparatively stable. Conversely, lateral-motion variables (e.g., ego_vy, yaw_rate) become substantially more relevant in Roundabout due to persistent curvature, while contributing marginally in straight-road scenarios. This indicates that the model does not impose a fixed global mechanism set across environments, but instead learns scenario-specific mechanism structures, supporting structural adaptability to heterogeneous traffic contexts.

Beyond these structural differences, the loss curves exhibit consistent convergence patterns. Most variables converge within 100–150 epochs. Simple kinematic variables (e.g., ego_x, ego_y, lead_thw) converge within 50 epochs, whereas interaction-intensive outcome variables (e.g., risk_score, violation_flag) require longer training. Highway achieves the lowest final loss due to simpler lane-following dynamics. Roundabout exhibits higher loss for lateral variables because of curved trajectories, while Intersection shows higher variance in violation_flag due to diverse right-of-way interactions. Safety-related variables (e.g., lead_ttc, cutin_risk) converge rapidly in early training when relevant interactions are present, indicating strong dependency signals. In terms of final loss magnitude, continuous variables (e.g., ego_speed, ego_acceleration) achieve losses below 0.5, whereas discrete or binary variables (e.g., violation_flag, lane_id) stabilize at higher loss due to their classification nature.

C.2 Trajectory Accuracy

We evaluate trajectory accuracy using Average Displacement Error (ADE), Final Displacement Error (FDE), and cumulative episode reward (Reward) across four driving scenarios: Highway, Merge, Roundabout, and Intersection. ADE and FDE measure the mean and final Euclidean distance between predicted and executed trajectories, respectively, while Reward reflects overall driving efficiency and safety. All methods are evaluated under identical environment settings with the same observation space, action space, and rollout horizon.

Table 6 reports the mean performance over all evaluation episodes. REINS consistently achieves the best performance across all scenarios in terms of both trajectory accuracy and cumulative reward. In Highway, REINS reduces ADE and FDE to 15.9 and 20.5, respectively, outperforming the strongest baseline (SymAgent) by 12.2% in ADE and 16.3% in FDE, while also achieving the highest reward. Similar improvements are observed in Merge and Roundabout, where REINS yields substantial gains in both short-horizon and long-horizon prediction accuracy, indicating more stable multi-step trajectory generation.

The performance gap becomes more pronounced in complex interaction scenarios. In Intersection, REINS achieves an ADE of 5.6 and FDE of 9.7, representing relative reductions of 30.0% and 13.4% compared to SymAgent, and 41.7% (ADE) and 28.7% (FDE) compared to MPC. This suggests that integrating rule-guided action selection with world-model-based forward rollout is particularly effective when decision-making requires anticipating multi-agent interactions and right-of-way constraints.

Across all scenarios, higher trajectory accuracy strongly correlates with higher episode reward, confirming that more accurate future state prediction leads to safer and more efficient planning. Methods relying primarily on language-based reasoning (LLaDA) exhibit the largest errors, especially in high-speed or curved-road settings, highlighting the limitations of planning without explicit dynamics modeling. MPC improves performance by incorporating learned motion predictors, while SymAgent further benefits from symbolic constraints. REINS combines symbolic rule guidance with learned world dynamics, enabling both structured action filtering and predictive verification, which explains its consistent superiority across heterogeneous traffic scenarios.

Table 6: Trajectory accuracy comparison (mean values).
  • Hig.
    Metric
    ADE\downarrow
    LLaDA
    26.5
    MPC
    20.1
    SymAgent
    18.1
    REINS
    15.9
  • FDE\downarrow
    Metric
    29.5
    LLaDA
    25.1
    MPC
    24.5
    SymAgent
    20.5
  • Reward\uparrow
    Metric
    14.7
    LLaDA
    21.6
    MPC
    23.1
    SymAgent
    26.3
  • Mer.
    Metric
    ADE\downarrow
    LLaDA
    17.6
    MPC
    13.3
    SymAgent
    12.7
    REINS
    9.9
  • FDE\downarrow
    Metric
    21.8
    LLaDA
    20.0
    MPC
    18.5
    SymAgent
    15.2
  • Reward\uparrow
    Metric
    25.2
    LLaDA
    50.7
    MPC
    54.5
    SymAgent
    58.4
  • Rou.
    Metric
    ADE\downarrow
    LLaDA
    19.7
    MPC
    16.5
    SymAgent
    14.3
    REINS
    10.1
  • FDE\downarrow
    Metric
    23.2
    LLaDA
    21.7
    MPC
    19.4
    SymAgent
    14.9
  • Reward\uparrow
    Metric
    12.3
    LLaDA
    22.9
    MPC
    23.6
    SymAgent
    27.8
  • Int.
    Metric
    ADE\downarrow
    LLaDA
    21.6
    MPC
    9.6
    SymAgent
    8.0
    REINS
    5.6
  • FDE\downarrow
    Metric
    25.4
    LLaDA
    13.6
    MPC
    11.2
    SymAgent
    9.7
  • Reward\uparrow
    Metric
    35.3
    LLaDA
    54.2
    MPC
    56.8
    SymAgent
    60.5
Table 7: Sensitivity to temporal lag length L (default: 6).
  • Sim.
    Scen.
    Hig.
    Metric
    Compl.
    L=2
    0.9934
    L=4
    0.9948
    L=6
    0.9956
    L=8
    0.9952
    L=10
    0.9947
  • RE
    Scen.
    -0.42
    Metric
    0.31
    L=2
    0.52
    L=4
    0.38
    L=6
    0.15
  • CR (%)
    Scen.
    9.34
    Metric
    6.89
    L=2
    5.67
    L=4
    6.72
    L=6
    7.98
  • PE (ms)
    Scen.
    2.21
    Metric
    2.35
    L=2
    2.50
    L=4
    2.68
    L=6
    2.89
  • Rou.
    Scen.
    Compl.
    Metric
    0.9898
    L=2
    0.9915
    L=4
    0.9925
    L=6
    0.9918
    L=8
    0.9908
  • RE
    Scen.
    -1.23
    Metric
    -0.78
    L=2
    -0.54
    L=4
    -0.72
    L=6
    -0.95
  • CR (%)
    Scen.
    14.12
    Metric
    10.78
    L=2
    9.01
    L=4
    10.34
    L=6
    11.89
  • PE (ms)
    Scen.
    3.18
    Metric
    3.41
    L=2
    3.62
    L=4
    3.89
    L=6
    4.21
  • Real
    Scen.
    highD
    Metric
    Compl.
    L=2
    0.9845
    L=4
    0.9858
    L=6
    0.9867
    L=8
    0.9861
    L=10
    0.9852
  • RE
    Scen.
    -0.35
    Metric
    0.18
    L=2
    0.38
    L=4
    0.25
    L=6
    0.08
  • CR (%)
    Scen.
    10.12
    Metric
    7.34
    L=2
    6.12
    L=4
    7.12
    L=6
    8.56
  • PE (ms)
    Scen.
    2.38
    Metric
    2.52
    L=2
    2.62
    L=4
    2.87
    L=6
    3.12
  • rounD
    Scen.
    Compl.
    Metric
    0.9823
    L=2
    0.9842
    L=4
    0.9856
    L=6
    0.9848
    L=8
    0.9834
  • RE
    Scen.
    -1.12
    Metric
    -0.65
    L=2
    -0.41
    L=4
    -0.58
    L=6
    -0.82
  • CR (%)
    Scen.
    15.23
    Metric
    11.34
    L=2
    9.45
    L=4
    10.78
    L=6
    12.45
  • PE (ms)
    Scen.
    3.52
    Metric
    3.76
    L=2
    3.89
    L=4
    4.25
    L=6
    4.63
Table 8: Post-deployment distribution of rules by template type across driving scenarios (after 1000-episode self-evolution per scenario).
  • IF-THEN
    Simulation Mer.
    42
    Simulation Rou.
    48
    Simulation Int.
    50
    Simulation highD
    55
    Real-world rounD
    38
    Real-world
    43
    Total
    276
  • AND-THEN
    Simulation Mer.
    38
    Simulation Rou.
    45
    Simulation Int.
    47
    Simulation highD
    52
    Real-world rounD
    32
    Real-world
    37
    Total
    251
  • THRESHOLD
    Simulation Mer.
    32
    Simulation Rou.
    35
    Simulation Int.
    36
    Simulation highD
    40
    Real-world rounD
    30
    Real-world
    32
    Total
    205
  • PRIORITY
    Simulation Mer.
    12
    Simulation Rou.
    20
    Simulation Int.
    22
    Simulation highD
    28
    Real-world rounD
    15
    Real-world
    21
    Total
    118
  • MULTI-ACTION
    Simulation Mer.
    10
    Simulation Rou.
    13
    Simulation Int.
    14
    Simulation highD
    17
    Real-world rounD
    11
    Real-world
    12
    Total
    77
  • WEIGHTED-ACTION
    Simulation Mer.
    6
    Simulation Rou.
    8
    Simulation Int.
    9
    Simulation highD
    11
    Real-world rounD
    7
    Real-world
    10
    Total
    51
  • TEMPORAL-CHAIN
    Simulation Mer.
    5
    Simulation Rou.
    6
    Simulation Int.
    7
    Simulation highD
    7
    Real-world rounD
    5
    Real-world
    15
    Total
    45
  • Total
    Simulation Mer.
    145
    Simulation Rou.
    175
    Simulation Int.
    185
    Simulation highD
    210
    Real-world rounD
    138
    Real-world
    170
    Total
    1,023
Figure 8: Graph structure of 200 randomly sampled rules.

C.3 Sensitivity to Retrieval Count k and Planning Horizon H

We analyze sensitivity to two runtime hyperparameters: rule retrieval count k (the maximum number of rules returned per scene by the Cypher query) and planning horizon H (the rollout depth used by trajectory verification). Both are evaluated on simulated (Highway, Roundabout) and real-world (highD, rounD) scenarios.

Rule Retrieval Count k. Table 9(a) reports results for varying k. Small values (k\!\leq\!3) miss critical rules, increasing CR by 3.5–4.7 points; large values (k\!\geq\!15) introduce redundancy, raising PE by 60–71% at k{=}20 without safety gains. The optimal k{=}10 generalizes across domains, with real-world and roundabout scenarios showing higher sensitivity than structured highway settings.

Planning Horizon H. Table 9(b) reports results for varying H. Short horizons (H\!\leq\!3) cause myopic decisions with 2.9–5.1 point CR increase; long horizons raise PE by 35–44% at H{=}7 and roughly double it at H{=}10, with marginal safety benefits. The optimal H{=}5 balances safety and efficiency, though complex scenarios (Roundabout, rounD) require longer horizons to anticipate multi-agent interactions.

Table 9: Sensitivity to retrieval count k (left) and planning horizon H (right).
  • Sim.
    Scen.
    Hig.
    Metric
    Compl.
    k=3
    0.9712
    k=5
    0.9856
    k=10
    0.9956
    k=15
    0.9948
    k=20
    0.9951
  • RE
    Scen.
    0.18
    Metric
    0.41
    k=3
    0.52
    k=5
    0.35
    k=10
    0.21
  • CR (%)
    Scen.
    9.21
    Metric
    7.08
    k=3
    5.67
    k=5
    6.02
    k=10
    6.48
  • PE (ms)
    Scen.
    1.82
    Metric
    2.13
    k=3
    2.50
    k=5
    3.21
    k=10
    4.15
  • Rou.
    Scen.
    Compl.
    Metric
    0.9589
    k=3
    0.9778
    k=5
    0.9925
    k=10
    0.9912
    k=15
    0.9908
  • RE
    Scen.
    -1.12
    Metric
    -0.78
    k=3
    -0.54
    k=5
    -0.72
    k=10
    -0.89
  • CR (%)
    Scen.
    13.34
    Metric
    10.45
    k=3
    9.01
    k=5
    9.62
    k=10
    10.28
  • PE (ms)
    Scen.
    2.67
    Metric
    3.12
    k=3
    3.62
    k=5
    4.56
    k=10
    5.78
  • Real
    Scen.
    highD
    Metric
    Compl.
    k=3
    0.9689
    k=5
    0.9798
    k=10
    0.9867
    k=15
    0.9856
    k=20
    0.9852
  • RE
    Scen.
    0.05
    Metric
    0.25
    k=3
    0.38
    k=5
    0.22
    k=10
    0.09
  • CR (%)
    Scen.
    10.01
    Metric
    7.63
    k=3
    6.12
    k=5
    6.58
    k=10
    7.08
  • PE (ms)
    Scen.
    2.05
    Metric
    2.38
    k=3
    2.62
    k=5
    3.52
    k=10
    4.48
  • rounD
    Scen.
    Compl.
    Metric
    0.9534
    k=3
    0.9712
    k=5
    0.9856
    k=10
    0.9842
    k=15
    0.9836
  • RE
    Scen.
    -1.02
    Metric
    -0.65
    k=3
    -0.41
    k=5
    -0.58
    k=10
    -0.76
  • CR (%)
    Scen.
    14.12
    Metric
    11.08
    k=3
    9.45
    k=5
    10.02
    k=10
    10.75
  • PE (ms)
    Scen.
    2.98
    Metric
    3.48
    k=3
    3.89
    k=5
    5.02
    k=10
    6.28

C.4 Sensitivity to Temporal Lag Length

The temporal lag length L determines how many historical timesteps the world dynamics model uses when predicting future states. Table 7 reports results on both simulated and real-world scenarios.

When using small lag lengths (L\leq 2), the model fails to capture cumulative temporal patterns such as sustained tailgating or gradual lane drift, leading to substantially higher collision rates. On the simulated Highway scenario, the collision rate increases from 5.67% at L=6 to 9.34%, corresponding to a 65% relative increase. A similar degradation is observed on the real-world highD dataset, where the collision rate rises from 6.12% to 10.12%. These results indicate that short-term observations are insufficient to infer latent interaction states, such as risk accumulation and driver intent, which are critical for safe planning. In contrast, large lag lengths (L\geq 10) introduce excessive historical noise and dilute recent dependency signals, reducing the effective signal-to-noise ratio for short-horizon prediction. Consequently, collision rates increase by approximately 40% on simulated scenarios compared to the optimal setting. This suggests that overly long histories may impair the model’s ability to focus on immediately relevant dynamics, particularly in rapidly evolving traffic situations.

Overall, L=6 achieves the best and most consistent performance across both simulated and real-world domains, corresponding to approximately 1.2 seconds of historical context at a sampling rate of 5 Hz. This time window appears sufficient to capture short-term interaction dynamics while avoiding the accumulation of outdated or irrelevant information, thereby supporting stable multi-step rollout and reliable safety verification in downstream planning.

C.5 Self-Evolution Across Scenarios

This appendix reports self-evolution dynamics on the remaining simulated scenarios (Merge, Roundabout, Intersection) and the real-world datasets (highD, rounD), complementing the Highway results in Section 5.4. For each scenario, we deploy REINS for 1000 episodes from the offline-compiled memory \mathcal{R}_{0} and report |\mathcal{R}|, LLM call rate, Compl., and CR at four deployment checkpoints (ep. 250, 500, 750, 1000), with a Frozen \mathcal{R}_{0} row showing the same 1000-episode window run with acquisition disabled; this row exposes |\mathcal{R}_{0}| and isolates the contribution of online rule writing from any aggregation effect of running more episodes. The per-scenario |\mathcal{R}| at ep. 1000 matches the post-deployment totals in Table 8.

Three patterns emerge across the five extended scenarios, mirroring the Highway dynamics. First, |\mathcal{R}| exhibits saturating growth: approximately 44% of the rule additions (counted from |\mathcal{R}_{0}| in the Frozen row to |\mathcal{R}| at ep. 1000) occur in the first 250 episodes, with diminishing returns thereafter, so the LLM is invoked predominantly for previously unseen scene clusters. Second, the LLM call rate decays monotonically in all scenarios, from 68–79% in the first 250-episode window to 12–19% by ep. 1000 (a 4.2–5.5\times reduction); scene complexity raises the absolute size of \mathcal{R} and the residual call rate (highest on Intersection) but not the shape of the decay. Third, the Frozen \mathcal{R}_{0} control consistently underperforms the evolving memory at ep. 1000 (mean Compl. gap \approx0.017, mean CR gap \approx4.2 points), confirming that the gains attributable to online acquisition are not artifacts of statistical aggregation over a longer evaluation window. Intersection benefits most (Compl. +0.0218, CR -4.87 points from Frozen to ep. 1000), reflecting larger room for online acquisition where the offline \mathcal{R}_{0} is most incomplete relative to right-of-way reasoning; the other four scenarios cluster in a tight range (Compl. +0.0154 to +0.0164, CR -3.79 to -4.40 points). highD mirrors Highway and rounD mirrors Roundabout in both |\mathcal{R}| growth shape and Compl./CR convergence, indicating that the harness operates on factored variable signatures rather than scenario-specific surface features. Cross-domain transfer of the compiled memory itself is studied separately in Appendix D.7.

Table 10: Self-evolution dynamics across the remaining evaluation scenarios. Same metrics and checkpoints as Table 3; the Frozen row runs the same 1000-episode window with acquisition disabled and exposes |\mathcal{R}_{0}|.
  • Merge
    Checkpoint
    ep. 250
    |\mathcal{R}|
    136
    LLM Call (%)
    71.36
    Compl. (\uparrow)
    0.9858
    CR (%) (\downarrow)
    8.20
  • ep. 500
    Checkpoint
    153
    |\mathcal{R}|
    49.12
    LLM Call (%)
    0.9893
    Compl. (\uparrow)
    7.35
  • ep. 750
    Checkpoint
    167
    |\mathcal{R}|
    26.48
    LLM Call (%)
    0.9912
    Compl. (\uparrow)
    7.05
  • ep. 1000 (final)
    Checkpoint
    175
    |\mathcal{R}|
    13.92
    LLM Call (%)
    0.9924
    Compl. (\uparrow)
    6.86
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    Checkpoint
    105
    |\mathcal{R}|
    —
    LLM Call (%)
    0.9770
    Compl. (\uparrow)
    10.65
  • Roundabout
    Checkpoint
    ep. 250
    |\mathcal{R}|
    144
    LLM Call (%)
    73.84
    Compl. (\uparrow)
    0.9852
    CR (%) (\downarrow)
    10.55
  • ep. 500
    Checkpoint
    162
    |\mathcal{R}|
    52.20
    LLM Call (%)
    0.9888
    Compl. (\uparrow)
    9.85
  • ep. 750
    Checkpoint
    176
    |\mathcal{R}|
    28.36
    LLM Call (%)
    0.9910
    Compl. (\uparrow)
    9.40
  • ep. 1000 (final)
    Checkpoint
    185
    |\mathcal{R}|
    15.24
    LLM Call (%)
    0.9925
    Compl. (\uparrow)
    9.01
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    Checkpoint
    112
    |\mathcal{R}|
    —
    LLM Call (%)
    0.9770
    Compl. (\uparrow)
    13.40
  • Intersection
    Checkpoint
    ep. 250
    |\mathcal{R}|
    164
    LLM Call (%)
    78.52
    Compl. (\uparrow)
    0.9742
    CR (%) (\downarrow)
    10.85
  • ep. 500
    Checkpoint
    184
    |\mathcal{R}|
    57.64
    LLM Call (%)
    0.9789
    Compl. (\uparrow)
    9.95
  • ep. 750
    Checkpoint
    200
    |\mathcal{R}|
    33.08
    LLM Call (%)
    0.9817
    Compl. (\uparrow)
    9.45
  • ep. 1000 (final)
    Checkpoint
    210
    |\mathcal{R}|
    18.76
    LLM Call (%)
    0.9838
    Compl. (\uparrow)
    9.08
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    Checkpoint
    127
    |\mathcal{R}|
    —
    LLM Call (%)
    0.9620
    Compl. (\uparrow)
    13.95
  • highD
    Checkpoint
    ep. 250
    |\mathcal{R}|
    107
    LLM Call (%)
    68.24
    Compl. (\uparrow)
    0.9803
    CR (%) (\downarrow)
    7.45
  • ep. 500
    Checkpoint
    121
    |\mathcal{R}|
    47.56
    LLM Call (%)
    0.9838
    Compl. (\uparrow)
    6.65
  • ep. 750
    Checkpoint
    131
    |\mathcal{R}|
    24.12
    LLM Call (%)
    0.9856
    Compl. (\uparrow)
    6.32
  • ep. 1000 (final)
    Checkpoint
    138
    |\mathcal{R}|
    12.36
    LLM Call (%)
    0.9867
    Compl. (\uparrow)
    6.12
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    Checkpoint
    84
    |\mathcal{R}|
    —
    LLM Call (%)
    0.9712
    Compl. (\uparrow)
    9.95
  • rounD
    Checkpoint
    ep. 250
    |\mathcal{R}|
    132
    LLM Call (%)
    74.68
    Compl. (\uparrow)
    0.9785
    CR (%) (\downarrow)
    10.95
  • ep. 500
    Checkpoint
    149
    |\mathcal{R}|
    53.40
    LLM Call (%)
    0.9821
    Compl. (\uparrow)
    10.20
  • ep. 750
    Checkpoint
    162
    |\mathcal{R}|
    29.72
    LLM Call (%)
    0.9842
    Compl. (\uparrow)
    9.78
  • ep. 1000 (final)
    Checkpoint
    170
    |\mathcal{R}|
    16.08
    LLM Call (%)
    0.9856
    Compl. (\uparrow)
    9.45
  • Frozen \mathcal{R}_{0} (1000-ep eval)
    Checkpoint
    103
    |\mathcal{R}|
    —
    LLM Call (%)
    0.9692
    Compl. (\uparrow)
    13.85

C.6 Case Study

Figure 9 compares trajectories of REINS, Plan-R1, LLaDA, and MPC on two scenarios, with activated rules and actions shown at each timestep. Rule definitions are provided in Appendix C.7.2.

Simulated Highway. REINS activates R03 and R07 at t{=}0 to monitor the lead vehicle and adjacent lanes, triggers R12 at t{=}0.5s when a safe gap appears, executes a lane change at t{=}1.0s, and accelerates via R15 at t{=}1.5s, producing a smooth action sequence (IDLE\!\to\!IDLE\!\to\!RIGHT\!\to\!FASTER). Plan-R1 applies all 15 rules simultaneously, causing conflicting constraints and repeated deceleration (SLOWER\!\times\!3) before a delayed maneuver.

Real-World highD. In the cut-in scenario, REINS detects lateral intrusion at t{=}0 via R05, performs preemptive deceleration at t{=}0.5s using R07, and maintains safe distance until t{=}1.5s (IDLE\!\to\!SLOWER\!\to\!SLOWER\!\to\!IDLE). Plan-R1 responds later with emergency braking at t{=}1.0s due to uniform rule execution.

Figure 9: Trajectory comparison across four methods on (a) simulated highway and (b) real-world highD scenarios.

C.7 Compiled Rule Database

Table 11: Representative rules from the compiled rule database.
  • R01
    Guard Condition \mathcal{P}(r)
    \text{TTC}<2.0\text{s}
    Action a_{r}
    emergency brake
    Template
    THRESHOLD
  • R02
    Guard Condition \mathcal{P}(r)
    v_{ego}>v_{limit}+5\text{km/h}
    Action a_{r}
    DEC to limit
    Template
    THRESHOLD
  • R03
    Guard Condition \mathcal{P}(r)
    \text{THW}<1.8\text{s}\lor\text{DHW}<25\text{m}
    Action a_{r}
    DEC / maintain gap
    Template
    IF-THEN
  • R04
    Guard Condition \mathcal{P}(r)
    \text{TTC}<3.5\text{s}\land\text{DHW}<40\text{m}
    Action a_{r}
    DEC (moderate)
    Template
    AND-THEN
  • R05
    Guard Condition \mathcal{P}(r)
    v^{lat}_{adj}>0.3\text{m/s}\land\Delta y<2\text{m}
    Action a_{r}
    DEC (preemptive)
    Template
    AND-THEN
  • R06
    Guard Condition \mathcal{P}(r)
    \text{visibility}<100\text{m}
    Action a_{r}
    reduce speed 20%
    Template
    THRESHOLD
  • R07
    Guard Condition \mathcal{P}(r)
    \text{TTC}_{adj}<4\text{s}\lor\text{cut-in}
    Action a_{r}
    increase headway
    Template
    IF-THEN
  • R08
    Guard Condition \mathcal{P}(r)
    \text{lane\_end}<200\text{m}
    Action a_{r}
    prepare merge
    Template
    TEMPORAL-CHAIN
  • R09
    Guard Condition \mathcal{P}(r)
    \text{at\_yield}\land\text{traffic\_present}
    Action a_{r}
    yield / stop
    Template
    PRIORITY
  • R10
    Guard Condition \mathcal{P}(r)
    \text{pedestrian}<30\text{m}
    Action a_{r}
    DEC / prepare stop
    Template
    MULTI-ACTION
  • R11
    Guard Condition \mathcal{P}(r)
    v_{lead}<v_{ego}-10\text{km/h}\land\text{gap}_{adj}>35\text{m}
    Action a_{r}
    consider lane change
    Template
    AND-THEN
  • R12
    Guard Condition \mathcal{P}(r)
    \text{gap}_{target}>30\text{m}\land\text{TTC}_{target}>5\text{s}
    Action a_{r}
    execute lane change
    Template
    AND-THEN
  • R13
    Guard Condition \mathcal{P}(r)
    \text{in\_lane\_change}\land\text{TTC}_{new}<3\text{s}
    Action a_{r}
    abort lane change
    Template
    AND-THEN
  • R14
    Guard Condition \mathcal{P}(r)
    \text{merge\_complete}\land\text{DHW}<20\text{m}
    Action a_{r}
    DEC post-merge
    Template
    AND-THEN
  • R15
    Guard Condition \mathcal{P}(r)
    \text{post\_merge}\land v_{ego}<v_{flow}-5\text{km/h}
    Action a_{r}
    ACC to flow
    Template
    AND-THEN
C.7.1 Rule Database Statistics

Table 8 shows the distribution of variables by macro-group and rules by template type in REINS’s Neo4j graph database. The post-deployment database contains 1,023 rules covering six driving scenarios (four simulated: Highway, Merge, Roundabout, Intersection; two real-world: highD, rounD). IF-THEN and AND-THEN templates dominate due to the prevalence of conditional and multi-condition reasoning in driving. Intersection scenarios contain the most rules due to complex right-of-way interactions, while Highway scenarios require fewer given simpler lane-following dynamics. This scale is comparable to industrial rule-based systems while remaining tractable for O(\log n) graph database retrieval (<1 ms per query).

Figure 8 visualizes the graph structure of 200 randomly sampled rules from the database. Gray nodes are variables, blue nodes are rules, and pink nodes are the five discrete actions. Edge colors match source node colors: gray edges represent Variable\toRule, while blue edges represent Rule\toAction.

Several structural patterns emerge from this visualization: (1) Variable sharing: A small set of variables (e.g., TTC, THW, speed) triggers a large number of rules, indicating that safety-critical variables serve as common preconditions across diverse driving scenarios. (2) Action concentration: The majority of rules converge to SLOWER and IDLE, which exhibit the highest in-degree among all five actions. This reflects the safety-first design principle where conservative actions are recommended under uncertain or risky conditions. In contrast, LANE_LEFT, LANE_RIGHT, and FASTER receive fewer rule connections, as these actions require more stringent preconditions. (3) Rule diversity: Despite action concentration, rules maintain diverse trigger conditions from different variables, enabling fine-grained context-aware activation rather than uniform rule application. These patterns support REINS’s retrieval strategy: variable-indexed queries efficiently activate relevant rule subsets, while action aggregation via noisy-OR naturally prioritizes safety-critical recommendations.

C.7.2 Representative Rules

Table 11 lists 15 representative rules from REINS’s compiled rule database. The full post-deployment Neo4j database contains 1,023 rules across six driving scenarios, from which context-relevant subsets are retrieved at runtime via parameterized Cypher queries. These rules are automatically compiled from LLM-generated linguistic descriptions and calibrated using the threshold calibration mechanism described in Section 4.1.2. For fair comparison, Plan-R1 applies the same 15 representative rules uniformly at each step, while REINS selectively activates 2–3 context-relevant rules via the retrieval mechanism.

The 15 rules cover six of the seven template types defined in Definition 3.5: (1) THRESHOLD rules (R01, R02, R06) enforce numeric boundaries on physical variables such as TTC and speed; (2) IF-THEN rules (R03, R07) implement basic conditional logic with disjunctive guards; (3) AND-THEN rules (R04, R05, R11–R15) require multiple conditions to be satisfied simultaneously; (4) PRIORITY rules (R09) establish decision hierarchies for right-of-way scenarios; (5) MULTI-ACTION rules (R10) trigger compound actions under critical conditions; (6) TEMPORAL-CHAIN rules (R08) encode time-sensitive constraints for upcoming events. The complete definitions of all seven rule template types are provided in Appendix A.2, and the conflict resolution mechanism is described in Appendix A.3.

Appendix D Fairness Protocol, Robustness, Transfer, and Scalability

This appendix collects the studies that scope the harness claim and stress the main results: the domain-specific versus domain-agnostic components of the harness (D.1), the baseline fairness protocol with a matched re-run and a common-reference compliance audit (D.2), the runtime profile of the PDDL baseline (D.3), robustness to the LLM backbone and to prompt variation (D.4), what rollout verification filters (D.5), reactive replay and observation noise (D.6), cross-domain memory transfer (D.7), the latency of the online-miss cycle and its scheduling (D.8), and retrieval at deployment scale (D.9). Unless stated otherwise, all studies use the Highway scenario, five seeds, and the protocol of Section 5.1.

D.1 Scope of the Harness Claim

The three couplings are presented as a harness pattern, while the implementation is specialized to driving. Table 12 classifies each component of REINS and sketches the instantiation for a different trajectory-planning domain, robot-arm manipulation, whose action space is continuous and high-dimensional and whose safety notions (contact force, grasp stability) differ from driving. Two components are domain schemas that any instantiation must author; the remaining five transfer unchanged. The safety notion enters only through the variable schema and the terms of the objective J: calibrated predicates over contact-force variables are structurally identical to TTC guards, and the calibration procedure and the verification protocol do not change. The harness contribution lives in the five unchanged components; the two redesigned ones constitute the domain description that any planner for that domain must author anyway.

Table 12: Domain-specific and domain-agnostic components of the harness.
  • Variable space and groups
    Driving (this paper)
    44 variables in Env, Traffic, Ego, Action, Outcome
    Manipulation (sketch)
    joint angles and torques, end-effector pose, contact forces, object poses
    Transfer
    redesign
  • Action space
    Driving (this paper)
    5 driving meta-actions
    Manipulation (sketch)
    skill primitives (reach, grasp, lift, place, retreat)
    Transfer
    redesign
  • Predicate grammar and thresholds
    Driving (this paper)
    TTC and THW guards
    Manipulation (sketch)
    force-margin, slip, and grasp-stability guards
    Transfer
    grammar unchanged, thresholds recalibrated
  • Dynamics learning
    Driving (this paper)
    LLM prior, group-weighted ridge, per-variable Transformer
    Manipulation (sketch)
    same, retrained on domain data
    Transfer
    unchanged
  • Verification
    Driving (this paper)
    collision and violation terms in J
    Manipulation (sketch)
    contact-force and stability terms in J
    Transfer
    protocol unchanged
  • Indexed memory and retrieval
    Driving (this paper)
    variable-keyed graph schema
    Manipulation (sketch)
    same
    Transfer
    unchanged
  • Acquisition loop
    Driving (this paper)
    miss detection, proposal, verification, write-back
    Manipulation (sketch)
    same
    Transfer
    unchanged

D.2 Baseline Fairness Protocol

Shared and unshared conditions. PDDL, DriReg, and LLaDA were conceived for symbolic planning domains, regulatory text, and driver handbooks respectively, none with a factored driving state, so each was re-implemented faithfully to its original design for closed-loop highway-env. Table 13 lists what is shared with REINS and what each method keeps by design. The shared conditions fix the observation space, action space, episodes, LLM backbone, and decoding; the unshared ones leave each method its own knowledge representation and thresholds, which leaves the rule-generation procedure as a confound. Three instruments below isolate the harness regardless.

Table 13: Fairness conditions for the rule-based baselines as published. “Own vocabulary” and “uncalibrated” follow each method’s original design.
  • Observation space, action space, episodes
    PDDL
    shared
    DriReg
    shared
    LLaDA
    shared
  • GPT-4o backbone (2024-08-06), temperature 0 for rule generation
    PDDL
    shared
    DriReg
    shared
    LLaDA
    shared
  • 44-variable vocabulary (Appendix A.1) in rule-generation prompts
    PDDL
    own vocabulary
    DriReg
    own vocabulary
    LLaDA
    n/a (linguistic rules)
  • Threshold calibration
    PDDL
    uncalibrated
    DriReg
    uncalibrated
    LLaDA
    n/a (no thresholds)

Matched re-run. We regenerated the PDDL and DriReg rules over the same 44-variable vocabulary, passed their thresholds through REINS’s calibration pipeline, and re-evaluated (Table 14). Input normalization improves both baselines by 3–5 CR points and explains a minority of the gap; the majority survives it.

Table 14: Matched re-run: PDDL and DriReg rules regenerated over REINS’s variable vocabulary with calibrated thresholds.
  • Highway
    PDDL
    25.93
    PDDL matched
    21.37
    DriReg
    21.76
    DriReg matched
    18.92
    REINS
    5.67
  • Intersection
    PDDL
    32.12
    PDDL matched
    27.64
    DriReg
    29.89
    DriReg matched
    25.81
    REINS
    9.08

Bracketing with the ablations. Two ablations from Table 2 bracket the remaining gap with the paper’s own numbers. Hand-crafted rules inside the full harness still reach CR 11.23% on Highway, better than every matched no-harness variant in Table 14 and close to the best baseline Plan-R1 at 12.83%. Conversely, applying REINS’s rules uniformly, the way the baselines use rules, raises CR by 22–43% and PE by 34–58%. Worse inputs with the harness keep most of the gain; the same inputs without the harness lose it.

Common-reference compliance. Compliance in Table 1 is measured against each method’s own rule set. Table 15 re-scores every method against REINS’s compiled rule set as a common reference. Compliance is a property of the executed trajectory rather than of the planner: at each step, the reference rules whose guards hold in the logged state become active, and a violation is counted when the logged behavior fails an active rule (Appendix B.2). Each method therefore plans exactly as before and its trajectories are audited afterward, which is also how the four methods without native rule sets receive values. Because the reference set equals REINS’s planning set, REINS’s own value is unchanged by construction; the informative content is that the baseline ordering and the gaps persist.

Table 15: Compliance against each method’s own rule set and against REINS’s compiled rule set as a common reference.
  • MPC
    Own rules Intersection
    n/a
    Own rules Highway
    n/a
    Common reference (REINS set) Intersection
    0.8712
    Common reference (REINS set)
    0.8423
  • MCTS
    Own rules Intersection
    n/a
    Own rules Highway
    n/a
    Common reference (REINS set) Intersection
    0.8831
    Common reference (REINS set)
    0.8517
  • DriveSpeak
    Own rules Intersection
    n/a
    Own rules Highway
    n/a
    Common reference (REINS set) Intersection
    0.8246
    Common reference (REINS set)
    0.7912
  • LLaDA
    Own rules Intersection
    n/a
    Own rules Highway
    n/a
    Common reference (REINS set) Intersection
    0.8412
    Common reference (REINS set)
    0.8104
  • PDDL
    Own rules Intersection
    0.9123
    Own rules Highway
    0.8789
    Common reference (REINS set) Intersection
    0.8867
    Common reference (REINS set)
    0.8621
  • DriReg
    Own rules Intersection
    0.9452
    Own rules Highway
    0.9153
    Common reference (REINS set) Intersection
    0.9083
    Common reference (REINS set)
    0.8874
  • SymAgent
    Own rules Intersection
    0.9561
    Own rules Highway
    0.9274
    Common reference (REINS set) Intersection
    0.9312
    Common reference (REINS set)
    0.9067
  • Plan-R1
    Own rules Intersection
    0.9717
    Own rules Highway
    0.9553
    Common reference (REINS set) Intersection
    0.9498
    Common reference (REINS set)
    0.9231
  • REINS
    Own rules Intersection
    0.9956
    Own rules Highway
    0.9838
    Common reference (REINS set) Intersection
    0.9956
    Common reference (REINS set)
    0.9838

D.3 Runtime Profile of the PDDL Baseline

The PDDL baseline follows the pipeline in which the LLM writes the domain’s preconditions and effects offline and a classical solver executes at runtime [Guan et al., 2023, Liu et al., 2023]. The solver is Pyperplan [Alkhazraji et al., 2020], a Python STRIPS planner invoked in process at each decision step; there is no per-step LLM call. Its 4.95 ms per step on Highway (Table 1) decomposes into grounding 3.71 ms, search 0.94 ms, and plan extraction 0.30 ms. The solver re-instantiates every precondition against the current state at every step with no indexing, so grounding takes roughly three quarters of the budget. REINS avoids exactly this cost: variable-indexed retrieval touches 2–3 rules in under 1 ms, followed by a fixed-size rollout at H{=}5. This is the architectural payoff of consolidation with indexing.

D.4 Robustness to the LLM Backbone and to Prompt Variation

The LLM produces the dependency priors, the rule structures, and the Cypher queries, so we regenerate the whole offline pipeline with two further backbones and with three paraphrases of the dependency and rule-extraction prompts (Table 16). Rule structure varies mildly across backbones and paraphrases, while the calibrated thresholds and the final behavior barely move. The LLM picks variables, templates, and actions; calibration re-anchors every numeric threshold to data, so backbone differences wash out at the threshold level. Malformed or unsafe proposals never reach memory, because rollout verification rejects them regardless of which backbone or prompt produced them.

Table 16: Robustness of the compiled rules and of closed-loop behavior to the LLM backbone and to prompt paraphrases.
  • GPT-4o (paper)
    Rule overlap with GPT-4o
    n/a
    Threshold shift after calibration
    n/a
    Compl.
    0.9956
    CR (%)
    5.67
  • Claude Sonnet 4.5
    Rule overlap with GPT-4o
    87.3%
    Threshold shift after calibration
    3.2%
    Compl.
    0.9948
    CR (%)
    5.89
  • Qwen2.5-72B-Instruct
    Rule overlap with GPT-4o
    81.6%
    Threshold shift after calibration
    3.8%
    Compl.
    0.9931
    CR (%)
    6.24
  • Three prompt paraphrases, GPT-4o
    Rule overlap with GPT-4o
    91.2–94.6%
    Threshold shift after calibration
    —
    Compl.
    —
    CR (%)
    5.58–5.91

D.5 What Rollout Verification Filters

On the 1000-episode Highway deployment of Section 5.4, applying the windowed call rates of Table 3 to the 100,000 deployment steps yields roughly 39,000 logged proposals (an arithmetic consequence of the call rates, not an independent count). Of these, 2.1% failed schema validation, 18.0% were rejected by rollout verification, and 79.9% were accepted. Acceptances overwhelmingly hash-collide with rules already in memory (Eq. 8) and only update confidences; they deduplicate to the 57 unique rules that grow the memory from 88 to 145. A manual audit of the 57 unique rules judged 54 consistent with domain guidelines; the three flagged rules were over-specific and never activated again. Episodes in which at least one acquired rule fired show no elevated collision rate against episodes in which none fired (5.4% against 5.8%).

Three properties of the design bound what a plausible but incorrect proposal can do. Verification errs toward rejection: a rule is accepted only if every calibrated predicate holds along the predicted horizon (Eq. 7), so dynamics error costs availability rather than safety in the common case. Accepted rules never bypass the runtime loop: every executed action is re-verified by rollout at decision time (Section 4.2.1), so a wrongly accepted rule must also survive the per-step check before it can affect control. Finally, the residual dependence on dynamics fidelity is stated in Section 6.

D.6 Reactive Replay and Observation Noise

Reactive replay. In the four simulated scenarios the surrounding vehicles already react to the ego through IDM car-following with MOBIL lane changes. The real-world rows keep highD and rounD as recorded so that they reflect human behavior rather than a simulator’s. To measure the effect of this choice, a reactive-replay variant on highD switches recorded vehicles within 50 m of the ego to IDM once interaction occurs, following the reactive closed-loop protocol of nuPlan [Caesar et al., 2021]. REINS CR moves from 6.12% to 6.94% while Plan-R1 moves from 12.78% to 15.36%, so the gap to the strongest baseline widens.

Observation noise. We corrupt the observed variables with zero-mean Gaussian noise scaled to each variable’s standard deviation and, separately, drop 5% of frames (Table 17). Calibrated thresholds carry a data-derived margin and every action is vetted by a multi-step rollout rather than by a single reading, so REINS degrades more slowly than the strongest baseline at every level, with Compl. staying at or above 0.987. Full-stack perception errors (occlusion, tracking identity switches, map errors) remain out of scope.

Table 17: Collision rate under \sigma-scaled Gaussian observation noise and under frame drops.
  • REINS
    no noise
    5.67
    2.5% noise
    5.92
    5% noise
    6.51
    10% noise
    8.14
    5% frame drops
    6.88
  • Plan-R1
    no noise
    12.83
    2.5% noise
    13.71
    5% noise
    15.42
    10% noise
    19.87
    5% frame drops
    16.50

D.7 Cross-Domain Memory Transfer

We test how the memory behaves when the offline data are domain-shifted, using the checkpoint protocol of Table 3. Setting A compiles \mathcal{R}_{0} solely from highD and rounD (whose memories total 187 rules before merging and content-hash deduplication) and deploys on highway-env; Setting B compiles it solely from the four simulated scenarios (432 rules before deduplication) and deploys on highD and rounD. Table 18 reports the ep. 250 and ep. 1000 endpoints of each setting, together with a frozen-transfer control on Highway; the native reference rows come from Table 3 and Table 10.

Table 18: Cross-domain memory transfer under the checkpoint protocol of Table 3. The frozen-transfer row disables acquisition after transfer; only its CR was recorded.
  • Setting A: \mathcal{R}_{0} from highD and rounD, deployed on highway-env
  • Highway
    Checkpoint
    ep. 250
    |\mathcal{R}|
    265
    LLM Call (%)
    86.2
    Compl.
    0.9612
    CR (%)
    11.84
    PE (ms)
    2.71
  • ep. 1000
    Checkpoint
    349
    |\mathcal{R}|
    14.9
    LLM Call (%)
    0.9914
    Compl.
    6.21
    CR (%)
    2.54
  • ep. 1000, acquisition frozen
    Checkpoint
    —
    |\mathcal{R}|
    —
    LLM Call (%)
    —
    Compl.
    11.20
    CR (%)
    —
  • native, ep. 1000
    Checkpoint
    145
    |\mathcal{R}|
    12.81
    LLM Call (%)
    0.9956
    Compl.
    5.67
    CR (%)
    2.50
  • Intersection
    Checkpoint
    ep. 250
    |\mathcal{R}|
    287
    LLM Call (%)
    91.3
    Compl.
    0.9487
    CR (%)
    15.62
    PE (ms)
    4.87
  • ep. 1000
    Checkpoint
    391
    |\mathcal{R}|
    17.2
    LLM Call (%)
    0.9782
    Compl.
    10.13
    CR (%)
    4.66
  • native, ep. 1000
    Checkpoint
    210
    |\mathcal{R}|
    12.81
    LLM Call (%)
    0.9838
    Compl.
    9.08
    CR (%)
    4.58
  • Setting B: \mathcal{R}_{0} from the four simulated scenarios, deployed on highD and rounD
  • highD
    Checkpoint
    ep. 250
    |\mathcal{R}|
    471
    LLM Call (%)
    71.4
    Compl.
    0.9702
    CR (%)
    9.87
    PE (ms)
    2.79
  • ep. 1000
    Checkpoint
    508
    |\mathcal{R}|
    13.6
    LLM Call (%)
    0.9838
    Compl.
    6.79
    CR (%)
    2.68
  • native, ep. 1000
    Checkpoint
    138
    |\mathcal{R}|
    12.81
    LLM Call (%)
    0.9867
    Compl.
    6.12
    CR (%)
    2.62
  • rounD
    Checkpoint
    ep. 250
    |\mathcal{R}|
    478
    LLM Call (%)
    79.8
    Compl.
    0.9645
    CR (%)
    14.21
    PE (ms)
    4.12
  • ep. 1000
    Checkpoint
    517
    |\mathcal{R}|
    15.1
    LLM Call (%)
    0.9821
    Compl.
    10.24
    CR (%)
    3.97
  • native, ep. 1000
    Checkpoint
    170
    |\mathcal{R}|
    12.81
    LLM Call (%)
    0.9856
    Compl.
    9.45
    CR (%)
    3.89

A domain-shifted memory starts degraded: at ep. 250 the call rate runs 86.2% on Highway against the native 70.0% of Table 3, and CR runs several points above the native value at the same checkpoint (11.84% against 7.05%). Acquisition recovers most of the gap within 1000 episodes: final CR lands within 0.5–1.1 points of native and Compl. within 0.003–0.006. On Highway, freezing the transferred memory prevents recovery: at ep. 1000 the frozen transfer stays at CR 11.20% against 6.21% with acquisition enabled, so the recovery comes from verification-gated acquisition rather than from the transferred rules themselves, mirroring the native pattern of Table 3, where frozen \mathcal{R}_{0} ends at CR 9.63% against the evolved 5.67%. Sim-to-real shows slightly smaller residual gaps and lower final call rates than real-to-sim; one plausible factor is its larger source memory (432 against 187 rules before deduplication).

The initial call rate of 86.2% also shows that most of the source-domain memory is not functionally reusable zero-shot in a new but still driving context. This is consistent with the safety-oriented design: thresholds are calibrated to the source-domain distribution, so under shift the harness re-invokes and re-verifies rather than reusing rules whose calibration may no longer hold. We therefore do not frame these results as evidence of strong zero-shot generalization; the limitation is stated in Section 6.

D.8 Latency of the Online-Miss Cycle and Its Scheduling

What PE counts. For every method, PE measures the synchronous action-selection computation per step. In the evaluated closed-loop setting, a miss completes proposal, verification, and write-back within the step while simulation time is paused, so the reported PE excludes the acquisition pipeline, namely the LLM call together with the subsequent parsing, calibration, verification, and write-back. Table 19 profiles each stage.

Table 19: Latency of the online-miss cycle on Highway. The fallback row sits on the control path and is not part of the full-cycle latency; the acquisition stages below it sum to the full-cycle row.
  • Prompt assembly and state serialization
    Mean 2.6 ms
    0.9 ms
    p95 3.9 ms
    1.4 ms
    Deployment scheduling control path, within budget
    background
  • LLM rule proposal (GPT-4o API)
    Mean 2.6 ms
    1.58 s
    p95 3.9 ms
    2.94 s
    Deployment scheduling control path, within budget
    background
  • Parsing and schema validation
    Mean 2.6 ms
    2.1 ms
    p95 3.9 ms
    3.0 ms
    Deployment scheduling control path, within budget
    background
  • Threshold calibration on the sliding window
    Mean 2.6 ms
    1.3 ms
    p95 3.9 ms
    1.9 ms
    Deployment scheduling control path, within budget
    background
  • Rollout verification at H{=}5
    Mean 2.6 ms
    1.6 ms
    p95 3.9 ms
    2.2 ms
    Deployment scheduling control path, within budget
    background
  • Neo4j insert and index update
    Mean 2.6 ms
    4.7 ms
    p95 3.9 ms
    6.8 ms
    Deployment scheduling control path, within budget
    background
  • Full cycle, miss to usable rule
    Mean 2.6 ms
    1.59 s
    p95 3.9 ms
    2.96 s
    Deployment scheduling control path, within budget
    background

Deployment scheduling. The cycle takes 1.59 s mean, dominated by the LLM call; the acquisition stages other than the LLM call total about 11 ms. In deployment the cycle moves off the critical path by construction, because the planner has a defined behavior without the acquired rule: the best action over the retrieved rules or, with empty retrieval, the safe action that maximizes minimum lookahead TTC (Eq. 24) together with a human-takeover alert. The current step executes that fallback while the cycle completes in the background, and the acquired rule serves later encounters. At 5 Hz the acquisition window spans about eight control cycles, during which the planner behaves as a verified conservative planner. Figure 10 contrasts the evaluated schedule with the deployment schedule.

Figure 10: Dataflow of the online-miss cycle. Top: in the evaluated closed-loop setting the cycle completes within the step while simulation time is paused, and PE counts only the synchronous control-path computation. Bottom: in deployment the current step executes the verified fallback while the cycle runs in the background (about eight control cycles at 5 Hz), and the acquired rule serves later encounters.

D.9 Retrieval and Aggregation at Deployment Scale

As memory grows, retrieval and multi-rule aggregation must stay within the control window. The stress test runs on Highway and varies only the database size, inflating it with synthetic rules generated as variable and threshold perturbations of compiled rules that preserve the schema and the trigger-degree distribution (Table 20). Retrieval stays sub-millisecond and grows slowly with memory size, from 0.41 ms at the paper’s 1,023 rules to 0.79 ms at one hundred thousand, consistent with indexed lookup rather than linear scanning. Conflict aggregation does not grow with the database: retrieval returns at most k{=}10 rules regardless of memory size, so noisy-OR aggregation (Eq. 5) and the arbitration of Appendix A.3 cost O(k). On the online planning path, the database-size-dependent cost therefore concentrates in retrieval; index maintenance and write costs sit on the acquisition path, off the control loop.

Table 20: Retrieval latency and end-to-end PE on Highway as the rule memory is inflated with schema-preserving synthetic rules.
  • Cypher retrieval (ms)
    1,023 (paper)
    0.41
    10,000
    0.55
    50,000
    0.68
    100,000
    0.79
  • End-to-end PE (ms)
    1,023 (paper)
    2.50
    10,000
    2.64
    50,000
    2.77
    100,000
    2.88