Spectral Feature Augmentation for Graph Contrastive Learning and Beyond

Yifei Zhang, Hao Zhu, Zixing Song, Piotr Koniusz, Irwin King

Introduction

Contrastive Learning (CL) has emerged as a dominant paradigm for self-supervised representation learning, particularly in the graph domain (GCL). The standard approach involves generating multiple augmented "views" of the same graph (e.g., via edge dropping or feature masking) and training an encoder to maximize the similarity between their representations. However, a significant bottleneck in current GCL frameworks is the unbalanced spectrum of the learned feature maps. In most neural networks, a few dominant singular values capture the majority of the "signal," causing the contrastive loss to focus disproportionately on these directions while neglecting the "long tail" of potentially informative features.

Spectral Feature Augmentation (SFA)

To address this, the authors introduce Spectral Feature Augmentation (SFA), a computationally efficient technique that operates directly on the feature maps produced by the GNN encoder. Unlike traditional augmentations that perturb the input graph structure or features, SFA modifies the spectral properties of the latent representations.

The core of SFA is the incomplete power iteration. While the standard power method is used to find the exact dominant singular vector, SFA intentionally stops after a very small number of iterations ($k=1$ or $k=2$). This process allows for:

  1. Spectrum Balancing: By subtracting a rough low-rank approximation from the original feature map, SFA partially flattens the singular value distribution. This prevents the model from becoming "lazy" and forces it to align features across the entire spectrum.
  2. Spectral Noise Injection: The "incompleteness" of the iteration naturally injects noise into the singular values. Crucially, because the singular vectors (the "orientation" of the features) remain largely unchanged, the semantic integrity of the data is preserved.
The SFA pipeline: Graph views are encoded, spectrally augmented to balance their spectra and inject noise, then aligned via a contrastive loss.

Key Insights

SFA offers several theoretical and practical advantages:

  • Semantic Preservation: By perturbing singular values rather than vectors, SFA ensures that the fundamental "meaning" of the features is not destroyed, a common issue with naive noise injection.
  • Improved Generalization: The authors provide a theoretical bound showing that the enhanced alignment facilitated by SFA leads to lower generalization error on downstream tasks.
  • Computational Efficiency: SFA requires only one or two matrix-vector multiplications, adding negligible overhead to the training pipeline.
Conceptual illustration of how SFA balances the spectrum and injects noise to improve the alignment of two views.

Experimental Results

SFA was evaluated across diverse benchmarks, including node classification (WikiCS, Cora, PubMed), graph classification (NCI1, PROTEIN), and even image classification (CIFAR, ImageNet-100).

Key findings include:

  • State-of-the-Art Performance: SFA consistently improves upon strong baselines like GRACE and G-BT. For instance, on the Cora dataset, SFA achieved an accuracy of 85.8%, significantly outperforming GRACE's 83.5%.
  • Complementarity: SFA is highly effective when used in conjunction with standard graph augmentations, suggesting it captures a different dimension of data invariance.
  • Robustness: The method demonstrates increased resilience to noisy input features compared to standard GCL approaches.

Conclusion

Spectral Feature Augmentation provides a simple yet powerful "free lunch" for improving Graph Contrastive Learning. By rebalancing the feature spectrum and injecting structured spectral noise, SFA ensures more comprehensive feature alignment and better generalization with minimal computational cost. Future work may explore adaptive iteration counts or more complex spectral transformation functions.

Summary updated

BibTeX
@inproceedings{zhang2023spectral,
  author = {Yifei Zhang and Hao Zhu and Zixing Song and Piotr Koniusz and Irwin King},
  title = {{Spectral Feature Augmentation for Graph Contrastive Learning and Beyond}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i9.26336},
}
Figure