FreoStream:Enhancing Stream Guardrails via Future-Aware Reasoning and Safety-Aligned Optimization

Jianwei Wang, Guoyang Shen, Yanhong Wu, Haoran Li, Hao Peng +3 more
6/11/2026
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

Stream guardrails enable token-level safety detection before full responses are generated. However, they often make overly conservative judgements and block those sensitive but safe tokens, which is known as over-refusal.

Show full abstract

Due to lack of full context, they also fail to detect implicitly harmful content from jailbreaking. To address these challenges, we propose FreoStream, a novel streaming guardrail framework. Specifically, FreoStream fine-tunes a LoRA module to perform Future-Aware Reasoning when the base guardrail detects unsafe tokens. The reasoning process follows a Future-Reason-Judge paradigm: predict the future, reason about the full context and give the final judgement. This design can effectively reduce over-refusal by incorporating the future information. Moreover, we introduce the Safety-Aligned Optimization module that extracts the safety-aligned component from the reasoning gradients to update the base guardrail model, thereby enhancing streaming safety detection. Extensive experiments on various safety benchmarks demonstrate that FreoStream achieves lower over-refusal rates and better jailbreak defense compared to existing streaming guardrails.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2026freostreamenhancing,
  title  = {FreoStream:Enhancing Stream Guardrails via Future-Aware Reasoning and Safety-Aligned Optimization},
  author = {Jianwei Wang and Guoyang Shen and Yanhong Wu and Haoran Li and Hao Peng and Huiping Zhuang and Cen Chen and Ziqian Zeng},
  year   = {2026},
  eprint = {2606.13737},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.13737v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.13737.svg)](https://codeofpaper.com/paper/2606.13737)

Discussion