U-shaped Multi-granularity Learning for Vision-Language Models

Biao Chen, Yunqian Yu, Xiangxu Zhao, Zhongshu Chen, Mengmeng Jing, Lin ZuoarXiv 2026

TL;DR

UPrompt is a novel U-Net-inspired framework that solves the "granularity dilemma" in vision-language prompt learning by building parallel hierarchies for images and text. By enabling bidirectional information flow—injecting global context into fine details and using fine-grained alignment to supervise coarse levels—it achieves state-of-the-art performance across 17 benchmarks while offering a 2.1× speedup through adaptive inference.

What Problem Does This Paper Address?

Adapting large Vision-Language Models (VLMs) like CLIP often involves "prompt learning," where a small set of learnable tokens is optimized for specific tasks. However, existing methods suffer from a granularity dilemma:

  1. Global Prompting: Captures broad context but misses fine-grained visual details (e.g., failing on specialized aircraft classification).
  2. Fine-grained Prompting: Preserves local features but loses the "big picture" and cross-region relationships.

As illustrated in Figure 1, this creates a seesaw effect where improving one usually degrades the other. Furthermore, while hierarchical architectures like U-Net are standard for dense visual tasks (like segmentation), transferring these principles to prompt learning is difficult because textual prompts lack the inherent spatial structure found in pixel grids.

Figure 1: The granularity trade-off in prompt learning. (a) Global prompting captures broad context but lacks fine-grained details, while (b) fine-grained prompting preserves local features but loses global information. (c) UPrompt learning addresses the trade-off through multi-granularity hierarchical modeling, achieving both global understanding and local precision.

Methods

The authors propose UPrompt, which constructs a symmetric U-shaped architecture for both visual and textual modalities.

1. Multi-Granularity Hierarchies

  • Vision: The model creates nested patch hierarchies through progressive spatial pooling in the embedding space (e.g., downsampling from 14×14 tokens to 7×7, 4×4, and finally 1×1).
  • Text: Since text isn't spatial, UPrompt uses an LLM (Llama 3-8B) to generate a semantic hierarchy. It starts with an abstract summary (Level 1) and progressively enriches it with attributes and detailed descriptions (Level 4).

2. Bidirectional Connection

The core innovation lies in how these levels interact, mimicking U-Net's skip connections:

  • Coarse-to-Fine Cascaded Enhancement (CE): During the forward pass, global context from coarser levels is injected into finer embeddings via cross-attention. This ensures that local feature modeling is guided by the overall scene context.
  • Fine-to-Coarse Hierarchical Supervision (HS): During training, the model uses the high-capacity, finest-grained alignment as a "teacher." It distills this knowledge down to the coarser levels to prevent "semantic drift"—where simplified prompts lose their intended meaning.
Figure 2: Method overview of UPrompt. UPrompt learning constructs hierarchical vision-language alignment via multi- granularity pathways with learnable prompts. Bidirectional connection operates through coarse-to-fine cascaded enhancement that injects global context into fine-grained embeddings via cross-attention, and fine-to-coarse hierarchical supervision that guides coarser levels using finest-grained representations.

3. Adaptive Inference

UPrompt can dynamically decide how much computation is needed for a specific input. It starts at the coarsest level and only proceeds to finer (and more expensive) levels if the prediction confidence is low.

Datasets

The framework was evaluated on a massive suite of 17 benchmarks:

  • Cross-modal Retrieval: Flickr30K and MSCOCO.
  • Few-shot Classification: 11 datasets including ImageNet, Caltech101, OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft, SUN397, UCF101, DTD, and EuroSAT.
  • Out-of-Distribution (OOD): ImageNet-V2, -S (Sketch), -A (Adversarial), and -R (Rendition).

Key Insights and Ideas

  • Bridging the Paradigm Gap: The paper proves that U-Net's multi-scale fusion principles can be effectively applied to abstract embedding spaces, not just structured pixel grids.
  • Contextualized Locality: The authors demonstrate that fine-grained features are only truly effective when they "know" their role within the global scene, a gap filled by their Cascaded Enhancement module.
  • Efficiency via Hierarchy: The hierarchical design isn't just for accuracy; it provides a natural mechanism for early-exit inference. Easy samples (like a clear photo of a dog) can be classified at the coarse level, saving significant FLOPs.

Key Results

  • State-of-the-Art Performance: UPrompt achieved an 82.12% harmonic mean in base-to-novel generalization across 11 datasets, outperforming recent methods like TAP and SurPL-G.
  • Retrieval Excellence: On MSCOCO, it outperformed MAMET and VPKE by 4.1 and 7.3 rSum, respectively.
  • Efficiency Gains: The adaptive version of UPrompt matches the accuracy of a full fine-grained model while reducing computational cost by 52%, resulting in a 2.1× speedup.
  • Cost-Effectiveness: The "medium-grained" configuration matches the accuracy of the PSRC model while using only 1/3 of the computational cost.
Figure 4: Accuracy-Efficiency Trade-off on ImageNet. Static models (grey circles) operate at fixed granularities. Adaptive UPrompt (red star) matches fine-grained accuracy while re- ducing computational cost to 48%, achieving 2.1× speedup.

Limitations and Future Work

The authors note that while effective, UPrompt's hierarchical depth is currently limited (typically 3-4 levels). This may constrain its ability to model extremely complex, multi-layered semantic structures. Future research will focus on exploring deeper multi-granularity architectures and more sophisticated ways to generate textual hierarchies beyond basic LLM prompting.

Summary updated

BibTeX
@misc{chen2026u,
  author = {Biao Chen and Yunqian Yu and Xiangxu Zhao and Zhongshu Chen and Mengmeng Jing and Lin Zuo},
  title = {{U-shaped Multi-granularity Learning for Vision-Language Models}},
  year = {2026},
  eprint = {2607.14966},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.14966},
}
Figure