mlsanityData to 7 Oct 2026

Mergeable Model-Side Aggregation States for Long-Context Language Models

arXiv 2607.26448 ↗First posted 29 Jul 2026cs.CL cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

A known limitation of long-context language models is their increasingly unreliable performance in non-additive, set-based aggregation as context length grows. Examples include cardinality estimation, set relationships, and grouped statistics, which widely exist in logs, program outputs, tables, and multi-turn conversations. To provide the aggregation state required by these tasks, we introduce a model-side aggregation interface that maintains compact Hash-based HyperLogLog (HLL) sketch states alongside a frozen language model. While the model processes the context, an extractor maps each relevant record to a canonical identity. The identity is then hashed and updates the HLL state. These states can be merged across context segments and/or read out directly for downstream reasoning, avoiding an additional generate-execute-return cycle. We validate the proposed approach by setting the HLL state size as 2 KiB (2,048 registers), which does not increase with context length or set cardinality. In a distinct-count experiment involving one million records, the mean relative error was 1.6%. In a separate merge test, states built from as many as 256 segments produced exactly the same readout as a single pass over the same stream. On 3,969 aggregate-then-reason tasks from 174 source windows, the fixed-budget interface reached 99.2% accuracy on Gemma 4 (31B, BF16), compared with 100.0% under exact aggregation; the paired gap was 0.8 percentage points (95% window-cluster CI: 0.5-1.3 points). On a matched set of 174 items, our method improved over direct full-context reasoning by 63.2 points on Qwen and 56.3 points on Gemma. The corresponding gains over chain-of-thought (CoT) reasoning were 60.9 and 63.2 points, respectively. On a fixed 1,200-task Oolong-Synth subset, our method reached 91.1% on Qwen and 99.3% on Gemma. Code is available at https://github.com/songdc98/sketchops.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 15 of its 25 references that are in the map. First posted on arXiv 29 Jul 2026.

Builds on

15 of 25 references.

References · 15

  1. 2017Deep Setscited by 1,394
  2. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  3. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
  4. 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 186
  5. 2019On the Limitations of Representing Functions on Setscited by 89
  6. 2025Oolong: Evaluating Long Context Reasoning and Aggregation Capabilitiescited by 33
  7. 2019Improving Attention Mechanism in Graph Neural Networks via Cardinality Preservationcited by 17
  8. 2026Coding Agents are Effective Long-Context Processorscited by 11
  9. 2019Meta-Learning Neural Bloom Filterscited by 10
  10. 2020Partitioned Learned Bloom Filtercited by 10
  11. 2022Scalable Set Encoding with Universal Mini-Batch Consistency and Unbiased Full Set Gradient Approximationcited by 4
  12. 2025How Good Are LLMs at Processing Tool Outputs?cited by 4
3 more
  1. 2017New cardinality estimation algorithms for HyperLogLog sketchescited by 3
  2. 2021SetSketch: Filling the Gap between MinHash and HyperLogLogcited by 1
  3. 2026Elastic Spectral State Space Models for Train-Once Budgeted Inferencecited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025ToM: Leveraging Tree-oriented MapReduce for Long-Context Reasoning in Large Language Models
  2. 2024Hierarchical Context Merging: Better Long Context Understanding for Pre-trained LLMs
  3. 2026Probing How Scalable Table Data Enhances General Long-Context Reasoning
  4. 2026Chained Recursive Language Models for Multi-Iteration Reasoning
  5. 2025Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB
  6. 2024Unconstrained Model Merging for Enhanced LLM Reasoning
  7. 2025Fine, I'll Merge It Myself: A Multi-Fidelity Framework for Automated Model Merging
  8. 2025The Thinking Spectrum: An Empirical Study of Tunable Reasoning in LLMs through Model Merging