Manuscript Offprint

arXiv:2609.11310

Your Model Already Knows Don't Teach It, Learn to Ask It: Soft Prompting for Few-Shot Adaptation of Vision-Language Models

Gautam Rajendrakumar Gare, Siyi Li, Hewei Wang, Cesar Daniel Hernandez, Wei Zhao, Wolfgang M. Pauli, John Galeotti, Deva Ramanan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We address few-shot object detection with vision-language models (VLMs) in out-of-domain settings such as aerial, industrial, and medical imagery, where only ten annotated images are available for supervision. The dominant adaptation strategies are discrete prompt optimization, which is gradient-free, and LORA fine-tuning, which augments frozen pretrained weights with learnt low-rank update matrices. We revisit a third option: soft prompting, where a few continuous prompt tokens are optimized by gradient descent against a fully frozen backbone. We show that two design choices strongly influence performance. First, injecting the tokens at the cross-modal boundary, between the visual and text tokens, beats every other ordering of image, prompt, and text, including the prefix placement inherited from NLP (10.0 vs. 8.4 average mAP). Second, initializing the prompt from a semantically empty space token, so that the prompt's meaning is unchanged at initialisation, beats semantic and random starts. With these choices, a prompt of one to three learnt tokens, sized per domain by a short sweep (7,168 parameters on average), matches the best LORA configuration from a rank sweep on the Roboflow20-VL benchmark (14.2 vs. 14.2 mAP, 10-shot) while training over 20,000× fewer parameters. However, optimization remains challenging in the few-shot regime: soft prompting exhibits higher variance across random seeds than LORA, although LORA is itself not immune to instability. In contrast to LORA, SOFTPROMPT exhibits no forgetting: the LORA rank that matches our accuracy loses 35% relative VQA accuracy on NaturalBench, growing to 56% at the largest rank, while SOFTPROMPT provably loses none. We attribute this behavior to the fact that SOFTPROMPT leaves the pretrained model weights unchanged. The learnt tokens behave like prompts, not weights: they transfer to a newer model version without retraining (+0.8 mAP on Qwen3.5-9B) and can be verbalised into human-readable prompts competitive with dedicated prompt search (matching DetPO, outperforming GEPA). The recipe extends beyond detection: on RoboCasa manipulation tasks the frozen π0.5\pi_{0.5} vision-language-action policy struggles; soft prompts again deliver substantial gains, matching the coverage-matched LORA baseline on two of three tasks, provided the tokens are again placed where the gradient needs them; Our results suggest that modern VLMs already encode much of what specialised domains require; the task is not to teach them, but to learn how to ask.

1 INTRODUCTION

Vision-language models (VLMs) trained on web-scale data detect common objects well, but their accuracy collapses on specialised domains: aerial imagery, industrial inspection, medical scans (Radford et al., 2021; Bai et al., 2023; Robicheaux et al., 2025). In practice, domain experts are expensive

Soft prompts: LoRA accuracy, no forgetting

Figure

Trainable parameters (log scale)

Figure 1: SOFTPROMPT matches LORA with zero forgetting at over 20,000× fewer trainable parameters. All methods use the default class-name evaluation protocol (§4.1). Top: all-domain mAP@50:95 on Roboflow20-VL (10-shot) vs. trainable parameters (log scale). Sweeping LORA rank 4 → 128 peaks at 14.2 mAP at r=64 (174.6M parameters) and then declines; SOFTPROMPT (IST, per-domain L, 7,168 parameters on average, backbone frozen) reaches the same 14.2. Bottom: the hidden cost. Relative drop in NaturalBench VQA group accuracy vs. the unadapted backbone: LORA's forgetting grows with rank, 35% at the accuracy-matching r=64 and 56% at r=128, while SOFTPROMPT and the training-free prompt baselines sit at exactly 0% because no backbone weight changes. The two panels move in opposite directions: the ranks that help detection most damage the generalist most. The instruction-augmented LORA variant is reported in Appendix F (see §4.2). Beyond efficiency, the learnt soft prompts keep the virtues of text prompts: they transfer across models (§6.3) and can be distilled into editable natural language (§6.2).

and annotation budgets are small, often consisting of 10 labeled images. The question is how to spend them.

Existing answers fall into two families: Discrete (hard) prompt optimisation and parameter-efficient fine-tuning (PEFT). Similar to our approach, discrete (hard) prompt optimisation (Agrawal et al.; Gare et al., 2026) also adapts a fully frozen model through prompts rather than weight updates. However, it optimises discrete token sequences using gradient-free search, whereas SOFTPROMPT learns continuous prompt embeddings with gradient descent. In our experiments these approaches improve performance at most 1.2 mAP over a hand-written prompt (12.5 vs. 11.3 mAP). Parameter-efficient fine-tuning, chiefly LORA (Hu et al., 2021), learns low-rank adaptations to the model parameters. Its rank must be selected per task, and the resulting specialization comes at the expense of general-domain performance. Figure 1 shows both facts on Roboflow20-VL: the LORA rank sweep peaks at 14.2 mAP and then declines, and the same adapters degrade the backbone's VQA accuracy on NaturalBench (Li et al., 2024a) by up to 56% relative, a cost invisible to detection-only evaluation.

This dichotomy raises a question: can we have gradient-based adaptation while keeping the pretrained backbone unchanged? Soft prompting (Lester et al., 2021) does exactly this: optimising a few continuous token embeddings at the input of a frozen model. Yet, it is rarely the method of record for multimodal detection. We find that its weak reputation is largely an artifact of two defaults inherited from NLP: soft tokens are prepended to the sequence, and initialised with task semantics. Our experiments show that both defaults are suboptimal in a multimodal sequence. Injecting the tokens

Figure

Figure 2: SOFTPROMPT combines the strengths of the two dominant adaptation approaches. Hard prompt optimisation (left) keeps the backbone frozen but searches a discrete vocabulary, which limits expressiveness on specialised domains and precludes gradient-based optimisation. LORA fine-tuning (centre) enables gradient-based adaptation and high accuracy, but modifies millions of backbone weights and risks catastrophic forgetting. SOFTPROMPT (right) optimises L continuous tokens at the cross-modal boundary of the multimodal sequence, reaching LORA-level accuracy while keeping the backbone fully frozen and training only L×dL \times d parameters (8,192 at L=2; L is sized per domain, §5.2). Like hard prompts and unlike LORA, the learnt tokens transfer across models (§6.3) and can be verbalised into editable text (§6.2).

instead at the cross-modal boundary, between the visual patches and the text query, wins our six-way ordering ablation: 10.0 average mAP vs. 8.4 for the NLP-standard prefix transplant and 6.7 for the worst ordering, up to 6×6\times on a single dataset ( §5.1\S5.1). Initialising them with the token corresponding to a single space character, so that the prompt's meaning is unchanged at the start, beats every semantic and random initialisation we tried ( §5.3\S5.3); the principle is the one behind residual learning (He et al., 2016), where the safest default for a new module is to change nothing.

With these two choices, the resulting method, which we call SOFTPROMPT, is simple: we train L=1−3L=1-3 learnt tokens, sized per domain (7,168 parameters on average for an 8B-parameter backbone) with a handful of single-GPU runs. On Roboflow20-VL (10-shot), our result equals the best configuration of a six-rank LORA sweep (14.2 vs. 14.2 mAP at r=64r=64), outperforms PEFT across all evaluated ranks, surpasses gradient-free prompt optimisation, and does so with zero forgetting by construction (Figure 1). The learnt tokens also keep the practical virtues of text prompts that weight updates lose: they are transferable and interpretable. If loaded as-is into the newer Qwen3.5-9B, they still improve over that model's zero-shot baseline (+0.8 mAP, §6.3). They are interpretable in the sense that asking the model to verbalise its own soft tokens yields a human-readable prompt that matches the strongest dedicated prompt search (DetPO) and outperforms GEPA on the same benchmark (§6.2).

Finally, we test whether the recipe is specific to detection. On three RoboCasa (Nasiriany et al., 2024) manipulation tasks (10 demonstrations each), we adapt a frozen π0.5\pi_{0.5} vision-language-action policy (Physical Intelligence et al., 2025) with SOFTPROMPT ( §7\S7). The position lesson reappears in a sharper form: a prefix-only prompt fails (1.7% success), but a prompt that also reaches the action expert, the module that produces the output, matches or beats coverage-matched LORA-based PEFT on the two tasks the base policy can barely do. The third task, one the base already performs, marks the boundary: the prompt overrides the competent policy while LORA improves it. Where the prompt lives, and whether the frozen model needs to be asked or corrected, decide the outcome.

Contributions. First, we identify the two levers that make soft prompting competitive for multimodal detection: injection at the cross-modal boundary and a meaning-preserving initialisation, each validated by a dedicated ablation ( §5§5). Second, we compare SOFTPROMPT against hard prompts, discrete prompt optimisation, a full LORA rank sweep, and a fine-tuned specialist detector on Roboflow20-VL under strict 10-shot supervision, and measure what each method costs the generalist backbone on NaturalBench VQA and RefCOCO grounding ( §4§4). Third, we show that the learnt tokens behave like language: we analyse what they encode, distill them into portable hard prompts that beat prompt-search baselines, and quantify their transfer across model versions ( §6§6). Finally, we extend the recipe to a vision-language-action policy across three manipulation tasks and show that the placement principle, not the detection task, is what carries it, and that the frozen model's own competence bounds it ( §7§7).

References (58)

  • GEPA: REFLECTIVE PROMPT EVOLUTION CAN OUTPERFORM REINFORCEMENT LEARNING
  • Reverse engineering human preferences with reinforcement learning
  • Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyond (opens arXiv in a new tab)
  • Training deep nets with sublinear memory cost (opens arXiv in a new tab)
  • InstructBLIP: Towards general-purpose vision-language models with instruction tuning
  • DetPO: In-Context Learning with Multi-Modal LLMs for Few-Shot Object Detection (opens arXiv in a new tab)
  • Gemma: Open Models Based on Gemini Research and Technology
  • LVIS: A dataset for large vocabulary instance segmentation
  • Deep residual learning for image recognition
  • Parameter-efficient transfer learning for NLP. In International Conference on Machine Learning (ICML), 2019
  • LoRA: Low-Rank Adaptation of Large Language Models
  • Visual prompt tuning
  • Maple: Multi-modal prompt learning
  • The Power of Scale for Parameter-Efficient Prompt Tuning
  • NaturalBench: Evaluating Vision-Language Models on Natural Adversarial Samples
  • Prefix-tuning: Optimizing continuous prompts for generation
  • PromptKD: Unsupervised prompt distillation for vision-language models
  • Visual Instruction Tuning
  • Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detection
  • P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks
  • ProDA: Prompt distribution learning
  • Mimicgen: A data generation system for scalable robot learning using human demonstrations
  • Generation and comprehension of unambiguous object descriptions
  • Catastrophic interference in connectionist networks: The sequential learning problem
  • Robocasa: Large-scale simulation of everyday tasks for generalist robots
  • $π_{0.5}$: a Vision-Language-Action Model with Open-World Generalization
  • Learning Transferable Visual Models From Natural Language Supervision
  • Roboflow100-VL: A Multi-Domain Object Detection Benchmark for Vision-Language Models (opens arXiv in a new tab)
  • AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts (opens arXiv in a new tab)
  • Spot: Better frozen model adaptation through soft prompt transfer
  • Modeling context in referring expressions
  • differentiation (opens arXiv in a new tab)
  • Llamafactory: Unified efficient fine-tuning of 100+ language models
  • Learning to Prompt for Vision-Language Models
  • Conditional prompt learning for vision-language models
  • Gradient flow for the two adaptation methods on a frozen decoder-only VLM trained with the next-token detection loss
  • + action expert
  • The selected lengths are $L \in \{1, 2, 3\}$ (mean 1.75, i.e
  • Per-dataset SOFTPROMPT configurations on Roboflow20-VL (10-shot, mAP@50:95)
  • This appendix gives the search methodology and the complete per-dataset accounting behind that finding
  • Our evaluation pipeline shows this is not the case: a trained soft prompt can be served by an unmodified high-throughput engine, vLLM in our case, through the model's own vocabulary
  • On-disk size of the trainable adapter only (no base-model weights): SOFTPROMPT's torch.save tensor vs. LORA's adapter_model.safetensors, both at their native training precision (fp32)
  • We report the measured figure rather than the parameter estimate because it is what a deployment actually pays
  • Both variants (class names only; with per-class instructions)
  • For reference, DetPO reaches 15.3 all-domain mAP under single-class evaluation and 17.5 with VQA-score reranking
  • Single-class evaluation (one class per VLM call; reference only, not cost-comparable to Table 1)
  • Cross-task forgetting on the RefCOCO family, acc@0.50 (%)
  • Cross-model transfer of trained soft prompts per Roboflow20-VL super-category (Qwen3-VL-8B → Qwen3.5-9B, 10-shot, mAP@50:95)
  • is the better of the §6.2 global/per-class hard prompt, evaluated with no soft tokens;
  • Substituting every trained token with its nearest text token keeps the prompt above the frozen baseline on 6 of 8 above-floor datasets and wins on every one of them; nearest-patch substitution is consistently weaker and collapses generation entirely (zero parseable detections) on three datasets
  • The useful discrete signal lives more reliably in the text-vocabulary space than in the visual-patch space
  • Test mAP@50:95 across three training seeds per pool dataset, canonical Space/IST configuration
  • fewer test images
  • different random initializations reaching different local optima during training, and stochasticity in the vLLM generation step at test time
  • Same checkpoint, three evaluation seeds, test mAP@50:95
  • To test this, we retrain the accuracy-matching LORA configuration ($r=64$, §4.2) from the same three seeds, same nine pool datasets, identical data and hyperparameters (Appendix F) apart from seed, and evaluate test mAP with the same protocol used to produce every LORA number in this paper
  • Test mAP@50:95, three training seeds (42, 123, 2024), $r = 64$
  • >Dataset</td><td colspan=