On the Sensitivity of Instruction-tuned LLMs to Harmful Sentences in Long Inputs

Faeze Ghorbanpour, Alexander Fraser


Abstract
Large language models (LLMs) increasingly operate on long inputs, yet their behavior when harmful sentences are sparsely embedded within such inputs remains poorly understood. We present a sensitivity analysis that probes how well LLMs detect and localize harmful sentences embedded in long mixed inputs, when harmful content is sparsely distributed among non-harmful sentences. We construct long inputs by combining neutral and harmful sentences, and systematically vary four factors: input length (600–30,000 tokens), the proportion of harmful sentences (0.05–0.50), harm realization (explicit vs. implicit), and the position of harmful sentences within the input (beginning, middle, end), enabling a controlled stress-test evaluation. Experiments across toxic, offensive, and hate content, and across LLaMA-3.1, Qwen-2.5, and Mistral, reveal consistent patterns: sensitivity is non-monotonic with respect to harmful prevalence, peaking at moderate levels; sensitivity degrades as input length increases; harmful sentences placed earlier in the input are more strongly prioritized; and explicit harm is more reliably identified than implicit harm. These findings provide a systematic view of how LLMs prioritize harmful sentences in long input under controlled stress conditions, highlighting both emerging strengths and remaining challenges for safety-related use.
Anthology ID:
2026.emnlp-main.1484
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:
33923–33944
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1484/
DOI:
Bibkey:
Cite (ACL):
Faeze Ghorbanpour and Alexander Fraser. 2026. On the Sensitivity of Instruction-tuned LLMs to Harmful Sentences in Long Inputs. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 33923–33944, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
On the Sensitivity of Instruction-tuned LLMs to Harmful Sentences in Long Inputs (Ghorbanpour & Fraser, EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1484.pdf