Unsupervised Domain-adaptive Hash for Networks

Tao He, Lianli Gao, Jingkuan Song, Yuan-Fang LiarXiv 2021 · arXiv

Introduction

In the era of big data, representing complex relational structures as networks (or graphs) has become a fundamental practice. To manage these networks at scale, researchers utilize network embedding to map nodes into continuous vector spaces. However, as networks grow to encompass billions of nodes, even high-dimensional continuous vectors pose significant challenges for storage and real-time retrieval. Network hashing addresses this by converting nodes into compact binary codes, enabling efficient similarity searches and drastically reducing memory overhead.

A critical limitation of existing hashing methods is their reliance on the assumption that training and deployment data share the same distribution. In real-world scenarios, a model trained on a specific source network (e.g., an older citation database) often fails when applied to a different target network (e.g., a modern social graph) due to "domain shift." Furthermore, obtaining labels for new networks is often prohibitively expensive. This paper introduces UDAH (Unsupervised Domain-adaptive Hash), a framework designed to transfer knowledge from a labeled source network to an entirely unlabeled target network while producing high-quality binary representations.

Methodology

The UDAH framework integrates four synergistic components to bridge the gap between disparate network domains while maintaining the efficiency of discrete hashing.

1. Hard Groupwise Contrastive Loss

To capture the underlying topology of the network, UDAH employs a groupwise contrastive learning strategy. Rather than simple pairwise comparisons, the model evaluates a node against its immediate neighborhood and a set of "hard" negative samples—non-neighbors that are semantically or structurally similar. By minimizing the distance to neighbors and maximizing the distance to these challenging non-neighbors, the model learns robust embeddings that are less susceptible to the noise inherent in large-scale graphs.

2. Relaxation-Free Hashing via Gumbel-Softmax

A persistent challenge in hash learning is the non-differentiability of the sign function used to generate binary codes (0 or 1). Traditional methods often use continuous relaxations like tanh, which can lead to significant quantization errors during the final conversion to binary. UDAH bypasses this by utilizing the Gumbel-Softmax trick, a reparameterization technique that allows the model to sample from a discrete distribution while remaining fully end-to-end differentiable. This ensures that the learned codes are optimized specifically for their binary form.

3. Cross-domain Intersected Discriminators

To facilitate domain transfer, UDAH adopts a Teacher-Student architecture. A source-domain discriminator (the Teacher) provides pseudo-labels for the target domain. A target-domain discriminator (the Student) then learns to mimic these signals through knowledge distillation. This intersection of discriminators allows the model to identify and preserve domain-invariant features, ensuring the hash codes remain meaningful across different network distributions.

4. Semantic Center Alignment

While structural preservation is vital for connectivity, semantic alignment is the key to successful domain adaptation. UDAH utilizes mini-batch K-means to identify class centroids in both the source and target domains. By forcing these semantic centers to align in the latent space, the framework ensures that nodes belonging to the same category (e.g., "Artificial Intelligence") occupy similar regions in the embedding space, regardless of which network they originated from.

Experimental Evaluation

The researchers evaluated UDAH using three citation networks from the ArnetMiner dataset: DBLPv4, ACMv8, and Citationv1. These datasets share eight common categories but differ in time periods and publication venues, providing a rigorous test for domain adaptation.

Performance Metrics

UDAH was benchmarked against state-of-the-art (SOTA) methods across six cross-domain tasks in three primary applications:

  • Node Classification: UDAH achieved a significant performance boost, outperforming the leading baseline (DELN) by an average of 2.42 percentage points.
  • Link Prediction: The framework reached an average AUC of 75.17%, a 2.86 point improvement over the next best method (INH).
  • Visualization: t-SNE projections of the target domain embeddings demonstrated that UDAH maintains clear, well-separated clusters for different node classes, whereas competing methods often resulted in "tangled" or overlapping distributions when faced with domain shift.

Conclusion and Future Directions

UDAH represents a significant step forward in network hashing by successfully combining unsupervised domain adaptation with differentiable discrete code learning. By focusing on semantic center alignment rather than coarse global distribution matching, the model achieves superior precision in knowledge transfer.

Future research may expand UDAH to more heterogeneous scenarios, such as transferring knowledge between fundamentally different network types (e.g., from a social network to a biological network). Additionally, refining the semantic alignment process to be less dependent on mini-batch sizes could further enhance the model's robustness in extremely sparse or highly imbalanced data environments.

Summary updated

Abstract

Abundant real-world data can be naturally represented by large-scale networks, which demands efficient and effective learning algorithms. At the same time, labels may only be available for some networks, which demands these algorithms to be able to adapt to unlabeled networks. Domain-adaptive hash learning has enjoyed considerable success in the computer vision community in many practical tasks due to its lower cost in both retrieval time and storage footprint. However, it has not been applied to multiple-domain networks. In this work, we bridge this gap by developing an unsupervised domain-adaptive hash learning method for networks, dubbed UDAH. Specifically, we develop four {task-specific yet correlated} components: (1) network structure preservation via a hard groupwise contrastive loss, (2) relaxation-free supervised hashing, (3) cross-domain intersected discriminators, and (4) semantic center alignment. We conduct a wide range of experiments to evaluate the effectiveness and efficiency of our method on a range of tasks including link prediction, node classification, and neighbor recommendation. Our evaluation results demonstrate that our model achieves better performance than the state-of-the-art conventional discrete embedding methods over all the tasks.
BibTeX
@misc{he2021unsupervised,
  author = {Tao He and Lianli Gao and Jingkuan Song and Yuan-Fang Li},
  title = {{Unsupervised Domain-adaptive Hash for Networks}},
  year = {2021},
  eprint = {2108.09136},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.09136},
}
Figure