Anomaly detection is the identification of observations that differ markedly from the rest of a dataset or from an expected pattern. It marks values, records or events for review. It does not decide whether a flagged item is an error, a fraud or a genuine change.
Also called: outlier detection · anomaly analysis
What it is
Anomaly detection is the search for observations that stand apart from the rest of a dataset, or from the pattern a model expects. Statisticians call such points outliers. The result is a list of flagged items for a person to examine, not a verdict.
A flagged item can be a data error, a process failure, a misconduct signal or a real but unusual event. The cause is established afterwards, by root cause analysis.
Three kinds of anomaly are usual in textbooks:
Point anomaly: a single value far from the others, such as one very large payment.
Contextual anomaly: a value that is normal in general but unusual in its context, such as a high balance in a month when the account is normally quiet.
Collective anomaly: a group of values that are each ordinary but unusual together, such as a run of identical amounts.
Rule-based checks compare a value with a fixed limit. Statistical methods measure distance from the centre of the data. Model-based methods flag large gaps between a value and its prediction. Clustering, density and isolation methods, from the family of machine learning models, score how isolated a record is.
A common statistical score is the z-score:
z = (x - m) / s
Here x is the observed value, m is the mean of the comparison data and s is its standard deviation. The analyst chooses the threshold of |z| above which a value is flagged.
Why it matters
Large datasets cannot be read line by line. Anomaly detection reduces them to a short list for review.
The ECB has published a method for automated outlier detection in high-dimensional supervisory data. The BIS report on the governance of AI in central banks lists anomaly detection among use cases, including data quality and incorrect reporting.
Too low a threshold floods reviewers with false alerts. Too high a threshold lets real errors through. The threshold is a judgement about the cost of each type of miss.
Worked example
Illustrative numbers. Daily payment totals over a period have a mean of 200 and a standard deviation of 20, in thousands of euro. The analyst flags any day with |z| above 3.
A day of 230 gives z = (230 - 200) / 20 = 1.5. It is not flagged.
A day of 320 gives z = (320 - 200) / 20 = 6. It is flagged.
The reviewer checks the flagged day against the source system. The cause may be a duplicated file, a genuine large settlement or a missing decimal point. Only the check decides which.
How to read it
A high score means the value is far from the comparison data. It does not say why. Earlier errors in the comparison data distort the mean and standard deviation and can mask real anomalies.
Assumptions
The comparison data describe normal behaviour well enough to serve as a baseline.
The z-score works best when the data are roughly symmetric around the mean. Skewed data call for other measures.
Who uses it
Data analysts and business intelligence analysts run detection on datasets before reports are issued and pass flagged items to the data owner.
Fraud analysts review flagged transactions and decide which go to investigation (see fraud detection).
Regulatory reporting analysts check figures against prior periods and peers before submission, as part of data quality controls.
Statisticians design the methods and set the thresholds.
Controllers scan ledger postings and expense lines for unusual items before the period is closed.
Common confusions
An anomaly is not an error. Many flagged items are valid, rare events.
Anomaly detection and transaction monitoring overlap but differ. Monitoring applies scenarios and rules to customer activity for a stated purpose. Detection is the general technique and can also serve as one monitoring method.
Anomaly detection and variance analysis both look for gaps. Variance analysis compares results with a budget or forecast, while detection compares an item with the pattern of the data.
A machine learning method is not required. A fixed limit or a z-score is anomaly detection too.
Data qualityData quality is the fitness of data for its intended use.
Fraud detectionFraud detection is the set of checks that find suspected fraud after a transaction, claim or account action has started, using rules, statistical models…
Transaction monitoringTransaction monitoring is the ongoing review of customer transactions, usually with rule-based or statistical systems, to detect activity that is unusual…
Root cause analysisRoot cause analysis is a structured method for finding the underlying reason a problem or incident occurred, beyond its visible symptoms.
Machine learning modelA machine learning model is a mathematical function whose parameters are learned from historical data, so that it can predict or classify unseen cases…
Variance analysisVariance analysis explains the difference between actual results and budget, forecast or prior period, splitting it into drivers such as price, volume…
Data quality ruleA data quality rule is an automated test that checks data against a stated expectation, for example that a maturity date falls after the trade date or…
FraudFraud is deliberate deception carried out to gain money or another advantage at someone else's expense. In finance it covers payment fraud, application fraud, internal fraud and investment scams, and firms handle it through prevention, detection and investigation controls.
Root cause analysisRoot cause analysis is a structured method for finding the underlying reason a problem or incident occurred, beyond its visible symptoms. It uses tools such as the five whys and fishbone diagrams. Removing the root cause aims to stop the problem from recurring.
Threshold (collateral)In a collateral agreement, the threshold is the amount of exposure one party accepts to leave uncollateralised. Collateral is called only for the exposure above it. A threshold of zero means the whole exposure is covered.
European Central Bank (ECB)The European Central Bank (ECB) is the central bank of the euro. With the national central banks of the euro-area countries it forms the Eurosystem, which sets monetary policy to keep prices stable. The ECB also supervises euro-area banks through the Single Supervisory Mechanism.
Corporate governanceCorporate governance is the system by which a company is directed and controlled. It sets the roles of the board, management and shareholders, and the arrangements for oversight, remuneration, internal control and disclosure.
Central bankA central bank is the public institution that issues a currency, sets monetary policy and operates the accounts on which banks settle payments with each other. Money held at the central bank is called central bank money. Money held at a commercial bank is a claim on that bank.
Data qualityData quality is the fitness of data for its intended use. It is assessed through dimensions such as accuracy, completeness, consistency, timeliness, validity and uniqueness, and it is kept up by controls that check the data and by owners who fix the causes of errors.
SettlementSettlement is the completion of a trade: the seller delivers the asset, the buyer pays, and ownership passes. In securities markets it takes place by book entry, in a central securities depository, on the intended settlement date.
BaselineA baseline is a fixed reference point, such as an approved budget, cost level or plan, against which later results are compared. Savings, variances and progress are measured as the difference from the baseline.
Business intelligence (BI)Business intelligence is the set of methods and tools that turn an organisation's data into reports, dashboards and analyses that support decisions. It draws on stored, cleaned data, usually from a data warehouse, and presents measures such as sales, cost, risk or service levels.
Data ownerA data owner is the senior business person accountable for a defined set of data: its definition, quality standards, access rules and fitness for use. The owner approves changes and sets remediation priorities, while data stewards usually do the day-to-day work.
Fraud detectionFraud detection is the set of checks that find suspected fraud after a transaction, claim or account action has started, using rules, statistical models and manual review. It flags cases for investigation and does not prove fraud on its own.
Regulatory reportingRegulatory reporting is the routine submission of standardised data by financial firms to supervisors and market authorities. The data covers capital, liquidity, financial statements, transactions and conduct, and lets authorities monitor firms and markets.
Transaction monitoringTransaction monitoring is the ongoing review of customer transactions, usually with rule-based or statistical systems, to detect activity that is unusual for the customer's profile and may indicate money laundering, terrorist financing or fraud. Alerts are investigated and, if suspicion remains, reported to the FIU.
Variance analysisVariance analysis explains the difference between actual results and budget, forecast or prior period, splitting it into drivers such as price, volume and mix. Each variance is labelled favourable or adverse and backed by commentary for management.
Forecast (rolling forecast)A forecast is an estimate of results for the rest of a period, revised as actual results arrive. A rolling forecast always covers a fixed span ahead and drops each completed month while adding a further one at the far end. It is usually built from drivers such as volumes, prices and headcount.