Gradient-free Task-Conditioned Retrieval for On-Device In-Context Learning
Not on the map. Why?
Abstract (arXiv)
On-device in-context learning (ICL) relies on pre-inference retrieval to select demonstrations for useful context before downstream model inference. This retrieval must exploit task-specific information while operating over local memories under limited computation, memory, and data-exposure budgets. We propose Conditional Retrieval Alignment (CoRA), a gradient-free framework that converts a frozen encoder into a task-conditioned retriever using paired candidate inputs and outputs. CoRA selects complementary encoder layers, constructs an output-derived conditioning space from candidate memory, and aligns candidate input representations to this space through closed-form ridge regression. Low-rank factorization then produces a compact retrieval basis where candidate outputs are used only during offline index construction, whereas query-time retrieval requires only the query input and precomputed index. We show that CoRA's rank-constrained basis is the optimal low-rank compression of the output-conditioned fitted representation, and derive an exact two-pass streaming construction that avoids materializing the full fitted matrix. We further extend the framework to multimodal exemplar retrieval by incorporating visual representations into the conditioning and retrieval spaces. Experiments across ten textual datasets and four multimodal benchmarks with Llama-3.2-1B, MobileLLM-Pro, OpenFlamingo-3B, and Qwen3.5-2B, as well as end-to-end Raspberry Pi~5 deployment demonstrate that CoRA supports effective task-conditioned retrieval without retriever fine-tuning, backpropagation, or target-model calls.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 43 of its 65 references that are in the map. First posted on arXiv 30 Jul 2026.
Builds on
43 of 65 references.
References · 43
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2016Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answeringcited by 2,516
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2019Similarity of Neural Network Representations Revisitedcited by 1,755
- 2015Microsoft COCO Captions: Data Collection and Evaluation Servercited by 1,462
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,261
31 more
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
- 2018VizWiz Grand Challenge: Answering Visual Questions from Blind Peoplecited by 858
- 2022A-OKVQA: A Benchmark for Visual Question Answering using World Knowledgecited by 710
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2020MCUNet: Tiny Deep Learning on IoT Devicescited by 273
- 2023MMICL: Empowering Vision-language Model with Multi-Modal In-Context Learningcited by 172
- 2024PrivacyLens: Evaluating Privacy Norm Awareness of Language Models in Actioncited by 171
- 2020MTOP: A Comprehensive Multilingual Task-Oriented Semantic Parsing Benchmarkcited by 158
- 2023Compositional Exemplars for In-context Learningcited by 144
- 2023Unified Demonstration Retriever for In-Context Learningcited by 142
- 2020Task-Oriented Dialogue as Dataflow Synthesiscited by 122
- 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 98
- 2023Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineeringcited by 94
- 2023MatFormer: Nested Transformer for Elastic Inferencecited by 85
- 2024Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvementscited by 83
- 2024Aligning LLM Agents by Learning Latent Preference from User Editscited by 69
- 2024What Makes Multimodal In-Context Learning Work?cited by 56
- 2024Multimodal Task Vectors Enable Many-Shot Multimodal In-Context Learningcited by 50
- 2023Skill-Based Few-Shot Selection for In-Context Learningcited by 46
- 2023Can Multimodal Large Language Models Truly Perform Multimodal In-Context Learning?cited by 34
- 2019Universal Text Representation from BERT: An Empirical Studycited by 28
- 2025TACO: Enhancing Multimodal In-context Learning via Task Mapping-Guided Sequence Configurationcited by 23
- 2024NoMAD-Attention: Efficient LLM Inference on CPUs Through Multiply-add-free Attentioncited by 12
- 2024Unraveling the Mechanics of Learning-Based Demonstration Selection for In-Context Learningcited by 9
- 2022A Dense Representation Framework for Lexical and Semantic Matchingcited by 8
- 2025Provoking Multi-modal Few-Shot LVLM via Exploration-Exploitation In-Context Learningcited by 7
- 2023Efficient Neural Ranking using Forward Indexes and Lightweight Encoderscited by 6
- 2025DOCS: Quantifying Weight Similarity for Deeper Insights into Large Language Modelscited by 4
- 2025MobileLLM-Pro Technical Reportcited by 3
Built on by
Not cited yet.