Abstract
The Spatial-Temporal Transformer (STTran) is a novel framework designed to generate dynamic scene graphs from video sequences. By leveraging a two-stage Transformer architecture—a spatial encoder for intra-frame relationships and a temporal decoder for inter-frame dependencies—STTran effectively captures how object interactions evolve over time, significantly outperforming static, image-based models.
Introduction
Traditional Scene Graph Generation (SGG) focuses on static images, representing objects as nodes and their relationships (e.g., "man-holding-bottle") as edges. However, real-world activities are inherently dynamic. In a video, a "man-holding-bottle" might transition to "man-drinking-from-bottle."
Static models struggle with video because they treat frames in isolation, missing the temporal context that clarifies ambiguous actions. Furthermore, existing video analysis tools like action recognition often treat events as "monolithic" (one label for the whole clip), whereas dynamic scene graphs provide a structured, frame-by-frame decomposition of what is actually happening. The challenge lies in efficiently processing varying video lengths while capturing both the immediate spatial layout and the long-term temporal flow.
The STTran Architecture
The authors propose STTran, which consists of three main phases:
- Feature Extraction: Using a Faster R-CNN backbone, the model identifies object proposals and extracts visual features, bounding boxes, and semantic class embeddings.
- Spatial Encoder: This module uses self-attention to reason about the visual relationships within a single frame. It allows objects to "talk" to each other to refine their relationship representations based on their spatial proximity and appearance.
- Temporal Decoder: This is the core innovation. It takes the spatially-refined features and applies a sliding window across the time dimension.
The Temporal Decoder incorporates Frame Encoding (similar to positional encoding in NLP) to help the model understand the sequence of frames. Instead of looking at the entire video at once, the decoder uses a sliding window to look at a local neighborhood of frames. This captures relevant motion dynamics without interference from distant, unrelated frames. Additionally, the model introduces a Multi-label Margin Loss, acknowledging that two objects can have multiple simultaneous relationships (e.g., a person can be both "in front of" and "watching" a TV).
Key Insights: Temporal Context and Constraints
A primary insight of this work is that Temporal Context Resolves Ambiguity. A person's hand near their mouth might look like "touching" in a single frame, but the temporal sequence reveals the action is "eating." STTran uses the "before and after" to fix these spatial misclassifications.
Furthermore, the authors introduce a "Semi Constraint" strategy. Most SGG benchmarks force a "With Constraint" rule, allowing only one relationship per pair. The authors argue this is unrealistic and propose a strategy that allows multiple high-confidence predictions, leading to much richer and more accurate scene descriptions.
Experimental Evaluation
The model was validated on Action Genome (AG), a large-scale benchmark for dynamic scene graphs built upon the Charades dataset. It contains approximately 234,000 frames with 35 object classes and 25 relationship classes.
STTran achieved state-of-the-art results on the Action Genome dataset across three standard tasks:
- Predicate Classification (PredCLS): Improved performance by 1.9% over the previous best model (GPS-Net).
- Scene Graph Classification (SGCLS): Showed consistent gains, proving that temporal info helps identify objects more accurately.
- Robustness to Sequence: In a "stress test," the authors shuffled or reversed 1/3 of the training videos. The model's performance dropped significantly, proving that it is truly learning temporal logic rather than just relying on static visual cues.
Limitations and Future Work
Despite its success, STTran faces an Object Detector Bottleneck. The model relies on a pre-trained, fixed Faster R-CNN; if the detector misses an object, the Transformer cannot recover it. Future work could involve end-to-end training where the Transformer helps refine object detection. Additionally, while the model captures relationship dynamics, it doesn't explicitly enforce Object Tracking (ensuring consistent IDs across frames). Integrating explicit tracking and addressing long-range dependencies beyond the sliding window remain open areas for research.
Summary updated