Most methods that group nodes of a network into communities assume that a community is a tightly knit cluster: its members link to each other more than to outsiders and look alike. Many networks that matter break this assumption, and they do so unevenly over time. In financial contact graphs, fraudsters rarely link to each other. They link to ordinary users, so a "fraud ring" is a group of nodes with similar profiles and similar outward connections, not a dense subgraph. A group can also start out tight and turn outward-facing as it matures or adapts to detection. We propose to define communities by how their members connect, meaning which other groups they tend to link to, and not by how densely they link internally. We then train a node encoder without labels so that nodes with the same connection pattern and compatible attributes are pulled together. Because the summary of connection patterns is a small group-by-group matrix, it can be updated edge by edge as the graph changes. That makes the method usable on streaming graphs, and it turns "this community just changed from inward-facing to outward-facing" into a quantity we can measure.
The opportunity is that three pieces exist separately but have never been combined. Contrastive community learning can fix the error of treating same-community nodes as negatives, but only under a density assumption. Attributed block models can recover communities with any mixing pattern, but they are shallow and static. Temporal heterophily models exist, but only as supervised classifiers. The regime we target is the one practitioners face: attributed, evolving graphs with almost no labels.
Core Claim
Replacing edge-density community anchors with block-model anchors, where each community is summarized by its row of a community-to-community link-rate matrix, should do three things. It should let communal contrastive learning work on heterophilous and mixed-homophily graphs where density anchors fail. It should allow incremental updates whose cost per arriving edge is independent of graph size. And it should expose time-varying per-community assortativity as a usable signal. In this note, "heterophily" means linked nodes tend to differ. "Assortativity" of a community means how much more it links to itself than to others.
Concretely, for node assignments $z_i \in \{1,\dots,K\}$, a $K\times K$ link-rate matrix $B$, encoder outputs $h_i$ and community centroids $\mu_c$, we fit
$$\mathcal{L}(z,B,\mu,h)=-\sum_{i,j}\log p\!\left(A_{ij}\mid B_{z_i z_j}\right)+\lambda\sum_i d_\phi(h_i,\mu_{z_i})+\gamma\,\mathcal{L}_{\text{con}}(h;z).$$
Here $A$ is the adjacency matrix. $d_\phi$ is a Bregman divergence, a family of distances that includes squared Euclidean and KL divergence. $\lambda$ weights the attribute term. $\mathcal{L}_{\text{con}}$ is a contrastive loss whose positives are nodes sharing a community, whether or not they are linked. The first two terms are the objective analyzed in Exact Recovery and Bregman Hard Clustering of Node-Attributed Stochastic Block Model. That paper shows communities are recoverable when either the link channel or the attribute channel is informative, and it places no constraint that $B$ be diagonal-dominant. That property is the methodological basis for the proposal. The per-community assortativity at time $t$, $a_c(t)=B^t_{cc}/\tfrac{1}{K}\sum_d B^t_{cd}$, is the tracked quantity.
Relation to Prior Work
The closest work is Disentangling Homophily and Heterophily in Multimodal Graph Clustering (DMGC). It splits a static graph into a homophilous view built from attribute nearest neighbors and heterophilous views. It filters the two kinds with low- and high-pass filters and clusters the fused embedding without labels. DMGC treats heterophily as a property of edges to be filtered away or exploited. We treat it as a property of communities, encoded in $B$. DMGC also works on a fixed graph, whereas our community summary is designed to be updated as edges arrive.
Graph Communal Contrastive Learning (gCooL) supplies the mechanism we reuse: contrasting nodes against community centroids so same-community nodes are not pushed apart. Its Dense Community Aggregation step maximizes intra-community edge density, which is exactly the assumption that fails for outward-facing groups. We swap that step for the block-model term.
Two papers motivate the problem. DGraph: A Large-Scale Financial Dataset for Graph Anomaly Detection reports that fraudsters have lower out-degree than normal users (0.75 vs 1.73), which is direct evidence that the groups of interest are not dense. A Label-free Heterophily-guided Approach for Unsupervised Graph Fraud Detection (HUGE) shows that a label-free attribute-disparity signal plus an MLP encoder kept separate from message passing finds camouflaged fraud. HUGE scores individual nodes, however, not groups, and it is static.
One paper constrains the design. The Heterophilic Graph Learning Handbook separates "benign" heterophily, where regular cross-class patterns help graph models, from "malignant" heterophily, where MLPs win, and it identifies mid-homophily as the hardest regime. A block model captures benign patterns by construction but cannot help under malignant ones. We therefore keep an attribute-only path and expect gains only where connection patterns are regular. On the temporal side, THeGCN: Temporal Heterophilic Graph Convolutional Network shows that heterophily also appears along time and that collapsing time loses it, but it is fully supervised. LD2 supplies the cheap encoder design: precomputed 2-hop and high-pass propagated features feeding an MLP. Its precomputation is invalidated by graph changes, which is part of why we keep the dynamic state in the small matrix $B$ and the centroids rather than in propagated features.
Research Program
The system has three parts. First, a lightweight encoder: an MLP over raw attributes concatenated with LD2-style 2-hop and high-pass propagated features. The propagated features are refreshed lazily only for nodes whose 2-hop neighborhood changed by more than a threshold. Second, a block-model community layer holding $B$, the centroids $\mu$ and the assignments $z$. Third, a training loop that alternates hard reassignment, closed-form updates of $B$ and $\mu$, and gradient steps on the encoder with community-positive contrastive pairs.
In the streaming mode, each arriving edge $(i,j)$ increments one count in $B$, with exponential forgetting so old interactions fade. Only $i$, $j$ and nodes whose propagated features crossed the refresh threshold are candidates for reassignment. Encoder fine-tuning runs on a replay buffer at fixed intervals. Community identities persist across time because centroids carry over, so no post-hoc cluster matching is needed.
Label scarcity is the operating regime and not an extra module. Training uses zero labels. Evaluation uses either cluster-to-label matching or a linear probe with 1% of labels. We also test one cheap use of a few labels: naming communities by querying one medoid per block, compared against FeatProp-style selection, which relies on homophilous smoothing.
The analysis has two parts. On synthetic attributed dynamic block models, we derive when density anchors provably mis-assign members of disassortative communities, following the recovery conditions of the Bregman-SBM paper. We then check empirically whether $a_c(t)$ detects planted flips from assortative to disassortative mixing before any accuracy drop is visible.
Baselines
The naive reference points come first. One is k-means on raw attributes, the strongest "ignore the graph" option, which the Handbook suggests can win under malignant heterophily. The other is Louvain-style modularity clustering on the collapsed graph, the "ignore attributes, assume density" option. Beating both on a dataset is the minimum bar for claiming the combination matters there.
The strongest existing clustering method is DMGC. On static Amazon it reports 79.83% ACC versus 72.40% for InfoMGF-RA, on IMDB 58.16% ACC, and on Ele-Fashion 51.17% ACC. We run it with its released settings and give it the same tuning budget as our method. On dynamic data we run it per snapshot, refit from scratch, then align clusters across time with Hungarian matching. That is its fairest dynamic use. Beating it means matching it within noise on static Amazon and IMDB, exceeding it on mixed-homophily and drifting data, and doing so at a fraction of its per-snapshot cost. No reported result was found on Lacuna for DMGC or any clustering method on DGraph, Elliptic++ or PEMS, so those numbers will be produced here.
gCooL is the direct ablation target. It reports an ARI of 0.284 on Amazon-Computers node clustering. We run it unchanged, and also with an attribute nearest-neighbor graph fused into the adjacency in the style of GraphZoom. The attributed block-model fit without any deep encoder, warm-started across snapshots, is the shallow competitor. Its full description is in the next section, because it is the most serious threat.
For anomaly-flavored evaluation on DGraph, the reference points are TGAT's supervised AUC of 0.792 and RGCN's 0.784 as reported in the DGraph paper. RHO's semi-supervised setup from Semi-supervised Graph Anomaly Detection via Robust Homophily Learning, run from mala-lab/RHO, is the label-scarce comparison. No isolated DGraph number for RHO was found on Lacuna.
The key ablation replaces only the block-model term with gCooL's density term while keeping the encoder and contrastive loss fixed. This isolates whether the gains come from the anchor definition. A second ablation freezes $B$ after the first snapshot to isolate the value of tracking drift. All methods share data splits, a fixed GPU-hour budget per dataset, and an equal number of hyperparameter trials.
Why not just…?
Why not just fit an attributed stochastic block model per snapshot, with no neural encoder? This is a real threat. The recovery results in the Bregman-SBM paper already handle arbitrary mixing patterns. If warm-started shallow fitting matches our method on DGraph and Elliptic++, the honest conclusion is that the contrastive encoder is unnecessary, and the contribution reduces to incremental block tracking plus the assortativity diagnostic. We expect the encoder to matter in two places. One is high-dimensional or partially missing attributes, such as the roughly 50% missing profile fields in DGraph, where a fixed Bregman divergence on raw features is poorly matched. The other is new nodes, which the encoder can embed without refitting. The shallow baseline and our method will be compared on exactly these conditions, and we will report whichever wins.
Why not just run DMGC on each snapshot and match clusters? DMGC handles edge-level heterophily well statically, and on slowly changing graphs this may be competitive in accuracy. Its weaknesses for this question are cost and coherence. It rebuilds nearest-neighbor views and retrains per snapshot, and several baselines already ran out of memory on the roughly 97,000-node Ele-Fashion graph. Independent refits also produce label flicker that matching only partly repairs. We measure accuracy, wall-clock time per snapshot, and the fraction of nodes whose community changes between snapshots without any change in their neighborhood. Our method should win the last two clearly. On accuracy we expect it to win only where communities themselves change their mixing pattern.
Why not just cluster attributes with an MLP and skip the graph? On malignant-heterophily graphs this may tie or win, and we will say so. The DGraph paper, however, shows graph models beating feature-only models when profiles are incomplete, and outward-facing groups are defined partly by whom they link to. Attributes alone cannot see that. The synthetic sweep, which holds attribute separability fixed and varies link-pattern informativeness, shows directly where the graph term starts to pay.
Proposed Experiments
The decisive controlled check uses synthetic attributed dynamic block models. We sweep the diagonal-to-off-diagonal ratio of $B$ through assortative, mid-homophily and disassortative settings. We plant flips in a subset of communities partway through the stream, and we vary attribute noise. The prediction is that density-anchored methods (gCooL, Louvain) degrade sharply once a community turns outward-facing. Our method's ARI should stay roughly flat, and $a_c(t)$ should detect the flip within a short window. If the block-anchored model also collapses at mid-homophily, matching the Handbook's warning, that bounds the claim.
On real dynamic data, we use DGraph-Fin with temporal edges ordered by timestamp, and Elliptic++ with its temporal transaction and wallet interactions. We evaluate whether some learned community isolates illicit or fraudulent nodes, measured by best-community purity and by AUROC/AUPRC when community membership is used as a fraud score. These are compared against the supervised TGAT and RGCN numbers as upper references and against RHO and HUGE as label-scarce competitors. The PEMS suite is a secondary check against THeGCN's 55.82% accuracy on PEMSLA, using a 1% linear probe. That probe is not expected to match a fully supervised model, but it shows how much label-free structure the method recovers.
Static sanity checks on Amazon, IMDB and Amazon-Computers confirm that dropping the density assumption costs nothing where density holds. The heterophilic benchmarks, Texas, Roman-Empire, Chameleon and Squirrel, test the benign/malignant split. We expect gains on Chameleon and Squirrel and parity with the attribute-only path on Texas and Roman-Empire.
Across all settings we report ACC, NMI and ARI, update latency per thousand edges, peak memory, and cross-snapshot assignment stability. The project succeeds if the density ablation loses specifically on outward-facing and drifting communities while the full model holds, at a per-edge cost independent of graph size.
References
- Exact recovery and Bregman hard clustering of node-attributed Stochastic Block Model
- Disentangling Homophily and Heterophily in Multimodal Graph Clustering
- Graph Communal Contrastive Learning
- DGraph: A Large-Scale Financial Dataset for Graph Anomaly Detection
- A Label-free Heterophily-guided Approach for Unsupervised Graph Fraud Detection
- The Heterophilic Graph Learning Handbook: Benchmarks, Models, Theoretical Analysis, Applications and Challenges
- THeGCN: Temporal Heterophilic Graph Convolutional Network
- LD2: Scalable Heterophilous Graph Neural Network with Decoupled Embeddings
- Active Learning for Graph Neural Networks via Node Feature Propagation.
- GraphZoom: A Multi-level Spectral Approach for Accurate and Scalable Graph Embedding
- Semi-supervised Graph Anomaly Detection via Robust Homophily Learning