ZICQ
中 Log in / Sign up
Newsroom Agentic #TRACE #KV Cache #Tool Calling #Conformal Prediction #Agentic Inference

TRACE Selects Relevant Tool Schemas for Conformal KV-Cache Compression

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:A research team presents TRACE in an arXiv preprint for tool-using agents. On Berkeley Function Calling, a turn exposes about 28 tools while reference calls invoke only 1.7 on average; schemas for unused tools account for 77–86% of the prefix. TRACE ranks tools for the current turn, prefills only selected schemas, and uses conformal calibration to choose a keep size under a task-success risk budget. The best-effort setting retains 17% of base prefixes and 25% of long-context prefixes, with a re


The TRACE research team introduces a KV-Cache compression method for tool-using agent inference. Rather than deciding what to evict from generic proxy metrics such as perplexity, TRACE selects tool schemas according to their relevance to the current turn and adds conformal calibration so that compression aggressiveness is tied to a measurable task-success loss.

Why Tool Schemas Dominate the Compression Ceiling

Tool-using agents typically place the system prompt, tool names, descriptions, and parameter schemas into the context prefix. The inference engine must prefill that entire prefix and store the resulting Keys and Values at every layer. Even when only a few tools are eventually invoked, every exposed schema still consumes memory bandwidth, attention computation, and KV-Cache capacity.

On Berkeley Function Calling, a turn exposes about 28 tools while reference calls invoke only 1.7 on average. Schemas for unused tools account for 77–86% of the prefix. The experiments also reveal a crucial asymmetry: removing those schemas before prefill leaves task success essentially unchanged, whereas deleting the same number of schemas at random is catastrophic. Safe compression therefore depends on what is retained, not merely how much is removed.

For a prefix containing L tokens, KV memory can be approximated as M_KV ≈ 2 × L × Σℓ H_KV(ℓ) × d_head × b. The factor of two represents K and V, H_KV is the number of KV heads in each layer, d_head is the head dimension, and b is the number of bytes per element. With GQA or MQA, H_KV is lower than the attention-head count. If schemas account for a prefix fraction f_s and a fraction r_s of those schema tokens is excluded, the ideal resident-memory reduction is roughly r_s × f_s, subject to KV-block granularity, alignment, and padding.

Shortening the sequence before prefill may also reduce projection and attention work. Since the dominant attention term grows approximately quadratically with sequence length, removing a large prefix can deliver compute savings beyond the linear memory reduction.

The Three Stages of TRACE

  1. Per-turn relevance prediction: A lightweight predictor reads the current request and ranks the available tools. The abstract does not disclose its architecture, input features, or inference overhead, so its ability to identify low-frequency but critical tools still needs validation with metrics such as Recall@K.

  2. Selective prefill: The Keep Rule inserts only the highest-ranked tool schemas into the current prefix. Excluded schemas do not produce K/V states, allowing the method to reduce both KV residency and part of the prefill computation rather than merely releasing cache entries afterward.

  3. Conformal risk calibration: TRACE treats candidate keep sizes as calibratable actions and uses compression-induced task-success loss as the risk object. Conceptually, an independent calibration set can provide loss scores or nonconformity quantiles that select the most aggressive member of the deployed Keep-size family while remaining within the risk budget α.

Distribution-free does not mean assumption-free. Standard conformal inference generally still relies on exchangeability between calibration and test samples and provides a marginal rather than per-task guarantee. Changes to the tool inventory, request distribution, or model version can invalidate the certificate and require recalibration. The setting α=0.10 is an acceptable additional-failure-risk budget, not a claim of 90% model accuracy.

Why Random Eviction Is Not Equivalent

Conventional KV-Cache eviction usually happens after prefill. It can reduce the memory occupied by active requests, but it does not recover the QKV projection and attention computation already performed. If an evicted entry is needed later, it may also trigger another prefill. TRACE moves the decision before prefill and can therefore reduce both compute and memory.

That shift changes the economics of conventional prefix caching. Serving stacks often cache one stable system prompt and tool list. TRACE creates a different Keep Set for each request, which may fragment the prefix cache, reduce hit rates, and offset part of the prefill benefit. Where the runtime supports block-level or randomly accessed KV, teams could investigate splitting schemas into reusable cache blocks. Otherwise, it may be necessary to maintain a limited set of prefixes for the most frequent Keep Sets.

The predictor also adds latency. If relevance scoring takes almost as long as the prefill it saves, or if requests continually produce mutually incompatible cached prefixes, the end-to-end gain can shrink substantially.

Reported Results and Evidence Boundaries

The reported best-effort configuration retains 17% of the base-context prefix and 25% of the long-context prefix, with a cost of 3–5 percentage points in task success. At α=0.10, the conformal certificate selects a constrained compressed member from the deployed Keep-size family in all four model-context settings. The abstract also reports a 3.9–6.2× reduction relative to eviction-only approaches.

The engineering significance is that the compression controller no longer has to guess whether an arbitrary evicted token will be useful later. It can first identify tools relevant to the current turn and then statistically calibrate the compression strength. However, the available abstract does not provide the model identities, task sample count, random seeds, confidence intervals, predictor design, calibration-set size, hardware, TTFT, or end-to-end cost. The precise quantity represented by the reported 3.9–6.2× reduction also needs to be verified against the paper.

Berkeley Function Calling provides a useful test of tool selection, but one benchmark does not automatically cover private APIs, dynamic tools, cross-domain schemas, or multi-turn dependency chains. The paper's claim of the first distribution-free guarantee is the authors' own assertion and still requires independent replication across tool distributions, model architectures, and prefix-cache implementations.

Critical Engineering Trade-offs

  • False-negative risk: If the predictor ranks a required tool outside the retained set, the model may be unable to call it or may select an incorrect fallback path. The random-deletion experiment shows that this failure is not benign.
  • Over-compression risk: Keeping only the top one or two tools can minimize memory but break dependency chains. Conformal control governs aggregate risk on the calibration distribution; it cannot guarantee that every complex request is safe.
  • Cache-reuse cost: The more dynamic the Keep Set becomes, the harder it is to reuse conventional whole-prefix caches. Deployments must evaluate prefill savings together with cache-hit loss rather than KV bytes alone.
  • Calibration drift: Tool additions, schema changes, model upgrades, and workload shifts can invalidate historical calibration. Drift detection and recalibration are therefore operational requirements.
  • Fallback safety: High-value but infrequently used tools can be placed in a fixed retained set. Requests with low confidence or anomalous risk signals should fall back to the full schema prefix instead of forcing aggressive compression.

Deployment Guidance

  1. Establish a full-schema baseline: Record candidate tools, invoked tools, tool arguments, task outcomes, and performance with the complete context. Use these records as relevance labels and controls.
  2. Evaluate the ranker offline: Track Top-K recall for invoked tools, false-retention rate, Keep Ratio, selection latency, and results stratified by task type so that aggregate metrics do not hide long-tail failures.
  3. Calibrate by model and context: Build separate calibration sets for each model, context length, and tool inventory. Keep the definition of compression-induced task loss consistent with the selected α budget.
  4. Run a three-way A/B test: Compare full schemas, conventional eviction-only behavior, and TRACE with conformal calibration. Measure TTFT, prefill throughput, peak KV memory, prefix-cache hit rate, p95 and p99 latency, tool-call error rate, task success, and cost per thousand requests under identical conditions.
  5. Test dynamic-prefix behavior: Determine whether changing Keep Sets repeatedly invalidate cached prefixes. If block-level KV reuse is available, compare schema-level cache blocks with a bounded set of materialized prefix variants.
  6. Retain a safe fallback: For high-stakes tool calls in finance, healthcare, or production operations, use a larger risk budget, force critical tools into the retained set, or restore the full schemas when anomalies are detected.

TRACE's central contribution is to move agent cache compression from heuristic eviction toward risk-controlled, per-turn tool selection. Its production value will depend not only on the reported 77%–86% redundancy, but also on whether relevance prediction covers long-tail tools, whether the conformal certificate remains valid under distribution shift, and whether prefill savings exceed the combined cost of the selector and fragmented prefix caching.


Source: ArXiv Machine Learning (cs.LG) (2026-11-30)

— END —

Tags: #TRACE #KV Cache #Tool Calling #Conformal Prediction #Agentic Inference

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.

What's your take on this story?
Explore & Submit Works

Community Comments

Loading live comments and annotations…