Crate datasynth_banking

Crate datasynth_banking 

Source
Expand description

§synth-banking

KYC/AML banking transaction generator for synthetic data.

This crate provides comprehensive banking transaction simulation for:

  • Compliance testing and model training
  • AML/fraud detection system evaluation
  • KYC process simulation
  • Regulatory reporting testing

§Features

  • Customer Generation: Retail, business, and trust customers with realistic KYC profiles
  • Account Generation: Multiple account types with proper feature sets
  • Transaction Engine: Persona-based transaction generation with causal drivers
  • AML Typologies: Structuring, funnel accounts, layering, mule networks, and more
  • Ground Truth Labels: Multi-level labels for ML training
  • Spoofing Mode: Adversarial transaction generation for robustness testing

§Architecture

The crate follows a layered architecture:

BankingOrchestrator (orchestration)
        ↓
Generators (customer, account, transaction, counterparty)
        ↓
Typologies (AML pattern injection)
        ↓
Labels (ground truth generation)
        ↓
Models (customer, account, transaction, KYC)

§Usage

use datasynth_banking::{BankingOrchestrator, BankingConfig};

let config = BankingConfig::default();
let mut orchestrator = BankingOrchestrator::new(config, 12345);

// Generate customers and accounts
let customers = orchestrator.generate_customers();
let accounts = orchestrator.generate_accounts(&customers);

// Generate transaction stream
let transactions = orchestrator.generate_transactions(&accounts);

Re-exports§

pub use models::BankAccount;
pub use models::BankTransaction;
pub use models::BankingCustomer;
pub use models::CounterpartyPool;
pub use models::KycProfile;

Modules§

generators
Generators for banking synthetic data.
labels
Ground truth label generation module.
models
Banking-specific models for KYC/AML synthetic data generation.
personas
Behavioral persona blueprints module.
typologies
AML typology injection module.

Structs§

BankingConfig
Configuration for banking data generation.
BankingData
Generated banking data result.
BankingOrchestrator
Banking data generation orchestrator.
BankingOrchestratorBuilder
Builder for BankingOrchestrator.
BankingOutputConfig
Banking output configuration.
ComplianceConfig
Compliance configuration.
GenerationStats
Generation statistics.
MerchantCategoryCode
Merchant Category Code (MCC) classification.
PopulationConfig
Population configuration.
ProductConfig
Product configuration.
SophisticationDistribution
Sophistication level distribution.
SpoofingConfig
Spoofing (adversarial) configuration.
TypologyConfig
AML typology configuration.

Enums§

AmlTypology
AML typology classification.
BankAccountType
Type of bank account.
BankingCustomerType
Type of banking customer.
Direction
Transaction direction.
LaunderingStage
Money laundering stage.
RiskAppetite
Risk appetite level.
RiskTier
Customer risk tier for KYC purposes.
Sophistication
Sophistication level of the AML pattern.
TransactionCategory
Transaction category for behavioral analysis.
TransactionChannel
Transaction channel (how the transaction was initiated).