Learning to Predict, Discover, and Reason in High-Cardinality Event Sequences
Organizations: Faculty of Applied Computer Science, University of Augsburg
Abstract
Electronic control units (ECUs) embedded within modern vehicles generate a large number of asynchronous events known as diagnostic trouble codes (DTCs). These discrete events form complex temporal sequences that reflect the evolving health of the vehicle's subsystems. In the automotive industry, domain experts manually group these codes into higher-level error patterns (EPs) using Boolean rules to characterize system faults and ensure safety. However, as vehicle complexity grows, this manual process becomes increasingly costly, error-prone, and difficult to scale. Notably, the number of unique DTCs in a modern vehicle is on the same order of magnitude as the vocabulary of a natural language, often numbering in the tens of thousands. This observation motivates a paradigm shift: treating diagnostic sequences as a language that can be modeled, predicted, and ultimately explained. Traditional statistical approaches fail to capture the rich dependencies and do not scale to high-cardinality datasets characterized by thousands of nodes, large sample sizes, and long sequence lengths. Specifically, the high cardinality of categorical event spaces in industrial logs poses a significant challenge, necessitating new machine learning architectures tailored to such event-driven systems. This thesis addresses automated fault diagnostics by unifying event sequence modeling, causal discovery, and large language models (LLMs) into a coherent framework for event streams. It is structured in three parts, reflecting a progressive transition from prediction to causal understanding and finally to reasoning for vehicle diagnostics. Consequently, we introduce several Transformer-based architectures for predictive maintenance, scalable sample- and population-level causal discovery frameworks and a multi-agent system that automates the synthesis of Boolean EP rules.
Figures & tables
| Causal Scope | Events-to-Outcome (DTCs Error Pattern) | Event-to-Event (DTCs DTCs) |
| Sample-Level (Single Sequence) | OSCAR One-Shot Multi-Label Causal Discovery Markov Boundary per label from a single sequence Chapter 7 | TRACE Scalable Amortized Causal Discovery Sample time causal graph from a single sequence Chapter 9 |
| Population-Level (Full Dataset) | CARGO Graph Aggregation for Causal Discovery Global Markov Boundaries via adaptive graph fusion Chapter 8 | Open Problem Population-level summary causal graph over event types/outcomes Requires aggregation of sample time and summary graphs with acyclicity constraints Future work |
| Notation | Description |
| Discrete event type, in our case a DTC. | |
| Absolute mileage of the vehicle in km. | |
| Mileage of the vehicle in km since the first DTC ( ) occurred in a sequence such as | |
| Unix timestamp attached to each DTC. | |
| Number of hours passed since the first DTC occurred in a sequence. More specifically, is defined as . | |
| Sequence of triplets (event type, time, mileage) defined as of length with index starting from 0. |
| Data | # of values | Description |
| DTC | 8710 | Diagnostic Trouble Code |
| ECU | 61 | Electronic Control Unit |
| Base-DTC | 7726 | Error Code |
| Fault-Byte | 2 | Binary Value |
| Model | ACC(%) | MAPE(%) | RMSE |
| rot-ce | 22.64 | 3.2 | 0.04770 |
| time | 21.48 | 2.9 | 0.04762 |
| time-mileage | 21.38 | 3.0 | 0.04785 |
| time-c2m-m2c | 21.58 | 3.5 | 0.04794 |
| time-m2c | 21.52 | 3.6 | 0.04823 |
| GPT | 19.89 | - | - |
| Model | F1 | MAPE | MAE | ||
| rotcross-query-key-ce-1-2 | 82.69 | 32.45 | 0.0268 | 52.80 | 0.888 |
| rotcross-query-key-ce-2 | 82.69 | 31.18 | 0.0254 | 56.61 | 0.882 |
| rotcross-query-ce-2 | 82.69 | 31.18 | 0.0254 | 53.00 | 0.884 |
| rotcross-key-value-ce-2 | 84.38 | 33.47 | 0.0263 | 65.06 | 0.904 |
| rotcross-key-value-scaled-ce-2 | 84.38 | 31.44 | 0.0252 | 67.63 | 0.874 |
| rotnocross-ce-1-2 | 80.74 | 37.61 | 0.0275 | 42.95 | 0.927 |
| Notations | Description |
| Sequence of environmental conditions triplets defined as | |
| of length | |
| Environmental condition description, e.g., temperature | |
| increase, vehicle speed, pressure increase | |
| Environmental condition value can be int, float, string, null | |
| Environmental condition unit, e.g., A, V, bar, °C, sec |
| Data | # of values | Description |
| DTC | 22,137 | Diagnostic Trouble Code |
| ECU | 132 | Electronic Control Unit |
| Base-DTC | 17,044 | Error Code |
| Fault-Byte | 2 | Binary Value |
| E. Condition Description | 2,559 | (See Table 1: ) |
| E. Condition Value | 3,288 | (See Table 1: ) |
| Micro and Macro Averaging | |||
| Model | AUROC (Micro) | F1 Score (Micro) | F1 Score (Macro) |
| BiCarFormer | 0.809 | 0.77 | 0.71 |
| DTC-TranGRU [ 50 ] | 0.602 | 0.36 | 0.28 |
| BERT [ 27 ] | 0.768 | 0.71 | 0.63 |
| Sample Averaging | |||
| Model | Precision (Sample) | Recall (Sample) | F1 Score (Sample) |
| Algorithm | Precision ↑ | Recall ↑ | F1 ↑ | Running Time (min) ↓ |
| IAMB | - | - | - | |
| CMB | - | - | - | |
| MB-by-MB | - | - | - | |
| PCDbyPCD | - | - | - | |
| MI-MCF | - | - | - | |
| OSCAR |
| Algorithm | Precision ↑ | Recall ↑ | F1 ↑ | Running Time (min) ↓ |
| IAMB | ||||
| CMB | ||||
| PCDbyPCD | ||||
| MB-by-MB | ||||
| MI-MCF | ||||
| OSCAR |
| Method | SHD ( ) | F1 ( ) | Precision ( ) |
| Random | 218.8 3.2 | 0.01 0.00 | 0.04 0.01 |
| Frequency | 723.0 6.7 | 0.09 0.00 | 0.06 0.00 |
| Attention (BERT) | 321.0 15 | 0.50 0.01 | 0.35 0.01 |
| Saliency (Input x Gradient LLaMA) | 160.2 6.55 | 0.67 0.01 | 0.51 0.01 |
| Shapley Value Sampling (LLaMA) | 148.0 5.09 | 0.60 0.01 | 0.55 0.01 |
| Neural Granger (LLaMA) | 100.2 14.6 | 0.69 0.04 | 0.71 0.04 |
| Ground Truth ( ) | Predicted Rule ( ) | ||
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
| Method | Precision | Recall | F1 | Time (min) |
| Phase 1: Sample-Level Causal Discovery (OSCAR) | ||||
| Sample-Level Graph | ||||
| Phase 2: Population-Level Causal Discovery (CARGO) | ||||
| Consensus Graph | ||||
| Phase 3: CAREP (End-to-End) | ||||
| CAREP | ||||
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Tokens | Param. | Context | Prec. (↑) | Rec. (↑) | F1 (↑) | Tfy F1 (↑) |
| For samples | ||||||
| 1.5B | 105m | 88.6 | ||||
| 1.5B | 105m | 90.43 | ||||
| 1.5B | 105m | 90.57 | ||||
| 1.5B | 105m | 91.19 | ||||
| 1.5B | 105m | 92.64 | ||||
| Proposal | F1 Micro (%) | F1 Macro (%) | F1 Wtd. (%) | Time (s) |
| w/o Sampling | ||||
| Permutation | ||||
| Top-k=20 | ||||
| Top-k=35 | ||||
| Top-k=35+T=0.8 | ||||
| Top-k=35+T=1.2 |
Fault Diagnosis
Fault diagnosis identifies, localizes, and explains failures in engineered and computational systems using sensor data, logs, models, and domain knowledge.
See all 147 papers