HyFL-CLIP: Hyperbolic Fine-Tuning of CLIP for Robust Long-Context Understanding

Ji Ha Jang, Hayeon Kim, Chulwon Lee, Junghun James Kim, Se Young ChunarXiv 2026 · arXiv

TL;DR

HyFL-CLIP introduces a hyperbolic fine-tuning framework that adapts CLIP for robust long-context text-image alignment. By shifting from flat Euclidean space to negatively curved hyperbolic space, the model naturally captures hierarchical "part-whole" relationships between global captions and individual words or sentences. This geometric shift yields up to a 19.5% improvement in retrieval accuracy under text perturbations like word dropping and sentence shuffling.

What Problem Does This Paper Address?

Contrastive Language-Image Pre-training (CLIP) has revolutionized vision-language tasks, but it inherently struggles with long-context descriptions (>77 tokens). In real-world scenarios, long descriptions are rarely rigid; sentences get reordered, summarized, or partially omitted.

While prior works extended CLIP's context window by modifying positional encodings, they remain highly sensitive to these text perturbations. The authors identify the root cause as the standard Euclidean contrastive objective. Euclidean space forces a strict, one-to-one point matching that treats long captions as monolithic entities. It lacks a mechanism to model the hierarchical structure inherent in long text—specifically, how individual sentences or words (parts) relate to the overall description (the whole). Consequently, the global embedding often collapses onto a few salient tokens, making the model brittle if those tokens are altered or moved.

Fig. 1: Robust long-context retrieval under caption perturbation. In long contexts, sentence order or structure may change preserving overall semantics, making robust text-image alignment essential. However, prior works on long-context under- standing CLIP often exhibit degraded alignment under such perturbations. For ex- ample, even when only the sentence order is shuffled (Order shuffling), they fail to retrieve the correct image, missing key semantic elements such as the red pedestrian traffic signal, the black car, and the pedestrian wearing a white and red outfit.

Methods

To overcome the limitations of Euclidean space, the authors propose HyFL-CLIP (Hyperbolic Fine-tuning for Long-context CLIP), which maps representations into the Lorentz (Minkowski) model of hyperbolic geometry. The framework relies on three core components:

  1. Cross-Manifold Similarity Distillation: To preserve the powerful short-text alignment already learned by standard CLIP, the model distills the similarity distributions from a Euclidean teacher into the hyperbolic student space using a Kullback-Leibler (KL) divergence loss.
  2. Hyperbolic Geodesic Contrastive Loss: Long text-image pairs are optimized directly on the Lorentz manifold using negative geodesic distance instead of standard cosine similarity.
  3. Hierarchical Entailment via Einstein Midpoint Aggregation: To model part-whole relationships, token-wise features are aggregated into a "parent" representation using a similarity-weighted Einstein midpoint (the hyperbolic counterpart to a center of mass). The model then enforces an entailment constraint: the global caption embedding must lie within an entailment cone projected from this aggregated midpoint.

Datasets

The model was trained and evaluated on several diverse datasets:

  • Training: ShareGPT4V, containing 1.2 million image-caption pairs featuring highly descriptive, multi-sentence annotations (averaging 143.6 words).
  • Long-Context Evaluation: DOCCI, DCI, Long-DCI, and Urban-1k, with dense captions ranging from 131.4 to 174.2 tokens.
  • Short-Context & Intra-Modality Evaluation: COCO and Flickr30K (for short captions), alongside text-only retrieval datasets like nocaps, 20 Newsgroups, and IMDB Reviews.

Key Insights and Ideas

  • The Geometry of Tolerance: The most compelling insight is that the hyperbolic entailment cone provides a geometric margin of tolerance. When a text prompt undergoes word dropout or sentence shuffling, the aggregated token midpoint shifts. However, because the global embedding only needs to remain within the cone's nonzero aperture rather than matching a exact point, the text-image alignment remains intact.
  • Cross-Manifold Bridge: Rather than training a hyperbolic vision-language model from scratch on massive data, the authors successfully demonstrate how to bootstrap a mature Euclidean model (Open-CLIP) and warp its embedding space into a hyperbolic manifold without losing its foundational alignment.

Key Results

  • Robustness to Perturbations: Under severe text modifications (such as dropping 50% of the words or shuffling sentence order), HyFL-CLIP consistently outperformed existing long-context models, showing up to a 19.5% relative improvement over the best prior Euclidean methods.
  • Zero-Shot Retrieval: HyFL-CLIP achieved state-of-the-art performance across all major long-caption benchmarks (DOCCI, DCI, Urban-1k) using both ViT-B/16 and ViT-L/14 backbones.
  • Generative Integration: The framework was successfully integrated into Stable Diffusion XL (SDXL). By mapping hyperbolic prompt embeddings back to the Euclidean tangent space via logarithmic mapping, the generative model followed long, detailed prompts much more faithfully, capturing fine-grained details that baseline models ignored.

Limitations and Future Work

While the paper demonstrates clear advantages, some limitations and areas for future work include:

  • Generative Pipeline Overhead: Integrating hyperbolic text encoders into downstream generative models like SDXL requires mapping the embeddings back to Euclidean space via tangent space transformations, which adds an extra mathematical step during inference.
  • Curvature Tuning: The model parameterizes curvature ($\kappa$) as a learnable variable. Although sensitivity analyses show stability, exploring how dynamic or multi-valued curvatures affect even longer documents remains an open question.

Summary updated

Abstract

CLIP (Contrastive Language-Image Pre-training) has become a de facto paradigm for image-text alignment, but it struggles with long-context descriptions (>77 tokens) due to absolute positional encoding and pretraining on short captions. In long contexts, sentences are often reordered, summarized, or partially omitted. Although prior works extend CLIP with longer positional encodings, they often suffer from degraded image-text alignment under such text perturbations. We attribute this limitation to the Euclidean contrastive objective, which enforces strict one-to-one matching and lacks explicit mechanisms for modeling hierarchical relationships between global context and its constituent elements. To address this issue, we propose HyFL-CLIP, a hyperbolic fine-tuning framework that distills the well-established text-image alignment learned in Euclidean CLIP into hyperbolic space via cross-manifold similarity distillation, leveraging its geometry to capture hierarchical and entailment relations. Our method models hierarchical semantics by linking summarized token-wise features, long-context descriptions, constituent short textual components, and images, capturing part-whole relationships via hyperbolic entailment with Einstein midpoint aggregation. Experiments on diverse benchmarks, including long-context cross-modal retrieval, cross-modal retrieval with caption perturbations, intra-modality retrieval, and short-text cross-modal retrieval, show that HyFL-CLIP achieves more robust long-context understanding. In particular, it yields up to 19.5% improvement in long-text cross-modal retrieval under textual perturbations over the best prior method. We also show HyFL-CLIP can be seamlessly integrated into other model frameworks by applying it to Stable Diffusion XL (SDXL).
BibTeX
@misc{jang2026hyfl,
  author = {Ji Ha Jang and Hayeon Kim and Chulwon Lee and Junghun James Kim and Se Young Chun},
  title = {{HyFL-CLIP: Hyperbolic Fine-Tuning of CLIP for Robust Long-Context Understanding}},
  year = {2026},
  eprint = {2607.00428},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.00428},
}
Figure