# Retrieval-Aware Distillation for Transformer-SSM Hybrids

Transformer-SSM 하이브리드를 위한 검색 인식 증류

Aviv Bick, Eric P. Xing, Albert Gu · arXiv · 2026년 2월 11일

- **연구 문제** 기존 하이브리드 증류는 레이어 단위의 고정 규칙으로 attention을 남겨 검색에 필요하지 않은 head까지 KV 캐시 비용을 떠안습니다.
- **연구 방법** 검색 중요도가 높은 attention head만 보존하고 나머지를 DiscreteMamba2 구성요소로 교체한 뒤 MOHAWK 방식으로 증류합니다.
- **주요 결과** 상위 10개 검색 head를 보존하면 교사 대비 검색 중심 과제 coverage가 95%에 도달하며, 같은 조건에서 SSM state 차원을 8로 줄여도 큰 손실이 없었습니다.

## Transformer-SSM 하이브리드의 검색 능력 문제

SSM은 상수 메모리로 긴 시퀀스를 효율적으로 처리하지만, 문맥 안의 과거 항목을 정확히 찾아 쓰는 in-context retrieval 과제에서 Transformer보다 뒤처진다고 알려져 있습니다. 기존 하이브리드 모델은 이 격차를 메우기 위해 소수의 attention 레이어나 head를 남기지만, 대개 비율이나 층 간격 같은 고정 규칙으로 배치합니다. 이 방식은 검색에 실제로 필요한 head보다 많은 attention을 유지하게 만들어 KV 캐시 메모리 비용을 키울 수 있습니다.

이 논문은 사전학습된 Transformer에서 검색에 중요한 attention head만 골라 보존하고, 나머지 head를 SSM 기반 recurrent head로 바꾸는 retrieval-aware distillation을 다룹니다. 다루는 범위는 Llama-3.2-1B와 Qwen2.5-1.5B를 교사로 한 하이브리드 학생 모델입니다.

## 검색 head 점수화와 선택적 교체

방법은 세 단계로 이루어집니다. 먼저 교사 Transformer의 각 attention head를 하나씩 0으로 가리고, 합성 KV-Retrieval 과제에서 정확도가 얼마나 떨어지는지 측정합니다. 이 하락 폭이 head의 retrieval importance score가 되며, 점수가 높은 head일수록 검색에 중요한 것으로 봅니다. 이 점수는 head 순위를 매기는 데만 쓰입니다.

![Figure 1: Retrieval-Aware Attention Placement During Distillation.We add a retrieval-guided step before standard distillation: (1) ablate each attention head i…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-b1a08c92d6a391af1b0651667bfe7af5.png?thumb=512)

**Figure 1** :Retrieval-Aware Attention Placement During Distillation.We add a retrieval-guided step before standard distillation: (1) ablate each attention head in the pretrained Transformer and measure the accuracy drop on a synthetic KV-retrieval probe to obtain a retrieval-importance score; (2) retain only heads above a threshold and replace the rest with recurrent heads; (3) distill into a hybrid student. We use KV-retrieval only for head ranking; it identifies the same G&A heads that drive retrieval-intensive performance \[Bick et al., 2025b\]. Unlike heuristic hybrids, this yields non-uniform attention placement that preserves performance with far fewer heads and reduces attention’s KV-cache bandwidth cost \[Dao et al., 2022\].

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

![Table 5: Teacher Ablation (Llama-3.2-1B).To guide our retention strategy, we rank the teacher’s attention heads by their contribution to KV-Retrieval. We list…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-07f3db4a2e955ad447d464966edf7430.png?thumb=512)

**Table 5** :Teacher Ablation (Llama-3.2-1B).To guide our retention strategy, we rank the teacher’s attention heads by their contribution to KV-Retrieval. We list thetop 40 headswhere removal causes the sharpest accuracy drops (lower Acc = higher importance). Note the clustering in upper layers (8, 9, 10), which informs the placement of attention anchors in the hybrid student.

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

다음으로 상위 k개 head는 Q, K, V와 출력 projection을 포함해 원래 구조 그대로 유지합니다. 나머지 head는 head 차원과 맞춘 DiscreteMamba2 구성요소로 바꿉니다. 그 결과 어떤 층은 순수 SSM이 되고, 어떤 층은 attention과 SSM이 병렬로 도는 혼합 층이 됩니다. 마지막으로 MOHAWK 프레임워크를 수정해 학생을 증류합니다.

저자들은 G&A 메커니즘이 Gather head가 local 정보를 transport 토큰에 모으고 Aggregate head가 그 토큰들에 전역적으로 주의를 두는 구조라고 설명하며, 이 구조가 검색 중요 head로 드러난다고 봅니다. 이는 선행 연구 Bick et al. \[2025b\]의 관찰을 바탕으로 한 설계이며, 이 논문이 새로 증명한 기능은 아닙니다.

## Adapter와 MOHAWK 기반 학습 설정

보존된 attention 출력과 SSM 출력은 같은 multi-head 레이아웃에서 이어 붙입니다. 이때 attention 출력의 평균과 분산을 SSM 출력의 통계에 맞추는 파라미터 없는 정규화 단계를 둡니다. 원문 Listing 1에서 이 Adapter는 attention 상태를 표준화한 뒤 SSM 통계로 다시 스케일하고 out\_proj로 넘기는 구조로 제시됩니다.

학습에서는 표준 MOHAWK의 Matrix Orientation 단계를 생략합니다. 보존된 attention head를 교사에서 그대로 복사해 초기화하므로 교사의 특징 정렬이 유지된다고 저자들은 설명합니다. 이후 Hidden-State Alignment로 새 SSM 구성요소가 교사 블록 출력을 근사하도록 하고, 전체 모델을 logit 기반 Knowledge Distillation으로 미세조정합니다. 학습은 Fineweb-edu와 Finemath-4Plus를 50-50으로 섞은 데이터를 사용하며 전체 증류에 12B 토큰을 소비했다고 보고됩니다.

## 검색 head 수에 따른 교사 대비 성능

실험은 상위 k개 검색 head를 보존한 HYBRID-LLAMBA-1B와 HYBRID-QWEN2-1.5B를 비교합니다. k는 0, 5, 10, 20, 30, 40으로 바꾸며 Llama 설정에는 512, Qwen 설정에는 336 같은 full 설정도 함께 보고됩니다. 지식 중심 과제와 검색 중심 과제를 나누고, 각 그룹의 교사 대비 평균 비율을 coverage로 계산합니다.

![Figure 3: Perplexity during distillation reveals retrieval as the primary bottleneck.Perplexity is tracked over the first 5,000 training steps for hybrid model…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-c1cf508a1c4d03a29e12df3e30bfc42e.png?thumb=512)

**Figure 3** :Perplexity during distillation reveals retrieval as the primary bottleneck.Perplexity is tracked over the first 5,000 training steps for hybrid models with varying numbers of retained G&A heads. Most of the perplexity reduction occurs with the first 10-20 heads—those ranked highest by retrieval importance—with diminishing returns beyond that. This confirms that retrieval is the dominant factor in early language modeling improvements and supports our core claim: targeted retention of retrieval heads is both necessary and sufficient for closing the performance gap.

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

결과에서 k=0인 SSM-only 학생은 SWDE 27.7%, KV-Retrieval 13.2%였지만, 상위 10개 head를 보존하면 SWDE 71.1%, KV-Retrieval 99%로 올라갑니다. 저자들은 k=10에서 coverage가 95% 이상이라는 점을 충분한 회복의 기준으로 봅니다. 이 결과는 Llama-3.2-1B와 Qwen2.5-1.5B 두 교사에서 얻은 것이며, 다른 규모나 다른 과제에 그대로 확대되지는 않습니다.

## heuristic 배치와의 효율 비교

기준선은 고정 간격으로 attention을 두는 Fixed interleaving과 attention 비율을 단계적으로 줄이는 Annealed interleaving입니다. 두 방식 모두 LLAMA-3.2-1B를 대상으로 비교됩니다. 원문에 따르면 heuristic 배치는 교사 수준을 맞추기 위해 25~50%의 attention head를 요구합니다.

![Table 3: Efficiency of Retrieval-Aware vs. Heuristic Placement.Results on LLAMA-3.2-1B comparing retrieval- aware head placement toFixed interleaving\[Bick et a…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-f32ed8a76d45ef5dca2787e5bd71bf6b.png?thumb=512)

**Table 3** :Efficiency of Retrieval-Aware vs. Heuristic Placement.Results on LLAMA-3.2-1B comparing retrieval- aware head placement toFixed interleaving\[Bick et al., 2024\] andAnnealed interleaving\[Wang et al., 2025b\] heuristics. COV reports the ratio between the model and teacher group-mean accuracy (defined in Section 3.4). Coverage depends on whether the heuristic includes retrieval-critical layers; e.g., in FIXED25%, (4, 9, 14) performs best, matching high-impact retrieval heads in layers 4 and 9 (see L4H4 and L9H25 in Table 5). Retrieval-aware placement outperforms many variants that use far more attention heads; even when heuristics exceed 95% COV, they require 10×–13×more heads and can select unfavorable layers, leading to suboptimal outcomes.

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

반면 검색 기반 배치는 상위 10개 head, 즉 512개 head의 약 2%만 유지하면서도 Table 3의 coverage를 95% 수준으로 맞춥니다. 메모리 절감은 긴 시퀀스에서 3~6배로 보고되며, 이 수치는 SSM 상태와 KV 캐시 구성으로 계산된 값입니다. 다만 Fixed나 Annealed 설정 가운데 일부는 검색 관련 층을 포함해 높은 coverage를 보이므로, 배치 방식의 우열은 포함된 층에 따라 달라진다고 읽어야 합니다.

![Table 2: Memory Usage Across Sequence Lengths.Infer- ence memory (MB) per sequence for hybrids matching the teacherLLAMA-3.2-1B. RETRIEVAL-AWAREminimizes footp…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-bb54c6541d5db7b9671e56354081e81f.png?thumb=512)

**Table 2** :Memory Usage Across Sequence Lengths.Infer- ence memory (MB) per sequence for hybrids matching the teacherLLAMA-3.2-1B. RETRIEVAL-AWAREminimizes footprint through two mechanisms: (1) a reduced SSM state dimension (d=8 ) lowers constant overhead, and (2) retain- ing only 2% attention heads reduces the KV cache. This yields substantial savings relative to layer-wise baselines (25% and 50%) in Table 3. Full analysis in Section A.4.

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## SSM state 차원 절제와 검색 head의 역할 분담

상위 20개 검색 head를 고정한 상태에서 d\_state를 64에서 8로 줄여도 지식 중심 과제와 검색 중심 과제 모두에서 큰 성능 손실이 없다고 보고됩니다. 저자들은 검색 부담이 attention으로 넘어갔기 때문에 recurrent state가 장기 기억 역할을 덜 해도 된다고 해석합니다. 이는 저자의 해석이며, 상태 차원이 어떤 내부 기능을 맡는지 직접 측정한 결과는 아닙니다.

d\_state를 4로 더 줄이면 검색 중심 과제에서 성능이 떨어지고 coverage는 90% 미만으로 보고됩니다. 같은 표에서 SSM-only 모델의 d\_state=64 설정은 약 50% coverage에 그칩니다. 따라서 SSM이 완전히 무의미해졌다고 볼 수는 없으며, 원문도 SSM이 보조 역할을 계속한다고 설명합니다.

## 적용 범위와 남은 질문

이 연구는 3B 미만 모델만 평가했으므로, 더 큰 규모에서도 같은 소수 head가 충분한지는 확인하지 않았습니다. head 선택은 합성 KV-Retrieval probe에 의존하기 때문에, 멀티홉 검색처럼 이 probe가 포착하지 못한 설정에서는 다른 구성요소가 필요할 수 있습니다.

또한 KV 공유를 강제하지 않으므로 KV 캐시를 더 줄일 여지가 남아 있고, 검색과 recurrent backbone이 완전히 분리되지 않아 소수의 SSM head도 검색 과제에 영향을 줍니다. 이 결합 때문에 d\_state를 더 공격적으로 줄이는 데 한계가 있다고 저자들은 설명합니다.

![Table 6: Student Ablation (Hybrid-Llama).We val- idate the student model (20 Attn, 492 SSM heads) by ablating components individually. We report the most sensi…](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c/figures/figure-bf2ab8ef9d4ab453dd59c1bb17b1f094.png?thumb=512)

**Table 6** :Student Ablation (Hybrid-Llama).We val- idate the student model (20 Attn, 492 SSM heads) by ablating components individually. We report the most sensitive heads from each group.Boldvalues indicate a drop below 0.7 accuracy. Results show 11/20 attention heads are critical vs. only 5/492 SSM heads, confirming that retrieval is effectively offloaded to attention.

[원문](https://arxiv.org/abs/2602.11374v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Aviv Bick, Eric P. Xing, Albert Gu · Retrieval-Aware Distillation for Transformer-SSM Hybrids · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Aviv Bick, Eric P. Xing, Albert Gu
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 2월 11일
- **등록일**: 2026년 10월 30일
- **수정일**: 2026년 2월 11일
- **버전**: v1
- **arXiv**: 2602.11374
- **분류**: cs.LG · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2602.11374v1) · [원문 PDF ↗](https://arxiv.org/pdf/2602.11374v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

State-space models (SSMs) offer efficient sequence modeling but lag behind Transformers on benchmarks that require in-context retrieval. Prior work links this gap to a small set of attention heads, termed Gather-and-Aggregate (G&A), which SSMs struggle to reproduce. We propose \*retrieval-aware distillation\*, which converts a pretrained Transformer into a hybrid student by preserving only these retrieval-critical heads and distilling the rest into recurrent heads. We identify the essential heads via ablation on a synthetic retrieval task, producing a hybrid with sparse, non-uniform attention placement. We show that preserving \*\*just 2% of attention heads recovers over 95% of teacher performance on retrieval-heavy tasks\*\* (10 heads in a 1B model), requiring far fewer heads than hybrids that retain at least 25%. We further find that large recurrent states often compensate for missing retrieval: once retrieval is handled by these heads, the SSM backbone can be simplified with limited loss, even with an $8\\times$ reduction in state dimension. By reducing both the attention cache and the SSM state, the resulting hybrid is $5$--$6\\times$ more memory-efficient than comparable hybrids, closing the Transformer--SSM gap at a fraction of the memory cost.

## 원문 인용

Aviv Bick, Eric P. Xing, Albert Gu (2026). Retrieval-Aware Distillation for Transformer-SSM Hybrids. arXiv:2602.11374v1. https://arxiv.org/abs/2602.11374v1

**BibTeX**

```
@misc{bick2026retrieval,
  title = {{Retrieval-Aware Distillation for Transformer-SSM Hybrids}},
  author = {Aviv Bick and Eric P. Xing and Albert Gu},
  year = {2026},
  eprint = {2602.11374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.11374v1}
}
```

## 이 논문의 용어

- [KV-Cache](https://refivu.com/terms/54ba3757ae07-kv-cache)
- [Adapter](https://refivu.com/terms/105463863b3c-adapter)
- [Qwen2.5-1.5B](https://refivu.com/terms/63720435775f-qwen2-5-1-5b)
- [Llama-3.2-1B](https://refivu.com/terms/9f53f00f0d1e-llama-3-2-1b)
- [SWDE](https://refivu.com/terms/72c6930f2f3b-swde)
- [Frobenius distance](https://refivu.com/terms/c3d2f7eccfa8-frobenius-distance)
- [Gather-and-Aggregate](https://refivu.com/terms/aa6bba5ad5c3-gather-and-aggregate)

## 다른 논문 해설

- [LUCID: Attention with Preconditioned Representations](https://refivu.com/papers/fe9ac658-037b-43f4-892b-78040757947b-lucid-attention-with-preconditioned-representations.md)
- [Multi-Head Attention as a Source of Catastrophic Forgetting in MoE Transformers](https://refivu.com/papers/e5634418-a71d-4bb6-886f-2b3eec8e73fd-multi-head-attention-as-a-source-of-catastrophic.md)
- [Transformers Provably Learn Algorithmic Solutions for Graph Connectivity, But Only with the Right Data](https://refivu.com/papers/b23c33ef-4b87-4e29-a0da-332c5c52f7a4-transformers-provably-learn-algorithmic-solutions-for-graph.md)
- [Why ReLU? A Bit-Model Dichotomy for Deep Network Training](https://refivu.com/papers/ef9838e0-146e-4cab-acca-5a924451690d-why-relu-a-bit-model-dichotomy-for-deep.md)
- [WaveSSM: Multiscale State-Space Models for Non-stationary Signal Attention](https://refivu.com/papers/b10a30ea-d84b-4eed-9929-b946bcc1a697-wavessm-multiscale-state-space-models-for-non-stationary.md)
- [Memory Caching: RNNs with Growing Memory](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8-memory-caching-rnns-with-growing-memory.md)
- [What Makes Value Learning Efficient in Residual Reinforcement Learning?](https://refivu.com/papers/82c1281d-0fbc-4ba8-8b7c-e98db624e8f1-what-makes-value-learning-efficient-in-residual.md)
- [Effective MoE-based LLM Compression by Exploiting Heterogeneous Inter-Group Experts Routing Frequency and Information Density](https://refivu.com/papers/1d813366-597d-4852-b126-c159f086835e-effective-moe-based-llm-compression-by-exploiting.md)
- [Expanding the Capabilities of Reinforcement Learning via Text Feedback](https://refivu.com/papers/436cac7b-044f-4b68-9e42-652b65c73022-expanding-the-capabilities-of-reinforcement-learning-via.md)
- [Olmix: A Framework for Data Mixing Throughout LM Development](https://refivu.com/papers/04e2b336-70dc-476c-b9d0-e7bfb2e8c3c3-olmix-a-framework-for-data-mixing-throughout-lm.md)
- [Categorical Flow Maps](https://refivu.com/papers/a4628ddc-ab4a-451a-b90e-4d763d516757-categorical-flow-maps.md)
- [SD-MoE: Spectral Decomposition for Effective Expert Specialization](https://refivu.com/papers/c4f9f248-4c0f-4686-bc96-dcc59228b2f6-sd-moe-spectral-decomposition-for-effective-expert.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c-retrieval-aware-distillation-for-transformer-ssm-hybrids)
