Feature-Context Consistency: Unsupervised Adversarial Detection with Drift Stability on Attributed Graphs
Organizations: SnT, University of Luxembourg Luxembourg
Abstract
Adversarial detection on evolving attributed graphs faces two challenges: fraud labels arrive late or not at all, and natural distributional drift erodes any trained decision boundary. Modern detectors can reach strong detection rates when labels are available and the distribution is stationary; sustaining that quality without labels and under drift is the open problem. We identify feature-context consistency -- the alignment between a node's attributes and its aggregated neighborhood attributes -- as a single structural signal that addresses both. We formalize it as the Context Boost (CB) score within a Restricted Boltzmann Machine framework (CB-RBM) and prove two complementary worst-case guarantees: a strict separation between the expected CB of legitimate and adversarial nodes, with gap growing linearly in model capacity, whenever the adversary's context stays far enough from legitimate neighborhood context; and a Wasserstein-Lipschitz bound on how far the CB distribution moves under natural drift. We validate on XBlock Ethereum phishing (~153K nodes) and Reddit banned-user detection (~11K nodes), with two further datasets in the appendix spanning diverse domains. With zero labels, CB-RBM achieves AUROC >= 0.96 on four adversarial attacks and keeps FPR close to its calibrated 5% target under drift -- outperforming supervised GNNs (hundreds of labels), unsupervised graph-anomaly baselines, and a standard RBM whose FPR collapses to 89-100%. What typically requires separate mechanisms -- label-free operation and drift stability -- here follows from a single structural regularity of the data. Code: https://github.com/serval-uni-lu/CB-RBM.
Figures & tables
| Attack | Energy-based | Supervised | Unsupervised | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CB-RBM | Std-RBM | SAGE | GAT | GCN | DOM. | CoLA | GAE | ||
| XBlock | Isolated Inj. | 99.9 / 100 | 86.8/51.6 | 97.6/90.1 | 91.7/75.2 | 95.4/80.8 | 96.9/78.1 | 56.4/17.2 | 98.1/89.5 |
| Feat. Camo | 99.9 / 100 | 51.3/11.0 | 92.6/77.8 | 54.6/10.2 | 84.0/29.7 | 96.4/72.5 | 57.3/16.2 | 96.7/78.7 | |
| Sybil | 99.8 / 100 | 86.8/51.6 | 98.8/94.9 | 99.4/ 100 | 99.6/ 100 | 98.1/98.8 | 62.5/21.6 | 96.6/77.4 | |
| Rel. Camo | 97.6/96.8 | 86.8/51.6 | 98.6 /92.4 | 98.2/ 97.8 | 97.8/87.8 | 97.0/86.9 | 72.1/20.2 | 97.7/88.9 | |
| Isolated Inj. | 99.4 /97.2 | 60.0/10.7 | 61.9/0.5 | 73.5/38.3 | 82.2/62.8 | 98.0/91.3 | 93.7/83.8 | 99.1/ 97.3 | |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | (A1) | (A2) | (A3) | (A3) |
|---|---|---|---|---|
| XBlock | ||||
| XBlock | |||||||
| Family | Method | TPR | FPR drift | Combined | TPR | FPR drift | Combined |
| Ours | CB-RBM | ||||||
| Supervised | GraphSAGE | ||||||
| GAT | |||||||
| GCN | |||||||
| XGBGraph | |||||||
| Method | Isolated Inj. | Feat. Camo | Sybil | Rel. Camo | |
|---|---|---|---|---|---|
| XBlock | XGBGraph | / | / | / | / |
| Graph Transformer | / | / | / | / | |
| BWGNN | / | / | / | / | |
| GDN | / | / | / | / | |
| ARC | / | / | / | / | |
| GAD-NR | / | / | / | / |
| XBlock | ||||||
|---|---|---|---|---|---|---|
| Fraud in pool | FPR | AUROC | Rel. Camo TPR | FPR | AUROC | Rel. Camo TPR |
| (clean) | ||||||
| Natural | ||||||
| XBlock | ||||||
|---|---|---|---|---|---|---|
| Flipped | FPR | Iso. TPR | FPR after refresh | FPR | Iso. TPR | FPR after refresh |
| XBlock ( dimensions) | Reddit ( dimensions) | ||||
|---|---|---|---|---|---|
| Wrong dimensions | FPR | Wrong dimensions | FPR | ||
| Condition | Features | Context | XBlock | |
|---|---|---|---|---|
| A | adversarial | random | ||
| B | legitimate | random | ||
| C | legitimate | legitimate | ||
| D | adversarial | legitimate |
| Dataset | Node | CB | Coherent units | Mean gated context |
|---|---|---|---|---|
| XBlock | Legitimate (median CB) | |||
| Same node after drift steps | ||||
| Injected adversary | ||||
| Legitimate (median CB) | ||||
| Same node after drift steps | ||||
| Injected adversary |
| Attack | Mean | Max | Weighted-deg. | Attention |
|---|---|---|---|---|
| Isolated Injection | ||||
| PGD |
| XBlock | ||||
|---|---|---|---|---|
| Regime | CB-RBM | Std-RBM | CB-RBM | Std-RBM |
| Gaussian | ||||
| Correlated | ||||
| Correlated | ||||
| Heavy-tail | ||||
| Heavy-tail | ||||
| Dataset | RMS-based budget | Observed | Slack | |||
|---|---|---|---|---|---|---|
| XBlock | ||||||
| XBlock | ||||
|---|---|---|---|---|
| Threshold shift | FPR | Threshold shift | FPR | |
| XBlock | ||||
| Regime | FPR | FPR | ||
| Co-evolving (reference) | ||||
| Context lag, | ||||
| Context lag, | ||||
| Context lag, | ||||
| Private drift, | ||||
| XBlock | ||||
|---|---|---|---|---|
| Method | Frozen | Refreshed | Frozen | Refreshed |
| CB-RBM | ||||
| Std-RBM | ||||
| GraphSAGE | ||||
| GAT | ||||
| GCN | ||||
| XBlock | ||||
|---|---|---|---|---|
| Scenario | CB-RBM | Std-RBM | CB-RBM | Std-RBM |
| Natural drift (benign) | never | never | ||
| Sybil | never | never | ||
| Relation Camouflage | never | never | ||
| Isolated Injection | never | never | ||
| Feature Camouflage | never | never | ||
| XBlock | |||||
|---|---|---|---|---|---|
| Step | Clique size | CB-RBM | Std-RBM | CB-RBM | Std-RBM |
| Attack | Energy-based | Supervised | Unsupervised | |||||
|---|---|---|---|---|---|---|---|---|
| CB-RBM | Std-RBM | SAGE | GAT | GCN | DOM. | CoLA | GAE | |
| Isolated Inj. | 96.4 / 89.3 | 51.2/4.2 | 88.4/52.5 | 72.0/34.0 | 92.8/58.7 | 73.3/23.7 | 55.0/26.2 | 92.7/77.8 |
| Feat. Camo | 97.5 / 87.8 | 51.2/6.0 | 66.7/28.0 | 54.4/18.7 | 70.0/34.3 | 77.9/33.5 | 57.6/38.5 | 95.4/86.5 |
| Sybil | 98.9/96.7 | 51.2/4.2 | 97.1/86.7 | 98.9/ 100 | 99.1/ 100 | 97.3/96.7 | 68.1/40.5 | 99.8 / 100 |
| Rel. Camo | 97.2 / 79.0 | 51.2/4.2 | 79.4/13.7 | 80.1/22.3 | 77.6/15.7 | 68.6/15.5 | 63.8/11.7 | 57.6/12.7 |
| Energy-based | Supervised | Unsupervised | ||||||
|---|---|---|---|---|---|---|---|---|
| CB-RBM | Std-RBM | SAGE | GAT | GCN | DOM. | CoLA | GAE | |
| Mean TPR | 0.882 | 0.047 | 0.452 | 0.438 | 0.522 | 0.424 | 0.292 | 0.693 |
| Stability | 0.936 | 0.676 | 0.890 | 0.934 | 0.944 | 0.940 | 0.782 | 0.686 |
| Combined Score | 0.826 | 0.031 | 0.403 | 0.409 | 0.493 | 0.398 | 0.229 | 0.475 |
| Attack | Energy-based | Supervised | Unsupervised | |||||
|---|---|---|---|---|---|---|---|---|
| CB-RBM | Std-RBM | SAGE | GAT | GCN | DOM. | CoLA | GAE | |
| Isolated Inj. | 76.6/34.5 | 50.3/10.5 | 98.6 / 93.3 | 79.0/53.0 | 87.2/74.3 | 82.7/26.5 | 80.3/35.0 | 73.6/20.5 |
| Feat. Camo | 78.9/41.5 | 62.9/14.5 | 89.6 / 62.7 | 56.8/27.0 | 64.4/35.8 | 80.3/15.0 | 85.5/48.5 | 70.0/12.5 |
| Sybil | 74.9/15.0 | 50.3/10.5 | 98.9/94.2 | 99.5/ 100.0 | 99.8 / 100.0 | 73.1/15.5 | 60.0/5.5 | 61.7/12.0 |
| Rel. Camo | 98.2 / 86.5 | 50.3/10.5 | 97.5/83.8 | 82.7/41.7 | 79.2/11.0 | 72.8/15.5 | 61.8/11.5 | 61.5/11.5 |
| Energy-based | Supervised | Unsupervised | ||||||
|---|---|---|---|---|---|---|---|---|
| CB-RBM | Std-RBM | SAGE | GAT | GCN | DOM. | CoLA | GAE | |
| Mean TPR | 0.444 | 0.115 | 0.835 | 0.554 | 0.553 | 0.181 | 0.251 | 0.141 |
| Stability | 0.933 | 0.006 | 0.861 | 0.885 | 0.930 | 0.598 | 0.879 | 0.443 |
| Combined Score | 0.414 | 0.001 | 0.718 | 0.490 | 0.514 | 0.108 | 0.221 | 0.062 |
| Unsupervised | Supervised | ||||||
|---|---|---|---|---|---|---|---|
| Std-RBM | DOMINANT | GAE | CoLA | SAGE | GAT | GCN | |
| YelpChi | 93.5 | 89.9 | 93.2 | 87.6 | 91.0 | 90.9 | 92.9 |