Robust In-Context Selection via Online Learned Position-Corrected Attention

Deeksha Koul, Gaurav Kumar, Yash Sabale, Sunita Sarawagi


Abstract
Large Language Models (LLMs) are often deployed in tasks that require selecting an item from a long list provided in the model’s context. LLMs’ native selection behavior is brittle: predictions are sensitive to the surface form of the identifiers, their placement within the context, and the ordering of candidate items. We present OLR-Heads, a robust method for list selection that harnesses attention patterns available from a single forward call on the LLM. OLR-Heads learns the logic for item selection using a few in-context examples, and a simple online position-debiasing mechanism to correct attention distortion. Across multiple database and tool selection benchmarks, OLR-Heads consistently improves selection performance over direct generation and prior attention-based methods, while remaining robust to prompt variations and item ordering.The LLM’s KV cache states are unaffected, and can be reused for subsequent response generation. In contrast, existing approaches either entail additional LLM calls, or task-specific offline learning, or position debiasing methods that modify the attention or encoding rendering the KV states unusable for subsequent generation.
Anthology ID:
2026.findings-acl.1743
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
34919–34930
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1743/
DOI:
Bibkey:
Cite (ACL):
Deeksha Koul, Gaurav Kumar, Yash Sabale, and Sunita Sarawagi. 2026. Robust In-Context Selection via Online Learned Position-Corrected Attention. In Findings of the Association for Computational Linguistics: ACL 2026, pages 34919–34930, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
Robust In-Context Selection via Online Learned Position-Corrected Attention (Koul et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1743.pdf
Checklist:
 2026.findings-acl.1743.checklist.pdf