Prototype-Guided Dynamic Margin Learning for Imbalanced Time-Series Classification
Abstract
Time-series classifiers trained with cross-entropy often inherit the class-frequency bias of the training set, especially when rare classes are also poorly separated in the latent feature space. This paper presents ProtoMargin, a prototype-guided dynamic margin loss for imbalanced time-series classification. The loss maintains detached exponential-moving-average class prototypes, estimates class-level compactness and separation online, and uses this signal to adapt the true-class margin before class-balanced focal cross-entropy is computed. We evaluate the method with a shared ResNet1D backbone on CWRU and SEU fault-diagnosis time series under step imbalance ratios of 2, 4, and 6, comparing against cross-entropy, weighted cross-entropy, balanced-sampler cross-entropy, focal loss, and class-balanced focal loss. The results are intentionally reported as a compact pilot study rather than a definitive benchmark. Sampling and weighting remain strong on CWRU, while ProtoMargin provides useful but protocol-sensitive gains on parts of SEU. An audit of the strongest SEU setting shows that the original single-seed score is not stable across seeds, so the corresponding result is reported with uncertainty and interpreted as same-condition diagnostic evidence rather than cross-condition generalization. These findings support a cautious view of prototype-guided dynamic margins as a lightweight loss-side correction that should be evaluated alongside strong sampling and weighting baselines.