Hardware supply-chain attacks are an established threat, and untrusted suppliers co-designing large language models (LLMs) with edge accelerators may access both model weights and hardware designs. A malicious supplier can split a backdoor across them, so a trigger induces an attacker-chosen response only when the modified model and accelerator run together. HAMLOCK demonstrated this threat for image classification, but extending it to generation requires redesigning trigger detection and payload realization. When adapting HAMLOCK to LLMs, larger activations improve trigger detection across diverse trigger positions and context, but are also easier for model-level defenses to detect. We generalize trigger detection to regions of joint activation space that clean inputs rarely reach. Relative orderings among a few activations define such regions without requiring outlier activations or complex hardware. The hardware also distinguishes prompt processing from decoding, allowing the attack to activate on self-generated triggers that the model produces itself even when the input prompt contains no trigger. For payload realization, HAMLOCK's fixed output bias cannot generate coherent, input-dependent responses. We instead encode response behavior in the edited model weights and activate it with a rare activation key supplied only by the compromised hardware. Across three models and three tasks, our attack achieves up to 99.5% success with triggers in input prompts and 99.9% with self-generated triggers on targeted refusal tasks. It preserves the benign utility, evades representative model-level defenses and RTL-level hardware inspections without defense-specific optimization, and adds negligible hardware overhead.
翻译:暂无翻译