---
title: Graph Learning via Class-Consistent Filtering
url: https://www.emergentmind.com/topics/class-consistent-neighbor-node-filtering
type: topic
---

# Graph Learning via Class-Consistent Filtering

Class-consistent Neighbor Node Filtering is a family of graph-learning mechanisms that select, reweight, or reconstruct neighborhood relations according to estimated class consistency rather than raw graph connectivity alone. In this view, a neighbor is treated as reliable when it is likely to belong to the same class as the anchor node, or when its local structure and predictions indicate label compatibility. The idea appears explicitly as a named method in graph unlearning and more broadly as a design principle in semi-supervised node classification, noisy-label learning, graph self-supervised learning, heterophily-robust representation learning, and graph clustering [2509.04785].

## 1. Conceptual basis

Graph neural networks are commonly motivated by the assumption that connected nodes tend to have the same label. “Label consistency” was defined in LC-GNN as “the proportion of neighboring nodes that have the same label with target node,” and the paper reported that node classification accuracy with GCN on Cora increases as label consistency increases [2007.13435]. This makes neighbor selection a central issue: if neighborhoods are class-consistent, aggregation is beneficial; if neighborhoods are heterophilous, noisy, or imbalanced, aggregation can propagate harmful signals.

Several later methods recast this issue in explicitly filtering-oriented terms. BLNN treats one-hop neighbors as noisy positives under homophily, but assigns each neighbor a supportiveness score so that likely intra-class neighbors contribute more strongly to representation learning [2408.05087]. NeuCGC generalizes the same intuition by introducing neutral pairs, which are weighted neither as fully positive nor fully negative, and by constructing a high-confidence graph whose edge weights encode how trustworthy a neighborhood relation is under varying homophily levels [2512.15027]. NCGCN approaches the same problem from a node-centric perspective: its Neighborhood Confusion metric measures how mixed the local label distribution is, so high-NC nodes are those whose neighborhoods are less class-consistent [2306.02285].

This suggests three recurring interpretations of class-consistent neighbor filtering. First, it can be an **edge-level mechanism**, where neighbors are directly weighted or discarded. Second, it can be a **node-selection mechanism**, where only reliable nodes or neighborhoods provide supervision. Third, it can be a **graph-reconstruction mechanism**, where a new adjacency is induced from label consistency or pseudo-label agreement rather than from the original topology.

## 2. Formal mechanisms

A direct formulation appears in the graph unlearning method explicitly named **Class-consistent Neighbor Node Filtering (CNNF)**. For an unlearning node \(v\), CNNF filters its neighborhood to nodes that are not in the training set and have the same class as \(v\):
\[
\mathcal{N}(v_u) = \{u \mid u \notin idx_{\text{train}} \wedge u\in \mathcal{N}(v) \wedge Y_u = Y_v\}.
\]
If this set is nonempty, CNNF computes the mean posterior of those filtered neighbors,
\[
\overline{Z'_v} = \frac{1}{|\mathcal{N}(v_u)|} \sum_{t\in \mathcal{N}(v_u)} Z_t,
\]
and replaces the unlearning node’s target by that distribution; otherwise it falls back to a class-wise test mean [2509.04785]. Here filtering is hard, local, class-aware, and training-independent.

A softer formulation appears in BLNN. For anchor \(v_i\) and neighbor \(v_j \in \mathcal{N}_i\), BLNN computes a cosine-based supportiveness score,
\[
e_{ij} =
\frac{\boldsymbol{h}^1_i \cdot \boldsymbol{h}^2_j}{
\|\boldsymbol{h}^1_i\| \, \|\boldsymbol{h}^2_j\|},
\qquad
w_j = \frac{\exp(e_{ij}/\tau)}{\sum_{k \in \mathcal{N}_i} \exp(e_{ik}/\tau)}.
\]
These weights are used in a bootstrap objective that aligns the anchor not only with itself across views but also with a supportiveness-weighted average of neighbors [2408.05087]. In this setting, all neighbors remain in the sum, but many receive negligible weight.

LC-GNN implements filtering through graph reconstruction. It first predicts label distributions \(Z\), then forms the label-consistency matrix \(ZZ^\top\), row-normalizes it to obtain
\[
P = \text{Row-Normalize}(ZZ^\top),
\]
and performs label aggregation
\[
\hat{Z} = PZ.
\]
The matrix \(P\) defines a new graph \(G'\) whose edges connect nodes with similar label distributions, including unconnected same-label nodes, while label-inconsistent relations receive very small weights [2007.13435].

NeuCGC uses an intermediate design based on neutral pairs. In its Adaptive Feature Consistency component, the high-confidence graph \(H\) is defined by
\[
H_{ij} =
\begin{cases}
1, & c^h_i = c^h_j,\\
\text{norm}(S_{ij}), & A_{ij}=1 \wedge c^h_i\neq c^h_j,\\
0, & \text{otherwise},
\end{cases}
\]
so confident same-cluster pairs become fully trusted neighbors, original graph neighbors with uncertain consistency become partially trusted, and the rest are excluded from the positive set [2512.15027].

## 3. Methodological families

The literature organizes class-consistent neighbor filtering into several recurring families.

| Family | Representative mechanism | Example papers |
| --- | --- | --- |
| Hard neighbor selection | Same-class or rule-filtered neighbors only | CNNF [2509.04785] |
| Soft neighbor weighting | Attention or supportiveness over candidate neighbors | BLNN [2408.05087] |
| Label-consistency graph reconstruction | Replace or augment topology with label-similarity graph | LC-GNN [2007.13435] |
| Node/group separation | Filter by neighborhood confusion or reliability class | NCGCN [2306.02285] |
| Confidence-based edge scoring | Estimate same-class likelihood and repel low-confidence edges | ConSM [2302.09755] |
| Homophily-aware neutral filtering | Neutral-pair weights and trustworthy neighborhood mining | NeuCGC [2512.15027] |

In semi-supervised node classification, LC-GNN enlarges the receptive field with unconnected same-label nodes and weakens noise from connected nodes with different labels [2007.13435]. NCGCN does not filter edges by label directly, but separates nodes into low-NC and high-NC groups and restricts second-layer message passing to intra-group channels, which acts as a coarse class-consistency filter [2306.02285]. ConSM learns edge coefficients as same-class probabilities through confidence-based subgraph matching and then uses them to attract high-confidence pairs and repel low-confidence pairs in the representation space [2302.09755].

In self-supervised and contrastive settings, BLNN treats one-hop neighbors as candidate positives and uses supportiveness weighting to mitigate false positives [2408.05087]. HLCL does not explicitly identify class-consistent neighbors, but its low-pass and high-pass graph filters separate smooth, homophily-favoring components from non-smooth, heterophily-favoring components, which functions as an implicit distinction between class-consistent and class-inconsistent neighbor relations [2303.06344]. NeuCGC extends this line by estimating both a graph-level neutral factor \(\eta\) and edge-level weights in \(H\), thereby mining trustworthy neighborhoods under varying homophily [2512.15027].

In noisy-label learning, CSGNN introduces “Class-wise Selection for Graph Neural Networks,” uses a neighbor-aggregated latent space, and employs dynamic class-wise selection to identify clean nodes across classes, explicitly to avoid biased sampling from global thresholds and to exploit the memorization effect [2311.11473]. This suggests a node-filtering interpretation in which class-consistent neighborhoods help identify reliable supervisory nodes.

## 4. Representative formulations across tasks

In graph unlearning, CNNF is notable because class-consistent neighbor filtering is the central operation rather than an auxiliary bias. The new target for an unlearning node is the posterior mean of same-class, non-training neighbors when available, and otherwise a class-wise test mean [2509.04785]. The purpose is to make an unlearned node behave like a typical test-like node of its class, rather than like a memorized training exemplar.

In LC-GNN, the filtering criterion is not explicit same-label matching but similarity in predicted label distributions. Because
\[
(ZZ^\top)_{ij} = Z_i \cdot Z_j = \sum_{l=1}^m Z_{i,l} Z_{j,l},
\]
nodes with similar class distributions become strong neighbors in \(G'\), while dissimilar nodes are effectively filtered out by row normalization. The model is regularized so that the learned label-consistency matrix matches ground-truth label consistency among labeled nodes [2007.13435].

In BLNN, the filtered objects are not graph edges in the original training graph but node–neighbor positive pairs in a bootstrap objective. The total loss is
\[
\mathcal{L}_{\text{BLNN}}
=
-\frac{1}{n}\sum_{i=1}^{n}
\frac{\boldsymbol{z}^1_i \cdot \boldsymbol{h}^2_i}{
\|\boldsymbol{z}^1_i\| \, \|\boldsymbol{h}^2_i\|}
-
\frac{1}{n}\sum_{i=1}^{n}\sum_{j\in\mathcal{N}_i}
w_j
\frac{\boldsymbol{z}^1_i \cdot \boldsymbol{h}^2_j}{
\|\boldsymbol{z}^1_i\| \, \|\boldsymbol{h}^2_j\|}.
\]
Here, class-consistent neighbor filtering enters as a differentiable weighting of noisy positives [2408.05087].

In NeuCGC, filtering is distributed across two levels. The Neutral Contrastive Neighborhood Distribution Alignment term scales all neighbor contributions by a homophily-aware neutral contrastive factor \(\eta\), while Adaptive Feature Consistency uses the high-confidence graph \(H\) to promote only trustworthy neutral pairs [2512.15027]. This creates a contrastive analogue of class-consistent neighbor filtering suitable for clustering without labels.

ConSM provides a different route: it first estimates whether a pair of nodes is same-class via confidence-based subgraph matching, then uses those coefficients in a modified label-propagation regularizer. High-confidence pairs are pulled together through \(w_{ij} d(i,j)\), whereas low-confidence pairs are penalized through \((1-w_{ij})(1-d(i,j))\), which prevents suspicious edges from making nodes closer [2302.09755]. This is filtering by attraction–repulsion rather than by graph reconstruction.

## 5. Empirical behavior

Empirical results across tasks consistently indicate that class-consistent filtering is most useful when raw neighborhoods are unreliable. LC-GNN reported gains over reimplemented GCN and GAT backbones on Cora, Citeseer, and PubMed. For example, on Cora the reported test accuracies were \(81.2 \pm 0.6\) for GCN\*, \(82.5 \pm 0.4\) for LC-GCN (w/o RL), and \(82.9 \pm 0.4\) for the full LC-GCN; on Citeseer the corresponding GAT\* and LC-GAT accuracies were \(71.1 \pm 0.7\) and \(73.8 \pm 0.7\) [2007.13435]. In sparse-label settings, LC-GCN’s advantage widened, such as \(69.4 \pm 2.8\) versus \(76.3 \pm 1.6\) on Cora with 5 labeled nodes [2007.13435].

BLNN’s ablations separated clean positives from noisy positives. The reported pattern was that treating all node–neighbor pairs as equal positives produced almost no improvement, whereas using only clean intra-class neighbors gave significant gains, and BLNN approached that oracle behavior through supportiveness weighting [2408.05087]. On Computer, the intra-class compactness metric \(\mathcal{C}\) increased from approximately \(0.4046\) for raw features to \(0.6733\) for BGRL and \(0.7015\) for BLNN [2408.05087]. This supports the claim that filtering noisy positives improves intra-class compactness.

NeuCGC reported that the neighborhood congener ratio \(\delta\) in the high-confidence graph \(H\) increased by approximately \(4.4\times\) on Cora, \(14.3\times\) on DBLP, \(7.8\times\) on Wisconsin, and \(3.3\times\) on Cornell relative to the original graph, indicating that trustworthy neighborhood mining can substantially increase effective class consistency [2512.15027]. Its clustering results were also reported to remain strong on both high- and low-homophily datasets [2512.15027].

In graph unlearning, CNNF was evaluated against retraining, GraphEraser, GIF, CLR, and TNMPP. For model utility with GCN, reported examples included Cora at 20% unlearning, where Retrain achieved \(79.25\) and CNNF \(79.88\), and Cora at 80% unlearning, where Retrain achieved \(73.48\) and CNNF \(76.48\) [2509.04785]. CNNF also converged in fewer than approximately 70 epochs, whereas retraining required approximately 500 epochs, and reported wall-clock time for GCN at 20% unlearning was about \(0.70\)–\(0.76\) s for CNNF versus about \(4.19\)–\(4.46\) s for Retrain [2509.04785].

## 6. Limitations, assumptions, and related directions

A central limitation is dependence on homophily or on pseudo-label quality. BLNN assumes that neighbors are noisy positives and reported experiments only on homophilic benchmarks with \(\mathcal{H} > 65\%\); it has no explicit heterophily mechanism beyond downweighting low-similarity neighbors [2408.05087]. LC-GNN similarly depends on the predicted label distributions \(Z\): if early pseudo-labels are poor, then the learned label-consistency graph \(G'\) may be misleading [2007.13435]. NeuCGC addresses this more directly through neutral pairs and homophily-aware weighting, but still relies on clustering confidence and similarity estimates [2512.15027].

Another limitation is that some methods filter at the node or group level rather than at the edge level. NCGCN’s separation by Neighborhood Confusion is effective because performance decreases monotonically with NC on most datasets and high-NC nodes benefit from specialized processing, but it remains a coarse proxy rather than a direct same-class edge selector [2306.02285]. HLCL likewise separates smooth and non-smooth components spectrally without explicit class-consistent edge identification [2303.06344]. This suggests that “class-consistent neighbor filtering” spans a spectrum from exact same-class neighbor selection to indirect reliability-aware message passing.

Task-specific constraints also matter. CNNF in graph unlearning has no formal certified removal guarantee; its effectiveness is empirical and evaluated through membership inference accuracy, t-SNE visualization, utility, and efficiency [2509.04785]. ConSM is sensitive to the confidence ratio \(\beta\), and its reported F1 for edge classification was strongest when \(\beta\) was near the actual homophily ratio \(h\), which implies nontrivial hyperparameter dependence [2302.09755]. CSGNN’s abstract states that it uses dynamic class-wise selection in a neighbor-aggregated latent space and clustering-based clean-node identification, but the inaccessible paper body leaves the full mathematical specification unavailable in the present record [2311.11473].

Taken together, these works indicate that class-consistent neighbor node filtering is not a single algorithm but a graph-learning paradigm. It can be instantiated by strict same-class neighbor averaging, label-consistency graph construction, supportiveness-weighted noisy-positive handling, confidence-based attraction–repulsion, or homophily-aware neutral contrastive weighting. The shared premise is that raw adjacency is an insufficient criterion for message passing, and that effective graph learning often depends on replacing “connected” with “class-consistent enough.”

Source: https://www.emergentmind.com/topics/class-consistent-neighbor-node-filtering