Identify, Classify, Act: Per-Instruction Controlled Compliance for LLMs over External Data

Zesheng Shi, Xue li, Chenrui Dai, Jing Li


Abstract
LLMs over external data face a per-instruction tension: a single document or tool return often interleaves legitimate directives with adversarial prompt injections, and the model must follow the former while rejecting the latter. Existing defenses suppress or trust all external instructions, collapsing the safety-utility frontier and forcing a choice between over-refusal and over-compliance. We argue the missing capability is **per-instruction credit attribution** and formalize it as External-Data Instruction Classification, an identify-classify-act decision over each embedded directive. We propose **EDIC**, a decomposed reward framework for per-instruction compliance. A scene-grounded pipeline injects mixed beneficial and harmful instructions with counterfactual filtering, while a generative judge is initialized by SFT and refined with GRPO to attribute compliance at the instruction level. The judge then produces a reward that separately encourages beneficial compliance and penalizes harmful compliance for RL training. Across two backbones and five benchmarks, EDIC improves both safety and utility over the strongest prior defense, lifting harmful-rejection by up to 7.7% and Arena-Hard-Auto utility by 12.5% on Qwen3-4B.
Anthology ID:
2026.emnlp-main.1092
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
25072–25091
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1092/
DOI:
Bibkey:
Cite (ACL):
Zesheng Shi, Xue li, Chenrui Dai, and Jing Li. 2026. Identify, Classify, Act: Per-Instruction Controlled Compliance for LLMs over External Data. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 25072–25091, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Identify, Classify, Act: Per-Instruction Controlled Compliance for LLMs over External Data (Shi et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1092.pdf