Injecting Hallucinations in Autonomous Vehicles: A Component-Agnostic Safety Evaluation Framework
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
Abstract
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
| 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 |
| 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 |
| 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 |
| 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 |
| Ang05L, Ang10L, Ang20L, Ang25L, Ang05R, Ang10R, Ang20R, Ang25R | 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) |
| Hypothesis | Independent Variable | Expected Influence | Dependent Variable |
| ModuleActivation | Accident Occurrence | ||
| HallucinationType | |||
| AffectedDomain | |||
| HallucinationConfiguration | |||
| HallucinationProbability | |||
| HallucinationPersistence |
| Metric (unit) | Description |
| Time (ms) | Timestamp |
| , , | Position and speed of AV at the moment indicated by the timestamp |
| Steering Wheel Position | Position of the steering wheel ranging from -1 to 1 commanded by the MC |
| Throttle Pedal Position | Position of throttle pedal pressure ranging from 0 to 1. 0 indicates no actuation and 1 represents full pressure |
| Brake Pedal Position | Position of brake pedal pressure ranging from 0 to 1. 0 indicates no actuation and 1 represents full pressure |
| , , | Position and speed of each vehicle at the transversal street at the moment indicated by the timestamp; to |
| 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. |
| HI Properties | LR | Df | p |
| : Module Activation | 126.7 | 1 | ¡ .001 |
| : Hallucination Type | 186.29 | 6 | ¡ .001 |
| : Affected Domain | 158.15 | 3 | ¡ .001 |
| : Hallucination Configuration | 369.72 | 17 | ¡ .001 |
| : Hallucination Probability | 385.43 | 5 | ¡ .001 |
| : Hallucination Persistence | 148.59 | 2 | ¡ .001 |
| Predictor | SS | df | MS | F | p | 90% CI [ ] | |
| : Module Activation | 11,785 | 1 | 11,785 | 6,989 | ¡.001 | 0.28 | [0.27, 0.28] |
| : Hallucination Type | 12,206 | 6 | 2,034 | 1,223 | ¡.001 | 0.29 | [0.28, 0.29] |
| : Affected Domain | 12,057 | 3 | 4,019 | 2,404 | ¡.001 | 0.28 | [0.27, 0.29] |
| : Hallucination Configuration | 12,292 | 17 | 723 | 436 | ¡.001 | 0.29 | [0.28, 0.30] |
| : Hallucination Probability | 11,856 | 5 | 2,371 | 1,409 | ¡.001 | 0.28 | [0.27, 0.29] |
| : Hallucination Persistence | 11,936 | 2 | 5,968 | 3,556 | ¡.001 | 0.28 | [0.27, 0.29] |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [0.01, 0.02] | -45.62 | ¡ .001 | |
| ModuleActivation [ON] | 3.09 | 0.34 | [2.51, 3.85] | 10.39 | ¡ .001 |
| 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 |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [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 |
| 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 |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [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 |
| 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 |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [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 |
| 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 |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [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 |
| 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 |
| Parameter | Odds Ratio | SE | 95% CI | z | p |
| (Intercept) | 0.01 | [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 |
| 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 |
| Type | OR | (m) | 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 |
| Domain | OR | (m) | Profile |
| Position | 2.40 | -1.69 | DI |
| Recognition | 4.09 | -1.62 | DI |
| Timing | 1.81 | -1.11 | LB |
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% |
| 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% |
| 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% |
| 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 from the intersection. The other vehicles start about from the intersection and accelerate from rest up to . 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. | Section III-C and Table III |
Autonomous Driving Safety Evaluation
Autonomous driving safety evaluation studies how to measure, test, and improve the safety of self-driving systems in routine and hazardous conditions.
See all 151 papers