EBS: Experience-Based Safety Boundary Stabilization for Large Language Models
Abstract
: Large language models are increasingly used in open-ended interactions, where safety requires more than detecting explicit harmful requests. A model must distinguish harmful intents that warrant refusal from benign needs that should remain supported, including in ethically complex contexts. Existing safety alignment and inference-time defense methods reduce harmful outputs, but they can still miscalibrate safety boundaries under semantic disguise, sensitive wording, and ambiguous context. Such miscalibration manifests as harmful compliance, benign over-refusal, and inconsistent decisions on boundary cases. To address this problem, we propose Experience-Based Safety Boundary Stabilization (EBS), a training-free method that stabilizes safety boundaries through reusable experience. EBS uses diverse generation to reveal response discrepancies on boundary inputs, applies dual evaluation to score candidate responses within each rollout group, and employs a critique mechanism to abstract response differences into reusable experience rules. It organizes experience memory into harmful, benign, and ethics categories, then retrieves relevant experience at inference time to augment the context of the frozen model. Experimental results across representative inference-time safety baselines show that EBS achieves a favorable balance among attack resistance, benign utility preservation, boundary discrimination, and decision consistency. Ablation studies support the contributions of reusable experience, critique-based abstraction, categorized memory, and boundary-aware retrieval. The source code of EBS is publicly available at https://github.com/fff-6/EBS-Safety-Boundary.