Ahmed Doghri Logo Image
Ahmed Doghri

driftfilter

Deployment data moves while frozen classifiers stand still. driftfilter updates class prototypes forward-only and recovers 22.1 points of accuracy.

driftfilter reproduced benchmark result

The World Moved. The Classifier Did Not

Most deployment drift is not one dramatic domain jump. It arrives a little at a time until yesterday's decision boundary is quietly wrong.

driftfilter streams two classes through a gradual temporal shift. A frozen nearest-prototype classifier and an adaptive one see the exact same unlabeled sequence.

Adapt Forward, Without Backprop

The filtered model assigns each observation, then updates the winning prototype with a conservative exponential step. No labels, batches, gradients, or architecture changes are required.

That makes the tradeoff easy to inspect: adaptation can follow a moving population, but bad pseudo-labels can also move the wrong prototype. The test keeps both visible.

The Number

The frozen classifier finishes at 77.9% accuracy. Filtered prototypes reach 100%, a 22.1-point recovery under seeded gradual drift.

This is a two-dimensional stress test, not a universal TTA result. The complete stream reproduces in one command.

Research Basis

Inspired by TMLR's 2026 STAD paper. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Test-Time Adaptation
Distribution Shift
Online Learning
Prototype Models
unittest
GitHub Actions CI