ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillation

Hanling Wang, Chenlong Wei, Ling Xu, Hanyan Niu, Qi Cao +4 more
9/12/2026
cs.CL
distillation

Official code: Scabbards1500/Foresight (3 stars, Python, Apache-2.0, last commit 2026-06-09).

Abstract

As large language models (LLMs) are increasingly deployed, the generation of harmful content has become a critical safety concern. Existing safeguards operate at the input, output, or streaming-generation stages, while early-risk methods that rely on surface tokens or output logits may suffer from weak initial signals, and internals-based detectors using dense representations may retain highly entangled and redundant safety-irrelevant information.

Show full abstract

It therefore remains unclear whether the earliest post-generation hidden states already contain reliable signals about final-response harmfulness. To address this gap, we propose ForeSight, a first-token output-risk forecasting framework that distills weak and redundant early safety signals into compact, layer-aware risk representations. Experiments on five safety benchmarks and two target models demonstrate that ForeSight achieves superior and efficient early-risk forecasting while relying solely on first-token hidden states. The code is available at: https://github.com/Scabbards1500/Foresight

View on arXivView PDF

Code Implementations(1)

Apache-2.0
30Python, ShellMar 25, 20265 months agoApache-2.0

Similar Papers

Cite this paper

@article{wang2026foresight,
  title  = {ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillation},
  author = {Hanling Wang and Chenlong Wei and Ling Xu and Hanyan Niu and Qi Cao and Shizhou Huang and Yang Yang and Xiaohui Zhu and Yao Zhu},
  year   = {2026},
  eprint = {2609.13737},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.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/2609.13737.svg)](https://codeofpaper.com/paper/2609.13737)

Discussion