RubiksNet: Learnable 3D-Shift for Efficient Video Action Recognition

Linxi Fan, Shyamal Buch, Guanzhi Wang, Ryan Cao, Yuke Zhu, Juan Carlos Niebles, Li Fei-FeiECCV 2020

Abstract

Video action recognition is a complex task dependent on modeling spatial and temporal context. Standard approaches rely on 2D or 3D convolutions to process such context, resulting in expensive operations with millions of parameters. Recent efficient architectures leverage a channel-wise shift-based primitive as a replacement for temporal convolutions, but remain bottlenecked by spatial convolution operations to maintain strong accuracy and a fixed-shift scheme. Naively extending such developments to a 3D setting is a difficult, intractable goal. To this end, we introduce RubiksNet, a new efficient architecture for video action recognition which is based on a proposed learnable 3D spatiotemporal shift operation instead. We analyze the suitability of our new primitive for video action recognition and explore several novel variations of our approach to enable stronger representational flexibility while maintaining an efficient design. We benchmark our approach on several standard video recognition datasets, and observe that our method achieves comparable or better accuracy than prior work on efficient video action recognition at a fraction of the performance cost, with 2.9–5.9 $\times$ fewer parameters and 2.1–3.7 $\times$ fewer FLOPs. We also perform a series of controlled ablation studies to verify our significant boost in the efficiency-accuracy tradeoff curve is rooted in the core contributions of our RubiksNet architecture.

Introduction: The Efficiency Challenge in Video Recognition

Video action recognition requires modeling both spatial and temporal context, a task traditionally dominated by 3D convolutions. However, these operations are computationally expensive, often involving millions of parameters and high FLOP counts, making them difficult to deploy on resource-constrained edge devices.

While recent efficient architectures like the Temporal Shift Module (TSM) have introduced channel-wise shifts as a replacement for temporal convolutions, they remain limited by two factors: they rely on fixed, hand-designed shift patterns and still depend on heavy 2D convolutions for spatial processing. RubiksNet addresses these limitations by introducing a learnable 3D spatiotemporal shift operation.

Methods: The RubiksShift Primitive

The core of RubiksNet is the RubiksShift layer. Unlike fixed temporal shifts, RubiksShift allows the network to learn optimal "nudges" for data across all three dimensions—height ($h$), width ($w$), and time ($t$)—for each channel. This creates a truly "zero-FLOP" spatiotemporal primitive where the only actual computation occurs in $1 \times 1$ pointwise convolutions used for channel mixing.

Comparison of fixed temporal shifts versus RubiksShift's learned spatiotemporal shifts and budget-constrained allocation.

Architectural Variations

To balance representational flexibility with inference efficiency, the authors explored three variations of the shift operation:

  • Interpolated Shift: Shifts are treated as continuous values. Trilinear interpolation is used to estimate values at non-integer coordinates, enabling end-to-end learning via backpropagation.
  • RubiksShift-Q (Quantized): Shifts are constrained to discrete integer values to eliminate interpolation overhead during inference.
  • RubiksShift-AQ (Attention Quantized): An attention mechanism selects discrete shifts. Using temperature annealing, the model transitions from a soft probability distribution during training to a hard, discrete choice for final inference.
The RubiksShift layer architecture and its three variations: Interpolated, Quantized, and Attention Quantized.

Shift Budget Constraint

Not every layer in a deep network requires complex data movement. RubiksNet employs a global "shift budget" loss during training. This constraint forces the model to prioritize shifts where they are most effective, leading to a "top-heavy" structure where deeper layers utilize more complex spatiotemporal shifts while early layers remain relatively static.

Key Insights and Results

RubiksNet demonstrates that learning spatial and temporal shifts jointly is significantly more effective than treating them as independent or fixed operations. Across all datasets, RubiksNet shifted the "accuracy-vs-compute" curve upward, proving that learnable shifts are a more potent primitive than fixed ones.

Performance Benchmarks

Evaluated on datasets like Something-Something (v1 & v2), UCF-101, and HMDB-51, RubiksNet achieves a superior efficiency-accuracy tradeoff:

  • Efficiency: RubiksNet-Tiny outperforms TSM-Small on Something-Something-v2 while using 5.9x fewer parameters and 3.7x fewer FLOPs.
  • Scalability: The "Large" variant matches TSM's accuracy with a 2.9x reduction in parameter count.

Conclusion

RubiksNet represents a significant step toward efficient video understanding. By replacing rigid, hand-crafted shifts with a learnable 3D primitive and optimizing shift allocation through a budget constraint, it achieves state-of-the-art efficiency. Future work may focus on hardware-aware optimizations to further reduce the memory latency associated with non-contiguous data movement on specialized chips.

Summary updated

BibTeX
@inproceedings{fan2020rubiksnet,
  author = {Linxi Fan and Shyamal Buch and Guanzhi Wang and Ryan Cao and Yuke Zhu and Juan Carlos Niebles and Li Fei-Fei},
  title = {{RubiksNet: Learnable 3D-Shift for Efficient Video Action Recognition}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=jfGp8YR4sr_},
}
Figure