ForeSight improves early detection of harmful AI responses

ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillation

Computation and Language

Summary

As AI language models get smarter, they sometimes create unsafe or harmful content. The researchers found that the very first part of the AI's response contains clues about whether the final output will be harmful, but these clues can be weak or mixed up. They developed a method called ForeSight that cleans up and focuses these early signals to better predict risks. This helps catch problems earlier and more efficiently, making AI safer to use.

What this means in practice

  • For ai safety teams: Identify potential harmful outputs from language models earlier during generation to prevent unsafe content release.
  • For ai platform operators: Enhance existing content moderation by integrating early risk signals to improve runtime safety filtering.

Authors

Hanling Wang, Chenlong Wei, Ling Xu, Hanyan Niu, Qi Cao, Shizhou Huang, Yang Yang, Xiaohui Zhu, Yao Zhu

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. 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