TRANSMISSION // 2611.37983v1

A live internal monitor for language models

Source published

Undercurrent is an open-source library for running activation probes during LLM generation. It connects probes to serving engines, but does not supply or validate a safety detector.

AI-generated conceptual illustration for A live internal monitor for language models
AI-generated conceptual illustration; not documentary evidence.

Language models may reveal signals in their internal computations before those signals appear in generated text. Undercurrent aims to make it practical to inspect those signals during live inference, with explicit choices about latency, failures and dropped observations.

A language model produces text one token at a time, but it also computes internal numerical representations along the way. Researchers can train small classifiers, called probes, to read those representations and estimate whether a property such as toxicity or harmful intent is present. In principle, a probe could flag a concerning signal before the corresponding words are emitted.

The challenge is operational: research tools for inspecting model internals are not necessarily built to handle live requests, tight response times or serving systems that process many users together. Alizishaan Khatri’s preprint introduces Undercurrent, an open-source Python library intended to bridge that gap. It is infrastructure for running probes—not a package of ready-made, proven safety classifiers.

Choosing when to inspect

Operators describe what to capture in a YAML configuration: which internal tensor, model layer and token position should be sent to a probe. A probe can inspect a prompt position or follow generated tokens over time. The library then offers two broad ways to run it.

An inline probe runs on the generation path. It can return a signal that stops a request before the model’s next token, subject to what the serving engine allows. Because it runs synchronously, however, its work can add delay. Operators can set timeouts and choose what happens if a probe fails: fail open and continue, or fail closed and abort. A circuit breaker can also respond to repeated errors or timeouts.

An asynchronous probe runs away from the response path, through a bounded queue for each request. This is designed to avoid slowing generation, but it cannot guarantee that every activation will be analyzed if the probe falls behind. Queue policies can drop older or newer entries, or block generation to preserve all entries. The last choice trades speed for completeness.

Undercurrent supplies adapters for Hugging Face Transformers and vLLM. The vLLM adapter addresses a tricky bookkeeping problem: in continuous batching, one model computation can contain tokens from multiple requests, and the arrangement changes over time. The adapter maps those rows back to requests and token positions. The authors report tests of this mapping and comparisons of captured activations between the two backends on small test models.

What the measurements show—and do not

The performance tests used Hugging Face Transformers with GPT-2 on a laptop CPU. In that setup, throughput measurements for probing scenarios fell within the run-to-run variation of the unprobed baseline, so the authors do not claim a precise overhead estimate from them. They did measure the direct cost of inline probes: eight small multilayer probes added about 1.28 milliseconds per generated token in one scenario. These results describe that particular setup, not the cost on larger models or GPUs.

A separate demonstration trained a linear probe to distinguish toxic from nontoxic comments using GPT-2’s internal representations. On a held-out test set, its area under the receiver operating characteristic curve (AUROC)—a measure of how well scores rank positive examples above negative ones—ranged from 0.82 to 0.85 across tested layers. The example showed that a trained probe could be connected to an inline abort. It did not establish that the probe is a dependable toxicity detector: the model and dataset were modest, labels may reflect rater biases, and robustness and calibration were not evaluated.

The distinction matters. Undercurrent can help capture and route activations; it cannot ensure that a probe recognizes the right behavior, generalizes to new prompts or resists deliberate evasion. The paper says probes should not be the sole safety control. It also notes that vLLM support is experimental and tested against a narrow version and configuration; some deployment arrangements and GPU-performance claims remain unvalidated. Inline decisions in vLLM may also arrive late enough for an extra token—or more under load—to be generated.

This is a software-systems contribution, not evidence that internal monitoring prevents harmful outputs in real-world service. The article is based on a single arXiv preprint, which may not have undergone peer review. Its benchmarks and tests provide evidence about the described implementation, but they do not establish detector quality across models, workloads or users. The project is released under the Apache-2.0 license; the code and documentation are linked from the paper’s arXiv page.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • Language models can exaggerate psychological patterns—and internal probes offer only part of the explanation

    Shared method: Both papers use probes on LLM activations: Undercurrent provides runtime infrastructure for user-supplied probes, while Hsu et al. use activation probes to test whether psychometric information is decodable. This is a methodological connection, not evidence that Undercurrent’s runtime system validates probe quality or reproduces the psychometric findings.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.37983v1 — Original paper

      Excerpt reference: static/papers/2611.37983v1.md:67-146
      Basis: Paper text
      Source file SHA-256: b5415932aa3477ced368ad6c8650ca0da9507e3ae12995f3e2508c561b5ebeeb

    • 2611.12937v1 — Original paper

      Excerpt reference: static/papers/2611.12937v1.md:13-77
      Basis: Paper text
      Source file SHA-256: 8dcd39e5441d86cc8859bb8353ff11f36cd7ed466717ad1d68792a9cc2ee6a50

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.