LongSafety: Evaluating Long-Context Safety of Large Language Models
Not on the map. Why?
Abstract (arXiv)
As Large Language Models (LLMs) continue to advance in understanding and generating long sequences, new safety concerns have been introduced through the long context. However, the safety of LLMs in long-context tasks remains under-explored, leaving a significant gap in both evaluation and improvement of their safety. To address this, we introduce LongSafety, the first comprehensive benchmark specifically designed to evaluate LLM safety in open-ended long-context tasks. LongSafety encompasses 7 categories of safety issues and 6 user-oriented long-context tasks, with a total of 1,543 test cases, averaging 5,424 words per context. Our evaluation towards 16 representative LLMs reveals significant safety vulnerabilities, with most models achieving safety rates below 55%. Our findings also indicate that strong safety performance in short-context scenarios does not necessarily correlate with safety in long-context tasks, emphasizing the unique challenges and urgency of improving long-context safety. Moreover, through extensive analysis, we identify challenging safety issues and task types for long-context models. Furthermore, we find that relevant context and extended input sequences can exacerbate safety risks in long-context scenarios, highlighting the critical need for ongoing attention to long-context safety challenges. Our code and data are available at https://github.com/thu-coai/LongSafety.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 13 of its 24 references that are in the map. First posted on arXiv 24 Feb 2025.
Builds on
13 of 24 references.
References · 13
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,121
- 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 560
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
- 2024SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Modelscited by 228
- 2023Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritizationcited by 170
- 2024Cognitive Overload Attack:Prompt Injection for Long Contextcited by 13
1 more
- 2024LongSafety: Enhance Safety for Long-Context LLMscited by 11
Built on by
Citing papers per year: 2025: 4; 2026: 8.
12 papers.
- 2025ShieldVLM: Safeguarding the Multimodal Implicit Toxicity via Deliberative Reasoning with LVLMscited by 7
- 2026The Side Effects of Being Smart: Safety Risks in MLLMs' Multi-Image Reasoningcited by 3
- 2025Jailbreaking in the Haystackcited by 2
- 2025HauntAttack: When Attack Follows Reasoning as a Shadowcited by 1
- 2025Beyond Context: Large Language Models' Failure to Grasp Users' Intentcited by 1
- 2026Learning of Robot Safety Policies via Adversarial Synthetic Scenarioscited by 1
- 2026FinRED: An Expert-Guided Benchmark Generation and Evaluation Framework for Financial LLM Red-Teamingcited by 1
- 2026Long-Term Simulation Exposes Cognitive-Developmental Risks in AI Companionscited by 1
- 2026Structured Semantic Cloaking for Jailbreak Attacks on Large Language Modelscited by 0
- 2026Oyster-II: Reinforcement Learning for Constructive Safety Alignment in Large Language Modelscited by 0
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systemscited by 0
- 2026DistressBench: Evaluating Multi-Dimensional Crisis Support in Large Language Modelscited by 0
- 2026DistressBench: Evaluating Multi-Dimensional Crisis Support in Large Language Models8 Oct 2026
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systems20 Sep 2026
- 2026Oyster-II: Reinforcement Learning for Constructive Safety Alignment in Large Language Models3 Jul 2026
- 2026Long-Term Simulation Exposes Cognitive-Developmental Risks in AI Companions24 Jun 2026
- 2026FinRED: An Expert-Guided Benchmark Generation and Evaluation Framework for Financial LLM Red-Teaming18 Jun 2026
- 2026Learning of Robot Safety Policies via Adversarial Synthetic Scenarios4 Jun 2026
- 2026Structured Semantic Cloaking for Jailbreak Attacks on Large Language Models17 Mar 2026
- 2026The Side Effects of Being Smart: Safety Risks in MLLMs' Multi-Image Reasoning20 Jan 2026
- 2025Beyond Context: Large Language Models' Failure to Grasp Users' Intent24 Dec 2025
- 2025Jailbreaking in the Haystack5 Nov 2025
- 2025HauntAttack: When Attack Follows Reasoning as a Shadow8 Jun 2025
- 2025ShieldVLM: Safeguarding the Multimodal Implicit Toxicity via Deliberative Reasoning with LVLMs20 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025CASE-Bench: Context-Aware SafEty Benchmark for Large Language Models
- 2023All Languages Matter: On the Multilingual Safety of Large Language Models
- 2024SafetyPrompts: a Systematic Review of Open Datasets for Evaluating and Improving Large Language Model Safety
- 2025Investigating the Impact of Quantization Methods on the Safety and Reliability of Large Language Models
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety
- 2026SafeSci: Safety Evaluation of Large Language Models in Science Domains and Beyond
- 2024ToolSword: Unveiling Safety Issues of Large Language Models in Tool Learning Across Three Stages
- 2024Large Language Model Safety: A Holistic Survey