Exploring Temporal Differences in 3D Convolutional Neural Networks

Gagan Kanojia, Sudhakar Kumawat, Shanmuganathan RamanarXiv 2019

TL;DR

Researchers at IIT Gandhinagar have developed a novel convolutional block that captures temporal dynamics in 3D data (like video) using simple, parameter-free operations: shift, subtract, and add. By replacing standard 3D convolutions with this "SSA" block, they achieved significantly higher accuracy on action recognition and 3D shape classification tasks while using up to three times fewer parameters.

What Problem Does This Paper Address?

Deep learning on spatio-temporal data—such as video sequences or 3D CAD models—traditionally relies on 3D Convolutional Neural Networks (3D CNNs). While 3D CNNs are excellent at capturing motion and structure, they come with a heavy price tag:

  1. Computational Cost: 3D kernels are mathematically expensive to compute.
  2. Memory Intensity: Storing 3D feature maps requires massive amounts of VRAM.
  3. Overfitting: The sheer number of learnable parameters in 3D kernels makes them prone to memorizing training data rather than generalizing.

Conversely, 2D CNNs are efficient but "blind" to temporal changes. The challenge is to find a middle ground: a way to capture temporal information as effectively as a 3D CNN but with the efficiency of a 2D model.

Methods

The authors propose a new convolutional block consisting of three main components: a 2D convolution, the SSA (Shift, Subtract, and Add) layer, and temporal max pooling.

The core innovation is the SSA Layer. Instead of using learnable 3D weights to find temporal patterns, the SSA layer exploits "temporal differences"—how a feature map changes from one time instance to the next.

Fig. 1. An illustration of SSA Layer

As shown in Figure 1, the process works as follows:

  1. Shift: The input feature map is shifted along the temporal dimension.
  2. Subtract: The shifted version is subtracted from the original to find the difference (a proxy for motion or structural change).
  3. Add: This difference is added back to the feature map.
  4. Weighting: The authors use a weighting scheme where differences between nearby frames are given more importance than those further apart.

Crucially, the SSA layer uses zero trainable parameters. The only learnable parts of the block are the 2D convolution weights. This reduces the parameter count of a kernel from $n \times n \times n$ (3D) to just $n \times n$ (2D), making it $n$ times more efficient.

Datasets

The researchers evaluated their approach on two distinct types of 3D data:

  • UCF101: A benchmark video dataset for action recognition containing 101 categories of human activities.
  • ModelNet10 & ModelNet40: Datasets of 3D CAD models (represented as voxels) used to test the block's ability to capture spatial structure in three dimensions.

Key Insights and Ideas

  • Temporal Differences as a Proxy for Motion: In action recognition, the "change" between frames is often more informative than the frames themselves. SSA captures this change explicitly without needing complex optical flow calculations.
  • Parameter-Free Temporal Modeling: The paper demonstrates that we don't necessarily need to learn how to look across time; simple mathematical shifts and subtractions can extract the necessary features.
  • Versatility: While designed with video in mind, the SSA block also improved performance on static 3D shapes (ModelNet), proving that "temporal" differences are effectively just "depth" differences in any 3D volume.
  • Weighted Context: By ensuring larger temporal shifts get smaller weights, the model maintains a strong focus on local context while still considering long-range dependencies.

Key Results

The results show a consistent "win-win" scenario: higher accuracy with fewer parameters.

  • Efficiency: An SSA-ResNet-18 uses approximately 11 million parameters, compared to the 33 million required by a standard 3D ResNet-18.
  • Performance on UCF101: Despite having 3x fewer parameters, SSA-ResNet-18 achieved 55.7% accuracy, significantly outperforming the baseline 3D ResNet-18 (45.6%).
  • State-of-the-Art Comparison: The SSA-ResNeXt-50 model reached 56.9% accuracy, outperforming more complex architectures like R(2+1)D and 3D STC-ResNet when trained from scratch.
Comparison of different architectures showing SSA models consistently outperform baselines with fewer parameters.

Limitations and Future Work

While the paper presents a compelling case for SSA layers, there are a few areas for further exploration:

  • Training from Scratch: The comparisons were primarily based on models trained from scratch on UCF101. It remains to be seen how these blocks perform when fine-tuned from massive pre-trained datasets like Kinetics.
  • Inference Speed: While parameter counts are lower, the "shift, subtract, add" operations involve multiple memory access steps, which might impact actual wall-clock inference time depending on hardware optimization.
  • Hyperparameter Sensitivity: The number of shifts ($f-1$) is a fixed choice; future work could investigate if making the shift distance learnable or dynamic could further boost performance.

Overall, this work provides a powerful alternative for researchers looking to deploy 3D vision models on resource-constrained devices without sacrificing accuracy.

Summary updated

BibTeX
@misc{kanojia2019exploring,
  author = {Gagan Kanojia and Sudhakar Kumawat and Shanmuganathan Raman},
  title = {{Exploring Temporal Differences in 3D Convolutional Neural Networks}},
  year = {2019},
  eprint = {1909.03309},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.03309},
}
Figure