arXiv:2610.02704cs.AIOct 2026

Manuscript Offprint

arXiv:2610.02704

Label-Efficient Time Series Classification at Scale: A Dual-Stream OSSE-LSTM with Counterfactual Attribution

Nguyen Ho, Bach Tung Tran, Trung Ky Nguyen, Zhenchang Xia, Bolong Zheng, Long Van Ho

Nguyen Ho*, Bach Tung Tran**, Long Van Ho**, Trung Ky Nguyen**, Zhenchang Xia++, Bolong Zheng++

  • Loyola University Maryland, USA

** School of Computer Science and Engineering, International University, Vietnam

++ School of Compute Science and Artificial Intelligence, Wuhan University of Technology, China

Email: tnho@loyola.edu, {ITITIU21340, hlvan, ntky}@hcmiu.edu.vn, {zcxia.cs, bolongzheng}@whut.edu.cn

Abstract—Time series are produced continuously at enormous scale by industrial equipment, wearables, power grids, and clinical monitors, yet annotation remains manual, expensive, and expert-dependent. The binding constraint in large-scale time series analytics is therefore not data volume but label volume, and the question facing a practitioner is concrete: how many examples per class must be labeled before a classifier becomes usable? We study this question directly, in a regime where the label space is fixed and known in advance and the decision rule must be constructed from only K labeled examples per class. We propose Dual-Stream OSSE-LSTM, an episodic metric-learning framework that pairs an Omni-Scale CNN with Squeeze-and-Excitation recalibration, for multi-scale motif extraction without per-dataset kernel tuning, with a Bidirectional LSTM for global temporal context. The two streams are independently normalized and fused into a prototype-oriented embedding. Because decisions taken from a few labels must also be explainable, we introduce Counterfactual Integrated Gradients (C-IG), which attributes the prototype margin between target and opposing classes rather than an isolated classifier logit, and reuses the resulting maps as soft masks for test-time prototype refinement without updating the encoder. On 19 univariate UCR datasets, OSSE-LSTM attains the highest average accuracy and per-dataset win count at every support size from K = 2 to K = 8, and its accuracy remains within a 0.36-point band (96.36-96.72%) across that range. Its weakest configuration still exceeding the best result any compared baseline achieves at any K (93.99%). Further, the baselines show no comparable stability: convolutional models lose up to 12 points as K grows, since additional support samples displace rather than stabilize their prototypes, while self-supervised representations improve with K yet remain far below our method. Further, our C-IG-guided refinement delivers consistent gains where unguided noise augmentation causes catastrophic degradation.

Keywords: Label-Efficient Learning, Time Series Classification, Prototypical Networks, Few-Shot Learning, Omni-Scale CNN, Long Short-Term Memory, Explainable AI, Integrated Gradients, Large-Scale Sensor Data

I. INTRODUCTION

Modern infrastructure emits time series continuously. A single industrial plant instruments thousands of channels at sub-second resolution; consumer wearables stream physiological signals from hundreds of millions of devices; smart meters, vehicle telemetry, and clinical monitors each generate archives that grow without bound. Collecting this data is now inexpensive, but interpreting it is not. Deep neural networks achieve strong time series classification (TSC) performance by learning representations directly from raw signals [1], but typically require abundant labeled data, an assumption that fails precisely where these archives are largest. Labeling a heartbeat as an infarction, a vibration trace as a bearing wear, or a power signature as an appliance class requires a domain expert, a controlled experiment, or a confirmed downstream outcome. None of these scales with sampling frequency, as data accumulates at machine speed, while labels accumulate at human speed.

This asymmetry reframes what scalability means for time series analytics. The scarce resource is no longer storage or compute, but annotation budget, and the governing question is operational rather than asymptotic: how many examples per class must an expert label before the resulting classifier is fit for deployment? This question motivates our work. We study TSC in the label-efficient regime, where a classifier must label data accurately from only K examples per class over a fixed, known label space, the situation of an analyst who can annotate two or three representative instances of each condition, but not a corpus. Our aim is to propagate a small vocabulary of expert labels across a large body of unlabeled signals, using episodic K-shot training and prototype-based inference.

Metric-based learning is a natural fit for this label-efficient regime. For instance, Prototypical Networks [2] classify a query by comparing its embedding to class prototypes computed from a small support set, avoiding a separate classifier per task. Time series data, however, complicate prototype estimation in two ways that become more acute at scale. First, variety: discriminative structure appears at radically different temporal scales and in different forms across domains, e.g., a millisecond ECG deflection, a multi-second gait cycle, a slow drift in a control trace. An encoder tuned to one morphology transfers poorly to another, and hand-tuning receptive fields per collection does not scale to archives containing thousands of heterogeneous signal types. Second, veracity: when a prototype is the mean of two or three examples, background noise, baseline drift, and phase shift are not averaged away, so a prototype can be displaced by variation that carries no class information. This second difficulty has a consequence that is easy to overlook, and that our experiments make explicit: if an embedding is not organized around prototype geometry, enlarging the support set will not help. Additional labeled examples introduce additional intra-class variation, and a prototype computed over them can drift further from the class structure than one computed over fewer. Label efficiency is therefore not simply a matter of tolerating small K, but it is a matter of ensuring that each labeled example contributes usefully to the prototype.

Existing encoders address only part of this. Convolutional and shapelet-based models extract local patterns effectively [3], [4] but often rely on temporal pooling that weakens global ordering. Recurrent models such as LSTM capture sequential dependencies [5] yet overfit under very limited training data. Hybrid CNN–LSTM models exist [6] but are designed for standard supervised learning rather than few-shot training.

Interpretability is a further requirement that is important in label-efficient regime. When a decision rests on two labeled examples, an operator is entitled to ask what evidence supports it, and in healthcare and industrial monitoring, an unexplained prediction is often unusable regardless of its accuracy. Existing work such as Integrated Gradients (IG) [7] attributes predictions by integrating gradients from a baseline to the input, but the baseline choice is non-trivial for time series, where a zero signal is not a realistic reference [8]. Furthermore, like most attribution methods, IG explains a single class score in isolation. Prototype-based classification, however, is inherently contrastive: a query is assigned to a class because it is closer to that prototype than to competing ones, so a useful explanation should highlight regions that drive this separation rather than regions that simply activate one class.

To address these challenges, we propose Dual-Stream OSSE-LSTM, an episodic metric-learning framework for label-efficient TSC. It combines two complementary encoders: an Omni-Scale CNN with Squeeze-and-Excitation blocks for multi-scale motif extraction [9], [10], which covers a broad range of receptive-field lengths by construction and therefore removes per-dataset kernel-size tuning, and a Bidirectional LSTM for global temporal context, which preserves the ordering information that pooling discards. Their outputs are independently normalized and concatenated for prototype-based classification. We further introduce Counterfactual Integrated Gradients (C-IG), an attribution module for prototypical decisions that integrates gradients along paths between target and opposing class representatives, rather than from an arbitrary zero baseline, and thereby attributes the prototype margin that the model actually uses to decide. Beyond visualization, C-IG maps guide test-time prototype refinement: low-attribution background regions of support samples are softly perturbed while high-attribution regions are preserved, and original and augmented embeddings are averaged for more stable prototypes at inference. Because this refinement leaves the encoder untouched, it costs nothing in training when the labeled set is revised. The main contributions of our paper are:

• A label-efficient formulation of large-scale TSC: We formalize time series classification problem over a fixed, known label space from K labeled examples per class. This is the regime that governs annotation cost in large operational time series archives.

• Dual-Stream OSSE-LSTM: We propose a dual-stream encoder for label-efficient time series classification that integrates omni-scale convolutional representations for multi-scale local temporal patterns with bidirectional LSTM representations for temporal context. The two streams are independently normalized and fused into a prototype-oriented embedding space suitable for metric-based classification under limited supervision, and the omni-scale design covers heterogeneous morphologies without dataset-specific receptive-field tuning, making a single configuration viable across a diverse archive.

• Counterfactual Integrated Gradients (C-IG): We propose a prototype-aware attribution method that interprets metric-based decisions by attributing the prototype margin between target and opposing classes, rather than a fixed classifier logit. Beyond visualization, C-IG attribution maps serve as soft masks for test-time support augmentation, enabling prototype refinement without updating the trained encoder.

• An annotation-budget evaluation on 19 univariate UCR datasets. Against the representative baselines, our OSSE-LSTM attains the highest average accuracy and per-dataset win count at every support size tested. It reaches 96.36% from two labeled examples per class, exceeding every baseline's eight-shot result, and varies by under 0.4 points from 2- to 8-shot, whereas convolutional baselines lose up to 12 points over the same range. Further, C-IG-guided refinement yields consistent gains where unguided augmentation degrades accuracy severely.

References (47)