GenRec: Unifying Video Generation and Recognition with Diffusion Models

Video diffusion models are able to generate high-quality videos by learning strong spatial-temporal priors on large-scale datasets. In this paper, we aim to investigate whether such priors derived from a generative process are suitable for video recognition, and eventually joint optimization of generation and recognition. Building upon Stable Video Diffusion, we introduce GenRec, the first unified framework trained with a random-frame conditioning process so as to learn generalized spatial-temporal representations. The resulting framework can naturally supports generation and recognition, and more importantly is robust even when visual inputs contain limited information. Extensive experiments demonstrate the efficacy of GenRec for both recognition and generation. In particular, GenRec achieves competitive recognition performance, offering 75.8% and 87.2% accuracy on SSV2 and K400, respectively. GenRec also performs the best on class-conditioned image-to-video generation, achieving 46.5 and 49.3 FVD scores on SSV2 and EK-100 datasets. Furthermore, GenRec demonstrates extraordinary robustness in scenarios that only limited frames can be observed. Code will be available at https://github.com/wengzejia1/GenRec.

Paper

References (59)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer C3Pd5/10 · confidence 5/52024-07-08

Summary

This paper explores the use of video diffusion models for joint generation and recognition. The authors introduce a framework called GenRec, based on Stable Video Diffusion, that aims to unify video generation and recognition. GenRec employs a random-frame conditioning process to learn generalized spatial-temporal representations, making it robust even with limited visual inputs. Experiments show that GenRec excels in both video recognition and generation. Additionally, GenRec proves to be highly robust in scenarios with limited frame availability.

Strengths

1. The integration of MAE and Diffusion models is a practical and innovative approach to unify video generation and recognition tasks. 2. The experiments are comprehensive, covering video generation, video prediction, and video recognition. The provided results demonstrate strong performance of the model across all tasks.

Weaknesses

1. The notations used in the Preliminary Section are inconsistent. The authors should review and correct the formulations for clarity. 2. In Section 3.3, the authors claim to have adopted the stochastic sampler in EDM, but it appears that the second-order correction is not included according to Algorithm 2 in EDM. The authors are encouraged to provide justifications for this omission. 3. In the derivation on Line 156, it is unclear why such a replacement can be used for the original score function. Additionally, the derivation from Equations 14 to 16 lacks clarity. The authors should provide more detailed explanations. 4. In Table 1, the generative performance of Baseline I should be included. Furthermore, information on parameter counts and computational overhead should also be presented. 5. There are misspellings such as "mensioned" on Line 135 and "interatively" on Line 147. These should be corrected.

Questions

Can you provide more details on the derivation of Eq.14-16?

Rating

5

Confidence

5

Soundness

3

Presentation

2

Contribution

3

Limitations

The authors have mentioned the limitations.

Reviewer C3Pd2024-08-13

Post-rebuttal comments

Many thanks for the authors' response. I've checked the authors' rebuttal and other reviewers' comments. I think the response has addressed my concerns. Therefore, I decide to raise the score to 5. Moreover, is it possible for the authors to provide the derivation from Eq. 3 to Eq. 4? The derivation is a bit confusing to me.

Authorsrebuttal2024-08-13

Thank you for reviewing our work and providing valuable feedback. We are pleased that we have been able to address your concerns. - For the Eq. 3 and Eq. 4 in the preliminary section of our paper, the equations are from Eq. 2 and Eq. 3 in the EDM paper. - For the Eq. 3 to Eq. 4 in our rebuttal, here is a detailed explanation: Eq. 17 in our paper outlines the calculation method for the class-conditioned denoising residual $\epsilon^{*}_{\theta}(\hat{\mathbf{z}}_i;\overline{\mathbf{z}}_0)$. We can apply this iteratively as follows: $$ z_{i-1} = \hat{z_i} + \epsilon_{\theta}^{*}( \hat{z_i};\overline{z_0} ) $$ $$ z_{i-2}= {z_{i-1}} + \epsilon_{\theta}^{*}(z_{i-1};\overline{z_0}) $$ Following line 8 in Algorithm 2 of EDM, we can compute the terms: $$ d_{i} = \frac{{z_{i-1}} - \hat{z_{i}}}{t_{i-1}-\hat{t_{i}}} = \frac{ \epsilon_{\theta}^{*}( \hat{z_i};\overline{z_0}) }{t_{i-1}-\hat{t_{i}}} $$ $$ \begin{align} d_{i}^{'} = \frac{z_{i-2}-z_{i-1}}{t_{i-2}-t_{i-1}} = \frac{\epsilon_{\theta}^{\*}(z_{i-1};\overline{z_0}) }{t_{i-2}-t_{i-1}} =\frac{\epsilon_{\theta} ^{\*} (\hat{z_i} + {\epsilon_{\theta}^{\*} (\hat{z_i};\overline{z_0})};\overline{z_0}) }{t_{i-2}-t_{i-1}} \end{align} $$ Using the second-order correction, and by substituting these two terms into line 11 of Algorithm 2 in EDM, we obtain: $$ \begin{align} z_{i-1}^{corr} & = z_i + \frac{1}{2}{(t_{i-1} - \hat{t_i})}(d_i + d_{i}^{'}) = z_i + \frac{1}{2} {\epsilon_{\theta}^{\*} (\hat{z_i};\overline{z_0})} + \frac{1}{2}\frac{t_{i-1} - \hat{t_i}}{t_{i-2}-t_{i-1}} \epsilon_{\theta} ^{\*} (\hat{z_i} + {\epsilon_{\theta}^{*} (\hat{z_i};\overline{z_0})};\overline{z_0}) \end{align} $$ Thank you again for your positive recognition and thoughtful feedback. We greatly appreciate the time and effort you have taken to review our work.

Reviewer 96MS9/10 · confidence 5/52024-07-11

Summary

The paper proposes to unify video recognition and generation with a masked finetuning of SVD (diffusion video model). By training with both classification and generation objectives, the model learns to do both. Rather than training with first frame only for conditioning, the masking is employed so that the classifier can learn better. The resulting model has recognition performance that is actually enhanced by the generative part of the training, and results are given across various tasks and subtasks, including action prediction and generating videos given multi-frame conditioning.

Strengths

[S1] The method has good results as a unified model, and introduces a novel way to finetune video diffusion for both recognition and generation, performing very well on both tasks. Such a system is important because ideally it saves on storage cost (no need to store a model for each task, just store 1 for both), training time, makes better use of data (training with supervised text losses and unsupervised generative losses), and should synergize between the tasks to form a true world model. [S2] The fact that the generative training helps the classification performance, as shown in Table for example, offers critical evidence to support the paper's claim that it unifies generation and recognition (rather than them competing with each other). [S3] Baseline I and Baseline II are very helpful for contextualizing the performance of the model, showing what is possible with the CE training alone.

Weaknesses

[W1] It is unclear why the paper compares with methods that pretrain on only kinetics and imagenet (like Hiera) when GenRec uses the SVD which is pretrained on massive amounts of external data. For the recognition task, appropriate SOTAs would be OmniVec, OmniVec2, InternVideo, InternVideo2, etc. [W2] FVD is not a very good metric. A generative paper ought to have generative results in the main paper itself, FVD results alone are not adequate, and such examples ought not be saved for supplementary. Additionally, the examples in the supplementary are not adequate, since there is no comparison to the competing methods. [W3] Paper does not cite enough related work. For example, [1] and [2] are omitted, as are many others that explore similar diffusion-for-recognition directinos. [1] Your Diffusion Model is Secretly a Zero-Shot Classifier, Li et al. [2] Diffusion Models Beat GANs on Image Classification, Mukhopadhyay et al.

Questions

How did you select your SOTAs? One of the main things preventing me from giving a higher rating is that the model does considerably lag behind SOTAs for k400 classification. Why do you not provide example videos for the competing methods, as reference points? It is difficult to assess the capabilities of the video generation based on FVD alone. Why is there no generative baseline, similar to the classification baselines?

Rating

9

Confidence

5

Soundness

4

Presentation

4

Contribution

4

Limitations

Yes.

Reviewer JBof5/10 · confidence 3/52024-07-13

Summary

This paper investigates to unify the video generation and recognition tasks into the same diffusion model. The authors propose a conditional feature mask mechanism to unify the two learning tasks. Experiments are conducted on several tasks to validate the effectiveness of the proposed method.

Strengths

The idea of unifying generation and recognition process into the same diffusion model is interesting and necessary for the computer vision. The modification to the SVD backbone is simple, including a masked conditional input and a classifier head.

Weaknesses

1. The design of unifying generation and recognition tasks is not elegant. This paper directly introduces an extra classification head, and uses a multi-task learning loss for these two tasks. As verified in the Table 4, the trade-off between high-level semantic recognition task and low-level detail synthesis is not controlled well and may be conflict. 2. The experimental results are not promising. Firstly, the model size and computational cost should be reported in Table 1. It will be clear to analyze the efficiency of the recognition model. Secondly, for the generation ability evaluation, since the model is initialized from the SVD, it’s better to compare with SVD on different datasets. A concern is that whether the classification loss training will degrade the model’s synthesis ability on natural scene. It’s over claim to say “surpassing the sota”. 3. The mask mechanism in the proposed method shares some similarity with the paper [1]. The authors are suggested to add a discussion with this work. 4. For the recognition task, the proposed method just uses the SVD backbone to extract features, since z0 is directly used. Such a design (i.e., extracting features from the input video and sending them to a classifier) is conventional. [1] Masked Diffusion Transformer is a Strong Image Synthesizer, ICCV 2023.

Questions

1. Why the loss weight of the recognition loss in Eq. 8 is not related with the noise level? 2. How about the training and testing efficiency compared with other recognition models?

Rating

5

Confidence

3

Soundness

3

Presentation

2

Contribution

2

Limitations

N/A

Reviewer PRtT7/10 · confidence 4/52024-07-14

Summary

Recently, diffusion models have been released that can generate high quality video clips, indicating that they strongly capture natural appearance and motion in video. This paper seeks to adapt one recent model, Stable Video Diffusion (SVD), to explore if what it has learned can be leveraged to improve video recognition performance, and investigate whether co-training on generation and recognition using this model can improve on both tasks. The two tasks, video diffusion and recognition, have quite different setups: the first takes uncorrupted video as input, while the second starts with a single conditioning frame as well as noise-corrupted video. This paper proposes to unify the tasks, adapting the SVD model to take masked-uncorrupted video plus noised video, concatenated, as input. This unifies the tasks, allowing joint training on recognition and generation. It also permits new tasks: generation and recognition using a variety of partially-masked video configurations as input. The paper shows competitive results on classic video clip classification tasks, and very strong results on generation FVD. Further they demonstrate strong classification performance on masked input scenarios including early action prediction, and recognition with limited frame-rates.

Strengths

This paper addresses what is to me, a researcher in video recognition and generation, a really burning question: generative video models have clearly learned an incredible amount about the visual world, so how can we harness that to advance recognition performance? But the setups of the problems, recognition and generation via diffusion, are really quite different. The authors show how to unify them, and co-train on the two tasks, in an original way that actually produces synergies for both. This is an exciting result to me. The paper is very clearly written and easy to follow (although the math dump in section 3.3 could be a little clear). I appreciate the inclusion of the two strong baselines (I and II, described on line 213), that compare the unified model to models trained only on generative or only on discriminative tasks.

Weaknesses

In the recognition results, Table 1 doesn't represent the current SOTA. E.g. InternVideo (https://arxiv.org/abs/2212.03191) from 2022 claims 77.2% on SSv2 and 91.1% on K400. It's fine if GenRec doesn't beat SOTA, but SOTA should be accurately represented in the table. The generative experimental results show a surprising improvement on FVD on SSv2 and EK-100, which I don't feel the authors do enough to explain or analyze. (See an associated "Question" below.) There is no exploration of how different values of the generative/discriminative loss balance ratio, gamma, affects performance on the benchmarks. Similarly, there is no exploration of different latent masking schemes or ratios during training. Minor weaknesses: * The method is described as "analogous to a temporal extension of MAE" in line 53. VideoMAE [38] does already exist. * On line 61, please define the accuracy retention ratio of include a citation.

Questions

The generative results in Table 1 demonstrate a really surprising decrease in FVD compared to the other methods. Can you explain why this is the case in more detail? Is the model really that good? Is it a typo? Is it because this benchmark is not particularly competitive? (I think FVD is more often presented on UCF and Kinetics-400 in the papers I've read, e.g. https://arxiv.org/pdf/2212.05199). If you double-check the FVD result, and convince me, then I'll gladly list this surprising decrease as one of the paper's strengths. Would it be useful to clarify to readers why the focus is "particularly the unconditioned or image-conditioned models" in line 29?

Rating

7

Confidence

4

Soundness

3

Presentation

4

Contribution

3

Limitations

Yes

Reviewer caZh5/10 · confidence 4/52024-07-14

Summary

This work proposes a video diffusion model to unifies the video generation and video recognition tasks. The proposed GenRec, during training, jointly optimize the generation objective and the classification objective. During inference, GenRec can deal with both the video generation conditioned on frames or classes, and video classification task. The experiments demonstrate that GenRec shows superior performance in both tasks.

Strengths

- The proposed GenRec unifies the video generation and video recognition tasks. - The experimental results validate the effectiveness of the proposed unified GenRec.

Weaknesses

- Considering that previous works [8,37,46] have already demonstrated that diffusion models have the capability of extracting sufficient features for understanding tasks, the combination of generation and recognition tasks to boost both tasks is too straight-forward, limiting the novelty of the paper. - It is unclear for the inference stage for video recognition. Like why the noised $\tilde{z}$ is still incorporated for classification, which may lead to the recognition result undeterministic. During inference, is the multi-step denoising procedure sill required? - There is the lack of training/inference time cost comparison with previous video classification methods.

Questions

Pleaser refer to the weakness part. I would like to modify my rating according to the responses from the authors.

Rating

5

Confidence

4

Soundness

2

Presentation

2

Contribution

2

Limitations

The authors have already claimed the limitations.

Reviewer caZh2024-08-14

I have carefully read the responses from the authors and other reviewers' comments. The response has addressed my concerns, I would like to raise my rating to 5.

Reviewer PRtT2024-08-10

I have read through the other reviews, and all of the authors' responses, and believe that the majority of the concerns have been addressed. In particular, the inclusion of sota methods, parameter counts, and timing for training and test, significantly improves Table 1. Again, this paper remains very interesting to me even if it doesn't beat sota, in particular because it shows "mutual enhancement" on the two tasks, which is a much-sought-after result. Thank you for double-checking the FVD computation. Your explanation makes sense. However, reviewer JBof suggests "for the generation ability evaluation, since the model is initialized from the SVD, it’s better to compare with SVD on different datasets". Should different baselines which are trained on significant video data be used for comparison instead?

Authorsrebuttal2024-08-11

Thank you for thoroughly reviewing our work and responses. We appreciate your acknowledgment of the improvements, particularly with the inclusion of SOTA methods, parameter counts, and timing details. We’re glad you find our work interesting, and we share your enthusiasm about its potential implications. Regarding the SVD comparison, we agree that comparing with SVD directly provides a meaningful baseline. Thus, we have newly added such comparison. We conducted frame prediction tests using the SVD model on the SSV2 and Epic-Kitchen datasets. Since the SVD model performs better at higher resolutions, we generated videos at 512x512 resolution and then downsampled them to 256x256 for FVD calculations. The results show that while SVD achieves competitive scores compared to previous state-of-the-art methods, it is suboptimal compared to GenRec. This is likely due to SVD's design for general scenarios. Baseline I in Table 1 represents our enhanced SVD baseline, which fine-tunes SVD on the target datasets for better results and more a fairer comparison. Thank you again for your recognition and thoughtful feedback. We greatly appreciate your time and effort in reviewing our work. We will include the SVD baseline results in our revised version. |Method| SSv2 FVD | Epic FVD | |:--:|:--:|:--:| | **SVD** | **99.7** | **180.8** | | Baseline I | 50.3 | 53.6 | | GenRec | 46.5 | 49.3 | ||

Reviewer 96MS2024-08-12

One more question

With these clarifications, I am inclined to increase my rating. One quick question- what is OmniViD in table 1 of the rebuttal?

Authorsrebuttal2024-08-12

Thank you so much. We apologize for the naming mistake in Table 1 of the rebuttal which should be "GenRec". Thank you again for your recognition and thoughtful feedback. We greatly appreciate your time and effort in reviewing our work.

Area Chair R1UJ2024-08-13

Dear Reviewers, We are nearing the end of the period for discussion with the authors. I kindly request you to review the comments made by other reviewers, as well as the responses from the authors. Given that we have a mixed and divergent score (9, 7, 4, 4, 3), it's crucial that we have a comprehensive understanding of each other's viewpoints to make a fair and informed decision on the paper. In particular, I would like to request Reviewers caZh, JBof, and C3Pd to actively participate in the discussion with the authors. Your insights and perspectives are highly valued and can significantly contribute to the decision-making process. Thank you for your timely attention to this matter. Best regards, Area Chair

Authorsrebuttal2024-08-14

Dear Reviewer caZh, Hope this message finds you well. We wanted to kindly follow up on the feedback for our submission. Your insights are invaluable, and we would greatly appreciate any further comments you may have. Thank you for your time and consideration.

Authorsrebuttal2024-08-14

Dear Reviewer JBof, Hope this message finds you well. We wanted to kindly follow up on the feedback for our submission. Your insights are invaluable, and we would greatly appreciate any further comments you may have. Thank you for your time and consideration.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC