Learning What Helps: Task-Aligned Context Selection for Vision Tasks

Jingyu Guo, Emir Konuk, Fredrik Strand, Christos Matsoukas, Kevin Smith
11/29/2025
cs.CV

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Humans often resolve visual uncertainty by comparing an image with relevant examples, but ViTs lack the ability to identify which examples would improve their predictions. We present Task-Aligned Context Selection (TACS), a framework that learns to select paired examples which truly improve task performance rather than those that merely appear similar. TACS jointly trains a selector network with the task model through a hybrid optimization scheme combining gradient-based supervision and reinforcement learning, making retrieval part of the learning objective. By aligning selection with task rewards, TACS enables discriminative models to discover which contextual examples genuinely help. Across 18 datasets covering fine-grained recognition, medical image classification, and medical image segmentation, TACS consistently outperforms similarity-based retrieval, particularly in challenging or data-limited settings.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{guo2025learning,
  title  = {Learning What Helps: Task-Aligned Context Selection for Vision Tasks},
  author = {Jingyu Guo and Emir Konuk and Fredrik Strand and Christos Matsoukas and Kevin Smith},
  year   = {2025},
  eprint = {2512.00489},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.00489v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.00489.svg)](https://codeofpaper.com/paper/2512.00489)

Discussion