MODULE 01 / PROBLEM CONTEXT & ACCURACY PARADOX

When fraud is rare,
accuracy isn't enough.

In large-scale e-commerce transaction streams, fraudulent payments represent less than 3.5% of volume. Standard classifiers achieve near-perfect accuracy by blindly predicting every charge as legitimate—while failing 100% of financial crime investigations.

Benchmark: IEEE-CIS Fraud Detection
Split Protocol: Stratified 60/20/20 (Seed 42)
Total Transactions: 590,540
Fraud Prevalence: 3.50% (1 : 27.6)
Primary Metric: Average Precision (PR-AUC)
Pedagogical DemonstrationHeld-Out Test Set (118,108 transactions)

Class distribution of the 118,108 held-out test transactions: exactly 113,976 legitimate purchases vs 4,132 confirmed fraudulent transactions.

Legitimate: 113,976
Fraudulent: 4,132
Select Classifier Strategy:
Raw Accuracy
96.50%

Extremely misleading metric.

Fraud Recall
0.00%

4,132 frauds completely missed.

Precision
0.00%

Zero fraud alerts generated.

The Paradox: Predicting every single transaction as non-fraud scores 96.5% accuracy on paper, but causes 100% financial fraud loss. That is why this thesis evaluates models using Average Precision (PR-AUC).
RESEARCH MODULES DIRECTORY

Explore Research by Focus Area

Each module provides focused interactive scientific tools, verified empirical data, and real-time computation.

MODULE 02 / METHODOLOGY ARCHITECTURE

Interactive Research Pipeline

Follow the 8 rigorous stages of the thesis methodology. Toggle between training and real-time inference workflows to inspect anti-leakage safeguards, latent manifold oversampling, and model scoring.

Active Workflow View:
Training Mode: Displays representation learning, latent manifold synthesis, and Optuna Bayesian optimization.
Data Preparation

Dataset Ingestion & Merging

Scope: Train, Validation, Test

Merge 590,540 e-commerce transaction records with identity verification tables on TransactionID.

Inputstrain_transaction.csv (393 features) + train_identity.csv (41 features)
OutputsCombined tabular dataframe (590,540 rows x 434 columns)
The IEEE-CIS dataset reflects real-world payment processing logs with severe class imbalance (3.5% fraud) and high missingness (many identity attributes missing when fraud prevention SDK was not triggered).
Anti-Leakage Protocol: Preprocessing parameters and model decisions are strictly isolated to prevent lookahead bias.
MODULE 03 / EXPERIMENTAL BENCHMARKS

Model Comparison Workbench

Comprehensive evaluation of all 6 experimental configurations on the 118,108 held-out test transactions. Average Precision (PR-AUC) serves as the primary metric, isolating the contribution of Autoencoder latent-space synthesis and Optuna Bayesian optimization.

Split: Held-Out Test (118,108 transactions)Primary: Average Precision (PR-AUC)
Scenario / MethodOversampling TechniquePR-AUC (AP)Δ vs BaseROC-AUCPrecisionRecallF1-ScoreThreshold
Baseline LightGBMNone0.810074—0.96635883.37%70.23%0.76240.73
Baseline + OptunaNone0.854378+0.044304 (+5.5%)0.96942891.29%72.58%0.80870.56
SMOTE + LightGBMSMOTE (Feature Space)0.824418+0.014344 (+1.8%)0.96662086.16%70.96%0.77820.23
SMOTE + OptunaSMOTE (Feature Space)0.854120+0.044046 (+5.4%)0.96905789.17%74.35%0.81090.14
AE Latent OversamplingProposedAutoencoder Latent Interpolation0.827153+0.017080 (+2.1%)0.96723187.17%70.52%0.77970.23
AE Latent + Optuna (Proposed)ProposedAutoencoder Latent Interpolation0.856187+0.046114 (+5.7%)0.97033489.91%73.77%0.81040.16
Visual PR-AUC ProgressionBaseline 0.810074 → Proposed 0.856187 (+5.69% relative gain)
Baseline LightGBM
0.8101
Baseline + Optuna
0.8544
SMOTE + LightGBM
0.8244
SMOTE + Optuna
0.8541
AE Latent Oversampling
0.8272
AE Latent + Optuna (Proposed)
0.8562
Interactive Coordinate Inspection

Precision-Recall & ROC Evaluation Curves

Hover or drag across curves to inspect dynamic decision threshold trade-offs on the 118,108 held-out test transactions.

1.00.50.00.00.51.0Recall (Coverage)Precision (Purity)τ = 0.16 (Optimal)

Autoencoder Sensitivity Grid (Validation Split)

Grid search across 4 latent dimensions and 5 target fraud rates using default LightGBM. Locked at latent_dim=8 and rate=10% (PR-AUC: 0.784424).

25,594 Synthetic Samples Generated
Latent Dim (Z) \ Target Rate10% Fraud15% Fraud20% Fraud30% Fraud50% Fraud
dim = 80.7844240.7843120.7821290.7820370.777077
dim = 160.7828060.7807270.7817840.7786840.776781
dim = 320.7836310.7832580.7799350.7787530.777079
dim = 640.7836880.7823990.7806700.7788450.778310

Research Finding: Compacting fraud features into 8 dimensions avoids noise in higher dimensions, while an oversampling target of 10% provides sufficient representation density without overwhelming normal payment transaction geometry.

MODULE 04 / DECISION THRESHOLD SCIENCE

Interactive Decision Threshold Explorer

In fraud prevention, raw model probability is not a binary decision. Explore how sliding the classification threshold navigates the critical operational trade-off between financial chargeback losses and customer checkout friction.

Active Decision Threshold (τ)
0.16★ Validation Optimal
Validation Split (118,108 tx)
0.01 (High Recall / More Alerts)0.50 (Default)0.99 (High Precision / Low Friction)
Operational Policy Presets:
Research Policy (τ = 0.16): Maximizes validation F1-score (0.8183). Intercepts 74.86% of fraud while maintaining 90.23% precision, generating alerts on only 2.90% of payment flow.
Scientific Provenance: Threshold τ = 0.16 was locked strictly on validation data to prevent test data snooping. Evaluated on the held-out test split, it yields 73.77% Recall and 89.91% Precision.

Dynamic Confusion Matrix

N = 118,108

Ground truth vs model predictions at active threshold τ.

Pred: Legitimate
Pred: Fraud
Actual Legit
True Negatives113,640Approved genuine
False Positives335Customer friction
Actual Fraud
False Negatives1,039Chargeback loss
True Positives3,094Fraud caught
Precision (Purity)
90.23%
Alert validity rate
Recall (Coverage)
74.86%
Fraud catch percentage
F1-Score
0.8183
Harmonic balance
Alerts Generated
3,429
2.90% of total volume
MODULE 05 / TRANSACTION INVESTIGATION & WASM INFERENCE

Transaction Investigation & WASM Simulator

Examine authentic evaluation cases with precomputed TreeSHAP force plots, or test arbitrary custom transaction attributes using the in-browser LightGBM WebAssembly inference engine.

Test Transactions (10)Select to inspect

Transaction #3184276

Actual Ground Truth: Confirmed Fraud

High-Velocity High-Value Fraud (True Positive)

Decision (τ = 0.16)True Positive
Model Risk Score Comparison:
AE Latent + Optuna
0.9018
Proposed Method
Baseline + Optuna
0.9834
No Oversampling
SMOTE + Optuna
0.8653
Feature SMOTE
Baseline Default
0.9435
Untuned Baseline
Authentic TreeSHAP EnsembleFeature Force Attribution Decomposition
Prior Base Value $E[f(x)]$: -8.8968
▲ Risk Escalators (Pushing to Fraud)
TransactionAmt = 300.0+1.10
D2 = 0.0+0.40
C13 = 1.0+0.38
C11 = 2.0+0.23
ae_latent_010 = 0.0+0.23
P_emaildomain = anonymous.com+0.22
▼ Trust Signals (Pulling to Legitimate)
card1 = 8607-1.45
card2 = 399.0-0.84
id_19 = 548.0-0.49
id_20 = 144.0-0.28
C1 = 1.0-0.22
Extracted Payment & Identity Features:
Transaction Amount$300.00 USD
Product CodeH
Card Network & TypeAmerican express (Credit)
Purchaser Email Domainanonymous.com
Device TypeDesktop
Client Software / OSWindows
Case Study Analysis: Elevated transaction amount with high velocity flags and anonymized email domain. Correctly intercepted by AE + LightGBM with extreme confidence (score > 0.85).
MODULE 06 / SCIENTIFIC RIGOR & LIMITATIONS

Methodology Notes & Constraints

Maintaining scientific fidelity is paramount. Below are the architectural justifications, mathematical rationale, and explicit limitations of the thesis research.

Architectural Role

Autoencoder is NOT an Inference-Time Detector

A common misconception in applied fraud detection is treating the Autoencoder reconstruction error as a live anomaly score. In this methodology, the undercomplete Autoencoder (432 → 128 → 64 → 8) is used strictly during offline training to construct a smooth, low-dimensional latent manifold for minority-class SMOTE interpolation. Real-time inference probability scores are computed exclusively by the fitted LightGBM classifier.

Anti-Leakage Safeguard

Strict Train-Only Preprocessing Fit

To prevent lookahead data leakage:

  • Categorical frequency tables for 49 IEEE-CIS features were computed solely from the 354,324 training rows.
  • Numerical median imputations for 383 features were fitted strictly on train data.
  • Z-score standardization means and standard deviations were derived exclusively from the training split and clipped to [-10, 10].
Evaluation Protocol

Why Average Precision (PR-AUC) is Primary

With 3.50% fraud prevalence, ROC-AUC gives an overly optimistic assessment because the large number of true negatives (113,976) depresses the False Positive Rate (FPR = FP / [FP + TN]). As proven by Davis & Goadrich (2006) and Saito & Rehmsmeier (2015), Precision-Recall AUC (Average Precision) directly isolates positive class trade-offs without dilution by the vast legitimate majority.

Known Research Limitations

Real-World Deployment Constraints

1. Concept Drift: The IEEE-CIS benchmark reflects historical transactions over a specific time window. Production fraud detection requires continuous model retraining and online drift detection.

2. Static Artifact Exclusions: Large serialized model binaries (.booster files) are deliberately excluded from public git versioning to maintain repository hygiene.

Reproduce on Kaggle with One Click

Run the locked script kaggle/ieee_final_oversampling_kaggle.py against the official IEEE-CIS competition input.

View Research Repository