Abstract
While Large Language Models (LLMs) have advanced significantly, their safety mechanisms remain vulnerable to adversarial attacks. This paper introduces SAFFRON-1, an inference scaling paradigm designed to enhance LLM safety. By replacing traditional, computationally expensive Process Reward Models (PRMs) with a novel Multifurcation Reward Model (MRM), SAFFRON-1 enables efficient token-level search. Combined with conservative exploration constraints and trie-based KV caching, the framework achieves state-of-the-art protection against jailbreaks with a 3x improvement in computational efficiency over existing search methods.
Introduction
Large Language Models (LLMs) are increasingly capable, yet their safety filters often prove brittle. Techniques like "jailbreaking" or "prefilling attacks" (e.g., forcing a model to start with "Sure, here is how to...") can bypass months of expensive safety alignment. Researchers from UIUC propose a shift in strategy: instead of relying solely on static training-phase safety (like RLHF), we should scale compute at inference time to search for safer outputs. This approach mirrors how models like OpenAI’s o1 scale compute for complex reasoning tasks.
The Exploration-Efficiency Dilemma
Standard inference scaling involves generating multiple responses and selecting the safest one, or using tree search (like Monte Carlo Tree Search, MCTS) to guide the model token-by-token. However, safety tasks face a unique "Exploration-Efficiency Dilemma." Unlike reasoning tasks with verifiable answers, safety is open-ended. Calling a "Process Reward Model" (PRM) to evaluate every candidate token during a search is prohibitively expensive. In practice, advanced search methods can be less efficient than simple random sampling due to this high reward-model overhead.
The SAFFRON-1 Framework
To overcome these hurdles, the authors introduce SAFFRON (Safe Multifurcation), featuring three core innovations:
1. Multifurcation Reward Model (MRM)
Traditional reward models evaluate a sequence and a single candidate token to produce a scalar score. For $K$ candidates, this requires $K$ separate passes. The MRM architecture instead outputs a vector of scores for the entire vocabulary in a single pass, effectively acting as a "Q-network" for safety. This collapse of the search width cost significantly boosts efficiency.
2. Conservative Exploration Constraint
Reward models can be unreliable when encountering Out-of-Distribution (OOD) tokens. SAFFRON-1 applies a conservative constraint that penalizes tokens not seen during training, preventing the search from entering "hallucinated" safety zones where the reward model's output is essentially random noise.
3. Trie-based KV Caching
To further accelerate tree search, SAFFRON-1 utilizes a prefix tree (Trie) to share the Key-Value (KV) cache across different search branches. By sharing computations for common prefixes, the model avoids redundant calculations, further streamlining the generation process.
Experimental Results
The researchers evaluated SAFFRON-1 using a Llama-3 8B policy model and a Llama Guard 3 1B reward model across several benchmarks, including Safety4M (a new dataset of 4 million token-level rewards), Harmful HEx-PHI, and Ai2 Refusals.
Superior Defense and Efficiency
On the Ai2 Refusals benchmark, SAFFRON-1 achieved an Attack Success Rate (ASR) of 0.175, outperforming the best baseline (Best-of-N at 0.285). Crucially, SAFFRON-1 demonstrated a 3x reduction in inference compute required to reach specific safety thresholds compared to the strongest baselines.
Preserved Response Quality
Unlike training-based defenses that can lead to repetitive, robotic refusals, SAFFRON-1 preserves lexical variety. By searching for the optimal path rather than following a rigid fine-tuned script, it provides more diverse, helpful, and nuanced refusals.
Conclusion
SAFFRON-1 represents a significant step toward robust LLM safety by leveraging inference-time compute. While currently dependent on access to model weights and specific tokenizers, the "multifurcation" approach offers a scalable path forward for safety assurance. Future work may extend these principles to broader reasoning tasks and black-box model environments.
Summary updated