Shanshan Lin

Author directory

2026

Large language models exhibit non-negligible risks of generating policy-violating content, underscoring the need for effective and timely guardrail mechanisms. Existing streaming safety monitoring approaches enable detection during decoding, but still lack a reliable mechanism for deciding when to terminate generation, limiting their ability to act on early risk signals that are often sparse and unstable under partial observability. In response, we propose LTS, a token-level framework that explicitly learns a stopping criterion for preemptive early termination. LTS introduces a risk-aware STOP head for token-level risk assessment and leverages temporally structured supervision with multiscale evidence to model the evolution of safety risks during generation. By casting streaming safety monitoring as a constrained online stopping task and incorporating exponential moving average temporal aggregation, LTS enables reliable translation of emerging risk evidence into stable and timely termination decisions. LTS achieves an F1 score of 95.5% and is able to terminate harmful content at 13% of the generated sequence, substantially outperforming existing methods during early generation. In realistic streaming settings, it achieves around 90% token reduction.