2607.26448v1 Jul 29, 2026 cs.CL

장문 맥락 언어 모델을 위한 병합 가능한 모델 측 집계 상태

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

Xuan Wang
Xuan Wang
Citations: 188
h-index: 7
Dachuan Song
Dachuan Song
Citations: 10
h-index: 1
Zechen Hu
Zechen Hu
Citations: 50
h-index: 5
Ju Yin
Ju Yin
Citations: 1
h-index: 1

장문 맥락 언어 모델의 주요 한계점 중 하나는 맥락 길이가 증가함에 따라 가산적이지 않은, 집합 기반 집계 작업에서 성능이 점점 더 신뢰성이 떨어지는 것입니다. 이러한 작업에는 개수 추정, 집합 관계 및 그룹 통계가 포함되며, 이는 로그, 프로그램 출력, 테이블 및 다중 턴 대화에서 광범위하게 나타납니다. 이러한 작업을 위한 집계 상태를 제공하기 위해, 우리는 고정된 언어 모델과 함께 간결한 해시 기반 하이퍼로그로그(HLL) 스케치 상태를 유지하는 모델 측 집계 인터페이스를 도입합니다. 모델이 맥락을 처리하는 동안, 추출기는 각 관련 레코드를 표준 식별자로 매핑합니다. 이 식별자는 해싱되어 HLL 상태를 업데이트합니다. 이러한 상태는 맥락 세그먼트 간에 병합될 수 있으며, 하위 작업을 위해 직접 읽혀질 수도 있습니다. 이를 통해 추가적인 생성-실행-반환 사이클을 피할 수 있습니다. 제안된 방법은 HLL 상태 크기를 2KiB (2,048 레지스터)로 설정하여 검증했으며, 이는 맥락 길이 또는 집합의 개수에 따라 증가하지 않습니다. 백만 개의 레코드를 포함하는 중복 개수 실험에서 평균 상대 오류는 1.6%였습니다. 별도의 병합 테스트에서 최대 256개의 세그먼트에서 생성된 상태는 동일한 데이터 스트림에 대한 단일 패스에서 얻은 결과와 정확히 동일했습니다. 174개의 소스 창에서 추출한 3,969개의 집계 후 추론 작업에서, 고정 예산 인터페이스는 Gemma 4 (31B, BF16)에서 99.2%의 정확도를 달성했으며, 이는 완전한 집계를 수행했을 때의 100.0%와 비교됩니다. 이 간격은 0.8% 포인트였습니다 (95% 창-클러스터 신뢰 구간: 0.5-1.3 포인트). 174개의 일치된 항목 세트에서, 제안된 방법은 Qwen에서 직접적인 전체 맥락 추론에 비해 63.2포인트, Gemma에서는 56.3포인트를 향상시켰습니다. 각각의 체인 오브 소트(CoT) 추론에 대한 해당 개선 사항은 60.9 포인트 및 63.2 포인트였습니다. 고정된 1,200개의 Oolong-Synth 작업 하위 집합에서, 제안된 방법은 Qwen에서 91.1%, Gemma에서는 99.3%의 정확도를 달성했습니다. 코드: https://github.com/songdc98/sketchops

Original Abstract

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.

0 Citations
0 Influential
25.9657359028 Altmetric
0.0 Score
Original PDF
1

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!