# NLL-Guided Full-Attention Layer Selection
> Ficha editorial pública de Research IA. Estado: Lectura primaria completa. La interpretación editorial no sustituye la fuente primaria.

- Página canónica: https://luiseduardodemiguel.com/research-ia/papers/nll-guided-full-attention-layer-selection
- Fuente primaria: https://arxiv.org/abs/2606.27791
- Versión leída: v1
- Fuente comprobada: 2026-08-19 · lectura primaria completa; extracción editorial automatizada, revisión humana pendiente
- Autores: Qiong Tang, Xiangkun Hu, Xiangyang Liu, Yiran Chen, Yunfan Shao
- Fecha del corte: 26 JUNIO 2026.
- Área: EVALUACIÓN

## Tesis y contexto

Método training-free para decidir qué capas deben mantener full attention en modelos long-context híbridos. En LongMemEval con Qwen3-4B logra 64,6% de accuracy usando solo 1/4 de capas full-attention, reduciendo coste frente a baselines.

- Problema: Long-context es caro y no todas las capas necesitan atención completa.
- Por qué importa: Baja coste de despliegue de LLMs con contexto largo.

## Evidencia reportada

- **reported-result**: NLL-Guided 1/4-FA achieves 64.6% accuracy, within 0.4 percentage points of the 1/2-FA Periodic baseline (65.0%) while using only half the full-attention budget (9 vs 18 layers). [localizador](https://arxiv.org/html/2606.27791#S4)
- **reported-result**: This demonstrates that intelligent layer selection can substantially reduce computational cost with minimal accuracy loss. [localizador](https://arxiv.org/html/2606.27791#S4)
- **reported-result**: Compared to other 1/4-FA methods, NLL-Guided outperforms the SWAA-reported periodic baseline by 10.4 percentage points (64.6% vs 54.2%), demonstrating that data-driven selection substantially outperforms fixed patterns under the same FA budget. [localizador](https://arxiv.org/html/2606.27791#S4)
- **reported-result**: The improvement over the matched LightTransfer baseline is even more pronounced at 26.4 percentage points (64.6% vs 38.2%), indicating that NLL-based scoring provides a stronger signal than attention-pattern heuristics for this task. [localizador](https://arxiv.org/html/2606.27791#S4)

## Lectura y límite

- Método: La lectura de 3 Method describe la intervención y su construcción: We propose NLL-guided layer selection for training-free sliding-window attention adaptation. Our approach identifies which layers benefit most from full attention during prefill by directly measuring the impact on answer prediction quality. Figure 1 illustrates the overall framework. Consider a Transformer with L layers deployed with sliding-window attention adaptation (SWAA) ( 15 ) . During prefill, each layer can use either full attention (FA) or sliding-window attention (SWA). Given a budget of k layers that may use full attention during prefill, we seek to select the set S\subseteq\{0,\ldots,L-1\} with |S|=k…
- Límite: La lectura primaria permite comprobar método y resultados en el HTML, pero no convierte sus conclusiones en validación independiente. La ficha no demuestra transferencia fuera de los datasets, modelos, herramientas y condiciones descritos en 4 Experiments.
- Confianza editorial: Media
- Limitación: El cierre de la fuente señala: The calibration examples come from LongAlign-10k and fusang-v1-filtered rather than LongMemEval itself. This avoids calibrating directly on the evaluation benchmark, but it leaves open how strongly the selected layer set depends on calibration-domain coverage. The present study therefore establishes that a small general long-context calibration set can produce a strong Qwen3-4B layer set for LongMemEval; testing cross-domain calibration and additional FA…
- Limitación: La ficha no demuestra transferencia fuera de los datasets, modelos, herramientas y condiciones descritos en 4 Experiments.

## Localizadores de evidencia
- [Fuente primaria · canonical](https://arxiv.org/abs/2606.27791): tipo abstract
- [HTML · lectura completa](https://arxiv.org/html/2606.27791): tipo abstract
- [Método · 3 Method](https://arxiv.org/html/2606.27791#S3): tipo section
- [Evaluación · 4 Experiments](https://arxiv.org/html/2606.27791#S4): tipo section
- [Cierre · 5 Conclusion](https://arxiv.org/html/2606.27791#S5): tipo section

## Próxima prueba

- ¿La propuesta mejora RAG largo frente a la línea base actual?
- Métrica: Comparar la métrica principal de la fuente junto con calidad, coste, latencia y tasa de errores.
- Regla de parada: Parar si no aparece una mejora reproducible o si aumenta el riesgo, la complejidad o el coste sin compensación.

## Recursos reproducibles
- [https://gitlab.com/fars-a/nll-guided-swaa-layer-selection](https://gitlab.com/fars-a/nll-guided-swaa-layer-selection)
- [https://huggingface.co/Qwen/Qwen3-4B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-4B-Thinking-2507)
- [the following issues](https://github.com/arXiv/html_feedback/issues)
- [list of packages that need conversion](https://github.com/brucemiller/LaTeXML/wiki/Porting-LaTeX-packages-for-LaTeXML)

## Enlaces relacionados

- [Supersede](https://luiseduardodemiguel.com/research-ia/markdown/papers/supersede-diagnosing-and-training-the-memory-update-gap-in-llm-agents)
- [DiscoBench](https://luiseduardodemiguel.com/research-ia/markdown/papers/discobench-when-search-agents-should-ask)
- [SHIFT](https://luiseduardodemiguel.com/research-ia/markdown/papers/shift-gate-modulated-activation-steering-for-knowledge-conflict-mitigati)