Fault Injection Attacks on Q-Learning: Analysis, Vulnerabilities, and CountermeasuresFault Injection Attacks on Q-Learning: Analysis, Vulnerabilities, and Countermeasures
The authors perform voltage and clock glitch fault injection on five Q-Learning implementations on the ChipWhisperer platform, stating that every component can be attacked, and that a single +Inf in a traffic light controller worsens waiting time by 148×.
The attacker has physical access to the device and injects faults using voltage glitches and clock glitches; it is assumed that the attacker knows the device deploys online RL and the specific variant, has white-box knowledge of the implementation but does not need to know the learned parameters; the goal is to disrupt the learning process during training or manipulate action selection during inference; the experiments use a firmware trigger for synchronization, injecting one glitch event per target execution.
- The threat of hardware fault injection to machine learning systems has been studied, but its impact on reinforcement learning has received little attention, even though RL is being used in safety-critical scenarios such as robotics and autonomous driving. The authors focus on the impact of voltage and clock glitches on each component of online Q-Learning.
- On the ChipWhisperer Husky platform, five Q-Learning variants—Standard, Robust, Resilient (triple modular redundancy), Linear, and Deep—are implemented in C, glitch parameters are searched with Optuna, and the reward computation, action selection, learning update, and inference-time greedy policy are each attacked during training, and an online traffic light controller is evaluated in SUMO traffic simulation.
- The authors state that the learning and inference components of all five implementations can be attacked by at least one type of glitch; Robust's environmental robustness does not defend against hardware attacks; TMR can correct single-replica corruption but the shared input and voting code are unprotected; in the traffic-light controller a single +Inf worsens waiting time by 148×, and voltage glitches cannot reproducibly flip its two-action greedy policy.
- The authors note: the experiments use only one microcontroller and a self-written C implementation, so the effects may not transfer; they use a simulated environment rather than a physical system; they depend on firmware triggers; search coverage differs across experiments; the recovery experiments use inserted values and a different learning rate and map; the traffic-light impact experiment has only 3 repetitions and reports no confidence intervals.
- Evaluated models
- Standard Q-Table-based Q-LearningRobust Q-LearningResilient Q-LearningLinear Q-LearningDeep Q-Learning (DQN)Traffic controller (tabular Q-learning agent)
- Benchmarks
- Frozen Lake (Gymnasium)SUMO-RL / SUMO 交通仿真
- Metrics
- 故障成功次数/比例策略恢复所需 episode 数累积车辆等待时间平均队列长度
The paper evaluates five Q-Learning variants—Standard, Robust, Resilient, Linear, and Deep—using voltage glitch and clock glitch attacks on the ChipWhisperer platform. In the standard Q-table implementation, faults corrupt reward computation, action selection, and Q-value updates during the learning phase, and change the selected action at inference time; the Robust variant cannot prevent the attacks, and NaN and infinity values injected during learning remain in the Q table; the Resilient variant, which uses triple modular redundancy plus majority voting, can correct corruption of a single Q-table replica, but shared inputs such as rewards and the voting code itself are not within the protection scope; in the Linear and Deep variants, stored weights are corrupted during learning, and actions are changed at inference time. In a case study of an online traffic-light controller in a microscopic traffic simulator, a single injected infinity value worsened cumulative vehicle waiting time by 148 times, while Q-table corruption was under 4%; triple modular redundancy corrected the injected faults in the authors' tests, but glitch attacks could still halt the device.
Paper analysis
What problem does this paper attempt to solve?
Research on the impact of hardware fault injection on reinforcement learning implementations is lacking; the authors systematically analyze the vulnerability of five Q-Learning variants under voltage/clock glitches and countermeasures.
Core problem: the impact of hardware fault injection (voltage glitches, clock glitches) on reinforcement learning implementations has been barely studied; this paper analyzes the vulnerability of Q-Learning variants under such attacks and defenses.
- Scenario and importance: the authors note that RL is being used in safety-critical scenarios such as robotics and autonomous driving, and that RL systems learn continuously and make real-time decisions, which may make them more sensitive to hardware faults than static supervised models after training.
- Gaps in existing work: the authors state that existing fault injection studies mainly target supervised learning models; hardware fault research on RL (e.g., learning-based navigation systems) evaluates fault tolerance from a reliability perspective rather than deliberate attacks.
- Core observation: Robust Q-Learning is designed for environmental uncertainty, and the authors want to verify whether it can defend against targeted hardware attacks; Resilient Q-Learning uses triple modular redundancy, and the authors want to verify its protection boundary.
- What the paper proposes: a fault injection security analysis of five Q-Learning implementations—Standard, Robust, Resilient, Linear, and Deep—on the ChipWhisperer platform, and an online traffic light controller case in the SUMO microscopic traffic simulator.
- Threat model (Section 4):
- Goal: inject faults during training to disrupt the learning process and obtain a suboptimal policy, or inject faults during inference to manipulate action selection.
- Knowledge: the attacker knows the device deploys online RL and may know the specific variant; has white-box knowledge of the implementation but does not need to know the learned parameters.
- Capability: physical access to the device, using voltage/clock glitches against functions such as reward computation, action selection, and value update; in the experiments, one glitch event (which may contain multiple pulses) is injected per target execution.
- Victim system: an RL agent running on a microcontroller (ChipWhisperer Husky + CW312T-SAM4S target board); the experiments use a firmware trigger for synchronization, and the authors note that a real attacker would need to derive timing from other observable events.
What related research exists?
Related work falls into three categories: remote and physical fault injection against ML, RL fault tolerance and robustness research, and Q-Learning variants themselves; the authors state that no prior work has performed deliberate glitch attacks against RL.
Fault injection attacks against ML
- Remote attacks: DeepHammer and DeepVenom (Yao et al., 2020/2024) use Rowhammer bit flips to reduce model accuracy or implant backdoors; Terminal Brain Damage (Hong et al., 2019) studies the impact of random bit corruption on neural network weights, biases, and activations; Lightning (Sun et al., 2023) uses DVFS to create transient faults on GPU accelerators; Dong et al. (2023) show that training-phase bit flips make models prone to conversion into malicious variants at deployment.
- Physical attacks: Liu et al. (2020) use clock glitches to attack convolution layer operations; Khoshavi et al. (2020) inject faults into quantized neural network accelerators; Breier et al. (2018) use laser fault injection to disrupt activation functions. The authors note that these studies mainly target supervised learning models.
- Hardware faults in RL: Wan et al. (2021, 2022) analyze the fault tolerance of learning-based navigation systems from a reliability perspective; the authors state that, to their knowledge, deliberate voltage and clock glitch attacks on RL implementations have received little attention (Appendix Table 5 states that none of the listed prior work targets RL).
RL robustness and fault tolerance
- Robust RL (Morimoto & Doya 2005; Tessler et al. 2019), fault-tolerant control (Abbaspour et al. 2020, etc.), adversarial RL (Pinto et al. 2017; Pan et al. 2019): the authors note that these methods target environmental noise, actuator faults, and sensor errors, and do not consider deliberate hardware attacks.
- Robust Q-Learning (Wang & Zou 2021): performs worst-case optimization over an uncertainty set of the transition model; this paper implements its reward form to test whether environmental robustness brings hardware security.
Q-Learning variants and redundancy techniques
- Embedded hardware implementations of tabular Q-Learning (Spanò et al. 2019); Linear Q-Learning (Melo & Ribeiro 2007); Deep Q-Learning (Mnih et al. 2013, 2015).
- Triple modular redundancy (Lyons & Vanderkulk 1962): a classic fault tolerance technique, used in this paper as a baseline countermeasure; the authors note that it is not specific to RL.
Positioning: the authors state that this paper differs from the above work in focusing on RL, evaluating multiple implementations from Q-Table to Linear and Deep Q-Learning, and considering both unprotected and protected implementations (Appendix B). This paper has no comparative baseline experiments against other attack methods; the benchmark environments are Frozen Lake (Gymnasium) and SUMO-RL traffic simulation.
How does the paper address this problem?
Five Q-Learning variants are implemented in C on ChipWhisperer, glitch parameters are searched with Optuna, and the reward computation, action selection, and update during learning and the greedy policy during inference are each attacked.
Overall approach: implement five Q-Learning variants in C on real hardware (ChipWhisperer Husky + SAM4S microcontroller), inject voltage and clock glitches into each component of the RL loop separately, search the parameter space with Optuna for successful faults, then analyze the faults' effect on policy and the protection boundary of the triple modular redundancy countermeasure.
Q-Learning variants evaluated
- Standard Q-Table: Stores exact state-action values, with update Q(s,a) ← (1−α)Q(s,a) + α[r + γ maxa′ Q(s′,a′)], i.e., the standard temporal-difference update; Frozen Lake defaults α=0.7, γ=0.9.
- Robust Q-Learning: Implemented with the reward form of Wang & Zou (2021), the update includes a minimization over all state values V(s) (R-contamination model); experiments use α=0.8, γ=0.96, R=0.2.
- Resilient Q-Learning: The Q table is replicated three times, with majority voting after action selection and updates; immediately after an update, the just-written cell is synchronized across replicas by voting, correcting single-replica corruption.
- Linear Q-Learning: Approximates Q values with a weighted sum of features, Q(s,a) = ∑i=0n−1 wia fi(s); implements 16-feature (one-hot), 8-feature, and 4-feature versions with α of 0.7, 0.001, and 0.01 respectively, each using a different map.
- Deep Q-Learning: One-hot state input, one 16-unit hidden layer (ReLU) plus a 4-output linear layer, 340 parameters total; includes experience replay and a target network, using the AIfES framework and the Adam optimizer.
Attack surface division
- Learning-phase targets: reward computation (corrupting the training signal), action selection (ε-greedy branch), learning update (directly corrupting Q-table entries or weights).
- Inference-phase targets: greedy policy evaluation (argmax comparison chain); a fault can transiently change the action without corrupting stored values.
- In table-based implementations, rewards are computed on-device; for Linear, features and rewards are sent by the host; for Deep Q-Learning, the environment runs inside the device firmware during training.
Fault injection and parameter search
- Platform: ChipWhisperer Husky controls the target board, the environment runs on the host, SimpleSerial communication; firmware raises a trigger signal before and after the target function, and glitches are timed by clock cycles after the trigger (External Offset).
- Parameters: Width, Offset (phase step, 4592 steps per cycle), External Offset (clock cycles), Repeat (number of pulses, voltage glitches only); the total search space is in Table 2 (Width/Offset 0–4400, Repeat 1–12), and each experiment uses narrower bounds and step sizes within this range.
- Search: Optuna maximizes each experiment's custom success criterion; the authors note that criteria and bounds differ across experiments, so fault counts are not comparable across implementations.
Impact evaluation methods
- Policy level: Compare post-fault Q tables/weights with reference values, plot Frozen Lake policy maps; for Linear, simulate faults by insertion (inserting 10 values such as −∞, −1e30, …, NaN, ∞ one at a time into 12–13 weight positions) and run up to 600 episodes to observe whether it recovers to any optimal policy.
- System level: In a SUMO-RL single-intersection scenario (256 states, 2 phase actions, α=0.1, γ=0.99, ε=0.05, 20,000-second episodes, a decision every 5 seconds), attack an online traffic-light controller and measure cumulative waiting time and queue length.
What experiments did the paper conduct?
Voltage/clock glitch experiments are performed separately on the learning and inference components of five implementations, and validated on a SUMO traffic-light controller: a single +Inf worsens waiting time by 148×, and TMR corrected all 72 injected faults.
Experimental setup
- Implementations tested: Standard, Robust, Resilient (triple modular redundancy), Linear (16/8/4 features), Deep Q-Learning (340 parameters), all written in C by the authors, with Deep using the AIfES framework; there is no learned baseline model, and Resilient serves as the baseline countermeasure.
- Hardware: ChipWhisperer Husky + CW312T-SAM4S target board (7.37 MHz); the environment runs on the host.
- Environments: Frozen Lake 4×4 (Gymnasium, 16 states, 4 actions); SUMO-RL single intersection (256 states, 2 actions).
- Success criteria: defined per experiment (e.g., Q-table differs from reference, output action changes, weights differ from reference snapshot); the authors note that criteria and search bounds differ, so counts are not comparable across implementations.
- Repetitions: action branch experiments use 20 attempts per configuration; Deep training experiments use 3 attempts per configuration; the traffic light impact experiment uses 3 repetitions averaged; the paper does not report confidence intervals.
Main results
According to Table 4 (summary of results across implementations):
Swipe horizontally to read the table
Implementation Learning-phase faults Inference-phase faults Recovery/protection Standard Voltage and clock faults corrupt Q values (including NaN/Inf) Voltage and clock faults change the selected action Real-valued errors decay with subsequent updates; NaN/Inf can persist Robust Same fault types as Standard Same code as Standard, similar faults No protection against hardware faults shown Resilient Single-replica corruption is corrected; in 21,150 full-training trials, the table was still changed in 58 Voltage faults still change actions; clock glitches largely unsuccessful Protects stored Q values, not shared inputs and voting code Linear Voltage faults corrupt weights (including extreme values and Inf) Voltage and clock faults change actions; the most consistent voltage faults are in the first 100 cycles Real-valued insertion recovers 23/23, 26/56, 35/48; non-real values rarely recover Deep Q In the best trial of each target episode, all 340 weights become NaN Voltage and clock faults transiently change actions Not evaluated Traffic light controller A single +Inf persists for 100 episodes, waiting time rises 148× Voltage glitches produce no reproducible action flips; clock glitches not tested TMR corrects 72/72 injected faults; 128 of 200 attempts shut down the device - The authors state that every tested component is vulnerable to at least one glitch method; clock glitches are more reproducible than voltage glitch results in their experiments.
- The authors state that Robust Q-Learning's algorithmic robustness to environmental uncertainty cannot defend against targeted hardware attacks.
Standard Q-Learning component-level experiments
- Reward computation: voltage faults produce reward values of about 2.123, NaN, and less than −1e37; the stored reward array is not modified, each fault affects only one update, but NaN cannot be recovered by subsequent updates; clock glitches have no observable effect (single-cycle memory load).
- Action selection: for voltage faults, the most consistent configuration at ε=1 takes the greedy branch 17 of 20 times, and at ε=0 takes the random branch 2 of 20 times; clock glitches can force constant exploration or constant exploitation.
- Learning update: both glitch types can inject NaN/Inf; positive Inf makes the policy prefer actions that reach the faulted state, while NaN causes all actions except action 0 (LEFT) to be avoided; for clock glitches, External Offset is a key parameter.
- Inference: of 37 voltage fault configurations examined in detail on states 0, 4, and 8, 9 produce the UP action in 92–100% of non-crashing outputs, of which 3 output UP in all 20 attempts per state; out-of-range actions (a∉[0,3]) also occur.
Linear and Deep Q-Learning
- Linear recovery experiments (Table 3): for 16 features (one-hot), all 23 cases where real-valued insertion changed the policy recovered (median 3 episodes); for 8 features, 26 of 56 cases recovered; for 4 features, 35 of 48 cases recovered; after non-real-valued changes to the policy, recovery was rare (2/30, 4/29, 4/25). The authors note that the three experiments use different maps and learning rates, so the differences cannot be attributed solely to feature sharing.
- Deep training phase: voltage glitches in trials at episodes 1/100/199 produced 2,972/10,000, 3,458/10,000, and 3,128/10,673 instances of weights differing from the reference; in the best trial of each episode, all 340 weights become NaN (Figure 15–17).
- Deep inference phase: a full-window 200-cycle grid search produced wrong actions in 454 of 103,437 trials (0.44%); a single-cycle focused search produced 7,753/262,433 (2.95%) when External Offset ≤200 and 2,362/110,000 (2.15%) at 1000–2000; the authors note that these rates come from adaptive searches with different bounds, are not comparable with other implementations, and cover only part of the inference window.
Traffic light controller (SUMO)
- Learning phase: voltage glitches produce real-valued over/underestimates and ±Inf (+Inf concentrated in two narrow bands at about 380–410 and 500–560 cycles, −Inf in a window of about 6 cycles at 377–383), with no NaN observed; after injecting a single +Inf and stopping glitching, cumulative waiting time rises from about 133 s to about 19,500 s (about 148×), average queue length rises from about 7 vehicles to about 35 (about 4.9×), there is no recovery within 100 episodes, and only about 4% of the Q-table (about 20/512 cells) is corrupted (Figure 21).
- Inference phase: sweeping a 221-cycle window, 4,520 glitches per state produced 0 action flips, and 99–100% of attempts crashed the device; a wider search and a retest across all 256 states also produced no reproducible flips. The authors state that in this experiment inference-phase voltage faults manifest as denial of service rather than policy manipulation; clock glitches were not evaluated.
- Resilient (TMR): of 200 glitched updates, 72 (36%) injected faults and 128 (64%) shut down the device; all 72 injected faults were corrected by post-update majority voting (within a residual threshold of 1e-3). The authors note four points: the injection rate fluctuates between 30–48% across sessions; redundancy turns the attack surface into denial of service; glitches target only the update, not the voting step; traffic performance under attack was not measured.
Other ablations and analyses
- Robust update corruption distribution (Figure 5): some faulted values are close to the correct value, while others reach 1e15–1e38 and Inf.
- Resilient update attack (Figure 28): in 21,150 full-training trials, the table was changed in 58, 6 of which contained infinite values.
- Resilient clock glitches (Figure 34): within the first 200 cycles (of 1,938 total), only 4 External Offset values produce faulted outputs, all Inf.
- Countermeasure overhead (Table 6): three replicas increase firmware size by 6.6%, learning update from 749→1,938 cycles (2.6×), inference from 376→1,029 cycles (2.7×), and Q-table storage from 256→768 bytes.
- Deep clock glitches (Figure 18): successful glitches occur most often at about 1200–2200 cycles; the table and linear implementations yield hundreds of valid parameter sets within the first 400 cycles.
What are some points that can be further explored?
The authors list limitations such as a single platform, reliance on a trigger, and incomplete search coverage, and plan to extend defenses to other RL paradigms, real triggers, and other microcontrollers.
Limitations and future directions noted by the authors
- Single platform and implementation (Section 12 Limitations): all experiments use one microcontroller and the authors' own C implementation; fault effects and parameters may not transfer to other devices or libraries.
- Simulated environments (Section 12): evaluation uses Frozen Lake and a simulated intersection, not a physical system.
- Reliance on a firmware trigger (Section 12; Section 4 notes that a real attacker would need to derive timing from other observable events and profile the same device in advance).
- Incomplete search coverage (Section 12): search coverage differs across experiments; the clock glitch sweep and the Deep Q-Learning search cover only part of the target window.
- Measurement limitations (Section 12): recovery experiments use inserted values and different learning rates and maps; the traffic light impact experiment uses 3 repetitions; no confidence intervals are reported.
- Future directions (Section 13 Conclusion): the authors plan to extend defenses to other RL paradigms, evaluate attacks with real triggers and other microcontrollers, and study the feasibility of efficient algorithm-level countermeasures; Section 12 P3 states that developing countermeasures that are themselves more fault-resistant should be a key future direction; P5 proposes a check rejecting NaN/Inf before writing as a candidate countermeasure (not evaluated, and the check itself may be faulted).
Scope of experimental coverage
- The implementations tested are Standard, Robust, Resilient, Linear (16/8/4 features), and Deep Q-Learning, all written in C by the authors and running on the same SAM4S target board.
- The environments are Frozen Lake 4×4 and a SUMO-RL single-intersection simulation; the traffic light controller is tested only with voltage glitches, and the paper states that clock glitches were not evaluated (Section 11.2).
- One glitch event is injected per target execution; the paper states that an attacker corrupting multiple replicas within the same update was not evaluated (Section 4, Section 8).
- Robust's reward computation and action selection were not re-experimented (same code as Standard); Linear 8/4-feature learning and inference were not re-searched for faults (same code as 16 features); Resilient's reward and action selection were not re-experimented.
- The paper does not report the total query budget of each fault search (except Deep inference, which states 10,000 focused searches taking about 4–8 hours), and does not report confidence intervals; the clock glitch figures cover only the first 200 cycles for the table/linear functions and about the first 4000 cycles for Deep inference.
Summarize the main content of the paper
Hardware fault injection analysis of five Q-Learning implementations: every component can be attacked by voltage or clock glitches, algorithmic robustness does not defend against hardware attacks, TMR protects only stored values, and in the traffic-light case a single +Inf worsens waiting time by 148×.
A hardware fault injection security analysis targeting reinforcement learning: the authors attack five Q-Learning implementations with voltage and clock glitches on the ChipWhisperer platform, evaluating the vulnerability of each component during learning and inference and a triple modular redundancy countermeasure.
- Problem: fault injection research mostly targets supervised models, and RL use in safety-critical scenarios is increasing, but the impact of its continuous learning and real-time decision-making characteristics on hardware faults is understudied.
- Method: five variants—Standard, Robust, Resilient (triple modular redundancy + majority voting), Linear (16/8/4 features), and Deep (340 parameters)—are implemented in C, glitch parameters are searched with Optuna, and the reward computation, ε-greedy action selection, value update, and greedy inference are each attacked; the environments are Frozen Lake and SUMO-RL traffic simulation.
- Main results:
- The authors state that every tested component is vulnerable to at least one glitch; in the standard implementation, voltage faults turn rewards into about 2.123, NaN, or less than −1e37, clock glitches can force constant exploration/constant exploitation, and the most consistent inference-phase voltage configuration forces the UP output in 92–100% of cases on states 0, 4, and 8.
- Robust Q-Learning's environmental robustness cannot defend against hardware attacks, and updates are still injected with NaN/Inf; Resilient corrects single-replica corruption, but shared inputs such as rewards and the voting code are outside its protection, and in 21,150 full-training trials the table was still changed in 58.
- In the best Deep Q-Learning training trial, all 340 weights become NaN; inference-phase faults transiently change actions.
- In the traffic light controller, a single +Inf raises cumulative waiting time from about 133 s to about 19,500 s (148×), corrupting only about 4% of the Q-table with no recovery within 100 episodes; its two-action greedy policy shows no reproducible flips under 4,520 voltage glitches per state, and 99–100% of attempts shut down the device; TMR corrected all 72 injected faults, but 128 of 200 attempts shut down the device.
- Authors' conclusions: faults written to the table can persist after the attack stops, so the attacker does not need continuous access; redundancy turns the attack surface into detectable denial of service; the authors plan to extend defenses to other RL paradigms, evaluate with real triggers and other microcontrollers, and study efficient algorithm-level countermeasures.