ADTGuard: Adaptive Depth-Time Safeguard for Streaming Inference in Large Language Models

Chuming Wei, Churui Yang, Zihan Zhang, Ruien Li, Wusheng Zhang +2 more
10/27/2026
cs.AI

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) can generate fluent responses to diverse user requests, yet streaming may expose users to harmful content before generation is complete. Existing guardrails face two limitations in this setting.

Show full abstract

First, post-hoc moderation at response or chunk boundaries delays intervention, risking harmful exposure when content is released before verification. Second, even with token-level detection, coarse response-level supervision does not specify when harmful content begins, while fixed-layer readouts may miss relevant safety signals at other depths. To address these limitations, we introduce ADTGuard, which checks each token before release, progressively refines token-level training targets, and adapts layer selection to the current prefix. ADTGuard models risk across depth and time through Depth-Time Safety Dynamics (DTSD), which integrates safety evidence across layers at each token and uses it to guide risk accumulation over successive tokens. To adapt the choice of observation layers to the current prefix, we propose the Causal Depth Router (CDR). With only response-level labels available, we further develop Risk-Onset Target Refinement (RTR) to progressively construct token-level training targets for both components. Through extensive experiments across multiple safety benchmarks, we demonstrate that ADTGuard consistently achieves strong streaming detection performance, matching or surpassing state-of-the-art safeguards while requiring only 16M trainable parameters and maintaining competitive per-token latency.

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{wei2026adtguard,
  title  = {ADTGuard: Adaptive Depth-Time Safeguard for Streaming Inference in Large Language Models},
  author = {Chuming Wei and Churui Yang and Zihan Zhang and Ruien Li and Wusheng Zhang and Yan Zhang and Guangwen Yang},
  year   = {2026},
  eprint = {2610.36574},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.36574v1}
}

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/2610.36574.svg)](https://codeofpaper.com/paper/2610.36574)

Discussion