Enterprise Financial Fraud Detection Platform
Detect suspicious financial transactions in real time using an XGBoost machine learning model trained on over 6.3 million PaySim transactions.
Transactions
Fraud Recall
ROC-AUC
Fill in the transaction above, or load a quick scenario, to see a live risk analysis with model explainability.
Loading live metrics from the APIโฆ
Fetching real analytics from GET /model/infoโฆ
FraudShield AI is an enterprise-inspired financial fraud detection platform developed using Python, FastAPI, XGBoost, and modern web technologies.
The system analyzes financial transactions in real time using an XGBoost machine learning model trained on 6.3 million+ PaySim transactions, generating fraud probability, confidence scores, risk levels, and explainable insights within milliseconds.
It combines machine learning with an interactive dashboard to help analysts identify suspicious transactions through intelligent risk scoring, interpretable explanations, and business-friendly recommendations.
Every transaction moves through the same five-stage pipeline, end to end in under 100ms:
Transaction submitted via API
10 features engineered (log-scaled balances, drain & anomaly flags, ratios)
XGBoost scores fraud probability
Risk level assigned (Low โ Critical)
A rule-based engine writes a plain-English summary
The current model is trained on the synthetic PaySim dataset, which mimics real transaction patterns but isn't real financial data โ accuracy numbers here reflect performance on synthetic fraud, not a production population.
Planned next steps:
The debugging and design decisions behind this model โ not just the finished pipeline.
0.9999 ROC-AUC.
The cause: PaySim's fraud rows always drain the origin account to exactly zero,
and the original feature set included newbalanceOrig /
newbalanceDest โ the account balances after the transaction.
The model wasn't learning fraud patterns, it was reading the answer off
post-transaction state that wouldn't exist at approval time in a real system.
Both fields were dropped entirely.
would_drain_orig replaced the
leaky balance fields โ computed as oldbalanceOrg โ amount, which is
known before a transaction is approved. Same underlying idea
(does this transaction empty the sender's account), none of the leakage.
would_drain_orig alone ended up carrying 57% of feature importance โ
above the pipeline's own automated 40% dominance warning. Rather than trust that,
a verification script cross-tabbed it against the real outcome on the full dataset:
0.9997 ROC-AUC figure that quietly
went stale the moment the leaky features were removed. train.py now
writes real metrics to models/metrics.json on every run โ precision,
recall, F1, the confusion matrix, feature importance, even the ROC/PR curve points
โ and GET /model/info serves that file directly, so what's shown here
can't drift out of sync with what's actually deployed.
pred_contribs, no extra
dependency needed). They're shown as distinct panels on purpose: the rules are
fast, deterministic sanity checks; SHAP is what the model itself actually weighed
for that specific transaction. Collapsing them into one explanation would hide
which kind of "why" you're looking at.
0.984, chosen by max-F1 on the
precision-recall curve. A cost-weighted alternative (~0.66) is also
computed on every training run, using a simulated cost of 5 for a false positive
and 100 for a missed fraud โ illustrative numbers picked to demonstrate the
mechanism, not figures calibrated against any real review cost or fraud-loss
data. Swapping between the two is a one-line config change
(THRESHOLD_STRATEGY), deliberately left as an explicit decision
rather than silently auto-selected โ and a real deployment would replace the cost
constants with real numbers before switching to it.
model_version โ a short
SHA-256 of the deployed model file โ so it always reflects exactly which weights
produced that score, and can't silently drift out of sync the way a manually
bumped version string could. An append-only model_registry.jsonl
keeps the last several training runs (version, metrics, row counts, timestamp),
giving basic rollback / A-B comparison without standing up a database.
B.Tech Computer Science Engineering
AI โข Machine Learning โข Full Stack Development
FraudShield AI is an intelligent fraud detection platform that analyzes financial transactions in real time using Machine Learning to identify suspicious activities and improve financial security.
โ Built on the PaySim financial transaction dataset (6.3M+ records)
โ Real-time fraud prediction using XGBoost
โ Automated, rule-based transaction explanations
โ REST API powered by FastAPI
โ Modern responsive frontend using HTML, CSS & JavaScript