Federated Graph Intelligence SDK for financial fraud detection
Project description
Federated Graph
A privacy-preserving Graph Neural Network framework for financial fraud detection using federated learning. Federated Graph enables organizations to collaboratively train fraud detection models on their transaction graphs without sharing raw data.
Features
- Federated Learning — Train models collaboratively across multiple clients with privacy-preserving aggregation
- Temporal Graph Neural Networks — Capture temporal dynamics in transaction networks with decay-aware convolutions
- Dual-Head Risk Scoring — Entity-level and transaction-level fraud risk assessment
- Privacy & Security — Differential privacy, secure aggregation, and cryptographic verification
- Feature Engineering — Node and edge feature extraction with temporal windowing and missing data handling
- Robust Aggregation — Multiple strategies including FedAvg, robust aggregation, and trust-weighted
- Model Validation — Canary generators, conformance checking, and model contract validation
- Score Calibration — Isotonic regression-based calibration with cold-start fallback
- Multiple Backends — In-process, HTTP, and gRPC communication options
- Compliance Ready — Built-in audit trails, SAR support, and serialization for regulatory requirements
Installation
pip install federated-graph
Optional extras:
pip install federated-graph[grpc] # gRPC communication backend
pip install federated-graph[redis] # Redis-based embedding store
pip install federated-graph[scoring] # Score calibration with scikit-learn
pip install federated-graph[dev] # Development tools
pip install federated-graph[all] # Everything
Quick Start
import torch
from torch_geometric.data import Data
from federated_graph import FGIConfig
from federated_graph.models import FGIModel
# Create configuration
config = FGIConfig()
# Initialize model
model = FGIModel(in_channels=10, config=config.model)
# Prepare graph data
x = torch.randn(100, 10)
edge_index = torch.randint(0, 100, (2, 500))
# Forward pass returns embeddings and risk scores
embeddings, entity_scores, txn_scores = model(x, edge_index)
Federated Training
from federated_graph.federation import FederationServer, FederationClient
server = FederationServer(
num_rounds=config.federation.num_rounds,
min_clients=config.federation.min_clients,
)
client = FederationClient(client_id="client_1", model=model, config=config)
Configuration
Pydantic-based configuration with sensible defaults:
from federated_graph import FGIConfig
config = FGIConfig.from_yaml("config.yaml")
config.to_yaml("config_output.yaml")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file federated_graph-0.1.0.tar.gz.
File metadata
- Download URL: federated_graph-0.1.0.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a787041ce4b51087ec7ceca48bedfc80134cc0792248c8321dc60bedd68715e0
|
|
| MD5 |
ad04b25e8d303ff35395686db52e1845
|
|
| BLAKE2b-256 |
ead8f1692b00495ff7783527e22e0c4cd8977d54945305f99e5f587aa50aa108
|
File details
Details for the file federated_graph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: federated_graph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
289e308341b77c3a3668725b2b108ba3f840726cdfdb19b30a9beea2552c39e3
|
|
| MD5 |
5323bdec707344560981d9f392d5e934
|
|
| BLAKE2b-256 |
9d52a522d39d880403f68d68d135b0e60126401ad1d24e81a2da3d40203727fc
|