Cross-Prompt Inference Mitigates Rare-Class Suppression in Imbalanced VLM Finetuning
Organizations: Amazon
Abstract
When a vision-language model is finetuned on class-imbalanced data, rare-class recall can fall well below the model's own zero-shot performance. In this regime, we uncover a surprising matched-prompt penalty whereby the standard choice of reusing the descriptive finetuning prompt at inference can yield lower rare-class recall than using a different descriptive prompt. We call this inference-time strategy cross-prompt inference. We evaluate diverse VLMs across six datasets and find that cross-prompt inference consistently recovers rare-class recall, with varying trade-offs in frequent-class recall. The effect reflects a train-eval prompt interaction rather than prompt quality alone, and does not arise with non-descriptive prompt changes. It is strongest when imbalance and visual confusability produce substantial rare-class suppression, and is weak or absent when such suppression does not occur. Using Tuning Contribution (TuCo), which decomposes a model's computation into pretrained and finetuning parts, we find that cross-prompt inference reduces reliance on finetuning-induced computation and shifts the model toward its pretrained component. Reducing that finetuning contribution also substantially reduces the cross-prompt advantage. These results show that rare-class knowledge suppressed by imbalanced finetuning can remain accessible under a different inference prompt.
Figures & tables
| Rare ( vs. matched) | Overall | |||||||
|---|---|---|---|---|---|---|---|---|
| Dataset | Regime | Match | Mism.(avg) | Mism.(best) | Match | Mism.(avg) | Mism.(best) | ZS |
| Food-101 | Imbalanced | |||||||
| Oversampled | ||||||||
| CUB-200 | Imbalanced | |||||||
| Oversampled | ||||||||
| FGVC-Aircraft | Imbalanced | |||||||
| Descriptive | Non-descriptive | |||||
|---|---|---|---|---|---|---|
| Dataset | Match | Mism. | Match | Mism. | ||
| Food-101 | ||||||
| CUB-200 | ||||||
| FGVC-Aircraft | ||||||
| Stanford Dogs | ||||||
| Mism.(avg) | Ens.(mism) | Ens.(all) | |||||
|---|---|---|---|---|---|---|---|
| Dataset | Match | Rare | Freq. | Rare | Freq. | Rare | Freq. |
| Food-101 | |||||||
| CUB-200 | |||||||
| FGVC-Aircraft | |||||||
| Stanford Dogs | |||||||
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | ratio | train / test | ||
|---|---|---|---|---|
| Food-101 | / | |||
| CUB-200 | / | |||
| FGVC-Aircraft | / | |||
| Stanford Dogs | / |
| Dataset | Training prompt | Matched | Mismatched | ( ) | Drop / Rank |
|---|---|---|---|---|---|
| Food-101 | detailed_all__contrastive | / 2 | |||
| detailed_all__appearance | / 1 | ||||
| detailed_all__attribute | / 1 | ||||
| detailed_rare__appearance | / 1 | ||||
| CUB-200 | detailed_all__contrastive | / 1 | |||
| detailed_all__appearance | / 1 |
| Dataset | Model | Matched | Mismatch | r/ovr | best r |
|---|---|---|---|---|---|
| R/F Ovr | R/F Ovr | rare/ovr | rare | ||
| Food-101 | Qwen3-VL-2B | ||||
| Qwen3-VL-4B | |||||
| Qwen3-VL-8B | |||||
| Qwen2.5-VL-3B | |||||
| Gemma-3-4B |
| Method | Food-101 | CUB-200 | FGVC-Aircraft | Stanford Dogs |
|---|---|---|---|---|
| Matched prompt | / / | / / | / / | / / |
| Mism.(avg) | / / | / / | / / | / / |
| Mism.(ens) | / / | / / | / / | / / |
| Mism.(sel, ) | / / | / / | / / | / / |
| Mism.(sel, ) | / / | / / | / / | / / |
| with oversampling | ||||
| Dataset | Match | Mism.(avg) | Mism.(best) |
|---|---|---|---|
| full finetuning | |||
| Food-101 | |||
| CUB-200 | |||
| FGVC-Aircraft | |||
| Stanford Dogs | |||
| LoRA | |||
| Dataset | Group#1 | Group#2 | Group#3 | Group#4 | Group#5 | Group#6 |
|---|---|---|---|---|---|---|
| (similar) | (different) | |||||
| Food-101 | 0.733 | 0.718 | 0.705 | 0.694 | 0.679 | 0.667 |
| FGVC-Aircraft | 0.803 | 0.793 | 0.772 | 0.760 | 0.754 | 0.734 |
| Stanford Dogs | 0.775 | 0.764 | 0.751 | 0.743 | 0.729 | 0.713 |
| CUB-200 | 0.849 | 0.817 | 0.788 | 0.782 | 0.761 | 0.741 |
| ImageNet | 0.798 | 0.770 | 0.749 | 0.722 | 0.689 | 0.675 |
| Dataset | P P | P D | D P | D D matched | D D ′ mismatched |
|---|---|---|---|---|---|
| Food-101 | |||||
| CUB-200 | |||||
| FGVC-Aircraft | |||||
| Stanford Dogs |
| Dataset | Regime | Match | Mism.(avg) | Mism.(best) |
|---|---|---|---|---|
| Food-101 | Imbalanced | |||
| Oversampled | ||||
| CUB-200 | Imbalanced | |||
| Oversampled | ||||
| FGVC-Aircraft | Imbalanced | |||
| Oversampled |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| filet mignon | a thick round cut of grilled beef steak | a tall, round, boneless beef medallion (unlike the flat wide steak or bone-in pork chop) | beef; boneless; shape: tall round medallion; color: dark seared outside, red inside |
| prime rib | a large roasted beef rib cut, pink in the middle | a roasted beef slab with a bone and a pink center (unlike a seared boneless filet) | beef; bone-in; shape: thick roasted slab; color: brown crust, pink center |
| pork chop | a grilled bone-in pork cut | a pale bone-in pork cut, lighter than beef (unlike the dark red steak) | pork; bone-in; shape: flat chop; color: pale tan |
| steak | a grilled slab of beef | a flat, wide, dark-seared beef slab (unlike the tall round filet mignon) | beef; boneless; shape: flat wide slab; color: dark grilled |
| bolognese spaghetti | spaghetti with a red meat sauce | spaghetti under a chunky red tomato-meat sauce (unlike the pale creamy carbonara) | pasta; sauce: red tomato-meat; texture: chunky; color: red |
| carbonara spaghetti | spaghetti with a creamy egg-and-bacon sauce | spaghetti in a pale glossy egg-cream sauce, no red (unlike red bolognese) | pasta; sauce: egg-cream; texture: glossy; color: pale yellow |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| california gull | a medium gull with a yellow bill, dark eye, and grey back | a MEDIUM gull with yellow legs and a dark eye (unlike the pink-legged herring gull) | gull; size: medium; legs: yellow; eye: dark; back: grey |
| herring gull | a large pale-grey gull with pink legs and a red-spotted yellow bill | a LARGE pale gull with PINK legs (unlike the yellow-legged california/ring-billed gulls) | gull; size: large; legs: pink; bill: yellow with red spot; back: pale grey |
| ring-billed gull | a small gull with a yellow bill circled by a black ring, yellow legs | a small gull whose yellow bill has a clean BLACK RING (unlike the red-spotted herring bill) | gull; size: small; bill: yellow with black ring; legs: yellow |
| western gull | a large gull with a very dark slate back and pink legs | a gull with a very DARK slate back (unlike the pale-grey herring and california gulls) | gull; size: large; back: dark slate; legs: pink |
| arctic tern | a slender grey tern with a full black cap and short red legs | a tern with an ALL-RED short bill and very short legs (unlike caspian’s thick bill or common’s black-tipped bill) | tern; bill: all red; legs: very short red; cap: full black |
| caspian tern | a large tern with a thick bright-red bill and a black cap | a large tern with a THICK bright-red carrot bill (unlike the slender arctic/common terns) | tern; size: large; bill: thick bright red; cap: black |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| 737-300 | a narrow-body Boeing 737 jet, mid-length fuselage | a Boeing 737 with a MID-length fuselage (longer than the short 737-500) | maker: Boeing; family: 737; fuselage: medium; engines: 2 underwing |
| 737-500 | a narrow-body Boeing 737 jet, short fuselage | a Boeing 737 with the SHORTEST fuselage of the family (shorter than the 737-300) | maker: Boeing; family: 737; fuselage: short; engines: 2 underwing |
| 737-700 | a narrow-body Boeing 737NG jet | a Boeing 737NG, SHORTER than the 737-800 | maker: Boeing; family: 737NG; fuselage: short-medium; engines: 2 underwing |
| 737-800 | a narrow-body Boeing 737NG jet, long fuselage | a Boeing 737NG, the LONGEST fuselage (longer than the 737-700) | maker: Boeing; family: 737NG; fuselage: long; engines: 2 underwing |
| 747-200 | a four-engine Boeing 747 jumbo jet with a short upper deck | a Boeing 747 with a SHORT upper deck and NO winglets (unlike the 747-400) | maker: Boeing; family: 747; deck: short hump; winglets: no; engines: 4 |
| 747-400 | a four-engine Boeing 747 jumbo jet with winglets | a Boeing 747 with WINGLETS and an extended upper deck (unlike the 747-200) | maker: Boeing; family: 747; deck: extended hump; winglets: yes; engines: 4 |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| miniature schnauzer | a small wiry-coated schnauzer with a bearded muzzle and eyebrows | the SMALLEST schnauzer (vs the medium standard and large giant) | type: schnauzer; size: small; coat: wiry; face: bearded |
| standard schnauzer | a medium wiry schnauzer with a bearded muzzle | the MEDIUM schnauzer (bigger than miniature, smaller than giant) | type: schnauzer; size: medium; coat: wiry; face: bearded |
| giant schnauzer | a large black wiry schnauzer with a bearded muzzle | the LARGEST, black schnauzer (vs the small miniature/standard) | type: schnauzer; size: large; color: black; coat: wiry |
| golden retriever | a medium dog with a dense wavy golden coat | a retriever with a WAVY GOLDEN coat (vs the short-coated labrador) | type: retriever; coat: wavy; color: golden |
| labrador retriever | a short-coated retriever, solid color, otter tail | a SHORT-coated solid-color retriever (vs the wavy golden retriever) | type: retriever; coat: short; tail: otter |
| flat-coated retriever | a black retriever with a long flat glossy coat | a BLACK LONG-FLAT-coated retriever (vs the golden’s wavy gold coat) | type: retriever; coat: long flat; color: black |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| european fire salamander | a glossy black salamander with bold irregular yellow blotches | black salamander whose yellow markings are IRREGULAR blotches (unlike the spotted salamander’s neat round spots) | salamander; ground colour: black; markings: irregular yellow blotches; skin: smooth and glossy |
| spotted salamander | a dark grey salamander with two neat rows of round yellow spots | grey salamander with two rows of ROUND yellow spots (unlike the european fire salamander’s irregular blotches) | salamander; ground colour: dark grey or slate; markings: two rows of round yellow spots; skin: smooth |
| black and gold garden spider | a large orb-weaver with a boldly black-and-yellow patterned abdomen | orb-weaver with a BOLD BLACK-AND-YELLOW abdomen (unlike the garden spider’s brown cross mark) | orb-weaver spider; abdomen: bold black and yellow bands; size: large; web: circular with a zigzag centre |
| garden spider | a brown orb-weaver with a pale cross-shaped mark on its abdomen | BROWN orb-weaver with a pale CROSS on the abdomen (unlike the black and gold garden spider’s yellow bands) | orb-weaver spider; abdomen: mottled brown with a pale cross; size: medium; web: circular |
| red-backed sandpiper | a small shorebird with a short slightly drooping bill and a rufous back | small sandpiper with a SHORT drooping bill (unlike the dowitcher’s very long straight bill) | sandpiper; size: small; bill: short, drooping at the tip; back: rufous; belly: black patch in breeding plumage |
| dowitcher | a medium shorebird with a very long straight bill probing mud | shorebird with a VERY LONG straight bill (unlike the red-backed sandpiper’s short drooping bill) | shorebird; size: medium; bill: very long and straight; feeding: vertical sewing-machine probing |
| Class | appearance | contrastive | attribute |
|---|---|---|---|
| Ophrys apifera | an orchid whose furry brown lip looks like a bee, with a tucked-under yellow tip | bee orchid whose lip appendage is TUCKED UNDER and hidden (unlike Ophrys fuciflora’s forward-pointing one) | genus: Ophrys; lip: brown velvety, bee-like; appendage: reflexed and hidden; sepals: pink to white |
| Ophrys fuciflora | an orchid with a broad square furry lip and a forward-pointing green appendage | bee orchid with a BROAD SQUARE lip and a FORWARD-pointing green appendage (unlike Ophrys apifera’s hidden tip) | genus: Ophrys; lip: broad and squarish; appendage: forward-pointing, visible; sepals: pink, broad |
| Lamium hybridum | a small dead-nettle with pink-purple hooded flowers and deeply cut toothed leaves | dead-nettle with DEEPLY CUT sharply toothed leaves (unlike Lamium purpureum’s shallowly toothed heart-shaped leaves) | genus: Lamium; flower: pink-purple hooded; leaf: deeply and sharply toothed; habit: low |
| Lamium purpureum | a small low plant with pinkish-purple hooded flowers and heart-shaped purple-tinged leaves crowded near the top | dead-nettle with HEART-SHAPED shallowly toothed purple-tinged leaves (unlike Lamium hybridum’s deeply cut leaves) | genus: Lamium; flower: pink-purple hooded; leaf: heart-shaped purple-tinged; habit: low |
| Trifolium pratense | a clover with dense rounded pink-purple flower heads and pale V-marked leaflets | clover whose leaflets carry a PALE V MARK and whose head is pink-purple (unlike Trifolium medium’s unmarked leaflets) | genus: Trifolium; head: dense globe, pink-purple; leaflet: oval with a pale V; habit: upright |
| Trifolium medium | a clover with deep red-purple heads and narrow leaflets lacking a pale mark | clover with NARROW UNMARKED leaflets and a deep red-purple head (unlike Trifolium pratense’s V-marked leaflets) | genus: Trifolium; head: deep red-purple; leaflet: narrow, unmarked; habit: sprawling, zigzag stem |
VLM Inference
Vision-language model inference studies how multimodal models turn images and video into answers efficiently, accurately, and reliably.
See all 82 papers