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
Metadata
Release files for federated-graph 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| federated_graph-0.1.0.tar.gz | 37.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| federated_graph-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.8 kB
Release files / federated_graph-0.1.0.tar.gz
| Download URL | federated_graph-0.1.0.tar.gz |
|---|---|
| Size | 37.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a787041ce4b51087ec7ceca48bedfc80134cc0792248c8321dc60bedd68715e0
|
|
BLAKE2b-256 checksum How to use checksums |
ead8f1692b00495ff7783527e22e0c4cd8977d54945305f99e5f587aa50aa108
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Release files / federated_graph-0.1.0-py3-none-any.whl
| Download URL | federated_graph-0.1.0-py3-none-any.whl |
|---|---|
| Size | 54.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
289e308341b77c3a3668725b2b108ba3f840726cdfdb19b30a9beea2552c39e3
|
|
BLAKE2b-256 checksum How to use checksums |
9d52a522d39d880403f68d68d135b0e60126401ad1d24e81a2da3d40203727fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Security for federated-graph 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.