Cross-modal hashing compresses images and their captions or tags into short binary codes, so a text query can find matching images by counting differing bits. The best systems learn these codes from human labels. Methods that drop the labels instead build a nearest-neighbor graph over the data and ask neighbors to share codes. Our starting observation is that this graph step is a smoothing operation. Each item's similarity profile is averaged with its neighbors' profiles. In graph neural networks, repeated averaging of this kind makes every node look alike, a failure called over-smoothing. We argue that label-free hashing has the same failure in a sharper form. The sign function that turns smoothed values into bits maps many slightly different items onto identical codes. The ranking within a neighborhood, which is what retrieval precision depends on, is then lost.
We propose to build the training targets for label-free cross-modal hashing with a two-channel graph filter. A smoothing channel pulls neighbors together. A difference channel keeps each item distinct from its neighbors. Image and text evidence is combined only at training time, using gated cross-modal attention. The deployed image and text hash encoders stay single-modality, because a query arrives with only one modality. The work has two parts. The first is a diagnostic: does neighbor averaging actually collapse codes in label-free hashing, and at what depth? The second is a method test: does restoring the high-frequency part of the graph signal recover retrieval precision that standard fixes, such as bit-balance losses or shallow graphs, do not?
Core Claim
Label-free cross-modal hashing methods already smooth over graphs, even when they contain no graph layers. Deep Graph-neighbor Coherence Preserving Network for Unsupervised Cross-modal Hashing (DGCPN) replaces raw feature similarity with the probability that two items share neighbors. That is a second-order, low-pass similarity used as the target of a loss. Set and Rebase (SRCH) re-estimates edges from the learned codes themselves. That is again a form of propagation, and it can confirm its own errors.
Our claim is that the useful part of this smoothing is the low-frequency, cluster-level agreement. The harmful part is the loss of fine differences between neighbors, which binarization then turns into ties. A filter that keeps both parts should beat pure smoothing on fine-grained, multi-label benchmarks. The gain should show up specifically as fewer code ties among true neighbors.
Concretely, let $\hat A$ be the symmetrically normalized adjacency matrix of a $k$-nearest-neighbor graph over training image–text pairs, and let $S_0$ be the matrix of initial pairwise similarities. The target similarity matrix is
$$T = \alpha_L \hat A^{K} S_0 \hat A^{K} + \alpha_H (I - \hat A) S_0 (I - \hat A),$$
where $K$ is the propagation depth and $\alpha_L, \alpha_H \ge 0$ weight the smoothing and difference channels. Setting $\alpha_H = 0$ gives a pure low-pass target, which is the regime DGCPN-style coherence sits in. The difference channel is the high-pass half that Complete the Missing Half (FB-GNN) showed restores accuracy on graphs where neighbors differ. That paper worked on node classification. Our use of the same decomposition on similarity targets that are then binarized is new.
Two design choices keep the method honest. First, $T$ is computed without learned parameters. Gradients never pass through a deep stack of graph layers, which sidesteps the optimization problems documented in Backward Oversmoothing. Second, $\alpha_L$ and $\alpha_H$ are chosen by label-free model selection: agreement between the image-side and text-side code rankings on held-out pairs. They are never chosen by test labels.
Research Program
Node features. Each graph node is one image–text pair. Its feature comes from gated cross-attention: text tokens from a frozen CLIP-style encoder query image patch tokens. A learned gate mixes the attended context with the original features, as in An Interpretable Framework for Drug-Target Interaction with Gated Cross Attention. There, the gate kept a dominant stream from overwriting the weaker one.
This attention plays a limited role, and we state it plainly. It exists to give the graph edges evidence that both modalities agree on. It addresses the rose-versus-wedding mismatch DGCPN describes, and the dominance of dense image features over sparse tags. It is trained with a contrastive pairing objective only and is discarded after the targets are built. The attention formulation follows the query-from-one-modality pattern characterized in Hierarchical Multimodal Transformer to Summarize Videos.
Hash encoders. From the fused features we build $S_0$, the $k$-nearest-neighbor graph, and the band-pass target $T$. Two single-modality hash encoders, one for images and one for text, are then trained so that relaxed inner products of their codes match $T$. The loss is DGCPN's mix of within-modality and cross-modality terms, with its half-real, half-binary quantization scheme reused unchanged. Holding the code learner fixed isolates the effect of the target.
Diagnostic study. Before any method comparison, we sweep the depth $K$ of pure low-pass targets on each benchmark and measure four quantities. These are retrieval precision; the tie rate, meaning the fraction of an item's ten reference-nearest neighbors that receive a code identical to its own; per-bit variance inside neighborhoods versus across the dataset; and bit stability, meaning how many bits flip when a small perturbation is added before sign.
The over-smoothing account makes a specific prediction. Within-neighborhood variance and bit stability should fall well before global bit balance degrades. If that holds, global fixes will miss the problem. If ties and within-neighborhood variance do not grow with $K$, the premise is wrong, and we report that as the main finding rather than proceed.
Baselines
Do-nothing reference. Frozen CLIP image and text embeddings are binarized by sign after a PCA rotation, with no graph and no training. This tells us how much of any gain is simply the stronger backbone, since the earlier label-free work used VGG-19 and bag-of-words text.
Strongest existing label-free method. This is DGCPN, which reports a mean average precision of 0.751 for 64-bit image-to-text retrieval on MIRFlickr-25K, and 0.558 for 64-bit text-to-image retrieval on Wiki (DGCPN). Those numbers use weaker features. We will therefore rerun DGCPN on exactly our frozen CLIP features, with the same training pairs, the same hyperparameter-search budget, and the same number of GPU hours. Beating DGCPN means beating this rerun, not the published figure, by a margin outside the spread over five seeds, on at least MS-COCO and NUS-WIDE.
We also rerun SRCH under the same protocol, since its learned-graph updates are the main alternative to fixed targets. No reported MIRFlickr number for SRCH was found on Lacuna.
Supervised reference. An End-To-End Graph Attention Network Hashing for Cross-Modal Retrieval (EGATH), which also uses CLIP, reports 0.8637 image-to-text mean average precision at 64 bits on MIRFlickr-25K. We quote it only to measure how much of the gap to label-trained systems is closed. We do not expect to beat it.
Ablations. Four ablations isolate the key ingredient. Setting $\alpha_H = 0$ at the best $K$ gives pure low-pass targets. Replacing gated cross-attention with feature concatenation checks the fusion step. Replacing the fused graph with the elementwise product of the image-only and text-only similarity graphs checks whether attention adds anything beyond intersection. Adding the bit-balance and decorrelation losses described next checks whether a global normalization does the same job.
Why not just…?
Why not just keep the graph shallow? This is a real threat. DGCPN's coherence is effectively one to two hops and already works well. FB-GNN shows that low-pass filtering hurts even at one layer when neighbors differ, but that evidence comes from node classification, not hashing. The $K$ sweep settles the question directly. If the best pure low-pass target sits at $K = 1$ with no tie problem, and adding $\alpha_H$ gives no gain there, the high-pass channel is unnecessary.
Why not just add a bit-balance and decorrelation loss? This is the hashing analogue of PairNorm, and it plausibly fixes global collapse at almost no cost. Our hypothesis is narrower. Balance constraints spread codes across the whole dataset but leave ties inside a neighborhood intact. The balance-loss ablation is therefore reported with the tie rate as well as precision. If balance alone matches the band-pass target on both, we say so, and the contribution reduces to the diagnostic.
Why not just use CLIP features without any graph? The do-nothing baseline measures this. EGATH's ablation, in which removing the graph module lowered performance on top of CLIP features, suggests relational modeling still matters. That result was supervised, so we test the label-free case ourselves.
Why not fuse by concatenation, or skip fusion and multiply the two similarity graphs? Concatenation beat attention in no reported comparison in our material. Gated attention won in drug–target prediction and in CNN–GNN fusion (How GNNs Facilitate CNNs), but neither involves image–text data. The product-of-graphs ablation is the fair test. If it matches attention, we drop attention, since it only affects training cost.
Proposed Experiments
Benchmarks. We evaluate on MIRFlickr-25K, NUS-WIDE with the 10 most frequent categories, MS-COCO, and Wiki at 16, 32 and 64 bits, in both image-to-text and text-to-image directions. Labels are used only for scoring mean average precision.
Decisive check. On MS-COCO, where rich multi-label structure makes neighbor ranking matter most, the band-pass target should give both lower tie rates and higher precision than the pure low-pass target and the bit-balance ablation.
Frequency check. Wiki's coarse topics should show little benefit, because fine neighbor differences matter less there. A gain on Wiki equal to the gain on MS-COCO would suggest the improvement is not about fine-grained ranking.
Mechanism checks. We report learned $\alpha_H/\alpha_L$ ratios across datasets, together with bit-stability curves. Together these show whether binarization is where fine detail is lost.
References
- Deep Graph-neighbor Coherence Preserving Network for Unsupervised Cross-modal Hashing
- Set and Rebase: Determining the Semantic Graph Connectivity for Unsupervised Cross-Modal Hashing
- Complete the Missing Half: Augmenting Aggregation Filtering with Diversification for Graph Convolutional Networks
- Backward Oversmoothing: why is it hard to train deep Graph Neural Networks?
- An Interpretable Framework for Drug-Target Interaction with Gated Cross Attention
- Hierarchical multimodal transformer to summarize videos
- Comprehensive Graph-conditional Similarity Preserving Network for Unsupervised Cross-modal Hashing
- An End-To-End Graph Attention Network Hashing for Cross-Modal Retrieval
- PairNorm: Tackling Oversmoothing in GNNs
- How GNNs Facilitate CNNs in Mining Geometric Information from Large-Scale Medical Images