Abstract
Feedforward neural networks are the dominant approach in current computer vision research. They typically do not incorporate recurrence, which is a prominent feature of biological vision brain circuitry. Inspired by biological findings, we introduce RecSlowFast, a recurrent slow-fast framework aimed at showing how recurrence can be useful for temporal visual processing. We perform a variable number of recurrent steps of certain layers in a network receiving input video frames, where each recurrent step is equivalent to a feedforward layer with weights reuse. By harnessing the hidden states extracted from the previous input frame, we reduce the computation cost by executing fewer recurrent steps on temporally correlated consecutive frames, while keeping good task accuracy. The early termination of the recurrence can be dynamically determined through newly introduced criteria based on the distance between hidden states and without using any auxiliary scheduler network. RecSlowFast reuses a single set of parameters, unlike previous work which requires one computationally heavy network and one light network, to achieve the speed versus accuracy trade-off. Using a new Temporal Pathfinder dataset proposed in this work, we evaluate RecSlowFast on a task to continuously detect the longest evolving contour in a video. The slow-fast inference mechanism speeds up the average frame per second by 279% on this dataset with comparable task accuracy using a desktop GPU. We further demonstrate a similar trend on CamVid, a video semantic segmentation dataset.
Introduction
Most modern computer vision systems rely on feedforward neural networks that process every video frame from scratch. This approach ignores the inherent temporal redundancy in video streams, where consecutive frames are often highly similar, leading to significant computational waste. In contrast, biological visual systems are heavily recurrent. Primate brains dynamically allocate computation time—recurrent cycles—based on the complexity of the visual stimulus.
While "Slow-Fast" architectures have been proposed to address this, they typically rely on two distinct networks (one heavy, one light), which increases parameter count and architectural complexity. RecSlowFast addresses this by using a single, parameter-efficient recurrent network that adapts its computational depth dynamically.
The RecSlowFast Framework
The core of the RecSlowFast framework is the integration of two types of recurrence to optimize temporal processing:
- Within-input timestep recurrence: The network performs multiple recurrent steps on a single frame. Since these steps use weight-shared layers, this is equivalent to increasing the depth of a feedforward network without increasing the number of parameters.
- Cross-input timestep recurrence: The final hidden state of the previous frame is used to initialize the recurrent process for the current frame. This "warm start" allows the network to leverage prior information, reaching a stable representation much faster when frames are temporally correlated.
Distance-Based Dynamic Halting
A key innovation in RecSlowFast is its halting criterion. Instead of an external scheduler, the model monitors the distance ($L_1$ or $L_2$) between successive hidden states within a single timestep. When the representation converges (i.e., the distance falls below a threshold), the network terminates processing for that frame. This allows for "early exit" on redundant or simple frames, significantly boosting throughput.
Experimental Evaluation
The framework was evaluated on two primary benchmarks:
- Temporal Pathfinder (T-Pathfinder): A novel synthetic dataset introduced in this study. It requires models to track the longest evolving contour amidst changing distractors. This task specifically tests the ability to integrate information over time and handle varying levels of visual complexity.
- CamVid: A real-world video semantic segmentation dataset used to validate the framework's performance on complex, naturalistic street scenes.
Key Results and Insights
- Efficiency Gains: On the T-Pathfinder dataset, the dynamic slow-fast mechanism achieved a 279% increase in average FPS compared to a fixed-step baseline. On CamVid, the model reduced computational costs by 33% while maintaining comparable mean Intersection over Union (mIoU).
- Superior Accuracy through Recurrence: Reusing hidden states consistently outperformed "stateless" models. A RecSlowFast model using only one step per frame often surpassed the accuracy of a stateless model using four steps, demonstrating the power of temporal information transfer.
- Parameter Efficiency: By reusing a single set of weights across all recurrent steps, RecSlowFast achieves the performance of deep architectures with a fraction of the parameters, making it ideal for resource-constrained environments.
Conclusion and Future Work
RecSlowFast demonstrates that bio-inspired recurrence can significantly accelerate temporal visual processing through parameter reuse and dynamic computation. While the current model shows impressive gains, future work could explore multi-block recurrent architectures to further increase expressiveness and deployment on specialized low-power hardware to fully realize its energy-saving potential.
Summary updated