arXiv:2611.06229cs.SENov 2026

Manuscript Offprint

arXiv:2611.06229

Bug2Scenario: Root-Cause-Preserving Test Scenario Amplification for Autonomous Driving Software

Yuchen Cao, Zhenyu Mao, Jacky Wai Keung, Yifei Wang, Yihan Liao, Jingyu Zhang

Yuchen Cao1,†^{1,\dagger}, Zhenyu Mao1,†^{1,\dagger}, Jacky Wai Keung1^{1}, Yifei Wang1^{1}, Yihan Liao1^{1}, and Jingyu Zhang2,∗^{2,*}

1^{1}City University of Hong Kong, Hong Kong

{cynthcao2-c, zhenyumao2-c, ywang4748-c, yihanliao4-c}@my.cityu.edu.hk, Jacky.Keung@cityu.edu.hk

2^{2}Hong Kong Metropolitan University, Hong Kong

†^{\dagger}Equal contribution. *Corresponding author: fzhang@hkmu.edu.hk

Abstract—Simulation-based fuzzing exposes autonomous driving system (ADS) failures by repeatedly mutating and executing scenarios, but converting one failure into reusable regression scenarios remains difficult. Such variants test whether the mechanism persists after software changes, for example by varying weather or actor placement while retaining a collision's actor-route conflict. We present Bug2Scenario, a root-cause-guided post-fuzzing framework. From scenario data, traces, and oracle evidence, it extracts a root-cause pattern. An LLM proposes semantic variations over actors, missions, routes, and weather. Deterministic rules construct DriveFuzz-compatible scenarios. Execution evidence and manual review assess preservation. Separating these responsibilities prevents fluency, syntax, or recurring labels from masquerading as causal evidence. Under matched seeds, six LLM backbones, candidate budget, and execution pipeline, Bug2Scenario improves strict preservation by 6.7 percentage points (p = 0.104; not significant) and boundary-inclusive preservation by 10.6 points (p = 0.011). Feedback helps some initially unsuccessful seeds yield a strictly preserved candidate. Seed-level stopping then avoids further API calls and simulator runs. Remaining failures reflect actor-placement constraints, simulator instability, and incomplete or conflicting causal evidence. Bug2Scenario thus produces reliable ADS regression assets. Our implementation is available athttps://github.com/YgcCoder/Bug2Sce.

Index Terms—Software testing, test amplification, autonomous driving software, large language models

I. INTRODUCTION

Fuzz testing in simulation is a central technique for exercising autonomous driving systems (ADSs) because safety-critical interactions are expensive, rare, and difficult to reproduce on public roads [1], [2]. CARLA and Autoware provide controllable cyber-physical test environments in which engineers can vary roads, actors, missions, and weather while observing a production-scale driving stack [3], [4]. Automated methods built on these platforms search large scenario spaces for collisions, traffic-law violations, perception errors, and unsafe vehicle states.

Failure discovery is only the beginning of testing. After a fuzzer exposes a violation, engineers need regression assets that reproduce it under controlled variation. Repeated execution does not reveal which scene details are incidental or required. A useful test family must support debugging, regression testing, and maintenance while keeping the failure boundary interpretable.

Most ADS testing research emphasizes discovery. DeepTest and DeepRoad transform driving scenes, whereas AV-Fuzzer and DriveFuzz mutate executable scenarios [5]–[8]. Recent methods further improve search efficiency, diversity, or responsibility-aware violation discovery [9]–[12]. Post-fuzzing test amplification instead starts from a failure-triggering seed and generates controlled variants to preserve its mechanism rather than discover an arbitrary new failure. Its output is not a new fault report, but an auditable set of regression candidates traceable to the original evidence. It asks which variants reproduce the mechanism of a failure already found?

The central engineering gap is the distinction between symptom recurrence and mechanism preservation. A failure oracle is a detection rule. Its outcome is the collision (C), red-light violation (R), lane invasion (L), or stuck/immobility (S) label from one run. Symptom recurrence repeats a compatible outcome, whereas mechanism preservation also retains the seed's critical interaction and failure progression. In Fig. 1, case_098 is an actor-route collision. Label-only conditioning instead yields a red-light violation, while root-cause guidance retains that collision mechanism. The same outcome can still arise from different interactions. Parseability, executability, and a matching outcome respectively show that JSON can be read, a scenario can run, and a visible symptom recurs. None alone proves mechanism preservation.

Post-fuzzing test amplification consequently needs explicit preservation constraints and graded assessment. Unconstrained variation may add an unrelated failure to the same bug family, while a scenario near a behavioral boundary may retain the critical interaction but weaken its visible symptom. Binary acceptance based only on syntax or matching outcomes cannot distinguish these outcomes or support reliable scenario-level regression asset generation. Grading also records partial evidence without admitting it as strict reproduction.

LLMs propose semantic variation but create distinct schema, execution, and preservation risks. They support search, fuzz-input generation, and execution-guided repair [13]–[16], while language and multimodal models propose driving scenarios [17]–[19]. In LLM-assisted fuzz-input generation, a model proposes tests or structured configurations for another stage to execute and validate. A fluent proposal may place an actor outside a drivable region, omit a critical mission field, or depart from the seed mechanism. Existing fuzzers target discovery,

Figure

Fig. 1. Motivating example from case_098. The seed failure is a collision caused by an actor-route conflict. Failure-label conditioning alone produces a red-light violation and does not preserve the mechanism, whereas root-cause-guided generation retains the collision mechanism. Thus, matching or triggering an oracle outcome is not sufficient evidence of root-cause preservation.

structured generation does not test membership in a seed's bug family, and direct LLM generation guarantees neither schema compliance nor mechanism preservation. One response should not control proposal, coordinates, and causal judgment. Separating these roles makes rejection attributable to generation, construction, execution, or preservation assessment.

In this work, we present Bug2Scenario as an LLM-assisted but validator-centered approach to post-fuzzing test amplification. Seed evidence defines a root-cause pattern, and an LLM proposes high-level variations over semantic conditions such as actors, missions, routes, and weather rather than final simulator coordinates or JSON. Deterministic concretization then produces DriveFuzz-compatible JSON. Schema checks and execution artifacts support manual assessment of invalid, no-failure, different-failure, boundary, and strictly preserved outcomes. Structural errors return to concretization, whereas an observed execution that conflicts with the seed mechanism revises the causal explanation or later generation constraints. Validated patterns remain anchored to the original seed rather than accumulated feedback. Under matched generation and execution budgets, Bug2Scenario improves strict and boundary-inclusive preservation over Pure-LLM. Same-seed feedback repairs some first-pass failures before recovery plateaus. The resulting test families help engineers study failure boundaries without mixing unrelated mechanisms. Our contributions are:

  • We introduce a root-cause-preserving test-generation framework for post-fuzzing amplification, distinguishing same-mechanism reproduction from failure discovery and visible violation recurrence.
  • Bug2Scenario provides an evidence-grounded workflow that combines root-cause pattern extraction, LLM-assisted high-level variation, deterministic concretization, and execution-based mechanism preservation assessment.
  • We present a matched empirical evaluation across six LLM backbones and a Pure-LLM baseline, reporting strict and boundary-inclusive preservation separately.
  • We analyze iterative same-seed feedback and cost control, identifying where execution and manual-review evidence

repairs seeds, where recovery plateaus, and how seed-level stopping avoids later calls and simulations.

References (37)