Think Before You Act: Improving Agent Behavioral Safety with Thought CorrectionThink Twice Before You Act: Enhancing Agent Behavioral Safety with Thought Correction
The researchers propose a lightweight plug-in safety model, Thought-Aligner, which causally corrects unsafe intermediate thoughts before the agent executes actions, thereby improving behavioral safety. The method does not modify the underlying agent; the corrected thoughts are fed back to the agent, guiding its decision-making and tool use toward safer trajectories, so it can be plugged into different agent frameworks across models. The researchers trained the model with two-stage contrastive learning on pairs of safe and unsafe thoughts generated across ten risk scenarios. Experiments on multiple agent safety benchmarks and six LLMs show that behavioral safety rises from about 50% without protection to an average of about 90%, about 23% higher than the current best guardrail, while helpfulness improves by about 5%. The researchers also released Thought-Aligner-7B.