Greedy sampling produces a compact yet representative summary of normal data, which is essential for reliable anomaly detection that relies on measuring distance from normality. For continual anomaly detection where tasks arrive sequentially, extending greedy sampling is straightforward with unbounded memory through coreset accumulation. However, practical deployment requires fixed memory where the coreset size remains constant regardless of task count. We observe that continued greedy sampling, which iteratively applies greedy selection over previously greedy-sampled sets, effectively preserves representativeness under strict memory limits. Despite discarding data at each step to satisfy the memory constraint, coreset quality degrades gracefully rather than catastrophically, enabling reliable anomaly detection across the tasks. We provide theoretical justification by showing that the resulting greedy-continued coreset approximates the oracle coreset within a bounded gap. We instantiate this principle in ContCore, which constructs a greedy-continued coreset through greedy expansion followed by greedy consolidation to enforce the memory budget. Unlike neural methods susceptible to catastrophic forgetting or naive coreset accumulation requiring unbounded memory, ContCore maintains fixed memory with theoretical guarantees. Empirically, ContCore achieves state-of-the-art performance across 11 task schedules on MVTecAD and VisA, and extends effectively to online continual AD settings where prior methods degrade significantly.
Unsupervised anomaly detection scores a test sample by how far it lies from a model of normality, so the quality of that model decides everything. In deployment, new product classes keep arriving — without labels, and usually without any way to revisit the data from earlier tasks.
Naively adapting a network to each new task causes catastrophic forgetting. Dedicated continual AD methods do not remove that problem so much as move it around:
Coreset-based AD sidesteps forgetting entirely: there is no network to overwrite, so a new task is simply new features added to memory. The catch is that memory then grows with the number of tasks $T$, while real deployment fixes a budget $m$.
The question this paper answers: can a coreset held at a fixed size $m$ preserve the representativeness of the unbounded one?
Baselines degrade as classes accumulate on MVTecAD; ContCore stays flat on both the $1\times15$ and $10-1\times5$ schedules.
Greedy sampling $\Gcal_n$ repeatedly collects the point that is maximally distant from everything selected so far, producing a compact yet representative coreset. We extend it with a base set $B$, so that a candidate is compared against both the sampled set and $B$:
\[ \Gcal_n(\Zcal; B) = \Bigl\{\, z_i^{*} \in \Zcal \;:\; z_i^{*} = \arg\max_{z \in \Zcal} \, d\bigl(z,\; \Zcal_{i-1}^{*} \cup B\bigr) \Bigr\} \]
The base set is arbitrary, and $B = \emptyset$ recovers the original greedy sampling. This is the hinge of the whole method: making $B$ the current coreset is what lets greedy sampling generalize across tasks.
At task $t$, ContCore updates the fixed-size memory $\Mcal_t$ in two nested steps:
\[ \Mcal_t \;=\; \Gcal_{m}\bigl(\Gcal_{n_t}(\Zcal_t;\, \Mcal_{t-1}) \,\cup\, \Mcal_{t-1}\bigr) \]
Note what is not in this update: no network weights, no replay buffer, and no task identifier at inference. The memory is the model, so memory, compute and inference latency are all constant in the number of tasks.
Theorem 4.1. Let $H$ be the Hausdorff distance, $\Ocal = \Gcal_{n_0}(\cup_{t=1}^{T}\Zcal_t)$ the oracle coreset — greedy sampling run over all task data at once — and $\Mcal_T$ the greedy-continued coreset after $T$ tasks. Suppose $H(\Ocal, \cup_{t=1}^{T}\Zcal_t) \le \varepsilon_o$, $H(S_t, \Zcal_t) \le \varepsilon_t$ and $H(\Mcal_t, S_t \cup \Mcal_{t-1}) \le \widehat{\varepsilon}_t$. Then
\[ H(\Ocal,\, \Mcal_T) \;\le\; \varepsilon_o \;+\; \max_{1 \le k \le T}\left( \varepsilon_k + \sum_{j=k}^{T} \widehat{\varepsilon}_j \right) \]
The structure of the second term is the point. The error accumulates per task but does not compound — it is a maximum over sums of per-task quantities, not a product. That is why coreset quality degrades gracefully instead of collapsing, and with a sufficient per-task sampling size $n_t$ the greedy-continued coreset keeps its quality for any $T$.
Empirical tightness of Eq. (6) on MVTecAD. The measured $H(\Ocal, \Mcal_T)$ stays around 4.3–4.9 while the right-hand side grows from 6.65 to 19.04 — the bound holds with room to spare at every $T$.
We evaluate on MVTecAD and VisA over 11 continual task schedules (MVTecAD: $1\times15$, $3\times5$, $10-1\times5$, $10-5$, $14-1$; VisA: $1\times12$, $8-1\times4$, $8-4$, $11-1$), plus cross-dataset transfer and online CAD. Features come from WideResNet50 (layers 2–3), with sampling ratio $p = 0.01$ and coreset size $m = 20{,}000$ on MVTecAD / $40{,}000$ on VisA, on a single RTX 3090. We report task-average image / pixel AUROC ($\uparrow$) and the forgetting measure FM ($\downarrow$).
Task average AUROC and FM on MVTecAD across 5 task schedules.
Task average AUROC and FM on VisA across 4 task schedules.
Cross-dataset CAD: MVTec→VisA and VisA→MVTec.
Online CAD: one pass over the data, batch size 1.
Ablation on MVTecAD: coreset size $m$ (a), sampling ratio $p$ (b), approximate ratio $q$ (c), and sampling time against $q$ (d).
Our claim is that we approximate, under a continual budget, the coreset PatchCore would have built from all features at once — so we measure the result directly against it rather than only reporting AUROC.
@inproceedings{jung2026contcore,
title = {Memory-Bounded Continuation of Greedy Sampling for Continual Anomaly Detection},
author = {Yoon Gyo Jung and Jaewoo Park and Kuan-Chuan Peng and Seongdeok Bang and Octavia Camps},
booktitle = {British Machine Vision Conference (BMVC)},
year = {2026}
}