UGGRH: Unsupervised Generative Completion and Graph-attention Refinement for Incomplete Cross-modal Hashing

Yunfei Chen, Yuchen Zhang, Hongyu Lin, Peng Liu, Zhan YangNeurIPS 2026

TL;DR

Searching across millions of images and texts at lightning speed requires compressing them into compact binary "hash" codes, a process that usually breaks down when real-world training data is messy and missing half its captions or photos. UGGRH solves this without needing human labels by using off-the-shelf generative AI (like Stable Diffusion and BLIP) to hallucinate the missing pieces offline, filtering out bad generations, and using a specialized graph network to distill clean, searchable binary codes. Even when 90% of the training pairs are incomplete, it barely breaks a sweat—preserving fast retrieval speeds with near-complete-data accuracy.

What Problem Does This Paper Address?

Imagine building a search engine where a text query finds relevant images (and vice versa). Comparing high-dimensional embeddings across billions of items is slow and memory-heavy. Cross-modal hashing (CMH) fixes this by squashing images and texts into short binary strings (e.g., 10110...) in a shared space, turning similarity search into blazingly fast bitwise XOR operations (Hamming distance).

The catch? Most unsupervised hashing methods assume every training image comes neatly paired with a text description. In the wild, data is incomplete—images lack alt-text, and posts lack photos. Existing fixes try to guess missing features using simple neural networks or neighborhood averages, which often suffer from "semantic drift" (hallucinating the wrong meaning) and destabilize training when missing rates are high. How do you learn reliable, unified binary codes without human labels when up to 90% of your image-text pairs are broken?

Methods

The authors propose UGGRH (Unsupervised Generative Completion and Graph-attention Refinement), a three-stage pipeline that separates heavy generative lifting from lightweight hash learning:

Figure 1: Offline modality completion with frozen generators and dual-encoder filtering. For each incomplete sample, the observed modality conditions candidate generation and also serves as the anchor for alignment-based re-ranking; only the selected candidate feature is cached for hash learn- ing, rather than being treated as ground truth.
  1. Offline Generative Completion & Filtering: Instead of training small networks from scratch to guess missing features, UGGRH uses frozen foundation models—BLIP to caption lonely images, and Stable Diffusion to illustrate lonely texts. Crucially, it doesn't blindly trust the first output: it generates multiple candidates and uses frozen CLIP encoders to pick the candidate best aligned with the observed modality. This happens once offline, caching the CLIP features so training and online search never touch slow diffusion models.
  2. Discriminator-Guided Similarity Refinement: Even filtered generations aren't ground truth. To build a reliable self-supervised "cheat sheet" (similarity matrix) for training, UGGRH trains a lightweight MLP discriminator on the few actually complete pairs to score image-text matching. It fuses these cross-modal scores with intra-modal (image-image, text-text) cosine similarities, then sparsifies and smooths the matrix to strip out noise.
  3. Hash-Aware Graph Attention (HashGAT): Standard Graph Attention Networks (GATs) pass messages based on continuous features. UGGRH introduces two novel twists: Dynamic Graph Construction (rebuilding K-nearest-neighbor graphs as embeddings evolve) and hash-conditioned attention. Because binary sign() functions aren't differentiable, each node predicts a continuous tanh "hash proxy," boosting attention weights between neighbors that are close in hash space. Finally, an attention gate fuses image, text, and joint branches into unified binary codes.
Figure 2: Overall framework of UGGRH. We first perform one-shot offline modality completion to obtain completed features, then refine cross-modal similarity to form a noise-tolerant target, and finally apply HashGAT to propagate information on modality-specific graphs and generate unified binary hash codes.

Datasets

The authors evaluate UGGRH on three standard multi-label image-text retrieval benchmarks (no new datasets are introduced):

  • MIRFlickr-25K
  • MS COCO
  • NUS-WIDE (a noisier, real-world web dataset)

To simulate missing data, they apply a Partial Data Ratio (PDR) protocol to the training set across three difficulty tiers: Easy (50% complete, 25% image-missing, 25% text-missing), Medium (30% complete, 35%/35% missing), and Hard (only 10% complete, 45%/45% missing).

Key Insights and Ideas

  • Treat generative AI as a noisy hint, not gospel: Directly swapping missing data with generated outputs invites semantic drift. Pairing stochastic candidate generation with CLIP-based filtering—and smoothing the resulting similarity graph—turns off-the-shelf generators into reliable data completers, beating classic MLP or graph autoencoder imputations by 6.6–9.1% mAP.
  • Decoupling saves your compute budget: By confining BLIP and Stable Diffusion to one-shot offline preprocessing, online retrieval remains pure, millisecond-scale Hamming ranking.
  • Graphs need to "think" in binary: Replacing HashGAT with a standard GAT causes a massive performance drop (~17–19 percentage points on 32-bit codes). Letting continuous hash proxies guide graph message passing is vital for keeping binary quantization from destroying neighborhood structure.

Key Results

Using unified frozen CLIP features across up to 12 baselines, UGGRH achieves state-of-the-art retrieval accuracy (mAP@50 with 32-bit codes) across all datasets and missingness levels:

Figure 3: mAP under different incompleteness levels. The horizontal axis is the per-modality miss- ing ratio defined in Table 1; all curves use 32-bit codes.
  • Superior Accuracy under Extreme Missingness: In the Hard setting (90% incomplete pairs), UGGRH reaches mean mAP@50 scores of 0.902 on MIRFlickr-25K (+4.3 percentage points over the strongest baseline, with Text→Image jumping from 0.822 to 0.901), 0.921 on MS COCO (+5.0 percentage points), and 0.844 on NUS-WIDE (+6.1 percentage points).
  • Remarkable Robustness: As data degrades from Easy (50% complete) to Hard (10% complete), UGGRH's mean mAP@50 drops by 0.45 percentage points or less across all three benchmarks, whereas many baselines degrade sharply.
  • Hyperparameter Stability: Model performance fluctuates by less than 0.01 mAP across moderate sweeps of its three loss weights (reconstruction, similarity, quantization), meaning it doesn't require delicate tuning when missing rates shift.

Limitations and Future Work

Because UGGRH keeps its foundation models frozen, its modality completion and filtering quality are bottlenecked by what BLIP, Stable Diffusion, and CLIP already know. Under heavy domain shift—say, specialized medical imaging or niche technical diagrams—generators may hallucinate poorly and CLIP may fail to filter them accurately. For future work, the authors plan to explore uncertainty-aware filtering (knowing when a generation is too unreliable to use) and lightweight domain adaptation while preserving their fast offline-completion design.

Summary updated

Abstract

The proliferation of multimodal data has underscored the imperative for efficiency in cross-modal retrieval. By mapping data into a unified Hamming space, Cross-modal hashing (CMH) significantly enhances both storage and computational efficiency, thereby establishing itself as a preferred favored paradigm for retrieval tasks. However most methods assume complete data, which rarely holds in practice. In incomplete settings, missing modalities (e.g., text or image) break semantic correspondence and make unsupervised hashing unreliable. Therefore, we propose Unsupervised Generative Completion and Graph-attention Refinement for Incomplete Cross-modal Hashing (UGGRH) method. Specifically, UGGRH leverages pretrained generative models for modality completion and employs a discriminator-guided similarity refinement module to fuse intra-modal relations with paired image-text matching signals, thereby constructing a robust cross-modal similarity matrix that yields a noise-tolerant similarity target for training. After that, it learns discriminative binary codes via hash-aware graph attention and cross-modal fusion, to refine modality embeddings and produce unified hash codes. Experiments on MIRFlickr25K, NUS-WIDE, and MS COCO datasets demonstrate that UGGRH consistently achieves superior performance under high missing rates and modality imbalance, showing significant improvements in retrieval accuracy and robustness across challenging incomplete scenarios.
BibTeX
@inproceedings{chen2026uggrh,
  author = {Yunfei Chen and Yuchen Zhang and Hongyu Lin and Peng Liu and Zhan Yang},
  title = {{UGGRH: Unsupervised Generative Completion and Graph-attention Refinement for Incomplete Cross-modal Hashing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ADX5uP0Pe4},
}
Figure