File size: 9,847 Bytes
22d411b
 
48cf07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22d411b
48cf07d
 
 
 
 
 
 
ad7a2f5
 
d052d2b
 
 
 
48cf07d
d052d2b
 
 
 
 
 
 
 
 
 
48cf07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97182da
 
48cf07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
---
license: mit
library_name: open_clip
pipeline_tag: feature-extraction
base_model_relation: finetune
language:
- en
tags:
- clip
- open-clip
- vision-language
- image-text-retrieval
- cross-modal-retrieval
- long-context
- hyperbolic-learning
- hyperbolic-geometry
- lorentz-model
- eccv-2026
---

<h1 align="center">HyFL-CLIP: Hyperbolic Fine-Tuning of CLIP for Robust Long-Context Understanding</h1>

<div align="center">

**ECCV 2026**

</div>

• [Project Page](https://janeyeon.github.io/hyflclip/)  
• [Paper](https://arxiv.org/abs/2607.00428)  
• [Code](https://github.com/janeyeon/hyfl-clip)


## Overview

HyFL-CLIP improves the **robustness of long-context vision-language understanding** by transferring OpenCLIP’s pretrained Euclidean alignment into a **hyperbolic representation space**.
The model reports improvements of up to **19.5%** in long-text cross-modal retrieval under perturbations including:

- caption reordering;
- caption summarization;
- caption condensation; and
- partial text deletion.

## Model Description

**HyFL-CLIP** is a hyperbolic fine-tuning framework that improves the robustness of CLIP to long and compositional text descriptions.

Standard CLIP models are primarily trained using short captions and rely on Euclidean contrastive learning. Their image–text alignment can therefore degrade when long descriptions are reordered, summarized, condensed, or partially deleted.

HyFL-CLIP addresses this limitation by projecting OpenCLIP representations into **hyperbolic space**, specifically the Lorentz model. Hyperbolic geometry allows the model to represent hierarchical semantic relationships among token-level information, partial descriptions, short captions, long-form descriptions, and images.

This checkpoint is fine-tuned from an **OpenCLIP** pretrained model.

## Method

HyFL-CLIP incorporates three main components.

### Cross-Manifold Similarity Distillation

Similarity knowledge from a pretrained Euclidean OpenCLIP model is distilled into a hyperbolic student model. This preserves the alignment knowledge of the pretrained model while changing the underlying representation geometry.

### Hierarchical Semantic Modeling

Summarized tokens, short captions, long-form descriptions, and images are embedded in a shared hyperbolic space. This enables the model to represent part–whole and summary–detail relationships.

### Einstein Midpoint Aggregation

Token- and phrase-level representations are aggregated using the Lorentzian centroid, also known as the Einstein midpoint. This provides a geometry-consistent method for combining partial representations into whole-level representations.


## Results

The evaluation covers:

- long-context cross-modal retrieval;
- retrieval under caption perturbations;
- intra-modality retrieval;
- short-text cross-modal retrieval; and
- integration with downstream generators such as Stable Diffusion XL.

Please refer to the [paper](https://arxiv.org/abs/2607.00428) for the complete quantitative results and ablation studies.

## Evaluation Datasets

HyFL-CLIP is evaluated on the following datasets:

| Dataset    | Evaluation setting                        |
| ---------- | ----------------------------------------- |
| Urban1K    | Long-context image–text retrieval         |
| DOCCI      | Dense and compositional caption retrieval |
| Long-DCI   | Long-description image–text retrieval     |
| ShareGPT4V | Detailed vision-language descriptions     |
| COCO       | Short-text image–text retrieval           |
| Flickr30K  | Short-text image–text retrieval           |

The datasets are not distributed as part of this model repository. Users must obtain them from their respective sources and comply with their individual licenses and terms of use.

## Installation

Clone the official HyFL-CLIP repository and prepare the required environment.

```bash
git clone https://github.com/janeyeon/hyfl-clip.git
cd hyfl-clip
```

Install the required dependencies:

```bash
pip install torch torchvision
pip install open_clip_torch
pip install huggingface_hub
```

Please refer to the official code repository for the complete environment configuration.

## Download

Two HyFL-CLIP checkpoints are available:

- `HyFL-CLIP_ViTB.pt`: HyFL-CLIP with a ViT-B backbone
- `HyFL-CLIP_ViTL.pt`: HyFL-CLIP with a ViT-L backbone

The checkpoints can be downloaded using `huggingface_hub`:

```python
from huggingface_hub import hf_hub_download

vit_b_checkpoint = hf_hub_download(
    repo_id="jeeit17/HyFL-CLIP",
    filename="HyFL-CLIP_ViTB.pt",
)

vit_l_checkpoint = hf_hub_download(
    repo_id="jeeit17/HyFL-CLIP",
    filename="HyFL-CLIP_ViTL.pt",
)

print("ViT-B checkpoint:", vit_b_checkpoint)
print("ViT-L checkpoint:", vit_l_checkpoint)
```

## Usage

HyFL-CLIP checkpoints should be loaded using the model architecture and Lorentz-geometry implementation provided in the official HyFL-CLIP codebase.

A general checkpoint-loading pattern is shown below:

```python
import torch

checkpoint = torch.load(
    "hyfl_clip.pt",
    map_location="cpu",
)

model = build_hyfl_clip_model()

if "state_dict" in checkpoint:
    model.load_state_dict(checkpoint["state_dict"])
else:
    model.load_state_dict(checkpoint)

model.eval()
```

The model must be initialized using the same configuration used during training, including:

- OpenCLIP backbone architecture;
- pretrained OpenCLIP checkpoint;
- text context length;
- embedding dimension;
- hyperbolic curvature;
- checkpoint state-dictionary format; and
- image and text preprocessing configuration.

Please refer to the official HyFL-CLIP repository for the exact model initialization and inference code.

## Evaluation

Cross-modal retrieval evaluation is implemented in `eval/retrieval/`.

Run the provided evaluation script:

```bash
bash eval.sh
```

The underlying command follows this format:

```bash
python eval/retrieval/unified_eval.py \
    --ckpt_path /path/to/hyfl_clip.pt \
    --datasets urban1k docci dci sharegpt4v
```

Supported long-context evaluation datasets include:

```
urban1k
docci
dci
sharegpt4v
```

Before running the evaluation, update the dataset `image_root` and `json_path` fields in `eval/retrieval/unified_eval.py`.

Dataset preparation instructions are available from:

1. [Urban1K](https://github.com/beichenzbc/Long-CLIP)
2. [TULIP](https://github.com/ivonajdenkoska/tulip) for Long-DCI
3. [DOCCI](https://google.github.io/docci/)

## Training

Training is performed using `train/train.py` with distributed PyTorch execution.

Run the provided launcher:

```bash
bash train.sh
```

The launcher internally uses `torchrun`. Update `CUDA_VISIBLE_DEVICES` and `--nproc_per_node` according to the target machine.

Checkpoints are saved in the following format:

```
output/ckpts/<experiment_name>/ep=<epoch>_hyfl.pt
```

## Intended Uses

HyFL-CLIP is intended for research involving:

- long-context image–text retrieval;
- robust cross-modal retrieval;
- compositional vision-language understanding;
- hierarchical multimodal representation learning;
- hyperbolic representation learning;
- retrieval under textual perturbations;
- long-caption image search; and
- multimodal representation analysis.

## Out-of-Scope Uses

HyFL-CLIP is not designed or validated for:

- safety-critical decision-making;
- medical diagnosis;
- legal or financial decision-making;
- biometric identification;
- surveillance;
- autonomous content moderation; or
- applications requiring guaranteed robustness or fairness.

Retrieval performance should not be interpreted as general-purpose long-context reasoning ability.

## Authors

- [Ji Ha Jang](https://jeeit17.github.io)<sup>1*</sup>
- [Hayeon Kim](https://janeyeon.github.io)<sup>1*</sup>
- [Chulwon Lee](https://github.com/signalee95)<sup>2</sup>
- [Junghun James Kim](https://github.com/jongheean11)<sup>2</sup>
- [Se Young Chun](https://icl.snu.ac.kr/pi)<sup>1,2,3</sup>

<sup>1</sup> Department of Electrical and Computer Engineering, Seoul National University
<sup>2</sup> Interdisciplinary Program in Artificial Intelligence, Seoul National University
<sup>3</sup> INMC and AIIS, Seoul National University

\* Equal contribution

## Acknowledgements

HyFL-CLIP builds on:

- [OpenCLIP](https://github.com/mlfoundations/open_clip);
- [LongCLIP](https://github.com/beichenzbc/Long-CLIP);
- [HiMo-CLIP](https://github.com/UnicomAI/HiMo-CLIP) and
- prior work on hyperbolic representation learning using the Lorentz model.

We thank the authors and maintainers of these projects for making their research, models, and implementations publicly available.

## License

HyFL-CLIP is released under the **MIT License**. See the [LICENSE](./LICENSE) file for the full license text.

This model is a fine-tuned version of an OpenCLIP pretrained model. Users are responsible for complying with the license terms applicable to:

- the specific pretrained OpenCLIP checkpoint;
- incorporated third-party source code;
- training and evaluation datasets; and
- other third-party components used with the model.

The relevant upstream copyright and license notices must be preserved in accordance with their respective license terms.

The MIT License applied to HyFL-CLIP does not replace or override separate licenses, attribution requirements, or usage restrictions applicable to third-party checkpoints, code, or datasets.

## Citation

Please cite the following paper when using HyFL-CLIP:

```bibtex
@misc{jang2026hyflclip,
  title         = {HyFL-CLIP: Hyperbolic Fine-Tuning of CLIP for Robust Long-Context Understanding},
  author        = {Ji Ha Jang and Hayeon Kim and Chulwon Lee and Junghun James Kim and Se Young Chun},
  year          = {2026},
  eprint        = {2607.00428},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2607.00428}
}
```