Undercurrent Integrates Activation Probes into Live LLM Inference
Summary:Undercurrent’s authors have open-sourced an Apache-2.0 Python library for executing activation probes inside live LLM serving paths. A declarative YAML configuration selects the tensors, layers, token positions, and destination probes. Extractors can run inline, allowing a request to be stopped before the next token is generated, or asynchronously through bounded per-request queues with explicit overflow behavior, timeouts, circuit breakers, and fail-open or fail-closed fallbacks. The most cons
From Offline Interpretability to an Online Control Plane
Undercurrent’s authors address a long-standing gap in the tooling stack. Activation probes can inspect Transformer hidden states offline to study deception, toxicity, or harmful intent, but most such tools cannot run inside serving engines that carry concurrent production traffic. Undercurrent places probe execution inside the generation path, allowing a system to inspect internal state and take action before the model emits a problematic token.
The project does not introduce a new probe architecture. It provides the control plane for running probes: training probes, selecting layers, and calibrating thresholds remain separate responsibilities. Undercurrent connects a selected probe to the correct request, layer, and token position, then uses its result either synchronously for enforcement or asynchronously for observation.
Declarative Configuration and Two Execution Modes
A declarative YAML specification separates probe logic from serving code. It can define which tensors to capture, which layers to inspect, which token positions to target, which probe receives the result, and which timeout or fallback policy to apply.
The inline mode executes on the request’s critical generation path. After capturing a hidden state, the system waits for the probe decision before allowing the next token to be generated; a high-risk request can be aborted at that point. This creates genuine pre-output enforcement, but probe inference, tensor transfer, and device synchronization can increase time to first token or inter-token latency. Undercurrent bounds this risk with timeouts, fail-open or fail-closed fallbacks, and a circuit breaker.
The asynchronous mode sends the required activations to bounded per-request queues and evaluates probes outside the response path. Explicit overflow policies handle saturation. This is useful for auditing, alerting, and trend analysis, but observations are delayed and may be dropped under load. It should not be treated as a final synchronous blocking control.
Continuous Batching Is the Real Integration Problem
Alignment is straightforward in many single-request runtimes. In vLLM, however, rows from several requests are continuously recombined into each forward pass. A row belongs to a specific user, sequence, and generation phase, and the row index alone is not a reliable request identifier. The scheduler must combine request identity, sequence state, token offsets, and prefill-or-decode phase before a probe can be associated with the correct activation.
Undercurrent’s vLLM worker extension is built around this mapping. It preserves request-level probe semantics inside continuously batched inference, which is the main engineering distinction from ordinary offline activation hooks. Production validation should still cover request cancellation, preemption and resumption, chunked prefill, speculative decoding, and changing batch sizes. A mismatch in this metadata can attach a risk score to the wrong user even if the underlying probe is accurate.
The Real Memory, Latency, and Safety Trade-offs
Activation queues have a substantial memory footprint. If R requests are in flight, each request has K extraction points, each queue holds Q vectors, hidden dimension is d, and each scalar occupies b bytes, a first-order estimate for the raw vectors is:
M ≈ R × K × Q × d × b
For example, one FP16 vector with 4,096 dimensions occupies about 8 KiB. Caching 64 vectors per request per extraction point across 256 concurrent requests requires roughly 128 MiB before accounting for Python objects, serialization, copies, and allocator overhead. The claim that asynchronous observation does not add response latency should therefore not be interpreted as zero system cost: enqueue copies, lock contention, and scheduler interference still need tail-latency measurements.
Inline waiting is approximately the sum of capture, transfer, probe execution, and synchronization costs, subject to the configured timeout. In return, the system obtains a decision before the next token is sampled, making the mode appropriate for high-value or high-risk routes with controlled traffic.
There is no universally optimal fallback. Fail-open favors availability but may let unsafe traffic pass when the probe fails. Fail-closed favors policy enforcement but can turn a monitoring-component failure into a broad denial of service. A circuit breaker limits repeated resource consumption; it does not replace an explicit business-level degradation policy.
What the Current Measurements Actually Establish
The paper describes the library’s benchmark harness and correctness checks for the vLLM integration. The available abstract does not report TTFT or TPOT percentiles, concurrent throughput, GPU utilization, queue overflow rates, false-positive and false-negative rates, threshold calibration, or drift after model upgrades.
Accordingly, “production-grade” more strongly describes coverage of production concerns—timeouts, circuit breaking, backpressure, and fallback—than proof of a particular service-level objective. Probe quality also requires independent evidence. A correct execution library cannot turn a poorly calibrated probe into a reliable detector of deception or harmful intent.
Deployment Guidance
- Freeze a model and configuration baseline. Pin the model revision, chat template, tokenizer, quantization method, selected layers, and token positions. Activation distributions shift with weights and prompting templates, so probes generally require recalibration after model or template changes.
- Start in asynchronous shadow mode. Record probe scores, queue depth, dropped events, and request associations. Establish false-positive rates and observation lag before moving critical routes to synchronous enforcement.
- Define failure semantics per traffic class. A fail-closed policy may fit content-sensitive requests, while a general assistant workload often needs fail-open behavior to avoid cascading outages.
- Test request-to-token mapping explicitly. Exercise cancellations, preemptions, chunked prefill, speculative decoding, empty batches, and sudden batch-size changes, then verify request IDs and token offsets end to end.
- Monitor the complete SLO. Track not only throughput, but also TTFT, TPOT, p99 latency, GPU utilization, queue overflow, circuit-breaker trips, abort rates, and human-audited false positives.
- Minimize retention of activation data. Prefer logging probe scores, versions, and actions over raw hidden states. High-dimensional activations can encode user-content features and create storage and privacy risks.
Appropriate Scope
Undercurrent is best treated as infrastructure for model-platform, safety-gateway, and observability teams. It fills the execution gap between offline activation analysis and live deployment, but it does not replace probe training, threshold calibration, red-team evaluation, or policy review. For high-concurrency production use, success depends on three operational properties: correct request-level mapping, acceptable tail latency, and continuous monitoring of probe drift.
— END —Source: ArXiv NLP/LLM (cs.CL) (2026-12-01)
Tags: #Activation Probing #LLM Inference #vLLM #Online Safety Monitoring #Observability
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments