SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.24181 · 2026

Unlocking Few-Shot Capabilities in LVLMs via Prompt Conditioning and Head Selection

Gabriele Facciolo, Jérémy Anger, Xavier Bou, Adhemar De Senneville, Rafael Grompone

arXiv · PDF · Open in the Atlas

Code that ran

12 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 10 failures of our instrument; 7 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2603.24181.json · badge: /api/ran/2603.24181.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mrflogs/ICLR24 canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
gaopengcuhk/Tip-Adapter canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
ybendou/ProKeR canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
AdhemarDeSenneville/HEC community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
Classifier Ran
ran on a synthesized input · constructed an object; no result was computed
AdhemarDeSenneville/HEC/src/fewshot/classifier.py
pointer only (licence: NONE) · get_code("9ce04136606729c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AdhemarDeSenneville/HEC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

RBF_Kernel Ran
ran; our contract draft was wrong, not the code
ybendou/ProKeR/trainers/proker.py
code served (permissive licence) · get_code("13f44a66c02770fe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# X and Y are tensors that will be used in matrix multiplication
# X.float() @ Y.float().T means X is shape (batch, dim) and Y is shape (batch, dim)
# The result of @ will be (batch, batch)
# beta is a scalar for the exponential scaling

X = torch.randn(2, 4)
Y = torch.randn(2, 4)
beta = 0.5

ARGS = {
    "X": X,
    "Y": Y,
    "beta": beta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_cache_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaopengcuhk/Tip-Adapter/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from gaopengcuhk/tip-adapter, is pointer only (licence: NONE) · get_code("e57ad1054530e142")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_pairs Ran
ran; our contract draft was wrong, not the code
gaopengcuhk/Tip-Adapter/clip/simple_tokenizer.py
pointer only (licence: NONE) · get_code("d919ae32e5e4e616")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_top_heads_V Ran
ran, honoured the contract we drafted
AdhemarDeSenneville/HEC/src/fewshot/classifier.py
pointer only (licence: NONE) · get_code("5e18ce0e1f3bf838")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AdhemarDeSenneville/HEC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_vecs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrflogs/ICLR24/main_robustness.py
pointer only (licence: NONE); the stored copy get_code serves, from mrflogs/iclr24, is pointer only (licence: NONE) · get_code("ea8d5fd6970f79fb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

listdir_nohidden Ran
ran; our contract draft was wrong, not the code
mrflogs/ICLR24/datasets/imagenet.py
pointer only (licence: NONE) · get_code("fe317c3d4d24147a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pre_load_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrflogs/ICLR24/utils.py
pointer only (licence: NONE) · get_code("807dc79d03aaa20f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pre_load_features Ran
ran; our contract draft was wrong, not the code
ybendou/ProKeR/utils.py
code served (permissive licence) · get_code("f9282c7399f45992")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal CLIP-like model with encode_image method
class MinimalCLIPModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.visual = nn.Linear(3, 4)  # input 3 dims, output 4 dims
    
    def encode_image(self, images):
        # images shape: (batch, 3)
        return self.visual(images)
    
    def to(self, device):
        super().to(device)
        return self

clip_model = MinimalCLIPModel()

# Create a small data loader - list of (images, labels) tuples
# Batch size 2, image dimension 3, 2 batches total
loader = [
    (torch.randn(2, 3), torch.tensor([0, 1])),
    (torch.randn(2, 3), torch.tensor([0, 1])),
]

ARGS = {
    'clip_model': clip_model,
    'loader': loader,
    'norm': True,
    'load_path': '',
    'device': 'cpu',
    'overwrite': False,
    'n_shots': -1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrflogs/ICLR24/main_few_shots.py
pointer only (licence: NONE); the stored copy get_code serves, from mrflogs/iclr24, is pointer only (licence: NONE) · get_code("ab796c2494f06d76")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

run Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrflogs/ICLR24/main_robustness.py
pointer only (licence: NONE); the stored copy get_code serves, from mrflogs/iclr24, is pointer only (licence: NONE) · get_code("c7e15186f6aeadec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
gaopengcuhk/Tip-Adapter/clip/simple_tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ClassifierHEC_V Not yet run
unverified (harvested, no recorded run)
AdhemarDeSenneville/HEC/src/fewshot/classifier.py
pointer only (licence: NONE) · get_code("54780f0f8c28320a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AdhemarDeSenneville/HEC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
gaopengcuhk/Tip-Adapter/clip/model.py
pointer only (licence: NONE); the stored copy get_code serves, from tmlr-group/CARPRT, is pointer only (licence: NONE) · get_code("f3830274a7e18d5e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cls_acc Not yet run
unverified (harvested, no recorded run)
gaopengcuhk/Tip-Adapter/utils.py
pointer only (licence: NONE) · get_code("f2a0a5061e7c204e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

cls_acc Not yet run
unverified (harvested, no recorded run)
ybendou/ProKeR/utils.py
code served (permissive licence) · get_code("7d02d5cb2c679f65")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
gaopengcuhk/Tip-Adapter/clip/clip.py
pointer only (licence: NONE) · get_code("db64af1ba3479e8d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gaopengcuhk/Tip-Adapter when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
mrflogs/ICLR24/clip/clip.py
pointer only (licence: NONE) · get_code("f6f30e41636ae569")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
mrflogs/ICLR24/main_base2new.py
pointer only (licence: NONE); the stored copy get_code serves, from mrflogs/iclr24, is pointer only (licence: NONE) · get_code("2d182929376e2d82")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrflogs/ICLR24 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 5 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_pairs 258 other papers
245 dated earlier, 12 later, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
222 dated earlier, 8 later, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
build_model 119 other papers
115 dated earlier, 2 later, 2 undated
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
and 116 more not named here
load 23 other papers
22 dated earlier, 1 undated
2208.05318 (2022-08)
Generative Action Description Prompts for Skeleton-based Action Recognition
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision & Language Models
2212.04501 (2022-12)
Learning Video Representations from Large Language Models
and 20 more not named here
load 17 other papers
16 dated earlier, 1 later
2211.16582 (2022-11)
SinDDM: A Single Image Denoising Diffusion Model
2302.00070 (2023-02)
Debiasing Vision-Language Models via Biased Prompts
and 14 more not named here
cls_acc 12 other papers
11 dated earlier, 1 later · 2 only as an assembly brick
2210.01253 (2022-10)
PLOT: PROMPT LEARNING WITH OPTIMAL TRANS-PORT FOR VISION-LANGUAGE MODELS
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation
2403.12964 (2024-03)
Enhancing Vision-Language Few-Shot Adaptation with Negative Learning
and 9 more not named here
listdir_nohidden 4 other papers
4 dated earlier
2402.04050 (2024-02)
Connecting the Dots: Collaborative Fine-tuning for Black-Box Vision-Language Models
2406.00345 (2024-06)
DECOOP: Robust Prompt Tuning with Out-of-Distribution Detection
2406.09353 (2024-06)
Enhancing Domain Adaptation through Prompt Gradient Alignment
and 1 more not named here
build_cache_model 1 other paper
1 dated earlier
2207.09519 (2022-07)
Tip-Adapter: Training-free Adaption of CLIP for Few-shot Classification
get_vecs 1 other paper
1 dated earlier
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation
run 1 other paper
1 dated earlier
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation
run 1 other paper
1 dated earlier
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation
run 1 other paper
1 dated earlier
2402.04087 (2024-02)
A Hard-to-Beat Baseline for Training-free CLIP-based Adaptation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Current Large Vision Language Models (LVLMs) excel at many zero-shot tasks like image captioning, visual question answering and OCR. However, these same models suffer from poor performance at image classification tasks, underperforming against CLIP-based methods. Notably, this gap is surprising because many LVLMs use CLIPpretrained vision encoders. Yet LVLMs are not inherently limited by CLIP's architecture with independent vision and text encoders. In CLIP, this separation biases classification toward class-name matching rather than joint visual-text reasoning. In this paper we show that, despite their poor raw performance, LVLMs can improve visual feature class separability at inference using prompt conditioning, and LVLMs' internal representations, especially attention heads, can outperform the model itself at zero-shot and few-shot classification. We introduce Head Ensemble Classifiers (HEC) to bridge the performance gap between CLIP-based and LVLM-based classification methods. Inspired by Gaussian Discriminant Analysis, HEC ranks the most discriminative vision and text heads and combines them into a training-free classifier. We show that HEC achieves state-of-the-art performance in few-shot and zero-shot classification across 12 datasets. Code: github.com/AdhemarDeSenneville/HEC

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2603.24181")
get_code_for_paper("2603.24181")
have("2603.24181")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2603.24181.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2603.24181.svg)](https://syntology.ai/paper/2603.24181)

Connect an agent — have() is free.