MOMEMTO: Patch-based Memory in Anomaly Detection
- MOMEMTO is a reconstruction-based time series anomaly detection model that uses patch-based memory to mitigate over-generalization.
- It refines latent representations by matching input patches to stored normal prototypes, ensuring that anomalies yield high reconstruction errors.
- The multi-domain training strategy enables knowledge sharing across datasets, enhancing both few-shot performance and detection robustness.
Searching arXiv for the exact topic and closely related work. MOMEMTO, introduced in “MOMEMTO: Patch-based Memory Gate Model in Time Series Foundation Model,” is a reconstruction-based time-series anomaly detection model that augments a time series foundation model with a patch-based memory mechanism to mitigate over-generalization. The model is designed for anomaly detection in settings where powerful reconstruction models can otherwise reconstruct unseen anomalies accurately, thereby weakening the separation between normal and abnormal inputs. MOMEMTO combines a pre-trained encoder from the MOMENT backbone with an external memory of representative normal patch patterns and supports joint fine-tuning across multiple datasets through a multi-domain training strategy (Yoon et al., 23 Sep 2025).
1. Problem setting and motivation
MOMEMTO is formulated against a specific failure mode of reconstruction-based anomaly detection. In that paradigm, a model is trained to reconstruct “normal” input sequences, and anomalies are detected when reconstruction error is high. As model capacity increases, however, strong encoders and decoders can reconstruct anomalous inputs too well, producing low anomaly scores for true anomalies. The paper identifies this as over-generalization and treats it as the central obstacle to reliable anomaly detection with modern deep architectures (Yoon et al., 23 Sep 2025).
The proposed remedy is to constrain reconstruction through memory. Rather than reconstructing directly from the input’s own latent representation, MOMEMTO first matches the input to stored prototypes of normal patterns and then reconstructs from a representation refined by those prototypes. This design is explicitly intended to make anomalous inputs “snap” toward normal-like structure, so that mismatch remains visible in the reconstruction error. The paper positions this as an adaptation of memory-based anomaly detection to the setting of time series foundation models, where prior memory architectures had high training cost and had not been effectively integrated with TFMs.
A second motivation concerns scalability. Earlier memory-based approaches are described as sensitive to initialization and tied to a one-model-per-dataset setting. MOMEMTO instead uses a patch-based memory module compatible with the patch-level latent space of a pre-trained foundation model and introduces multi-domain training so that a single model can be jointly fine-tuned across multiple datasets. This suggests a shift from dataset-specific anomaly detectors toward a shared anomaly-detection backbone with reusable normality structure.
2. Architectural design
The architecture is an encoder–memory–decoder pipeline built around patch representations. An input time series is segmented into non-overlapping patches of fixed length , yielding , where is the number of observed patches. If fewer than the maximum number of patches are available, the sequence is zero-padded to . The pre-trained encoder from MOMENT-large produces patch-level latent representations
which are normalized and then used as queries to interact with memory (Yoon et al., 23 Sep 2025).
The decoder is intentionally lightweight. It consists of two fully connected layers that reconstruct the signal from the concatenation of the original query and the memory-refined query,
This is a deliberate architectural constraint: the paper argues that a lightweight decoder reduces the chance that the decoder itself will over-generalize. In other words, representational strength is concentrated in the pre-trained encoder and the external memory rather than in a highly expressive decoder.
This patch-based organization is closely tied to the MOMENT backbone. Because MOMENT uses patch-level masked representation learning, its latent space already captures local temporal semantics. MOMEMTO exploits that property directly: memory does not store only a global embedding of a time series, but patch-level prototypes aligned with local temporal structure. A plausible implication is that this makes the memory mechanism better suited to heterogeneous local motifs than a single global prototype bank would be.
3. Patch-based memory module
The memory module contains memory items , each with shape
Each memory item therefore stores patch-level prototypes rather than a single vector. Initialization is data-driven. If 0 encoder outputs 1 are sampled from datasets associated with domain 2, the corresponding memory item is initialized as
3
The paper notes that memory items are L2-normalized at the patch level for stability (Yoon et al., 23 Sep 2025).
Because time series lengths vary, memory and queries are first aligned to the observed patches selected by the input mask. Both the query 4 and each memory item 5 are reduced from 6 slots to the observed 7 slots so that only corresponding observed patches are compared. Similarities between the aligned query and memory items are computed by dot product and normalized with softmax. The model then selects only the top-8 most similar memory items; in the experiments, 9. The paper emphasizes that this selective update is more efficient and more discriminative than updating all memory items indiscriminately.
Memory updating is attention-based and gated. For each selected memory item 0, the module computes
1
then an update gate
2
with learnable projection matrices 3. The updated memory is
4
The stored prototype is thus partially retained and partially replaced by query-informed content. The query refinement stage then computes
5
and aggregates the refined queries across the top-6 items into 7, weighted by the retrieval similarities. Conceptually, the original 8 preserves the raw contextual encoding, while 9 injects what the paper calls a “normal pattern prior.”
4. Multi-domain training and detection workflow
A defining feature of MOMEMTO is its multi-domain training strategy. Instead of training one model per dataset, the paper jointly fine-tunes a single model across all 23 benchmark datasets in the TSB-AD-U benchmark. Memory is initialized with one item per user-defined domain, but the training procedure does not enforce a strict one-to-one mapping between memory items and domains. Because updates are similarity-driven, a memory item may accumulate evidence from multiple domains and become domain-general (Yoon et al., 23 Sep 2025).
This training strategy is presented as a response to the practical structure of anomaly-detection benchmarks. The TSB-AD-U benchmark contains 870 univariate time series from 23 datasets spanning domains such as UCR, NAB, YAHOO, IOPS, MSL, SMAP, SMD, SWaT, and Stock. The main evaluation uses the Eval split, which contains 350 time series. Input subsequences are created with a non-overlapping window of length 512. The paper argues that multi-domain training enables knowledge sharing across domains, reduces the need for 350 separate models, and improves robustness because the memory sees a broader variety of normal patterns.
At detection time, the workflow is straightforward. The input series is patched and encoded by the pre-trained backbone. The normalized patch embeddings are passed through memory, which retrieves and reinforces the most relevant normal prototypes, producing a refined latent sequence 0. The decoder reconstructs the series from 1. Anomalies are identified by reconstruction error: inputs that cannot be reconstructed well under the constraints of normal-pattern memory receive higher anomaly scores. The core claim is that normal inputs match memory items well and reconstruct with low error, whereas anomalous inputs are forced toward nearby normal prototypes, making the mismatch detectable.
The implementation details reported in the paper make the setup concrete: patch length 8, stride 8, 64 patches, 2, 3, temperature 4, Adam optimization, learning rate 5, and MSE loss. The paper also notes that multi-domain training plus the patch-based memory module keeps the total model size compact, around 1.3 GB.
5. Empirical evaluation
MOMEMTO is evaluated with threshold-independent metrics: AUC-PR, AUC-ROC, VUS-PR, and VUS-ROC. In the standard setting, it improves over the MOMENT backbone, and the multi-domain version performs best overall (Yoon et al., 23 Sep 2025).
| Model | AUC-PR | AUC-ROC | VUS-PR / VUS-ROC |
|---|---|---|---|
| MOMENT | 29.45 | 69.97 | 29.73 / 76.84 |
| MOMEMTO | 32.83 | 70.00 | 33.23 / 77.49 |
| MOMEMTO6 | 36.35 | 74.83 | 37.62 / 80.95 |
The paper further reports that reconstruction-based TFMs are stronger for anomaly detection than Chronos and TimesFM, and that MOMEMTO is the strongest among them. The gains are not limited to the full-data regime. In few-shot settings, when only 10% to 30% of the training data is used, MOMEMTO consistently outperforms MOMENT by a substantial margin. As more data becomes available, MOMEMTO continues to improve, whereas MOMENT saturates more quickly. The multi-domain version improves few-shot performance further, which the paper interprets as evidence that shared training across domains makes the model more data-efficient.
Transfer performance is also reported. In a zero-shot leave-one-out experiment over 32 domains, MOMEMTO7 reaches 34.51 AUC-PR, 72.17 AUC-ROC, 35.76 VUS-PR, and 78.32 VUS-ROC, again beating MOMENT8. This supports the paper’s claim that the memory module learns reusable normality structure rather than merely memorizing dataset-specific regularities.
The ablation study isolates the roles of pre-training and memory. A scratch encoder without memory achieves 22.44 AUC-PR. Adding memory to the scratch encoder raises this to 33.63. Using a pre-trained encoder without memory gives 29.70, and combining pre-training with memory gives the best result, 36.35. The paper presents this as evidence that the two components are complementary: the encoder provides strong patch representations, while memory constrains reconstruction toward representative normal patterns.
6. Scope, interpretation, and nomenclature
MOMEMTO belongs to time-series anomaly detection, not to conversational memory benchmarks, wearable memory augmentation, or symbolic question-answering systems. It is distinct from “Momento,” a benchmark for persistent, multi-session agentic conversations in service environments (Merin et al., 30 May 2026); from “Memento,” a multimodal wearable framework for short-term memory augmentation in visual search and wayfinding navigation (Ghosh et al., 28 Apr 2025); and from “Memento,” a prompting strategy for multi-hop question answering that constructs a Prolog database of intermediate facts (Wan et al., 25 Jun 2025).
Within its own domain, MOMEMTO is specifically a reconstruction-based anomaly detector enhanced by a patch-based memory gate model. Its empirical claims are grounded in univariate time series from TSB-AD-U, with evaluation centered on AUC and VUS metrics. The paper does not frame it as an end-to-end generative foundation model for arbitrary time-series reasoning; rather, it targets a narrower but technically important problem: preventing a powerful TFM from reconstructing abnormal inputs so well that anomalies become indistinguishable from normal sequences (Yoon et al., 23 Sep 2025).
The broader significance of the model lies in how it repurposes foundation-model representations. Instead of treating a pre-trained encoder as sufficient on its own, MOMEMTO uses external memory to impose a normality-aware bottleneck on reconstruction. This suggests that, in anomaly detection, scaling representation quality alone is not enough; the decisive issue is whether the reconstruction path is constrained by representative normal prototypes. That interpretation follows directly from the model’s design and from the reported ablations, where pre-training and memory each improve performance, but their combination performs best.