Local-Graph Weighted Contrastive Learning
- The paper demonstrates that leveraging local graph structures to adaptively weight contrastive pairs enhances robustness against noise.
- It introduces techniques like local affinity propagation and squeeze-and-excitation reweighting to recalibrate feature importance.
- Empirical results show that LGWCL improves accuracy in multi-view clustering, collaborative filtering, and node classification tasks.
Local-Graph Weighted Contrastive Learning (LGWCL) describes a family of methodologies within graph representation learning that incorporate local graph structures or neighborhood affinities as weighting mechanisms in contrastive objectives. Unlike standard graph contrastive learning (GCL) which typically treats all contrastive pairs or augmentations equally, LGWCL adaptively modulates the contribution of each pair or feature dimension by exploiting local connectivity, similarity, or semantic cues. This approach is motivated by the need to increase robustness against noise, enhance sample efficiency, and more faithfully reflect the intrinsic properties of graph-structured data.
1. Conceptual Foundations and Motivation
LGWCL is rooted in the principle that local graph information—such as neighborhood affinities, multi-hop proximity, or feature importance—should inform how contrastive similarities are measured and weighted. Conventional GCL often relies on global or augmentation-based pairing, which can lead to suboptimal objectives, especially in the presence of structural noise, data sparsity, or label inconsistency. In multi-view, multi-relational, or sequential recommendation settings, treating all pairs equally may inadvertently strengthen noisy, mis-paired, or semantically irrelevant associations.
Prominent LGWCL variants address these limitations via:
- Local affinity graphs that produce selective pairwise weights based on feature similarity or topological adjacency (He et al., 25 Dec 2025)
- Local feature recalibration using squeeze-and-excitation architectures to amplify informative dimensions (Chen et al., 6 Apr 2025)
- Relative structural similarity objectives that encode neighborhood-based decay or variation in semantic consistency (Ning et al., 8 May 2025)
- Weighted sampling of neighbors or Mixup pairs based on relational, label, or distributional similarity (Wang et al., 30 Jan 2025)
This suggests a unifying theme: leveraging local graph structure to intelligently reweight the contrastive learning signal, thereby improving both expressivity and robustness.
2. Mathematical Formulations and Loss Functions
Weighted contrastive objectives generally generalize InfoNCE-like losses by introducing adaptive weights derived from local graphs or similarity metrics. Consider several representative formulations:
Local Affinity Weighting (Multi-view Clustering)
Given feature embeddings for two views and , construct a pairwise local affinity: To include high-order neighborhood influence, propagate via intra-view graph: The weighted InfoNCE loss for these views is: where is the cosine similarity between features (He et al., 25 Dec 2025).
Squeeze-and-Excitation Reweighting (Collaborative Filtering)
After local perturbation and embedding propagation, a Squeeze-and-Excitation (SE) network produces a weight matrix : Recalibrated view: , with the perturbed embedding. InfoNCE is then computed over user and item nodes using (Chen et al., 6 Apr 2025).
Relative Similarity Preservation
In contrast to absolute similarity maximization, relative similarity weighting encodes neighborhood-based decay: The pairwise objective: thereby enforcing that closer structural neighborhoods encode higher similarity (Ning et al., 8 May 2025).
Contrastive Weighting via Pseudo-Label Confidence
Weights can be adaptively assigned based on pseudo-label agreement and normalized similarity: where encodes label agreement, and up-weights hard (low-similarity, same-label) pairs and hard negatives (Wei et al., 25 Apr 2025).
3. Representative Architectures and Algorithms
Several frameworks exemplify LGWCL with varying instantiations:
| Framework | Weighting Mechanism | Primary Application Area |
|---|---|---|
| WeightedGCL (Chen et al., 6 Apr 2025) | Squeeze-and-Excitation per feature | Collaborative Filtering |
| LGDL in CSG2L (Wei et al., 25 Apr 2025) | Adaptive pairwise reweighting w/ confidence | Node classification, general GNN |
| ComGRL (Wang et al., 30 Jan 2025) | Adjacency-weighted (multi-hop) contrastive loss | Semi-supervised node classification |
| GLC (He et al., 25 Dec 2025) | Local affinity graph (Gaussian + propagation) | Multi-view clustering |
| RelGCL (Ning et al., 8 May 2025) | Structural-distance (hop) weighting | Node classification (homo/hetero) |
| GCL4SR (Zhang et al., 2022) | Weighted local/global item subgraph views | Sequential recommendation |
Typical pipelines involve: (1) constructing appropriate local graphs or affinity matrices, (2) generating augmented or perturbed embeddings, (3) calculating per-pair or per-dimension weights, (4) computing the weighted contrastive loss, and (5) integrating with a main supervised or unsupervised objective.
4. Empirical Evaluation and Observed Benefits
Across multiple domains, LGWCL outperforms non-weighted or globally weighted contrastive approaches, particularly in situations with strong local structure, label noise, or imbalanced positive/negative pairs.
- In multi-view clustering, LWC provides up to +11.3% ACC improvement over unweighted contrastive objectives on incomplete datasets (He et al., 25 Dec 2025).
- In collaborative filtering, the WeightedGCL approach yields up to +20.58% Recall@20 and +24.45% NDCG@20 improvement on Alibaba over the best GCL baselines (Chen et al., 6 Apr 2025).
- In general graph node classification, RelGCL achieves highest average accuracy (rank 1.6) over both homophily and heterophily settings by enforcing relative (rather than absolute) similarity decay patterns (Ning et al., 8 May 2025).
- Ablation studies universally show that removing the weighting component, or reverting to uniform-pair InfoNCE, leads to notable degradation in predictive accuracy and robustness—often collapsing under high-noise scenarios (Chen et al., 6 Apr 2025, He et al., 25 Dec 2025, Wang et al., 30 Jan 2025).
The success is attributed to the improved alignment of contrastive objectives with underlying graph semantics, and to the suppression of unreliable or misleading training signals.
5. Theoretical Considerations and Analysis
The theoretical basis for LGWCL is that local structure-induced weighting or similarity decay matches observed semantic patterns better than uniform treatment. In particular:
- Random walk theory predicts label consistency decays with hop distance; weighting contrastive constraints accordingly leads to embedding spaces that reflect the intrinsic label or feature distributions (Ning et al., 8 May 2025).
- Weighting hard positives/negatives (as in LGDL (Wei et al., 25 Apr 2025)) acts akin to curriculum learning, focusing optimization on the most informative subspace of the data.
- Per-feature recalibration (as in squeeze-and-excitation) dynamically adapts the model's sensitivity to local context, countering the effect of non-uniform information content across dimensions (Chen et al., 6 Apr 2025).
A plausible implication is that LGWCL can generalize to a broader class of graph self-supervised objectives where any structural, label, or distributional heterogeneity needs to be selectively emphasized or masked.
6. Applications and Variants
LGWCL frameworks have been adopted in:
- Collaborative filtering (e.g., product recommendation with sparse data) (Chen et al., 6 Apr 2025)
- Sequential recommendation (capturing global item transitions and denoising user behavior) (Zhang et al., 2022)
- General node classification (handling both homophily and heterophily graphs) (Ning et al., 8 May 2025, Wang et al., 30 Jan 2025)
- Multi-view clustering with incomplete/noisy data (adaptive cross-view weighting) (He et al., 25 Dec 2025)
Some variants focus on high-confidence pseudo-label selection and Mixup strategies for enhanced label propagation (Wang et al., 30 Jan 2025), while others rely on explicit structural distance—without augmentation—to regularize embedding similarity decay (Ning et al., 8 May 2025).
7. Design Choices, Hyperparameters, and Limitations
Successful LGWCL deployment depends on appropriately choosing weighting functions, propagation steps, temperature parameters, and the scale (bandwidth) of affinities. Representative values—such as for temperature, set to the average squared distance, and neighborhood radii or —demonstrate robustness, though performance can be sensitive to these choices.
While LGWCL improves over conventional GCL in noisy or incomplete settings, in dense, high-quality graphs the gains may be less pronounced. Additionally, excessive complexity in weighting architectures (e.g., too many excitation layers) can harm performance due to overfitting or gradient vanishing (Chen et al., 6 Apr 2025).
References
- "Squeeze and Excitation: A Weighted Graph Contrastive Learning for Collaborative Filtering" (Chen et al., 6 Apr 2025)
- "A Generative Graph Contrastive Learning Model with Global Signal" (Wei et al., 25 Apr 2025)
- "Contrastive Learning Meets Pseudo-label-assisted Mixup Augmentation: A Comprehensive Graph Representation Framework from Local to Global" (Wang et al., 30 Jan 2025)
- "Global-Graph Guided and Local-Graph Weighted Contrastive Learning for Unified Clustering on Incomplete and Noise Multi-View Data" (He et al., 25 Dec 2025)
- "Rethinking Graph Contrastive Learning through Relative Similarity Preservation" (Ning et al., 8 May 2025)
- "Enhancing Sequential Recommendation with Graph Contrastive Learning" (Zhang et al., 2022)