Chiosa
Machine Learning

A reusable cache keeps tabular predictions accurate after compression

Compile the Table: Query-Calibrated Operator Compression for Tabular In-Context Learning · arXiv:2610.11784

3 min
Updated

In plain words

Tabular models use labeled example rows to predict labels for new rows. Keeping one small set of examples makes it reusable, but may lose useful information; choosing examples anew for each query can cost more.

QCOC compresses the model’s stored attention information into a shared memory, then adjusts that memory using responses to the original examples.

Across 64 held-out datasets, it had higher mean accuracy than direct cache compression at the same memory sizes, though full context remained more accurate on average.

The research

When a tabular model answers many queries from the same labeled examples, what can be compressed without losing too much predictive accuracy? A fixed smaller example set is reusable but may omit useful rows, while choosing examples separately for each query limits reuse and raises serving cost.

The paper asks whether compressing the model’s stored attention information can keep one memory useful across queries.

QCOC compiles a fixed example set’s attention cache into reusable memory, then fits its values to preserve the original cache’s responses.

The researchers compare QCOC with direct weighted cache compression at the same memory sizes, using TabICL v2 to predict held-out rows on 64 classification datasets. QCOC’s mean accuracy was higher at both sizes, while full context remained higher on average.

Across a separate grid of longer contexts, QCOC led among compressed methods in most settings and stayed close to full context on average.

Together, the comparisons support compressing one reusable memory while retaining useful predictive information, with some settings favoring query-specific retrieval.

The fitting queries come from the in-context examples, and the theoretical error bound depends on stated assumptions; neither guarantees accuracy on new queries.

Compilation also has a substantial one-time cost, and one shared memory can miss query-specific structure, as the Covertype results illustrate.

What the evidence shows

  • Compress what the model stores

    Query-Calibrated Operator Compression (QCOC) is a post-hoc method for compressing the attention cache of an existing tabular in-context model. The model predicts new rows using labeled examples placed in context.

    A fixed smaller set of examples can be reused, but may omit useful rows; selecting examples for each query may preserve relevance but reduces reuse and raises serving cost. QCOC targets this tradeoff by compressing the stored attention information instead of selecting a new set of rows.

  • Compare at equal memory sizes

    The primary evaluation uses 64 held-out OpenML-CC18 classification datasets. These test how well TabICL v2 predicts held-out rows from labeled examples, with accuracy averaged equally across datasets.

    At the same retained memory size, QCOC had higher mean accuracy than weighted joint-key-and-value compression. The mean was still below full-context accuracy at both tested sizes, so the result is an improvement over that compression baseline, not parity with the uncompressed context.

  • Check longer contexts

    A separate long-context evaluation tests seven CC18 datasets at different example counts and memory sizes. QCOC ranked first among compressed methods in 10 of the 12 settings and averaged 0.23 percentage points below full context across the grid.

    Query-specific retrieval narrowly led at the largest memory sizes in two settings. The results support a strong average across these tested conditions, while showing that the ordering changes with the memory budget.

  • Separate the components

    The component analysis examined three parts of the method on 64 datasets in a 50-query setting: retaining the original example count, using the number of examples represented by each prototype, and fitting compressed values.

    The first two corrections worked together; with both in place, value fitting raised mean accuracy by 1.75 percentage points for joint prototypes. On TabPFN v3, value fitting also reduced reconstruction errors, but QCOC’s accuracy difference from direct compression was statistically unresolved.

  • Account for setup and exceptions

    In a single-thread CPU comparison at 8,192 examples and 512 memory slots, QCOC served each query in a mean 1.91 milliseconds after compilation, versus 3.79 milliseconds for full context. The timings exclude setup and compilation, which took 283.40 seconds in a single run at that size.

    Covertype also showed a case where shared memory lagged query-specific retrieval. Reuse can reduce online work, but its value depends on query volume and data structure.

Deep

Next paperStatic memory expands pretrained models without sparse pretraining