Papers
Topics
Authors
Recent
Search
2000 character limit reached

Dynamic Dual-Prototype Bank (DDP)

Updated 27 January 2026
  • DDP is a module that leverages dual prototype banks to disentangle and represent both common trends and rare anomalies in time series data.
  • It uses a dual-path context-aware routing mechanism with Pearson correlation for selecting and aggregating prototypes effectively.
  • By integrating specialized loss functions for separation, rarity, and diversity, DDP enhances forecasting accuracy and model adaptivity.

The Dynamic Dual-Prototype Bank (DDP) is a module introduced to enable context-aware pattern disentanglement and adaptive representation for time series forecasting. It operates by maintaining two learnable banks of prototypes: one specialized in capturing common, recurrent patterns (such as trends or seasonalities), and another engineered to dynamically store rare, critical events. By leveraging a dual-path context-aware routing mechanism and a tailored disentanlgement-guided loss, DDP equips backbone forecasting models with the capacity to distinguish, recall, and utilize both prevailing and infrequent temporal behaviors for improved predictive performance (Yang et al., 23 Jan 2026).

1. Architecture and Bank Construction

The DDP comprises two distinct learnable sets:

  • Common Pattern Bank (Bc\mathcal{B}_c): Contains MM prototypes intended to represent stable, high-frequency modes of the data, including trends and periodic behaviors.
  • Rare Pattern Bank (Br\mathcal{B}_r): Contains NN prototypes designated to encode irregular, low-frequency, or anomalous events.

Each prototype is a DD-dimensional vector in a latent space. Initialization is performed as follows:

sciGP(0,λK+λrKr+λpKp)(i=1,...,M), srjN(0,σ2I)(j=1,...,N)\begin{aligned} \mathbf{s}_c^i &\sim \mathcal{GP}\left(0,\,\lambda_{\ell} K_{\ell} + \lambda_{r} K_{r} + \lambda_{p} K_{p}\right) \quad (i = 1, ..., M), \ \mathbf{s}_r^j &\sim \mathcal{N}(0, \sigma^2 I) \quad (j = 1, ..., N) \end{aligned}

where K,Kr,KpK_{\ell}, K_{r}, K_{p} are linear, RBF (radial basis function), and periodic kernels, with λ\lambda as mixing weights.

These sequences are mapped to embeddings: pci=Projc(sci)RD,prj=Projr(srj)RD\mathbf{p}_c^i = \mathrm{Proj}_c(\mathbf{s}_c^i) \in \mathbb{R}^D, \quad \mathbf{p}_r^j = \mathrm{Proj}_r(\mathbf{s}_r^j) \in \mathbb{R}^D

Forming banks: Bc={pc1,...,pcM},Br={pr1,...,prN}\mathcal{B}_c = \{\mathbf{p}_c^1, ..., \mathbf{p}_c^M\}, \quad \mathcal{B}_r = \{\mathbf{p}_r^1, ..., \mathbf{p}_r^N\}

Both banks are updated end-to-end via gradient descent according to the total loss function; common prototypes specialize toward stable patterns, rare prototypes adapt to infrequent events.

2. Dual-Path Context-Aware Routing (DPC) Mechanism

DPC is the retrieval and routing component operating at inference and training time. It is responsible for context-selective integration of prototypes with backbone model representations. Given a time series input MM0 and its latent encoding MM1:

2.1 Similarity Computation

Pearson correlation is computed between MM2 and each prototype in both banks: MM3

2.2 Prototype Selection

  • Common Path: Selects the top-MM4 most similar common prototypes,

MM5

  • Rare Path: Picks the single most similar rare prototype if similarity exceeds threshold MM6,

MM7

2.3 Weighting and Aggregation

Weighted sum for common (MM8) and one-hot for rare (MM9): Br\mathcal{B}_r0

Contribution vectors: Br\mathcal{B}_r1

Fusion: Br\mathcal{B}_r2 with Br\mathcal{B}_r3 a trainable projection.

3. Disentanglement-Guided Loss (DGLoss)

Supervision is enforced using a composite loss: Br\mathcal{B}_r4

  • Mean Squared Error (Br\mathcal{B}_r5): Forecast regression signal.
  • Separation Loss (Br\mathcal{B}_r6): Encourages dissimilarity between top matches of common and rare banks, facilitating role separation. For Br\mathcal{B}_r7 and empirical pattern-frequency weight Br\mathcal{B}_r8, with margin Br\mathcal{B}_r9:

NN0

  • Rarity Preservation Loss (NN1): Promotes distinctiveness of rare prototypes via log-softmax over activated similarities:

NN2

  • Common Diversity Loss (NN3): Ensures diversity among common prototypes:

NN4

4. Algorithmic Flow

The following succinctly summarizes the training loop:

DD2

5. Operational Example

Consider a univariate input series NN5 exhibiting a smooth trend and an end-of-series spike:

  • Common Path: The DPC aligns the trend portion of NN6 to NN7, selecting prototypes that best resemble the backbone trend, weighted by shape similarity, forming NN8.
  • Rare Path: The abrupt spike produces high correlation with a rare prototype in NN9; if above threshold, that prototype is activated, and DD0 encodes this anomaly.
  • The concatenation DD1 is projected to the final forecast, integrating smooth and abrupt event motifs for adaptivity and reliability in output.

6. Theoretical and Practical Significance

DDP is model-agnostic and auxiliary; it does not require modification of the backbone forecasting architecture. It enables “pattern disentanglement and context-aware adaptation,” equipping models with the ability to represent both dataset-specific stable behaviors and infrequent, critical events. The end-to-end learnability, explicit specialization of banks, and use of dedicated loss terms ensure robust coverage of diverse temporal regimes. Empirically, this structure has demonstrated consistent improvements in predictive accuracy and reliability across various real-world benchmarks, reflecting enhanced utilization of both frequent and rare structural cues in sequential data (Yang et al., 23 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Dynamic Dual-Prototype Bank (DDP).