Multi-Agent Causal Reasoning System for Error Pattern Rule Automation in Vehicles

Hugo Math, Julian Lorenz, Stefan Oelsner, Rainer LienhartarXiv 2026

TL;DR

CAREP (Causal Automated Reasoning for Error Patterns) is a novel multi-agent AI system that automates the generation of Boolean diagnostic rules from complex vehicle fault logs. By combining domain-specific language models for causal discovery with Large Language Models (LLMs) for contextual reasoning, it drastically outperforms standalone LLMs while providing transparent, human-interpretable explanations for its diagnostic logic.

What Problem Does This Paper Address?

Modern connected vehicles act as rolling data centers, generating thousands of discrete event logs known as Diagnostic Trouble Codes (DTCs) when subsystems malfunction. To make sense of these codes, automotive manufacturers rely on "Error Patterns" (EPs)—Boolean combinations of DTCs (e.g., DTC1 & DTC2 & !DTC3) that pinpoint specific system faults.

Currently, these diagnostic rules are manually handcrafted by domain experts. As vehicle complexity grows exponentially with electrification and advanced driver-assistance systems, manual rule creation has become an expensive, slow, and error-prone bottleneck.

Automating this task is incredibly difficult due to three main challenges:

  1. High Dimensionality: Real-world datasets contain tens of thousands of unique DTCs, creating a massive search space.
  2. Data Sparsity and Long-Tails: Rare but critical faults occur infrequently, making standard statistical approaches unreliable.
  3. The LLM Token Bottleneck: While LLMs excel at reasoning, feeding them raw, high-dimensional event sequences causes their accuracy to drop exponentially due to context window limitations.
Fig. 1. Illustration of error pattern automation in modern vehicles. (a) A vehicle with an unknown defect generates a sequence of Diagnostic Trouble Codes (DTCs) over time. (b) A domain expert analyzes the DTCs and the metadata associated with the vehicle (model, descriptions, etc.). (c) Then, provide a Boolean rule to identify this error pattern.

Methods

The authors introduce CAREP, a multi-agent framework that splits the problem into statistical causal discovery and natural language reasoning.

The architecture consists of three core components:

  • Causal Discovery Agent: Instead of forcing an LLM to read thousands of raw log lines, CAREP uses two small, domain-specific language models (SLMs) pretrained on vehicle event sequences. It computes Conditional Mutual Information (CMI) to identify potential causal links and uses the Average Causal Effect (ACE) to determine if a code excites or inhibits a fault. Crucially, it applies a label-specific adaptive threshold to prevent noise from overpowering rare, long-tail error patterns.
  • Contextual Information Agent: This agent uses a Retrieval-Augmented Generation (RAG) pipeline powered by Amazon Titan V2 embeddings to fetch text descriptions of DTCs, vehicle metadata, and existing diagnostic rules.
  • Orchestrator Agent: The orchestrator synthesizes the filtered causal graph data, co-occurrence statistics (Point-wise Mutual Information), and retrieved text metadata. It then prompts an LLM to generate candidate Boolean rules alongside natural-language "traceable reasoning chains" that explain why a rule was proposed.
CAREP Multi-Agent Architecture

Datasets

The system was evaluated on a massive, real-world vehicular dataset provided by the BMW Group:

  • Total Sequences: 300,000 real-world vehicle log sequences.
  • Dimensionality: 29,100 unique DTCs and 474 distinct error patterns.
  • Sequence Length: An average of 100 ± 35 events per vehicle sequence.

Evaluation was performed using a 5-fold cross-validation setup where a subset of known error pattern rules was masked to test the framework's ability to blindly rediscover them.

Key Insights and Ideas

  • Causal Filtering as an LLM Enabler: The "aha moment" of CAREP is using statistical causal discovery as a high-fidelity information filter. By narrowing down thousands of potential event codes to a handful of highly relevant causal candidates, the system bypasses the token-limit fragilities of LLMs.
  • Adaptive Thresholding for the Long-Tail: A fixed statistical threshold either floods rare faults with noise or completely suppresses them. CAREP’s logistic decay function adjusts the threshold dynamically based on how frequently an error pattern appears in the dataset, successfully protecting rare fault rules.
  • Statistical Context for Boolean Logic: Providing the orchestrator agent with Point-wise Mutual Information (PMI) values allows the LLM to accurately deduce whether codes should be linked with an AND (high co-occurrence) or an OR / NOT (mutual exclusivity).

Key Results

The authors compared CAREP against standalone state-of-the-art LLMs (including Claude 3.5/3.7 Sonnet and GPT-4) across two evaluation metrics: Structural (did it find the right DTCs?) and Semantic (is the truth-table of the generated Boolean logic identical to the ground truth?).

  • Structural Precision: For Precision@1, CAREP achieved a score of 0.78, vastly outperforming the best standalone LLM baseline (Claude 3.7 Sonnet), which scored just 0.25. GPT-4 variants struggled heavily, scoring below 0.10.
  • Semantic Recall: CAREP achieved a Recall@1 of 0.70 in capturing the exact logical structure of the error patterns, compared to 0.25 for the top LLM baseline.
  • Ablation Insights: Removing the causal indicators from CAREP caused its performance to plummet, proving that LLMs cannot successfully reason through high-dimensional vehicle diagnostics using text descriptions alone.

Limitations and Future Work

While the paper demonstrates outstanding results, a few areas remain open for future exploration:

  • SlM Pretraining Dependency: CAREP relies on domain-specific language models pretrained on millions of sequences. In industrial settings without large historical log repositories, initializing these SLMs could be a barrier.
  • Dynamic Rule Updates: The current system generates static rules based on historical batches. Integrating a real-time feedback loop where domain experts can correct and dynamically update the multi-agent system's knowledge base is a logical next step.

The authors note that the underlying paradigm of pairing statistical sequence-level causal discovery with multi-agent LLM orchestration holds immense promise for adjacent safety-critical fields, such as robotics and medical health monitoring.

Summary updated

BibTeX
@misc{math2026multi,
  author = {Hugo Math and Julian Lorenz and Stefan Oelsner and Rainer Lienhart},
  title = {{Multi-Agent Causal Reasoning System for Error Pattern Rule Automation in Vehicles}},
  year = {2026},
  eprint = {2602.01155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.01155},
}
Figure