Machine learning fraud detection uses models trained on past transactions to score each new payment, login or account application for risk in real time. The models learn what normal behaviour looks like for a customer, a device or a merchant. They then flag activity that departs from it, so a bank or retailer can approve, challenge or block the transaction before money leaves the account.
The Bank of England and Financial Conduct Authority survey published in November 2024 found that 75 per cent of the firms questioned were using AI. Fraud detection was the third most common use, with 33 per cent of respondents applying AI to it. This guide explains how machine learning fraud models work, why rare fraud makes them hard to measure and where they are used. It also covers generative AI threats and the UK and EU rules on automated fraud decisions.
Table of Contents
How Machine Learning Fraud Detection Works
Most production systems combine several model types rather than relying on one. Each type answers a different question about a transaction, and the three families below appear in almost every machine learning fraud setup.
Supervised Models Learn from Confirmed Fraud
Supervised learning trains a model on historical transactions that already carry a label, either genuine or fraudulent. The labels usually come from chargebacks, customer fraud claims and decisions made by fraud analysts. Gradient boosted trees such as XGBoost and LightGBM are widely used on payment data, because they handle mixed features well and train quickly.
The weakness is that a supervised model can only recognise patterns it has already seen. A new scam with no labelled examples may score as low risk until confirmed cases reach retraining, so supervised models rarely work alone.
Unsupervised Models Flag Behaviour That Looks Unusual
Unsupervised and semi-supervised methods do not need fraud labels. Isolation forests, one-class support vector machines and autoencoders learn the shape of normal activity and measure how far a new event sits from it. Take a customer who has only ever paid household bills from a phone in Belfast. A sudden 3am transfer to an overseas exchange from a new laptop would produce a high anomaly score.
These models help against zero-day fraud, meaning attacks nobody has seen before. They also raise more false alarms, because unusual behaviour such as a holiday purchase is often innocent. Anomaly scores often feed a supervised model as extra features rather than triggering blocks directly.
Graph Models Expose Mule Networks and Fraud Rings
Graph machine learning treats accounts, devices, phone numbers, IP addresses and payees as nodes, with payments and shared details as the links between them. Graph neural networks learn from the structure of those connections as well as from the details of each payment. Organised fraud is rarely a lone transaction, and money mule networks move stolen funds through chains of accounts that each look ordinary in isolation.
A graph model can surface a cluster of accounts that share devices or receive money from the same victims within hours. Our guide to the different types of hackers covers the organised groups that often sit behind these networks. Similar relationship analysis protects corporate systems too, as our explainer on machine learning in network security describes.
Why Rule-Based Systems Struggle on Their Own
Rules engines were the first generation of automated fraud control, and many banks still run them alongside machine learning. A rule that declines card payments over £1,000 from a new country is simple to write and simple to explain to a regulator.
Their weakness is rigidity. Fraudsters probe fixed thresholds and then stay beneath them, while each new rule adds false declines for genuine customers who happen to match it. Machine learning fraud models score hundreds of signals at once and reweight them at each retraining, so they cope better with shifting criminal behaviour. The table below compares the four main approaches.
| Approach | How it detects fraud | Handles new attack types | Ease of explanation | Best used for |
|---|---|---|---|---|
| Rules engine | Fixed conditions written by analysts | Poorly | Very easy | Hard policy limits |
| Supervised model | Learns from labelled past fraud | Weak until retrained | Moderate, with reason codes | High-volume payment scoring |
| Unsupervised anomaly detection | Measures distance from normal behaviour | Well | Harder | Spotting new patterns |
| Graph neural network | Analyses links between accounts and devices | Well for organised groups | Hardest | Mule account and fraud ring detection |
Inside a Real-Time Fraud Scoring Pipeline
A card payment or Faster Payment must clear within the few seconds a customer will wait, and fraud scoring takes only part of that time. A typical pipeline moves through feature building, scoring and a fallback plan, each covered below.
Features Built from Devices, Behaviour and Velocity
The raw transaction tells a model very little on its own. The value comes from features built around it, such as the number of payments the card made in the last hour. These calculations draw on a feature store, which is a database of precomputed customer and device histories that can be read in milliseconds.
Typing rhythm, phone angle and the way a user moves between screens can separate a genuine customer from someone using stolen details. Stolen or reused credentials remain a common route into account takeover. Strong, unique passwords still cut the number of attacks a model has to catch.
Scoring, Thresholds and Step-Up Checks
The model returns a risk score, and the business sets thresholds that turn that score into an action. Low scores pass through untouched and high scores are declined. The middle band triggers a step-up check, such as a one-time passcode or a confirmation prompt in the banking app. Where those thresholds sit is a commercial decision as much as a technical one, because each setting trades fraud losses against customer friction.
Fallbacks When a Model Fails
Production systems need a plan for the moment a model times out or a data feed breaks. A common safeguard is a simplified rule set that takes over automatically, so payments continue to flow while engineers fix the fault. Teams also watch for model drift, the slow loss of accuracy as customer habits and criminal tactics change, and retrain on fresh data.
The Class Imbalance Problem in Machine Learning Fraud
Fraud is rare compared with genuine activity, and that imbalance shapes almost every design decision in a machine learning fraud system. It affects how models are trained, how they are measured and where their thresholds are set.
Why Accuracy Is a Misleading Measure
A widely used public research dataset shows the scale of the problem. It holds 284,807 card transactions made by European cardholders over two days in September 2013. Only 492 of them, or 0.172 per cent, were fraudulent. A model that labelled every transaction as genuine would be more than 99.8 per cent accurate and would catch no fraud at all.
The researchers who released the dataset recommend measuring performance with the area under the precision-recall curve instead of accuracy. Precision tells you what share of flagged transactions were really fraud. Recall tells you what share of all fraud the model caught.
Resampling and Cost-Sensitive Training
Data scientists use two broad remedies for imbalanced data. Resampling changes the training data, either by removing some genuine examples or by creating synthetic fraud cases with techniques such as SMOTE. Cost-sensitive training leaves the data alone and tells the algorithm that a missed fraud costs far more than a flagged genuine payment. Class weights and loss functions such as focal loss are the usual ways to do this.
Synthetic samples can teach a model patterns that do not exist in real fraud, while heavy class weights can push false positives up sharply. Testing both against a held-out set of recent transactions is the sensible way to choose between them.
Precision, Recall and the Cost of False Declines
Every threshold choice moves precision and recall in opposite directions. Lowering the threshold catches more fraud, but it also blocks more genuine customers, and a declined card at checkout can mean a lost sale.
The better method is to set thresholds with a cost model that puts a money value on each outcome. A missed fraud carries the loss itself plus any reimbursement liability, while a false decline carries lost revenue and the risk of the customer leaving. Under the UK’s mandatory reimbursement rules, the cost of a missed scam now falls directly on payment firms, which moves where that balance sits.
Where Machine Learning Fraud Detection Is Used
The same core techniques appear in very different sectors, with the features and the cost model adjusted to each fraud type. Three areas show the range of machine learning fraud work across the UK and Ireland.
Card Payments and Online Shopping
Card-not-present fraud, where criminals use stolen card details online, is one of the longest-established uses of machine learning in payments. Card schemes, issuing banks and payment gateways each run their own models on the same purchase. Retailers also apply models to refund abuse and to chargeback fraud, where a customer falsely claims an order never arrived. Card details are often harvested through phishing in the first place, and our email phishing scams statistics show how large that channel remains.
Authorised Push Payment Scams
Authorised push payment (APP) fraud differs from card fraud because the genuine customer makes the payment after being deceived. Since 7 October 2024, the Payment Systems Regulator (PSR) has required UK payment firms to reimburse most victims of Faster Payments APP scams. The limit is £85,000 per claim, and sending and receiving firms share each cost equally.
That rule changed what machine learning fraud models look for. A model now has to recognise a real customer acting under pressure from social engineering attacks, as well as spotting stolen credentials. Useful signals include a newly added payee, a first payment far larger than usual, or a customer who dismisses repeated scam warnings in the app. Receiving banks run their own models to find mule accounts that suddenly collect payments from unconnected people.
Frontier Economics published an independent evaluation for the PSR on 1 July 2026. It estimated that APP fraud losses over Faster Payments fell by around 21 per cent, or roughly £73 million a year. Firms spent between £44 million and £56 million a year on costs outside reimbursement, mostly fraud detection and prevention. The PSR reimbursement dashboard for January to March 2026 showed 88 per cent of in-scope scam losses returned since the rules began. Presenting the evaluation, PSR managing director David Geale said that “APP reimbursement is working”.
Gaming, Bonus Abuse and Buy Now, Pay Later
Online gambling operators use machine learning to detect bonus abuse, where one person opens many accounts to claim sign-up offers repeatedly. Device fingerprinting and graph analysis link accounts that share hardware, payment cards or addresses. Buy now, pay later providers face a related problem with synthetic and stolen identities used for purchases that are never repaid.
Generative AI and the New Identity Fraud Threat
Generative AI has handed fraudsters cheap tools for producing fake faces, voices and documents. The onboarding stage is hit hardest, because that is where a bank or app has to decide whether a new customer is a real person.
Deepfakes and Injection Attacks at Onboarding
Entrust’s 2026 Identity Fraud Report, published in November 2025, drew on more than a billion identity verifications across 195 countries. It linked deepfakes to around one in five biometric fraud attempts. Injection attacks, which feed a fake image or video straight into the verification system, rose by 40 per cent in a year. Digital forgeries made up 35 per cent of document fraud attempts.
These attacks worry machine learning fraud teams because a convincing synthetic identity passes the first checks and then behaves like a normal customer for weeks. The account may later act as a mule or borrow money that is never repaid. Our identity theft statistics show how often stolen personal data feeds these schemes. Our guide to deepfake technology threats covers business impersonation scams.
How Defensive Models Respond
Defensive systems now combine several detectors rather than trusting a single liveness check. Computer vision models look for artefacts in faces and documents. Separate models check whether the camera feed comes from a genuine device or a virtual camera. Behavioural and graph signals then follow the account after onboarding. A synthetic identity that slips through can still be caught once it receives money from known victims. The strongest setups treat identity as a risk score that keeps updating.
Explainability and UK and EU Rules
A fraud model that freezes an account or blocks a payment affects a real person, and regulators expect firms to explain those decisions. That expectation shapes which models a bank can deploy and how it records their outputs.
SHAP Values, LIME and Reason Codes
Explainable AI tools translate a model’s score into the features that drove it. SHAP values give each feature a measured contribution to a specific decision. They might show, for example, that a new device and an unusual payee together pushed a payment into the high-risk band. LIME builds a simple local model around a single prediction to approximate the same reasoning. Fraud analysts use these outputs to review flagged cases quickly, and firms keep them as an audit trail.
Consumer Duty, UK GDPR and the EU AI Act
Three sets of rules apply to machine learning fraud decisions that affect UK and Irish customers. The FCA’s Consumer Duty has applied since 31 July 2023 and requires good outcomes for retail customers, which covers unfair blocks and delays. Under the Data (Use and Access) Act 2025, new Articles 22A to 22D of the UK GDPR have governed automated decision-making since 5 February 2026. Where a solely automated decision has a significant effect, the person must be told and must be able to ask for human review.
The EU AI Act, which applies to firms serving customers in the Republic of Ireland, takes a narrower view of fraud than many guides suggest. Annex III lists credit scoring of individuals as high-risk but expressly excludes AI systems used to detect financial fraud. That exclusion holds only where fraud detection is the main purpose, so a model that also feeds lending decisions may lose it. The Digital Omnibus on AI, in force since 27 July 2026, moved the start of the high-risk obligations to 2 December 2027.
Skills and Certification for Machine Learning Fraud Work
Search interest in machine learning fraud certification reflects a career path that sits between data science and financial crime. Most practitioners pair a fraud qualification, such as the Certified Fraud Examiner credential, with data science training in Python and statistics. A portfolio project built on the public credit card dataset, with the class imbalance handled properly, shows those skills in practice.
Reporting Suspected Fraud in the UK and Ireland
If you think you have been scammed, call your bank straight away on the number printed on your card. Fast reporting gives the receiving bank a chance to freeze the money before it moves on.
In England, Wales and Northern Ireland, report the crime to Report Fraud, the national fraud and cybercrime reporting service. In Scotland, contact Police Scotland on 101, and in the Republic of Ireland, report it at your local Garda station. Organisations running machine learning fraud models should review their thresholds, fallback rules and explanation records now. The PSR consultation is due in December 2026, and EU AI Act high-risk duties start on 2 December 2027.
Frequently Asked Questions
The answers below cover common questions about machine learning fraud detection. They range from real-time scoring to algorithm choice and the EU rules.
How does machine learning detect fraud in real time?
When a payment is made, the system gathers features about the customer, device and payee from stored histories and passes them to a trained model. The model returns a risk score within milliseconds. Preset thresholds then decide whether to approve, challenge or decline the payment.
What is the best machine learning algorithm for fraud detection?
No single algorithm suits every type of fraud. Gradient boosted trees such as XGBoost are a strong default for scoring payments. Anomaly detection helps with new attack patterns, and graph neural networks suit mule networks and fraud rings.
What is the difference between rule-based and machine learning fraud detection?
Rule-based systems apply fixed conditions that analysts write by hand, such as spending limits. Machine learning models learn patterns from historical data and weigh hundreds of signals together. The two are often combined, with rules covering hard limits and models handling the risk score.
How do fraud models handle class imbalance?
Fraud is usually a tiny fraction of all transactions, so teams train models with resampling methods such as SMOTE or with cost-sensitive methods. These penalise a missed fraud more heavily than a false alarm. Performance is then measured with precision and recall rather than accuracy.
Can machine learning cut false positives without missing more fraud?
Better features and models can improve both measures at once, up to a point. Beyond that point, any threshold change trades one against the other. Firms set thresholds with a cost model that weighs fraud losses, reimbursement liability and revenue lost to false declines.
Is fraud detection classed as high-risk AI under the EU AI Act?
The Act excludes AI systems used to detect financial fraud from its high-risk credit scoring category. A model that also informs lending decisions may still fall within that category.