Ordinal-Quadruplet: Retrieval of Missing Classes in Ordinal Time Series

Jurijs Nazarovs, Cristian Lumezanu, Qianying Ren, Yuncong Chen, Takehiko Mizoguchi, Dongjin Song, Haifeng ChenarXiv 2022 · arXiv

Introduction

In many real-world applications, data follows a natural ordinal sequence—such as air quality levels, industrial load states, or disease progression stages. Traditional machine learning classifiers typically treat these labels as independent categories. Consequently, if a specific state (e.g., "Partial Load") is absent from the training set, standard models fail to predict it, instead forcing the data into the nearest available known category.

The Ordinal-Quadruplet framework addresses this "missing class" problem by leveraging the inherent order of labels. By ensuring that the model's latent space preserves these ordinal relationships, it becomes possible to identify unseen states during testing.

Figure 1: The framework aligns the distance in feature space with the distance in label space to preserve ordinal relationships.

Methodology

The proposed system integrates three core components to enable the retrieval of missing classes:

1. Ordinal-Quadruplet Loss

While standard triplet loss focuses on grouping similar items and separating dissimilar ones, it often fails to maintain the global order of classes. The authors introduce a quadruplet-based loss function that enforces a geometric constraint: the distance between class representations in the latent space must be proportional to the distance between their actual labels. This ensures that if label A is closer to B than to C, their digital embeddings reflect this same hierarchy.

2. Rank-Based Retrieval

To avoid the bias of K-Nearest Neighbors toward classes present in the training data, the framework employs rank-based statistics (e.g., Spearman’s $\rho$). It compares the ranking of distances in the latent space against the known label rankings to pinpoint the most likely class, even if it was never seen during training.

3. Hypothesis Testing and Temporal Correction

The model treats missing classes as "structured outliers" and uses a non-parametric hypothesis test to decide if a sample belongs to a known or missing category. Furthermore, a "historical window" smoothing technique is applied to time series predictions, assuming that physical states do not fluctuate instantaneously.

Figure 4: Overview of the Ordinal-Quadruplet method, including the temporal encoder, loss function, and missing class detection pipeline.

Experimental Evaluation

The framework was evaluated on three diverse ordinal datasets:

  • Optical SNR: Parameters of an optical transceiver with 16 Signal-to-Noise Ratio labels (10 to 25dB).
  • Audio Scenes: Urban sound recordings ordered by average loudness.
  • HAPT (Human Activity Recognition): Smartphone sensor data tracking activities ordered by physical intensity.

Key Results

  • Robustness: On the Optical SNR dataset, the model maintained high performance even when 40% of the classes were missing from the training set.
  • Accuracy: The proposed method nearly doubled the accuracy compared to triplet-loss baselines in several missing-label scenarios.
  • Smoothing Benefits: Temporal smoothing improved missing-class prediction accuracy from ~50% to 70% in audio data and up to 96% in human activity data.

Discussion and Future Work

The core insight of this work is that label order acts as a powerful regularizer. By framing missing class retrieval as a statistical hypothesis test within an ordered latent space, the model moves beyond simple classification toward a more robust understanding of data progression.

However, the model currently assumes a total ordering of labels, which may not apply to systems with multi-dimensional or partial orders. Future research could extend this framework to more complex label structures and explore its potential in domain adaptation for identifying entirely novel, emergent states in industrial or biological systems.

Summary updated

Abstract

In this paper, we propose an ordered time series classification framework that is robust against missing classes in the training data, i.e., during testing we can prescribe classes that are missing during training. This framework relies on two main components: (1) our newly proposed ordinal-quadruplet loss, which forces the model to learn latent representation while preserving the ordinal relation among labels, (2) testing procedure, which utilizes the property of latent representation (order preservation). We conduct experiments based on real world multivariate time series data and show the significant improvement in the prediction of missing labels even with 40% of the classes are missing from training. Compared with the well-known triplet loss optimization augmented with interpolation for missing information, in some cases, we nearly double the accuracy.
BibTeX
@misc{nazarovs2022ordinal,
  author = {Jurijs Nazarovs and Cristian Lumezanu and Qianying Ren and Yuncong Chen and Takehiko Mizoguchi and Dongjin Song and Haifeng Chen},
  title = {{Ordinal-Quadruplet: Retrieval of Missing Classes in Ordinal Time Series}},
  year = {2022},
  eprint = {2201.09907},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.09907},
}
Figure