Visualizing Outlier Detection using Deep Isolation Forest

Interactive Streaming Outlier Detection with Deep Isolation Forest (DIF)

Master Project: interactive, web-based monitoring of outliers in streaming data with Deep Isolation Forest (DIF) and human-in-the-loop refinement.

Project information

  • Category: Deep Learning, Outlier Detection
  • Project date: Mar 2023
  • System: Streaming outlier detection + monitoring + human feedback (semi-supervised DIF)
  • Backend API: Flask (CORS)
  • Datasets: HR diagram (binary); arXiv UMAP (categorical); generated variants

Overview

This Master Project implements an interactive, web-based system to detect and monitor outliers in streaming data using Deep Isolation Forest (DIF), and to improve the quality of outlier decisions over time via human-in-the-loop feedback (a semi-supervised DIF workflow).

The core idea is to run DIF continuously on a stream represented as moving windows (“frames”), visualize inliers/outliers in the UI, and allow analysts to adjust parameters and correct labels (add/delete/relabel points). Those edits are fed back into subsequent runs, so the system becomes progressively better aligned with the user’s definition of “outlier”.

Frontend

The frontend is an interactive dashboard built with React + D3 designed specifically for streaming workflows and iterative inspection. It supports:

  • Dataset selection (e.g., HR diagram; arXiv UMAP with categories; generated variants).
  • Streaming controls (frames/windowing, batch size, history/process controls).
  • Parameter tuning (thresholding modes and sensitivity controls).
  • Human feedback: select points and flip labels, delete points, add new points; filter views by inlier/outlier state.
  • Exploration UX: selection workflows (including lasso/area selection in relevant views) to support rapid triage.

Technologies

  • Frontend: React, D3.js
  • Backend: Flask, Python
  • Algorithm: Deep Isolation Forest (DIF)

View Source Code Back to Projects

Problem

Streaming anomaly detection drifts when thresholds, feedback, and operator judgment are disconnected from the model loop.

Mechanism

Deep Isolation Forest scoring runs over moving windows, while the UI supports parameter tuning and human feedback.

What It Proves

Monitoring gets stronger when human corrections are part of the operating workflow, not a separate annotation chore.

Engagement Relevance

Demonstrates operator-loop design for model monitoring, which maps cleanly to agent trace review and drift workflows.

CTA

Use this as technical proof while reviewing reliability engagement options.

Request a fit call

How It Works (End-to-End)

The system is implemented as a React client and a Flask backend centered around a backend API endpoint used to retrieve streaming results and submit user feedback. The backend maintains a rolling notion of stream state (batch size, number of batches/frames, and a last-index pointer), trains DIF on a recent window, scores a subsequent window, and returns predictions and labels for visualization.

  • Streaming windows (“frames”): the backend runs DIF on a moving training window and scores a test window to emulate streaming arrival.
  • Outlier labeling: the system supports fixed thresholding and a relative rule (e.g., max(score) - score < 0.06) derived from the current score distribution.
  • Semi-supervised DIF feedback: the frontend can send edits (relabel, delete, add points); the backend incorporates these edits so later iterations improve.
  • Categorical streams: for the arXiv UMAP dataset, the backend can maintain one DIF model per category and merge results back into the unified stream.

Engineering Notes

  • Backend variants: multiple milestones exist; the most complete backend consolidates streaming state + edit handling + category-aware modeling.
  • DIF dependency: the DIF algorithm itself is imported from an external module (this codebase integrates DIF, but does not implement DIF from scratch).
  • Iterative product design: earlier prototypes explore different streaming/control-panel patterns, culminating in a “process/history” interaction model.
  • Evaluation: additional experiments compare DIF against classical detectors (e.g., EIF, iForest, LOF, KNN) using static evaluation workflows.

Why This Project Matters

Outlier detection in real environments is rarely a one-shot batch job: thresholds drift, definitions vary by operator, and feedback matters. This project demonstrates a practical approach to operational outlier monitoring—combining a strong detector (DIF), streaming-oriented UX, and feedback loops to continuously align the system with human judgment.