← Lectures·L9

Outlier Detection: Isolation Forests and the Local Outlier Factor

Prof. Dr. David B. Blumenthal · 6 concepts · 10 questions

Concept 1 / 6

The What, Why, and Types of Outliers

Outlier detection is the process of identifying data points that deviate from normal data. The hard part is the key question: what counts as 'normal'? Depending on the data, different notions of outlierness apply — e.g. deviation from the center, or deviation from a trend.


Sources of outliers:

  • Errors in data collection or entry
  • Rare but important events (fraud, system failures)
  • Novel or emerging patterns

Why it matters:

  • Noise removal — strip out outliers caused by noise or technical errors before analysis → better data quality and more robust results.
  • Early detection of critical issues — fraud detection, quality control, cybersecurity, healthcare, finance.

Types of outliers:


TypeDefinitionExample
PointA single instance differs from the restSudden temperature spike
ContextualAnomalous only in a specific contextWarm winter day
CollectiveA group of related points jointly deviateSequence of unusual logins

Global vs. local: a global outlier deviates significantly from the entire dataset; a local outlier deviates only within its neighborhood/cluster and may look perfectly normal globally.


Challenges: curse of dimensionality (distances lose meaning in high dimensions); differing feature scales (need normalization) and within-class variability; noise and missing values; and no clear definition of 'normal', which can drift over time (concept drift).


Four families of detection techniques:


FamilyCore ideaExample
StatisticalAssume a distribution (e.g. Gaussian); flag low-probability pointsZ-scores
Distance-basedOutliers lie far from their nearest neighborskk-NN
Density-basedOutliers lie in low-density regions vs. neighborsLOF
Model-basedBuild a model; outliers fit poorly or deviate from learned behaviorIsolation forests, autoencoders, regression