NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GC-Flow: A Graph-Based Flow Network for Effective Clustering

Tianchun Wang, Farzaneh Mirzazadeh, Xiang Zhang, Jie Chen

Introduction: The Discriminative Shortfall of GCNs

Graph Convolutional Networks (GCNs) have long been considered the gold standard for semi-supervised node classification. However, because they are fundamentally discriminative models, they focus almost entirely on finding decision boundaries that separate classes—modeling the class posterior $p(y|x)$.

A major side effect of this discriminative focus is that the internal representations learned by GCNs often lack a meaningful clustering structure. Nodes from the same class might be "close enough" to be classified correctly, but they are not necessarily grouped into tight, well-separated clusters. While existing approaches have attempted to remedy this using contrastive or reconstruction losses, these methods do not explicitly model the probability distribution of the representation space.

GC-Flow bridges this gap by replacing standard GCN layers with invertible normalizing flows. By modeling the data generatively using a Gaussian Mixture base distribution, it produces node representations that are not only highly accurate for classification but also significantly better clustered than those of traditional discriminative Graph Neural Networks (GNNs).

Methodology: Normalizing Flows Meet Graph Convolutions

The core innovation of GC-Flow is the seamless integration of normalizing flows with graph convolutions to create a "dual-purpose" model that excels at both classification and clustering.

  1. Invertible Architecture: Instead of standard GCN layers, GC-Flow utilizes a sequence of invertible "constituent flows" (specifically, affine coupling layers). Each layer incorporates a graph convolution operation as an inductive bias, allowing the model to leverage the graph structure while remaining mathematically invertible.
  2. Generative Modeling via GMM: Unlike standard normalizing flows that map data to a single Gaussian distribution, GC-Flow maps node features to a Gaussian Mixture Model (GMM). This forces the latent representation space ($z$) to naturally form distinct clusters, where each component of the mixture corresponds to a specific class.
  3. The Determinant Lemma: Training a normalizing flow requires calculating the Jacobian determinant of the transformation, which is computationally expensive when graph convolutions are involved. The authors introduce a novel Determinant Lemma that simplifies this calculation. It reveals that the determinant of the entire graph-based flow can be computed efficiently as a product of the adjacency matrix's determinant and the individual flow Jacobians.
  4. Advanced Variants: To further boost performance, the authors introduce GC-Flow-p, which uses attention-based edge weighting, and GC-Flow-l, which learns to "denoise" the graph structure by treating edges as Bernoulli variables.

Key Insights and Advantages

  • Generative vs. Discriminative Robustness: By modeling the joint probability $p(x, y)$, GC-Flow learns the underlying "shape" of the data. This makes it exceptionally robust in low-label regimes. For example, on the Cora dataset with only two labels per class, GC-Flow outperformed a standard GCN by over 10% in F1 score.
  • Independence via Flow: Even though graph convolutions inherently introduce dependencies between neighboring nodes, the flow mechanism is designed to map these dependent features into an independent latent space. This decorrelation allows the GMM base distribution to work effectively for clustering.
  • The Power of Invertibility: Because the network is invertible, no information is lost during the transformation from input features to latent representations. This preserves the inherent structure of the data far better than the "squeezing" effect typically observed in traditional GCNs.

Experimental Results

The model was rigorously evaluated on six standard GNN benchmark datasets, including citation graphs (Cora, Citeseer, Pubmed), Amazon co-purchase graphs (Computers, Photo), and a web graph (Wiki-CS).

  • Superior Clustering: The most striking result is the improvement in cluster separation. Using the Silhouette coefficient (a metric for how well-defined clusters are), GC-Flow often outperformed GCNs by a factor of 2x to 3x. On the Cora dataset, GC-Flow achieved a Silhouette score of 0.734, compared to just 0.340 for a standard GCN. Visualizations of the latent space confirm that GC-Flow produces tight, isolated "islands" of nodes, whereas GCN representations often appear as a single, continuous cloud with overlapping boundaries.
  • Competitive Classification: Despite shifting to a generative framework, GC-Flow remains highly competitive in classification tasks. In several instances, such as on the "Computers" dataset, it surpassed both GCN and GAT in F1 score (0.847 vs. 0.812).

Limitations and Future Directions

While GC-Flow presents a significant step forward, it does face certain limitations common to flow-based and graph-based models:

  • Scalability: Like most GNNs, GC-Flow is susceptible to "neighborhood explosion" on very large graphs. While mini-batching and neighborhood sampling can help, the computational overhead of maintaining invertibility across massive graphs remains a challenge.
  • Feature Dimensionality: Normalizing flows typically require the input and output dimensions to be identical. To handle high-dimensional features (such as those in Citeseer), the authors utilized PCA as a preprocessing step. Integrating learnable dimensionality reduction directly into the flow architecture is a promising area for future research.
  • Hyperparameter Tuning: The model introduces a weighting parameter ($\lambda$) to balance the labeled and unlabeled likelihoods. This parameter requires careful tuning to achieve the optimal trade-off between classification accuracy and clustering performance.

Summary updated

BibTeX
@inproceedings{wang2023gc,
  author = {Tianchun Wang and Farzaneh Mirzazadeh and Xiang Zhang and Jie Chen},
  title = {{GC-Flow: A Graph-Based Flow Network for Effective Clustering}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=7UJpkqhdhW},
}
Figure