Financial Fraud Training
What is the Financial Fraud Training Container?
The Financial Fraud Training container provides the capabilities to train a two-stage Graph Neural Network (GNN) + XGBoost pipeline for detecting credit card transaction fraud. The container trains a GNN that encodes the transaction graph context into dense embeddings, then trains an XGBoost classifier on those embeddings to predict fraud probability for each transaction.
Training runs distributed across multiple GPUs using WholeGraph and cuGraph-PyG for graph storage and sampling, and PyTorch DDP with NCCL for gradient synchronisation. The resulting artifacts are exported directly as a Triton Inference Server ensemble, ready for production deployment without manual model conversion.
Version 3.0.0 adds multi-node multi-GPU (MNMG) training, hybrid saved-embedding inference, LLM-powered fraud explanation, and XGBoost memory modes (batched, extmem, memmap) for datasets that exceed GPU or CPU RAM.
Applications
Financial losses from worldwide credit card transaction fraud are projected to reach more than $403 billion over the next decade. Traditional fraud detection methods, which rely on rules-based systems or statistical models, evaluate each transaction in isolation and cannot detect fraud signals that propagate through the transaction network — for example, a clean customer transacting with a compromised merchant.
The Financial Fraud Training container addresses this gap by modeling the full transaction graph: entities such as accounts, merchants, devices, and terminals become nodes (the exact node types depend on the dataset); transactions become edges. The GNN aggregates multi-hop neighbourhood context for every transaction, enabling the downstream XGBoost classifier to leverage network-level fraud signals that tabular models cannot see. An optional LLM explanation layer translates the model's Shapley Value attributions into human-readable fraud narratives for analyst review.
1. Getting Started
Prerequisites
- NVIDIA NGC API key (generate one here)
- NVIDIA Driver 560.28.03 or newer
- NVIDIA Container Toolkit 1.15.0 or newer
Quick Setup
-
Authenticate with NGC. Log in to the NVIDIA container registry:
docker login nvcr.io # Username: $oauthtoken # Password: <your NGC API key>The username is always the literal string
$oauthtoken— this is not an environment variable. -
Pull the Docker image:
docker pull nvcr.io/nvidia/cugraph/financial-fraud-training:3.0.0 -
Run the training container:
mkdir -p /path/to/your/output docker run --rm --gpus all --shm-size=10g --ulimit memlock=-1 --ulimit stack=67108864 \ -v /path/to/your/graph/data:/data:ro \ -v /path/to/your/config.yaml:/workspace/config.yaml:ro \ -v /path/to/your/output:/workspace/output \ nvcr.io/nvidia/cugraph/financial-fraud-training:3.0.0Replace the volume paths with the actual locations of your graph data, config file, and output directory.
Command breakdown:
--gpus all— exposes all available GPUs to the container.--shm-size=10g— required for PyTorch shared-memory communication between worker processes.--ulimit memlock=-1 --ulimit stack=67108864— required for stable CUDA and NCCL operation.-v /path/to/your/graph/data:/data:ro— mounts your graph data directory (read-only).-v /path/to/your/config.yaml:/workspace/config.yaml:ro— mounts your training configuration file.-v /path/to/your/output:/workspace/output— mounts the directory where training artifacts, metrics, and Triton model files are written.
-
Serve the trained model with Triton:
NUM_GPUS=1 INSTANCES_PER_GPU=1 \ LLM_API_KEY="<your-api-key>" \ LLM_BASE_URL="https://inference-api.nvidia.com" \ LLM_MODEL="nvidia/meta/llama-3.2-1b-instruct" \ MODEL_REPO=/path/to/your/output/infer/triton/ \ bash /path/to/your/output/infer/serve.shThe
LLM_*variables are optional — omit them to serve without LLM explanation.NUM_GPUSandINSTANCES_PER_GPUcontrol horizontal scaling. -
Run the inference client:
OUTPUT=/path/to/your/output python "$OUTPUT/infer/client.py" \ --data_path /path/to/your/graph/data/test_gnn \ --model_config "$OUTPUT/infer/triton/gnn_embedder/1/model_config.json" \ --batch_size 512 \ --explain \ --explain_limit 10Remove
--explainand--explain_limitto score without LLM explanations.
For the full walkthrough — including data preparation, configuration, multi-GPU training, HPO, and inference — see the Getting Started Guide.
2. Documentation
For comprehensive documentation including configuration reference, data format specification, training, inference, and troubleshooting:
- Full Documentation: https://docs.nvidia.com/nim/financial-fraud-training/latest/index.html
3. System Requirements
Software Requirements
| Component | Minimum Version |
|---|---|
| Operating System | Ubuntu 20.04 or newer |
| NVIDIA Driver | 560.28.03 or newer |
| NVIDIA Container Toolkit | 1.15.0 or newer |
| Docker | 26 or newer |
Hardware Requirements
| Component | Requirement |
|---|---|
| GPU | 1× A6000, A100, H100, or newer (32 GB VRAM) |
| System Memory | 16 GB |
| Storage | 40 GB |
Multi-GPU is required for the default configuration (
gpu: multi,num_gpus: 2). Single-GPU runs are supported withgpu: singlein the config or-e NPROC=1at the Docker command line.
4. Key Features
| Feature | Description |
|---|---|
| Two-stage GNN + XGBoost | GNN produces dense transaction embeddings; XGBoost classifies them. Enables Shapley explainability and fast incremental retraining. |
| Multi-GPU / Multi-Node | Distributed training across any number of GPUs and nodes using PyTorch DDP, WholeGraph, and NCCL. Slurm support included. |
| Triton Inference Server | Training artifacts export directly as a Triton ensemble (fraud_pipeline). No manual model conversion required. |
| LLM Explainability | fraud_pipeline_explained ensemble adds Shapley Value Sampling and an OpenAI-compatible LLM to generate human-readable fraud explanations. |
| Hybrid Inference | Optional saved-embedding mode pre-computes GNN node embeddings at training time for low-latency memmap lookup at inference time, with automatic GNN fallback for novel nodes. |
| Node Prediction (NP) | Supports node-level fraud scoring (kind: GNN_XGBoost_NP) in addition to edge-level scoring (kind: GNN_XGBoost). |
| Large-Graph Support | XGBoost external memory modes (batched, extmem, memmap) for datasets that exceed GPU or CPU RAM. Parquet and ORC input formats supported. |
License
This container is licensed under the NVIDIA AI Product Agreement. By pulling and using this container, you accept the terms and conditions of this license.