Graph Learning

Experiments design-transfer

Are the best GNN design choices on Cora also the best for bot detection?

Links: CS224W L19 (the GNN design space, task similarity by Kendall τ; You, Ying & Leskovec 2020), L06 (sum vs mean aggregation), notebooks/cs224w/L19_conclusion_design_space.py (the same design space on Cora, CiteSeer and SBMs), experiments/rege-vs-wl (sum beats mean and max for rings). Atlas: GNN design; benchmarks.

Question

L19's answer to "which GNN should I use?" is: find a known task whose design ranking resembles yours and reuse its best design. Benchmarks are mostly homophilous citation graphs. Is bot detection on a retweet graph such a task, or does the benchmark's ranking mislead? And does adding sum aggregation (GIN), which the rege-vs-wl study favours for rings, change the picture?

Hypotheses (written before running)

  1. Low similarity. Kendall τ between design rankings on Cora and on bot detection (reciprocal rings) is below 0.3, while τ(Cora, CiteSeer) is above 0.6 (L19 found 0.84 on a smaller sample).

  2. Disjoint winners. None of Cora's top-5 designs is among the top-5 for bot detection (reciprocal rings).

  3. Sum aggregation for rings. GIN is the best layer type on both bot tasks (mean over the other design dimensions), but not on Cora.

  4. Transfer regret. Using Cora's best design for bot detection (reciprocal) costs at least 0.05 AUC against the best design in the space.

Setup

Run: uv run marimo edit experiments/design-transfer/design_transfer.py and press the run button (about 15 minutes with 4 workers; results are cached per design, task and seed in runs.json).

Results (summary; full tables in results.md)

τ with Cora noise ceiling (seed-to-seed τ) best / median design Cora's best design here
CiteSeer (accuracy) 0.69 0.70 0.688 / 0.599
bots-reciprocal (AUC) 0.17 0.47 1.000 / 0.995 0.999
bots-co-amplify (AUC) −0.21 0.66 0.976 / 0.929 0.864

Real-data extension: social networks (added after the first run; hypotheses written before running it)

The first run compared Cora with synthetic bot tasks. Is the gap between Cora and a social task about bots, or about social graphs? Four real social node-classification tasks from gl.datasets, two homophilous (Facebook page-page, page type, adjusted homophily 0.82; LastFM Asia, country, 0.86) and two heterophilous (Twitch England, mature streamer, 0.09; Deezer Europe, gender, 0.03), go through the same 96 designs, recipe and seeds. Binary tasks report AUC, multi-class ones accuracy; split 40/20/40 stratified, fixed across seeds.

  1. Homophilous social graphs behave like Cora. τ(Cora, Facebook pages) and τ(Cora, LastFM Asia) are both at least 0.5.
  2. Heterophilous social graphs do not. τ(Cora, Twitch-EN) and τ(Cora, Deezer) are both below 0.3.
  3. Homophily, not "social", decides transfer. Both homophilous tasks have a higher τ with Cora than both heterophilous tasks.

Run: the second button in the notebook, or uv run python experiments/design-transfer/designs.py --social --workers 10 (about 30 minutes with 10 workers; Facebook pages and Deezer are the slow ones).

Social-network results (summary; full table in results.md)

task adjusted homophily τ with Cora noise ceiling best / median regret of Cora's best design top design
Facebook pages (acc.) 0.82 +0.32 0.83 0.939 / 0.917 0.008 GAT-3L-64
LastFM Asia (acc.) 0.86 +0.39 0.79 0.863 / 0.831 0.005 GAT-2L-64
Twitch England (AUC) 0.09 +0.08 0.53 0.636 / 0.605 0.006 GIN-2L-BN-32
Deezer Europe (AUC) 0.03 +0.10 0.75 0.711 / 0.700 0.052 GCN-2L-skip-64

Next steps

  1. Directed layers (separate in/out aggregation), which rege-vs-wl found decisive, as a design dimension.
  2. Ring-held-out splits for the bot tasks (honest-splits showed random splits flatter graph models).
  3. Anchor-based transfer as in L19: rank 12 anchor designs on a new bot task and pick the nearest known task.

Results

Generated by design_transfer.py from config.yaml (96 designs × 4 tasks × 3 seeds; accuracy for Cora/CiteSeer, AUC for the bot tasks).

Kendall τ between design rankings (diagonal: seed-to-seed noise ceiling):

Cora CiteSeer bots-reciprocal bots-co-amplify
Cora (0.61) 0.69 0.17 -0.21
CiteSeer 0.69 (0.70) 0.19 -0.22
bots-reciprocal 0.17 0.19 (0.47) 0.09
bots-co-amplify -0.21 -0.22 0.09 (0.66)
task best design median design worst design
Cora 0.797 0.728 0.568
CiteSeer 0.688 0.599 0.451
bots-reciprocal 1.000 0.995 0.883
bots-co-amplify 0.976 0.929 0.610

Top 5 designs:

task designs
Cora GCN-2L-64, GCN-2L-32, GAT-3L-skip-64, SAGE-3L-64, GAT-2L-skip-64
CiteSeer GCN-3L-skip-64, GAT-3L-64, GAT-2L-skip-32, GAT-3L-skip-32, GAT-3L-skip-64
bots-reciprocal GAT-2L-BN-32, GCN-1L-BN-skip-64, GCN-3L-skip-64, GCN-2L-BN-64, GCN-2L-skip-64
bots-co-amplify GIN-1L-BN-64, GIN-1L-skip-64, GAT-1L-BN-skip-64, GIN-1L-skip-32, GIN-1L-BN-skip-32

Marginal means per choice:

dimension choice Cora CiteSeer bots-reciprocal bots-co-amplify
layer GAT 0.745 0.624 0.991 0.901
layer GCN 0.727 0.619 0.998 0.907
layer GIN 0.698 0.571 0.978 0.913
layer SAGE 0.693 0.577 0.993 0.902
n_layers 1 0.685 0.589 0.994 0.931
n_layers 2 0.728 0.606 0.992 0.902
n_layers 3 0.734 0.599 0.985 0.884
batchnorm False 0.749 0.640 0.988 0.869
batchnorm True 0.682 0.556 0.992 0.942
skip False 0.715 0.588 0.987 0.883
skip True 0.716 0.608 0.993 0.928
hidden 32 0.703 0.586 0.991 0.903
hidden 64 0.728 0.609 0.989 0.908

Verdicts: H1 supported, H2 supported, H3 refuted, H4 refuted.

Real-data extension: social networks

Generated by design_transfer.py (real-data extension) from config.yaml: 96 designs × 3 seeds on facebook-pages, lastfm-asia, twitch-en, deezer-europe; AUC for the binary tasks (Twitch, Deezer), accuracy for the others. Cora's best design: GCN-2L-64.

task adjusted homophily best median noise ceiling τ with Cora τ with bots-co-amplify regret of Cora's best top 3 designs
facebook-pages 0.82 0.939 0.917 0.83 +0.32 -0.14 0.008 GAT-3L-64, GCN-3L-64, GAT-3L-skip-64
lastfm-asia 0.86 0.863 0.831 0.79 +0.39 -0.01 0.005 GAT-2L-64, GAT-2L-BN-64, GAT-3L-BN-skip-64
twitch-en 0.09 0.636 0.605 0.53 +0.08 +0.03 0.006 GIN-2L-BN-32, GIN-2L-BN-64, GIN-1L-BN-64
deezer-europe 0.03 0.711 0.700 0.75 +0.10 +0.07 0.052 GCN-2L-skip-64, GCN-1L-skip-64, SAGE-1L-skip-64

Verdicts: H5 refuted, H6 supported, H7 supported.

In the repository: experiments/design-transfer/ · README.md config.yaml design_transfer.py designs.py results.md runs.json social_homophily.json