Papers
Topics
Authors
Recent
2000 character limit reached

Local-Graph Weighted Contrastive Learning

Updated 1 January 2026
  • 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:

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 Hu,HvRn×d\mathbf{H}^u, \mathbf{H}^v\in\mathbb{R}^{n\times d} for two views uu and vv, construct a pairwise local affinity: Wij(u,v)=exp(hiuhjv2σ)W^{(u,v)}_{ij} = \exp\left(-\frac{\|\mathbf{h}^u_i-\mathbf{h}^v_j\|^2}{\sigma}\right) To include high-order neighborhood influence, propagate via intra-view graph: W^(u,v)=W(u,v)(W(v,v))\widehat W^{(u,v)} = W^{(u,v)} (W^{(v,v)})^\top The weighted InfoNCE loss for these views is: Llwc(u,v)=i=1nlog(W^ii(u,v)exp(Pii/τ)j=1nexp(Pij/τ))\mathcal{L}_{\mathrm{lwc}}^{(u,v)} = -\sum_{i=1}^n \log\left( \frac{\widehat W_{ii}^{(u,v)} \exp(P_{ii}/\tau)} {\sum_{j=1}^n \exp(P_{ij}/\tau)} \right) where PijP_{ij} 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 TT: T=σ(WK(W1S+b1)+bK),S=Conv(1dk=1dfnk)T = \sigma\left(W_K(\cdots W_1 S + b_1 \cdots ) + b_K\right),\qquad S = \mathrm{Conv}\left(\frac{1}{d}\sum_{k=1}^d f_n^k\right) Recalibrated view: R=TFR = T \odot F, with FF the perturbed embedding. InfoNCE is then computed over user and item nodes using RR (Chen et al., 6 Apr 2025).

Relative Similarity Preservation

In contrast to absolute similarity maximization, relative similarity weighting encodes neighborhood-based decay: rn,m(hi)=hHi[n]exp(θ(hi,h)/τ)hHi[n]exp(θ/τ)+hHi[n+m]exp(θ/τ)r_{n,m}(h_i) = \frac{\sum_{h_* \in \mathbb{H}_i^{[n]}} \exp(\theta(h_i, h_*)/\tau)} {\sum_{h_* \in \mathbb{H}_i^{[n]}} \exp(\theta/\tau) + \sum_{h_\diamond \in \mathbb{H}_i^{[n+m]}} \exp(\theta/\tau)} The pairwise objective: Lpair=vi1kn=1km=1kn+1log[min{rn,m(hi),α}]\mathcal{L}_{\text{pair}} = -\sum_{v_i} \frac{1}{k} \sum_{n=1}^k \sum_{m=1}^{k-n+1} \log\left[\min\{r_{n,m}(h_i), \alpha\}\right] 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: R(a,b)=QikNorm(s(a,b))R(a,b) = |Q_{ik} - \mathrm{Norm}(s(a,b))| where QikQ_{ik} encodes label agreement, and RR 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:

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 τ=0.5\tau=0.5 for temperature, σ\sigma set to the average squared distance, and neighborhood radii k=3k=3 or k=4k=4—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)

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to Local-Graph Weighted Contrastive Learning.

Don't miss out on important new AI/ML research

See which papers are being discussed right now on X, Reddit, and more:

“Emergent Mind helps me see which AI papers have caught fire online.”

Philip

Philip

Creator, AI Explained on YouTube