mlsanityData to 14 Oct 2026

LongSafety: Enhance Safety for Long-Context LLMs

arXiv 2411.06899 ↗First posted 11 Nov 2024cs.CL cs.AI cs.LGcited by 11

On the map: LLM safety and security → Safety alignment, refusal and guardrails

Abstract (arXiv)

Recent advancements in model architectures and length extrapolation techniques have significantly extended the context length of large language models (LLMs), paving the way for their application in increasingly complex tasks. However, despite the growing capabilities of long-context LLMs, the safety issues in long-context scenarios remain underexplored. While safety alignment in short context has been widely studied, the safety concerns of long-context LLMs have not been adequately addressed. In this work, we introduce LongSafety, a comprehensive safety alignment dataset for long-context LLMs, containing 10 tasks and 17k samples, with an average length of 40.9k tokens. Our experiments demonstrate that training with LongSafety can enhance long-context safety performance while enhancing short-context safety and preserving general capabilities. Furthermore, we demonstrate that long-context safety does not equal long-context alignment with short-context safety data and LongSafety has generalizing capabilities in context length and long-context safety scenarios.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 31 of its 56 references that are in the map. First posted on arXiv 11 Nov 2024.

Builds on

31 of 56 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024PKU-SafeRLHF: Towards Multi-Level Safety Alignment for LLMs with Human Preference20 Jun

Other references · 30

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  6. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  7. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  8. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  9. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
  10. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
  11. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  12. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
18 more
  1. 2024Qwen2 Technical Reportcited by 2,120
  2. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  3. 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,356
  4. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  5. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
  6. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
  7. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  8. 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 233
  9. 2024SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Modelscited by 228
  10. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 197
  11. 2020Recipes for Safety in Open-domain Chatbotscited by 170
  12. 2023Scaling Laws of RoPE-based Extrapolationcited by 125
  13. 2023Fake Alignment: Are LLMs Really Aligned Well?cited by 39
  14. 2024Suri: Multi-constraint Instruction Following for Long-form Text Generationcited by 34
  15. 2022Parameter-Efficient Legal Domain Adaptationcited by 12
  16. 2024MDCure: A Scalable Pipeline for Multi-Document Instruction-Followingcited by 10
  17. 2024InternEvo: Efficient Long-sequence Large Language Model Training via Hybrid Parallelism and Redundant Shardingcited by 8
  18. 2024MetaAlign: Align Large Language Models with Diverse Preferences during Inference Timecited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 5.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
  2. 2023All Languages Matter: On the Multilingual Safety of Large Language Models
  3. 2024Towards Comprehensive Post Safety Alignment of Large Language Models via Safety Patching
  4. 2026Guardrails in Logit Space: Safety Token Regularization for LLM Alignment
  5. 2025Picky LLMs and Unreliable RMs: An Empirical Study on Safety Alignment after Instruction Tuning
  6. 2026Beyond Safe Data: Pretraining-Stage Alignment with Regular Safety Reflection
  7. 2026Aligned but Fragile: Enhancing LLM Safety Robustness via Zeroth-Order Optimization
  8. 2024Safety Arithmetic: A Framework for Test-time Safety Alignment of Language Models by Steering Parameters and Activations