FWA GNN β Relational Graph Convolutional Network for Federal Fraud, Waste & Abuse Detection
A heterogeneous R-GCN trained on a synthetic federal grant/loan entity graph to classify contractor and applicant accounts as fraudulent or legitimate. This model is the Phase 2 artifact of the Federal FWA Research Project.
Model Description
Architecture: RGCN_FWA β a 2-layer Heterogeneous R-GCN built with
PyTorch Geometric HeteroConv + RGCNConv.
The model operates on a heterogeneous knowledge graph with 7 node types and 15 edge
types (including reverse edges). Classification is performed on Account nodes only.
| Hyperparameter | Value |
|---|---|
| Hidden dim | 128 |
| Num layers | 2 |
| Num bases (RGCNConv) | 30 |
| Dropout | 0.3 |
| Optimizer | Adam, lr=1e-3 β 5e-4 β 2.5e-4 (step decay) |
| Loss | BCEWithLogitsLoss (pos_weight tuned for class imbalance) |
| Epochs trained | 132 |
Graph Schema
| Node Type | Count | Features |
|---|---|---|
| Account | 17,135 | 19 CIO-derived features (see feature_stats.json) |
| Individual | 21,448 | 3 dense features |
| Application | 32,044 | Learnable embedding |
| BankAccount | 14,725 | Learnable embedding |
| Address | 28,479 | Learnable embedding |
| Agency | 12 | Learnable embedding |
| PaymentEvent | 55,345 | Learnable embedding |
Account node features (19-dim): sharing_peer_count, shared_address_count,
app_count_6mo, inc_age_days, shared_address_edges, related_controlled_count,
max_owner_biz_count, max_payment_count, max_total_amount, payment_hhi,
one-hot business type (5), one-hot status (4).
Fraud Typologies Targeted
| ID | Typology | Description |
|---|---|---|
| FT-SHELL | Shell company network | Shared agents/principals, reused bank accounts, overlapping ownership |
| FT-BIDRIG | Bid rigging / collusion | Coordinated bids, geographic partitioning, hidden shared infrastructure |
| FT-SYNTH | Synthetic / assembled identity | Mixed real/fake attributes, recent-only history |
| FT-RECON | Temporal reconstitution | Same infrastructure after debarment with variable time gap |
Each typology is planted at three difficulty tiers: easy (1-hop), medium (2-hop), and hard (3+ hop structural fingerprint).
Training Data
Trained on fwa_graph_v1.pt β a synthetic heterogeneous PyG HeteroData object exported
from Salesforce Data Cloud. Ground truth labels come from the Phase 0 synthetic generator
(dataset/ground_truth/manifest.json).
| Split | Total | Fraud | Fraud % |
|---|---|---|---|
| Train | 12,013 | 3,087 | 25.7% |
| Val | 2,559 | 647 | 25.3% |
| Test | 2,563 | 649 | 25.3% |
Note: The training set uses cluster-stratified splits to prevent data leakage β entities belonging to the same fraud ring land in the same split.
Evaluation Results
Best checkpoint: epoch 132 (lowest val loss = 0.2057).
| Metric | Val Set |
|---|---|
| Val Loss | 0.2057 |
| Precision | 0.797 |
| Recall | 0.983 |
| F1 | 0.880 |
| AUROC | 0.9908 |
| Average Precision | 0.9721 |
Training converged with AUROC β₯ 0.99 by epoch ~50, with F1 continuing to improve through epoch 132 via precision gains as recall stabilized near 0.98.
Usage
import torch
from model import RGCN_FWA, build_model
# Load the graph
data = torch.load("fwa_graph_v1.pt", weights_only=False)
# Load model weights
model = build_model(data, hidden_dim=128, num_layers=2, num_bases=30, dropout=0.3)
model.load_state_dict(torch.load("model_best.pt", weights_only=True))
model.eval()
# Score Account nodes
with torch.no_grad():
out = model(data.x_dict, data.edge_index_dict)
logits = out["Account"].squeeze(-1) # shape: [num_accounts]
probs = torch.sigmoid(logits) # fraud probability per account
# Default threshold: 0.5
predictions = (probs > 0.5).long()
Feature Normalization
Account features must be z-score normalized before inference using the statistics in
feature_stats.json:
import json, torch
with open("feature_stats.json") as f:
stats = json.load(f)
mean = torch.tensor(stats["mean"])
std = torch.tensor(stats["std"])
# data["Account"].x is raw; normalize before passing to the model
data["Account"].x = (data["Account"].x - mean) / (std + 1e-8)
FWA Synthetic Dataset v1
Synthetic Dataset on Hugging Face
Dataset Description FWA Synthetic Graph v1 is a synthetic knowledge graph representing federal grant and loan program entities with planted fraud typologies, designed for Graph Neural Network (GNN) training and Salesforce Data Cloud identity resolution demonstration.
The dataset models realistic federal assistance program operations including applicants, applications, payments, vendors, and agencies. It contains 925 carefully planted fraud clusters across 4 distinct typologies at 3 difficulty tiers, enabling supervised learning for fraud detection models and comprehensive testing of identity resolution workflows.
Files
| File | Description |
|---|---|
model_best.pt |
Best checkpoint weights (state dict, epoch 132) |
model.py |
RGCN_FWA class and build_model() convenience constructor |
feature_stats.json |
Mean/std for 19 Account node features (for z-score normalization) |
export_metadata.json |
Graph provenance: node/edge counts, fraud label counts, split stats |
requirements.txt |
Python dependencies (PyTorch 2.11, PyG 2.7) |
fwa_graph_v1.pt(the full graph, ~140 MB) is not included here β it is generated from the synthetic dataset and Data Cloud export pipeline. See the project README for reconstruction steps.
Intended Use
- Research and demonstration of GNN-based fraud detection on federal grant/loan graphs
- Baseline for comparing rule-based CIO signals vs. learned graph representations
- Integration with Salesforce Einstein Studio BYOM for on-demand scoring via Apex
Out-of-Scope Use
This model is trained on fully synthetic data and is not intended for production deployment against real federal program data without retraining on real, validated datasets with appropriate privacy controls and fairness audits.
Limitations
- Graph is static (no temporal edge streaming)
- Hard-tier fraud detection (3+ hop patterns) benefits from AUROC ~0.99 at the graph level but individual-entity precision remains ~0.80 β false positive rate requires analyst review before case creation
- Learnable embeddings for node types without dense features (Application, BankAccount, etc.) are not transferable β the model must be retrained if the graph topology changes significantly
Citation
@misc{kvirtue2026fwagnn,
author = {kvirtue},
title = {FWA GNN: Relational Graph Convolutional Network for Federal Fraud Detection},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/kvirtue/fwa-gnn-rgcn}}
}