Skip to content

Let’s read the log: root cause analysis of railway test execution logs with large language models

Aug 2026 · Innovations in Systems and Software Engineering · Vol 22 · 0 citations · 48 references

TL;DR

Results showed that long-context LLMs tended to achieve higher accuracy than smaller models, suggesting that LLMs are currently better suited to support human-in-the-loop root cause analysis than to fully automate it, and motivating further work to improve prediction accuracy for log-based RCA.

Abstract

Software quality assurance is pivotal in safety-critical domains such as railway systems, where failures could have catastrophic consequences. In this context, the train control and management system, which enables communication and control across multiple subsystems (such as doors and information panels) within a modern train, and its software must undergo rigorous validation. Alstom Rail Sweden AB employs a digital twin infrastructure to simulate and validate train control and management system software. While this setup improves system-level testing, root-cause analysis of test failures remains a manual, time-consuming bottleneck. In this study, we explore the potential of large language models to automate root cause analysis by interpreting test execution logs generated during digital twin-based testing. We benchmark nine state-of-the-art large language models: Aion−1.0, DeepSeek R1, DeepSeek V3 0324, Mistral Small 3.1 24B, GPT o3-mini, Gemini 2.5 Pro Experimental, QwQ 32B, Gemini 2.0 Flash Experimental, and Amazon Nova 2 Lite using zero-shot chain-of-thought prompting to assess their ability to reason about fault patterns in real-world industrial test execution logs. The logs were sourced from Alstom’s digital twin-based testing environment and captured complex operational behaviour typical of embedded, safety-critical systems. Our results showed that long-context LLMs tended to achieve higher accuracy than smaller models. Gemini 2.5 Pro Experimental achieved the best performance with 66.7% accuracy and produced coherent step-by-step explanations. However, coherent reasoning did not consistently translate into correct root-cause identification, suggesting that LLMs are currently better suited to support human-in-the-loop root cause analysis than to fully automate it, and motivating further work to improve prediction accuracy for log-based RCA.

Read PDF

Similar papers

Review Jul 2026

Validating ETCS Data with the B Mathematical Language: An Industrial Pipeline and a Blueprint for LLM Integration

Can large language models participate in the production and validation of ERTMS/ETCS data without undermining the certification arguments required by CENELEC EN 50128/50716? ERTMS/ETCS is a distributed safety-critical system (trackside, onboard, radio-block centre) whose behaviour is parameterised by large volumes of data drawn from the UNISIG Subsets; errors in that data propagate through the distributed architecture. This paper reports the current status of an ongoing industrial research effort at CLEARSY, ValidAItion, that bridges the ERTMS Operational Simulator to the CLEARSY Data Solver and applies rules expressed in the B mathematical language to that trackside data. During construction, a large language model (Claude) has authored the rule corpus and the parsers through a Model Context Protocol server; every proposal is adjudicated by the downstream toolchain and by systematic human review, and the toolchain has already rejected a syntactically valid but semantically illegal generated scenario. The contribution is architectural and industrial, not algorithmic: the work combines frameworks already in use at CLEARSY (CLEARSY Data Solver, ERTMS Operational Simulator) with a conversational authoring loop, rather than proposing a new formal method. It is a progress report: rule coverage is growing, the human-review campaign is underway, and the quantitative results will be published separately. The paper argues, on the evidence gathered so far, that formal rules in the mathematical language of B must remain the source of truth, while the language model serves as the fenced assistant in a distributed safety-critical railway system: AI proposes, the formal oracle disposes, the human confirms.

Lecomte Thierry, Germain Vincent · 0 citations
Preprint Jul 2026

Can Code Specify a System Precisely Enough to Formally Verify It?

Formal verification is seldom applied to production software, because writing and maintaining a model has historically cost more than it returns. A companion study [1] extended SysMoBench [4] with a lower-cost alternative: specifications are graded against traces captured from the running system. It found that when large language models write the specifications, reliability is governed by the structure of the specification contract, not the language. This paper evaluates both on production software: the payment workflow of an operational restaurant point-of-sale system, which must keep the register, payment terminal, and payment processor in agreement. We report three results. First, the core protocol is correct relative to a hand-built, line-cited model under a precisely stated failure model. The audit found seven failure-handling gaps, nearly all with a common root cause; three were reproduced as real executions, and a patch closing them was re-checked with all failure gates enabled, after which a follow-up patch closed a defect the re-check itself exposed. Systematic extensions of the failure model (crash-restart, stale reads, two attempts) each found the windows they were designed to probe. Second, a single probe of the production payment sandbox exposed a response-shape divergence that makes an entire recovery ladder unreachable against the live API. The emulator-based audit could not detect it, because code and emulator share the same misreading: a correlated-oracle failure. Third, the companion study's central finding replicates across seven models from two vendors: contract structure, not language, governs what LLMs specify reliably. The replication concerns the ordering of contracts and the failure taxonomy, not the absolute level: only the strongest models reached the corpus ceiling, and the harder task restores discriminating power the benchmark had lost.

J. Dubray · 1 citation
Conference Jul 2026

Improving LLM-Based Unit Test Generation Through Root-Cause-Driven Prompt Design

This paper addresses automated unit test generation with large language models (LLMs). LLM-based test generation has not yet attained a quality level sufficient for practical use in industry. Although LLMs often reproduce API syntax faithfully, they frequently disregard semantic usage constraints and execution-environment dependencies, leading to assertion failures, mock-related errors, and reference/resolution errors. A prior failure analysis of Java unit test generation using GPT-4o classified 2980 trials into eight failure patterns and identified three root-cause mechanisms: external context ignorance, internal context ignorance, and a syntax–semantics gap. Building on that analysis, this paper proposes a prompt design comprising three strategies: (1) making the execution state explicit in the generated test, (2) stating semantic constraints explicitly, and (3) injecting environment constraints prior to generation. In contrast to generic techniques such as few-shot learning or chain-of-thought prompting, each proposed strategy is tied to a specific root-cause mechanism, yielding a systematic design in which each rule is explicitly justified by its correspondence to a specific root-cause mechanism. Experiments on 298 methods with five models (GPT-4o, GPT-5, GPT-5.1-Codex, Claude Sonnet 4.5, and Gemini 2.5 Pro) show improved test execution success rates for every model, with absolute gains ranging from 1.1 to 21.1 percentage points (pp). Mock-related errors were reduced by 61.9%–99.2% relative to the baseline prompt, demonstrating effectiveness against the targeted failure patterns. Finally, conditions under which the strategies transfer to other code-generation tasks are discussed, along with limitations on their scope.

Mizuki Yamada, Masahiko Kato, Juichi Takahashi · 0 citations
Open access Aug 2026

Integration test generation for state-based components in the Gamma framework

Nowadays, the design of complex reactive systems, e.g., control systems in the railway and aerospace industries, is generally based on the integration of components. Components (subsystems) may come from various parties and operate according to different execution and interaction semantics. Analyzing the joint behavior of such integrated components is a tedious task. This paper introduces a model-based approach in our Gamma Statechart Composition Framework for integration test generation on the basis of collaborating state-based models. Test generation is supported by test coverage criteria and the automatic transformation of composite models into different model checker back-ends. The diagnostic traces returned by the model checkers are automatically mapped into test cases. As novelty, our tool is based on precise composition semantics (synchronous and asynchronous) and relies on model queries to support the modular and flexible specification of element coverage according to various model-based criteria: dataflow, component interactions and static model elements. The tool utilizes model reduction and slicing techniques during the transformations to ease test generation complexity using query-dependent model processing. We demonstrate the applicability of our tool on three industrial subsystems, including an aerospace (NASA) and two railway applications.

Bence Graics, V. Molnár, I. Majzik · 0 citations
Preprint Jul 2026

Integrating High-Level Requirements to Low-Level Tests with Machine-Readable V&V Specifications

VNVSpec, an open-source framework that makes V&V specifications machine-readable and executable, is introduced, which can handle up to 10,000 requirements and is evaluated by self-application, in which it is continuously assessed in CI against its own specification.

M. Arief, Nur Ahmad Khatim, Ali Akarma et al. · 0 citations

Related blog posts