Lune

ACL2026Top-tier venue

BOSCH: Black-Box Binary Optimization for Short-Context Attention-Head Selection in LLMs

Abbas Ghaddar, Ivan Kobyzev, Boxing Chen, Yufei Cui

Abstract

Post-training hybridization of large language models (LLMs) often replaces quadratic self-attention with sliding-window attention (SWA) to reduce KV cache usage and improve latency. Existing hybridization schemes are typically defined either at the layer level (e.g., interleaving) or at the head level via static rankings from local to global. Layer-level schemes ignore that local and global dependencies are routed through heads within the same layer, while static head-level rankings suffer from entanglement: a head's local/global behavior can change after hybridization. We propose BOSCH, Black-box Binary Optimization for Short-context Head Selection, a training-free method that formulates the problem as a Large Neighborhood Search and decomposes it into three subproblems: (i) layer-importance detection via small-budget black-box probes, (ii) adaptive per-layer SWA-ratio assignment based on these sensitivities, and (iii) grouped head-level optimization within ratio buckets. Extensive experiments on 4 LLMs ranging from 1.7B to 30B parameters, across 4 SWA ratios, show that BOSCH consistently outperforms layer-level heuristics and 6 strong static head-level methods, with larger gains at higher SWA ratios. Under continual pretraining, BOSCH recover original long-context performance faster and to a higher level. Analysis of the selected heads reveals substantial turnover for BOSCH across different SWA ratios, underscoring the importance of performing head-level selection for each target ratio rather than relying on fixed locality rankings.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Mamba in the Llama: Distilling and Accelerating Hybrid Models cites YaRN: Efficient Context Window Extension of Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on8

  1. YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 citations
  2. A Fast Post-Training Pruning Framework for TransformersWoosuk Kwon, Sehoon Kim, Michael W. Mahoney, Joseph Hassoun et al.NeurIPS 2022 · 247 citations
  3. The Mamba in the Llama: Distilling and Accelerating Hybrid ModelsJunxiong Wang, Daniele Paliotta, Avner May, Alexander M. Rush et al.NeurIPS 2024 · 146 citations
  4. Rethinking Optimization and Architecture for Tiny Language ModelsYehui Tang, Kai Han, Fangcheng Liu, Yunsheng Ni et al.ICML 2024 · 8 citations
  5. RW-KD: Sample-wise Loss Terms Re-Weighting for Knowledge DistillationPeng Lu, Abbas Ghaddar, Ahmad Rashid, Mehdi Rezagholizadeh et al.EMNLP Findings 2021 · 6 citations

Related papers

  1. When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language ModelsYingming Zheng, Hanqi Li, Kai Yu, Lu ChenEMNLP 2025
  2. Short Window Attention Enables Long-Term MemorizationLoïc Cabannes, Maximilian Beck, Maria Lomeli, Gergely Szilvasy et al.ICLR 2026 · 11 citations
  3. Native Hybrid Attention for Efficient Sequence ModelingJusen Du, Jiaxi Hu, Zhang Tao, Weigao Sun et al.ACL 2026 · 8 citations
  4. Adaptive Layer Selection for Layer-Wise Token Pruning in LLM InferenceRei Taniguchi, Yuyang Dong, Makoto Onizuka, Chuan XiaoACL Findings 2026
  5. Align Attention Heads Before Merging Them: An Effective Way for Converting MHA to GQAQingyun Jin, Xiaohui Song, Feng Zhou, Zengchang QinEMNLP Findings 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines