Injecting Hallucinations in Autonomous Vehicles: A Component-Agnostic Safety Evaluation Framework
Authors: Alexandre Moreira Nascimento, Gabriel Kenji Godoy Shimanuki, Lúcio Flavio Vismari, João Batista Camargo, Jorge Rady de Almeida, Paulo Sergio Cugnasca, Anna Carolina Muller Queiroz, Jeremy Noah Bailenson
Organizations: Escola Politécnica da Universidade de São Paulo, São Paulo 05508-010, Brazil · Center for Design Research, Department of Mechanical Engineering, Stanford, CA 94305 USA · Department of Communication, University of Miami, Coral Gables, FL 33124 USA · Department of Communication, Stanford University, Stanford, CA 94305 USA
Perception failures in autonomous vehicles (AV) remain a major safety concern because they can directly compromise decision-making and contribute to unsafe behavior. To study how these failures affect safety, researchers typically inject artificial faults into real-world or simulated components and observe the resulting outcomes. However, existing fault injection (FI) studies often target a single sensor within the machine perception (MP) module, resulting in siloed frameworks that are difficult to generalize or integrate into unified simulation environments. This work addresses that limitation by reframing perception failures as hallucinations, that is, false perceptions that distort an AV's situational awareness and may trigger unsafe control actions. Building on this concept, we propose a configurable, component-agnostic hallucination injection framework that induces six plausible hallucination types in an open-source simulation environment. A total of 18,356 simulations (8,695 baseline and 9,661 with hallucinations injected) were executed while AVs crossed an unsignalized intersection with transversal traffic. The results statistically validate the framework and quantify the impact of each hallucination type on collisions and on the minimum distance between the AV and the nearest vehicle, used as a continuous proxy for the safety margin. Certain hallucinations, especially missed detection, blind region, angular drift, phantom perception, and latency, significantly increase the odds of collision, while linear drift significantly reduces minimum distances without producing a statistically significant increase in collision odds in the evaluated scenario. The proposed framework provides a scalable and statistically grounded method for evaluating AV safety under perception distortions and supports future research on fault tolerance and resilient AV design.
Figures & tables
Fig. 1: Hallucination produced by a 360° image reconstruction algorithm
Fig. 2: MP system model
Fig. 3: Taxonomy of dimensions and persistence of MP faults
Fig. 4: Illustration of observable consequences of CCD partial fault (left) and complete fault (right)
Fig. 5: Camera calibration drift
Fig. 6: Effect of distinct MP hallucinations on the AV situational awareness
Fig. 7: Snapshots of starting condition (top) and execution of simulation (bottom)
Fig. 8: System components distribution and integration across OpenDS and MATLAB
Property
Variable
Description
Type*
Active
ModuleActivation
Setting the HI module to ON activates the injection of the configured signal, while setting it to OFF deactivates it
C
Type
HallucinationType
Type of hallucination injected into the AV during a specific simulation execution
C
Domain
AffectedDomain
Domain affected by the hallucination injected during a specific simulation execution
C
Configuration
HallucinationConfiguration
Configuration parameters of the hallucination injected into the AV during a specific simulation execution
C
Probability
HallucinationProbability
Probability of the hallucination occurrence during a specific simulation execution
N
Persistence
HallucinationPersistence
Hallucination Persistence configured for a specific simulation execution
C
TABLE I: HI module’s properties
Fig. 9: Updated ReTS simulation environment with HI module
Fig. 10: Hallucination types implemented in the HI framework
Id
Category
Description
LinDrift
PerceptionLinearDrift
Perturbs the perceived coordinates of a detected vehicle around its true position
AngDrift
PerceptionAngularDrift
Introduces an angular deviation in the detected vehicle position
Phant
PhantomPerception
Non-existent vehicles are detected (false positives)
Missed
MissedDetection
Existing vehicles are not detected (false negatives)
Blind
BlindRegion
Occluded regions in field-of-view that may obstruct object detection
Latency
PerceptionLatency
Delays are introduced into the perception mechanisms, leading to delayed situational awareness sent to MC
TABLE II: HallucinationType categories
Id
Category
Perception output domain
Pos
ObjectPosition
Perceived coordinates or localization of detected objects
Rec
ObjectRecognition
Object existence, detection, or recognition
Time
InformationTiming
Temporal freshness of perception information
TABLE III: AffectedDomain categories
ID & Category
Description
Location
A systemic linear drift affecting the perceived position of all detected vehicles (proportional error of up to 100% of each vehicle’s distance to the intersection)
Car1, Car2, Car3
Selects the crossing car whose perceived attributes will be altered in the AV MP
Sets the camera miscalibration rotating 5°, 10°, 20°, or 25° to the left (L) or right (R) side of the AV, considering 0° the axis parallel to the AV trajectory
Blind40L, Blind50L, Blind60L
Sets the angular width of the occlusion stripe (40°, 50°, or 60°) on the left side of the AV. Its center is drawn uniformly between 0° and 90° to the left in each run. 0° is parallel to the AV trajectory
Lat20, Lat40
Selects the delay to be introduced between the simulation status and the MP in number of simulation cycles (20 or 40; approximately 0.29 s and 0.58 s)
TABLE IV: HallucinationConfiguration categories
Fig. 11: Virtual field-of-view (FOV) filtering applied to simulator ground truth. (a) Object-surface segments, such as P1–P2, P3–P4, and P4–P5, visible within the AV detection area. (b) Effect of occlusion on the visible portion of object surfaces. Adapted from [ 111 ] .
Hypothesis
Independent Variable
Expected Influence
Dependent Variable
H1.1
ModuleActivation
↑↓
Accident Occurrence
H2.1
HallucinationType
↑↓
H3.1
AffectedDomain
↑↓
H4.1
HallucinationConfiguration
↑↓
H5.1
HallucinationProbability
↑
H6.1
HallucinationPersistence
↑↓
TABLE V: Summary of granular hypotheses
Fig. 12: Elements supporting the experimental procedures
Metric (unit)
Description
Time (ms)
Timestamp
xav[m] , zav[m] , vav[km/h]
Position and speed of AV at the moment indicated by the timestamp
Steering Wheel Position σ(t)
Position of the steering wheel ranging from -1 to 1 commanded by the MC
Throttle Pedal Position αth(t)
Position of throttle pedal pressure ranging from 0 to 1. 0 indicates no actuation and 1 represents full pressure
Brake Pedal Position αbr(t)
Position of brake pedal pressure ranging from 0 to 1. 0 indicates no actuation and 1 represents full pressure
xn[m] , zn[m] , vn[km/h]
Position and speed of each vehicle n at the transversal street at the moment indicated by the timestamp; n=1 to 5
TABLE VI: Simulation log content
Variable
Description
Accident
Indicates whether a collision occurred in a given simulation run.
MinimalDistance
The minimum distance between the AV and the nearest crossing vehicle at the intersection.
HI Variables *
Define the characteristics and context of the injected hallucination for each run.
TABLE VII: Dataset Features Used to Verify Hypotheses H1 to H6
Fig. 13: Breakdown of sample size by category of each HI property
HI Properties
LR χ2
Df
p
H1.1 : Module Activation
126.7
1
¡ .001
H2.1 : Hallucination Type
186.29
6
¡ .001
H3.1 : Affected Domain
158.15
3
¡ .001
H4.1 : Hallucination Configuration
369.72
17
¡ .001
H5.1 : Hallucination Probability
385.43
5
¡ .001
H6.1 : Hallucination Persistence
148.59
2
¡ .001
TABLE VIII: ANOVA results for the effects of HI properties on Accident Occurrence
Predictor
SS
df
MS
F
p
ηp2
90% CI [ ηp2 ]
H1.2 : Module Activation
11,785
1
11,785
6,989
¡.001
0.28
[0.27, 0.28]
H2.2 : Hallucination Type
12,206
6
2,034
1,223
¡.001
0.29
[0.28, 0.29]
H3.2 : Affected Domain
12,057
3
4,019
2,404
¡.001
0.28
[0.27, 0.29]
H4.2 : Hallucination Configuration
12,292
17
723
436
¡.001
0.29
[0.28, 0.30]
H5.2 : Hallucination Probability
11,856
5
2,371
1,409
¡.001
0.28
[0.27, 0.29]
H6.2 : Hallucination Persistence
11,936
2
5,968
3,556
¡.001
0.28
[0.27, 0.29]
TABLE IX: ANOVA results for the effects of HI properties on Minimum Distance
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
ModuleActivation [ON]
3.09
0.34
[2.51, 3.85]
10.39
¡ .001
TABLE X: Odds ratio results for predictor Module Activation (Hypothesis H1.1 )
Parameter
Coefficient
SE
95% CI
t(18354)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
619.12
¡ .001
ModuleActivation [ON]
-1.60
0.02
[-1.64, -1.57]
-83.60
¡ .001
TABLE XI: Linear model results for predictor Module Activation (Hypothesis H1.2 )
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
Linear Drift
1.46
0.51
[0.68, 2.74]
1.08
0.278
Phantom
2.23
0.41
[1.53, 3.17]
4.33
¡ .001
Missed Detection
5.20
0.75
[3.91, 6.88]
11.47
¡ .001
Latency
1.81
0.43
[1.11, 2.81]
2.51
0.012
Angular Drift
2.52
0.33
[1.94, 3.27]
7.00
¡ .001
TABLE XII: Odds ratio results for predictor Hallucination Type (Hypothesis H2.1 )
Fig. 14: Testing results of supporting hypotheses ( H2 – H6 ). Five HI properties (Type, Domain, Configuration, Probability, Persistence) were tested on two variables. The top row shows odds ratios from logistic regression for Collision Odds , and the bottom row shows linear regression coefficients ( β ) for Minimum Distance , where negative values indicate a smaller minimum distance. Error bars show 95% confidence intervals
Parameter
Coefficient
SE
95% CI
t(18349)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
623.29
¡ .001
Linear Drift
-1.52
0.06
[-1.64, -1.41]
-25.24
¡ .001
Phantom
-1.60
0.04
[-1.67, -1.53]
-43.80
¡ .001
Missed Detection
-1.42
0.04
[-1.49, -1.35]
-38.83
¡ .001
Latency
-1.11
0.04
[-1.19, -1.02]
-25.21
¡ .001
Angular Drift
-1.72
0.02
[-1.76, -1.67]
-68.80
¡ .001
TABLE XIII: Linear model results for predictor Hallucination Type (Hypothesis H2.2 )
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
Position
2.40
0.31
[1.86, 3.10]
6.74
¡ .001
Recognition
4.09
0.48
[3.26, 5.17]
11.99
¡ .001
Timing
1.81
0.43
[1.11, 2.81]
2.51
0.012
TABLE XIV: Odds ratio results for predictor Affected Domain (Hypothesis H3.1 )
Parameter
Coefficient
SE
95% CI
t(18352)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
621.82
¡ .001
Position
-1.69
0.02
[-1.74, -1.65]
-70.55
¡ .001
Recognition
-1.62
0.02
[-1.67, -1.58]
-67.69
¡ .001
Timing
-1.11
0.04
[-1.19, -1.02]
-25.15
¡ .001
TABLE XV: Linear model results for predictor Affected Domain (Hypothesis H3.2 )
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
Location
1.46
0.51
[0.68, 2.74]
1.08
0.278
Car1
6.09
0.95
[4.47, 8.25]
11.60
¡ .001
Car2
5.00
0.82
[3.60, 6.87]
9.77
¡ .001
Car3
0.24
0.14
[0.06, 0.63]
-2.46
0.014
Ang05L
0.96
0.40
[0.37, 2.01]
-0.10
0.923
TABLE XVI: Odds ratio results for predictor Hallucination Configuration (Hypothesis H4.1 )
Parameter
Coefficient
SE
95% CI
t(18338)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
623.98
¡ .001
Location
-1.52
0.06
[-1.64, -1.41]
-25.27
¡ .001
Car1
-1.43
0.04
[-1.51, -1.34]
-32.60
¡ .001
Car2
-1.68
0.04
[-1.76, -1.59]
-38.34
¡ .001
Car3
-1.43
0.04
[-1.52, -1.35]
-32.89
¡ .001
Ang05L
-1.67
0.06
[-1.79, -1.56]
-27.84
¡ .001
TABLE XVII: Linear model results for predictor Hallucination Configuration (Hypothesis H4.2 )
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
1%
0.64
0.17
[0.36, 1.05]
-1.66
0.097
5%
1.00
0.22
[0.64, 1.53]
0.02
0.985
10%
2.36
0.39
[1.70, 3.24]
5.25
¡ .001
25%
3.47
0.51
[2.59, 4.61]
8.48
¡ .001
50%
8.53
1.04
[6.73, 10.86]
17.60
¡ .001
TABLE XVIII: Odds ratio results for predictor Hallucination Probability (Hypothesis H5.1 )
Parameter
Coefficient
SE
95% CI
t(18350)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
619.77
¡ .001
1%
-1.62
0.03
[-1.68, -1.55]
-49.53
¡ .001
5%
-1.57
0.03
[-1.63, -1.51]
-48.13
¡ .001
10%
-1.55
0.03
[-1.62, -1.49]
-47.63
¡ .001
25%
-1.52
0.03
[-1.59, -1.46]
-46.74
¡ .001
50%
-1.77
0.03
[-1.83, -1.70]
-53.95
¡ .001
TABLE XIX: Linear model results for predictor Hallucination Probability (Hypothesis H5.2 )
Parameter
Odds Ratio
SE
95% CI
z
p
(Intercept)
0.01
1.24×10−3
[0.01, 0.02]
-45.62
¡ .001
Inter
2.34
0.30
[1.83, 3.01]
6.67
¡ .001
Perm
3.86
0.45
[3.08, 4.87]
11.59
¡ .001
TABLE XX: Odds ratio results for predictor Hallucination Persistence (Hypothesis H6.1 )
Parameter
Coefficient
SE
95% CI
t(18353)
p
(Intercept)
8.62
0.01
[8.59, 8.65]
620.61
¡ .001
Inter
-1.48
0.02
[-1.53, -1.43]
-63.63
¡ .001
Perm
-1.73
0.02
[-1.77, -1.68]
-74.43
¡ .001
TABLE XXI: Linear model results for predictor Hallucination Persistence (Hypothesis H6.2 )
Type
CollRank
OR
DistRank
β (m)
ΔRank
Profile
Missed Detection
1
5.20
5
-1.42
+4
CD
Blind Region
2
4.92
1
-1.85
-1
DI
Angular Drift
3
2.52
2
-1.72
-1
DI
Phantom
4
2.23
3
-1.60
-1
DD
Latency
5
1.81
6
-1.11
+1
LB
Linear Drift
6
1.46
4
-1.52
-2
LB
TABLE XXII: Comparative ranking of hallucination effects across collision odds and minimum distance
Fig. 15: Hallucination type impact on collision odds and minimum distance degradation
Domain
OR
β (m)
Profile
Position
2.40
-1.69
DI
Recognition
4.09
-1.62
DI
Timing
1.81
-1.11
LB
TABLE XXIII: Affected domain effects across collision odds and minimum distance
Fig. 16: Affected-domain impact on collision odds and minimum distance degradation
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Roadway Type
Count
Share
Highway / Freeway
1977
31.3%
Street
1561
24.7%
Unknown
1366
21.6%
Intersection
1137
18.0%
Parking Lot
156
2.5%
Rural Road
108
1.7%
Appendix
TABLE XXIV: SGO (ADS+ADAS, 2021–2025): Roadway Type distribution after removing empty/blank Roadway Type entries
Roadway Type
Count
Share
Street
1013
36.2%
Intersection
972
34.8%
Highway / Freeway
686
24.5%
Parking Lot
68
2.4%
Rural Road
31
1.1%
Unknown
19
0.7%
Appendix
TABLE XXV: SGO (ADS+ADAS, 2021–2025): Roadway Type distribution after filtering to non-stationary CP Pre-Crash Movement categories
Roadway Type
Count
Share
Intersection
146
34.8%
Street
139
33.1%
Highway / Freeway
116
27.6%
Rural Road
7
1.7%
Unknown
7
1.7%
Traffic Circle
4
1.0%
Appendix
TABLE XXVI: SGO (ADS+ADAS, 2021–2025): Roadway Type distribution for injury-alleging reports after movement filtering
Item
Settings for reproduction
Where defined in the paper
Scenario configuration
Unsignalized intersection crossing with five crossing vehicles that have the right of way. The AV starts about 250m from the intersection. The other vehicles start about 270m from the intersection and accelerate from rest up to 54km/h . The AV identifies candidate windows (CWs) to cross.
Section III-A and Figure 7
Simulation environment and integration
USP54 ReTS integrating OpenDS and MATLAB. The traffic scenario is executed in OpenDS. MC and HI are executed in MATLAB. Data is exchanged between OpenDS and MATLAB through a TCP/IP socket interface.
Section III-B and Figure 8
Perception output used by HI
Simulator ground truth filtered by the virtual FOV is used as the perception output used by HI. The sensor-model uncertainty and error module is enabled in all runs, including the baseline, which differs from HI-enabled runs only in that HI is disabled. HI is applied at the perception–control interface.
Section III-D and Figure 11
HI properties
HI is defined by ModuleActivation, HallucinationType, AffectedDomain, HallucinationConfiguration, HallucinationProbability, and HallucinationPersistence.
Section III-C and Table I
Hallucination types
PerceptionLinearDrift, PhantomPerception, MissedDetection, PerceptionAngularDrift, BlindRegion, and PerceptionLatency.
Section III-C and Table II
Affected domains
ObjectPosition, ObjectRecognition, and InformationTiming.
Software-in-the-loop (SIL) simulation is a cornerstone for the validation of modern automotive safety functions. However, many current frameworks utilize ideal sensing, which bypasses the functional insufficiencies of perception algorithms, leading to over-optimistic safety assessments. This paper proposes a perception-informed SIL testing methodology that bridges the gap between ground-truth simulation and real-world perception behavior. We present a framework for incorporating causal probabilistic models into standardized, scenario-based simulation toolchains, applicable to both Advanced Driver Assistance Systems (ADAS) and Autonomous Driving Systems (ADS). Our approach enables the systematic injection of realistic perception errors, such as loss of detection, sizing inaccuracies, and positioning offsets, derived from physical triggering conditions like fog, rain, and object-merging scenarios. By evaluating these ``faults'' within a standardized simulation environment, we demonstrate that perception-informed testing reveals latent operational risks that ideal SIL environments fail to capture, providing a scalable pathway for SOTIF (ISO 21448) validation.
Zhennan Fei, Rickard Johansson, Mikael Andersson +12
Volvo Cars, Sweden · Chalmers University of Technology, Sweden · TNO, The Netherlands +2
We propose a mixed-reality, hardware-in-the-loop (HIL) testbed for autonomous vehicles that seamlessly integrates a physical testbed of mobile robots with a high-fidelity simulation environment. The virtual simulation enables the creation of diverse, safety-critical driving scenarios to validate state-of-the-art perception, planning, and control algorithms, while augmenting simulations with physical robots equipped with multimodal sensors in photorealistic virtual environments further facilitating rigorous validation. Our testbed also features vehicular connectivity using wireless communication and can accommodate a large number of agents through the combination of physical robots and virtual simulated agents, supporting research on multi-agent systems including Connected and Autonomous Vehicles (CAVs). Finally, we present a safety-guaranteed framework combining perception, planning and a novel online learning-based controller using Control Barrier Functions (CBFs) for CAVs. Experiments using the proposed framework are used to validate and demonstrate the key functionalities and the overall utility of the testbed to bridge the gap between simulation and real-world hardware deployment.
H. M. Sabbir Ahmad, Ehsan Sabouni, Emrullah Celik +4
Division of Systems Engineering, Boston University · Department of Electrical and Computer Engineering, Boston University
As AVs grow in complexity and diversity, identifying the root causes of operational failures has become increasingly complex. The heterogeneity of system architectures across manufacturers, ranging from end-to-end to modular designs, together with variations in algorithms and integration strategies, limits the standardization of incident investigations and hinders systematic safety analysis. This work examines real-world AV incidents reported in the NHTSA database. We curate a dataset of 2,168 cases reported between 2021 and 2025, representing more than 80 million miles driven. To process this data, we introduce CRASH, Cognitive Reasoning Agent for Safety Hazards, an LLM-based agent that automates reasoning over crash reports by leveraging both standardized fields and unstructured narrative descriptions. CRASH operates on a unified representation of each incident to generate concise summaries, attribute a primary cause, and assess whether the AV materially contributed to the event. Our findings show that (1) CRASH attributes 64% of incidents to perception or planning failures, underscoring the importance of reasoning-based analysis for accurate fault attribution; and (2) approximately 50% of reported incidents involve rear-end collisions, highlighting a persistent and unresolved challenge in autonomous driving deployment. We further validate CRASH with five domain experts, achieving 86% accuracy in attributing AV system failures. Overall, CRASH demonstrates strong potential as a scalable and interpretable tool for automated crash analysis, providing actionable insights to support safety research and the continued development of autonomous driving systems.
Erick Silva, Rehana Yasmin, Ali Shoker
King Abdullah University of Science and Technology, Thuwal, Saudi Arabia