arXiv · 2611.37983
Undercurrent: Production-Grade Activation Probing for Live LLM Inference
Abstract
Probes trained on the internal activations of large language models (LLMs) can detect properties such as deception, harmful intent and toxicity, often before any problematic text has been emitted. Existing tooling for reading activations, however, is built for offline interpretability research and does not run inside the serving engines that host production traffic. We present Undercurrent, an open-source (Apache-2.0) Python library that runs activation probes on a model's internal state while it generates. A declarative YAML specification selects which tensors to capture, at which layers and token positions, and which probe receives them. Each extraction point runs either inline, on the generation path where a probe can abort the request before the next token, or asynchronously, on bounded per-request queues with explicit overflow policies so observation adds no latency to the response. Inline probes may be bounded by a timeout with fail-open or fail-closed fallbacks and a circuit breaker. Undercurrent ships adapters for Hugging Face Transformers and for vLLM, where a worker extension maps the rows of each continuously batched forward pass back to per-request token positions. We describe the design, the vLLM integration and its correctness checks, and report measurements from the library's own benchmark harness. Undercurrent is available at https://github.com/wrynx/undercurrent and on PyPI.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Alizishaan Khatri. 2026-10-22. Undercurrent: Production-Grade Activation Probing for Live LLM Inference. https://arxiv.science/abs/2611.37983
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.