Safety guardrails trained on short text suffer a 50% drop in unsafe recall when context length increases to 32k tokens. LongGuard identifies this as a 'Safety Needle-in-a-Haystack' problem where the unsafe signal is proportionally diluted rather than lost to absolute length. The framework uses a three-layer attention-logit-behavior analysis to pinpoint the mechanistic failure in attention mechanisms across 15 mainstream guardrails.
- Guardrails degrade significantly on long contexts, losing over 50% unsafe recall.
- Failure is caused by proportional dilution of the unsafe signal, not just length.
- LongGuard provides a training-free mitigation framework for these edge cases.
- Attention logit analysis reveals specific mechanistic failure points in models.
- Evaluation should include SafetyNIAH tests, not just short-text benchmarks.