Unsupervised Representation Learning by Sorting Sequences

Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, Ming-Hsuan Yang

Abstract

Traditional deep learning relies heavily on large-scale human-labeled datasets, which are costly and difficult to scale. This paper proposes a self-supervised approach to learn visual representations from videos by solving a sequence sorting task. By training a neural network to rearrange shuffled video frames into their original chronological order, the model learns to capture temporal coherence and object dynamics without manual supervision. The resulting Order Prediction Network (OPN) achieves state-of-the-art performance on action recognition and competitive results on transfer learning tasks.

Introduction: The Power of Temporal Order

Deep learning's success is often tied to massive datasets like ImageNet. However, for many domains, labeling millions of images is impractical. Self-supervised learning offers a solution by using the data's inherent structure as a supervisory signal. Videos are particularly rich in such signals due to their temporal continuity.

While previous methods focused on "order verification" (determining if a sequence is correct), this work argues that sequence sorting provides a much stronger learning signal. Sorting requires the model to understand the fine-grained evolution of an action, forcing it to recognize semantic parts and their movement over time.

The sequence sorting task: a shuffled sequence is reordered to match the original video's temporal flow.

Methodology: The Order Prediction Network (OPN)

The core of this approach is the Order Prediction Network (OPN), designed to predict the correct permutation of a shuffled set of video frames.

Data Preprocessing and Sampling

To ensure the network learns high-level semantics rather than low-level pixel artifacts, several data augmentation techniques are employed:

  1. Motion-aware Selection: Frames are chosen from video segments with significant movement to ensure the sorting task is non-trivial.
  2. Spatial Jittering: Random cropping is applied to each frame so the network cannot rely on static background alignment to solve the puzzle.
  3. Channel Splitting: To prevent the model from exploiting chromatic aberration (color shifts at edges), a single color channel is duplicated across all three RGB channels, forcing the model to focus on shape and motion.

Architecture

The OPN architecture consists of three main stages:

  1. Feature Extraction: A Siamese convolutional neural network (sharing weights) extracts features ($fc6$) from each input frame independently.
  2. Pairwise Feature Extraction: Instead of a simple concatenation, the model extracts features from every possible pair of frames. This mimics human comparison-based sorting and better captures relational dynamics.
  3. Order Prediction: The pairwise features are fused to predict the correct permutation class. For a 4-frame tuple, there are 24 possible permutations, which are grouped into 12 classes to account for temporal symmetry (e.g., actions that look similar forward and backward).
The OPN architecture: features are extracted from individual frames, compared in pairs, and finally used to predict the sequence order.

Key Insights and Results

The researchers found that sorting is a significantly more effective task than simple verification. By forcing the model to determine the exact position of each frame, it develops a deeper understanding of object parts and their dynamics.

Performance Benchmarks

  • Action Recognition: On the UCF-101 dataset, the OPN achieved 56.3% accuracy, outperforming previous self-supervised methods like "Shuffle and Learn" (50.2%).
  • Transfer Learning: When evaluated on PASCAL VOC 2007 for object detection, the pre-trained model reached a Mean Average Precision (mAP) of 46.9%, demonstrating that features learned from video temporal order are highly relevant for static image tasks.
  • Semantic Emergence: Analysis of the network's internal activations revealed that neurons naturally began to respond to specific semantic entities, such as human heads or limbs, despite never receiving explicit labels for these objects.

Conclusion

The sequence sorting task provides a robust framework for unsupervised representation learning. By leveraging the natural "arrow of time" in videos, the OPN learns rich, transferable visual features. Future work may involve extending this reasoning to longer sequences using Recurrent Neural Networks (RNNs) to capture even more complex temporal evolutions.

Summary updated

BibTeX
@inproceedings{lee2017unsupervised,
  author = {Hsin-Ying Lee and Jia-Bin Huang and Maneesh Singh and Ming-Hsuan Yang},
  title = {{Unsupervised Representation Learning by Sorting Sequences}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  doi = {10.1109/iccv.2017.79},
}
Figure