HENASY: Learning to Assemble Scene-Entities for Interpretable Egocentric Video-Language Model
Abstract
Current video-language models (VLMs) rely extensively on instance-level alignment between video and language modalities, which presents two major limitations: (1) visual reasoning disobeys the natural perception that humans do in first-person perspective, leading to a lack of reasoning interpretation; and (2) learning is limited in capturing inherent fine-grained relationships between two modalities.
In this paper, we take an inspiration from human perception and explore a compositional approach for egocentric video representation. We introduce HENASY (Hierarchical ENtities ASsemblY), which includes a spatiotemporal token grouping mechanism to explicitly assemble dynamically evolving scene entities through time and model their relationship for video representation. By leveraging compositional structure understanding, HENASY possesses strong interpretability via visual grounding with free-form text queries. We further explore a suite of multi-grained contrastive losses to facilitate entity-centric understandings. This comprises three alignment types: video-narration, noun-entity, verb-entities alignments.
Our method demonstrates strong interpretability in both quantitative and qualitative experiments; while maintaining competitive performances on five downstream tasks via zero-shot transfer or as video/text representation, including video/text retrieval, action recognition, multi-choice query, natural language query, and moments query.
1 Introduction
Recent advancements in technology and hardware devices for augmented reality (AR) have fueled hopes for virtual assistant applications that can provide users a wide range of assistance, such as real-time procedural instructions, moments retrieval, and interactive learning experiences, all through egocentric video streams of similar perspective with user. Publicly available massive-scale egocentric datasets such as Ego4D [1] and Epic Kitchens-100 [2], providing suites of egocentric tasks, have further sparked even more interest within the research community.
Video-language models (VLMs) have currently become a de-facto approach to egocentric video understanding. By learning robust visual-language representations from video-caption pairs [3], VLMs can be applied flexibly to a wide range of downstream tasks, either through zero-shot transfer or as modality encoders. Existing state-of-the-art (SOTA) VLMs for egocentric videos [4, 5, 6, 3] exhibit remarkable performances by following CLIP-like [7] dual-encoder architecture. During training, these models generally learn through the instance-level alignment [8, 3] between pairs of video and caption representations (Fig. 1(a)).
However, videos consist of complex and dynamic interactions among arbitrary entities, which cannot be effectively captured by simple instance-level alignment alone. In fact, a caption contains textual elements that concisely capture video entities. For examples, nouns indicate entity occurrences [4], while verb phrases convey motion information [9] in the video. To fully capture these fine-grained alignments, a VLM will perform more effectively if it: (1) understand videos in a bottom-up manner, where semantically similar patches form entities, and relationships between entities construct the video representation; and (2) explicitly model fine-grained relationships between video entities and nouns/verbs to comprehensively capture appearance/motion information, respectively.
Human perception aligns closely with the above requirements. We perceive the dynamic surroundings in a compositional manner [10], where distinct entities emerge from smaller parts that combine to form a whole. Each entity maintains spatial and temporal coherence and interacts with others only when in close proximity. Understanding the compositional structure of the surroundings enables us to intrinsically comprehend and memorize information, while also allowing us to provide interpretations of our decision-making process, which is absent in current egocentric VLMs.
Inspired by such observation, we propose HENASY: Hierarchical ENtities ASsemblY framework (pronounced heh-nuh-see), which follows compositional understanding as in Fig 1(b). Concretely, HENASY comprises three key components: (i) Local Entity Encoder, a hierarchical transformer-based encoder that learns to assemble dynamic scene-entities from video patches via our proposed spatiotemporal token grouping mechanism, which is an enhanced version from slot-based groupings in stationary images [11, 12]; (ii) Global Encoder, a pre-trained video representation module that perceives the input video at a global level; and (iii) Entity-Aware Decoder, which models the internal interactions among scene entities and their relationship with the global features, thereby enriching the entity-centric video representation extraction. Furthermore, HENASY is able to perform visual grounding to obtain dynamic segmentations corresponding to either entity or activity with the produced entity embeddings and their attention maps as a side product of its local entity encoder, showing promising interpretation via dynamic saliency maps across frames (Fig. 1(c)).
Developing an effective model necessitates a strong network architecture and well-defined objectives. With the proposed HENASY architecture, instance-level contrastive loss only handles global alignment, failing to address dynamic entity alignment. Hence, we introduce multi-grained contrastive losses to optimize HENASY for both entity- and video-level representations using narration alone. Specifically, HENASY is trained with three types of alignment: video-narration, noun-entity, and verb-entities. While the first two employ instance-level contrastive loss and model object occurrences via narration’s nouns, respectively, verb-entity alignment is newly introduced. It aims to incorporate activity/motion information from narration’s verb phrases into entities using a one-to-many strategy, which emphasizes the alignment of a verb phrase to the most semantically relevant entities. Additionally, we propose a new projection loss that employs detected hand/object boxes [4] to ensure segmentation masks tightly cover respective entities, enhancing HENASY’s interpretative robustness.
We are the first to demonstrate the value of compositional perception approach for egocentric video understanding. Our experiments show that by tasking our proposed local entity encoder to assemble dynamic entities, video representations are effectively improved to outperform current VLMs in a wide range of benchmarks, including video retrieval (EgoMCQ [3] & EpicKitchen-MIR [2]), activity recognition (EpicKitchen-CLS & EGTEA [13]) via zero-shot transfer. Furthermore, temporal localization models [14, 15] equipped with HENASY video/text features can achieve state-of-the-art performances in episodic memory tasks of EgoNLQ and EgoMQ [1]. Finally, HENASY possesses strong interpretability that is quantitatively and qualitatively superior to current VLMs.
2 Related Works
Video-Language Pre-Trained Models. Pre-training VLMs on a large-scale dataset of video-text pairs and deploying them in down-stream tasks has now become a standard practice. Transformer-powered pre-trained VLMs [16, 17, 18, 3, 6, 5, 4, 9] have accomplished superior results on a wide range of tasks, i.e., text-to-video retrieval, action recognition, or events localization. VLMs can be divided into two common categories, i.e., unified- and dual-encoder. The former models [18, 16] fuse multimodal via cross-attention and can be trained with proxy tasks of masked language modeling [19, 20] or masked frame modeling [18, 16]. The latter models [21, 3, 5, 6, 9] employ separate encoders for video and text, trained jointly via contrastive learning [8, 3].
Recently, several VLMs [4, 17, 9] employ fine-grained information from captions by decomposing them to capture object/activity through nouns/verbs, respectively. However, these models do not fully exploit fine-grained learning within the video encoder itself, and true granular-level alignment between modalities remains unexplored. In our work, we explicitly model visual content as dynamic entities, capturing their interactions to form a comprehensive video representation. Additionally, our proposed method is trained with multi-grained objectives, ranging from video-text, noun-entity, to verb-entities pairs.
Interpretation via Object Discovery. Recent years have seen a growing body of research in end-to-end learning of object discovery, which learns to decompose an image or a video into distinct objects without direct supervision. Slot-based methods such as IODINE [22] and Slot Attention [11] utilize mixture-model likelihoods [23] to tackle this challenge, demonstrating promising performance through evaluations on synthetic images with simple objects. Subsequently, GroupViT [12] and ODIN [24] incorporate slot attention with contrastive learning and achieved notable success in identifying semantic groupings on natural in-the-wild images. However, these models are not capable of modeling dynamic objects in videos domain. To mitigate this problem, SaVI++ [25] proposes a workaround technique, which requires groundtruth depth information in a reconstruction objective to bootstrap object discovery training. In our work, we enhance slot-based grouping mechanisms introduced in GroupViT [12] to model temporal coherency of dynamic objects in videos. Different from [25], HENASY does not require any extra data further than color video sequences. Instead, HENASY utilizes learned patch features of pre-trained global encoder to bootstrap several early layers of its local entity encoder for entities grouping via a cross-attention mechanism.
3 Preliminaries
Video-language representation learning aims to learn a common latent space to represent video and text. A training dataset for this task comprises of tuples , where denotes a short sequence of RGB frames, and is a free-form text sentence that describes visual content.
Dual-encoder architecture is a common paradigm that current SOTA VLMs [4, 5, 3] employ for the above task, which consists of (a) a visual encoder mapping the input video to a visual embedding feature , and (b) a language encoder mapping the text to a linguistic embedding feature .
Contrastive-based losses are common objective for video-language representation. Given a batch of normalized video-text embedding pairs , a contrastive-based loss pulls embeddings of aligned (positive) pairs close in feature space, while pushing embeddings of misaligned (negative) pairs away. We adopt EgoNCE variation [3] of contrastive loss as one of our training objectives because of its effective approach in identifying positive and negative pairs. Specifically, each sample is associated to a set of positives constructed by comparing nouns and verbs across all texts. Additionally, for each sample , a hard negative is sampled from a temporally adjacent segment within the same video, expanding our batch to . For a more in-depth discussion on the strategy used for sample selection, refer to [3]. Herein, the video-to-text objective is succinctly expressed as:
(1) |
The objective of text-to-video is derived from Eq. 1 by inverting and , and EgoNCE loss is a summation of both directions .
4 HENASY
We present the HENASY framework (Fig. 2) for egocentric video-language modeling. HENASY is a compositional video understanding approach featuring a dual-encoder architecture, designed to explore an interpretable, entity-based visual representation. Specifically, besides typically capturing global features via global encoder (Sec. 4.1), our video encoder also assembles dynamic scene entities from video patches via local entity encoder (Sec. 4.2), then entity-aware decoder (Sec. 4.3) models their intra-connections as well as inter-connections with global features to form a comprehensive video representation. Our objective is to develop an interpretable reasoning process that robustly supports decision-making, while allowing visual grounding with text queries. To achieve this target, it requires not only an effective network design, but also a suite of multi-grained contrastive learning (Sec. 4.4) to enforce both entity-level and video-level representations.
For readability, we denote five types of tokens as follows: z for video patch tokens, c for learnable video tokens, g for learnable group tokens, s for segment tokens, and e for entity tokens.
4.1 Global Encoder
Global encoder provides global visual information of the entire input video. We adopt the pre-trained TimeSFormer [26] to capture the global visual context of the entire input video. Particularly, we follow the protocol of [3, 5, 4] to decompose the given input video sequence with RGB frames or resolution into non-overlapping patches of resolution , where . Then, every patch is linearly projected by a 2D convolutional layer, forming video patch tokens (with ) representing embedding features at every temporal and spatial location, where is hidden dimension. TimeSFormer processes the video patch tokens with an additional learnable video tokens through a stack of divided space-time attention (DST) blocks, which is described as follows: Please see Sec. A in the appendix for more details of a DST block.
4.2 Local Entity Encoder
Local entity encoder models fine-grained information of the input video by consistently capturing dynamic scene-entities. We adopt a hierarchical bottom-up architecture, consisting of attention-based layers that are divided into multiple stages. Each stage progressively groups small video patch tokens from the previous stage into larger segments. As a result, local entity encoder forms scene entity tokens that depict individual entities, which dynamically evolve across video frames.
While following GroupViT [12] to directly process input video patch tokens could be an option, we find doing that diminishes performance. Additionally, the tokens grouping mechanism from [12, 11] is not capable of modeling dynamic entities in videos domain. To address these challenges, we introduce a bootstrapping stage, which couples itself with early layers of the global encoder through cross-attention to group video patches into initial entities’ segments. Furthermore, to capture dynamic entities in video, we introduce temporal-aware grouping mechanism.
Bootstrapping Stage. Bootstrapping stage consists of consecutive cross-attention layers, which takes a set of learnable group tokens as initial queries ( is the initial number of tokens). At each cross-attention layer starting from 0, the queries aggregate information from the patch tokens at corresponding layer of global encoder:
(2) |
At the final layer of bootstrapping stage, we obtain . This is then associated with patch tokens from the corresponding layer of global encoder within temporal-aware grouping block (TAG) to group patches into larger segment tokens:
(3) |
Herein, merges key tokens together based on their similarities with query , while preserving the temporal dimension of key tokens (discussed in detail later). As a result, we obtain new segment tokens , which is then utilized as inputs to the entity grouping stage.
Entity Grouping Stage. From this point, local entity encoder is decoupled from the global encoder and is trained to merge these input segments s into complete scene entities e. At this stage, a new set of learnable group tokens is introduced, which aims to relate segment tokens with similar semantics into an individual scene entity. It is important to note that maintaining consistent temporal dynamics is required at each stage. Therefore, we adopt DST blocks [26] to propagate information mutually between learnable group tokens and segment tokens: , for .
After the final layer, segment tokens are grouped to generate intermediate entity tokens, i.e., . Then, to enable interactions between scene entities and across temporal dimension, we apply a stack of DST blocks to all entity tokens: , for .
We observed that segment tokens and entity tokens facilitate temporal consistencies within the temporal attention of a DST block. Unlike in TSF [26], where tokens are spatially limited within a patch, these tokens can evolve freely across frames, enhancing the flexibility of the time-attention mechanism in a DST block. To obtain spatio-temporal entity embeddings, we apply temporally average pooling on entity tokens of the final layer: , where and .
Temporal-Aware Grouping (TAG). As aforementioned, TAG is employed at the final layers of bootstrapping stage and entity grouping stage, to merge semantically similar tokens (i.e., z or s) into a larger segment while preserving the temporal dimension. Generally, this mechanism takes a set tokens ( i can be either z or s) as inputs and a set of learnable group tokens as queries. We re-shape i into 3-dimension and evaluate the similarity between and i.
It firstly evaluates similarity between each group token and every input token, forming a 3D similarity matrix . Then, an assignment matrix is computed, assigning each input token to the most relevant group based on similarity scores. Finally, it performs per-frame groupings, merging the input tokens of the same group together, forming a set of new tokens representing larger segments. We formalize the computation of every new group as follows:
(4) |
Afterwards, we re-shape to as output of TAG. The computation of similarity A and assignment matrices, along with deriving saliency maps of assignments between video patches and entities for interpretability, is detailed in Sec. B in appendix.
4.3 Entity-Aware Decoder
We seek to propagate entity-level features from the local entity encoder to the final video embedding for a comprehensive video representation. For this purpose, we introduce entity-aware decoder, which is illustrated in Fig. 3. Entity-aware decoder includes a stack of hybrid-attention blocks to refine the interactions between entities and video patches, and render the video embedding. At a block , it first performs cross-attention with entity tokens as queries and patch tokens as keys, values. Then, self-attention followed by a multi-layer perceptron (MLP) is applied over the output:
(5) |
Eventually, we obtain the video representation, dubbed as entity-aware video embedding , by averaging the final outputs of entity tokens:
(6) |
4.4 Multi-grained Contrastive Learning
Beside video-narration contrastive loss [8, 3], which captures coarse-grained semantic alignment between the video and narration, we introduce two finer-grained contrastive losses: noun-entity contrastive loss (NEC) and verb-entities contrastive loss (VEC), which focuses on inducing visual appearance and motion cues directly to the composed entities. We also utilize projection loss, leveraging object boxes from an off-the-shelf detector [27] as a weak supervision to encourage the generated entity masks tightly conforming to the corresponding entity, promoting robust interpretability of our proposed model.
Noun-Entity Contrastive Loss (NEC). From the groundtruth narration, we obtain nouns and their embeddings via the text encoder. Following [4], we compute a similarity matrix between noun embeddings and entity embeddings. Every noun is matched with an entity token having highest similarity score via Hungarian matching. Following this, we construct a noun-entity contrastive loss using the InfoNCE [8], where positive pairs consist of the matched noun embedding and entity embedding . The contrast is defined over the embeddings of all nouns in the dataset taxonomy dictionary [1]:
(7) |
Verb-Entities Contrastive Loss is a new loss term that instills motion information directly into entity tokens from narration’s verb phrases. As suggested in [9] that LLMs are superior to classical methods such as part-of-speech tagging in retrieving verb phrases, we use a LLama-2 [28] to obtain verb phrases from an input narration. Given that a verb phrase describes an activity involving several scene entities, we introduce weighted many-to-one alignment strategy to prioritize the most relevant entity-verb alignments. Firstly, let be one of the embedded verb phrases, we obtain a Softmax-normalized similarity scores between and every entity : . Then, we re-weight entities by the computed weight and obtain a weighted average of entities representation: . Here, re-weights each entity based on its relevancy with verb phrase . Finally, we compute contrastive loss between this paired representations:
(8) |
where we utilize batch formation technique from egocentric contrastive loss [3] to form negatives set in .
Projection Loss operates on each individual frame of the input video, utilizing an external object detector [27] to identify bounding boxes of scene entities. Let be the predicted foreground probability maps of scene entities, Hungarian matching pairs each detected box with the predicted mask having the highest IoU.
Designing a differentiable loss function that guides the predicted mask by groundtruth box is quite challenging. To address this, we utilize an axis projection function [29] to minimize the discrepancy of vertical and horizontal projections of and on two axes. This ensures that the smallest box encompassing matches with . Concretely, is firstly converted to binary mask format where pixels inside is assigned by 1 and 0 otherwise. Then, a projection loss is defined as follows:
(9) |
where is a Dice loss function [30], and are max-project operators along -axis and -axis of the frame, respectively.
Total Optimization. Overall, our model is optimized with a weighted sum of EgoNCE loss over video-text pairs and three objectives stated above:
(10) |
where , , and balance contributions of different loss terms.
5 Experiments
5.1 Training and Implementation Details
Architecture. We use video clip inputs of size , text inputs are tokenized and processed by a 12-layer Transformer following [5]. We employ TimeSFormer [26] Base (TSF-B) for the global encoder. In the local entity encoder, all layers share a hidden dimension . Bootstrapping stage includes cross-attention layers with 64 group tokens. Entity grouping stage consists of DST blocks with 8 group tokens, followed by DST blocks. Entity-aware decoder is a stack of 3 hybrid-attention blocks.
Training. HENASY is trained on EgoClip [3], which contains 3.8M clip-narration pairs covering a sub-set of 2,927 video hours from Ego4D [1]. For each video clip, we uniformly sample 4 frames. We employ the pre-extracted narration’s nouns and pre-detected hand and object bounding boxes from [4] for NEC loss and projection loss, respectively. For verb phrases, we employ LLama-2 [28] with a prompt as discussed in Sec.C. The loss weights in Eq. 10 are set as: . We train HENASY on two A6000 GPUs, in 5 epochs with AdamW optimizer [31] at fixed learning rate of , and with batch size of 128. We initialize global encoder and text encoder with pretrained model provided from [5], but freeze them in the entire training process.
5.2 Benchmarks and Evaluation Protocols
Ego4D benchmarks [1]. Ego4D is the largest publicly available egocentric video dataset, featuring 3,670 hours of daily-life activity video for a wide range of benchmarks. We evaluate on three tasks:
-
•
EgoMCQ [3]: A multi-choice questions task to select the correct video clip from 5 candidates for each query. Accuracy is evaluated in intra-/inter-video (candidates from the same/different video).
-
•
EgoNLQ: A sub-task in episodic memory involving localizing video intervals that answer a given a free-form text query. Evaluation metrics include Recall@ for mIoU thresholds , where and .
-
•
EgoMQ: Also a sub-task of episodic memory, it involves identifying and categorizing action instances from 110 activity classes. Evaluation metrics are recalls (at mIoU=0.5) and mean Average Precision (mAP).
EpicKitchens 100 benchmarks [2]: This dataset focuses on indoor and kitchen activities with 100 hours of video. We evaluate two tasks:
-
•
EK100-MIR: A multi-instance retrieval task evaluating video and narration matching in both TV and VT. Metrics are mAP and normalized Discounted Cumulative Gain (nDCG).
-
•
EK100-CLS: A action recognition task classifying videos into 300 noun classes or 97 verb classes. Metrics are Top-1 and Top-5 accuracy.
EGTEA benchmark [13]: This dataset contains 28 hours of video with 106 classes. We evaluate fine-grained cooking action recognition EGTEA and report Top-1 and mean accuracies.
Evaluation Protocols. We evaluate our model using three protocols:
-
•
Zero-Shot Transfer assesses generalization on unseen data and tasks without extra tuning. We conduct zero-shot evaluation EgoMCQ, EK100-MIR, EK100-CLS, and EGTEA.
- •
- •
Methods | EgoMCQ | EK100-MIR | EK100-CLS | EGTEA | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Inter | Intra | mAP | nDCG | Top-1 | Top-5 | Top-1 | Mean | |||||
V-T | T-V | Avg | V-T | T-V | Avg | Acc | Acc | Acc | Acc | |||
EgoVLP [3] | 90.6 | 57.2 | 26.0 | 20.6 | 23.3 | 28.8 | 27.0 | 27.9 | - | - | 17.6 | - |
EgoVLPv2 [6] | 91.0 | 60.9 | - | - | 26.7 | - | - | 29.1 | - | - | - | - |
LaViLa [5] | 93.8 | 59.9 | 35.1 | 26.6 | 30.9 | 33.7 | 30.4 | 32.0 | 16.4 | 34.4 | 35.5 | 28.9 |
HelpingHands* [4] | 93.2 | 58.8 | 35.6 | 26.8 | 31.2 | 34.7 | 31.7 | 33.2 | - | - | 35.3 | 29.4 |
Ours | 94.1 | 61.3 | 35.5 | 27.1 | 31.3 | 34.6 | 31.7 | 33.2 | 19.5 | 38.2 | 35.9 | 29.6 |
5.3 Main Results
Comparison in Zero-shot Transfer. In Table 1, to ensure fairness, we re-train HelpingHands [4] using their official codebase with TSF-B backbone and the same pre-trained weights as ours, provided by LaViLa [5]. Our model consistently outperforms previous SOTA, achieving 3.1% improvement in top-1 accuracy on EK100-CLS, 0.5% and 0.3% increase in intra- and inter-video accuracy on EgoMCQ, and 0.5% improvement in mean accuracy on EGTEA. It also competes competitively with HelpingHands in the video/text retrieval EK100-MIR. Overall, our method demonstrates strong performance for zero-shot transfer across multiple benchmarks.
Comparison in Visual & Textual Representation. In Table 2, our method outperforms prior SOTA models across all metrics in EgoNLQ by adequate gaps. In EgoMQ, HENASY shows comparable performance, particularly excelling in mAP where it surpasses SOTA by 1%. This highlights HENASY’s effectiveness when being applied to downstream models for features extraction.
Vision-Language Grounding We include qualitative experiment (Fig. 4) to compare with HelpingHands [4], which, in our knowledge, is the only VLM including weak visual grounding capacity via bounding boxes. As we can see, HENASY provides stronger interpretation with saliency maps reflecting dynamically evolving regions that most related to both appearance and motion queries. Furthermore, HelpingHands cannot correctly perform grounding with verb phrases (e.g., "scrolling the phone"), therefore, we show the bounding box of noun instead (e.g., "phone").
Methods | EgoNLQ | EgoMQ | |||||
---|---|---|---|---|---|---|---|
[email protected] | [email protected] | [email protected] | [email protected] | mAP | |||
R1 | R5 | R1 | R5 | ||||
SlowFast [32] | 5.5 | 10.7 | 3.1 | 6.6 | 25.2 | 46.2 | 6.0 |
EgoVLP [3] | 10.8 | 18.8 | 6.8 | 13.5 | 30.1 | 52.0 | 11.4 |
LaViLa(B) [5] | 10.5 | 19.1 | 6.7 | 13.6 | 27.4 | 49.0 | 11.3 |
HelpingHands* [4] | 11.2 | 20.4 | 6.9 | 14.7 | 27.5 | 49.0 | 11.7 |
Ours | 11.5 | 21.5 | 7.0 | 14.7 | 28.3 | 51.0 | 12.4 |
5.4 Ablation Studies
Impact of Entity-Aware Decoder: We assess the effect of entity-aware (EA) decoder on zero-shot tasks in the first two rows of Table 4. In the first experiment, we omit the proposed decoder and simply operate entity tokens through an average pooling to obtain video representations, the performance drops significantly (2% across benchmarks) compared to using the proposed decoder as shown in the second experiment. These ablation experiments show that modeling interactions between global features and entity embeddings plays an important role in our model, and the proposed design of entity-aware decoder is beneficial to the overall performance.
Impact of Bootstrapping Stage: Next, we report the effect of bootstrapping stage in the third row of Table 4, where we remove bootstrapping stage by directly processing video patch tokens. The performance degrades by 1% across all benchmarks, showing the effectiveness of this design choice.
Losses: We investigate various combinations of multi-grained loss components and report results in Table 4. We found that HENASY trained only with instance-level loss yields 1-2% lower across all benchmarks compared to full loss setting. Besides, contributes slightly more to performance gains in EgoMCQ and EK100-MIR, compared to . Finally, shows a slight improvement of the overall performance.
Model designs | EgoMCQ | EK100-MIR | EK100-CLS | |||
---|---|---|---|---|---|---|
Inter | Intra | Avg | Avg | Top-1 | Top-5 | |
mAP | nDCG | Acc | Acc | |||
w/o EA Decoder | 87.6 | 47.9 | 18.8 | 25.5 | 6.7 | 18.1 |
w/ EA Decoder | 93.3 | 59.1 | 30.4 | 32.8 | 18.0 | 36.3 |
w/o Bootstrapping | 92.6 | 59.2 | 31.1 | 32.6 | 19.2 | 37.9 |
complete settings | 94.1 | 61.3 | 31.3 | 33.2 | 19.5 | 38.2 |
Loss Settings | EgoMCQ | EK100-MIR | EK100-CLS | ||||||
---|---|---|---|---|---|---|---|---|---|
Inter | Intra | Avg | Avg | Top-1 | Top-5 | ||||
mAP | nDCG | Acc | Acc | ||||||
\faCheckSquareO | \faTimes | \faTimes | \faTimes | 93.4 | 58.4 | 30.8 | 32.7 | 18.2 | 36.8 |
\faCheckSquareO | \faCheckSquareO | \faTimes | \faTimes | 93.6 | 59.9 | 30.9 | 32.8 | 19.1 | 37.5 |
\faCheckSquareO | \faTimes | \faCheckSquareO | \faTimes | 93.7 | 59.7 | 31.1 | 32.9 | 18.9 | 37.3 |
\faCheckSquareO | \faTimes | \faTimes | \faCheckSquareO | 93.2 | 58.5 | 30.8 | 32.6 | 18.5 | 37.0 |
\faCheckSquareO | \faCheckSquareO | \faCheckSquareO | \faTimes | 94.0 | 61.1 | 31.3 | 33.0 | 19.3 | 37.7 |
\faCheckSquareO | \faCheckSquareO | \faCheckSquareO | \faCheckSquareO | 94.1 | 61.3 | 31.3 | 33.1 | 19.3 | 38.2 |
HelpingHands | Ours | |
---|---|---|
Autoregressive | \faCheckSquareO | \faTimes |
GFLOPs (per clip) | 530M | 599M |
Number of Parameters | 216M | 291M |
GPU Memory (train) | 38GB | 42GB |
GPU Memory (inference) | 4.4GB | 4.8GB |
Inference Time (seconds) | 2.87 | 1.02 |
Computational and Memory Costs: We compare our method with HelpingHands [4] in Table 5. Our model is slightly more expensive but quite competitive in terms of memory requirements, the number of parameters and GFLOPs. Importantly, our inference time is 3 times faster than that of the HelpingHands. This superior running time of HENASY compared to HelpingHands can be attributed to HelpingHands’ utilization of an autoregressive decoder, which reduces parallel computations and makes it less efficient despite its lower computational cost.
6 Conclusions
In this work, we explored the Hierarchical Entities Assembly framework, dubbed HENASY, which is designed to improve video representation of previous vision-language models by addressing their limitations in fine-grained modeling. Our model explicitly captures the dynamic interactions between visual entities to form a comprehensive video representation. Our experiments showed that HENASY outperforms existing SOTA methods across challenging egocentric video understanding benchmarks like EgoMCQ, EK100-MIR, EK100-CLS, EgoNLQ, and EgoMQ in both zero-shot transfer and feature extraction settings, while also demonstrating strong interpretation capabilities. Despite these strengths, there are several opportunities for future work to improve our model further.
Limitations and Future Works Although our focus has been on tasks utilizing ViT encoders for a variety of benchmarks, we believe it is important to extend HENASY to generative tasks such as video generation (e.g., stable diffusion) or to handle long-form videos. While HENASY can provide interpretability by focusing on relevant scene entities for both objects and actions, it is still limited in explicitly showing the interactions between scene entities. This necessitates the development of a dynamic scene graph, which remains an open question due to the unavailability of data.
References
- [1] Kristen Grauman, Andrew Westbury, Eugene Byrne, Zachary Chavis, Antonino Furnari, Rohit Girdhar, Jackson Hamburger, Hao Jiang, Miao Liu, Xingyu Liu, et al. Ego4d: Around the world in 3,000 hours of egocentric video. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 18995–19012, June 2022.
- [2] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Antonino Furnari, Jian Ma, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, and Michael Wray. Rescaling egocentric vision: Collection, pipeline and challenges for epic-kitchens-100. International Journal of Computer Vision (IJCV), 130:33–55, 2022.
- [3] Kevin Qinghong Lin, Jinpeng Wang, et al. Egocentric video-language pretraining. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems, 2022.
- [4] Chuhan Zhang, Ankush Gputa, and Andrew Zisserman. Helping hands: An object-aware ego-centric video recognition model. In International Conference on Computer Vision (ICCV), 2023.
- [5] Yue Zhao, Ishan Misra, Philipp Krähenbühl, and Rohit Girdhar. Learning video representations from large language models. In CVPR, 2023.
- [6] Shraman Pramanick, Yale Song, Sayan Nag, Kevin Qinghong Lin, Hardik Shah, Mike Zheng Shou, Rama Chellappa, and Pengchuan Zhang. Egovlpv2: Egocentric video-language pre-training with fusion in the backbone. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 5285–5297, October 2023.
- [7] Alec Radford, Jong Wook Kim, et al. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, ICML 2021, volume 139 of Proceedings of Machine Learning Research, pages 8748–8763, 2021.
- [8] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding, 2019.
- [9] Liliane Momeni, Mathilde Caron, Arsha Nagrani, Andrew Zisserman, and Cordelia Schmid. Verbs in action: Improving verb understanding in video-language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 15579–15591, October 2023.
- [10] Irving Biederman. Recognition-by-components: a theory of human image understanding. Psychological review, 94 2:115–147, 1987.
- [11] Francesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-centric learning with slot attention. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 11525–11538. Curran Associates, Inc., 2020.
- [12] Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, and Xiaolong Wang. Groupvit: Semantic segmentation emerges from text supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 18134–18144, June 2022.
- [13] Yin Li, Miao Liu, and James M. Rehg. In the eye of beholder: Joint learning of gaze and actions in first person video. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, Computer Vision – ECCV 2018, pages 639–655, Cham, 2018. Springer International Publishing.
- [14] Chen Zhao, Ali K. Thabet, and Bernard Ghanem. Video self-stitching graph network for temporal action localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 13658–13667, October 2021.
- [15] Hao Zhang, Aixin Sun, Wei Jing, Liangli Zhen, Joey Tianyi Zhou, and Rick Siow Mong Goh. Natural language video localization: A revisit in span-based question answering framework. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(8):4252–4266, 2022.
- [16] Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L. Berg, Mohit Bansal, and Jingjing Liu. Less is more: Clipbert for video-and-language learning via sparse sampling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7331–7341, June 2021.
- [17] Yuying Ge, Yixiao Ge, Xihui Liu, Dian Li, Ying Shan, Xiaohu Qie, and Ping Luo. Bridging video-text retrieval with multiple choice questions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16167–16176, June 2022.
- [18] Jinpeng Wang, Yixiao Ge, Rui Yan, Yuying Ge, Kevin Qinghong Lin, Satoshi Tsutsui, Xudong Lin, Guanyu Cai, Jianping Wu, Ying Shan, Xiaohu Qie, and Mike Zheng Shou. All in one: Exploring unified video-language pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 6598–6608, June 2023.
- [19] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision – ECCV 2020, pages 104–120, Cham, 2020. Springer International Publishing.
- [20] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language, 2019.
- [21] Max Bain, Arsha Nagrani, Gül Varol, and Andrew Zisserman. Frozen in time: A joint video and image encoder for end-to-end retrieval. In IEEE International Conference on Computer Vision, 2021.
- [22] Klaus Greff, Raphaël Lopez Kaufman, Rishabh Kabra, Nick Watters, Christopher Burgess, Daniel Zoran, Loic Matthey, Matthew Botvinick, and Alexander Lerchner. Multi-object representation learning with iterative variational inference. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2424–2433. PMLR, 09–15 Jun 2019.
- [23] Klaus Greff, Sjoerd van Steenkiste, and Jürgen Schmidhuber. Neural expectation maximization. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
- [24] Olivier J. Hénaff, Skanda Koppula, Evan Shelhamer, Daniel Zoran, Andrew Jaegle, Andrew Zisserman, João Carreira, and Relja Arandjelović. Object discovery and representation networks. In Shai Avidan, Gabriel Brostow, Moustapha Cissé, Giovanni Maria Farinella, and Tal Hassner, editors, Computer Vision – ECCV 2022, pages 123–143, Cham, 2022. Springer Nature Switzerland.
- [25] Gamaleldin F. Elsayed, Aravindh Mahendran, Sjoerd van Steenkiste, Klaus Greff, Michael C. Mozer, and Thomas Kipf. SAVi++: Towards end-to-end object-centric learning from real-world videos. In Advances in Neural Information Processing Systems, 2022.
- [26] Gedas Bertasius, Heng Wang, and Lorenzo Torresani. Is space-time attention all you need for video understanding? In Proceedings of the International Conference on Machine Learning (ICML), July 2021.
- [27] Dandan Shan, Jiaqi Geng, Michelle Shu, and David F. Fouhey. Understanding human hands in contact at internet scale. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020.
- [28] Hugo Touvron, Louis Martin, et al. Llama 2: Open foundation and fine-tuned chat models, 2023.
- [29] Zhi Tian, Chunhua Shen, Xinlong Wang, and Hao Chen. Boxinst: High-performance instance segmentation with box annotations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5443–5452, June 2021.
- [30] Carole H. Sudre, Wenqi Li, Tom Vercauteren, et al. Generalised dice overlap as a deep learning loss function for highly unbalanced segmentations. In Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support, pages 240–248, Cham, 2017. Springer International Publishing.
- [31] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
- [32] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, October 2019.
- [33] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017.
- [34] Aaron van den Oord, Oriol Vinyals, and koray kavukcuoglu. Neural discrete representation learning. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
Appendix
Appendix A Divided Space-Time Block
Divided Space-Time (DST) block [26] is mainly utilized in the global encoder and entity grouping stage of the local entity encoder in our HENASY framework.
In global encoder, DST typically takes a concatenation of learnable CLS token and video patch tokens, i.e., as inputs. While in the local entity encoder, inputs to DST comprises segment tokens and segment tokens .
A DST block reduces computational cost of a full space-time attention by factorizing it into time and space attention, consecutively:
where are query, key, and value vectors, respectively, which are linearly projected from the input of DST block after being split by number of heads. Likewise, are query, key, and value vectors derived from .
Appendix B Temporal-Aware Grouping
B.1 Details of Tokens Assignment and Grouping
Similarity Computation.
Given learnable group tokens and input tokens to be grouped , we follow [12] to compute the 3D similarity array between each video-level group token and every segment token , where and are temporal and spatial indices, respectively. Gumbel-Softmax [33] is then applied to rescale similarity matrices over group tokens:
(11) |
where and are learned linear projections for group and segment tokens, respectively, and is sampled from distribution.
Group Assignment. Afterwards, a segment token is hardly assigned to a group token via operation over group tokens (non-differentiable) with the straight-through trick [34] to allow end-to-end training:
(12) |
where is a stop-gradient function, and operator converts the assigned group indices into one-hot vectors.
B.2 Saliency Map Generation
Saliency maps of each dynamic entity that evolving across frames of input video can be constructed from similarity arrays produced in temporal-aware grouping layers at bootstrapping and entity grouping stage. Let denote them as and , respectively. We first compute the assignment probability array between video patches at each frame and final entity tokens by the following equation:
(13) |
where is a frame index in , and ( is the number of patches per frame). Then, saliency maps can be obtained via softmax activation function over the patches . Splitting the saliency array over entity dimension, we can obtain saliency maps of all frames, each of which highlights the spatial location and shapes of the corresponding entity.
Appendix C Verb Phrase Generation
We utilize LLama-2 [28] to generate verb phrases from narration due to its superior performance in processing free-form texts. Below is a prompt we design to capture verb phrases:
-
•
System: "Act as if you are a robot that only outputs python list of strings."
-
•
User: "Task: You are given an input sentence. Your job is to output the action verb phrases, which are always starting by a verb-ing."