매일 아침, 어제의 AI를 한 통으로 정리해 보내드립니다메일로 받아보기

METAL LAB

Which Negatives Matter? Ask Your Text Encoder: Adaptive Similarity Margins for Dense-Caption Retrieval

arXiv:2608.185212026-08-20

이미지-긴문장 검색 AI가 '이미 다 맞혔다'고 착각해서 정작 헷갈리는 문제를 못 배우던 버릇을 고쳤다

이미지와 긴 설명 문장을 짝짓는 AI(CLIP 계열)를 학습시킬 때 쓰는 기존 방식은, 학습 초반부터 손실값이 거의 0으로 떨어져 정작 헷갈리는 어려운 오답들을 더 배우지 못하는 문제가 있었다. 연구팀은 문장들끼리 얼마나 비슷한지를 미리 계산해 헷갈리는 오답에는 더 큰 페널티(마진)를 자동으로 부여하는 HN-CLIP을 제안했다. 별도 데이터나 모델 구조 추가 없이 네 개의 벤치마크에서 기존 최강 방법보다 순위1위 정확도를 2.4~4.3포인트 높였고, 학습 속도도 2.4~5.4배 빨랐다.

무엇을 했나

  1. 세그멘테이션, 외곽선 지도, LLM 필터링 문장 등 복잡한 장치를 추가해온 기존 연구들과 달리, 이 논문은 학습에 쓰이는 손실 함수(모델을 얼마나 틀렸는지 계산해 학습 신호를 주는 공식) 자체의 결함을 짚었다.
  2. 긴 설명 문장이 많은 데이터셋에서는 서로 거의 똑같은 내용의 문장(니어 듀플리케이트)이 많아, 학습 1에포크(전체 데이터를 한 바퀴 도는 것) 안에 배치의 80%에서 손실이 거의 0이 되고, 47%의 측정에서는 그래디언트(모델을 어느 방향으로 고칠지 알려주는 값)가 정확히 0이 되어버렸다.
  3. 해결책으로 문장 임베딩을 이용해 문장끼리 얼마나 비슷한지 계산한 행렬(텍스트-텍스트 유사도 행렬)을 만들고, 이를 학습에 영향은 주지 않는 상태로 떼어내(디태치) 정답과 오답 점수 차이(로짓)에 더해 비슷한 문장일수록 더 큰 마진(구별을 위해 넘어야 할 점수 차)을 요구하도록 만들었다.
  4. 이 방법은 부가 데이터, 추가 모델 구조, 추론 시점 추가 연산 없이 단 하나의 행렬 곱셈과 덧셈만 추가되며, DOCCI·DCI·Long-DCI·Urban-1K 네 벤치마크의 8개 검색 방향 모두에서 최고 R@1(1위 정답률)을 기록했고, 전체 학습 데이터의 20%만으로도 기존 최강 기법을 100% 데이터로 학습한 것보다 앞섰다.
  5. 기존 6개의 파인튜닝 프레임워크(Long-CLIP, FineLIP, GOAL, StructXLIP, LoRA, DoRA)에 이 손실 함수만 갈아 끼워도 모두 인도메인 성능이 향상되어, 특정 구조에 종속되지 않는 범용적인 개선임을 보였다.
Table 1: Cross-modal retrieval performance of CLIP-based fine-tuning methods on four dense-caption benchmarks. We report Recall@K (%) on both Text→Image and Image→Text settings. All fine-tuned methods start from the same Long-CLIP-L backbone with an identical training budget; Long-CLIP denotes the released checkpoint. Best results in bold; second best underlined. Δ denotes the margin over the best competitor per column, with gain in ↑ green.
DOCCIDCI
MethodR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Long-CLIP[ECCV’24]78.7895.2498.0266.7591.9296.3167.8383.1987.6964.1384.8489.74
FineLIP[CVPR’25]77.5196.0298.4169.9093.4397.4572.6987.1490.6565.4886.8491.00
GOAL[CVPR’25]81.5397.0298.8080.8696.2498.6377.2990.2593.3074.8489.9493.25
StructXLIP[CVPR’26]84.7397.6999.0082.6197.0898.7175.8489.9493.6574.4990.0593.40
HN-CLIP88.2598.4599.4386.2498.1299.2280.6992.4095.1078.8491.9094.65
Δ↑ 3.52↑ 0.76↑ 0.43↑ 3.63↑ 1.04↑ 0.51↑ 3.40↑ 2.15↑ 1.45↑ 4.00↑ 1.85↑ 1.25
Table 2: Plug-and-play enhancement of our ℒHN on CLIP-based fine-tuning. Results on DOCCI and Long-DCI for Text→Image and Image→Text retrieval. Upper: full-parameter fine-tuning; lower: parameter-efficient tuning. Our method consistently boosts diverse CLIP variants, and the gains grow with caption length. Best in bold, with gain in ↑ green.
DOCCILong-DCI
MethodR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Long-CLIP[ECCV’24]86.4598.0099.3184.1097.8499.0470.2489.6294.0068.4489.3594.67
+ our ℒHN88.3198.7599.4586.3998.0899.2078.4392.5295.2776.0291.7894.76
Δ↑ 1.86↑ 0.75↑ 0.14↑ 2.29↑ 0.24↑ 0.16↑ 8.19↑ 2.90↑ 1.27↑ 7.58↑ 2.43↑ 0.09
FineLIP[CVPR’25]77.5196.0298.4169.9093.4397.4559.2477.8683.1949.5275.0882.39
+ our ℒHN85.4797.7199.0483.8897.4198.8274.9290.5293.6273.3989.8793.23
Δ↑ 7.96↑ 1.69↑ 0.63↑ 13.98↑ 3.98↑ 1.37↑ 15.68↑ 12.66↑ 10.43↑ 23.87↑ 14.79↑ 10.84
GOAL[CVPR’25]81.5397.0298.8080.8696.2498.6374.2992.7795.5873.3192.1495.77
+ our ℒHN86.2498.1499.3584.8697.6999.2084.2794.9996.5782.2894.2696.18
Δ↑ 4.71↑ 1.12↑ 0.55↑ 4.00↑ 1.45↑ 0.57↑ 9.98↑ 2.22↑ 0.99↑ 8.97↑ 2.12↑ 0.41
StructXLIP[CVPR’26]84.7397.6999.0082.6197.0898.7175.3493.1595.8472.3092.7995.78
+ our ℒHN85.4597.9299.1283.3197.4598.9282.0494.1896.2378.9893.2295.65
Δ↑ 0.72↑ 0.23↑ 0.12↑ 0.70↑ 0.37↑ 0.21↑ 6.70↑ 1.03↑ 0.39↑ 6.68↑ 0.43↓ 0.13
LoRA[ICLR’22]80.4996.1698.5577.9695.8098.0460.0880.6886.8658.9780.0286.53
+ our ℒHN82.8297.1498.8680.8496.4998.6364.8783.0988.3562.7981.7787.31
Δ↑ 2.33↑ 0.98↑ 0.31↑ 2.88↑ 0.69↑ 0.59↑ 4.79↑ 2.41↑ 1.49↑ 3.82↑ 1.75↑ 0.78
DoRA[ICML’24]80.7696.2598.6178.2095.9098.1060.7681.1987.4859.6580.3187.13
+ our ℒHN83.4197.3399.0081.4196.6598.6765.4683.5788.6163.3882.1587.56
Δ↑ 2.65↑ 1.08↑ 0.39↑ 3.21↑ 0.75↑ 0.57↑ 4.70↑ 2.38↑ 1.13↑ 3.73↑ 1.84↑ 0.43
Table 3: Ablations. (a) Sensitivity to the boost strength γ (Recall@1): every γ∈[0.25,1] beats γ=0 in-domain, while under transfer (Urban-1K) milder boosts generalize better. (b) Loss components under an identical recipe; only the loss changes. (c) G¯ recomputed from the live encoder (default) vs. frozen at initialization; R@1/5/10 in Table A2. Best per column in bold.
DOCCIDCILong-DCIUrban-1K
γR@1R@1R@1R@1R@1R@1R@1R@1Avg
γ=086.4584.2979.2477.5470.9268.0091.3093.0081.34
γ=0.2587.8286.6380.7479.2976.3874.8091.7093.0083.80
γ=0.5 (default)88.2586.2480.6978.8479.0376.4491.1090.3083.86
γ=0.7588.2085.7381.0478.5979.9676.7289.1089.5083.61
γ=1.087.9885.0280.3478.1979.9476.5987.9088.4083.04
Table A1: Benchmark statistics. Mean caption length is measured on the evaluation split in words; similarities use the pre-trained Long-CLIP-L text encoder.
Benchmark#train#testwordspairwise simhardest sim
DOCCI945051001230.840.93
DCI544519991330.850.92
Long-DCI5445 (=DCI)74441340.850.93
Urban-1K14579 (VG)10001070.880.94
Table A2: Recomputed vs. frozen G¯ (Recall@K, Text→Image and Image→Text). Building the boost from a frozen copy of the pre-trained text encoder makes the margins exactly stationary but removes their implicit annealing: accuracy peaks at epoch 1 on DCI and Urban-1K and then declines, and the default wins 22 of 24 columns. Best per column in bold. Upper band: DOCCI and DCI; lower band: Long-DCI and the transfer setting Urban-1K.
DOCCIDCI
G¯ sourceR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Recomputed G¯ (default)88.2598.4599.4386.2498.1299.2280.6992.4095.1078.8491.9094.65
Frozen G¯85.8697.6199.1882.4396.8298.7377.7990.8093.3575.8489.4992.95
Δ (default − frozen)↑ 2.39↑ 0.84↑ 0.25↑ 3.81↑ 1.30↑ 0.49↑ 2.90↑ 1.60↑ 1.75↑ 3.00↑ 2.41↑ 1.70
best epoch (default / frozen)6 / 55 / 1
Long-DCIUrban-1K
G¯ sourceR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Recomputed G¯ (default)79.0393.7696.3476.4492.7995.9191.1098.1099.4090.3098.2099.30
Frozen G¯79.9390.8493.8276.7589.5492.6287.3097.7098.9083.5095.9097.90
Δ (default − frozen)↓ 0.90↑ 2.92↑ 2.52↓ 0.31↑ 3.25↑ 3.29↑ 3.80↑ 0.40↑ 0.50↑ 6.80↑ 2.30↑ 1.40
best epoch (default / frozen)10 / 104 / 1
Table A3: Training-efficiency comparison on DCI fine-tuning (10 epochs, 5.4k images, single Ascend 910B, effective batch 128). Wall-clock for GOAL/StructXLIP is measured from same-device sequential runs minus evaluation overhead; FineLIP ran in parallel and is not attributable. Offline preprocessing time (segmentation, edge extraction, LLM filtering) is not included in the wall-clock.
MethodAux. training inputsOffline prep.Wall-clockThroughput
Long-CLIP (plain FT)nonenone≈16 min55.5 img/s
FineLIPnonenone
GOALSAM segmentsrequired≈41 min≈22 img/s
StructXLIPedges + LLM lexiconrequired≈92 min≈10 img/s
HN-CLIP (ours)nonenone17 min53 img/s
Table A4: Plug-and-play enhancement of ℒHN on CLIP-based fine-tuning, all four benchmarks. Results on DOCCI, DCI, Long-DCI, and Urban-1K for Text→Image and Image→Text retrieval; per framework we report the official baseline, the same recipe with ℒHN replacing its global InfoNCE term, and the per-column difference Δ (gain in ↑ green, drop in ↓ gray; differences within ±0.15 are shown as ≈0). Bold marks the +ℒHN value where it is the better of the pair. Upper band: DOCCI and DCI; lower band: Long-DCI and the transfer setting Urban-1K.
DOCCIDCI
MethodR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Long-CLIP86.4598.0099.3184.1097.8499.0479.3991.6094.6578.3492.8595.25
+our ℒHN88.3198.7599.4586.3998.0899.2081.0492.2095.0078.5491.9594.60
Δ↑ 1.86↑ 0.75≈0↑ 2.29↑ 0.24↑ 0.16↑ 1.65↑ 0.60↑ 0.35↑ 0.20↓ 0.90↓ 0.65
FineLIP†77.1295.9498.2970.1693.1497.2972.6987.1490.6565.4886.8491.00
+our ℒHN85.4797.7199.0483.8897.4198.8280.7491.9094.5579.9991.8094.35
Δ↑ 8.35↑ 1.77↑ 0.75↑ 13.72↑ 4.27↑ 1.53↑ 8.05↑ 4.76↑ 3.90↑ 14.51↑ 4.96↑ 3.35
GOAL†81.9696.9498.7880.8496.3398.6177.2990.2593.3074.8489.9493.25
+our ℒHN86.2498.1499.3584.8697.6999.2079.5990.8093.3077.0990.1093.00
Δ↑ 4.28↑ 1.20↑ 0.57↑ 4.02↑ 1.36↑ 0.59↑ 2.30↑ 0.55≈0↑ 2.25↑ 0.16↓ 0.25
StructXLIP84.7397.6999.0082.6197.0898.7175.8489.9493.6574.4990.0593.40
+our ℒHN85.4597.9299.1283.3197.4598.9277.3490.7593.1074.1489.8992.30
Δ↑ 0.72↑ 0.23≈0↑ 0.70↑ 0.37↑ 0.21↑ 1.50↑ 0.81↓ 0.55↓ 0.35↓ 0.16↓ 1.10
LoRA80.4996.1698.5577.9695.8098.0473.8489.4492.8571.8988.7492.85
+our ℒHN82.8297.1498.8680.8496.4998.6375.8490.2093.0073.4488.5492.25
Δ↑ 2.33↑ 0.98↑ 0.31↑ 2.88↑ 0.69↑ 0.59↑ 2.00↑ 0.76↑ 0.15↑ 1.55↓ 0.20↓ 0.60
DoRA80.7696.2598.6178.2095.9098.1074.1489.7493.0072.4489.2492.95
+our ℒHN83.4197.3399.0081.4196.6598.6776.2490.4593.1573.8988.5992.30
Δ↑ 2.65↑ 1.08↑ 0.39↑ 3.21↑ 0.75↑ 0.57↑ 2.10↑ 0.71↑ 0.15↑ 1.45↓ 0.65↓ 0.65
Long-DCIUrban-1K
MethodR@1R@5R@10R@1R@5R@10R@1R@5R@10R@1R@5R@10
Long-CLIP70.2489.6294.0068.4489.3594.6791.7099.1099.5093.2099.0099.50
+our ℒHN78.4392.5295.2776.0291.7894.7690.6098.3099.4090.2098.3099.40
Δ↑ 8.19↑ 2.90↑ 1.27↑ 7.58↑ 2.43≈0↓ 1.10↓ 0.80≈0↓ 3.00↓ 0.70≈0
FineLIP†59.2477.8683.1949.5275.0882.3981.1094.5097.4077.5094.8097.50
+our ℒHN74.9290.5293.6273.3989.8793.2391.8098.1099.3093.2098.8099.30
Δ↑ 15.68↑ 12.66↑ 10.43↑ 23.87↑ 14.79↑ 10.84↑ 10.70↑ 3.60↑ 1.90↑ 15.70↑ 4.00↑ 1.80
GOAL†74.3492.8995.7772.0392.3795.6986.3097.0098.9086.1097.4098.90
+our ℒHN84.2794.9996.5782.2894.2696.1885.7096.7098.2086.8096.6098.00
Δ↑ 9.93↑ 2.10↑ 0.80↑ 10.25↑ 1.89↑ 0.49↓ 0.60↓ 0.30↓ 0.70↑ 0.70↓ 0.80↓ 0.90
Table A5: Loss ablation, full resolution (all four benchmarks, all ranks). Best per column in bold.
DOCCIDCI
ℒtokℒHNR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10
86.4598.0099.3199.8699.9884.1097.8499.0499.7899.9879.3991.6094.6597.2597.9578.3492.8595.25
86.4597.9899.4399.8699.9884.2997.9098.9499.7899.9479.2491.5594.2597.0098.0077.5492.9595.35
88.3198.7599.4599.8499.9886.3998.0899.2099.8299.9681.0492.2095.0097.4098.1078.5491.9594.60
88.2598.4599.4399.8699.9886.2498.1299.2299.8499.9480.6992.4095.1097.3598.1578.8491.9094.65
Long-DCIUrban-1K
ℒtokℒHNR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10
70.2489.6294.0097.6698.7968.4489.3594.6798.1198.9591.7099.1099.5099.8099.9093.2099.0099.50
70.9289.5193.9097.2798.6468.0089.1294.1797.8498.9391.3099.0099.3099.8099.9093.0099.1099.50
78.4392.5295.2797.2198.4776.0291.7894.7697.3198.2990.6098.3099.4099.6099.8090.2098.3099.40
✓†78.7992.3295.1297.1998.2776.1891.9995.1597.2698.4091.0098.5099.5099.7099.9090.5098.5099.30
Table A6: γ sweep, full resolution (all four benchmarks, all ranks). Best per column in bold.
DOCCIDCI
γR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25
γ=086.4597.9899.4399.8699.9884.2997.9098.9499.7899.9479.2491.5594.2597.0098.0077.5492.9595.3597.55
γ=0.2587.8298.6399.4599.8899.9886.6398.0499.1699.8499.9680.7492.4095.3597.5598.3079.2992.8595.4097.70
γ=0.5 (default)88.2598.4599.4399.8699.9886.2498.1299.2299.8499.9480.6992.4095.1097.3598.1578.8491.9094.6597.40
γ=0.7588.2098.6799.4999.8299.9685.7398.0099.2599.7899.9881.0492.2094.7097.2098.2578.5991.0593.9096.90
γ=1.087.9898.4799.5199.8299.9685.0297.6999.0299.7699.9680.3492.0094.4097.1098.3078.1990.8093.7096.70
Long-DCIUrban-1K
γR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25R@50R@1R@5R@10R@25
γ=070.9289.5193.9097.2798.6468.0089.1294.1797.8498.9391.3099.0099.3099.8099.9093.0099.1099.5099.60
γ=0.2576.3892.4995.3497.7398.6874.8091.9495.5197.9498.6891.7098.6099.5099.7099.9093.0098.9099.6099.70
γ=0.5 (default)†78.7992.3295.1297.1998.2776.1891.9995.1597.2698.4091.0098.5099.5099.7099.9090.5098.5099.3099.60
γ=0.7579.9692.4595.0697.0698.1976.7291.3594.4396.7697.9789.1098.5099.1099.6099.6089.5097.9099.0099.80
γ=1.079.9492.1794.7996.7697.8976.5990.7893.9196.4997.7087.9098.0099.1099.5099.6088.4097.5098.7099.80
Table A7: Cross-domain transfer DOCCI→Long-DCI. Best per column in bold.
DOCCI → Long-DCI
MethodR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50
Long-CLIP (zero-shot)54.6172.8078.3385.2989.1547.3573.0480.1086.6690.60
FineLIP†54.6573.0479.4685.8789.9046.7073.0180.5187.1090.64
GOAL†55.7174.9380.6686.9390.6656.6175.4681.1987.5591.28
StructXLIP57.7076.0381.6888.0691.6057.9076.3682.0987.7191.03
HN-CLIP62.6079.1684.1989.8893.0563.7779.8984.2289.0592.14
Table A8: Seed replication on Long-DCI. max⁡|Δ| is the largest absolute difference across the six metrics.
MethodSeedR@1R@5R@10R@1R@5R@10max⁡|Δ|
HN-CLIP (ours)seed 4279.0393.7696.3476.4492.7995.91
seed 4378.7992.3295.1276.1891.9995.151.44
GOALseed 4274.2992.7795.5873.3192.1495.77
seed 4374.3492.8995.7772.0392.3795.691.28
StructXLIPseed 4275.3493.1595.8472.3092.7995.78
seed 4375.5893.1296.2072.3993.0395.800.36
Table A9: Sample efficiency, full resolution. Best per pair in bold; Δ is the average-R@1 margin of HN-CLIP over GOAL at that fraction.
DataMethodR@1R@5R@10R@25R@50R@1R@5R@10R@25R@50Δ
DOCCI
5%GOAL77.8895.3597.8899.5999.8475.4594.6597.7699.3599.84
HN-CLIP82.7396.9498.6999.6999.8480.0896.2298.3599.5799.98↑ 4.74
20%GOAL78.2295.6598.2299.5599.8676.4794.8897.9699.3999.84
HN-CLIP85.4397.8699.2099.8099.9683.7597.2598.8099.7699.98↑ 7.25
50%GOAL80.2096.4798.3399.6399.8878.1895.3797.9699.4399.92
HN-CLIP87.1698.3999.4399.8499.9485.3797.6999.1899.8099.94↑ 7.07
100%GOAL†81.9696.9498.7899.7899.9280.8496.3398.6199.6799.92
HN-CLIP88.2598.4599.4399.8699.9886.2498.1299.2299.8499.94↑ 5.85
DCI
5%GOAL70.9487.1990.9594.9596.9569.0386.8990.8094.7596.85
HN-CLIP73.5987.3992.3095.1096.9574.5989.1993.2096.0097.15↑ 4.11
20%GOAL73.6987.9991.4095.4097.1071.3987.2491.5595.4597.30
HN-CLIP78.0990.6093.7096.3097.6576.7990.4093.5596.5597.70↑ 4.90
50%GOAL75.7989.1993.0095.5596.8073.7988.5492.6595.9097.30
HN-CLIP79.2491.6094.5597.0597.9578.4491.3594.2596.7098.00↑ 4.05
100%GOAL77.2990.2593.3096.1097.4074.8489.9493.2596.5098.15
HN-CLIP80.6992.4095.1097.3598.1578.8491.9094.6597.4098.30↑ 3.70
Table A10: Cross-domain generalization between DCI and DOCCI. Train on one dataset and test on another. Values are Recall@K (%), using Text→Image and Image→Text retrieval. In-domain best in italic bold, cross-domain best in bold.
SettingR@1R@5R@10R@1R@5R@10
Train on DCI → Test on DCI vs. DOCCI
Long-CLIP (DCI→DCI)67.8383.1987.6964.1384.8489.74
Long-CLIP (DCI→DOCCI)78.7895.2498.0266.7591.9296.31
FineLIP (DCI→DCI)72.6987.1490.6565.4886.8491.00
FineLIP (DCI→DOCCI)80.6996.4798.5365.6391.5196.31
GOAL (DCI→DCI)77.2990.2593.3074.8489.9493.25
GOAL (DCI→DOCCI)80.1496.2598.3977.2495.2297.90
StructXLIP (DCI→DCI)75.8489.9493.6574.4990.0593.40
StructXLIP (DCI→DOCCI)76.9495.0697.7674.2494.1297.51
HN-CLIP (DCI→DCI)80.6992.4095.1078.8491.9094.65
HN-CLIP (DCI→DOCCI)85.0097.9099.2583.1496.9898.75
Train on DOCCI → Test on DOCCI vs. DCI
Long-CLIP (DOCCI→DOCCI)78.7895.2498.0266.7591.9296.31
Long-CLIP (DOCCI→DCI)67.8383.1987.6964.1384.8489.74
FineLIP (DOCCI→DOCCI)77.5196.0298.4169.9093.4397.45
FineLIP (DOCCI→DCI)68.2383.8488.7463.4885.7989.84
GOAL (DOCCI→DOCCI)81.5397.0298.8080.8696.2498.63
GOAL (DOCCI→DCI)69.5885.2489.3969.8885.3489.79
StructXLIP (DOCCI→DOCCI)84.7397.6999.0082.6197.0898.71
StructXLIP (DOCCI→DCI)69.9386.7491.0571.3986.9990.60
HN-CLIP (DOCCI→DOCCI)88.2598.4599.4386.2498.1299.22
HN-CLIP (DOCCI→DCI)74.8488.5492.4075.6488.0491.35

왜 중요한가

복잡한 전처리나 추가 모델 구조 없이 손실 함수만 바꿔도 이미지-텍스트 검색 성능을 크게 끌어올릴 수 있다는 점은, 실무에서 검색 시스템을 개선할 때 비용과 속도 면에서 큰 이점이 된다. 또한 '학습이 잘 되고 있는 것처럼 손실값이 낮아 보여도 실제로는 중요한 부분을 못 배우고 있을 수 있다'는 진단은 다른 대조학습 기반 AI 개발에도 참고할 만한 통찰이다.

이 논문의 용어

  • InfoNCE · 대조학습에서 정답 쌍은 가깝게, 오답 쌍은 멀게 만들도록 유도하는 손실 함수
  • 니어 듀플리케이트(near-duplicate) 캡션 · 내용이 거의 비슷해서 구별하기 어려운 설명 문장들
  • 그래디언트(gradient) · 모델 파라미터를 어느 방향으로 얼마나 수정할지 알려주는 값
  • 디태치(detach)/스톱그래디언트 · 특정 계산 결과를 학습(역전파) 대상에서 제외해 값만 참고하고 그 자체는 업데이트되지 않게 하는 기법
  • R@1(Recall@1) · 검색했을 때 정답이 1위로 나온 비율

본문에 싣지 못한 그림

  • Figure 1: Dense-caption benchmarks are dominated by hard negatives. Distributions of (a) all pairwise caption-caption cosine similarities and (b) each caption’s hardest-negative similarity, measured with the pre-trained Long-CLIP-L text encoder on the test sets. Dotted lines mark the means. The pairs in (b) receive the strongest boosts.
  • Figure 2: Overview of HN-CLIP. For a batch of B image–text pairs, HN-CLIP encodes images and captions with the dual encoder being fine-tuned, and forms the image–text similarity matrix S=v​t⊤ and a detached, diagonal-masked caption-similarity matrix G¯ from G=t​t⊤. Their combination yields boosted logits s⁡(S+γ​G¯), so near-twin negatives receive larger margins. The token-level term of Eq. 3 acts alongside this objective, improving supervision on hard negatives during training while keeping inference unchanged.
  • Figure 3: Illustration of HN-CLIP. A real DOCCI query and its hardest in-batch negative (cos 0.89). The strongest baseline ranks the ground truth 52nd (its top-1 (pink) is the near-twin’s own image); HN-CLIP ranks it first.
  • Figure 4: Empirical gradient analysis (Long-CLIP-L, DOCCI, 10 epochs; losses and full-parameter gradients measured every 5 optimizer steps, 148 measurements). Standard InfoNCE declares 80% of batches solved within the first epoch and its gradient is exactly zero in fp32 in 47% of measurements (median zero at five epochs; plotted clamped to 10−10). The boosted loss keeps at least 26% of batches active in every epoch and, where the standard gradient is nonzero, exceeds it by 102–106× in per-epoch median, with interquartile bands disjoint at nine epochs, and the retrieval error it buys keeps falling.
  • Figure 5: Convergence comparison. Average R@1 (T→I, I→T) per fine-tuning epoch. HN-CLIP’s first epoch matches or exceeds most baselines’ final accuracy on all four benchmarks.
  • Figure 6: Sample efficiency (avg R@1, identical subsets). HN-CLIP at 20% of the data already clears the strongest baseline trained on 100% (dotted line, from Table 1); full numbers in Table A9.
  • Figure A1: Near-duplicate caption pairs on DOCCI. Each row: a test image, its caption, the three nearest other captions’ images (cosine printed underneath), and the caption texts with shared content words highlighted.
  • Figure A2: Near-duplicate caption pairs on DCI.
  • Figure A3: Near-duplicate caption pairs on Long-DCI (full-length captions).
  • Figure A4: Near-duplicate caption pairs on Urban-1K.
  • Figure A5: One real training batch per benchmark. Text–text similarity matrices G¯ (pre-trained encoder; diagonal masked, max off-diagonal entry annotated). Uniformly dark = every negative is hard; this matrix, detached and scaled by γ, is the entire mechanism of HN-CLIP.
  • Figure A6: Statistical analysis of the caption geometry across the four benchmarks (pre-trained Long-CLIP-L text encoder, full test splits). (A) Mean pairwise caption similarity. (B) Mean similarity of each caption’s hardest companion. (C) Composition of in-batch negatives by hardness bucket.
  • Figure A8: Gradient dynamics across data scales. Rows: fraction of the training set; columns: dataset. Per cell: (a) raw loss traces (thin) with running medians (thick), (b) gradient norms and their ratio (dashed), (c) gradient cosine. Log axes in (a,b); values clamped at 10−10 (exact zeros at fp32).
  • Figure A9: Per-direction convergence. Recall@1 per epoch; top: Text→Image, bottom: Image→Text.
  • Figure A10: Qualitative T→I retrieval on DOCCI (green = ground truth).
원문에서 그림 보기 →

논문 원문 초록 (영문)

Dense-caption retrieval has recently been improved by introducing segmentation, edge maps, LLM-filtered captions, and cross-modal modules into contrastive fine-tuning. However, these methods largely inherit the same InfoNCE objective, whose optimization can prematurely saturate under a strong pre-trained initialization: on dense captions, the loss falls below 10^{-3} on 80% of batches within the first epoch, while its gradient reaches exact zero in

저자 · Haoyue Liu, Ye Chen, Zhichao Wang, Xiaoying Tang

arXiv에서 원문 보기

최신 논문

논문 전체 보기 →

METAL LAB 최신 기사