Abstract
Identifying unique characteristics in a network through comparison with another network is an essential network analysis task. For example, with networks of protein interactions obtained from normal and cancer tissues, we can discover unique types of interactions in cancer tissues. This analysis task could be greatly assisted by contrastive learning, which is an emerging analysis approach to discover salient patterns in one dataset relative to another. However, existing contrastive learning methods cannot be directly applied to networks as they are designed only for high-dimensional data analysis. To address this problem, we introduce a new analysis approach called contrastive network representation learning (cNRL). By integrating two machine learning schemes, network representation learning and contrastive learning, cNRL enables embedding of network nodes into a low-dimensional representation that reveals the uniqueness of one network compared to another. Within this approach, we also design a method, named i-cNRL, which offers interpretability in the learned results, allowing for understanding which specific patterns are only found in one network. We demonstrate the effectiveness of i-cNRL for network comparison with multiple network models and real-world datasets. Furthermore, we compare i-cNRL and other potential cNRL algorithm designs through quantitative and qualitative evaluations.
Introduction
Comparing two networks to identify unique structural patterns is a fundamental challenge in network science. Whether comparing brain networks of healthy versus diseased patients or social networks of different communities, the goal is to find what makes a "target" network distinct from a "background" network. Traditional methods often rely on simple global statistics or require strict node-to-node alignment, which is frequently impossible when comparing different systems.
While contrastive learning has emerged as a powerful tool for finding salient patterns in high-dimensional data, it typically requires datasets to share a fixed feature space. Networks, however, vary in size and topology, making direct application difficult. This paper introduces Contrastive Network Representation Learning (cNRL) to bridge this gap, providing a framework for embedding networks into a shared space that highlights unique structural patterns while maintaining interpretability.
Methodology: The cNRL Framework
The proposed cNRL framework operates in a two-step architecture designed to handle the structural variability of networks:
- Network Representation Learning (NRL): Raw networks ($G_T, G_B$) are transformed into feature matrices ($X_T, X_B$) that share the same dimensions.
- Contrastive Learning: Contrastive algorithms are applied to these matrices to learn a projection matrix ($W$) that yields contrastive representations ($Y_T, Y_B$).
To ensure the results are human-interpretable, the authors developed i-cNRL, which utilizes DeepGL for inductive feature extraction. DeepGL learns structural feature definitions (e.g., "mean PageRank of neighbors") on the target network and transfers them to the background network. This is followed by Contrastive PCA (cPCA), which identifies directions where the target network exhibits high variance relative to the background. A key technical contribution is the automated selection of the contrast parameter ($\alpha$) using Dinkelbach's algorithm, removing the need for manual tuning.
Experimental Results and Interpretability
The effectiveness of i-cNRL was demonstrated across various synthetic and real-world datasets, including social, biological, and peer-to-peer networks.
Visualizing the Contrast
A core strength of i-cNRL is its ability to visualize the uniqueness of a target network. When projecting nodes into a 2D contrastive space, the target network's nodes spread out into clusters reflecting unique structural roles, while background nodes—lacking these specific patterns—clump together at the origin. This visual separation provides an immediate sanity check for the contrastive learning process.
Real-World Applications and Performance
In a study of peer-to-peer (P2P) networks, i-cNRL identified that synthetic models failed to capture specific $k$-core variations present in real P2P systems. This led to the development of an "Enhanced Price" model with improved fidelity. In biological contexts, the method successfully isolated protein nodes uniquely captured by specific experimental methodologies, providing insights into the biases of different data collection techniques.
Quantitative evaluations against black-box alternatives (e.g., GraphSAGE + Contrastive VAE) showed that i-cNRL matches or exceeds their performance in terms of dispersion ratio and KL divergence. This demonstrates that interpretability does not necessarily come at the cost of analytical power.
Conclusion
i-cNRL provides a robust, interpretable solution for comparative network analysis. By bypassing the need for node alignment and offering clear feature loadings, it allows researchers to understand why networks differ. Future work will focus on scaling the framework to massive networks and exploring non-linear contrastive methods that preserve human-interpretable explanations.
Summary updated