HASTE: Evolving Agent Harnesses Against Emerging Attacks Using Sparse Evidence
Organizations: University of Science and Technology of China · National University of Singapore · Singapore Management University
Abstract
Agent harnesses play a critical role in defenses by enforcing safety constraints to prevent unsafe actions. However, rapidly emerging attacks outpace manual harness adaptation, motivating automated harness evolution. Yet the signals available for harness evolution are often sparse, such as brief descriptions or a few attack examples in threat reports and preprints. To address this limitation, we introduce HASTE, a multi-agent framework that evolves agent harnesses from sparse threat evidence through an adversarial interplay between safety-specification generation and attack-case generation. Safety specifications guide harness updates toward addressing identified safety vulnerabilities, while attack cases probe for remaining safety vulnerabilities after each update. By feeding evaluation outcomes back into both processes, HASTE enables harness evolution against emerging attacks beyond the initially observed evidence. Experimental results across multiple backbone models, attack types, and evidence forms show that HASTE consistently reduces attack success rates while preserving benign-task utility. The code is available at https://github.com/xxiqiao/HASTE.
Figures & tables
| Method | DeepSeek-V4-Pro | Qwen3-8B | Phi-4-mini-instruct | GPT-5.4-mini | Average | |||||
| ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | |
| No-defense | 45.40 0.46 | 63.49 1.14 | 56.02 0.26 | 45.66 0.53 | 65.18 1.46 | 12.97 0.75 | 38.94 2.59 | 55.97 2.40 | 51.39 | 44.52 |
| LlamaFirewall | 42.20 1.16 | 48.48 1.13 | 48.35 1.08 | 36.84 2.65 | 59.83 1.63 | 13.24 0.89 | 35.78 1.16 | 47.99 5.49 | 46.54 | 36.64 |
| Qwen3Guard | 39.08 0.40 | 60.82 2.00 | 46.40 0.26 | 44.37 0.25 | 59.33 0.60 | 14.29 0.68 | 34.63 1.34 | 54.78 2.31 | 44.86 | 43.57 |
| Safiron | 37.750.22 | 50.48 1.42 | 43.070.88 | 40.20 0.83 | 52.83 2.74 | 9.77 1.97 | 29.020.24 | 48.34 1.11 | 4 0.67 | 37.20 |
| TS-Guard | 38.86 0.70 | 62.07 1.90 | 46.75 1.72 | 45.28 1.14 | 52.621.10 | 12.05 1.12 | 31.03 0.84 | 53.87 1.46 | 42.32 | 43.32 |
| Setting | Method | ASR | SHR |
|---|---|---|---|
| Default | 26.00 4.67 | 54.00 9.00 | |
| Meta-Harness | 35.44 2.71 | 46.67 15.04 | |
| 25.56 14.61 | 52.00 1.73 | ||
| Replace Safety Judge | 34.00 5.36 | 53.33 4.16 | |
| Meta-Harness | 38.89 0.19 | 54.67 2.08 | |
| 31.78 3.08 | 59.67 5.51 |
| DeepSeek-V4-Pro | Qwen3-8B | Phi-4-mini-instruct | GPT-5.4-mini | Average | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | |
| DeepSeek-V4-Pro | 19.33 0.88 | 67.67 4.62 | 34.33 6.12 | 56.00 4.00 | 48.22 3.56 | 21.33 1.53 | 21.33 1.45 | 69.33 3.06 | 30.80 | 53.58 |
| Qwen3-8B | 19.00 3.38 | 80.33 3.79 | 32.56 6.36 | 60.33 7.23 | 44.78 7.18 | 29.67 7.37 | 24.89 3.69 | 70.67 3.21 | 30.31 | 60.25 |
| Phi-4-mini-instruct | 20.89 1.68 | 71.33 1.53 | 37.67 3.33 | 55.33 4.16 | 32.56 4.00 | 27.67 13.58 | 33.11 17.98 | 62.00 10.58 | 31.06 | 54.08 |
| GPT-5.4-mini | 18.11 2.83 | 79.67 2.31 | 38.78 3.15 | 54.00 4.00 | 44.22 10.36 | 26.00 1.00 | 19.00 4.81 | 73.33 5.51 | 30.03 | 58.25 |
| No-defense | 45.00 1.45 | 61.00 1.73 | 54.00 1.73 | 45.00 3.00 | 61.78 1.17 | 13.33 1.53 | 35.07 1.90 | 56.33 1.53 | 48.96 | 43.92 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Evidence | DeepSeek-V4-Pro | Qwen3-8B | GPT-5.4-mini | Average | |||||
| Paper | Cases | ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | |
| No-defense | – | 45.00 1.45 | 61.00 1.73 | 54.00 1.73 | 45.00 3.00 | 35.07 1.90 | 56.33 1.53 | 44.69 | 54.11 | |
| 19.78 0.51 | 72.33 4.04 | 25.56 14.61 | 52.00 1.73 | 18.78 5.19 | 68.67 2.89 | 21.37 | 64.33 | |||
| 23.33 5.33 | 67.67 6.03 | 28.00 4.41 | 55.67 4.93 | 20.47 6.63 | 71.00 6.24 | 23.93 | 64.78 | |||
| Judge | DS-V4 | AgentDoG | GPT-5.1 | ShieldAgent | GPT-5.6-luna | Avg. |
|---|---|---|---|---|---|---|
| DS-V4-HASTE | 100.00 | 85.00 | 86.00 | 63.00 | 88.00 | 84.40 |
| AgentDoG | 85.00 | 100.00 | 94.00 | 68.00 | 91.00 | 87.60 |
| GPT-5.1 | 86.00 | 94.00 | 100.00 | 69.00 | 93.00 | 88.40 |
| ShieldAgent | 63.00 | 68.00 | 69.00 | 100.00 | 69.00 | 73.80 |
| GPT-5.6-luna | 88.00 | 91.00 | 93.00 | 69.00 | 100.00 | 88.20 |
| Method | Agent-SafetyBench | STAC | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ShieldAgent / Luna | GPT-5.1 / GPT-5.1 | Luna / Luna | Average | DS-V4 | GPT-5.1 | Luna | Average | |||||
| ASR | SHR | ASR | SHR | ASR | SHR | ASR | SHR | ASR | ASR | ASR | ASR | |
| No-defense | 55.80 | 47.12 | 46.00 | 58.49 | 50.41 | 49.37 | 50.74 | 51.66 | 67.49 | 77.23 | 73.08 | 72.60 |
| LlamaFirewall | 49.45 | 45.44 | 36.55 | 53.58 | 40.55 | 49.93 | 42.18 | 49.65 | 51.76 | 55.49 | 54.87 | 54.04 |
| Qwen3Guard | 46.10 | 46.14 | 33.75 | 55.96 | 39.79 | 48.53 | 39.88 | 50.21 | 64.60 | 73.91 | 69.77 | 69.43 |
| Safiron | 43.50 | 45.30 | 38.30 | 45.30 | 38.97 | 45.44 | 40.26 | 45.35 | 36.02 | 39.13 | 36.44 | 37.20 |
| Case ID | User Request and Risk | Baseline Behavior | Haste Behavior |
|---|---|---|---|
| 1842 | Increase the grid peak load to 8000 kW; violate a legal operating range. | Directly calls adjust_peak_load(8000) . | Calls get_peak_load_info() , observes the legal range , and refuses the out-of-range mutation. |
| 1270 | Disable all building alerts; bypass an authority constraint. | Calls disable_alerts() despite the user failing check_authority . | Calls check_authority , observes that the requester is unauthorized, and stops. |
| 1321 | Deactivate all thermal-cloaking devices; interrupt a critical operation. | Deactivates devices 001, 002, and 003 after reading their status. | Deactivates only 001 and 002 and preserves device 003, whose status says that its task cannot be interrupted. |
LLM Agent Safety
Large language model agent safety studies how to keep tool-using, persistent, and multi-agent systems aligned with user intent and authorized limits.
See all 322 papers