mlsanityData to 14 Oct 2026

Backtracking for Safety

arXiv 2503.08919 ↗First posted 11 Mar 2025cs.CL cs.AIcited by 4

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

Abstract (arXiv)

Large language models (LLMs) have demonstrated remarkable capabilities across various tasks, but ensuring their safety and alignment with human values remains crucial. Current safety alignment methods, such as supervised fine-tuning and reinforcement learning-based approaches, can exhibit vulnerabilities to adversarial attacks and often result in shallow safety alignment, primarily focusing on preventing harmful content in the initial tokens of the generated output. While methods like resetting can help recover from unsafe generations by discarding previous tokens and restarting the generation process, they are not well-suited for addressing nuanced safety violations like toxicity that may arise within otherwise benign and lengthy generations. In this paper, we propose a novel backtracking method designed to address these limitations. Our method allows the model to revert to a safer generation state, not necessarily at the beginning, when safety violations occur during generation. This approach enables targeted correction of problematic segments without discarding the entire generated text, thereby preserving efficiency. We demonstrate that our method dramatically reduces toxicity appearing through the generation process with minimal impact to efficiency.

Key facts. Cited by 4 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 30 of its 45 references that are in the map. First posted on arXiv 11 Mar 2025.

Builds on

30 of 45 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024Does Safety Training of LLMs Generalize to Semantically Related Natural Prompts?4 Dec
  2. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
  3. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct

Other references · 27

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2022Training language models to follow instructions with human feedbackcited by 15,971
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  6. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  7. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  8. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  9. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  10. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
  11. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  12. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
15 more
  1. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
  2. 2022LaMDA: Language Models for Dialog Applicationscited by 1,220
  3. 2020Aligning AI With Shared Human Valuescited by 723
  4. 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
  5. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 486
  6. 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 451
  7. 2018Scalable agent alignment via reward modeling: a research directioncited by 447
  8. 2023Large Language Model Alignment: A Surveycited by 243
  9. 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 231
  10. 2023Large Language Model Guided Tree-of-Thoughtcited by 221
  11. 2021Alignment of Language Agentscited by 168
  12. 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
  13. 2023Let's Do a Thought Experiment: Using Counterfactuals to Improve Moral Reasoningcited by 20
  14. 2025LLMs Can Plan Only If We Tell Themcited by 15
  15. 2024Skin-in-the-Game: Decision Making via Multi-Stakeholder Alignment in LLMscited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 3.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Backtracking Improves Generation Safety
  2. 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
  3. 2024Safety Arithmetic: A Framework for Test-time Safety Alignment of Language Models by Steering Parameters and Activations
  4. 2026GR-SAP: Generative Replay for Safety Alignment Preservation during Fine-Tuning
  5. 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models
  6. 2025Safety Alignment Can Be Not Superficial With Explicit Safety Signals
  7. 2025Secure LLM Fine-Tuning via Safety-Aware Probing
  8. 2024Towards Comprehensive Post Safety Alignment of Large Language Models via Safety Patching