Add Batch 2e34cd93-ad9e-4d99-8801-17fe423f6f82
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_content_list.json +3 -0
- encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_model.json +3 -0
- encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_origin.pdf +3 -0
- encapsulatingknowledgeinoneprompt/full.md +290 -0
- encapsulatingknowledgeinoneprompt/images.zip +3 -0
- encapsulatingknowledgeinoneprompt/layout.json +3 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_content_list.json +3 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_model.json +3 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_origin.pdf +3 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/full.md +349 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/images.zip +3 -0
- endtoendratedistortionoptimized3dgaussianrepresentation/layout.json +3 -0
- energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_content_list.json +3 -0
- energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_model.json +3 -0
- energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_origin.pdf +3 -0
- energyclibratedvaewithtesttimefreelunch/full.md +410 -0
- energyclibratedvaewithtesttimefreelunch/images.zip +3 -0
- energyclibratedvaewithtesttimefreelunch/layout.json +3 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_content_list.json +3 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_model.json +3 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_origin.pdf +3 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/full.md +270 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/images.zip +3 -0
- energyinducedexplicitquantificationformultimodalitymrifusion/layout.json +3 -0
- enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_content_list.json +3 -0
- enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_model.json +3 -0
- enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_origin.pdf +3 -0
- enhancedmotionforecastingwithvisualrelationreasoning/full.md +267 -0
- enhancedmotionforecastingwithvisualrelationreasoning/images.zip +3 -0
- enhancedmotionforecastingwithvisualrelationreasoning/layout.json +3 -0
- enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_content_list.json +3 -0
- enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_model.json +3 -0
- enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_origin.pdf +3 -0
- enhancedsparsificationviastimulativetraining/full.md +307 -0
- enhancedsparsificationviastimulativetraining/images.zip +3 -0
- enhancedsparsificationviastimulativetraining/layout.json +3 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_content_list.json +3 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_model.json +3 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_origin.pdf +3 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/full.md +258 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/images.zip +3 -0
- enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/layout.json +3 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_content_list.json +3 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_model.json +3 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_origin.pdf +3 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/full.md +435 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/images.zip +3 -0
- enhancingdiffusionmodelswithtextencoderreinforcementlearning/layout.json +3 -0
- enhancingoptimizationrobustnessin1bitneuralnetworksthroughstochasticsigndescent/20074c37-10bc-46ab-b975-ee5706fdb45f_content_list.json +3 -0
- enhancingoptimizationrobustnessin1bitneuralnetworksthroughstochasticsigndescent/20074c37-10bc-46ab-b975-ee5706fdb45f_model.json +3 -0
encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c615d59b0a5464eba4b25fb74bf90efadb39a8666caa7ab6c3411a234f5657a4
|
| 3 |
+
size 87876
|
encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcb84a94dd5053cc57d91a25580cd899ce726a3778baf7fed71c7c404370defe
|
| 3 |
+
size 109709
|
encapsulatingknowledgeinoneprompt/c9753d0d-db7f-4f7e-b1e6-1fee0e7587c4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:057192a95b9eb0acf7c1413eda7c2760d05a4317cd50f79083524aa5f9523276
|
| 3 |
+
size 3137758
|
encapsulatingknowledgeinoneprompt/full.md
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Encapsulating Knowledge in One Prompt
|
| 2 |
+
|
| 3 |
+
Qi Li $^{1}$ , Runpeng Yu $^{1}$ , and Xinchao Wang $^{1\star}$
|
| 4 |
+
|
| 5 |
+
National University of Singapore {liqi, r.yu}@u.nus.edu, {xinchao}@nus.edu.sg
|
| 6 |
+
|
| 7 |
+
Abstract. In this paper, we propose a new knowledge transfer paradigm called Knowledge in One Prompt (KiOP). This paradigm encapsulates knowledge from various models into a solitary prompt without altering the original models or requiring access to the training data, which enables us to achieve efficient and convenient knowledge transfer in more realistic scenarios. From a practicality standpoint, this paradigm not only for the first time proves the effectiveness of Visual Prompt in data inaccessible contexts, but also solves the problems of low model reusability and high storage resource consumption faced by traditional Data-Free Knowledge Transfer, which means that we can realize the parallel knowledge transfer of multiple models without modifying any source model. Extensive experiments across various datasets and models demonstrate the efficacy of the proposed KiOP knowledge transfer paradigm. Without access to real training data and with rigorous storage capacity constraints, it is also capable of yielding considerable outcomes when dealing with cross-model backbone setups and handling parallel knowledge transfer processing requests with multiple (more than 2) models. Code is available at https://github.com/LiQiii/Encapsulating-Knowledge-In-One-Prompt.
|
| 8 |
+
|
| 9 |
+
Keywords: Efficient Learning $\cdot$ Knowledge Transfer $\cdot$ Visual Prompt
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
In the past few years, the swift progress of large-scale pre-trained models across diverse fields [3,4,13,14,20,42] has given rise to a multitude of efficient knowledge transfer paradigms [2,24,27,29,32,33,53]. These paradigms are designed to enhance the models' accessibility by making the transfer of knowledge more efficient, thereby extending their benefits to a broader audience. Among these paradigms, inspired by the success of prompt learning in NLP [27,29,33], the concept of visual prompt [2] has emerged for tasks in the vision field. Visual prompts involve trainable parameters directly into the input pixel space, facilitating efficient knowledge transfer without altering the pre-trained model. Although it has not yet demonstrated a clear edge over the established knowledge transfer frameworks, many researchers have made considerable effort to unlock its properties and significantly enhance its utility [5,6,22,23,30,40,45,49,50]. It is expected that Prompt-as-a-Service (PaaS) [22,50] will gain popularity.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Fig. 1: The schematic illustrates Visual Prompt Learning, Conventional Data-Free Knowledge Distillation (DFKD), and our novel Data-free Knowledge Transfer Framework (KiOP). Visual Prompt Learning adjusts pre-trained models for various downstream tasks by appending prompts to inputs while leaving the model frozen. DFKD facilitates knowledge transfer from a teacher model to a student model in the absence of real data. Our KiOP framework ensures effective knowledge transfer without modifications to the pre-trained model or access to real data.
|
| 17 |
+
|
| 18 |
+
As a new knowledge transfer context, unlike Machine Learning as a Service (MLaaS) [43, 47], PaaS allows service providers to offer clients specific prompts. The data of user is combined with the provided prompt and fed into a pretrained model for predictions, offering a more streamlined and convenient service. Additionally, PaaS providers can leverage a single pre-trained model to handle multiple knowledge transfer service requests which helps to reduce the strain on storage resources and enables more efficient service to a wider range of users. However, owing to privacy concerns or the need for confidentiality, sensitive data typically aren't publicly processed. This renders visual prompts, which necessitate real training dataset access to achieve knowledge transfer, somewhat negligible in such practical scenario.
|
| 19 |
+
|
| 20 |
+
Furthermore, researchers have thoroughly investigated the effectiveness of knowledge distillation [11,19,21,25,41,52,54]—another knowledge transfer framework that is extensively utilized and holds significant potential—in situations lacking training data, which is known as 'Data-Free Knowledge Distillation' (DFKD) [7, 15, 31, 36–39, 56] and have attained impressive outcomes. Nevertheless, DFKD comes with three major drawbacks. Firstly, if the student model is already knowledgeable, as mimicking the teacher model's behavior requires updating all its parameters, this process is not only computationally expensive but also risks the knowledge of the student model being catastrophically forgetting [17, 18, 26, 44]. Moreover, DFKD is storage-intensive, as it necessitates maintaining individual copies of the student model for each corresponding teacher. Thirdly, most DFKD methods can not handle multi-model knowledge transfer simultaneously, instead, the requests are handled in turn, similar to a first-come-first-served process, which is especially difficult in data-free scenarios
|
| 21 |
+
|
| 22 |
+
where methods tend to consume much more computing resources. When faced with a large number of knowledge transfer requests, running these methods from scratch for each request is absolutely intolerable.
|
| 23 |
+
|
| 24 |
+
Merging the benefits of VP's convenience in knowledge storage and lightweight knowledge transfer with the advantages of DFKD in sensitive data protection raises an intriguing possibility: Whether VP can alleviate the problems of DFKD under the massive storage requirements, the lack of model reusability, and non-parallelism in multi-model knowledge transfer, while drawing intuitions from DFKD to alleviate its dependence on data?
|
| 25 |
+
|
| 26 |
+
In this paper, we give an affirmative answer to the above question. We introduce a novel paradigm for knowledge transfer named Knowledge in One Prompt (KiOP). This paradigm balances data autonomy with resource utilization efficiency, confirming the feasibility of encapsulating knowledge from various models within a single prompt. Specifically, in our end-to-end training framework, we partition the visual prompt $(\mathcal{VP})$ to more effectively accommodate the varying complexities involved in transferring knowledge from two source models (referred to as model $\mathcal{A}$ and model $\mathcal{B}$ to clarify and avoid ambiguity). Each model is paired with its respective partitions of $\mathcal{VP}$ , and each model pair is then processed by a pre-defined synthesis system for data synthesis and storage in their respective data bank. Finally, the two model pairs are jointly trained using the data stored in their corresponding data bank. During this process, the parameters of the $\mathcal{VP}$ are updated while the source models are frozen. Consequently, we successfully manage to encapsulate the knowledge from several source models into a single prompt, all without altering the models or requiring access to the actual training data. When new requirements for knowledge transfer are received, since the source model is not modified, we can implement an effective reuse, which alleviates the storage overhead and the catastrophic forgetting problem faced in the traditional DFKD framework, and avoids the security risks caused by real data exposure in the process of visual prompt learning.
|
| 27 |
+
|
| 28 |
+
Contribution. We highlight our main contributions as follows. We provide a new paradigm called Knowledge in One Prompt (KiOP), which solves the problem of knowledge transfer in a more realistic scenario that was previously unresolved: achieving efficient model reuse and knowledge transfer service parallelism with no access to real data and harsh storage resource constraints. We showcase the efficiency and adaptability of KiOP across over 10 dataset pairs, as well as its robustness with various backbones and multi-model (in excess of 2) parallel processing.
|
| 29 |
+
|
| 30 |
+
# 2 Related Work
|
| 31 |
+
|
| 32 |
+
Visual Prompt Learning. The notion of prompting originated in the realm of Natural Language Processing (NLP) [27, 29, 33, 58, 59], with the aim of reconfiguring downstream data to mirror the insights garnered during a model's pre-training phase. This process equips frozen pre-trained models with the ability to interpret and adapt to novel tasks more effectively. Visual prompt was
|
| 33 |
+
|
| 34 |
+
originally defined in [2] to imitate the cue idea in NLP, by using input tweaking and label mapping to re-adjust the use of frozen pre-trained vision models for new tasks. Compared with fully fine-tuning, it has the advantage of parameter efficiency and requires much less model storage space.
|
| 35 |
+
|
| 36 |
+
Recently, many works have explored the effectiveness of $\mathcal{VP}$ in different tasks and application scenarios. In order to further tap the potential of $\mathcal{VP}$ , [6] proposed a novel Iterative Label Mapping method to track the dynamics of $\mathcal{VP}$ in the training process, which greatly improves its performance. [40] explores an adaptive algorithm for $\mathcal{VP}$ when the pre-trained model is a black-box API. [23] proposed to design multiple meta-prompts for a dataset to better adapt to diversity so as to reduce the difficulty of optimization. In the field of security and privacy, [30] explores the integration of $\mathcal{VP}$ into canonical differential privacy training methods and proves its effectiveness. [50] and [22] discussed the vulnerability of $\mathcal{VP}$ to membership inference attacks and backdoor attacks. [28] for the first time explores the integration capability of $\mathcal{VP}$ on the robustness and generalization ability of the source model when the source model is a robust model. At present, all the works on $\mathcal{VP}$ requires access to the training dataset, the effectiveness of $\mathcal{VP}$ in data-free scenario is still an unexplored field.
|
| 37 |
+
|
| 38 |
+
Data-Free Knowledge Distillation. Proposed by [21], knowledge distillation is a widely-used knowledge transfer framework that pairs a 'teacher' model with a 'student' model and manage to distill knowledge from the teacher. This technique has seen applications in various domains [10, 12, 34, 46, 48]. As the field evolves, there is a growing focus on scenarios with greater practical relevance: in real-world situations, the initial training data are not available due to privacy concerns or copyright restrictions. Consequently, the approach of Data-Free Knowledge Distillation has gained popularity. The existing DFKD solutions can be roughly divided into three categories [35]: Noise Optimization-based, Generative Reconstruction-based and Adversarial Exploration-based. In this work, we mainly draw intuitions from the series of method based on Generative Reconstruction. DAFL [7] pioneered the use of generative reconstruction in DFKD, introducing two regularization functions concerning activation and prediction to aid in data synthesis. [55] suggests a strategy for data-free knowledge amalgamation, aimed at developing a proficient multi-task student network from various single or multi-task teacher networks. KegNet [57] utilizes a conditional generator along with an auxiliary decoder to distill knowledge from a neural network. [1] introduces the Data-enriching GAN (DeGAN) framework, which is designed to recover representative samples from a trained classifier utilizing data from a correlated domain. [16] proposed contrastive model inversion (CMI), which treats data diversity as a goal that can be optimized to mitigate the problem of mode collapse during data reconstruction.
|
| 39 |
+
|
| 40 |
+
# 3 Preliminaries
|
| 41 |
+
|
| 42 |
+
Knowledge Transfer via Visual Prompt. $\mathcal{VP}$ is designed to directly add padding, strip, or patch with learnable parameters to the input image. Suppose
|
| 43 |
+
|
| 44 |
+
a $\mathcal{VP}$ parameterized by $\vartheta$ is represented as $\gamma_{\vartheta}$ . Then the process of training this $\mathcal{VP}$ can be formalized as follows:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\vartheta^ {*} = \min _ {\vartheta} \mathbb {E} _ {(x _ {d}, y _ {d}) \sim D _ {d}} [ \mathcal {L} (\mathcal {M} (f _ {\psi^ {*}} (\gamma_ {\vartheta} (x _ {d})), y _ {d})) ] \tag {1}
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\psi^{*}$ represents the weight of the pre-trained model, which is frozen this process; $D_{d}$ represents the distribution of downstream dataset; $\mathcal{M}$ stands for a predefined label mapping (LM) method, which is hard-coded and does not contain learnable parameters. The most commonly used LM methods are Random Label Mapping (RLM) and Iterative Label Mapping (ILM); $\mathcal{L}(\cdot)$ is the loss function for training $\vartheta$ , which is generally defined as cross-entropy loss.
|
| 51 |
+
|
| 52 |
+
Data-Free Knowledge Distillation with Data Variety. As previously noted our focus in this study is mainly on the Generative Reconstruction-based methods within DFKD, since this set of techniques benefits from leveraging the teacher model's prior knowledge as seen in Noise Optimization-based methods, while also informing the enhanced design of the discriminator found in Adversarial Exploration-based methods.
|
| 53 |
+
|
| 54 |
+
Given that our framework ultimately entails the concurrent learning from two distinct datasets, the variety of synthetic data is especially critical. Hence, we refer to the DFKD module outlined in [16]. This approach takes cues from prior works [8,9,51] and treat data diversity as an objective that can be optimized. It employs prior knowledge of batch normalization statistics $(\mathcal{L}_b(x))$ from Noise Optimization-based methods, and integrates this with the concept of class priors $(\mathcal{L}_c(x))$ and adversarial distillation $(\mathcal{L}_a(x))$ to generate synthetic data. This process culminates the first part of the loss function in their method called inversion loss, which is expressed as:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathcal {L} _ {i n v} (x) = \omega \cdot \mathcal {L} _ {b} (x) + v \cdot \mathcal {L} _ {c} (x) + \mu \cdot \mathcal {L} _ {a} (x) \tag {2}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
However, the use of the inversion loss alone would lead to the lost of sample diversity. Therefore, they introduce the idea of contrastive learning to model data diversity. The second part of the loss function can be formulated as:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\mathcal {L} _ {c r} (\kappa , \mathcal {D}) = - \mathbb {E} _ {x _ {m} \in \kappa} \left[ \log \frac {\exp (s i m \left(x _ {m} , x _ {m} ^ {+} , \mathcal {D}\right) / \mu)}{\sum_ {n} \exp (s i m \left(x _ {m} , x _ {n} ^ {-} , \mathcal {D}\right) / \mu)} \right] \tag {3}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\kappa$ represents the dataset, and $x_{m}^{+}$ represents the positive view of $x_{m}$ after data augmentation, $x_{n}^{-}$ regards all samples except $x_{m}$ as negative view. $\mu$ stands for the temperature. sim is the cosine similarity which is used to calculate the distinguishable level of image pairs. $\mathcal{D}$ stands for a discriminator which takes the latent features of the image pair as input and distinguish them by projecting them into a new embedding space and calculate the cosine similarity. In addition, a data bank $\mathcal{B}$ is brought in to incrementally store the synthesized data that can be easily distinguished from the historical ones. The final loss function is:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\min _ {\theta_ {g}, z, \mathcal {D}} [ \alpha \cdot \mathcal {L} _ {c r} (g (z; \theta_ {g}) \cup \mathcal {B}, \mathcal {D}) + \beta \cdot \mathcal {L} _ {i n v} (g (z; \theta_ {g})) ] \tag {4}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $g(\cdot)$ represents the generator parameterized by $\theta_g$ , $\alpha$ and $\beta$ represent the weight coefficients of the two terms.
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
(b) Detailed illustration of the model fusion and input passing logic.
|
| 78 |
+
Fig. 2: A comprehensive illustration of the proposed paradigm: (a) Overall pipeline, (b) Model fusion and input logic, (c) Synthetic data generation.
|
| 79 |
+
|
| 80 |
+

|
| 81 |
+
(a) The overall pipeline of the proposed KiOP paradigm.
|
| 82 |
+
(c) The Synthesize System used to generate synthetic data.
|
| 83 |
+
|
| 84 |
+
# 4 Method
|
| 85 |
+
|
| 86 |
+
Figure 2a outlines the KiOP framework, which operates over two main phases: the Synthesize Period and the Knowledge Storing Period.
|
| 87 |
+
|
| 88 |
+
# 4.1. Synthesize Period.
|
| 89 |
+
|
| 90 |
+
Initially, the system takes in two distinct models and splits the $\mathcal{VP}$ designated for training into two components: the Prompt Core $(\mathcal{PC})$ and the Prompt Periphery $(\mathcal{PP})$ . Model $\mathcal{A}$ assumes the role of a secondary transfer agent, serving as a backbone of $\mathcal{VP}$ for the knowledge transfer process. In addition, Model $\mathcal{B}$ is cast as the primary service receiver of the knowledge being transferred to $\mathcal{VP}$ . Within our system, both Model $\mathcal{A}$ and Model $\mathcal{B}$ are set frozen, meaning both of them do not go through further training during the whole pipeline. Model $\mathcal{A}$ undergoes a dual Model Fusion operation to yield two derivative models—Student of Model $\mathcal{A}$ (SMA) and Student of Model $\mathcal{B}$ (SMB). SMA emerges from the fusion of Model $\mathcal{A}$ with $\mathcal{PC}$ and is instrumental in imparting the knowledge of Model $\mathcal{A}$ to $\mathcal{PC}$ . Conversely, SMB is a composite of Model $\mathcal{A}$ , $\mathcal{PC}$ , and $\mathcal{PP}$ . Upon the integration of these elements, a pre-determined label mapping strategy is applied to SMB's output to align it with the source dataset associated with Model $\mathcal{B}$ .
|
| 91 |
+
|
| 92 |
+
- Model Fusion and Input Passing. Figure 2b details the components of $\mathcal{SMA}$ and $\mathcal{SMB}$ and the procedure for dividing and utilizing $\mathcal{VP}$ . The left side of Figure 2b depicts the division of a full $\mathcal{VP}$ into $\mathcal{PC}$ and $\mathcal{PP}$ , intended for later use. This split is strategic, with the goal of appropriately allocating parameter capacity to handle knowledge transfer tasks of varying complexity. For $\mathcal{SMA}$ , the
|
| 93 |
+
|
| 94 |
+
challenge is akin to transferring knowledge within the same domain. Although Model $\mathcal{A}$ , which we refer to as the core model, has been pre-equipped with a $\mathcal{PC}$ layer, $\mathcal{SMA}$ retains a fundamental grasp of the source data on which the core model was trained, making its task simpler than that of $SMB$ . $SMB$ , sharing the core model with $\mathcal{SMA}$ , faces a full-fledged cross-domain learning challenge, as the core model is unfamiliar with Model $\mathcal{B}$ 's source data. As shown in Figure 2b, $\mathcal{PC}$ is utilized by both $SMA$ and $SMB$ , while $\mathcal{PP}$ is used exclusively by $SMB$ . In our experiments, we assess the impact of various $\mathcal{PC}-\mathcal{PP}$ configurations on overall performance. We discover that different source model pairs respond diversely to the size of $\mathcal{PC}-\mathcal{PP}$ setups.
|
| 95 |
+
|
| 96 |
+
- Synthesize System Design. Considering a more realistic and challenging data-free scenario, we adopted ideas from previous DFKD works as earlier noted in Sec.3 and introduced a Synthesize System. This system is designed to extract synthetic data from two source models to facilitate the learning process. As illustrated in Figure 2c, the system takes a model pair and a random Gaussian noise vector $z$ as inputs and uses an initialized generator to create synthetic data. For the design of the Data-Free Distillation Block, we draw inspiration from [16] as previously stated, which incorporates contrastive learning to enhance the diversity of the synthetic samples, thus, we firstly pass the synthesized data through an augmenter for random augmentation, then feed it together with the data previously stored in the data bank to the model pair and get the judgement for its quality, thereby ensuring the diversity of the synthetic data.
|
| 97 |
+
|
| 98 |
+
# 4.2. Knowledge Storing Period.
|
| 99 |
+
|
| 100 |
+
In each training iteration, the two model pairs are passed through the Synthesize System a total of $T$ times. Note that with each iteration, we start with a freshly initialized generator. As shown in Figure 2c, during the $T$ times, once we get a better loss value, we will update the current optimal data. Upon the completion of $T$ times, the optimal data is then preserved in the data bank to assist with the training of the prompt in subsequent steps. As the data bank grows with each addition of the best data from these iterations, the prompt is exposed to an increasingly rich array of knowledge. This process ensures a progressively more effective knowledge transfer and storage, as the prompt harnesses a broader spectrum of information with each iteration.
|
| 101 |
+
|
| 102 |
+
In the Knowledge Storing Period in Figure 2a, we train the $\mathcal{PC}$ and $\mathcal{PP}$ with the synthetic data that has been curated in the data bank. It's important to emphasize that before this period, all the models in the framework—the two source models and one prompt—are set frozen. Focusing on Model Pair $\mathcal{A}$ , the aim is to facilitate the knowledge transfer from Model $\mathcal{A}$ to $\mathcal{PC}$ within the $\mathcal{SMA}$ model. To do so, we feed the data from Data Bank $\mathcal{A}$ into both Model $\mathcal{A}$ and $\mathcal{SMA}$ . The outputs from both—termed $\mathcal{P}_{\mathcal{MA}}$ for the output of Model $\mathcal{A}$ , and $\mathcal{P}_{\mathcal{SMA}}$ for the output of $\mathcal{SMA}$ —are then used to calculate the similarity so that $\mathcal{SMA}$ can imitate the behavior of Model $\mathcal{A}$ :
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\mathcal {L} _ {k} ^ {A} = \sum_ {\hat {x} _ {\mathcal {A}} \in \mathcal {B} _ {k} ^ {A}} \operatorname {S i m} \left(f _ {\mathcal {A}} \left(\hat {x} _ {\mathcal {A}}\right), f _ {\mathcal {A}} \left(\gamma_ {\mathcal {P C}, \varphi} \left(\hat {x} _ {\mathcal {A}}\right)\right)\right) \tag {5}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $\mathrm{Sim}(\cdot, \cdot)$ is the pre-defined similarity measurement (i.e., KL-Divergence), $\mathcal{B}_k^A$ represents the state of data bank $A$ in the $k$ -th iteration; $f_{\mathcal{A}}(\cdot)$ denotes model $A$ ; $\hat{x}_{\mathcal{A}}$ stands for the data selected from $\mathcal{B}_k^A$ ; $\gamma_{\mathcal{PC},\varphi}(\cdot)$ is the Prompt Core parameterized by $\varphi$ . For Model Pair $\mathcal{B}$ , we use the synthetic data from data bank $\mathcal{B}$ as input for both model $\mathcal{B}$ and $\mathcal{SMB}$ , performing identical operations. Due to the pre-defined label mapping method, the output dimension of $\mathcal{SMB}$ matches that of Model $\mathcal{B}$ thus we can measure their similarity as follows:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\mathcal {L} _ {k} ^ {\mathcal {B}} = \sum_ {\hat {x} _ {\mathcal {B}} \in \mathcal {B} _ {k} ^ {\mathcal {B}}} \operatorname {S i m} \left(f _ {\mathcal {B}} \left(\hat {x} _ {\mathcal {B}}\right), \mathcal {M} \left(f _ {A} \left(\gamma_ {\mathcal {P P}, \eta} \left(\gamma_ {\mathcal {P C}, \varphi} \left(\hat {x} _ {\mathcal {B}}\right)\right)\right)\right)\right) \tag {6}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\mathcal{B}_k^\mathcal{B}$ represents the state of data bank $\mathcal{B}$ in the $k$ -th iteration; $f_{\mathcal{B}}(\cdot)$ denotes model $\mathcal{B}$ ; $\hat{x}_{\mathcal{B}}$ stands for the data selected from $\mathcal{B}_k^\mathcal{B}$ ; $\gamma_{\mathcal{PP}}(\cdot)$ is the Prompt Periphery parameterized by $\eta$ ; $\mathcal{M}$ is the predefined label mapping method.
|
| 115 |
+
|
| 116 |
+
For $\hat{x}_{\mathcal{A}}$ and $\hat{x}_{\mathcal{B}}$ , they are all generated by the Synthesize System and stored in the corresponding data bank. For the $k$ -th iteration of a Model Pair $j$ , this process can be formally described as:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathcal {B} _ {k} ^ {j} = \mathcal {S} \left(z, (f _ {\mathrm {t e a}} ^ {j} (\cdot), f _ {\mathrm {s t u}} ^ {j} (\cdot)), k, \mathcal {T}\right) \tag {7}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $S$ represents the Synthesize System as described in Eq.4, $(f_{\mathrm{tea}}^j (\cdot),f_{\mathrm{stu}}^j (\cdot))$ represents the currently used Model Pair, in which $f_{\mathrm{tea}}^{j}(\cdot)$ is the knowledge provider (teacher) of synthetic data, and $\mathcal{T}$ represents predefined round number for $S$ . The final objective function can be defined as:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\begin{array}{l} \mathcal {L} _ {\mathrm {K i O P}} = \alpha \cdot \mathcal {L} _ {A} \left(\mathcal {B} _ {A}, f _ {A}, \gamma_ {P C, \varphi}, S\right) \\ + \beta \cdot \mathcal {L} _ {\mathcal {B}} \left(\mathcal {B} _ {\mathcal {B}}, f _ {\mathcal {A}}, \gamma_ {P C, \varphi}, \gamma_ {P P, \eta}, \mathcal {S}, \mathcal {M}\right) \tag {8} \\ \end{array}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where $\alpha$ and $\beta$ represent the coefficients that control the weight of the two components. In our experiment, unless stated differently, we set them both to 1.
|
| 129 |
+
|
| 130 |
+
# 5 Experiments
|
| 131 |
+
|
| 132 |
+
Models and Datasets. To comprehensively evaluate the efficacy of KiOP, we conducted experiments across various Models and datasets. Specifically, we employed backbones from the ResNet series—ResNet-18 and ResNet-50—as well as VGG-13 from the VGG series. For a generalizable assessment, we considered model pairs including (ResNet-18, ResNet-18), (ResNet-50, ResNet-18), (ResNet-18, VGG-13), and (VGG-13, ResNet-18). Moreover, we selected 6 diverse datasets for our experiments: mnist, fashion-mnist (fmnist), cifar10, gtsrb, cifar100, and svhn. This breadth ensures our results capture performance across different image types and classification challenges.
|
| 133 |
+
|
| 134 |
+
Settings of Visual Prompt. Without losing generality, we consider using the Padding-type of $\mathcal{VP}$ . We default set the size of $\mathcal{VP}$ to $128 \times 128$ . For the label mapping method, we use the simplest random label mapping (RLM).
|
| 135 |
+
|
| 136 |
+
Baselines and Evaluations. For a more robust comparison of KiOP's performance, we established multiple baselines:
|
| 137 |
+
|
| 138 |
+
- Vanilla-KD. It represents the classical DFKD process, in which the student model (Model $\mathcal{A}$ in our case) is not frozen, allowing its parameters to be updated based on the knowledge of the teacher model (Model $\mathcal{B}$ ) to emulate its behavior. We adopt the DFKD framework as conceptualized in [16]. Given that the teacher and student datasets may vary in the class numbers, we preserve the weights of the student model's fully connected layer prior to training. When assessing the impact on original performance of the student model, we revert this layer to its initial weights.
|
| 139 |
+
- KiOP-Tenuous (KiOP-T). The weights of both models are frozen and a $\mathcal{VP}$ is introduced. However, it is exclusively employed in the knowledge transfer process for Model $\mathcal{B}$ : we utilize data from $\mathcal{B}_{\mathcal{B}}$ as input to $\mathcal{SMB}$ , enabling it to mimic the behavior of Model $\mathcal{B}$ and facilitate the transfer of knowledge from Model $\mathcal{B}$ to the $\mathcal{VP}$ .
|
| 140 |
+
- KiOP-Bilateral (KiOP-B). It requires a single prompt to encapsulate the knowledge from two distinct models—Model $\mathcal{A}$ and Model $\mathcal{B}$ . However, the training data for Model $\mathcal{A}$ is available, eliminating the need for $SMA$ to utilize synthetic data from $\mathcal{B}_{\mathcal{A}}$ for training purpose. As previously discussed, the $\mathcal{VP}$ here is divided into two segments: the Prompt Core ( $\mathcal{PC}$ ) and the Prompt Periphery ( $\mathcal{PP}$ ). Unless explicitly stated, the default size for $\mathcal{PC}$ is set at $36 \times 36$ , and $\mathcal{PP}$ at $128 \times 128$ .
|
| 141 |
+
- KiOP-Bilateral Fake (KiOP-BF). This setting is the most realistic and mainly oriented scenario for KiOP, wherein the training datasets of both models are inaccessible, and a single $\mathcal{VP}$ serves as the repository for the knowledge of both models. $SMA$ and $SMB$ are each trained using data from their respective data bank. Despite being a more challenging scenario, empirical evidence suggests that KiOP-BF achieves comparable performance with KiOP-B.
|
| 142 |
+
|
| 143 |
+
# 5.1. Performance on Various Difficulty Levels.
|
| 144 |
+
|
| 145 |
+
Table 1 presents the outcomes of experiments conducted across various setups. It can be consistently observed that Vanilla-KD yields the most effective knowledge transfer for Model $\mathcal{B}$ , a result that is anticipated given that it leverages the substantial capacity of Model $\mathcal{A}$ itself for learning. Nonetheless, it comes at a significant cost. In the process of learning knowledge from Model $\mathcal{B}$ , Model $\mathcal{A}$ experiences a catastrophic forgetting of its original knowledge, akin to the adage of robbing Peter to pay Paul.
|
| 146 |
+
|
| 147 |
+
Subsequently, we delve into various scenarios of KiOP. Initially, we consider a less complex case where the prompt encapsulates the knowledge of a single model (KiOP-T). The outcomes consistently demonstrate the prompt's capability for knowledge transfer. Note that Model $\mathcal{B}$ remains unaltered during this process, thereby preserving its initial knowledge and circumventing the catastrophic forgetting that could ensue from acquiring Model $\mathcal{A}$ 's knowledge. Furthermore, in assessing the predictive capabilities of $\mathcal{SMB}$ on dataset $\mathcal{B}$ , we observe that although the results are not entirely encouraging, most scenarios exhibit improved performance over Vanilla-KD. For instance, when the dataset pair is (Dts. $\mathcal{B}$ ,
|
| 148 |
+
|
| 149 |
+
<table><tr><td colspan="2">model settings</td><td colspan="2">Model A: ResNet-18</td><td colspan="4">Model B: ResNet-18</td><td colspan="2">Model A: ResNet-50</td><td colspan="4">Model B: ResNet-18</td></tr><tr><td rowspan="2">Dts.B</td><td>metrics</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td></tr><tr><td>Dts.A</td><td colspan="2">cifar100</td><td colspan="2">gtsrb</td><td colspan="2">svhn</td><td colspan="2">cifar100</td><td colspan="2">gtsrb</td><td colspan="2">svhn</td></tr><tr><td rowspan="4">mnist</td><td>Vanilla</td><td>57.19%</td><td>0.15%</td><td>70.72%</td><td>1.37%</td><td>81.70%</td><td>56.02%</td><td>61.35%</td><td>0.15%</td><td>70.43%</td><td>6.47%</td><td>89.29%</td><td>79.07%</td></tr><tr><td>KiOP-T</td><td>49.40%</td><td>4.30%</td><td>48.28%</td><td>12.60%</td><td>44.38%</td><td>16.19%</td><td>45.42%</td><td>4.70%</td><td>56.90%</td><td>20.90%</td><td>58.78%</td><td>16.37%</td></tr><tr><td>KiOP-B</td><td>44.49%</td><td>37.21%</td><td>46.48%</td><td>73.05%</td><td>42.77%</td><td>86.65%</td><td>41.14%</td><td>43.46%</td><td>51.58%</td><td>78.93%</td><td>52.40%</td><td>87.00%</td></tr><tr><td>KiOP-BF</td><td>43.67%</td><td>36.17%</td><td>45.24%</td><td>73.31%</td><td>39.26%</td><td>83.15%</td><td>41.88%</td><td>41.49%</td><td>48.69%</td><td>78.08%</td><td>55.17%</td><td>83.84%</td></tr><tr><td rowspan="4">fmnist</td><td>Vanilla</td><td>44.13%</td><td>5.38%</td><td>47.52%</td><td>5.88%</td><td>44.41%</td><td>13.94%</td><td>43.31%</td><td>0.02%</td><td>48.86%</td><td>0.77%</td><td>44.67%</td><td>16.81%</td></tr><tr><td>KiOP-T</td><td>43.28%</td><td>3.56%</td><td>38.80%</td><td>14.67%</td><td>41.28%</td><td>25.90%</td><td>38.88%</td><td>4.59%</td><td>42.18%</td><td>26.03%</td><td>41.16%</td><td>22.96%</td></tr><tr><td>KiOP-B</td><td>37.28%</td><td>37.40%</td><td>34.82%</td><td>72.97%</td><td>34.19%</td><td>86.58%</td><td>38.77%</td><td>43.44%</td><td>39.04%</td><td>78.84%</td><td>38.79%</td><td>87.17%</td></tr><tr><td>KiOP-BF</td><td>39.02%</td><td>36.51%</td><td>36.47%</td><td>73.64%</td><td>38.02%</td><td>83.53%</td><td>36.68%</td><td>41.25%</td><td>40.39%</td><td>77.89%</td><td>39.86%</td><td>84.29%</td></tr><tr><td rowspan="4">cifar10</td><td>Vanilla</td><td>79.55%</td><td>0.30%</td><td>79.13%</td><td>10.92%</td><td>79.46%</td><td>5.07%</td><td>77.60%</td><td>0.60%</td><td>77.14%</td><td>3.07%</td><td>75.60%</td><td>4.49%</td></tr><tr><td>KiOP-T</td><td>44.07%</td><td>1.13%</td><td>33.82%</td><td>6.43%</td><td>32.80%</td><td>26.30%</td><td>44.74%</td><td>2.18%</td><td>37.96%</td><td>14.81%</td><td>38.77%</td><td>15.06%</td></tr><tr><td>KiOP-B</td><td>42.82%</td><td>37.40%</td><td>28.69%</td><td>73.07%</td><td>27.23%</td><td>86.56%</td><td>43.62%</td><td>43.49%</td><td>37.56%</td><td>78.43%</td><td>37.10%</td><td>87.27%</td></tr><tr><td>KiOP-BF</td><td>40.69%</td><td>36.76%</td><td>31.24%</td><td>73.86%</td><td>30.26%</td><td>83.16%</td><td>40.55%</td><td>39.82%</td><td>36.54%</td><td>77.25%</td><td>37.21%</td><td>84.08%</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 1: This table presents the outcomes of the KiOP paradigm across various scenarios (under RLM), alongside a comparison with the traditional DFKD. Dts.A and Dts.B denote distinct datasets employed in the pre-training of Model A and Model B, respectively. Acc.A and Acc.B are indicators of the performance of $\mathcal{VP}$ in transferring knowledge from the two models. The experiment utilizes two different backbones (ResNet18, ResNet50). Superior results achieved under the KiOP-B and KiOP-BF comparison is highlighted in bold.
|
| 152 |
+
|
| 153 |
+
$\mathrm{Dts.}\mathcal{A}) =$ (mnist, gtsrb), there is a notable increase in accuracy for Acc. $\mathcal{A}$ , typically by around $10\%$ . An outlier to this trend occurs with the pair (Dts.B, Dts.A) = (mnist, svhn), where the Vanilla-KD's results on Acc. $\mathcal{A}$ remain elevated. We hypothesize that this is due to the substantial similarities between the two datasets, such as both being 10-class datasets with classes that represent largely analogous information.
|
| 154 |
+
|
| 155 |
+
The findings from KiOP-T naturally prompted us to consider the possibility of encapsulating the knowledge from several models within a single prompt. Results in Table 1 illustrates that a single $\mathcal{VP}$ can adeptly navigate more challenging scenarios, such as KiOP-B and KiOP-BF. Our framework equips the $\mathcal{VP}$ to perform well on Dts.A while preserving its accuracy on Acc.B. For instance, with cifar100 as Dts.A, our framework elevates Acc.A from single digits to approximately $40\%$ . Moreover, with gtsrb and svhn as Dts.A, Acc.A witnesses a substantial rise from roughly $10 - 20\%$ to $70 - 80\%$ . We attribute the comparable outcomes between KiOP-BF and KiOP-B to the data-free distillation block utilized in conjunction with our comprehensive end-to-end framework. The former facilitates the generation of high-quality synthetic data from the source model, which in turn enhances the training of the $\mathcal{VP}$ , while the latter enables the two sets of synthetic data derived from a unified synthesis system to work better on $\mathcal{VP}$ , particularly when both datasets utilize a same $\mathcal{PC}$ .
|
| 156 |
+
|
| 157 |
+
In order to verify the above conjecture, we visualize the Grad-Cam saliency maps of $\mathcal{VP}$ learned in KiOP-B and KiOP-BF respectively. Results are shown in Figure 3. We found that the saliency maps for both KiOP-BF and KiOP-B are remarkably similar, displaying a same pattern: the key areas for $\mathcal{PC}$ and $\mathcal{PP}$ seldom coincide and are predominantly distinct. This suggests that the model responds differently to the two datasets under these conditions, without any
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Fig. 3: $\mathcal{VP}$ and its corresponding Grad-Cam when (Dts.A, Dts.B) = (cifar10, svhn), ResNet-18 as backbone. Size of $\mathcal{PC}$ is set to 64 and $\mathcal{PP}$ is 128.
|
| 161 |
+
|
| 162 |
+
adverse interference between them. Furthermore, in the KiOP-BF scenario, the model focuses more intently on the key areas for $\mathcal{PC}$ and $\mathcal{PP}$ with less overlap between them, which implies that the two sets of synthetic data interact more effectively within our end-to-end framework.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Fig. 4: VP manages the knowledge storage for three distinct models simultaneously.
|
| 166 |
+
|
| 167 |
+
- KiOP on Multi Models. Moreover, our investigation extended to the feasibility of KiOP accommodating scenarios involving multiple (more than two) models. In practical scenarios, service providers frequently encounter simultaneous service requests. Therefore, it is worthwhile to investigate the feasibility of processing multiple requests concurrently. Illustrated in Figure 4 is a case with three original models, designated as Model $\mathcal{A}$ , Model $\mathcal{B}_1$ , and Model $\mathcal{B}_2$ , where Models $\mathcal{B}_1$ and $\mathcal{B}_2$ align with the Model $\mathcal{B}$ configurations depicted in Figure 2a. Consequently, the $\mathcal{VP}$ is segmented into three portions sized 36, 128, and 224 respectively, with the first portion being a shared component amongst Model $\mathcal{A}$ , Model $\mathcal{B}_1$ , and Model $\mathcal{B}_2$ , and the second portion shared between Model $\mathcal{B}_1$ and Model $\mathcal{B}_2$ . It can be observed that the learned $\mathcal{VP}$ still maintains considerable performance. For instance, with the dataset trio (Model $\mathcal{A}$ , Model $\mathcal{B}_1$ , Model $\mathcal{B}_2$ ) = (cifar100, mnist, fmnist), VP achieves an approximate $40\%$ accuracy for all three models. The comparison between (cifar100, mnist, fmnist) and (cifar100, fmnist, mnist) demonstrates KiOP's robustness to the sequence of $\mathcal{B}_i$ ( $i=1,2$ ) in multi-model scenerios.
|
| 168 |
+
|
| 169 |
+
- Trainable Parameters and Memory Usage. As shown in Figure 5, traditional GFKD obliges users to retain the original model, leading to considerable overhead with over 11 million trainable parameters and a memory footprint exceeding $43\mathrm{MB}$ . In stark contrast, KiOP significantly trims down this requirement by slashing the number of trainable parameters to roughly $50\mathrm{K}$ , thereby substantially reducing the storage resource demands. As a result, KiOP enables users to provide a mere $400\mathrm{Kb}$ of storage to access knowledge transfer services efficiently.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Fig. 5: KiOP achieves low storage resource usage.
|
| 173 |
+
|
| 174 |
+
# 5.2. Influence of Prompt Core Size.
|
| 175 |
+
|
| 176 |
+
In our earlier experiments, we defaulted to setting the $\mathcal{PC}$ and $\mathcal{PP}$ sizes at 36 and 128, respectively. We now conduct further investigations to ascertain how varying $\mathcal{PC}$ to $\mathcal{PP}$ size ratios influence the ability of $\mathcal{VP}$ to generalize across the two datasets. To this end, we compared four distinct $\mathcal{PC}$ sizes: 36, 48, 64, and 128. The experiment was conducted under the KiOP-B setting. Notably, a $\mathcal{PC}$ size of 128 implies an undifferentiated $\mathcal{VP}$ , where the two datasets share the entire $\mathcal{VP}$ without a distinct $\mathcal{PC}$ and $\mathcal{PP}$ division.
|
| 177 |
+
|
| 178 |
+
<table><tr><td colspan="2">model settings</td><td colspan="6">Model A: ResNet-50 Model B: ResNet-18</td></tr><tr><td rowspan="2">Dts.B</td><td>metrics</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td></tr><tr><td>Dts.A</td><td colspan="2">cifar100</td><td colspan="2">gtsrb</td><td colspan="2">svhn</td></tr><tr><td rowspan="4">mnist</td><td>36</td><td>41.14%</td><td>43.46%</td><td>51.58%</td><td>78.93%</td><td>52.40%</td><td>87.00%</td></tr><tr><td>48</td><td>35.95%</td><td>26.11%</td><td>54.28%</td><td>50.23%</td><td>51.76%</td><td>73.08%</td></tr><tr><td>64</td><td>41.58%</td><td>19.29%</td><td>53.82%</td><td>64.16%</td><td>52.57%</td><td>88.92%</td></tr><tr><td>128*</td><td>33.94%</td><td>11.76%</td><td>46.66%</td><td>43.09%</td><td>41.44%</td><td>89.31%</td></tr><tr><td rowspan="4">fmnist</td><td>36</td><td>38.77%</td><td>43.44%</td><td>39.04%</td><td>78.84%</td><td>38.79%</td><td>87.17%</td></tr><tr><td>48</td><td>39.74%</td><td>26.13%</td><td>37.91%</td><td>51.29%</td><td>42.79%</td><td>73.19%</td></tr><tr><td>64</td><td>36.21%</td><td>19.33%</td><td>36.11%</td><td>67.98%</td><td>40.92%</td><td>88.76%</td></tr><tr><td>128*</td><td>36.19%</td><td>11.56%</td><td>40.79%</td><td>53.04%</td><td>24.78%</td><td>89.97%</td></tr><tr><td rowspan="4">cifar10</td><td>36</td><td>43.62%</td><td>43.49%</td><td>37.56%</td><td>78.43%</td><td>37.10%</td><td>87.27%</td></tr><tr><td>48</td><td>43.59%</td><td>27.09%</td><td>36.16%</td><td>51.73%</td><td>35.28%</td><td>73.34%</td></tr><tr><td>64</td><td>43.23%</td><td>21.00%</td><td>36.01%</td><td>68.65%</td><td>34.32%</td><td>89.19%</td></tr><tr><td>128*</td><td>31.24%</td><td>11.16%</td><td>34.75%</td><td>44.44%</td><td>27.45%</td><td>91.31%</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 2: The effectiveness of $\mathcal{VP}$ in encapsulating the knowledge from two models varied with the size of the $\mathcal{PC}$ . We employed Model $\mathcal{A}$ with ResNet-50 and Model $\mathcal{V}$ with ResNet-18 as backbones, 9 different dataset pairs are considered.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
(a) Core size $= 36$
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
(b) Core size $= 48$
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
(c) Core size $= 64$
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
(d) Core size $= 128$
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
(a) Core size $= 36$
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
(b) Core size $= 48$
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
(c) Core size $= 64$
|
| 202 |
+
Fig. 6: Overall comparison across different datasets and $\mathcal{PC}$ sizes. The first line is the result when (Dts.A, Dts.B) = (gtsrb, fmnist), and the second line is the result when (Dts.A, Dts.B) = (cifar100, cifar10). The size of $\mathcal{PC}$ is set to 36,48,64 and 128.
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
(d) Core size $= 128$
|
| 206 |
+
|
| 207 |
+
Table 2 presents the outcomes for the four aforementioned configurations across 9 distinct dataset pairs. We observed that the performance of the $\mathcal{VP}$ varied with the size of $\mathcal{PC}$ depending on the specific pairing of datasets. For instance, with Dst. $\mathcal{A}$ set to svhn, the $\mathcal{VP}$ 's efficacy initially diminishes ( $36\rightarrow 48$ ) before it begins to improve ( $48\rightarrow 64\rightarrow 128$ ). Meanwhile, the trends for the corresponding Dts. $\mathcal{B}$ are diverse: for mnist, the first three $\mathcal{PC}$ sizes show negligible differences in performance, but a notable decrease of about $10\%$ is observed when the $\mathcal{PC}$ size is increased to 128; for fmnist, there's an initial enhancement followed by a dip, with the $\mathcal{PC}$ size of 48 yielding the optimal results; and for CIFar10, a continual decline in performance is noted as the $\mathcal{PC}$ size increases. We highlight the best results for each dataset within every dataset pair using boldface, and distinguish the highest overall performance for each dataset pair with a grey background. This clearly demonstrates that, when Dts. $\mathcal{A}$ remains the same, the overall optimal outcomes across different dataset pairs exhibit a consistent trend. Figure 6 depicts the training dynamics with various $\mathcal{PC}$ sizes for the dataset pair (Dts. $\mathcal{A}$ , Dts. $\mathcal{B}$ ) = (gtsrb, fmnist) and (Dts. $\mathcal{A}$ , Dts. $\mathcal{B}$ ) = (cifar100, CIFar10). It is observed that a smaller $\mathcal{PC}$ size (36) leads the $\mathcal{VP}$ to prioritize preserving its original performance on Dts. $\mathcal{A}$ . Conversely, as the $\mathcal{PC}$ size expands, the VP increasingly focuses on relearning and assimilating knowledge from Dts. $\mathcal{A}$ . Regarding Dts. $\mathcal{B}$ , as it shares a larger $\mathcal{PC}$ with Dts. $\mathcal{A}$ , the training trajectory experiences some fluctuations, yet ultimately stabilizes to reach a satisfactory outcome.
|
| 208 |
+
|
| 209 |
+
Moreover, an observable trend is that $\mathcal{VP}$ tends to yield superior performance when the data across the two datasets bear resemblance(i.e., $(\mathrm{Dts.}\mathcal{A},\mathrm{Dts.}\mathcal{B}) =$ (cifar100, cifar10) or (svhn, mnist)). This can be ascribed to the semantic parallels present in the two datasets. Models trained on datasets with similar semantic content tend to develop more comparable knowledge, making it easier for a $\mathcal{VP}$ to assimilate and learn from them.
|
| 210 |
+
|
| 211 |
+
# 5.3. KiOP Cross Architectures.
|
| 212 |
+
|
| 213 |
+
<table><tr><td colspan="2">model settings</td><td colspan="5">Model A: ResNet-18 Model B: VGG-13</td></tr><tr><td rowspan="2">Dts.B</td><td>metrics</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B Acc.A</td></tr><tr><td>Dts.A</td><td colspan="2">mnist</td><td colspan="2">cifar100</td><td>gtsrb</td></tr><tr><td rowspan="2">cifar10</td><td>KiOP-B</td><td>30.15%</td><td>98.30%</td><td>36.57%</td><td>37.28%</td><td>27.84% 73.08%</td></tr><tr><td>KiOP-BF</td><td>30.05%</td><td>97.32%</td><td>37.17%</td><td>36.36%</td><td>28.37% 73.73%</td></tr><tr><td colspan="2">model settings</td><td colspan="5">Model A: VGG-13 Model B: ResNet-18</td></tr><tr><td rowspan="2">Dts.A</td><td>metrics</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B</td><td>Acc.A</td><td>Acc.B Acc.A</td></tr><tr><td>Dts.B</td><td colspan="2">mnist</td><td colspan="2">fnnist</td><td>cifar10</td></tr><tr><td rowspan="2">gtsrb</td><td>KiOP-B</td><td>39.54%</td><td>94.18%</td><td>40.60%</td><td>93.90%</td><td>35.30% 94.09%</td></tr><tr><td>KiOP-BF</td><td>40.00%</td><td>94.34%</td><td>42.93%</td><td>94.35%</td><td>35.94% 93.56%</td></tr></table>
|
| 214 |
+
|
| 215 |
+
Table 3: Even with dissimilar backbones, KiOP consistently delivers outstanding results. This experiment was conducted using VGG-13 and ResNet-18. We evaluated 6 diverse dataset pairs. The sizes of $\mathcal{PC}$ and $\mathcal{PP}$ are 36 and 128, respectively.
|
| 216 |
+
|
| 217 |
+
To further validate the efficacy of KiOP, we expanded our experiments to include different backbone pairs. We specifically tested combinations of ResNet-18 and VGG-13, in both (model $\mathcal{A}$ , model $\mathcal{B}$ ) = (ResNet-18, VGG-13) and (VGG-13, ResNet-18). KiOP's performance was rigorously evaluated across six varied dataset pairs, with the outcomes detailed in Table 3. When the backbone pair is reversed to (ResNet-18, VGG-13) with CIFar10 as Dts. $\mathcal{B}$ , we observed that KiOP's performance remained consistent with previous results under homogeneous backbone conditions in Table 1. For instance, with (Dts.A, Dts.B) = (gtsrb, CIFar10), both Acc.A and Acc.B stayed largely the same as those obtained with same backbones. On the other hand, when the model pair is (VGG-13, ResNet-18) with gtsrb as Dts.A, there was a noticeable improvement in Acc.A by approximately $20\%$ , while there were gains of about $5\%$ for Acc.B. These variations likely reflect the complex interplay between differing model backbones and the datasets they are applied to.
|
| 218 |
+
|
| 219 |
+
# 6 Conclusion
|
| 220 |
+
|
| 221 |
+
We propose a new knowledge transfer paradigm named Knowledge in One Prompt (KiOP), which achieves knowledge transfer of $n$ ( $n \geq 2$ ) models to a single prompt. Our paradigm eliminates the need for access to real data. Moreover, owing to its reliance on training a prompt with a small set of parameters, and its capability to efficiently reuse the original model, it offers significant benefits in terms of storage resource efficiency and the processing of concurrent knowledge transfer requests. Sufficient experiments under different setups and different datasets proved its efficiency and adaptability. We believe that KiOP can inject new vitality into (data-free) knowledge transfer and makes a substantial move toward facilitating knowledge transfer in serving more realistic application scenarios.
|
| 222 |
+
|
| 223 |
+
# Acknowledgement
|
| 224 |
+
|
| 225 |
+
This work is supported by the Advanced Research and Technology Innovation Centre (ARTIC), the National University of Singapore under Grant (project number: A-0005947-21-00, project reference: ECT-RP2), and the Singapore Ministry of Education Academic Research Fund Tier 1 (WBS: A-0009440-01-00).
|
| 226 |
+
|
| 227 |
+
# References
|
| 228 |
+
|
| 229 |
+
1. Addepalli, S., Nayak, G.K., Chakraborty, A., Radhakrishnan, V.B.: Degan: Data-enriching gan for retrieving representative samples from a trained classifier. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 34, pp. 3130-3137 (2020)
|
| 230 |
+
2. Bahng, H., Jahanian, A., Sankaranarayanan, S., Isola, P.: Exploring visual prompts for adapting large-scale models. arXiv preprint arXiv:2203.17274 (2022)
|
| 231 |
+
3. Bao, H., Dong, L., Piao, S., Wei, F.: Beit: Bert pre-training of image transformers. arXiv preprint arXiv:2106.08254 (2021)
|
| 232 |
+
4. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J.D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al.: Language models are few-shot learners. Advances in neural information processing systems 33, 1877-1901 (2020)
|
| 233 |
+
5. Chen, A., Lorenz, P., Yao, Y., Chen, P.Y., Liu, S.: Visual prompting for adversarial robustness. In: ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). pp. 1-5. IEEE (2023)
|
| 234 |
+
6. Chen, A., Yao, Y., Chen, P.Y., Zhang, Y., Liu, S.: Understanding and improving visual prompting: A label-mapping perspective. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 19133-19143 (2023)
|
| 235 |
+
7. Chen, H., Wang, Y., Xu, C., Yang, Z., Liu, C., Shi, B., Xu, C., Xu, C., Tian, Q.: Data-free learning of student networks. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 3514-3522 (2019)
|
| 236 |
+
8. Chen, T., Kornblith, S., Norouzi, M., Hinton, G.: A simple framework for contrastive learning of visual representations. In: International conference on machine learning. pp. 1597-1607. PMLR (2020)
|
| 237 |
+
9. Chen, X., He, K.: Exploring simple siamese representation learning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 15750-15758 (2021)
|
| 238 |
+
0. Chen, Y., Chen, P., Liu, S., Wang, L., Jia, J.: Deep structured instance graph for distilling object detectors. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 4359-4368 (2021)
|
| 239 |
+
1. Cho, J.H., Hariharan, B.: On the efficacy of knowledge distillation. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 4794-4802 (2019)
|
| 240 |
+
2. Deng, J., Pan, Y., Yao, T., Zhou, W., Li, H., Mei, T.: Relation distillation networks for video object detection. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 7023-7032 (2019)
|
| 241 |
+
3. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018)
|
| 242 |
+
4. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al.: An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020)
|
| 243 |
+
5. Fang, G., Song, J., Shen, C., Wang, X., Chen, D., Song, M.: Data-free adversarial distillation. arXiv preprint arXiv:1912.11006 (2019)
|
| 244 |
+
6. Fang, G., Song, J., Wang, X., Shen, C., Wang, X., Song, M.: Contrastive model inversion for data-free knowledge distillation. arXiv preprint arXiv:2105.08584 (2021)
|
| 245 |
+
7. French, R.M.: Catastrophic forgetting in connectionist networks. Trends in cognitive sciences 3(4), 128-135 (1999)
|
| 246 |
+
|
| 247 |
+
18. Goodfellow, I.J., Mirza, M., Xiao, D., Courville, A., Bengio, Y.: An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211 (2013)
|
| 248 |
+
19. Gou, J., Yu, B., Maybank, S.J., Tao, D.: Knowledge distillation: A survey. International Journal of Computer Vision 129, 1789-1819 (2021)
|
| 249 |
+
20. He, K., Chen, X., Xie, S., Li, Y., Dollar, P., Girshick, R.: Masked autoencoders are scalable vision learners. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 16000-16009 (2022)
|
| 250 |
+
21. Hinton, G., Vinyals, O., Dean, J.: Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531 (2015)
|
| 251 |
+
22. Huang, H., Zhao, Z., Backes, M., Shen, Y., Zhang, Y.: Prompt backdoors in visual prompt learning. arXiv preprint arXiv:2310.07632 (2023)
|
| 252 |
+
23. Huang, Q., Dong, X., Chen, D., Zhang, W., Wang, F., Hua, G., Yu, N.: Diversity-aware meta visual prompting. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10878-10887 (2023)
|
| 253 |
+
24. Jia, M., Tang, L., Chen, B.C., Cardie, C., Belongie, S., Hariharan, B., Lim, S.N.: Visual prompt tuning. In: European Conference on Computer Vision. pp. 709-727. Springer (2022)
|
| 254 |
+
25. Kim, Y., Rush, A.M.: Sequence-level knowledge distillation. arXiv preprint arXiv:1606.07947 (2016)
|
| 255 |
+
26. Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu, A.A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., et al.: Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences 114(13), 3521-3526 (2017)
|
| 256 |
+
27. Lester, B., Al-Rfou, R., Constant, N.: The power of scale for parameter-efficient prompt tuning. arXiv preprint arXiv:2104.08691 (2021)
|
| 257 |
+
28. Li, Q., Li, L., Jiang, Z., Wang, B.: Towards robust and accurate visual prompting. arXiv preprint arXiv:2311.10992 (2023)
|
| 258 |
+
29. Li, X.L., Liang, P.: Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190 (2021)
|
| 259 |
+
30. Li, Y., Tsai, Y.L., Yu, C.M., Chen, P.Y., Ren, X.: Exploring the benefits of visual prompting in differential privacy. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 5158-5167 (2023)
|
| 260 |
+
31. Li, Y., Zhu, F., Gong, R., Shen, M., Yu, F., Lu, S., Gu, S.: Learning in school: Multi-teacher knowledge inversion for data-free quantization. arXiv preprint arXiv:2011.09899 (2020)
|
| 261 |
+
32. Lian, D., Zhou, D., Feng, J., Wang, X.: Scaling & shifting your features: A new baseline for efficient model tuning. In: Advances in Neural Information Processing Systems (NeurIPS) (2022)
|
| 262 |
+
33. Liu, X., Ji, K., Fu, Y., Tam, W.L., Du, Z., Yang, Z., Tang, J.: P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. arXiv preprint arXiv:2110.07602 (2021)
|
| 263 |
+
34. Liu, Y., Chen, K., Liu, C., Qin, Z., Luo, Z., Wang, J.: Structured knowledge distillation for semantic segmentation. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 2604-2613 (2019)
|
| 264 |
+
35. Liu, Y., Zhang, W., Wang, J., Wang, J.: Data-free knowledge transfer: A survey. arXiv preprint arXiv:2112.15278 (2021)
|
| 265 |
+
36. Lopes, R.G., Fenu, S., Starner, T.: Data-free knowledge distillation for deep neural networks. arXiv preprint arXiv:1710.07535 (2017)
|
| 266 |
+
37. Ma, X., Shen, Y., Fang, G., Chen, C., Jia, C., Lu, W.: Adversarial self-supervised data-free distillation for text classification. arXiv preprint arXiv:2010.04883 (2020)
|
| 267 |
+
|
| 268 |
+
38. Micaelli, P., Storkey, A.J.: Zero-shot knowledge transfer via adversarial belief matching. Advances in Neural Information Processing Systems 32 (2019)
|
| 269 |
+
39. Nayak, G.K., Mopuri, K.R., Shaj, V., Radhakrishnan, V.B., Chakraborty, A.: Zero-shot knowledge distillation in deep networks. In: International Conference on Machine Learning. pp. 4743-4751. PMLR (2019)
|
| 270 |
+
40. Oh, C., Hwang, H., Lee, H.y., Lim, Y., Jung, G., Jung, J., Choi, H., Song, K.: Blackvip: Black-box visual prompting for robust transfer learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 24224-24235 (2023)
|
| 271 |
+
41. Park, W., Kim, D., Lu, Y., Cho, M.: Relational knowledge distillation. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 3967-3976 (2019)
|
| 272 |
+
42. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International conference on machine learning. pp. 8748-8763. PMLR (2021)
|
| 273 |
+
43. Ribeiro, M., Grolinger, K., Capretz, M.A.: Mlaas: Machine learning as a service. In: 2015 IEEE 14th international conference on machine learning and applications (ICMLA). pp. 896-902. IEEE (2015)
|
| 274 |
+
44. Robins, A.: Catastrophic forgetting, rehearsal and pseudorehearsal. Connection Science 7(2), 123-146 (1995)
|
| 275 |
+
45. Sohn, K., Chang, H., Lezama, J., Polania, L., Zhang, H., Hao, Y., Essa, I., Jiang, L.: Visual prompt tuning for generative transfer learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 19840-19851 (2023)
|
| 276 |
+
46. Tang, J., Wang, K.: Ranking distillation: Learning compact ranking models with high performance for recommender system. In: Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining. pp. 2289-2298 (2018)
|
| 277 |
+
47. Wang, C.L., Li, Q., Xiang, Z., Wang, D.: Has approximate machine unlearning been evaluated properly? from auditing to side effects. arXiv preprint arXiv:2403.12830 (2024)
|
| 278 |
+
48. Weinzaepfel, P., Brégier, R., Combaluzier, H., Leroy, V., Rogez, G.: Dope: Distillation of part experts for whole-body 3d pose estimation in the wild. In: Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXVI 16. pp. 380-397. Springer (2020)
|
| 279 |
+
49. Wu, J., Li, X., Wei, C., Wang, H., Yuille, A., Zhou, Y., Xie, C.: Unleashing the power of visual prompting at the pixel level. arXiv preprint arXiv:2212.10556 (2022)
|
| 280 |
+
50. Wu, Y., Wen, R., Backes, M., Berrang, P., Humbert, M., Shen, Y., Zhang, Y.: Quantifying privacy risks of prompts in visual prompt learning. arXiv preprint arXiv:2310.11970 (2023)
|
| 281 |
+
51. Wu, Z., Xiong, Y., Yu, S.X., Lin, D.: Unsupervised feature learning via nonparametric instance discrimination. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3733-3742 (2018)
|
| 282 |
+
52. Yang, X., Ye, J., Wang, X.: Factorizing knowledge in neural networks. In: European Conference on Computer Vision. pp. 73-91. Springer (2022)
|
| 283 |
+
53. Yang, X., Zhou, D., Liu, S., Ye, J., Wang, X.: Deep model reassembly. Advances in neural information processing systems 35, 25739-25753 (2022)
|
| 284 |
+
|
| 285 |
+
54. Yao, X., Lu, F., Zhang, Y., Zhang, X., Zhao, W., Yu, B.: Progressively knowledge distillation via re-parameterizing diffusion reverse process. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 38, pp. 16425-16432 (2024)
|
| 286 |
+
55. Ye, J., Ji, Y., Wang, X., Gao, X., Song, M.: Data-free knowledge amalgamation via group-stack dual-gan. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 12516-12525 (2020)
|
| 287 |
+
56. Yin, H., Molchanov, P., Alvarez, J.M., Li, Z., Mallya, A., Hoiem, D., Jha, N.K., Kautz, J.: Dreaming to distill: Data-free knowledge transfer via deepinversion. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 8715-8724 (2020)
|
| 288 |
+
57. Yoo, J., Cho, M., Kim, T., Kang, U.: Knowledge extraction with no observable data. Advances in Neural Information Processing Systems 32 (2019)
|
| 289 |
+
58. Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Conditional prompt learning for vision-language models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 16816-16825 (2022)
|
| 290 |
+
59. Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Learning to prompt for vision-language models. International Journal of Computer Vision 130(9), 2337-2348 (2022)
|
encapsulatingknowledgeinoneprompt/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:925d38bbf07e42074cf442a1bca1893a2fd4e2144a46d6857f2fe3f00a51b4b1
|
| 3 |
+
size 523547
|
encapsulatingknowledgeinoneprompt/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:540a389a5ed0fa2b5a620017f29652875107c43b1ecc33a89ab89bfe869fb74f
|
| 3 |
+
size 589158
|
endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d5b838823a6321a13c43fe3eb3b3c9c8ddfdcfbced0f3446b407930559f5740
|
| 3 |
+
size 80044
|
endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00be48bc7b0b670d1291f6eab2849345d27610db2db0c255820316db724791e8
|
| 3 |
+
size 95385
|
endtoendratedistortionoptimized3dgaussianrepresentation/2a91cdc7-b6a0-4cbf-b473-c2c35d6be9f7_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67f769fd5037c4f2ef482ad3c069f73ba03a21d4e04e6c34fa34b549894c7734
|
| 3 |
+
size 8624931
|
endtoendratedistortionoptimized3dgaussianrepresentation/full.md
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# End-to-End Rate-Distortion Optimized 3D Gaussian Representation
|
| 2 |
+
|
| 3 |
+
Henan Wang $^{1}$ , Hanxin Zhu $^{1}$ , Tianyu He $^{2}$ , Runsen Feng $^{1}$ , Jiajun Deng $^{3}$ , Jiang Bian $^{2}$ , and Zhibo Chen $^{1}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> University of Science and Technology of China
|
| 6 |
+
|
| 7 |
+
2 Microsoft Research Asia
|
| 8 |
+
|
| 9 |
+
3 The University of Adelaide
|
| 10 |
+
|
| 11 |
+
https://rdogaussian.github.io/
|
| 12 |
+
|
| 13 |
+
Abstract. 3D Gaussian Splatting (3DGS) has become an emerging technique with remarkable potential in 3D representation and image rendering. However, the substantial storage overhead of 3DGS significantly impedes its practical applications. In this work, we formulate the compact 3D Gaussian learning as an end-to-end Rate-Distortion Optimization (RDO) problem and propose RDO-Gaussian that can achieve flexible and continuous rate control. RDO-Gaussian addresses two main issues that exist in current schemes: 1) Different from prior endeavors that minimize the rate under the fixed distortion, we introduce dynamic pruning and entropy-constrained vector quantization (ECVQ) that optimize the rate and distortion at the same time. 2) Previous works treat the colors of each Gaussian equally, while we model the colors of different regions and materials with learnable numbers of parameters. We verify our method on both real and synthetic scenes, showcasing that RDO-Gaussian greatly reduces the size of 3D Gaussian over $40\times$ , and surpasses existing methods in rate-distortion performance.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Recently, 3D Gaussian Splatting (3DGS) has gained increasing popularity owing to its potent capability in novel view synthesis [16], establishing itself as one of the most promising 3D representations. Different from neural radiance fields which implicitly model scenes via neural networks [21], 3DGS opts for anisotropic ellipsoids to explicitly represent scene properties, where impressive real-time rendering can be achieved. Various follow-ups employ 3DGS in multiple aspects such as anti-aliasing [38], dynamic scene reconstruction [9, 34], and 3D generation [20, 31, 36], etc. However, though remarkable results can be obtained, a common drawback of these 3DGS-based methods is their huge storage cost, which hinders their practical applications to a large extent and motivates the study of a compact 3DGS representation.
|
| 18 |
+
|
| 19 |
+
To achieve a compact representation, pioneer works target to minimize the rate of 3DGS while maintaining the distortion of rendered results as much as possible [10,18,22,24]. For example, several works propose to reduce the number
|
| 20 |
+
|
| 21 |
+
of Gaussians and represent colors as hash grids [18] or distilled parameters [10]. CompGS [24] introduces vector quantization based on the K-means to quantize the Gaussian attributes. Although significant rate reduction is achieved, limitations still exist: 1) they minimize the rate under the fixed distortion, however, it often requires rate-distortion trade-offs in the context of data compression [1,2]. 2) these works treat the colors for each Gaussian equally, such as using volumetric grids [18] or Spherical Harmonics (SHs) with the same degree [10]. This assumption, however, is not always efficient in the cases of different materials, illuminations, etc. For example, it is redundant for diffused objects while necessary for objects that have a view-dependent appearance. 3) the compact representation is obtained by multi-stage optimization [10], or off-the-shelf compression tools [22], which restrict the end-to-end learning from the data distribution.
|
| 22 |
+
|
| 23 |
+
To mitigate the above limitations, we present end-to-end Rate-Distortion Optimized 3D Gaussian representation (RDO-Gaussian) with flexible and continuous rate control. To this end, we formulate the 3D Gaussian representation learning as a joint optimization of rate (R) and distortion (D), i.e., $\mathrm{R} + \lambda \mathrm{D}$ , where $\lambda$ governs the trade-off between them. Our scheme is built upon the 3DGS framework [16] with three proposed components: Gaussian pruning, adaptive SHs pruning, and entropy-constrained vector quantization (ECVQ). Specifically, motivated by that the original training of 3DGS brings numerous redundant Gaussians [18], in Gaussian pruning, we learn to remove the redundant Gaussians by employing a learned mask for each Gaussian. For the attributes of each Gaussian, we observe that the majority of Gaussian parameters come from the SHs (76.3%), which is not necessary for every Gaussian to have the same degree in the case of different materials and illuminations. Therefore, we introduce adaptive SHs pruning to each Gaussian, allowing each Gaussian to have different degrees of SHs. Following this, to further obtain a compact representation, we convert the covariance and color attributes into the discrete representation with ECVQ, which conducts vector quantization and also allows rate-distortion joint optimization. As a result, the quantized and entropy-encoded parameters form the final 3D Gaussian representation.
|
| 24 |
+
|
| 25 |
+
We verify our method in multiple benchmarks including both real scenes and synthetic scenes. Results show that our method can achieve similar rendering quality while greatly reducing the Gaussian size compared to existing compression methods.
|
| 26 |
+
|
| 27 |
+
The main contributions of this paper can be summarized as:
|
| 28 |
+
|
| 29 |
+
- We formulate the 3D Gaussian representation learning as a joint optimization of rate and distortion to achieve flexible and continuous rate control.
|
| 30 |
+
- To realize rate-distortion optimization, we control the rates by introducing dynamic pruning and entropy-constrained vector quantization (ECVQ) that optimize the rate and distortion at the same time.
|
| 31 |
+
- We for the first time achieve volumetric bit allocation by introducing adaptive SHs pruning.
|
| 32 |
+
|
| 33 |
+
- On both real and synthetic scenes, our method surpasses existing methods in RD performance. The compression ratio can be up to over $40 \times$ compared to the original 3DGS.
|
| 34 |
+
|
| 35 |
+
# 2 Related Works
|
| 36 |
+
|
| 37 |
+
# 2.1 Compact Neural Radiance Fields
|
| 38 |
+
|
| 39 |
+
Neural Radiance Fields (NeRF) [21] has shown remarkable performance for continuous scene representation thanks to its utilization of neural networks, where photorealistic novel views can be generated in a per-scene optimization manner. However, due to its slow rendering, various methods introduce explicit representations such as points [25, 35], trees [33, 37] or feature grids [11, 23, 28] to speed up the rendering process. However, this brings additional storage costs. To reduce the storage costs, some works search for more compact representations [6, 26, 27, 30], while others use data compression techniques such as pruning or quantization to compress the feature grids [8, 13, 19, 29, 39]. However, NeRF series with high rendering quality [3, 4, 32, 40, 41] still leverage neural networks as the implicit representation, which is slow in both training and rendering. Such a problem motivates the innovation for novel 3D representation like 3D Gaussian Splatting (3DGS) [16].
|
| 40 |
+
|
| 41 |
+
# 2.2 Compact 3D Gaussian
|
| 42 |
+
|
| 43 |
+
3D Gaussian Splatting (3DGS) [16] has gained increasing popularity due to its high visual quality and fast rendering [16]. However, due to the massive size of the 3D Gaussians, various compression strategies have been developed so far. CompGS [24] uses K-means vector quantization (VQ) to compress Gaussian attributes. K-means cluster centroids and indexes are periodically updated along with the training of Gaussians. Four codebooks of different sizes are used for vector Gaussian attributes including scales, rotations, base colors and SHs. Light-Gaussian [10] adopts a multi-stage compression strategy, including importance pruning, SH distillation, and vectree compression. Specifically, every Gaussian is given an importance score based on its volume, opacity, and hit counts in rendering. Gaussians with low importance scores are pruned and the rest are finetuned to recover performance. After pruning, SHs are distilled from 3 degrees to 2 degrees by knowledge distillation to reduce the number of SH parameters. Finally, VQ is applied to attributes of the least important Gaussians, excluding positions and opacities. Positions are compressed by octree compression, as outlined in point cloud compression methodologies [14]. The remaining attributes are saved in float16 format to reduce storage. Compact-3DGS [18] uses Gaussian pruning, residual VQ, and hash grid-based color representations to compress Gaussians. For Gaussian pruning, each Gaussian is allocated with a learned mask which marks whether the Gaussian is pruned or not. Covariance
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Fig. 1: Training pipeline of RDO-Gaussian. We prune both Gaussians and SHs with learnable masks, which eliminates the redundant Gaussians and achieves volumetric bit allocation by adapting different SH degrees to different Gaussians. The pruned Gaussians are quantized by ECVQ to get discrete representations. Gaussian masks, SH masks and codebooks are jointly optimized along with Gaussians.
|
| 47 |
+
|
| 48 |
+
parameters, including scales and rotations, are compressed by residual VQ. Inspired by grid-based 3D representations like InstantNGP [23], the authors adopt hash grids to represent colors rather than SHs.
|
| 49 |
+
|
| 50 |
+
Different from the above methods that obtain the compact representation by only minimizing the rate under the fixed distortion, we formulate the compact 3D Gaussian representation learning as a joint optimization of rate and distortion to achieve flexible and continuous rate control. We also realize volumetric bit allocation by introducing adaptive SHs pruning for the first time.
|
| 51 |
+
|
| 52 |
+
# 3 Methods
|
| 53 |
+
|
| 54 |
+
We build our method on 3D Gaussian Splatting (3DGS) [16]. In this section, we first give an introduction to the background of 3DGS in Sec. 3.1 and then elaborate on the proposed RDO-Gaussian in Sec. 3.2 and 3.3.
|
| 55 |
+
|
| 56 |
+
# 3.1 Preliminary: 3D Gaussian Splitting
|
| 57 |
+
|
| 58 |
+
As a promising scene representation method, 3D Gaussian Splatting (3DGS) has demonstrated its powerful ability on novel view synthesis [16]. Different from NeRF which implicitly stores scene properties based on neural networks [21], 3DGS represents the underlying geometry and appearance explicitly using the anisotropic ellipsoid, which is parameterized by position $\mu \in \mathbb{R}^3$ , covariance $\pmb{\Sigma} \in \mathbb{R}^{3 \times 3}$ , color $\mathbf{c} \in \mathbb{R}^3$ , and opacity $\alpha \in \mathbb{R}$ . Covariance $\pmb{\Sigma}$ can be further factorized into scale vector $s \in \mathbb{R}^3$ and rotation vector $r \in \mathbb{R}^4$ . To render a novel view, 3DGS adopts a tile-based differentiable rasterization, where 3D Gaussians are projected onto the camera plane and thus form 2D Gaussians, followed by a
|
| 59 |
+
|
| 60 |
+
point-based rendering operation which is formulated as follows:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
M \left(\mathbf {p}, \mu_ {u}, \boldsymbol {\Sigma} _ {u}\right) = e ^ {- \frac {1}{2} \left(\left(\mathbf {p} - \mu_ {u}\right) ^ {T} \boldsymbol {\Sigma} _ {u} ^ {- 1} (\mathbf {p} - \mu_ {u})\right)},
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathbf {c} (\mathbf {p}) = \sum_ {u \in \mathcal {Q}} \mathbf {c} _ {u} \sigma_ {u} \prod_ {v = 1} ^ {u - 1} (1 - \sigma_ {v}), \sigma_ {u} = \alpha_ {u} M (\mathbf {p}, \mu_ {u}, \boldsymbol {\Sigma} _ {u}), \tag {1}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $\mathbf{p}$ is the target pixel, $\mathbf{c}(\mathbf{p})$ is the rendered color of $\mathbf{p}$ , $\mu_u, \Sigma_u, \alpha_u$ represent 2D Gaussian position, covariance and opacity projected from the $u$ -th 3D Gaussian, $\mathcal{Q}$ means the number of 3D Gaussian located inside this tile. By means of GPU-efficient optimization, impressive real-time rendering can be obtained.
|
| 71 |
+
|
| 72 |
+
However, 3DGS's high rendering quality and speed are at the expense of substantial storage capacity. As illustrated in Fig. 2, each Gaussian is characterized by 59 float32 numbers. Among these parameters, 45 (approximately $76\%$ ) pertain to Spherical Harmonics (SHs) of degrees 1-3. Despite comprising the majority of Gaussian parameters, these SHs contribute slightly to rendering quality as demonstrated in Fig. 5. Therefore, removing the redundant parameters while retaining the view-dependent appearance is necessary.
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Fig. 2: Composition of each Gaussian. Dimensions of each attribute and its percentage in size are marked in the pie chart.
|
| 76 |
+
|
| 77 |
+
# 3.2 Rate-Distortion Optimized 3D Gaussian
|
| 78 |
+
|
| 79 |
+
Overview. As depicted in Fig. 1, our optimization process comprises four main components: Gaussian pruning, adaptive spherical harmonics (SHs) pruning, entropy-constrained vector quantization (ECVQ), and rendering. To begin with, the input Gaussians are pruned by learned Gaussian masks. Subsequently, adaptive SH masks are applied to the SHs of each Gaussian, allowing that different Gaussians can have different degrees of SHs. Furthermore, covariance and color parameters are quantized by ECVQ to obtain a more compact representation, followed by a rendering process that is executed on the pruned and quantized 3D Gaussians.
|
| 80 |
+
|
| 81 |
+
Gaussian Pruning. To accurately represent complex scenes, 3DGS introduces a mechanism called adaptive density control which adjusts the number of Gaussians during the training process [16]. Specifically, adaptive density control first identifies regions with missing geometric features (under-reconstruction) as well as regions with large Gaussians (over-reconstruction), where Gaussians are either cloned or split to rectify these regions. In addition, Gaussians with low opacity are periodically removed to prevent floaters close to cameras. While adaptive density control can significantly enhance rendering quality, millions of Gaussians will be generated during this process and thus lead to substantial memory costs.
|
| 82 |
+
|
| 83 |
+
Inspired by Compact-3DGS [18], we prune the Gaussians based on scales and opacities with the help of learnable masks, since Gaussians with small scales and low opacities contribute little to the overall rendering quality in most circumstances. Specifically, we assign a mask parameterized by $\phi_i \in \mathbb{R}$ to each Gaussian, indicating whether it is pruned or not, where $i$ represents the Gaussian index. The mask value is mapped to $(0,1)$ using the sigmoid function, which is denoted as the soft mask:
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\phi_ {i} ^ {\mathrm {s o f t}} = \operatorname {s i g m o i d} \left(\phi_ {i}\right), \phi_ {i} ^ {\mathrm {s o f t}} \in (0, 1). \tag {2}
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
The soft mask is binarized by a predefined threshold $\phi_{\mathrm{thres}}$ . Since the binarization process is not differentiable, we employ the straight-through estimator (STE) [5] to bypass its gradient, resulting in the hard mask:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\phi_ {i} ^ {\text {h a r d}} = \mathbf {s g} \left(\mathbb {1} \left(\phi_ {i} ^ {\text {s o f t}} > \phi_ {\text {t h r e s}}\right) - \phi_ {i} ^ {\text {s o f t}}\right) + \phi_ {i} ^ {\text {s o f t}}, \phi_ {i} ^ {\text {h a r d}} \in \{0, 1 \}, \tag {3}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $\mathbb{1}$ is the indicator function and $\mathbf{sg}$ denotes the stop gradient operation.
|
| 96 |
+
|
| 97 |
+
The hard mask is then applied to the scale and opacity attributes before rendering. Specifically, if one Gaussian is marked as pruned, its scale and opacity become zero; otherwise, they remain intact. This process is formulated as follows:
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\hat {\mathbf {s}} _ {i} = \phi_ {i} ^ {\mathrm {h a r d}} \mathbf {s} _ {i}, \hat {\alpha} _ {i} = \phi_ {i} ^ {\mathrm {h a r d}} \alpha_ {i}, \tag {4}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where $\mathbf{s}_i\in \mathbb{R}^3$ , $\alpha_{i}\in \mathbb{R}$ represent the scale and opacity values of the $i$ -th Gaussian respectively, and $\hat{\mathbf{s}}_i$ , $\hat{\alpha}_i$ denote their masked versions.
|
| 104 |
+
|
| 105 |
+
Since both soft masks and hard masks are designed to reduce the number of Gaussians, only when their values are optimized below the threshold can they take effect. Hence, we define the training objective of Gaussian masks as follows:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\mathcal {L} _ {\mathrm {G S p r u n e}} = \frac {1}{N} \sum_ {i} \phi_ {i} ^ {\mathrm {s o f t}}, \tag {5}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
where $N$ is the total number of Gaussians.
|
| 112 |
+
|
| 113 |
+
It is important to note that after one training iteration, though some Gaussians are labeled as pruned by the masks, they are not actually removed. The masks are dynamic, meaning that their values are continuously optimized until training ends. Once they surpass the threshold, the corresponding Gaussians will respawn. Upon completion of training, these Gaussians are finally eliminated and not stored anymore.
|
| 114 |
+
|
| 115 |
+
Adaptive Spherical Harmonics Pruning. Following prior work [11], 3DGS employs Spherical Harmonics (SHs) to represent the color of the radiance field. By default, SH parameters extend up to 4 degrees: the degree-0 or DC component determines the base diffuse color, while degree-1 to degree-3 components manage view-dependent effects such as reflection. Though SHs of higher degrees are able to capture a more intricate view-dependent appearance, with increasing SH degrees, the number of SH parameters also grows exponentially. Considering
|
| 116 |
+
|
| 117 |
+
that scene complexity varies across different views, the SH parameters of each Gaussian need to be adaptive based on scene complexity, instead of treating the degrees of each Gaussian equally.
|
| 118 |
+
|
| 119 |
+
To this end, we design a degree-adaptive mask pruning strategy to eliminate redundant SH parameters. The mask is end-to-end optimized to automatically learn the complex view-dependent effects and diffused regions. Similar to Gaussian pruning, each Gaussian is assigned 3 learnable masks corresponding to the 3 harmonic degrees:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array}{l} \theta_ {i} ^ {(l) \text {s o f t}} = \operatorname {s i g m o i d} \left(\theta_ {i} ^ {(l)}\right), \theta_ {i} ^ {(l) \text {s o f t}} \in (0, 1), \tag {6} \\ \theta_ {i} ^ {(l) \mathrm {h a r d}} = \mathbf {s g} \left(\mathbb {1} \left(\theta_ {i} ^ {(l) \mathrm {s o f t}} > \theta_ {\mathrm {t h r e s}}\right) - \theta_ {i} ^ {(l) \mathrm {s o f t}}\right) + \theta_ {i} ^ {(l) \mathrm {s o f t}}, \theta_ {i} ^ {(l) \mathrm {h a r d}} \in \{0, 1 \}, \\ \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
where $\theta_i^{(l)}$ represents the raw mask value for degree- $l$ of the $i$ -th Gaussian, $\theta_i^{(l)\mathrm{soft}}$ and $\theta_i^{(l)\mathrm{hard}}$ denote its soft and hard versions respectively. Before rendering, the hard SH mask is applied to the corresponding degree of SH parameters, setting them to zero if the mask value is zero and unchanged otherwise:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\hat {\mathbf {c}} _ {i} ^ {(l)} = \theta_ {i} ^ {(l) \text {h a r d}} \mathbf {c} _ {i} ^ {(l)}, \tag {7}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $\mathbf{c}_i^{(l)}\in \mathbb{R}^{(2l + 1)\times 3}$ is the degree- $l$ SH coefficients of the $i$ -th Gaussian and $\hat{\mathbf{c}}_i^{(l)}$ denotes its masked version.
|
| 132 |
+
|
| 133 |
+
Given the varying number of SH coefficients between degrees, the SHs pruning loss of each degree is weighted by its number of coefficients:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\mathcal {L} _ {\mathrm {S H p r u n e}} = \frac {1}{N} \sum_ {i} \sum_ {l = 1} ^ {k} \frac {2 l + 1}{(k + 1) ^ {2} - 1} \theta_ {i} ^ {(l) \text {s o f t}}, \tag {8}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
where $k$ denotes the maximum degree of SHs ( $k = 3$ by default).
|
| 140 |
+
|
| 141 |
+
Entropy-Constrained Vector Quantization. By means of Gaussian pruning and adaptive SHs pruning, the number of Gaussians and SH parameters can be significantly reduced. Despite these efforts, there are still some redundancies that persist within the attributes of Gaussians. As illustrated in Fig. 2, these attributes are usually high-dimensional vectors with numerous bits to represent, which motivates us to convert them into a compact discrete representation.
|
| 142 |
+
|
| 143 |
+
Vector quantization (VQ) [12] is a prevalent technique used in common compression tasks. For continuous vector inputs, VQ identifies the most suitable representative codeword vector from the codebook and substitutes the vector with the corresponding codeword index. Consequently, VQ transforms a continuous vector into a discrete index, resulting in significant bit savings. Considering the superiority of VQ, most 3DGS compression works [10, 18, 24] adopt VQ as the main part of their compression procedures. However, during the step of codeword selection, existing works only choose the codeword with minimal distortion (i.e., L2 distance between input vector and codeword vector) regardless of the
|
| 144 |
+
|
| 145 |
+
rate, resulting in sub-optimal rate-distortion (RD) performance. In pursuit of RD optimization, we adopt ECVQ [7] as our quantization approach, which considers both rate and distortion in codeword selection and can ensure better RD performance.
|
| 146 |
+
|
| 147 |
+
In order to estimate the rate of each codeword, we devise a discrete unconditional entropy model $P$ to estimate the probability distribution of each index. The probability of index $j$ in the codebook is denoted as $p_j$ , satisfying $\sum_{j=1}^{M} p_j = 1$ and $p_j > 0$ . However, directly optimizing $p_j$ forms a constrained optimization problem, which is hard to solve. To optimize $p_j$ unconstrainedly, we parameterize $p_j$ with the softmax function and unnormalized logits $w = (w_1, w_2, \dots, w_M)$ :
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
p _ {j} = \frac {e ^ {- w _ {j}}}{\sum_ {m = 1} ^ {M} e ^ {- w _ {m}}}, \tag {9}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
where $M$ is the codebook size.
|
| 154 |
+
|
| 155 |
+
Among all Gaussian attributes, we quantize three of them: scale, rotation and color. For the color attribute, since adaptive SHs pruning precedes ECVQ, the degrees of each Gaussian may vary. To avoid zero-value appearing in codebooks, four codebooks are allocated for all 4 degrees of SHs, resulting in 6 codebooks in total. Taking the scale attribute as an example, given a scale tensor $\mathbf{s}_i$ , we select the index $j$ with minimal RD loss:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
j = \arg \min _ {m} \frac {r _ {i , m} ^ {(s)}}{\lambda^ {(s)}} + d _ {i, m} ^ {(s)} = \arg \min _ {m} - \frac {\log p _ {m}}{\lambda^ {(s)}} + \left(\mathbf {s} _ {i} - \mathrm {C B} ^ {(s)} [ m ]\right) ^ {2}, \tag {10}
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
where $\mathrm{CB}^{(s)}$ is the codebook for scale, $[\cdot]$ is the indexing operation, $r_{i,m}^{(s)}$ is the rate loss if $\mathrm{CB}^{(s)}[m]$ is selected as the codeword for $\mathbf{s}_i$ , $d_{i,m}^{(s)}$ is the VQ codeword loss respectively and $\lambda^{(s)}$ is the hyperparameter controlling the balance between rate and distortion.
|
| 162 |
+
|
| 163 |
+
We sum up the rate loss and VQ loss of every Gaussian attribute and average on all Gaussians to obtain the total rate loss and VQ loss:
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
\mathcal {L} _ {\text {r a t e}} = \frac {1}{N} \sum_ {i = 1} ^ {N} \frac {r _ {i , j} ^ {(s)}}{\lambda^ {(s)}} + \frac {r _ {i , j} ^ {(r)}}{\lambda^ {(r)}} + \frac {r _ {i , j} ^ {(D C)}}{\lambda^ {(D C)}} + \frac {r _ {i , j} ^ {(S H 1)}}{\lambda^ {(S H 1)}} + \frac {r _ {i , j} ^ {(S H 2)}}{\lambda^ {(S H 2)}} + \frac {r _ {i , j} ^ {(S H 3)}}{\lambda^ {(S H 3)}}, \tag {11}
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\mathcal {L} _ {\mathrm {V Q}} = \frac {1}{N} \sum_ {i = 1} ^ {N} d _ {i, j} ^ {(s)} + d _ {i, j} ^ {(r)} + d _ {i, j} ^ {(D C)} + d _ {i, j} ^ {(S H 1)} + d _ {i, j} ^ {(S H 2)} + d _ {i, j} ^ {(S H 3)},
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
where superscripts $(s)$ , $(r)$ , $(DC)$ , $(SH1)$ , $(SH2)$ , $(SH3)$ denote scale, rotation, DC component of color, and degree 1-3 harmonics of color, respectively.
|
| 174 |
+
|
| 175 |
+
Training Objective. Following ECVQ, we obtain the quantized Gaussians for rendering. The rendering loss combines both L1 loss and SSIM loss with $\lambda_{\mathrm{SSIM}}$ balancing their weights, which is the same as 3DGS [16]:
|
| 176 |
+
|
| 177 |
+
$$
|
| 178 |
+
\mathcal {L} _ {\text {r e n d e r}} = \left(1 - \lambda_ {\text {S S I M}}\right) \mathcal {L} _ {1} + \lambda_ {\text {S S I M}} \mathcal {L} _ {\text {D - S S I M}}. \tag {12}
|
| 179 |
+
$$
|
| 180 |
+
|
| 181 |
+
Finally, the losses generated during the above process are summed up with the rendering loss with respective weights:
|
| 182 |
+
|
| 183 |
+
$$
|
| 184 |
+
\mathcal {L} _ {\text {t o t a l}} = \lambda_ {\mathrm {G S p r u n e}} \mathcal {L} _ {\mathrm {G S p r u n e}} + \lambda_ {\mathrm {S H p r u n e}} \mathcal {L} _ {\mathrm {S H p r u n e}} + \mathcal {L} _ {\text {r a t e}} + \mathcal {L} _ {\mathrm {V Q}} + \mathcal {L} _ {\text {r e n d e r}} \tag {13}
|
| 185 |
+
$$
|
| 186 |
+
|
| 187 |
+
# 3.3 Parameters Encoding
|
| 188 |
+
|
| 189 |
+
After optimization, we acquire a pruned and quantized Gaussian representation, which can be further encoded for storage and transmission purposes.
|
| 190 |
+
|
| 191 |
+
Gaussians Removement. While many Gaussians are marked as pruned by the Gaussian pruning mask, they are not actually removed and continue being optimized during compression-aware training. After training, they can be completely removed and not stored anymore.
|
| 192 |
+
|
| 193 |
+
Gaussians Rearrangement. During the adaptive SHs pruning step, SH parameters of Gaussians are pruned to various degrees. If they are directly removed as the previous step does, it's not possible to locate where the remaining parameters are when rendering. As a result, we need to pack SH masks into the representation to mark the pruned locations, which needs additional storage costs.
|
| 194 |
+
|
| 195 |
+
Fortunately, the Gaussian representation is order-invariant where rearranging Gaussians does not impact the rendering results. We can cluster Gaussians with the same SH masks and reorder Gaussians by them. Since the position of SH parameters are identical in the same cluster, SH masks are not needed anymore and the only storage overhead is the indexes where a kind of SH masks first appears. Specifically, we treat the 3 bits SH hard masks as the integer (e.g., SH mask 011 corresponds to integer 3) and sort the Gaussians based on this integer. Following sorting, the index where each integer first appears is stored as the starting position of a specific kind of mask. Therefore, only 8 additional indexes need to be stored.
|
| 196 |
+
|
| 197 |
+
Arithmetic Coding. Attributes undergoing ECVQ can be represented by integer indexes. Leveraging the unconditional entropy model learned during the ECVQ process, we obtain the probability distribution of each index. These distributions are utilized in arithmetic coding to eliminate the statistical redundancies between attribute values. In addition to the encoded indexes, codebooks and logits also need to be stored for decoding. Note that codewords not used by any Gaussian as well as the corresponding logits are removed to reduce the sizes of the codebook and logits.
|
| 198 |
+
|
| 199 |
+
Non-VQ Attributes. Two attributes, position and opacity, are not quantized. Previous research indicates that quantizing positions may lead to overlapping Gaussians [24], significantly impacting performance. Therefore, we simply reduce
|
| 200 |
+
|
| 201 |
+
its precision from float32 to float16 to decrease its size without affecting performance. Regarding opacity, being a scalar rather than a vector, we opt for scalar quantization and map its value to an 8-bit integer.
|
| 202 |
+
|
| 203 |
+
# 4 Experiments
|
| 204 |
+
|
| 205 |
+
# 4.1 Experimental Settings
|
| 206 |
+
|
| 207 |
+
Datasets. We evaluate our proposed method on four commonly-adopted datasets: the Mip-NeRF360 dataset [4], the Tanks and Temples dataset [17], the Deep Blending dataset [15] and the NeRF-Synthetic dataset [21]. For the former three datasets, various real-world scenes that contain both indoor and outdoor scenes are selected. For the NeRF-Synthetic dataset, eight $360^{\circ}$ object-centric scenes with black background are utilized. We follow the experimental protocols provided by 3DGS [16].
|
| 208 |
+
|
| 209 |
+
Implementation Details. We first train the Gaussians based solely on 3DGS [16] up to 15k iterations. Subsequently, we introduce our rate-distortion optimization, incorporating Gaussian pruning, adaptive SHs pruning and ECVQ into the optimization pipeline. During this process, parameters generated from the aforementioned operations are jointly optimized with classical Gaussian parameters (i.e., parameters illustrated in Sec. 3.1) until the end of training. After this optimization process, we pack the trained Gaussian radiance field to the final representation using the method mentioned in Sec. 3.3. Kindly refer to the supplementary materials for more details on the hyperparameters used.
|
| 210 |
+
|
| 211 |
+
Baselines We compare the performance of our proposed RDO-Gaussian with 3DGS [16], CompGS [24], Compact-3DGS [18] and LightGaussian [10]. For a fair comparison, We reimplemented 3DGS by ourselves. The performance of CompGS is computed from their pre-trained models, and the performance of LightGaussian and Compact-3DGS are quoted from their papers.
|
| 212 |
+
|
| 213 |
+
# 4.2 Results
|
| 214 |
+
|
| 215 |
+
Rate-Distortion Performance. By modifying the $\lambda_{\mathrm{SHprune}}$ and $\lambda_{\mathrm{GSprune}}$ in Eq. 13, we obtain a series of compressed Gaussians with different sizes. Novel views rendered from these Gaussians are measured and averaged using metrics such as PSNR, SSIM and LPIPS, where a rate-distortion (RD) curve is drawn in Fig. 3. Moreover, we also present the performance of 3DGS and other 3DGS compression works mentioned in Sec. 4.1 on the RD curve, where Gaussians of only one single size exist.
|
| 216 |
+
|
| 217 |
+
According to Fig. 3, it is observed that compared to 3DGS, our proposed method is able to achieve over $40 \times$ compression ratio without severe degradation of quality. If we further decrease the rates, we can compress Gaussians
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
|
| 225 |
+

|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
Fig. 3: Rate-Distortion curves of our method on all four datasets. On the x-axis is the rate of the compressed Gaussian representation (in logarithmic scale) and the y-axis represents the corresponding quality metric (SSIM, PSNR, LPIPS). Both are averaged over scenes in a dataset. We also mark the performance of 3DGS (implemented by ourselves) and other 3DGS compression works (from pre-trained models or papers).
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
|
| 242 |
+

|
| 243 |
+
|
| 244 |
+
at over $300 \times$ compression ratio with approximately 1 MB size, while a typical JPEG image in Mip-NeRF360 dataset [4] with resolution $3000 \times 2000$ still needs a storage space of 3 MB. Such an observation indicates that our method can compress Gaussian to a size less than an image with adequate scene information, which is important in extremely band-limited circumstances. Compared with existing Gaussian compression methods, RDO-Gaussian can also achieve over $30\%$ bitrate savings on average.
|
| 245 |
+
|
| 246 |
+
Quantitative Comparisons. To validate the performance of our representation at different RD trade-offs, we showcase the images rendered from our high-rate and low-rate Gaussian representations respectively. As shown in Fig. 4, our high-rate representation achieves over $40 \times$ compression ratio on average while maintaining the same quality as 3DGS. For our low-rate representation, Gaussians can be compressed to the size of an image ( $1 \sim 3$ MB) without severe distortions.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
Fig. 4: Perceptual comparison of our method and 3DGS. We extract the rendered images from our Gaussian representations of different rates. The PSNR values and rates are marked in each rendered image. The average compression ratio can be up to $40 \times$ for the high-rate representation and $300 \times$ for the low-rate representation.
|
| 250 |
+
|
| 251 |
+
# 4.3 Ablation Studies
|
| 252 |
+
|
| 253 |
+
Bitrate Savings of Each Module. To evaluate the bitrate savings achieved by each module, we progressively incorporate these modules into 3DGS. Subsequently, we measure changes in the rate and PSNR across different scenes, as depicted in Tab. 1. In scene Truck, Gaussian pruning reduces around $55\%$ Gaussians with a minor PSNR drop. Subsequent adaptive SHs pruning eliminates redundant SH parameters for each Gaussian, saving approximately $65\%$ bitrate compared to the previous one. Following pruning, ECVQ discretizes continuous Gaussian attributes (excluding position and opacity), resulting in substantial bitrate savings albeit with most performance degradation. Lastly, parameter compression reduces around half the bitrate. These four steps combined achieve over $43\times$ compression ratio. For scene Playroom, the PSNR increases as the rate goes down, contrary to the expected decrease. This anomaly arises from 3DGS overfitting to training images, while pruning and quantization techniques inherently mitigate overfitting issues.
|
| 254 |
+
|
| 255 |
+
Table 1: Bitrate savings achieved through various techniques. Beginning with 3DGS [16], we incrementally introduce our methodologies to quantify the reduction in bitrate compared to the preceding step.
|
| 256 |
+
|
| 257 |
+
<table><tr><td rowspan="2">Module</td><td colspan="3">Truck</td><td colspan="3">Playroom</td></tr><tr><td>Rate (MB)</td><td>Savings (%)</td><td>PSNR</td><td>Rate (MB)</td><td>Savings (%)</td><td>PSNR</td></tr><tr><td>3DGS</td><td>609.3</td><td>-</td><td>25.36</td><td>550.5</td><td>-</td><td>29.95</td></tr><tr><td>+GS prune</td><td>275.2</td><td>-54.83%</td><td>25.34</td><td>252.5</td><td>-54.14%</td><td>29.97</td></tr><tr><td>+Ada. SHs prune</td><td>94.1</td><td>-65.81%</td><td>25.32</td><td>81.9</td><td>-67.58%</td><td>30.04</td></tr><tr><td>+ECVQ</td><td>33.9</td><td>-63.98%</td><td>25.06</td><td>27.3</td><td>-66.62%</td><td>30.18</td></tr><tr><td>+Param comp</td><td>14.9</td><td>-56.15%</td><td>25.04</td><td>13.1</td><td>-52.02%</td><td>30.16</td></tr></table>
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
|
| 263 |
+

|
| 264 |
+
|
| 265 |
+

|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
|
| 269 |
+

|
| 270 |
+
Fig.5: Effect of our adaptive SHs pruning. Our method can preserve most view-dependent effects modeled by 3DGS with minor PSNR drops while pruning abundant SH parameters.
|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
|
| 278 |
+

|
| 279 |
+
|
| 280 |
+
Effect of Adaptive SHs Pruning. To further validate the effect of adaptive SHs pruning and its volumetric bit allocation function, we exclusively maintain adaptive SH pruning and deactivate other modules during training. We evaluate our method across various SH pruning ratios on scenes Drums and Materials from the NeRF-Synthetic dataset [21]. For comparison, we present images from 3DGS and 3DGS without SHs, where the maximum SH parameter degree is restricted to 0.
|
| 281 |
+
|
| 282 |
+
As shown in Fig. 5, we observe that view-dependent effects such as specular reflection are evident in both scenes. Our method can prune redundant SH parameters while retaining view-dependent effects modeled by 3DGS, such as the reflection on drums and edges of the ball. When pruning ratios are around $70\%$ , the PSNR drop is minor and quality degradation can be hardly observed. Even with pruning ratios exceeding $90\%$ , our method consistently outperforms 3DGS without SHs by a considerable margin in terms of PSNR values. We also notice
|
| 283 |
+
|
| 284 |
+
Table 2: Composition of our high-rate Gaussian representation and low-rate one trained on scene Truck.
|
| 285 |
+
|
| 286 |
+
<table><tr><td rowspan="2">Component</td><td colspan="2">High Rate</td><td colspan="2">Low Rate</td></tr><tr><td>Rate (MB)</td><td>Proportion (%)</td><td>Rate (MB)</td><td>Proportion (%)</td></tr><tr><td>Header</td><td>4 × 10-5</td><td>≈ 0%</td><td>4 × 10-5</td><td>≈ 0%</td></tr><tr><td>Indexes</td><td>7.23</td><td>48.7%</td><td>0.54</td><td>36.2%</td></tr><tr><td>Codebooks</td><td>0.98</td><td>6.6%</td><td>0.32</td><td>21.8%</td></tr><tr><td>Logits</td><td>0.12</td><td>0.8%</td><td>0.09</td><td>5.8%</td></tr><tr><td>Positions</td><td>6.53</td><td>43.9%</td><td>0.53</td><td>36.1%</td></tr><tr><td>Total</td><td>14.86</td><td>-</td><td>1.48</td><td>-</td></tr></table>
|
| 287 |
+
|
| 288 |
+
that 3DGS without SHs may blend colors from different viewpoints for specific objects, as evidenced by the black scratch artifacts appearing on the base of the silver ball. Our adaptive SH pruning successfully avoids these artifacts, even when the pruning ratio exceeds $90\%$ .
|
| 289 |
+
|
| 290 |
+
Representation Composition. We dissect the compressed representation and analyze its composition. From scene Truck, we select 2 representations with different rates. The compressed representation consists of 5 components: header, indexes, codebooks, logits and positions, as listed in Tab. 2. Specifically, the header consists of Gaussian indexes of SH mask cluster boundaries as mentioned in Sec. 3.3 as well as the quantization step and the minimal opacity value used in opacity quantization. Logits represent the probability distribution of indexes which is needed for arithmetic coding.
|
| 291 |
+
|
| 292 |
+
It can be derived that positions and indexes dominate the proportion in the representation at high bitrates. As bitrate decreases, the proportion for codebook and logits gradually increases.
|
| 293 |
+
|
| 294 |
+
# 5 Conclusion
|
| 295 |
+
|
| 296 |
+
Our presented RDO-Gaussian formulates the learning of 3D Gaussian representations as a joint rate-distortion optimization process, achieving flexible and continuous rate control. Moreover, we devise an adaptive SHs pruning strategy that effectively removes redundant SHs while preserving view-dependent appearance. Experimental results indicate that our method can achieve over $40\times$ compression ratio on 3DGS with minor distortion.
|
| 297 |
+
|
| 298 |
+
One of the limitations of our work is that representations are trained individually for different rates without shared information. This introduces additional storage overhead when the same scene is represented by multiple Gaussian representations of different bitrates. In future work, we aim to design a variable-rate Gaussian representation that supports multiple bitrates in a single representation.
|
| 299 |
+
|
| 300 |
+
# Acknowledgements
|
| 301 |
+
|
| 302 |
+
This work was supported in part by NSFC under Grant 62371434, 62021001.
|
| 303 |
+
|
| 304 |
+
# References
|
| 305 |
+
|
| 306 |
+
1. Balle, J., Laparra, V., Simoncelli, E.P.: End-to-end optimization of nonlinear transform codes for perceptual quality. In: 2016 Picture Coding Symposium (PCS). pp. 1-5. IEEE (2016)
|
| 307 |
+
2. Balle, J., Laparra, V., Simoncelli, E.P.: End-to-end optimized image compression. In: International Conference on Learning Representations (2017)
|
| 308 |
+
3. Barron, J.T., Mildenhall, B., Tancik, M., Hedman, P., Martin-Brualla, R., Srinivasan, P.P.: Mip-nerf: A multiscale representation for anti-aliasing neural radiance fields. ICCV (2021)
|
| 309 |
+
4. Barron, J.T., Mildenhall, B., Verbin, D., Srinivasan, P.P., Hedman, P.: Mipnerf 360: Unbounded anti-aliased neural radiance fields. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5470-5479 (2022)
|
| 310 |
+
5. Bengio, Y., Léonard, N., Courville, A.: Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 (2013)
|
| 311 |
+
6. Chen, A., Xu, Z., Geiger, A., Yu, J., Su, H.: Tensorf: Tensorial radiance fields. In: European Conference on Computer Vision. pp. 333-350. Springer (2022)
|
| 312 |
+
7. Chou, P.A., Lookabbaugh, T., Gray, R.M.: Entropy-constrained vector quantization. IEEE Transactions on acoustics, speech, and signal processing 37(1), 31-42 (1989)
|
| 313 |
+
8. Deng, C.L., Tartaglione, E.: Compressing explicit voxel grid representations: fast nerfs become also small. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. pp. 1236-1245 (2023)
|
| 314 |
+
9. Duan, Y., Wei, F., Dai, Q., He, Y., Chen, W., Chen, B.: 4d gaussian splatting: Towards efficient novel view synthesis for dynamic scenes. arXiv preprint arXiv:2402.03307 (2024)
|
| 315 |
+
0. Fan, Z., Wang, K., Wen, K., Zhu, Z., Xu, D., Wang, Z.: Lightgaussian: Unbounded 3d gaussian compression with 15x reduction and 200+ fps. arXiv preprint arXiv:2311.17245 (2023)
|
| 316 |
+
1. Fridovich-Keil, S., Yu, A., Tancik, M., Chen, Q., Recht, B., Kanazawa, A.: Plenoxels: Radiance fields without neural networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5501-5510 (2022)
|
| 317 |
+
2. Gersho, A., Gray, R.M.: Vector quantization and signal compression, vol. 159. Springer Science & Business Media (2012)
|
| 318 |
+
3. Girish, S., Shrivastava, A., Gupta, K.: Shacira: Scalable hash-grid compression for implicit neural representations. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 17513-17524 (2023)
|
| 319 |
+
4. Graziosi, D., Nakagami, O., Kuma, S., Zaghetto, A., Suzuki, T., Tabatabai, A.: An overview of ongoing point cloud compression standardization activities: Video-based (v-pcc) and geometry-based (g-pcc). APSIPA Transactions on Signal and Information Processing 9, e13 (2020)
|
| 320 |
+
5. Hedman, P., Philip, J., Price, T., Frahm, J.M., Drettakis, G., Brostow, G.: Deep blending for free-viewpoint image-based rendering. ACM Transactions on Graphics (ToG) 37(6), 1-15 (2018)
|
| 321 |
+
|
| 322 |
+
16. Kerbl, B., Kopanas, G., Leimkuhler, T., Drettakis, G.: 3d gaussian splatting for real-time radiance field rendering. ACM Transactions on Graphics 42(4) (2023)
|
| 323 |
+
17. Knapitsch, A., Park, J., Zhou, Q.Y., Koltun, V.: Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics (ToG) 36(4), 1-13 (2017)
|
| 324 |
+
18. Lee, J.C., Rho, D., Sun, X., Ko, J.H., Park, E.: Compact 3d gaussian representation for radiance field. arXiv preprint arXiv:2311.13681 (2023)
|
| 325 |
+
19. Li, L., Shen, Z., Wang, Z., Shen, L., Bo, L.: Compressing volumetric radiance fields to 1 mb. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4222-4231 (2023)
|
| 326 |
+
20. Liu, X., Zhan, X., Tang, J., Shan, Y., Zeng, G., Lin, D., Liu, X., Liu, Z.: Human-gaussian: Text-driven 3d human generation with gaussian splatting. arXiv preprint arXiv:2311.17061 (2023)
|
| 327 |
+
21. Mildenhall, B., Srinivasan, P.P., Tancik, M., Barron, J.T., Ramamoorthi, R., Ng, R.: Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM 65(1), 99-106 (2021)
|
| 328 |
+
22. Morgenstern, W., Barthel, F., Hilsmann, A., Eisert, P.: Compact 3d scene representation via self-organizing gaussian grids. arXiv preprint arXiv:2312.13299 (2023)
|
| 329 |
+
23. Müller, T., Evans, A., Schied, C., Keller, A.: Instant neural graphics primitives with a multiresolution hash encoding. ACM Transactions on Graphics (ToG) 41(4), 1-15 (2022)
|
| 330 |
+
24. Navaneet, K., Meibodi, K.P., Koohpayegani, S.A., Pirsiavash, H.: Compact3d: Compressing gaussian splat radiance field models with vector quantization. arXiv preprint arXiv:2311.18159 (2023)
|
| 331 |
+
25. Peng, S., Jiang, C., Liao, Y., Niemeyer, M., Pollefeys, M., Geiger, A.: Shape as points: A differentiable poisson solver. Advances in Neural Information Processing Systems 34, 13032-13044 (2021)
|
| 332 |
+
26. Reiser, C., Szeliski, R., Verbin, D., Srinivasan, P., Mildenhall, B., Geiger, A., Barron, J., Hedman, P.: Merf: Memory-efficient radiance fields for real-time view synthesis in unbounded scenes. ACM Transactions on Graphics (TOG) 42(4), 1-12 (2023)
|
| 333 |
+
27. Rho, D., Lee, B., Nam, S., Lee, J.C., Ko, J.H., Park, E.: Masked wavelet representation for compact neural radiance fields. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 20680-20690 (2023)
|
| 334 |
+
28. Sun, C., Sun, M., Chen, H.T.: Direct voxel grid optimization: Super-fast convergence for radiance fields reconstruction. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5459-5469 (2022)
|
| 335 |
+
29. Takikawa, T., Evans, A., Tremblay, J., Müller, T., McGuire, M., Jacobson, A., Fidler, S.: Variable bitrate neural fields. In: ACM SIGGRAPH 2022 Conference Proceedings. pp. 1-9 (2022)
|
| 336 |
+
30. Tang, J., Chen, X., Wang, J., Zeng, G.: Compressible-composable nef via rank-residual decomposition. Advances in Neural Information Processing Systems 35, 14798-14809 (2022)
|
| 337 |
+
31. Tang, J., Ren, J., Zhou, H., Liu, Z., Zeng, G.: Dreamgaussian: Generative gaussian splatting for efficient 3d content creation. arXiv preprint arXiv:2309.16653 (2023)
|
| 338 |
+
32. Verbin, D., Hedman, P., Mildenhall, B., Zickler, T., Barron, J.T., Srinivasan, P.P.: Ref-NeRF: Structured view-dependent appearance for neural radiance fields. CVPR (2022)
|
| 339 |
+
33. Wang, L., Zhang, J., Liu, X., Zhao, F., Zhang, Y., Zhang, Y., Wu, M., Yu, J., Xu, L.: Fourier plenoctrees for dynamic radiance field rendering in real-time. In: Proceed-
|
| 340 |
+
|
| 341 |
+
ings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 13524-13534 (2022)
|
| 342 |
+
34. Wu, G., Yi, T., Fang, J., Xie, L., Zhang, X., Wei, W., Liu, W., Tian, Q., Xinggang, W.: 4d gaussian splatting for real-time dynamic scene rendering. arXiv preprint arXiv:2310.08528 (2023)
|
| 343 |
+
35. Xu, Q., Xu, Z., Philip, J., Bi, S., Shu, Z., Sunkavalli, K., Neumann, U.: Point-nerf: Point-based neural radiance fields. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5438-5448 (2022)
|
| 344 |
+
36. Yi, T., Fang, J., Wang, J., Wu, G., Xie, L., Zhang, X., Liu, W., Tian, Q., Wang, X.: Gaussiandreamer: Fast generation from text to 3d gaussians by bridging 2d and 3d diffusion models. In: CVPR (2024)
|
| 345 |
+
37. Yu, A., Li, R., Tancik, M., Li, H., Ng, R., Kanazawa, A.: Plenoctrees for real-time rendering of neural radiance fields. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 5752-5761 (2021)
|
| 346 |
+
38. Yu, Z., Chen, A., Huang, B., Sattler, T., Geiger, A.: Mip-splatting: Alias-free 3d gaussian splatting (2023)
|
| 347 |
+
39. Zhao, T., Chen, J., Leng, C., Cheng, J.: Tinynerf: Towards $100\mathrm{x}$ compression of voxel radiance fields. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 37, pp. 3588-3596 (2023)
|
| 348 |
+
40. Zhu, H., He, T., Chen, Z.: Cmc: Few-shot novel view synthesis via cross-view multiplane consistency. arXiv preprint arXiv:2402.16407 (2024)
|
| 349 |
+
41. Zhu, H., He, T., Li, X., Li, B., Chen, Z.: Is vanilla mlp in neural radiance field enough for few-shot view synthesis? arXiv preprint arXiv:2403.06092 (2024)
|
endtoendratedistortionoptimized3dgaussianrepresentation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5fcdb52ab9e0ac78e05f22cfb50c83481b5afe1f9344702b3aa6383d5360a6d
|
| 3 |
+
size 574275
|
endtoendratedistortionoptimized3dgaussianrepresentation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be57e84af7598b3f79a17807345097aaa7b78cd37463bbeff85aaadc56dd5eb7
|
| 3 |
+
size 408911
|
energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51779768891be24d38f7319f06ce4b0b00ac765d6471112bdb80c6d9a67d72ff
|
| 3 |
+
size 98803
|
energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3004b25cc0e8a4c7bca4a41280208a0ed84f7616c3719a17c2371d921506d06a
|
| 3 |
+
size 121163
|
energyclibratedvaewithtesttimefreelunch/b7b478fa-d17a-48cd-a0c0-adc6eec73e13_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dacb00e6976be1a8cf8991cf448efcf39cca5fd357a21083106b0378483da0cb
|
| 3 |
+
size 3949847
|
energyclibratedvaewithtesttimefreelunch/full.md
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Energy-Calibrated VAE with Test Time Free Lunch
|
| 2 |
+
|
| 3 |
+
Yihong Luo $^{1,2}$ , Siya Qiu $^{1,2}$ , Xingjian Tao $^{2}$ , Yujun Cai $^{3}$ , and Jing Tang $^{2,1*}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> The Hong Kong University of Science and Technology
|
| 6 |
+
<sup>2</sup> The Hong Kong University of Science and Technology (Guangzhou)
|
| 7 |
+
<sup>3</sup> Meta yluocg@connect.ust.hk, jingtang@ust.hk
|
| 8 |
+
|
| 9 |
+
Abstract. In this paper, we propose a novel generative model that utilizes a conditional Energy-Based Model (EBM) for enhancing Variational Autoencoder (VAE), termed Energy-Calibrated VAE (EC-VAE). Specifically, VAEs often suffer from blurry generated samples due to the lack of a tailored training on the samples generated in the generative direction. On the other hand, EBMs can generate high-quality samples but require expensive Markov Chain Monte Carlo (MCMC) sampling. To address these issues, we introduce a conditional EBM for calibrating the generative direction of VAE during training, without requiring it for the generation at test time. In particular, we train EC-VAE upon both the input data and the calibrated samples with adaptive weight to enhance efficacy while avoiding MCMC sampling at test time. Furthermore, we extend the calibration idea of EC-VAE to variational learning and normalizing flows, and apply EC-VAE to an additional application of zero-shot image restoration via neural transport prior and range-null theory. We evaluate the proposed method with two applications, including image generation and zero-shot image restoration, and the experimental results show that our method achieves competitive performance over single-step non-adversarial generation.
|
| 10 |
+
|
| 11 |
+
Keywords: Image Generation $\cdot$ VAEs $\cdot$ EBMs
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Deep generative models, including Generative Adversarial Nets (GANs) [14], Variational Autoencoders (VAEs) [28], flow-based generative models [8,9], Energy-Based Models (EBMs) [10, 54], and diffusion models [23], achieve excellent performance in a variety of applications. Compared to GANs, likelihood-based models, such as VAEs and EBMs, typically exhibit greater stability during training and more faithfully cover modes in the data. Moreover, unlike normalizing flows that suffer from architecture restrictions [30], VAEs and EBMs offer considerable potential for expressivity. Therefore, VAEs and EBMs have gained extensive attention recently.
|
| 16 |
+
|
| 17 |
+
In particular, VAEs map the input data into a latent distribution and optimize the evidence lower bound (ELBO) on the data likelihood. However, VAEs do not explicitly optimize the generative direction. Specifically, VAEs assume that the prior distribution in latent space (e.g., Gaussian distribution) matches the empirical distribution mapped from the input data. Unfortunately, there is often a gap between the two distributions in practice. As a result, VAEs struggle to generate high-quality images, producing blurry or corrupted samples. To tackle this issue, in addition to designing more flexible prior distribution [1,46,57], some work [21,41,47] involves GANs, yielding unstable adversarial games, while NVAE [48] proposes to adjust BatchNorm [22] statistics based on prior distribution that improves the generation slightly.
|
| 18 |
+
|
| 19 |
+
On the other hand, EBMs directly model the unnormalized density in data space by assigning low energy to high-probability areas. Unlike VAEs that usually assume a Gaussian prior, EBMs do not necessitate distribution assumptions in modeling. In fact, EBMs have shown comparable state-of-the-art performance in terms of generative results among non-adversarial methods [32]. However, a significant drawback of EBMs is the necessity for Markov Chain Monte Carlo (MCMC) sampling during the training and during the generation at test time, which suffers from slow convergence and is computationally expensive, particularly when the energy is parameterized by neural networks.
|
| 20 |
+
|
| 21 |
+
In this paper, we propose a novel generative model termed Energy-Calibrated VAE (EC-VAE) by involving a conditional EBM to calibrate the VAE for better generation while keeping high sampling efficiency. The VAE is trained by ELBO and the energy-based calibration. Specifically, to address the training of the generative side (i.e., the generating process from prior to data) that is missing in the conventional VAE, we propose to incorporate the generated samples into training. That is, for the generated data $\hat{\mathbf{x}}$ by the generative model, we use a conditional EBM to sample data $\tilde{\mathbf{x}}$ initialized with $\hat{\mathbf{x}}$ that approximates the input real data. Then, integrating the minimization of the distance between $\hat{\mathbf{x}}$ and $\tilde{\mathbf{x}}$ into training can calibrate the decoder. We show that the proposed model can be jointly trained by adopting the primal-dual method in a constrained formulation. The conditional EBM is solely utilized for calibrating samples. Consequently, a short-run MCMC sampling is sufficient and does not suffer from slow convergence. Note that the EBM is involved in training (i.e., generation calibration) only, and is not required during test time sampling.
|
| 22 |
+
|
| 23 |
+
Moreover, we show that the idea of energy-based calibration can be extended to calibrate the variational inference and normalizing flows with large improvement. Take the former as an illustration while the latter is similar. We first sample $\mathbf{z}$ from variational posterior, and then calibrate $\mathbf{z}$ by running MCMC sampling on constructed conditional posterior $p(\tilde{\mathbf{z}}|\mathbf{z},\mathbf{x})$ to obtain the calibrated $\tilde{\mathbf{z}}$ . Finally, minimizing the distance between $\mathbf{z}$ and $\tilde{\mathbf{z}}$ can calibrate the encoder.
|
| 24 |
+
|
| 25 |
+
Experimental results show that the proposed EC-VAE outperforms previous EBMs and the state-of-the-art VAEs on image generation benchmarks in both low-resolution and high-resolution datasets by a large margin. In particular, EC-VAE achieves the strong performance with a single-step non-adversarial gener
|
| 26 |
+
|
| 27 |
+
ation manner, competing with advanced GANs and diffusions across multiple datasets. We also propose and show how to apply EC-VAE to image restoration in a zero-shot way by constructing neural transport prior and leveraging range-null space theory with competitive performance.
|
| 28 |
+
|
| 29 |
+
Our main contributions are summarized as follows.
|
| 30 |
+
|
| 31 |
+
1. We propose a new generative model termed EC-VAE utilizing a conditional EBM to calibrate the VAE to generate sharper samples without incurring extra costs of MCMC sampling during the generation at test time.
|
| 32 |
+
2. We extend the energy-based calibration to enhance variational learning and normalizing flows, and apply EC-VAE to an additional application of zero-shot image restoration.
|
| 33 |
+
3. We demonstrate the strong empirical results of our proposed methods on various tasks, including image generation and image restoration.
|
| 34 |
+
|
| 35 |
+
# 2 Preliminaries
|
| 36 |
+
|
| 37 |
+
Notations. Denote by $\mathbf{x}$ the data and by $\mathbf{z}$ the latent variable. Let $\mathcal{X}$ be the data space and $\mathcal{Z}$ be the latent space. Let $p_d(\mathbf{x})$ be the data distribution. Denote by $f_{\alpha} \colon \mathcal{X} \to \mathcal{Z}$ the encoder parameterized by $\alpha$ , and by $g_{\beta} \colon \mathcal{Z} \to \mathcal{X}$ the decoder parameterized by $\beta$ . Denote by $E_{\omega} \colon \mathcal{X} \to \mathbb{R}$ the energy function parameterized by $\omega$ .
|
| 38 |
+
|
| 39 |
+
Variational Autoencoders. VAE [29] adopts the encoder-decoder architecture with a prior distribution. To be more precise, VAE defines the joint distribution of $(\mathbf{x},\mathbf{z})$ as $p_{\beta ,\theta}(\mathbf{x},\mathbf{z}) = p_{\beta}(\mathbf{x}|\mathbf{z})p_{\theta}(\mathbf{z})$ . The model can be trained by maximizing the marginal log-likelihood $\mathcal{L} = \mathbb{E}_{p_d(\mathbf{x})}[\log p_{\beta ,\theta}(\mathbf{x})]$ . However, maximizing the log-likelihood needs sampling from intractable posterior $p_{\beta ,\theta}(\mathbf{z}|\mathbf{x}) = \frac{p_{\beta,\theta}(\mathbf{x},\mathbf{z})}{p_{\beta,\theta}(\mathbf{x})}$ .
|
| 40 |
+
|
| 41 |
+
Instead of sampling from intractable posterior $p_{\beta, \theta}(\mathbf{z}|\mathbf{x})$ , VAEs propose using a variational inference $q_{\alpha}(\mathbf{z}|\mathbf{x})$ to approximate the posterior. In particular, VAEs optimize the evidence lower bound (ELBO) on $\log p_{\beta, \theta}(\mathbf{x})$ such that
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\operatorname {E L B O} _ {\phi} (\mathbf {x}) = \mathbb {E} _ {q _ {\alpha} (\mathbf {z} | \mathbf {x})} \left[ \log p _ {\beta} (\mathbf {x} | \mathbf {z}) - \mathrm {K L} \left(q _ {\alpha} (\mathbf {z} | \mathbf {x}) \right| | p _ {\theta} (\mathbf {z}) \right], \tag {1}
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $\phi = \{\alpha, \beta, \theta\}$ . The first term is the reconstruction loss and the second term is the KL divergence between the approximated posterior and the prior.
|
| 48 |
+
|
| 49 |
+
Sampling from VAE can be achieved by sampling $\mathbf{z}$ from prior $p_{\theta}(\mathbf{z})$ first, and then obtain generated samples $\mathbf{x}$ with probability $p_{\beta}(\mathbf{x}|\mathbf{z}) = \mathcal{N}(g_{\beta}(\mathbf{z}),\sigma^2\mathbf{I})$ . Equivalently, we denote samples $\mathbf{x}\sim p_{\beta ,\theta}(\mathbf{x}) = \int p_{\theta}(\mathbf{z})p_{\beta ,\theta}(\mathbf{x}|\mathbf{z})\mathrm{d}\mathbf{z}$ . In practice, the samples are typically obtained directly by $g_{\beta}(\mathbf{z})$ .
|
| 50 |
+
|
| 51 |
+
Energy-Based Models. A deep EBM assumes that $p_{\omega}(\mathbf{x})$ is a gibbs distribution with the form $p_{\omega}(\mathbf{x}) = \exp(-E_{\omega}(\mathbf{x})) / L_{\omega}$ , where $L_{\omega}$ is the corresponding normalizing constant. EBM is trained by minimizing the negative log-likelihood (NLL) $\mathcal{L}(\omega)$ such that
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathcal {L} (\omega) = - \mathbb {E} _ {p _ {d} (\mathbf {x})} [ \log p _ {\omega} (\mathbf {x}) ] = - \mathbb {E} _ {p _ {d} (\mathbf {x})} \left[ \frac {\exp (- E _ {\omega} (\mathbf {x}))}{L _ {\omega}} \right].
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
The gradient of $\mathcal{L}(\omega)$ can be obtained as follows:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\nabla \mathcal {L} (\omega) = \mathbb {E} _ {p _ {d} (\mathbf {x})} [ \nabla E _ {\omega} (\mathbf {x}) ] - \mathbb {E} _ {p _ {\omega} (\mathbf {x})} [ \nabla E _ {\omega} (\mathbf {x}) ]. \tag {2}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
In practice, sampling from $p_{\omega}(\mathbf{x})$ can be achieved by running MCMC sampling with $K$ steps of Langevin dynamics, with initial samples $\mathbf{x}_0$ and step size $s$ :
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\mathbf {x} _ {k + 1} = \mathbf {x} _ {k} - \frac {s}{2} \nabla_ {\mathbf {x} _ {k}} E _ {\omega} (\mathbf {x} _ {k}) + \sqrt {s} \xi , \quad \text {w h e r e} \xi \sim \mathcal {N} (0, \mathbf {I}).
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
# 2.1 Additional Related Work
|
| 70 |
+
|
| 71 |
+
Our method shares some similarities with works that combine generative autoencoders and EBMs in different ways. VAEBM [51] learns EBM upon a pre-trained NVAE [48], and a recent work [15] jointly learns EBM and VAE by an adversarial game instead of by MCMC sampling, while our work is jointly trained without adversarial components. In addition, our learning algorithm bears some similarities to cooperative learning [19, 53, 55, 56], which also employs EBM to teach the base generative model, but only in small images. However, the base generative model in these approaches is purely trained upon generated samples, which can be quite biased. In contrast, our base generative model (i.e., VAE) is trained upon data and generated samples, with adaptive weights. Recently, dual MCMC [6] also consider incorporating real data into cooperative-like training. However, similar to other cooperative approaches [53, 55], they maximize the marginal likelihood of the generated samples by latent variable models. This requires extra effort in inferring latent variables, increasing the burden of the model and training cost. In contrast, we maximize the conditional likelihood of the generated samples via the decoder of VAE, which is easier to learn. Moreover, our method differs significantly from aforementioned works in the way that we discard MCMC during inference without adversarial components, providing a strong one-step generation that competes with diffusions and GANs.
|
| 72 |
+
|
| 73 |
+
# 3 The Design of Energy-Calibrated VAE
|
| 74 |
+
|
| 75 |
+
An issue with VAE is that the generative direction has not been explicitly trained during the training process, potentially leading to lower-quality output for the generated samples. To address this, we propose to incorporate the generated samples into the training. As the real data corresponding to the generated samples are unavailable, we propose utilizing a short-run MCMC, initialized with the generated samples, to approximate the corresponding real data.
|
| 76 |
+
|
| 77 |
+
As the aim is to calibrate the samples, we suggest constructing a conditional EBM, similar in [12], to model the conditional density, i.e.,
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x}) = \frac {1}{L _ {\omega} (\mathbf {x})} \exp (- E _ {\omega} (\tilde {\mathbf {x}}) - \frac {| | \tilde {\mathbf {x}} - \mathbf {x} | | _ {2} ^ {2}}{2 \sigma^ {2}}),
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\sigma$ is a pre-defined hyper-parameter, $L_{\omega}(\mathbf{x}) = \int \exp (-E_{\omega}(\tilde{\mathbf{x}}) - \frac{||\tilde{\mathbf{x}} - \mathbf{x}||_2^2}{2\sigma^2})\mathrm{d}\tilde{\mathbf{x}}$ is the corresponding normalizing constant, $\mathbf{x}$ is the generated samples from VAE,
|
| 84 |
+
|
| 85 |
+
$E_{\omega}$ is an unconditional EBM. Compared to direct model $p_{\omega}(\tilde{\mathbf{x}})$ , the extra distance term in $p_{\omega}(\tilde{\mathbf{x}}|\mathbf{x})$ constrains the high-density area localized around generated samples $\mathbf{x}$ , making it easier to be learned by the base generative model (i.e., VAE). Sampling from $p_{\omega}(\tilde{\mathbf{x}}|\mathbf{x})$ can be achieved by MCMC sampling, i.e.,
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\mathbf {x} _ {k + 1} = \mathbf {x} _ {k} - \frac {s}{2} \Big (\underbrace {\nabla_ {\mathbf {x} _ {k}} E _ {\omega} (\mathbf {x} _ {k})} _ {\mathrm {d i r e c t t o r e a l}} + \underbrace {\nabla_ {\mathbf {x} _ {k}} \frac {| | \mathbf {x} _ {k} - \mathbf {x} | | _ {2} ^ {2}}{2 \sigma^ {2}}} _ {\mathrm {d i r e c t t o o r i g i n}} \Big) + \sqrt {s} \xi , \quad \mathrm {w h e r e} \xi \sim \mathcal {N} (0, \mathbf {I}). (3)
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
For simplicity, we denote $\mathbf{x}^K = \mathrm{MCMC}_\omega^K (\tilde{\mathbf{x}} |\mathbf{x})$ . The learning of EBM can be achieved by minimizing $\mathcal{L}(\omega)\triangleq \mathbb{E}_{p_{\beta ,\theta}(\mathbf{x})}[D_{\mathrm{KL}}(p_d(\tilde{\mathbf{x}} |\mathbf{x})||p_\omega (\tilde{\mathbf{x}} |\mathbf{x}))]$ :
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\begin{array}{l} \nabla \mathcal {L} (\omega) = \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} \left[ \mathbb {E} _ {p _ {d} (\tilde {\mathbf {x}} | \mathbf {x})} [ \nabla_ {\omega} \log p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x}) ] - \mathbb {E} _ {p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})} [ \nabla_ {\omega} \log p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x}) ] \right] \\ = \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} [ \mathbb {E} _ {p _ {d} (\tilde {\mathbf {x}} | \mathbf {x})} [ \nabla_ {\omega} E _ {\omega} (\tilde {\mathbf {x}}) ] ] - \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} [ \mathbb {E} _ {p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})} [ \nabla_ {\omega} E _ {\omega} (\tilde {\mathbf {x}}) ] ] \\ = \mathbb {E} _ {p _ {d} (\tilde {\mathbf {x}})} [ \nabla_ {\omega} E _ {\omega} (\tilde {\mathbf {x}}) ] - \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} [ \mathbb {E} _ {p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})} [ \nabla_ {\omega} E _ {\omega} (\tilde {\mathbf {x}}) ] ]. \\ \end{array}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
Since the distance term does not involve learnable parameters, hence the parameter $\omega$ can be learned in unconditional form. We only need to define $p_d(\tilde{\mathbf{x}}|\mathbf{x})$ to ensure the marginal distribution of $p_{\beta,\theta}(\mathbf{x})p_d(\tilde{\mathbf{x}}|\mathbf{x})$ being data distribution (e.g., the simplest case is $p_d(\tilde{\mathbf{x}}|\mathbf{x})\triangleq p_d(\tilde{\mathbf{x}})$ ). It can be seen that the $\mathcal{L}(\omega)$ reaches minima at $\int p_{\beta,\theta}(\mathbf{x})p_{\omega}(\tilde{\mathbf{x}}|\mathbf{x})d\mathbf{x} = p_d(\tilde{\mathbf{x}})$ . This is said that given rich enough $p_{\omega}(\tilde{\mathbf{x}}|\mathbf{x})$ , we are able to calibrate samples from $p_{\beta,\theta}(\mathbf{x})$ to $p_d(\tilde{\mathbf{x}})$ .
|
| 98 |
+
|
| 99 |
+
Then, we regard the $\tilde{\mathbf{x}}$ as calibrated samples, thus the generative direction can be calibrated by minimizing the distance between $\mathbf{x}$ and $\tilde{\mathbf{x}}$ ,
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\mathcal {L} _ {\mathrm {c a l i b r a t i o n}} = \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} [ \mathbb {E} _ {p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})} [ | | \mathbf {x} - \tilde {\mathbf {x}} | | _ {2} ^ {2} ] ].
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Note that the calibration loss can be considered as maximizing the likelihood of calibrated samples conditioned on generated samples under the form of normal distribution. This MCMC for sampling calibrated $\tilde{\mathbf{x}}$ can be regarded as a teacher, guiding the generative model to produce higher-quality generated samples. However MCMC sampling introduces some random noise into training, making it impossible to perfectly match the calibrated samples, thus we suggest using a constrained optimization form as follows:
|
| 106 |
+
|
| 107 |
+
Definition 1 (Energy-Calibrated VAE) Given a fixed margin $\epsilon_{1}$ , the general optimization can be transformed into the following inequality-constrained optimization.
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\min _ {\phi , \omega} \mathcal {L} (\phi) + \mathcal {L} (\omega)
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\text {s . t .} \quad | | \tilde {\mathbf {x}} - \mathbf {x} | | _ {2} ^ {2} < \epsilon_ {1}, \forall \mathbf {x} \sim p _ {\beta , \theta} (\mathbf {x}), \tilde {\mathbf {x}} = \operatorname {M C M C} _ {\omega} ^ {K} (\tilde {\mathbf {x}} | \mathbf {x}),
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
w h e r e \quad \mathcal {L} (\omega) = \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} D _ {\mathrm {K L}} \left(p _ {d} (\tilde {\mathbf {x}} | \mathbf {x}) | | p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})\right),
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mathcal {L} (\phi) = - \mathbb {E} _ {p _ {d} (\mathbf {x})} \mathbb {E} _ {q _ {\alpha} (\mathbf {z} | \mathbf {x})} \big [ \log p _ {\beta} (\mathbf {x} | \mathbf {z}) - \frac {q _ {\alpha} (\mathbf {z} | \mathbf {x})}{p _ {\theta} (\mathbf {z})} \big ].
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
We get a constrained optimization problem in Definition 1, which is hard to optimize directly, but we can consider it as a corresponding saddle-point problem as follows:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\max _ {\lambda} \min _ {\phi , \omega} \left\{\mathcal {L} (\phi) + \mathcal {L} (\omega) + \lambda \mathcal {L} _ {\mathrm {c o n}} (\phi) \right\}, \quad \lambda \geq 0
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where the constraint-related loss $\mathcal{L}_{\mathrm{con}}(\phi)$ is defined as:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\mathcal {L} _ {\mathrm {c o n}} (\phi) = \mathcal {L} _ {\mathrm {c o n}} (\beta) = \mathbb {E} _ {p _ {\beta , \theta} (\mathbf {x})} \left[ \mathbb {E} _ {p _ {\omega} (\tilde {\mathbf {x}} | \mathbf {x})} \left[ \| \mathbf {x} - \tilde {\mathbf {x}} \| _ {2} ^ {2} - \epsilon_ {1} \right] \right].
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
Since the prior is typically less powerful, we suggest calibrating only the decoder, enabling the prior focus on maximizing likelihood related to the latent variable.
|
| 138 |
+
|
| 139 |
+
The final challenge is the lack of access to the ground truth of data distribution. To tackle this issue, we consider the corresponding empirical optimization problem as follows:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\begin{array}{l} \max _ {\lambda} \min _ {\phi , \omega} \{\hat {\mathcal {L}} (\phi) + \hat {\mathcal {L}} (\omega) + \lambda \mathcal {L} _ {\mathrm {c o n}} (\phi) \} \\ = \max _ {\lambda} \min _ {\phi , \omega} \left\{\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} - \left(\log p _ {\beta} (\mathbf {x} _ {i} | \mathbf {z} _ {i j}) + \log \frac {q _ {\alpha} (\mathbf {z} _ {i j} | \mathbf {x} _ {i})}{p _ {\theta} (\mathbf {z} _ {i j})}\right) + \sum_ {i = 1} ^ {n} - \log p _ {\omega} (\mathbf {x} _ {i}) \right. \\ \left. + \lambda \sum_ {i = 1} ^ {n} \left[ \left| \left| \hat {\mathbf {x}} _ {i} - \operatorname {M C M C} _ {\omega} ^ {K} \left(\tilde {\mathbf {x}} _ {i} \mid \hat {\mathbf {x}} _ {i}\right) \right| \right| _ {2} ^ {2} - \epsilon_ {1} \right] \right\}, \\ \end{array}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $\mathbf{x}_i$ is sampled from data, $\hat{\mathbf{x}}_i$ is sampled from the VAE, $\mathbf{z}_{ij}$ is sampled from $q_{\alpha}(\mathbf{z}|\mathbf{x}_i)$ . Notice that $m$ is usually chosen to be one in practice that is efficient and effective enough to estimate the gradient. MCMC is not necessary during test time sampling.
|
| 146 |
+
|
| 147 |
+
Concrete Algorithm. To efficiently optimize the problem, we employ the primal-dual algorithm tailored for addressing the saddle-point problem corresponding to the constrained form. Specifically, in the primal step, the algorithm alternately optimizing parameters $\omega$ and $\phi = \{\beta, \alpha, \theta\}$ by minimizing the empirical Lagrangian under a given dual variable $\lambda$ , i.e.,
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\begin{array}{l} \omega_ {t + 1} := \underset {\omega} {\arg \min } \hat {\mathcal {L}} (\omega_ {t}), \\ \beta_ {t + 1} := \underset {\beta} {\arg \min } \left\{\lambda \hat {\mathcal {L}} _ {\mathrm {c o n}} (\beta_ {t}) - \sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} \log p _ {\beta_ {t}} (\mathbf {x} _ {i} | \mathbf {z} _ {i j}) \right\}, \\ \alpha_ {t + 1} := \arg \min _ {\boldsymbol {\alpha}} \left\{\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} \log \frac {q _ {\alpha_ {t}} (\mathbf {z} _ {i j} | \mathbf {x} _ {i})}{p _ {\theta_ {t}} (\mathbf {z} _ {i j})} - \log p _ {\beta_ {t}} (\mathbf {x} _ {i} | \mathbf {z} _ {i j}) \right\}, \\ \theta_ {t + 1} := \arg \min _ {\theta} \left\{\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} - \log p _ {\theta_ {t}} (\mathbf {z} _ {i j}) \right\}. \\ \end{array}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
In practice, we perform stochastic gradient descent that derives concrete update step for $\theta$ and $\phi$ . On the other hand, in the dual step, we update $\lambda$ as follows,
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\lambda_ {t + 1} := \max \left\{\lambda_ {t} + \eta \cdot (\hat {\mathcal {L}} _ {\text {c o n}} - \epsilon), 0 \right\}, \tag {4}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $\eta$ is the learning rate of dual step.
|
| 160 |
+
|
| 161 |
+
Algorithm 1 in Appendix A gives the pseudo-code of our primal-dual algorithm for optimizing the VAE parameters $\phi$ , and EBMs parameters $\omega$ . Compared with using stochastic gradient descent directly in the constrained optimization problem in Definition (1), the primal-dual algorithm can dynamically tune $\lambda$ to avoid introducing extra hyper-parameters (which may serve as an early-stopping condition, e.g., $\lambda = 0$ ), and can provide convergence guarantees with sufficiently long training using sufficiently small step size [3].
|
| 162 |
+
|
| 163 |
+
# 4 Extensions and Additional Application
|
| 164 |
+
|
| 165 |
+
In this section, we first show the calibration idea of EC-VAE can be extended to enhance variational learning and normalizing flows. Then we show how to apply our method in zero-shot image restoration.
|
| 166 |
+
|
| 167 |
+
# 4.1 Energy-Calibrated Variational Learning
|
| 168 |
+
|
| 169 |
+
Variational learning allows efficient training, but results in learning a lower bound for data likelihood. The gap is the KL divergence between variational posterior $q_{\alpha}(\mathbf{z}|\mathbf{x})$ and posterior $p_{\beta ,\theta}(\mathbf{z}|\mathbf{x})$ which is not explicitly minimized in variational training, just like the training of the generative direction is missing in vanilla VAEs.
|
| 170 |
+
|
| 171 |
+
Similar to calibrating the generative direction as proposed in Sec. 3, we propose to incorporate the calibration of the variational posterior $q_{\alpha}(\mathbf{z}|\mathbf{x})$ into training. We first construct the conditional density $p_{\beta,\theta}(\tilde{\mathbf{z}}|\mathbf{z},\mathbf{x})$ as follows:
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
p _ {\beta , \theta} (\tilde {\mathbf {z}} | \mathbf {z}, \mathbf {x}) = p _ {\beta , \theta} (\tilde {\mathbf {z}} | \mathbf {x}) \cdot \exp (- \frac {| | \tilde {\mathbf {z}} - \mathbf {z} | | _ {2} ^ {2}}{2 \sigma^ {2}}) / L _ {\beta , \theta} (\mathbf {z}),
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
where $\sigma$ is a pre-defined hyper-parameter, $p_{\beta,\theta}(\tilde{\mathbf{z}}|\mathbf{x})$ is the posterior and $L_{\beta,\theta}(\mathbf{z})$ is corresponding normalizing constant. The conditional density is constructed by adding the distance term to constrain the calibrated $\mathbf{z}$ to be close to $\mathbf{z}$ . And the sampling can be achieved by MCMC with Langevin dynamics. Given a step size $s > 0$ and an initial value $\mathbf{z}_0$ , the Langevin dynamics iterates:
|
| 178 |
+
|
| 179 |
+
$$
|
| 180 |
+
\mathbf {z} _ {k + 1} = \mathbf {z} _ {k} - \frac {s}{2} \nabla_ {\mathbf {z} _ {k}} (- \log p _ {\beta , \theta} (\mathbf {z} _ {k} | \mathbf {x}) + \frac {| | \mathbf {z} _ {k} - \mathbf {z} | | _ {2} ^ {2}}{2 \sigma^ {2}}) + \sqrt {s} \xi , \quad \xi \sim \mathcal {N} (0, \mathbf {I})
|
| 181 |
+
$$
|
| 182 |
+
|
| 183 |
+
where the $\mathbf{z}_0$ is proposed to be sampled from variational posterior $q_{\alpha}(\mathbf{z}|\mathbf{x})$ , thus the $\mathbf{z}_K$ can be considered as calibrated $\mathbf{z}$ . For simplicity, we denote $\mathbf{z}^K = \mathrm{MCMC}_{\beta,\theta}^K(\tilde{\mathbf{z}}|\mathbf{z})$ . Note the $\nabla_{\mathbf{z}}\log p_{\beta,\theta}(\mathbf{z}|\mathbf{x})$ can be easily obtained by following form: $\nabla_{\mathbf{z}}\log p_{\beta,\theta}(\mathbf{z}|\mathbf{x}) = \nabla_{\mathbf{z}}\log p_{\beta,\theta}(\mathbf{x},\mathbf{z}) - \nabla_{\mathbf{z}}\log p_{\beta,\theta}(\mathbf{x}) = \nabla_{\mathbf{z}}\log p_{\beta,\theta}(\mathbf{x},\mathbf{z})$ .
|
| 184 |
+
|
| 185 |
+
Once the MCMC Calibrated $\mathbf{z}_K$ is obtained, we can conduct the constrained learning formulation similar to Sec. 3. We directly give the corresponding saddlepoint problem:
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\mathcal {L} (\phi = \{\alpha , \beta , \theta \}) = - \mathbb {E} _ {p _ {d} (\mathbf {x})} [ \mathrm {E L B O} _ {\phi} (\mathbf {x}) ] + \lambda_ {1} \cdot \mathcal {L} _ {\mathrm {c o n}} (\beta) + \lambda_ {2} \cdot \mathcal {L} _ {\mathrm {c o n}} (\alpha),
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
where $\lambda_1, \lambda_2 \geq 0$ and $\mathcal{L}_{\mathrm{con}}(\alpha) = \mathbb{E}_{q_\alpha(\mathbf{z}|\mathbf{x})}\left[\mathbb{E}_{p_{\beta,\theta}(\tilde{\mathbf{z}}|\mathbf{z},\mathbf{x})}\left[||\mathbf{z} - \tilde{\mathbf{z}}||_2^2\right]\right]$ . Given the saddle-point formulation, the learning and calibration of the encoder parameterized by $\alpha$ can be achieved with corresponding empirical optimization as follows:
|
| 192 |
+
|
| 193 |
+
$$
|
| 194 |
+
\begin{array}{l} \alpha_ {t + 1} := \arg \min _ {\boldsymbol {\alpha}} \left\{\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} \left(\log \frac {q _ {\alpha_ {t}} (\mathbf {z} _ {i j} | \mathbf {x} _ {i})}{p _ {\theta_ {t}} (\mathbf {z} _ {i j})} - \log p _ {\beta_ {t}} (\mathbf {x} _ {i} | \mathbf {z} _ {i j}) \right. \right. \\ \left. + \lambda_ {2} \times | | \mathbf {z} _ {i j} - \operatorname {M C M C} _ {\beta , \theta} ^ {K} (\tilde {\mathbf {z}} _ {i j} | \mathbf {z} _ {i j}) | | _ {2} ^ {2}\right) \Bigg \}, \\ \end{array}
|
| 195 |
+
$$
|
| 196 |
+
|
| 197 |
+
The update of the rest parameters $\{\beta, \theta, \omega\}$ remain the same, while the $\lambda_{i}$ $(i = 1,2)$ is updated by Eq. (4).
|
| 198 |
+
|
| 199 |
+
# 4.2 Energy-Calibrated Normalizing Flow
|
| 200 |
+
|
| 201 |
+
The Energy-Calibrated Normalizing Flow (EC-Flow) can be easily formed, as normalizing flow $h_{\phi}$ directly models the density $p_{\phi}(\mathbf{x}) = p_z(\mathbf{z}) \times \left|\operatorname*{det}\left(\frac{\partial h_{\phi}}{\partial\mathbf{z}}\right)\right|$ , where $h_{\phi}$ is the invertible transformation, thus we just need to use the negative model log-likelihood $-\mathbb{E}_{p_d(\mathbf{x})}[\log p_{\phi}(\mathbf{x})]$ to serve as the $\mathcal{L}(\phi)$ , and directly sampling from $p_{\phi}(\mathbf{x})$ to obtain samples, while other components keep the same.
|
| 202 |
+
|
| 203 |
+
# 4.3 Applying to Zero-Shot Image Restoration
|
| 204 |
+
|
| 205 |
+
In this section, we present the application of our method in zero-shot image restoration tasks, inspired by recent works [50] that employ the diffusion model and the Range-Null space theory for similar purposes.
|
| 206 |
+
|
| 207 |
+
We start by briefly reviewing the necessary background. Given a known linear operator $\mathbf{A} \in \mathbb{R}^{D_1 \times D_2}$ , there exists pseudo-inverse $\mathbf{A}^\dagger \in \mathbb{R}^{D_2 \times D_1}$ that satisfies $\mathbf{A}\mathbf{A}^\dagger \mathbf{A} = \mathbf{A}$ . Considering degraded image: $\mathbf{y} = \mathbf{A}\mathbf{x}$ . For any prediction $\hat{\mathbf{x}}_r$ , we let $\hat{\mathbf{x}} = \mathbf{A}^\dagger \mathbf{y} + (\mathbf{I} - \mathbf{A}^\dagger \mathbf{A})\hat{\mathbf{x}}_r$ , then immediately gives: $\mathbf{A}\hat{\mathbf{x}} = \mathbf{A}\mathbf{A}^\dagger \mathbf{y} + \mathbf{0} = \mathbf{A}\mathbf{x}$ , which we make predicted images have the same degradation as original images. This can be regarded as $\mathbf{x}_r$ predicting the zero-space while remaining the original rang-space $\mathbf{A}\mathbf{x}$ . For getting the $\hat{\mathbf{x}}_r$ , we can employ $\mathbf{A}^\dagger \mathbf{y}$ which is the range-space part of $\mathbf{x}$ as biased ground truth and build a joint distribution
|
| 208 |
+
|
| 209 |
+
$$
|
| 210 |
+
p _ {\beta , \theta} (\mathbf {A} ^ {\dagger} \mathbf {y}, \mathbf {z}) = p _ {\theta} (\mathbf {z}) p (\mathbf {A} ^ {\dagger} \mathbf {y} | \mathbf {A} ^ {\dagger} \mathbf {A} g _ {\beta} (\mathbf {z})). \tag {5}
|
| 211 |
+
$$
|
| 212 |
+
|
| 213 |
+
However the $p_{\theta}(\mathbf{z})$ may not be powerful enough to handle image restoration. Recall that we have an EBM in data space, hence we can construct a more powerful prior via neural transport, i.e.,
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
p _ {\theta , \omega} (\mathbf {z}) \propto \exp (- E _ {\omega} (g _ {\beta} (\mathbf {z}))) p _ {\theta} (\mathbf {z}) \propto \exp (- E _ {\beta , \omega} (\mathbf {z})) p _ {\theta} (\mathbf {z}). \tag {6}
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
This is achieved by transporting $\mathbf{z}$ to data space via decoder, then the EBM defined in data space is used, finally, the EBM defined in latent space for enhancing prior is well-constructed. By substituting the prior in Eq. (6) into Eq. (5), the
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
(a) CIFAR-10
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
(b) STL-10
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
(d) LSUN Church 64
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
(e) CelebA 64
|
| 234 |
+
Fig. 1: Random generated samples from EC-VAE. For CelebA 64 and CelebA-HQ-256, we pick out samples for diversity.
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
(c) ImageNet 32
|
| 238 |
+
(f) CelebA-HQ-256
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
|
| 242 |
+
A new joint likelihood is obtained. Then we run MCMC on $\mathbf{z}$ to maximize the likelihood of biased joint likelihood, i.e.,
|
| 243 |
+
|
| 244 |
+
$$
|
| 245 |
+
g _ {\beta} \left(\mathbf {z} _ {r} ^ {k + 1}\right) = g _ {\beta} \left(\mathbf {z} _ {r} ^ {k}\right) + \frac {s}{2} \nabla_ {\mathbf {z} _ {r} ^ {k}} \log p _ {\theta , \beta , \omega} \left(\mathbf {A} ^ {\dagger} \mathbf {y}, \mathbf {z} _ {r} ^ {k}\right) + \sqrt {s} \xi , \tag {7}
|
| 246 |
+
$$
|
| 247 |
+
|
| 248 |
+
where $\xi \sim \mathcal{N}(0,\mathbf{I})$ , $\mathbf{z}_r^0$ can be initialized by sampling from $p_{\theta}(\mathbf{z})$ . In practice, the linear degraded operator $\mathbf{A}$ has various corresponding image restoration tasks, such as colorization, super-resolution, and inpainting. See Appendix B for concrete forms of $\mathbf{A}$ and $\mathbf{A}^\dagger$ . It's worth noting that our proposed method doesn't need extra training for those tasks.
|
| 249 |
+
|
| 250 |
+
# 5 Experiment
|
| 251 |
+
|
| 252 |
+
In this section, we conduct comprehensive experiments to evaluate the proposed EC-VAE. We also evaluate the extension of Energy-based calibration to normalizing flow and variational inference. We use a simple ResNet [17] similar to used in VAEBM [51] or CLEL [32] as energy functions $E_{\omega}$ with 30 MCMC steps on CIFAR-10 and 15 MCMC steps on other datasets in all experiments. We adopt Fréchet Inception Distance (FID) [18] as quantitative metrics in most experiments. We apply Exponential Moving Average (EMA) with coefficient of 0.999 on Church-64 and 0.9999 on other datasets for VAE. Please note that by default, our proposed model does not incorporate the use of MCMC in test time, unless specifically indicated otherwise. The prior $p_{\theta}(\mathbf{z})$ is a simple Gaussian as default.
|
| 253 |
+
|
| 254 |
+
# 5.1 Image Generation
|
| 255 |
+
|
| 256 |
+
In this section, we evaluate EC-VAE on six datasets, including CIFAR-10 [58], STL-10 [5], ImageNet 32 [4,7], LSUN Church 64 [58], CelebA 64 [35], and CelebAHQ-256 [35]. We use a flow as the prior in experiments on the CelebA-HQ-256.
|
| 257 |
+
|
| 258 |
+
Table 1: Generative performance on CIFAR-10. The $\dagger$ means without extra hyperparameters tuning. The * means we evaluate the FID by officially released checkpoint.
|
| 259 |
+
|
| 260 |
+
<table><tr><td></td><td>Model</td><td>NFE↓</td><td>FID↓</td><td>Times (s)↓</td></tr><tr><td rowspan="3">Score-based</td><td>NCSN [44]</td><td>1000</td><td>25.32</td><td>107.9</td></tr><tr><td>Denoising Diffusion [20]</td><td>1000</td><td>3.17</td><td>80.5</td></tr><tr><td>Consistency Models (LPIPS) [43]</td><td>1</td><td>8.70</td><td>-</td></tr><tr><td rowspan="3">GAN-based</td><td>SN-GAN [37]</td><td>1</td><td>21.7</td><td>-</td></tr><tr><td>AutoGAN [13]</td><td>1</td><td>12.4</td><td>-</td></tr><tr><td>StyleGAN2 w/o ADA [25]</td><td>1</td><td>9.9</td><td>0.04</td></tr><tr><td rowspan="2">VAEs+GANs</td><td>VAE+GAN [41]</td><td>1</td><td>39.8</td><td>-</td></tr><tr><td>DC-VAE [41]</td><td>1</td><td>17.9</td><td>-</td></tr><tr><td rowspan="2">EBMs+GANs</td><td>FlowCE [11]</td><td>1</td><td>37.3</td><td>-</td></tr><tr><td>Divergence Triangle [15]</td><td>1</td><td>30.1</td><td>-</td></tr><tr><td rowspan="2">Flow-based</td><td>Glow [27]</td><td>1</td><td>48.9</td><td>-</td></tr><tr><td>SurVAE Flow [38]</td><td>1</td><td>49.03</td><td>-</td></tr><tr><td rowspan="2">NVAE-family</td><td>NVAE [48]</td><td>1</td><td>50.97</td><td>0.36</td></tr><tr><td>NCP-VAE [1]</td><td>-</td><td>24.08</td><td>-</td></tr><tr><td rowspan="8">Energy-based</td><td>IGEBM [10]</td><td>60</td><td>40.58</td><td>-</td></tr><tr><td>CoopFlow [56]</td><td>31</td><td>15.80 (26.54†*)</td><td>-</td></tr><tr><td>CoopFlow w/o MCMC</td><td>1</td><td>79.45*</td><td>-</td></tr><tr><td>Hat EBM [19]</td><td>51</td><td>19.30</td><td>-</td></tr><tr><td>CLEL-Large [32]</td><td>1200</td><td>8.61</td><td>-</td></tr><tr><td>Dual MCMC [6]</td><td>31</td><td>9.26</td><td>-</td></tr><tr><td>Diffusion EBM [11]</td><td>180</td><td>9.58</td><td>-</td></tr><tr><td>VAEBM [51]</td><td>16</td><td>12.19</td><td>8.79</td></tr><tr><td rowspan="2">Ours</td><td>EC-VAE</td><td>1</td><td>5.20</td><td>0.03</td></tr><tr><td>EC-Flow</td><td>1</td><td>31.12</td><td>0.37</td></tr><tr><td rowspan="4">Ablations</td><td>EC-VAE w/ MCMC</td><td>31</td><td>5.63</td><td>0.52</td></tr><tr><td>EC-Flow w/ MCMC</td><td>31</td><td>22.74</td><td>0.86</td></tr><tr><td>VAE</td><td>1</td><td>104.68</td><td>0.03</td></tr><tr><td>Flow</td><td>1</td><td>91.33</td><td>0.37</td></tr></table>
|
| 261 |
+
|
| 262 |
+
See Appendix C for more experiment setting details. We show qualitative results in Fig. 1. See Appendix G for more qualitative results and qualitative comparison to other models. The quantitative results are reported in Tabs. 1 to 6, with the best results for GANs or Score-models highlighted by underlining, and the best results for other models in bold, respectively.
|
| 263 |
+
|
| 264 |
+
Our results are comparable to advanced GANs and Score-based Models, outperforming NVAE-family (including NVAE, NCP-VAE and VAEBM) and Glow, the most advanced Hierarchical VAE and flows, respectively, by a significant margin on all datasets, despite using much smaller latent space, and much fewer training resources. Our results also outperform existing EBMs, with a single-step generation manner. Additionally, Our results outperform the Consistency Models with Learned Perceptual Image Patch Similarity (LPIPS) [59] which is a strong model on single-step non-adversarial generation. Note our approach does not rely on LPIPS, which is known to potentially manipulate the FID metric [31]. Remarkably, we obtain a strong result of unconditional generation on ImageNet 32, even outperforming DDPM [23]. This indicates the strong potential and capability of our proposed model for learning highly diverse datasets.
|
| 265 |
+
|
| 266 |
+
Comparison with Other EBMs. The proposed method presents a crucial, clear difference from existing methods: we demonstrate that it is possible to
|
| 267 |
+
|
| 268 |
+

|
| 269 |
+
Fig. 2: Comparison of EC-VAE (Top) and EC-VAE (w/ MCMC) (Bottom) on CIFAR-10. Best viewed when zoomed in.
|
| 270 |
+
|
| 271 |
+
Table 2: Generative performance on STL-10.
|
| 272 |
+
|
| 273 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>ProbGAN [16]</td><td>46.7</td></tr><tr><td>SN-GAN [37]</td><td>40.1</td></tr><tr><td>Improv. MMD GAN [49]</td><td>37.6</td></tr><tr><td>AutoGAN [13]</td><td>31.0</td></tr><tr><td>DC-VAE [41]</td><td>41.91</td></tr><tr><td>EC-VAE (Ours)</td><td>8.39</td></tr></table>
|
| 274 |
+
|
| 275 |
+
Table 3: Generative performance on ImageNet 32.
|
| 276 |
+
|
| 277 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>DDPM [23]</td><td>6.99</td></tr><tr><td>Flow Matching [34]</td><td>5.02</td></tr><tr><td>PixelCNN [39]</td><td>40.51</td></tr><tr><td>CF-EBM [60]</td><td>26.31</td></tr><tr><td>CLEL-Large [32]</td><td>15.47</td></tr><tr><td>EC-VAE (Ours)</td><td>5.76</td></tr></table>
|
| 278 |
+
|
| 279 |
+
Table 4: Generative performance on Church 64.
|
| 280 |
+
|
| 281 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>NVAE [48]</td><td>41.3</td></tr><tr><td>GLOW [27]</td><td>59.35</td></tr><tr><td>Diffusion EBM [12]</td><td>7.02</td></tr><tr><td>Dual MCMC [6]</td><td>4.56</td></tr><tr><td>VAEBM [51]</td><td>13.51</td></tr><tr><td>EC-VAE (ours)</td><td>4.28</td></tr></table>
|
| 282 |
+
|
| 283 |
+
Table 5: Generative performance on CelebA 64. Table 6: Generative performance on CelebA-HQ-256.
|
| 284 |
+
|
| 285 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>NCSNv2 [45]</td><td>26.86</td></tr><tr><td>COCO-GAN [33]</td><td>4.0</td></tr><tr><td>QA-GAN [40]</td><td>6.42</td></tr><tr><td>Divergence Triangle [15]</td><td>24.7</td></tr><tr><td>Dual MCMC [6]</td><td>5.15</td></tr><tr><td>VAEBM [51]</td><td>5.31</td></tr><tr><td>NCP-VAE [1]</td><td>5.25</td></tr><tr><td>NVAE [48]</td><td>14.74</td></tr><tr><td>EC-VAE (Ours)</td><td>2.71</td></tr></table>
|
| 286 |
+
|
| 287 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>ALAE [42]</td><td>19.21</td></tr><tr><td>DC-VAE [41]</td><td>15.81</td></tr><tr><td>PGGAN [24]</td><td>8.03</td></tr><tr><td>GLOW [27]</td><td>68.93</td></tr><tr><td>Dual MCMC [6]</td><td>15.89</td></tr><tr><td>VAEBM [51]</td><td>20.38</td></tr><tr><td>NCP-VAE [1]</td><td>24.79</td></tr><tr><td>NVAE [48]</td><td>45.11</td></tr><tr><td>EC-VAE (Ours)</td><td>12.35</td></tr></table>
|
| 288 |
+
|
| 289 |
+
drop MCMC steps during test time sampling without compromising the quality of generation. And the FID is even better without MCMC. This is likely because MCMC introduces noise at each step which cannot be perfectly denoised (See Fig. 2), resulting in noise still present in the image. In contrast, the decoder minimizes the distance $\mathbb{E}_{\mathbf{x}}||\tilde{\mathbf{x}},\mathbf{x}||_2^2$ , assuming $\tilde{\mathbf{x}} = \mathbf{y} + \boldsymbol{\xi}$ , where $\xi$ is zero-mean random noise without any information. The minimum is ideally achieved at $\mathbf{x} = \mathbf{y}$ , allowing the decoder to act as a filter and output sharp images without noise. Moreover, as observed, most previous EBMs [10, 51, 56] need to tune MCMC steps and step size carefully during inference to achieve high performance (e.g., $\mathrm{CoopFlow}^\dagger$ in Tab. 1), while our method does not need extra hyper-parameters tuning as even no MCMC required during inference.
|
| 290 |
+
|
| 291 |
+
Energy-Calibrated Normalizing Flow. We evaluate the EC-Flow on CIFAR10. We use Glow as the flow architecture. As shown in Tab. 1, the EC-Flow outperforms existing flows in single-step generation, even outperforming the FlowCE
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
Fig. 3: Qualitative results of zero-shot image restoration (colorization, inpainting, $4 \times$ super-resolution).
|
| 295 |
+
|
| 296 |
+
Table 7: Quantitative results Calibrated posterior on CIFAR-10.
|
| 297 |
+
|
| 298 |
+
<table><tr><td>Model</td><td>FID↓</td><td>MSE↓</td><td>ELBO↑</td></tr><tr><td>VAE</td><td>104.68</td><td>0.0235</td><td>-953.43</td></tr><tr><td>+ Calibrated posterior</td><td>102.10</td><td>0.0198</td><td>-349.14</td></tr><tr><td>EC-VAE</td><td>5.20</td><td>0.0193</td><td>652.59</td></tr><tr><td>+ Calibrated posterior</td><td>5.81</td><td>0.0170</td><td>1072.40</td></tr></table>
|
| 299 |
+
|
| 300 |
+
Table 8: Sampling efficiency and training cost on CIFAR-10. Time is the seconds took to generate 50 images.
|
| 301 |
+
|
| 302 |
+
<table><tr><td>Model</td><td>FID↓</td><td>Latent dim↓</td><td>Time↓</td><td>GPU days ↓</td><td>GPU-Type</td></tr><tr><td>NCSN</td><td>25.32</td><td>3072</td><td>107.9</td><td>-</td><td>-</td></tr><tr><td>GLOW [38]</td><td>48.9</td><td>3072</td><td>-</td><td>60</td><td>-</td></tr><tr><td>SurVAE Flow [38]</td><td>49.03</td><td>1536</td><td>-</td><td>7</td><td>TITAN-X</td></tr><tr><td>NVAE [48]</td><td>50.97</td><td>153600</td><td>0.36</td><td>18.3</td><td>32G-V100</td></tr><tr><td>NCP-VAE [1]</td><td>24.08</td><td>153600</td><td>-</td><td>34.5</td><td>32G-V100</td></tr><tr><td>VAEBM [51]</td><td>12.19</td><td>153600</td><td>8.79</td><td>≥18.3</td><td>32G-V100</td></tr><tr><td>EC-VAE w/ MCMC (ours)</td><td>5.63</td><td>128</td><td>0.52</td><td>3</td><td>RTX-3090</td></tr><tr><td>EC-VAE (ours)</td><td>5.20</td><td>128</td><td>0.03</td><td>3</td><td>RTX-3090</td></tr></table>
|
| 303 |
+
|
| 304 |
+
which is trained by playing an adversarial game. However, we found that in EC-Flow, the role of MCMC remains crucial in enhancing generative performance. Specifically, EC-Flow w/ MCMC significantly improves the FID from 31.12 to 22.74. We believe that this is due to the expressivity limitations of invertible transformations in flows. Nevertheless, compared to CoopFlow which also combines flows and EBMs, our EC-Flow beat CoopFlow without MCMC by a large margin, demonstrating the effectiveness of the proposed EC-Flow. Note that the 15.8 FID achieved by CoopFlow needs extra hyper-parameter tuning, its result (26.54 FID) without extra tuning is worse than ours w/ MCMC (22.74 FID).
|
| 305 |
+
|
| 306 |
+
Energy-Calibrated Variational Learning. We also evaluate the Energy-Calibrated Variational Learning on CIFAR-10, with 5 MCMC steps for calibrating posterior. As shown in Tab. 7, the calibrated posterior consistently enhances the ELBO and MSE of related baseline VAE and EC-VAE. This indicates that the calibrated posterior can provide a more accurate posterior for better likelihood maximization. However, a slight FID deterioration is observed in the EC-VAE with Calibrated posterior, implying that the likelihood is not always consistent with generation quality. Interestingly, we found the EC-VAE also improves the ELBO and MSE compared to VAE, despite we only calibrate the generative side. This may be highly due to the energy-based calibration effectively improving the ability to map latent space to data space and reducing the gap between prior and aggregated posterior.
|
| 307 |
+
|
| 308 |
+
Table 9: Quantitative results of image restoration on CelebA-HQ.
|
| 309 |
+
|
| 310 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">4× SR</td><td>Colorization</td></tr><tr><td colspan="2">PSNR↑ / FID↓</td><td>Cons↓ / FID↓</td></tr><tr><td>PULSE [36]</td><td colspan="2">22.7 / 40.3</td><td>N/A</td></tr><tr><td>DDRM [26]</td><td colspan="2">31.6 / 31.0</td><td>456 / 31.2</td></tr><tr><td>DDNM [50]</td><td colspan="2">31.6 / 22.3</td><td>26.2 / 26.4</td></tr><tr><td>EC-VAE (ours)</td><td colspan="2">28.8 / 30.4</td><td>0.004 / 13.3</td></tr></table>
|
| 311 |
+
|
| 312 |
+
Table 10: Comparison for FID on CIFAR-10 between several related methods.
|
| 313 |
+
|
| 314 |
+
<table><tr><td>Model</td><td>FID↓</td></tr><tr><td>EC-VAE</td><td>5.20</td></tr><tr><td>EC-VAE w/ flow prior</td><td>4.85</td></tr><tr><td>EC-VAE w/ LPIPS</td><td>4.77</td></tr><tr><td>EC-VAE w/o primal-dual</td><td>5.72</td></tr><tr><td>VAE</td><td>104.68</td></tr><tr><td>EBM</td><td>45.52</td></tr><tr><td>EBM init w/ VAE samples</td><td>44.63</td></tr><tr><td>VAE + WGAN</td><td>33.78</td></tr></table>
|
| 315 |
+
|
| 316 |
+
# 5.2 Sampling Efficiency and Training Cost
|
| 317 |
+
|
| 318 |
+
Although the score-based model and NVAE's variants have shown outstanding sample quality, their sampling speed is limited by the necessity of expensive MCMC sampling steps. As shown in Tab. 8, the generation by EC-VAE, in contrast, takes just one pass, making it hundreds of and thousands of times faster than NCSN and VAEBM, respectively. Notably, even after performing MCMC steps, our method still only requires 0.52 seconds to generate 50 samples. This is because our energy network is lightweight and only requires 30 MCMC steps on the data space, while VAEBM runs MCMC in $(\mathbf{x},\mathbf{z})$ space which requires backward through its heavy decoder at each step. Furthermore, due to the extremely large scale of latent variables used in NVAE-family and previous flows, yielding challenges in learning, they need at least 7 GPU days to be trained on CIFAR-10, while our model only needs 3 GPU days despite using costly MCMC steps in training.
|
| 319 |
+
|
| 320 |
+
# 5.3 Image Restoration
|
| 321 |
+
|
| 322 |
+
Here we show that well-trained EC-VAE is able to be zero-shot used in image restoration as described in Sec. 4.3. The Qualitative results are shown in Fig. 3. Our model can successfully restore those images with high quality and consistency. More qualitative results can be found in Appendix G. Following the setting as in [50], we compare our method with strong zero-shot baselines, using metrics FID, PSNR, and Consistency [50] (i.e., $||\mathbf{A}\hat{\mathbf{x}} - \mathbf{A}\mathbf{x}||_1$ ). As shown in Tab. 9, we outperform GAN-based PULSE [36] and compete with diffusion-based DDNM [50] and DDRM [26], which confirms our model provides competitive performance.
|
| 323 |
+
|
| 324 |
+
# 5.4 Ablation Study
|
| 325 |
+
|
| 326 |
+
All experiments here are performed on CIFAR-10 for faster training. See Appendix E for Experimental settings and additional ablations. See Appendix F for extra study on mode coverage.
|
| 327 |
+
|
| 328 |
+
Effect of Calibration. The proposed method is calibrating generative models by incorporating generated samples into training. This raises the question of
|
| 329 |
+
|
| 330 |
+
what is the performance of single generative model and train generative model and EBMs as independent components. We compare the proposed EC-VAE with three related baselines i.e., VAE, EBM, and EBM initialized with pre-trained VAE samples. As shown in Tab. 10, we significantly outperform these three variants by a huge margin. Note that there is almost no benefit of initializing EBM with pre-trained VAE samples, implying the effectiveness of calibration.
|
| 331 |
+
|
| 332 |
+
Energy-based Calibration vs. Adversarial-based Calibration. The gradient for updating EBMs $E_{\omega}$ is similar to the gradient updates of WGAN's discriminator [2]. The key difference is that WGAN updates the generator and discriminator by adversarial training, while we update EBMs by maximizing the likelihood and we update the VAE by maximizing adaptive weight between the lower bound of data likelihood and conditional likelihood on calibrated samples (i.e., $\log p(\tilde{\mathbf{x}}|\mathbf{x}) = -\frac{||\tilde{\mathbf{x}} - \mathbf{x}||_2^2}{2\sigma^2} +\mathrm{Constant}$ ). Thus, a related variant of EC-VAE is updating the VAE by both ELBO and WGAN training objectives. We compare the adversarial variant with the proposed EC-VAE. As shown in Tab. 10, the adversarial variant achieves similar results (33.78 FID) to the VAEs+GANs (39.8 FID) in DC-VAE which is significantly worse than the proposed EC-VAE (5.20 FID), highlighting the advantage of our method compared to adversarial training.
|
| 333 |
+
|
| 334 |
+
Effect of Primal-Dual. We firstly emphasize that primal-dual has advantages with theoretical guarantees in constrained learning [3]. This section is for empirically showing the impact intuitively. As shown in Tab. 10, in comparison to primal-dual, the naive stochastic gradient descent (w/o dual variable $\lambda$ ) algorithm yields worse results.
|
| 335 |
+
|
| 336 |
+
Compatibility with Advanced Technique in VAEs. We employ MSE as the distance metric and a Gaussian as prior in CIFAR-10. Recognizing the efficacy of flexible priors and better distance metrics in improving vanilla VAEs [1, 52], we investigate the impact of integrating either flow prior or LPIPS into the EC-VAE. The superior performance of both variants (Tab. 10) suggests that EC-VAE is orthogonal to these advanced techniques to some extent. Additionally, we note that the improvement margin is not large, indicating that EC-VAE effectively addressed the prior hole issue and blurry generation issue in vanilla VAEs.
|
| 337 |
+
|
| 338 |
+
# 6 Conclusion
|
| 339 |
+
|
| 340 |
+
In this paper, we proposed EC-VAE, using conditional EBMs for calibrating the VAEs. Furthermore, the proposed energy-based calibration can enhance normalizing flows and variational posterior. We also propose and show that EC-VAE can effectively solve image restoration in a zero-shot manner. We show that MCMC sampling is not required once the VAE is calibrated while keeping high performance. In terms of efficiency, EC-VAE can be trained by a single GPU and is fast to converge, addressing the intensive computational resources consumption problem of previous state-of-the-art VAEs (i.e., NVAE). The proposed EC-VAE shows promising results over multiple datasets with high computational efficiency, significantly reducing the gap with GANs.
|
| 341 |
+
|
| 342 |
+
# Acknowledgments
|
| 343 |
+
|
| 344 |
+
Jing Tang's work is partially supported by the National Natural Science Foundation of China (NSFC) under Grant No. U22B2060, by National Key R&D Program of China under Grant No. 2023YFF0725100, by National Language Commission under Grant No. WT145-39, by The Department of Science and Technology of Guangdong Province under Grant No. 2023A1515110131, by Guangzhou Municipal Science and Technology Bureau under Grant No. 2023A03J0667 and 2024A04J4454, by Hong Kong Productivity Council (HKPC), and by Createlink Technology Co., Ltd.
|
| 345 |
+
|
| 346 |
+
# References
|
| 347 |
+
|
| 348 |
+
1. Aneja, J., Schwing, A., Kautz, J., Vahdat, A.: A contrastive learning approach for training variational autoencoder priors. Advances in Neural Information Processing Systems 34 (2021) 2, 10, 11, 12, 14
|
| 349 |
+
2. Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein generative adversarial networks. In: Precup, D., Teh, Y.W. (eds.) Proceedings of the 34th International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 70, pp. 214-223. PMLR (06-11 Aug 2017), https://proceedings.mlr.press/v70/arjovsky17a.html 14
|
| 350 |
+
3. Chamon, L.F., Paternain, S., Calvo-Fullana, M., Ribeiro, A.: Constrained learning with non-convex losses. arXiv:2103.05134 (2021) 7, 14
|
| 351 |
+
4. Chrabaszcz, P., Loshchilov, I., Hutter, F.: A downsampled variant of imagenet as an alternative to the CIFar datasets. ArXiv abs/1707.08819 (2017), https://api-semanticscholar.org/CorpusID:7304542 9
|
| 352 |
+
5. Coates, A., Ng, A., Lee, H.: An analysis of single-layer networks in unsupervised feature learning. In: AISTATS. pp. 215-223 (2011) 9
|
| 353 |
+
6. Cui, J., Han, T.: Learning energy-based model via dual-mcmc teaching. Advances in Neural Information Processing Systems 36 (2024) 4, 10, 11
|
| 354 |
+
7. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: 2009 IEEE Conference on Computer Vision and Pattern Recognition (Jun 2009). https://doi.org/10.1109/cvpr.2009.5206848, http://dx.doi.org/10.1109/cvpr.2009.5206848 9
|
| 355 |
+
8. Dinh, L., Krueger, D., Bengio, Y.: NICE: non-linear independent components estimation. In: Bengio, Y., LeCun, Y. (eds.) 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Workshop Track Proceedings (2015), http://arxiv.org/abs/1410.8516 1
|
| 356 |
+
9. Dinh, L., Sohl-Dickstein, J., Bengio, S.: Density estimation using real nvp. arXiv preprint arXiv:1605.08803 (2016) 1
|
| 357 |
+
0. Du, Y., Mordatch, I.: Implicit generation and modeling with energy based models. In: Advances in Neural Information Processing Systems. pp. 3608-3618 (2019) 1, 10, 11
|
| 358 |
+
1. Gao, R., Nijkamp, E., Kingma, D.P., Xu, Z., Dai, A.M., Wu, Y.N.: Flow contrastive estimation of energy-based models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7518-7528 (2020) 10
|
| 359 |
+
2. Gao, R., Song, Y., Poole, B., Wu, Y.N., Kingma, D.P.: Learning energy-based models by diffusion recovery likelihood. arXiv preprint arXiv:2012.08125 (2020) 4, 11
|
| 360 |
+
|
| 361 |
+
13. Gong, X., Chang, S., Jiang, Y., Wang, Z.: Autogan: Neural architecture search for generative adversarial networks. In: ICCV (2019) 10, 11
|
| 362 |
+
14. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial nets. Advances in neural information processing systems 27 (2014) 1
|
| 363 |
+
15. Han, T., Nijkamp, E., Zhou, L., Pang, B., Zhu, S.C., Wu, Y.N.: Joint training of variational auto-encoder and latent energy-based model. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7978-7987 (2020) 4, 10, 11
|
| 364 |
+
16. He, H., Wang, H., Lee, G.H., Tian, Y.: Probgan: Towards probabilistic gan with theoretical guarantees. In: ICLR (2019) 11
|
| 365 |
+
17. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (June 2016) 9
|
| 366 |
+
18. Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., Hochreiter, S.: Gans trained by a two time-scale update rule converge to a local nash equilibrium. In: Advances in neural information processing systems. pp. 6626-6637 (2017) 9
|
| 367 |
+
19. Hill, M., Nijkamp, E., Mitchell, J.C., Pang, B., Zhu, S.C.: Learning probabilistic models from generator latent spaces with hat EBM. In: Oh, A.H., Agarwal, A., Belgrave, D., Cho, K. (eds.) Advances in Neural Information Processing Systems (2022), https://openreview.net/forum?id=AluQNIIb_Zy 4, 10
|
| 368 |
+
20. Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. arXiv preprint arXiv:2006.11239 (2020) 10
|
| 369 |
+
21. Huang, H., He, R., Sun, Z., Tan, T., et al.: Introvae: Introspective variational autoencoders for photographic image synthesis. Advances in neural information processing systems 31 (2018) 2
|
| 370 |
+
22. Ioffe, S., Szegedy, C.: Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR abs/1502.03167 (2015), http://arxiv.org/abs/1502.03167 2
|
| 371 |
+
23. Jonathan, H., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems 33, 6840-6851 (2020) 1, 10, 11
|
| 372 |
+
24. Karras, T., Aila, T., Laine, S., Lehtinen, J.: Progressive growing of GANs for improved quality, stability, and variation. In: International Conference on Learning Representations (2018) 11
|
| 373 |
+
25. Karras, T., Aittala, M., Hellsten, J., Laine, S., Lehtinen, J., Aila, T.: Training generative adversarial networks with limited data. arXiv preprint arXiv:2006.06676 (2020) 10
|
| 374 |
+
26. Kawar, B., Elad, M., Ermon, S., Song, J.: Denoising diffusion restoration models. In: Advances in Neural Information Processing Systems (2022) 13
|
| 375 |
+
27. Kingma, D.P., Dhariwal, P.: Glow: Generative flow with invertible 1x1 convolutions. arXiv preprint arXiv:1807.03039 (2018) 10, 11
|
| 376 |
+
28. Kingma, D.P., Welling, M.: Auto-encoding variational bayes. In: The International Conference on Learning Representations (ICLR) (2014) 1
|
| 377 |
+
29. Kingma, D.P., Welling, M.: Stochastic gradient vb and the variational autoencoder. In: Second International Conference on Learning Representations, ICLR. vol. 19, p. 121 (2014) 3
|
| 378 |
+
30. Kong, Z., Chaudhuri, K.: The expressive power of a class of normalizing flow models. International Conference on Artificial Intelligence and Statistics, International Conference on Artificial Intelligence and Statistics (May 2020) 1
|
| 379 |
+
|
| 380 |
+
31. Kynkänniemi, T., Karras, T., Aittala, M., Aila, T., Lehtinen, J.: The role of imagenet classes in fréchet inception distance. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=4oXTQ6m.ws8 10
|
| 381 |
+
32. Lee, H., Jeong, J., Park, S., Shin, J.: Guiding energy-based models via contrastive latent variables. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=CZmHHj9MgkP 2, 9, 10, 11
|
| 382 |
+
33. Lin, C.H., Chang, C.C., Chen, Y.S., Juan, D.C., Wei, W., Chen, H.T.: Coco-gan: generation by parts via conditional coordinating. In: Proceedings of the IEEE International Conference on Computer Vision. pp. 4512-4521 (2019) 11
|
| 383 |
+
34. Lipman, Y., Chen, R.T.Q., Ben-Hamu, H., Nickel, M., Le, M.: Flow matching for generative modeling. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=PqvMRDCJT9t 11
|
| 384 |
+
35. Liu, Z., Luo, P., Wang, X., Tang, X.: Deep learning face attributes in the wild. In: Proceedings of the IEEE international conference on computer vision. pp. 3730-3738 (2015) 9
|
| 385 |
+
36. Menon, S., Damian, A., Hu, S., Ravi, N., Rudin, C.: Pulse: Self-supervised photoupsampling via latent space exploration of generative models. In: Proceedings of the iee/cvf conference on computer vision and pattern recognition. pp. 2437-2445 (2020) 13
|
| 386 |
+
37. Miyato, T., Kataoka, T., Koyama, M., Yoshida, Y.: Spectral normalization for generative adversarial networks. In: ICLR (2018) 10, 11
|
| 387 |
+
38. Nielsen, D., Jaini, P., Hoogeboom, E., Winther, O., Welling, M.: Survae flows: Surjections to bridge the gap between vaes and flows. In: NeurIPS (2020) 10, 12
|
| 388 |
+
39. van den Oord, A., Kalchbrenner, N., Vinyals, O., Espeholt, L., Graves, A., Kavukcuoglu, K.: Conditional image generation with pixelCNN decoders (2016) 11
|
| 389 |
+
40. Parimala, K., Channappayya, S.: Quality aware generative adversarial networks. In: Advances in Neural Information Processing Systems. pp. 2948-2958 (2019) 11
|
| 390 |
+
41. Parmar, G., Li, D., Lee, K., Tu, Z.: Dual contradistinctive generative autoencoder. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 823-832 (June 2021) 2, 10, 11
|
| 391 |
+
42. Pidhorskyi, S., Adjeroh, D.A., Doretto, G.: Adversarial latent autoencoders. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 14104-14113 (2020) 11
|
| 392 |
+
43. Song, Y., Dhariwal, P., Chen, M., Sutskever, I.: Consistency models (2023) 10
|
| 393 |
+
44. Song, Y., Ermon, S.: Generative modeling by estimating gradients of the data distribution. In: Advances in Neural Information Processing Systems. pp. 11918-11930 (2019) 10
|
| 394 |
+
45. Song, Y., Ermon, S.: Improved techniques for training score-based generative models. arXiv preprint arXiv:2006.09011 (2020) 11
|
| 395 |
+
46. Tomczak, J.M., Welling, M.: VAE with a vampprior. In: Storkey, A.J., Pérez-Cruz, F. (eds.) International Conference on Artificial Intelligence and Statistics, AISTATS 2018, 9-11 April 2018, Playa Blanca, Lanzarote, Canary Islands, Spain. Proceedings of Machine Learning Research, vol. 84, pp. 1214-1223. PMLR (2018), http://proceedings.mlr.press/v84/tomczak18a.html 2
|
| 396 |
+
47. Tzeng, E., Hoffman, J., Saenko, K., Darrell, T.: Adversarial discriminative domain adaptation. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 7167-7176 (2017) 2
|
| 397 |
+
48. Vahdat, A., Kautz, J.: NVAE: A deep hierarchical variational autoencoder. In: Neural Information Processing Systems (NeurIPS) (2020) 2, 4, 10, 11, 12
|
| 398 |
+
|
| 399 |
+
49. Wang, W., Sun, Y., Halgamuge, S.: Improving mmd-gan training with repulsive loss function. In: ICLR (2019) 11
|
| 400 |
+
50. Wang, Y., Yu, J., Zhang, J.: Zero-shot image restoration using denoising diffusion null-space model. In: International Conference on Learning Representations (2023), https://openreview.net/forum?id=mRieQgMtNTQ 8, 13
|
| 401 |
+
51. Xiao, Z., Kreis, K., Kautz, J., Vahdat, A.: Vaebm: A symbiosis between variational autoencoders and energy-based models. In: International Conference on Learning Representations (2021) 4, 9, 10, 11, 12
|
| 402 |
+
52. Xiao, Z., Yan, Q., Chen, Y., Amit, Y.: Generative latent flow: A framework for non-adversarial image generation. CoRR abs/1905.10485 (2019), http://arxiv.org/abs/1905.10485 14
|
| 403 |
+
53. Xie, J., Lu, Y., Gao, R., Wu, Y.N.: Cooperative learning of energy-based model and latent variable model via mcmc teaching. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 32 (2018) 4
|
| 404 |
+
54. Xie, J., Lu, Y., Zhu, S.C., Wu, Y.: A theory of generative convnet. In: International Conference on Machine Learning. pp. 2635-2644 (2016) 1
|
| 405 |
+
55. Xie, J., Zheng, Z., Li, P.: Learning energy-based model with variational autoencoder as amortized sampler. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 35, pp. 10441-10451 (2021) 4
|
| 406 |
+
56. Xie, J., Zhu, Y., Li, J., Li, P.: A tale of two flows: Cooperative learning of Langevin flow and normalizing flow toward energy-based model. In: International Conference on Learning Representations (2022), https://openreview.net/forum?id=31d5RLCUuXC 4, 10, 11
|
| 407 |
+
57. Yang, G., Huang, X., Hao, Z., Liu, M.Y., Belongie, S., Hariharan, B.: Pointflow: 3d point cloud generation with continuous normalizing flows. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 4541-4550 (2019) 2
|
| 408 |
+
58. Yu, F., Seff, A., Zhang, Y., Song, S., Funkhouser, T., Xiao, J.: Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365 (2015) 9
|
| 409 |
+
59. Zhang, R., Isola, P., Efros, A.A., Shechtman, E., Wang, O.: The unreasonable effectiveness of deep features as a perceptual metric. In: CVPR (2018) 10
|
| 410 |
+
60. Zhao, Y., Xie, J., Li, P.: Learning energy-based generative models via coarse-to-fine expanding and sampling. In: International Conference on Learning Representations (2021), https://openreview.net/forum?id=aD1_5zowqV 11
|
energyclibratedvaewithtesttimefreelunch/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd4b576d79b0146207f028de1212ca0fb3ccb8dcadc33d0938cc521f2c14e54a
|
| 3 |
+
size 569054
|
energyclibratedvaewithtesttimefreelunch/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e96d57152cb7c28fe606ee36bcfdb7047af465cb56b48a1382f1568285ff9ff9
|
| 3 |
+
size 526233
|
energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8960cf16fe9ee19bd2ce16bdb44213a2911cb19c9f00cf5077d7d7d118752a73
|
| 3 |
+
size 73120
|
energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0273e5fb00cae09208188c82c0b4ce48707ba227b2ab57f7102896c820da390b
|
| 3 |
+
size 91057
|
energyinducedexplicitquantificationformultimodalitymrifusion/59088084-f02f-4484-8e29-c2731df9b4e1_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bef050a04793bd62ce40b72e7854765bda127081df4503faf6e392fe1a6c7a0
|
| 3 |
+
size 17857079
|
energyinducedexplicitquantificationformultimodalitymrifusion/full.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Energy-induced Explicit quantification for Multi-modality MRI fusion
|
| 2 |
+
|
| 3 |
+
Xiaoming Qi $^{1,2}$ , Yuan Zhang $^{1}$ , Tong Wang $^{1}$ , Guanyu Yang $^{1}$ $\boxtimes$ , Yueming Jin $^{2}$ $\boxtimes$ , and Shuo Li $^{3}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> Key Laboratory of New Generation Artificial Intelligence Technology and Its Interdisciplinary Applications (Southeast University), Ministry of Education, China yang.list@seu.edu.cn
|
| 6 |
+
|
| 7 |
+
$^{2}$ Department of Biomedical Engineering and Department of Electrical and Computer Engineering, National University of Singapore, Singapore ymjin@nus.edu.sg
|
| 8 |
+
|
| 9 |
+
<sup>3</sup> Departments Biomedical Engineering, and Computer and Data Science, Case Western Reserve University
|
| 10 |
+
|
| 11 |
+
Abstract. Multi-modality magnetic resonance imaging (MRI) is crucial for accurate disease diagnosis and surgical planning by comprehensively analyzing multi-modality information fusion. This fusion is characterized by unique patterns of information aggregation for each disease across modalities, influenced by distinct inter-dependencies and shifts in information flow. Existing fusion methods implicitly identify distinct aggregation patterns for various tasks, indicating the potential for developing a unified and explicit aggregation pattern. In this study, we propose a novel aggregation pattern, Energy-induced Explicit Propagation and Alignment $(\mathrm{E}^2\mathrm{PA})$ , to explicitly quantify and optimize the properties of multi-modality MRI fusion to adapt to different scenarios. In $\mathrm{E}^2\mathrm{PA}$ , (1) An energy-guided hierarchical fusion (EHF) uncovers the quantification and optimization of inter-dependencies propagation among multimodality by hierarchical same energy among patients. (2) An energy-regularized space alignment (ESA) measures the consistency of information flow in multi-modality aggregation by the alignment on space factorization and energy minimization. Through the extensive experiments on three public multi-modality MRI datasets (with different modality combinations and tasks), the superiority of $\mathrm{E}^2\mathrm{PA}$ can be demonstrated from the comparison with state-of-the-art methods. Our code is available at https://github.com/JerryQseu/EEPA.
|
| 12 |
+
|
| 13 |
+
Keywords: Energy model $\cdot$ Multi-modality MRI $\cdot$ Explicit quantification
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Multi-modality magnetic resonance imaging (MRI) fusion offers critical anatomical and functional information for promoting the accuracy and success in disease diagnosis and surgical planning. MRI, being the gold-standard technique
|
| 18 |
+
|
| 19 |
+
for noninvasive tissue characterization, encompasses a range of modalities such as LGE (late gadolinium enhanced), Flair (fluid attenuation inversion recovery), T1c (T1-contrasted), T1n (spin-lattice relaxation), T2w (spin-spin relaxation), and more [30]. Distinct combinations of modalities are employed in diverse clinical diagnoses, for example, myocardial infarction diagnosis involves LGE, cine, and T2 modalities, while brain tumor assessment utilizes T1c, T1n, T2w, and T2f modalities [16] [22] [3]. Different diseases require different information aggregation patterns from different modality combinations. Therefore, effective information aggregation from multi-modalities is of great clinical significance to quantify morphological and pathological changes, facilitating treatment planning and patient management.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Fig. 1: Determining a unified multi-modality MRI aggregation pattern is still a challenge. Different diseases rely on distinct inter-dependencies and shifts in information flow among modalities.
|
| 23 |
+
|
| 24 |
+
However, determining a unified aggregation pattern for multi-modality MRI remains challenging. The information aggregation of multi-modality MRI follows a pipeline where information from different modalities flows in accordance with their inter-dependencies. A specific disease requires a specific aggregation pattern of various MRI modalities (Fig. 1). It can be found that the aggregations of different diseases rely on distinct inter-dependencies and shifts in information flow among modalities. Due to the different inter-dependencies and information flow in various aggregations, a unified aggregation pattern is difficult to define for the diseases in various scenarios.
|
| 25 |
+
|
| 26 |
+
Inter-dependencies and information flow are extensively investigated in the existing aggregation methods. Existing methods can be categorized into two groups based on whether the aggregation can be dynamically optimized. (1) Fixed. In these methods [33] [38] [11], the relevance of different modalities is defined as pre-operation according to the clinical experience. Hence, the aggregation performance relies on the quality of pre-defined relevance. The fixed aggregation requires these methods to redesign their frameworks when confronted with new scenarios. (2) Dynamic. In these methods [20] [18] [15] [23] [39] [30] [43], features from different modalities are concatenated into a whole, and rely on task labels to drive the network to automatically aggregate the features. Due to the
|
| 27 |
+
|
| 28 |
+
lack of specific optimization targets for the inter-dependencies and information flow, the aggregation is implicit and unstable. As a result, a single framework operates differently when applied to various diseases with different modalities.
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Fig. 2: The properties of multi-modality MRI information aggregation: 1. In the case of the same disease, multi-modality MRI exhibits the same inter-dependencies across different patients. 2. In the information flow, the aggregated information retains the inherent details from each modality.
|
| 32 |
+
|
| 33 |
+
Motivated by the energy model, the inter-dependencies and information flow can be explicitly quantified to overcome the above challenges. Energy models capture dependencies among variables in various applications, including tasks like out-of-distribution detection [25], alignment in incremental learning [12], and structured prediction [1]. To quantify interdependence and information flow, we define energy based on the fundamental properties in both aspects(Fig. 2):
|
| 34 |
+
|
| 35 |
+
- 1. In the case of the same disease, multi-modality MRI exhibits the same inter-dependencies across different patients' features. Consequently, the interdependencies of multi-modality MRI remain constant for the same scenario. In other words, within the same scenario, diverse patients' multi-modality features are aggregated in the same way.
|
| 36 |
+
- 2. In the information flow, the aggregated feature preserves the consistent information derived from each modality. Those features for each disease are highly similar. Hence, there is consistency in the flow of information from multi-modality to aggregation.
|
| 37 |
+
|
| 38 |
+
According to the above properties, we propose a novel aggregation pattern, Energy-induced Explicit Propagation and Alignment (E²PA), to enable the explicit quantification of multi-modality MRI fusion in different scenarios. In E²PA:
|
| 39 |
+
|
| 40 |
+
(1) An energy-guided hierarchical fusion (EHF) uncovers the explicit quantification and optimization of inter-dependencies propagation by an attention-based enhancement and a hierarchical same energy among patients. (2) An energy-regularized space alignment (ESA) aligns the representations of different modalities by QR decomposition [10] and measures the consistency of information flow by energy minimization. The contributions are as described below.
|
| 41 |
+
|
| 42 |
+
- A novel aggregation prototype, Energy-induced Explicit Propagation and Alignment $(\mathrm{E}^2\mathrm{PA})$ , explicitly quantifies aggregation from the inter-dependencies and information flow by the energy model. This fundamental property-based multi-modality aggregation pattern is adaptive to different medical scenarios directly and greatly boosts the performance of downstream diagnostic tasks.
|
| 43 |
+
- An energy-guided hierarchical fusion (EHF) enforces the optimization of inter-dependencies propagation of multi-modality MRI from attention-based representation and explicit quantification of the same energy among patients in hierarchical propagation. It establishes an equivalence between the measurement of inter-dependencies and the optimization of the energy to the aggregation.
|
| 44 |
+
- An energy-regularized space alignment (ESA) ensures the consistency of information flow in multi-modality aggregation by minimizing the energy on the factorized and aligned representation. It identifies a provable theory that guarantees the consistency of information in multi-modality aggregation.
|
| 45 |
+
|
| 46 |
+
# 2 Related works
|
| 47 |
+
|
| 48 |
+
Multi-modality MRI fusion To utilize information from multi-modality MRI assisting clinical diagnosis, extensive works focus on multi-modality MRI aggregation/fusion [2] [40] [32] [31]. The aggregation methods could be divided into:
|
| 49 |
+
|
| 50 |
+
(1) Task-driven (fixed). The fusion is constructed following the tasks related to different modalities [29]. [42] employs the different segmentation results to guide. In [33], the relevance of different pathology detection on multi-modality MRI is studied to select task-related modality MRI to aggregation. Following the relation among cardiac myocardium, scar, and edema. [37] set a coarse-to-fine way to fuse multi-modality CMR. Similarly, [21] sets a stack structure according to the order of various cardiac tissues segmentation for the information aggregation of multi-modality CMR. For different diseases, it makes the task-driven aggregation method requires retraining/redesign. Hence, task-driven aggregation has limited adaptability.
|
| 51 |
+
|
| 52 |
+
(2) Data-driven (dynamic). These methods weight multi-modality MRI according to the interdependence/similarity automatically. The weights of different modalities are calculated following the similarity by networks [28] [38]. To achieve adaptive weights for each modality, [30] designs an auto-weighted supervision mechanism to track the importance of the scar and edema segmentation. To search the inter-dependencies among multi-modalities, [13] and [43] conduct united adversarial learning to mine the correlation in liver tumor segmentation. In these methods, the aggregation results are evaluated by the downstream
|
| 53 |
+
|
| 54 |
+
segmentation/quantification tasks. The inter-dependencies and information flow lack specific optimization targets. Hence, a single framework operates differently when applied to various diseases with different modalities.
|
| 55 |
+
|
| 56 |
+
Energy-based models Energy-based model [14] assigns low energies to observed data-label pairs and high energies otherwise [8] [17] to maximize likelihood estimation. It has been applied to various aspects, including out-of-distribution sample detection [19] [25], structured prediction [1] [27], improving adversarial robustness [8] [35] and alignment in incremental learning [12]. In [44], the energy-based model transports source style to target style by implicit learning not the combination of normalized codes. [34] evaluates the performance of the energy-based model on domain adaptation. The above works all rely on the ability of energy functions to capture dependencies among variables. Hence, considering the same inter-dependencies and consistent information flow in multi-modality fusion, we propose to minimize the energy to explicitly quantify them.
|
| 57 |
+
|
| 58 |
+
# 3 Method
|
| 59 |
+
|
| 60 |
+
In our $\mathrm{E}^2\mathrm{PA}$ (Fig. 3), the representations of multi-modalities are extracted by encoders respectively. EHF performs hierarchical attention-based fusion and explicitly quantifies the inter-dependencies among patients by defined energy. ESA measures the consistency of information flow on the aligned modality representation and aggregation results.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Fig. 3: $\mathrm{E}^2\mathrm{PA}$ consists of: a) EHF uncovers the quantification and optimization of interdependencies among multi-modalities by hierarchical same energy among patients. b) ESA measures the consistency of information flow in multi-modality aggregation by the alignment on space factorization and the energy minimization.
|
| 64 |
+
|
| 65 |
+
# 3.1 EHF quantifies the inter-dependencies propagation
|
| 66 |
+
|
| 67 |
+
EHF adopts the attention-based fusion network and hierarchical energy quantification to explicitly quantify the inter-dependencies propagation of multimodilities. For multi-modality MRI aggregation, a set of scanned MRI (with $N$ patients) $\{(M_1^i,\ldots ,M_j^i,lab^i)\}_{i = 1}^N$ denotes the $j$ modalities MRI and the label of diagnosis target (lab). The hierarchical representations of each modality (Brain
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Fig. 4: The details of attention-based fusion network in EHF.
|
| 71 |
+
|
| 72 |
+
MRI for example $\{c1 - c4\}$ , $\{w1 - w4\}$ , $\{n1 - n4\}$ , $\{tf1 - tf4\}$ are extracted by the encoders $(\{L1, L2, L3, L4\})$ .
|
| 73 |
+
|
| 74 |
+
Attention-based fusion network captures the inter-dependencies by multiscales attention. Inspired by the attentional feature fusion [4], attention-based fusion is established on multi-modality MRI. The multi-scale attention overcomes the difference on semantics and scales for the representation of interdependencies. On hierarchical representations, aggregation results ( $f1$ , $f2$ , $f3$ , $f4$ ) are constructed by the attention fusion following the inter-dependencies among modalities (Fig.4). In hierarchical aggregation, the same attention network is utilized to aggregate the multi-modality MRI. Here, the fusion on $tf4$ , $c4$ , $n4$ , and $w4$ is taken for example. Through the attention-based fusion, the representations of different modalities ( $tf4$ , $c4$ , $n4$ and $w4$ ) are fused into $f4$ . Firstly, the multi-modality representations with the size of $C \times D \times W \times H$ are added as a whole ( $A_f$ ). Second, the fused representation is fed into local network to extract the local attention in the channel dimension. The $A_f$ is extracted by the convolution and normalization layers with the size of $C / r \times D \times W \times H$ . Then the ReLU, convolution, and normalization layers are applied to achieve the local channel-wise attention ( $C \times D \times W \times H$ ). Thirdly, the global attention is realized by a global-pooling and two convolution & normalization layers with the size of $C \times 1 \times 1 \times 1$ . Fourth, the global and local attention is added and converted into sigmoid to achieve the attention in multi-modality MRI. Finally, the attention is applied to $A_f$ for the attention-corrected fusion ( $f4$ ). The above fusion process is applied to hierarchical multi-modality MRI representations.
|
| 75 |
+
|
| 76 |
+
Energy function of EHF: To explicitly quantify the inter-dependencies propagation, EHF defines the relation between energy score and inter-dependencies. In the energy-based formulation, the target is to find an energy function i.e., $E_{i - d}(x,y)$ that gives the lowest energy to correct results and higher energy to other results ( $x$ is the inter-dependencies, $y$ is the label). The aggregation must produce the value $y^{*}$ for the smallest: $y^{*} = \arg\min_{E_{i - d}}(x,y)$ . The joint probability of input $x$ and label $y$ can be estimated through the Gibbs distribution: $p(x,y) = \exp(-E_{i - d}(x,y)) / Z$ , where $Z = \sum_{x} \sum_{y} \exp(-E_{i - d}(x,y))$ is called the partition function that marginalizes over $x$ and $y$ . By marginalizing out $y$ , the probability density for $x$ can be achieved: $p(x) = \sum_{y} \exp(-E_{i - d}(x,y)) / Z$ . Due
|
| 77 |
+
|
| 78 |
+
to the difficulty of estimating $Z$ , a free energy $(F(x))$ serves as the 'rationality' of the occurrence of the variable $x$ :
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
F (x) = - \log \sum e x p (- E _ {i - d} (x, y)) \tag {1}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
To realize the quantification, we impose the proposition according to property (1):
|
| 85 |
+
|
| 86 |
+
- Proposition 1. The same inter-dependencies among multi-modality MRI in different patients will make the energy $E_{i - d}(x,y)$ be equal for any instance.
|
| 87 |
+
|
| 88 |
+
Precisely, the label $y$ , which cannot be quantified, is converted to the interdependencies of another patient $(x')$ . $x$ and $x'$ are generated by encoders and attention fusions $((L + at)$ and $(L + at)')$ . This situation follows the latent variable [14]. Due to the different inputs of the encoder, the inherent information in the aggregation is the inter-dependencies. Hence, the energy function is updated to $E_{i-d}(x, x'; (L + at), (L + at))$ . To avoid the collapse in energy optimization on two variables [14], EHF takes two ways: i) Fixing one variable in optimization. The $(L + at)'$ is fixed to generate fixed $x'$ as inter-dependencies. With iterative optimization, the measurement of inter-dependencies will be improved and achieve a stable value finally. ii) Enlarging energy to incorrect answers. The negative likelihood from probabilistic modeling is utilized to regularize. Hence, the energy of inter-dependencies can be formulated as:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\begin{array}{l} \mathcal {L} _ {i - d} (x, x ^ {\prime}; (L + a t), (L + a t) ^ {\prime}) = E _ {i - d} (x, x ^ {\prime}; (L + a t), \\ (L + a t) ^ {\prime}) + \log \sum e x p \left(- E _ {i - d} \left(x, \tilde {x} ^ {\prime}; (L + a t), \left(L + a t\right) ^ {\prime}\right)\right) \tag {2} \\ \end{array}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
,where $\tilde{x}^{\prime}$ is the incorrect answer generated by $(L + at)^{\prime}$ . It can be simplified:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathcal {L} _ {i - d} (x, x ^ {\prime}; (L + a t), (L + a t) ^ {\prime}) = \sum_ {L 1 - L 4} E _ {i - d} (x, x ^ {\prime}; (L + a t), (L + a t) ^ {\prime}) - F (x)
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
By this energy calculation on hierarchical aggregation, the inter-dependencies in multi-modalities can be explicitly quantified through iterative optimizations.
|
| 101 |
+
|
| 102 |
+
# 3.2 ESA ensures the consistency in information flow
|
| 103 |
+
|
| 104 |
+
ESA ensures the consistency of information flow in multi-modality aggregation by two steps: align information and minimize energy (Fig. 5). EHF focuses on the same inter-dependencies will motivate the encoders and attention fusion $((L + at))$ to prefer the same information in different patients and ignore the consistency in information flow.
|
| 105 |
+
|
| 106 |
+
Information Alignment. Since the information of different modalities is in different spaces, the measurement of consistency can not be directly on the information flow (proof in Supplementary). Hence, information alignment is necessary before measurement. It can be formulated to:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathcal {F} _ {\text {a l i g n}} (f, c, l, t) = \sum_ {i = 1} ^ {4} c i, l i, t i \xrightarrow {T} f i \tag {4}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Fig. 5: The details of the alignment process in ESA. The information of multimodalities in different vector spaces is aligned into the same space for effective fusion.
|
| 114 |
+
|
| 115 |
+
where $T$ is the transformation function of spaces. The information of different modalities and aggregation is represented as a $m \times n$ matrix. The matrix can be factorized to one orthogonal matrix $Q$ and one upper triangular matrix $R$ (QR decomposition [10]):
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
f 4 = Q _ {f u s i o n} ^ {4} @ R _ {f u s i o n} ^ {4}, \quad t f 4 = Q _ {t f} ^ {4} @ R _ {t f} ^ {4} \tag {5}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
where $@$ is the matrix multiplication operation, the dimension of $Q$ is a $m\times n$ and $R$ is a $n\times n$ matrix. The $Q$ , is the space of $R$ , which can be viewed as the orthogonal basis of each modality representation. Hence, the information alignment turns into the problem solving $T$ on the $Q$ of fusion results (f4) and multi-modality MRI (tf4,c4,n4,w4). To simplify the solution process, f4 and tf4 are taken example: $Q_{tf}^{4}\xrightarrow{T}Q_{fusion}^{4}$ . To find the value of $T$ , the process is converted to an equation (viewing $T$ as a matrix):
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
Q _ {t f} ^ {4} @ T = Q _ {f u s i o n} ^ {4} \quad Q _ {t f} ^ {4} @ Q _ {t f} ^ {4} ^ {- 1} @ Q _ {f u s i o n} ^ {4} = Q _ {f u s i o n} ^ {4}. \tag {6}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
Hence, $T$ is equal to $Q_{cine}^{4}^{-1} @ Q_{fusion}^{4}$ . Since the $Q_{fusion}^{4}$ is known, the target is to find $Q_{tf}^{4}^{-1}$ . Since the property of orthogonal matrix on $Q$ :
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
Q _ {t f} ^ {4} @ Q _ {t f} ^ {4} ^ {- 1} = I, Q _ {t f} ^ {4} @ Q _ {t f} ^ {4} ^ {T} = I, \tag {7}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
it can easily find $Q_{tf}^{4T} = Q_{tf}^{4}^{-1}$ . Hence, the value of $T$ can be obtained: $T = Q_{tf}^{4T}@\mathcal{Q}_{fusion}^{4}$ . Since the upper triangular matrix $R_{tf}^{4}$ is corresponding to $Q_{tf}^{4}$ , the alignment requires to be performed on it ( $R_{tf}^{4}@T = R_{tf}^{4}'$ ). Finally, the aligned information is:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
t f 4 _ {a} = Q _ {f u s i o n} ^ {4} @ R _ {t f} ^ {4}. \tag {8}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
Since the $f4$ and $tf4$ are aligned into the same space, the measurement of consistency can be conducted directly on $f4$ and $tf4_{a}$ . The same operation is performed on hierarchical multi-modality information.
|
| 140 |
+
|
| 141 |
+
Energy function of ESA: With the aligned information, ESA introduces an energy function to measure the information consistency between the aggregation and multi-modality MRI. It is based on the property (2):
|
| 142 |
+
|
| 143 |
+
- Proposition 2. The information in multi-modality MRI is maintained in the aggregated results. The aggregation needs to have low energy $E_{r}(x,y)$ with multi-modality representations.
|
| 144 |
+
|
| 145 |
+
The above situation follows the implicit regression [14] in energy-based model: In the aggregation, the multi-modality MRI representations (multiple answers) are equally good. Simplify, the dependency between the aggregation result $f4$ and multi-modality representations $tf4_{a}, c4_{a}, n4_{a}, w4_{a}$ cannot be formulated as a mapping from $f4$ to $tf4_{a}, c4_{a}, n4_{a}$ , or $w4_{a}$ directly. Hence, ESA models the consistency and according it to design energy function:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
E _ {r} (f 4, t f 4 _ {a}, c 4 _ {a}, n 4 _ {a}, w 4 _ {a}) = \sum_ {i} ^ {t f, c, n, w} \| G _ {a t} (f 4) - G _ {L} i 4 _ {a} \| ^ {2}. \tag {9}
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where $G_{at}$ and $G_{L}$ are the model functions to achieve $f4$ and $tf4_{a}$ . Through minimization of $E_{r}()$ , the information from different modalities will be maintained under this constraint. The regularization can be formulated as:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\mathcal {L} _ {r} = \sum_ {i} ^ {1, 2, 3, 4} E _ {r} (f i, \mathcal {F} _ {\text {a l i g n}} (f i, c i), \mathcal {F} _ {\text {a l i g n}} (f i, l i), \mathcal {F} _ {\text {a l i g n}} (f i, t i)). \tag {10}
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
Compared with $\mathcal{L}_{i - d}$ , which guides the same inter-dependencies from different patients, $\mathcal{L}_r$ constrains the consistency in information flow in the same patient. Through the minimization of two energy functions on hierarchical aggregation, $\mathcal{L} = \mathcal{L}_{i - d} + \mathcal{L}_r$ , the inter-dependencies and consistency are explicitly quantified. With different downstream tasks, $\mathcal{L}$ can be combined with the optimization of the target directly.
|
| 158 |
+
|
| 159 |
+
Table 1: The description of three public datasets (seg-segmentation, class-classification). Here MRNet is a public dataset.
|
| 160 |
+
|
| 161 |
+
<table><tr><td>Name</td><td>Modality</td><td>Target</td><td>Train</td><td>Test</td><td>Total</td></tr><tr><td>MyoPS</td><td>cine,LGE,T2</td><td>Seg</td><td>15</td><td>10</td><td>25</td></tr><tr><td>BraTS</td><td>T1c, T1n, T2f, T2w</td><td>Seg</td><td>834</td><td>417</td><td>1251</td></tr><tr><td>MRNet</td><td>Sagittal T2, Axial PD, Coronal T1</td><td>Class</td><td>753</td><td>377</td><td>1130</td></tr></table>
|
| 162 |
+
|
| 163 |
+
# 4 Experiments
|
| 164 |
+
|
| 165 |
+
We evaluate $\mathrm{E}^2\mathrm{PA}$ on various multi-modality MRI scenarios, including: cardiac pathology segmentation (MyoPS dataset [16]), brain tumor segmentation (BraTS2021 dataset [22]), and detection of anterior cruciate ligament tears (MR-Net dataset [3]). The division of training and testing data is shown in Tab. 1. Our $\mathrm{E}^2\mathrm{PA}$ is based on Pytorch with the Adam optimization. The encoders are same as U-net [24]. All experiments are performed on a single NVIDIA TITAN RTX GPU. The metrics of Dice [6] and Area Under Curve (AUC) are utilized for segmentation and classification performance evaluation, respectively. More details of experiments are presented in Supplementary.
|
| 166 |
+
|
| 167 |
+
# 4.1 Main results
|
| 168 |
+
|
| 169 |
+
For different downstream tasks, various state-of-the-art multi-modality MRI methods are adopted for comparison. For segmentation task (MyoPS and BraTS): AWSNet [30], MyoPS-Net [23], NestedFormer [36], HyperDense-Net [7], MAML [41], and MMSNet [45]. For classification task (MRNet): TransMed [5], MRNet [3], ELNet [26], and MRPyrNet [9].
|
| 170 |
+
|
| 171 |
+
Table 2: The quantitative results on BraTS and MyoPS reveal the superior ability of our $\mathrm{E}^2\mathrm{PA}$ on multi-modality MRI segmentation.
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="4">BraTS%</td><td colspan="6">MyoPS%</td></tr><tr><td>TC</td><td>ET</td><td>WT</td><td>AVG</td><td>scar</td><td>edema</td><td>LV</td><td>RV</td><td>MYO</td><td>AVG</td></tr><tr><td>HyperDense-Net</td><td>84.1</td><td>80.3</td><td>87.1</td><td>83.8</td><td>57.3</td><td>68.6</td><td>93.1</td><td>87.8</td><td>77.9</td><td>76.9</td></tr><tr><td>MAML</td><td>86.9</td><td>85.4</td><td>89.9</td><td>87.4</td><td>61.1</td><td>70.9</td><td>93.3</td><td>89.9</td><td>79.3</td><td>78.9</td></tr><tr><td>MMSNet</td><td>83.3</td><td>82.1</td><td>88.4</td><td>84.6</td><td>60.5</td><td>73.6</td><td>94.1</td><td>89.3</td><td>83.8</td><td>80.3</td></tr><tr><td>AWSNet</td><td>87.0</td><td>86.6</td><td>92.8</td><td>88.8</td><td>61.1</td><td>72.3</td><td>92.8</td><td>88.2</td><td>81.4</td><td>79.2</td></tr><tr><td>NestedFormer</td><td>88.4</td><td>85.1</td><td>91.3</td><td>88.3</td><td>62.0</td><td>73.1</td><td>93.9</td><td>89.9</td><td>84.7</td><td>80.7</td></tr><tr><td>MyoPS-Net</td><td>90.1</td><td>81.1</td><td>89.3</td><td>86.8</td><td>63.4</td><td>74.0</td><td>94.0</td><td>92.0</td><td>86.1</td><td>81.9</td></tr><tr><td>Ours</td><td>91.0</td><td>87.3</td><td>93.5</td><td>90.6</td><td>64.7</td><td>73.9</td><td>94.4</td><td>91.1</td><td>87.0</td><td>82.2</td></tr></table>
|
| 174 |
+
|
| 175 |
+
BraTS: The experimental results for brain tumor segmentation from four modalities MRI (T1c, T1n, T2f, T2w) evaluate the superiority of aggregation. The targets contain tumor core (TC), enhancing tumor (ET) and whole tumor (WT). Quantitative: It can be observed from Tab. 2 that HyperDense-Net achieves the lowest performance on each tissue (84.1%, 80.3%, and 87.1%). This indicates that the specifically designed fusion modules in the network will be more effective than the direct feature concatenating (HyperDense-Net). Our $\mathrm{E}^2\mathrm{PA}$ achieves the highest Dice score $90.6\%$ , and this indicates that the proposed multi-modality MRI aggregation is superior to others. The lower Dice score on ET than on other targets (WT, TC) indicates the ET is difficult to segment. The highest Dice score of our $\mathrm{E}^2\mathrm{PA}$ on ET (87.3%) proves the ability for multi-modality aggregation. Qualitative: The qualitative analysis on brain MRI
|
| 176 |
+
|
| 177 |
+
evaluates the significance on various regions. From Fig. 6, it can be found that: The core of tumor (red) can be well detected in all methods. This indicates that these multi-modality methods could recognize the significant tumor feature. For the enhance (green) and edema (blue) regions of tumor, our $\mathrm{E}^2\mathrm{PA}$ achieves the best performance. This indicates that the tumor information is well aggregated. The balance performance on different tumor regions also proves that $\mathrm{E}^2\mathrm{PA}$ can obtain the representations from multi-modality MRI better than others.
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Fig. 6: The framework of FTP: (a) Task-aware memory network stores the mapping (task identity to model weights) by the hypernetwork to avoid catastrophic forgetting. (b) Adaptive prototype matching aggregates the prototypes for continual optimization on heterogeneous streams.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
|
| 184 |
+
MyoPS: The experimental results The targets contain scar, edema, left ventricle (LV), right ventricle (RV) and myocardium (MYO). Quantitative: The quantitative results on the segmentation from multi-modality MRI (LGE, T2, cine) evaluate the superiority of $\mathrm{E}^2\mathrm{PA}$ . For the regions of scar, LV, MYO, and average, our $\mathrm{E}^2\mathrm{PA}$ achieves the best Dice score (64.7%, 94.4%, 87% and 82.2%). This indicates the aggregation of $\mathrm{E}^2\mathrm{PA}$ is effective for cardiac MRI. In the regions of edema and RV, our $\mathrm{E}^2\mathrm{PA}$ achieves similar performance with MyoPS-Net. MyoPS-Net relies on various combinations in representation and aggregation for each target region segmentation. The similar results also prove that $\mathrm{E}^2\mathrm{PA}$ is effective for multi-modality MRIaggregation. Qualitative: The qualitative analysis on cardiac MRI evaluates the significance on different regions. In Fig. 6, the edema (green) and scar (red) regions are more difficult to segment than LV (yellow) & RV (pink) & MYO (blue). $\mathrm{E}^2\mathrm{PA}$ achieves fine-grained segmentation on these regions. This indicates its superiority on achieving target-related information from multi-modality. Since the scar and edema are on the MYO, the best segmentation of $\mathrm{E}^2\mathrm{PA}$ also proves that the significance of different regions in different modalities is well aggregated.
|
| 185 |
+
|
| 186 |
+
MRNet dataset: Our $\mathrm{E}^2\mathrm{PA}$ achieves superior classification performance on multi-modality knee MRI. The state-of-the-art classification methods for the classification of anterior cruciate ligament tears on MRNet dataset are compared, including TransMed [5], MRNet [3], ELNet [26], and MRPyrNet [9]. Our $\mathrm{E}^2\mathrm{PA}$
|
| 187 |
+
|
| 188 |
+
Table 3: The superior performance of $\mathrm{E}^2\mathrm{{PA}}$ on classification from multi-modality knee MRI. MRPyrNet is embedded into MRNet (method) and ELNet respectively (Abn-Abnormal, Men-Meniscal).
|
| 189 |
+
|
| 190 |
+
<table><tr><td>AUC</td><td>MRNet</td><td>ELNet</td><td>MRPyrNet (MRNet)</td><td>MRPyrNet (ELNet)</td><td>TransMed</td><td>Ours</td></tr><tr><td>Abn</td><td>93.0%</td><td>93.7%</td><td>93.1%</td><td>94.0%</td><td>95.8%</td><td>97.8%</td></tr><tr><td>ACL</td><td>95.1%</td><td>94.9%</td><td>96.0%</td><td>95.7%</td><td>96.3%</td><td>97.5%</td></tr><tr><td>Men</td><td>83.3%</td><td>86.8%</td><td>89.3%</td><td>89.1%</td><td>92.3%</td><td>94.4%</td></tr></table>
|
| 191 |
+
|
| 192 |
+
achieves $2\%$ , $1.2\%$ , and $2.1\%$ higher AUC in the classification of abnormal, ACL tear, and meniscal tear (Tab. 3). This indicates that the energy-induced aggregation of $\mathrm{E}^2\mathrm{PA}$ provides a better representation of multi-modality MRI for the classification task than other multi-modality analysis methods. Compared with the ELNet and MRPyrNet, which utilize clinical knowledge to locate anomalies as priors, our $\mathrm{E}^2\mathrm{PA}$ achieves better performance through the optimization of the energy functions and the classification label guided loss.
|
| 193 |
+
|
| 194 |
+
Table 4: The ablation study indicates the contributions of different modules in $\mathrm{E}^{2}\mathrm{{PA}}$ .
|
| 195 |
+
|
| 196 |
+
<table><tr><td rowspan="3">EHF Attention Fusion</td><td colspan="3">ESA Alignment</td><td>Dice</td></tr><tr><td>Li-d</td><td>√</td><td>√</td><td>90.6%</td></tr><tr><td>√</td><td>√</td><td>√</td><td>88.1%</td></tr><tr><td>√</td><td>√</td><td></td><td>√</td><td>81.0%</td></tr><tr><td>√</td><td></td><td>√</td><td>√</td><td>86.5%</td></tr><tr><td>√</td><td>√</td><td>√</td><td></td><td>83.1%</td></tr></table>
|
| 197 |
+
|
| 198 |
+
# 4.2 Model analysis
|
| 199 |
+
|
| 200 |
+
To further analyze the proposed $\mathrm{E}^2\mathrm{PA}$ , we design ablation study, inter-dependencies analysis, and consistency of information flow analysis on BraTS and MyoPS datasets.
|
| 201 |
+
|
| 202 |
+
Ablation study. To evaluate the contribution of each module in $\mathrm{E}^2\mathrm{PA}$ , different ablation strategies are designed for comparison on BraTS dataset. $\mathrm{E}^2\mathrm{PA}$ contains EHF (attention fusion and $\mathcal{L}_{i - d}$ ) and ESA (Alignment and $\mathcal{L}_r$ ). It can be found that each module of $\mathrm{E}^2\mathrm{PA}$ is effective for multi-modality MRI segmentation (Tab. 4). The attention fusion module and $\mathcal{L}_{i - d}$ bring $2.5\%$ and $4.1\%$ improvements on Dice score. This indicates that the energy-guided interdependencies quantification can further improve the aggregation. The alignment and $\mathcal{L}_r$ brings $9.6\%$ and $7.5\%$ improvements. The QR decomposition-based alignment and energy-regularized inherent information can further improve the consistency of information flow.
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Hierarchical Representations (aligned)
|
| 206 |
+
Fig. 7: The evaluation of the quantification of inter-dependencies. The visual representations reveal the inter-dependencies in aggregation. The hierarchical representations are aligned.
|
| 207 |
+
|
| 208 |
+
Inter-dependencies. To analyze the quantification of inter-dependencies, the representations of different modalities and aggregation are visualized. From Fig. 7, different regions of interest are shown in various modalities of cardiac MRI. In cine, the information of LV, RV, and MYO are obvious in hierarchical representations. In LGE, RV & LV & scar regions can be observed. In T2, RV and edema regions are obvious. The hierarchical aggregations of our $\mathrm{E}^2\mathrm{PA}$ contain all the target-related regions from multi-modality MRI. Hence, the interdependencies among the three modalities can be quantified that: i) LV segmentation is related to LGE & cine; ii) RV segmentation is related to LGE & cine & T2; iii) MYO segmentation is related to cine only; iv) scar information is from LGE; v) edema information is from T2. This also reveals that $\mathrm{E}^2\mathrm{PA}$ has the ability to quantify the inter-dependencies among multi-modality MRI. More inter-dependencies are shown in Supplementary.
|
| 209 |
+
|
| 210 |
+
Consistency of information flow. To analyze the consistency of information flow in the aggregation, the residuals between aggregation representations ( $f1 - f4$ ) and multi-modality representations ( $c1 - c4$ , $l1 - l4$ , $t1 - t4$ ) & aligned representations ( $c1_a - C4_a$ , $l1_a - l4_a$ , $t1_a - t4_a$ ). From Fig. 8, the residual representation between aggregation and LGE is that: i) The less LV & RV & scar representations in the residual reveals that this information in aggregation is from LGE. The consistent information is maintained by $\mathrm{E}^2\mathrm{PA}$ . ii) The aligned representation $l1_a$ has less residual with aggregation $f1$ than $l1$ . This reveals that the alignment in ESA promotes the measurement of consistency in information flow in aggregation.
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Fig. 8: The residual reveals the consistency of information flow in aggregation, and the essential alignment in $\mathrm{E}^2\mathrm{PA}$ .
|
| 214 |
+
|
| 215 |
+
# 5 Conclusion
|
| 216 |
+
|
| 217 |
+
In this paper, we propose an energy-induced Propagation and Alignment (E²PA) to explicitly quantify the inter-dependencies by hierarchical same energy among patients (EHF) and measure the consistency of information flow (ESA). The novel aggregation prototype optimizes the properties of multi-modality MRI aggregation to adapt to different scenarios. Through the extensive experiments on 3 public multi-modality MRI datasets (with different modality combinations and tasks), the superiority of E²PA can be demonstrated from the comparison with state-of-the-art methods. It will greatly boost the performance of downstream clinical diagnostic tasks.
|
| 218 |
+
|
| 219 |
+
Acknowledgments: This work was supported by Ministry of Education Tier 1 Start up grant, NUS, Singapore (A-8001267-01-00). We thank the Big Data Computing Center of Southeast University for providing the facility support.
|
| 220 |
+
|
| 221 |
+
# References
|
| 222 |
+
|
| 223 |
+
1. Bakhtin, A., Deng, Y., Gross, S., Ott, M., Ranzato, M., Szlam, A.: Residual energy-based models for text. The Journal of Machine Learning Research 22(1), 1840-1880 (2021) 3, 5
|
| 224 |
+
2. Baltrusaitis, T., Ahuja, C., Morency, L.P.: Multimodal machine learning: A survey and taxonomy. IEEE transactions on pattern analysis and machine intelligence 41(2), 423-443 (2018) 4
|
| 225 |
+
3. Bien, N., Rajpurkar, P., Ball, R.L., Irvin, J., Park, A., Jones, E., Bereket, M., Patel, B.N., Yeom, K.W., Shpanskaya, K., et al.: Deep-learning-assisted diagnosis for knee magnetic resonance imaging: development and retrospective validation of mrnet. PLoS medicine 15(11), e1002699 (2018) 2, 10, 11
|
| 226 |
+
4. Dai, Y., Gieseke, F., Oehmcke, S., Wu, Y., Barnard, K.: Attentional feature fusion. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. pp. 3560-3569 (2021) 6
|
| 227 |
+
5. Dai, Y., Gao, Y., Liu, F.: Transmed: Transformers advance multi-modal medical image classification. Diagnostics 11(8), 1384 (2021) 10, 11
|
| 228 |
+
6. Dice, L.R.: Measures of the amount of ecologic association between species. Ecology 26(3), 297-302 (1945) 10
|
| 229 |
+
7. Dolz, J., Gopinath, K., Yuan, J., Lombaert, H., Desrosiers, C., Ayed, I.B.: Hyperdense-net: a hyper-densely connected cnn for multi-modal image segmentation. IEEE transactions on medical imaging 38(5), 1116-1126 (2018) 10
|
| 230 |
+
8. Du, Y., Mordatch, I.: Implicit generation and modeling with energy based models. Advances in Neural Information Processing Systems 32 (2019) 5
|
| 231 |
+
|
| 232 |
+
9. Dunnhofer, M., Martinel, N., Micheloni, C.: Improving mri-based knee disorder diagnosis with pyramidal feature details. In: Medical Imaging with Deep Learning. pp. 131-147. PMLR (2021) 10, 11
|
| 233 |
+
10. Gander, W.: Algorithms for the qr decomposition. Res. Rep 80(02), 1251-1268 (1980) 4, 8
|
| 234 |
+
11. Havaei, M., Guizard, N., Chapados, N., Bengio, Y.: Hemis: Hetero-modal image segmentation. In: Medical Image Computing and Computer-Assisted Intervention-MICCAI 2016: 19th International Conference, Athens, Greece, October 17-21, 2016, Proceedings, Part II 19. pp. 469-477. Springer (2016) 2
|
| 235 |
+
12. Joseph, K., Khan, S., Khan, F.S., Anwer, R.M., Balasubramanian, V.N.: Energy-based latent aligner for incremental learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7452-7461 (2022) 3, 5
|
| 236 |
+
13. Kamnitsas, K., Baumgartner, C., Ledig, C., Newcombe, V., Simpson, J., Kane, A., Menon, D., Nori, A., Criminisi, A., Rueckert, D., et al.: Unsupervised domain adaptation in brain lesion segmentation with adversarial networks. In: Information Processing in Medical Imaging: 25th International Conference, IPMI 2017, Boone, NC, USA, June 25-30, 2017, Proceedings 25. pp. 597-609. Springer (2017) 4
|
| 237 |
+
14. LeCun, Y., Chopra, S., Hadsell, R., Ranzato, M., Huang, F.: A tutorial on energy-based learning. Predicting structured data 1(0) (2006) 5, 7, 9
|
| 238 |
+
15. Li, F., Li, W.: Dual-path feature aggregation network combined multi-layer fusion for myocardial pathology segmentation with multi-sequence cardiac mr. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MIC-CAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 146–158. Springer (2020) 2
|
| 239 |
+
16. Li, L., Wu, F., Wang, S., Luo, X., Martin-Isla, C., Zhai, S., Zhang, J., Liu, Y., Zhang, Z., Ankenbrand, M.J., et al.: Myops: A benchmark of myocardial pathology segmentation combining three-sequence cardiac magnetic resonance images. Medical Image Analysis 87, 102808 (2023) 2, 10
|
| 240 |
+
17. Li, S., Du, Y., van de Ven, G., Mordatch, I.: Energy-based models for continual learning. In: Conference on Lifelong Learning Agents. pp. 1-22. PMLR (2022) 5
|
| 241 |
+
18. Li, W., Wang, L., Qin, S.: Cms-unet: Cardiac multi-task segmentation in mri with a u-shaped network. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 92–101. Springer (2020) 2
|
| 242 |
+
19. Liu, W., Wang, X., Owens, J., Li, Y.: Energy-based out-of-distribution detection. Advances in neural information processing systems 33, 21464-21475 (2020) 5
|
| 243 |
+
20. Liu, Y., Zhang, M., Zhan, Q., Gu, D., Liu, G.: Two-stage method for segmentation of the myocardial scars and edema on multi-sequence cardiac magnetic resonance. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 26-36. Springer (2020) 2
|
| 244 |
+
21. Martín-Isla, C., Asadi-Aghbolaghi, M., Gkontra, P., Campello, V.M., Escalera, S., Lekadir, K.: Stacked bcdu-net with semantic cmr synthesis: Application to myocardial pathology segmentation challenge. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 1-16. Springer (2020) 4
|
| 245 |
+
|
| 246 |
+
22. Menze, B.H., Jakab, A., Bauer, S., Kalpathy-Cramer, J., Farahani, K., Kirby, J., Burren, Y., Porz, N., Slotboom, J., Wiest, R., et al.: The multimodal brain tumor image segmentation benchmark (brats). IEEE transactions on medical imaging 34(10), 1993-2024 (2014) 2, 10
|
| 247 |
+
23. Qiu, J., Li, L., Wang, S., Zhang, K., Chen, Y., Yang, S., Zhuang, X.: Myops-net: Myocardial pathology segmentation with flexible combination of multi-sequence cmr images. Medical Image Analysis 84, 102694 (2023) 2, 10
|
| 248 |
+
24. Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation. In: Medical Image Computing and Computer-Assisted Intervention-MICCAI 2015: 18th International Conference, Munich, Germany, October 5-9, 2015, Proceedings, Part III 18. pp. 234-241. Springer (2015) 10
|
| 249 |
+
25. Tonin, F., Pandey, A., Patrinos, P., Suykens, J.A.: Unsupervised energy-based out-of-distribution detection using stiefel-restricted kernel machine. In: 2021 International Joint Conference on Neural Networks (IJCNN). pp. 1-8. IEEE (2021) 3, 5
|
| 250 |
+
26. Tsai, C.H., Kiryati, N., Konen, E., Eshed, I., Mayer, A.: Knee injury detection using mri with efficiently-layered network (elnet). In: Medical Imaging with Deep Learning. pp. 784-794. PMLR (2020) 10, 11
|
| 251 |
+
27. Tu, L., Gimpel, K.: Learning approximate inference networks for structured prediction. arXiv preprint arXiv:1803.03376 (2018) 5
|
| 252 |
+
28. Valverde, S., Cabezas, M., Roura, E., González-Villà, S., Pareto, D., Vilanova, J.C., Ramíó-Torrentà, L., Rovira, Å., Oliver, A., Llado, X.: Improving automated multiple sclerosis lesion segmentation with a cascaded 3d convolutional neural network approach. NeuroImage 155, 159-168 (2017) 4
|
| 253 |
+
29. Vielzeuf, V., Lechery, A., Pateux, S., Jurie, F.: Centralnet: a multilayer approach for multimodal fusion. In: Proceedings of the European Conference on Computer Vision (ECCV) Workshops. pp. 0-0 (2018) 4
|
| 254 |
+
30. Wang, K.N., Yang, X., Miao, J., Li, L., Yao, J., Zhou, P., Xue, W., Zhou, G.Q., Zhuang, X., Ni, D.: Awsnet: An auto-weighted supervision attention network for myocardial scar and edema segmentation in multi-sequence cardiac magnetic resonance images. Medical Image Analysis 77, 102362 (2022) 2, 4, 10
|
| 255 |
+
31. Wang, L., Shi, F., Gao, Y., Li, G., Gilmore, J.H., Lin, W., Shen, D.: Integration of sparse multi-modality representation and anatomical constraint for isointense infant brain mr image segmentation. NeuroImage 89, 152-164 (2014) 4
|
| 256 |
+
32. Wang, L., Shi, F., Lin, W., Gilmore, J.H., Shen, D.: Automatic segmentation of neonatal images using convex optimization and coupled level sets. NeuroImage 58(3), 805-817 (2011) 4
|
| 257 |
+
33. Xiao, X., Zhao, J., Li, S.: Task relevance driven adversarial learning for simultaneous detection, size grading, and quantification of hepatocellular carcinoma via integrating multi-modality mri. Medical Image Analysis 81, 102554 (2022) 2, 4
|
| 258 |
+
34. Xie, B., Yuan, L., Li, S., Liu, C.H., Cheng, X., Wang, G.: Active learning for domain adaptation: An energy-based approach. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 36, pp. 8708-8716 (2022) 5
|
| 259 |
+
35. Xie, J., Lu, Y., Zhu, S.C., Wu, Y.: A theory of generative convnet. In: International Conference on Machine Learning. pp. 2635-2644. PMLR (2016) 5
|
| 260 |
+
36. Xing, Z., Yu, L., Wan, L., Han, T., Zhu, L.: Nestedformer: Nested modality-aware transformer for brain tumor segmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 140-150. Springer (2022) 10
|
| 261 |
+
|
| 262 |
+
37. Zhai, S., Gu, R., Lei, W., Wang, G.: Myocardial edema and scar segmentation using a coarse-to-fine framework with weighted ensemble. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 49-59. Springer (2020) 4
|
| 263 |
+
38. Zhang, D., Huang, G., Zhang, Q., Han, J., Han, J., Wang, Y., Yu, Y.: Exploring task structure for brain tumor segmentation from multi-modality mr images. IEEE Transactions on Image Processing 29, 9032-9043 (2020) 2, 4
|
| 264 |
+
39. Zhang, J., Xie, Y., Liao, Z., Verjans, J., Xia, Y.: Efficientseg: A simple but efficient solution to myocardial pathology segmentation challenge. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in Conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 17-25. Springer (2020) 2
|
| 265 |
+
40. Zhang, W., Li, R., Deng, H., Wang, L., Lin, W., Ji, S., Shen, D.: Deep convolutional neural networks for multi-modality isointense infant brain image segmentation. NeuroImage 108, 214-224 (2015) 4
|
| 266 |
+
41. Zhang, Y., Yang, J., Tian, J., Shi, Z., Zhong, C., Zhang, Y., He, Z.: Modality-aware mutual learning for multi-modal medical image segmentation. In: Medical Image Computing and Computer Assisted Intervention-MICCAI 2021: 24th International Conference, Strasbourg, France, September 27-October 1, 2021, Proceedings, Part I 24. pp. 589-599. Springer (2021) 10
|
| 267 |
+
42. Zhang, Z., Liu, C., Ding, W., Wang, S., Pei, C., Yang, M., Huang, L.: Multimodality pathology segmentation framework: application to cardiac magnetic resonance images. In: Myocardial Pathology Segmentation Combining Multi-Sequence Cardiac Magnetic Resonance Images: First Challenge, MyoPS 2020, Held in conjunction with MICCAI 2020, Lima, Peru, October 4, 2020, Proceedings 1. pp. 37-48. Springer (2020) 4
|
| 268 |
+
43. Zhao, J., Li, D., Xiao, X., Accorsi, F., Marshall, H., Cossetto, T., Kim, D., McCarthy, D., Dawson, C., Knezevic, S., et al.: United adversarial learning for liver tumor segmentation and detection of multi-modality non-contrast mri. Medical image analysis 73, 102154 (2021) 2, 4
|
| 269 |
+
44. Zhao, Y., Chen, C.: Unpaired image-to-image translation via latent energy transport. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 16418-16427 (2021) 5
|
| 270 |
+
45. Zhou, T., Canu, S., Vera, P., Ruan, S.: 3d medical multi-modal segmentation network guided by multi-source correlation constraint. In: 2020 25th International Conference on Pattern Recognition (ICPR). pp. 10243-10250. IEEE (2021) 10
|
energyinducedexplicitquantificationformultimodalitymrifusion/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e91d150e537e1249c555f830e7900e8ad0ccb7bd01d8445fb6263c4fcb4fc443
|
| 3 |
+
size 558608
|
energyinducedexplicitquantificationformultimodalitymrifusion/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71c1853bd7439513d1b1e60b4e1348da560c6fa2ebb299878184957a4033743d
|
| 3 |
+
size 437794
|
enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdaf987027c6cf70980f61c562224a9c7fd3971557d66897857503e130f61870
|
| 3 |
+
size 74113
|
enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16592c1931573f4131a34c39fbecc4ec30b30b50fe195562e932d2da68f07186
|
| 3 |
+
size 91470
|
enhancedmotionforecastingwithvisualrelationreasoning/ab9928e3-6039-489b-beb7-bb14c2628c95_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8dfc823151b0df83d33689d50dec89e4b6772f77a2d7bef5bf82cebdc69463f6
|
| 3 |
+
size 1355585
|
enhancedmotionforecastingwithvisualrelationreasoning/full.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Enhanced Motion Forecasting with Visual Relation Reasoning
|
| 2 |
+
|
| 3 |
+
Sungjune $\mathrm{Kim}^{1}$ , Hadam Baek $^{1}$ , Seunggwan Lee $^{1}$ , Hyung-gun Chi $^{2}$ , Hyerin Lim $^{3}$ , Jinkyu Kim $^{1*}$ , and Sangpil Kim $^{1*}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Korea University $^{2}$ Purdue University $^{3}$ Hyundai Motor Company
|
| 6 |
+
|
| 7 |
+
Abstract. In this work, we emphasize and demonstrate the importance of visual relation learning for motion forecasting task in autonomous driving (AD). Since exploiting the benefits of RGB images in the existing vision-based joint perception and prediction (PnP) networks is limited in the perception stage, we delve into how the explicit utilization of the visual semantics in motion forecasting can enhance its performance. Specifically, this work proposes ViRR(Visual Relation Reasoning), which aims to provide the prediction module with complex visual reasoning of relationships among scene agents. To achieve this, we construct a novel visual scene graph, where the pairwise visual relations are first aggregated as each agent's node feature. Then, the relations of the nodes are learned via higher-order relation reasoning method, which leverages the consecutive powers of the graph adjacency matrix. As a result, the extracted complex visual interrelations between the scene agents enable precise forecasting and provide explainable reasons for the model prediction. The proposed module is fully differentiable and thus can be easily applied to any existing vision-based PnP networks. We evaluate the motion forecasting performance of ViRR with challenging nuScenes benchmark and demonstrate its high necessity.
|
| 8 |
+
|
| 9 |
+
Keywords: Autonomous Driving $\cdot$ Motion Forecasting
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
It is a recent trend in the field of autonomous driving (AD) to jointly optimize the perception and prediction sub-tasks in an end-to-end manner [10,24,35]. The idea is to perform prediction based on the outputs of the perception stage and to optimize the whole parameters with a single back-propagation. Especially, vision-based approaches are gaining attention for several reasons: (1) They provide rich contextual information that can be easily interpreted by humans; (2) the cost of deployment is more efficient compared to LiDAR or RADAR sensors.
|
| 14 |
+
|
| 15 |
+
However, the usage of the visual features in the existing vision-based perception and prediction (PnP) methods [10, 15] is limited in the perception stage. They mainly follow the Transformer [34] based detection and tracking architectures and abstract the visual perceptions in a query form, which operates as the
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Fig. 1: Our proposed ViRR (Visual Relation Reasoning) can be flexibly attached to the existing vision-based joint perception and prediction pipelines. ViRR reasons about the complex visual relations of the road agents, which we prove is crucial for accurate and precise motion forecasting. Best viewed in color.
|
| 19 |
+
|
| 20 |
+
core component of the PnP pipeline. Although simple and informative, we argue that these queries should also contain the visual interrelations of the agents for enhanced downstream motion forecasting task.
|
| 21 |
+
|
| 22 |
+
Understanding the relations of the road agents in the visual space is crucial for motion forecasting in AD for a couple of reasons. First, the motion or the trajectories of the agents are easily susceptible to external factors, and the interactions between them are undoubtedly the most dominant ones [13]. Therefore, interpreting the visual relations (e.g. next to, behind, and in front of) can provide the model with detailed structures of the road environment. Furthermore, just as how humans predict the future motions, training the model to learn the visual relations of the surroundings can produce more reasonable predictions with increased explainability.
|
| 23 |
+
|
| 24 |
+
Therefore, we propose ViRR (Visual Relation Reasoning), which learns the complex visual relations between diverse road agents. First, we reformulate the visual scene representation in a graph structure. Since graphs are powerful at relational modeling, it is a strategic choice to model the dynamic connections in the scene as a unified graph network [36,43]. Building upon the established scene graph generation benchmarks [33, 38], we extract the pairwise relation features between the identified agents using the RoIAlign [11] technique. However, our method is innovative in that instead of converting the pairwise relation features as pre-defined edge types, we aggregate these features for each agent, transforming them into a cohesive agent node feature. As a result of this, each agent node in our graph summarizes the local relational semantics and interactions of the agents within the visual space. Furthermore, this transformation frees the model from the constraints of the pre-defined edge types while flexibly learning new visual relations that are relevant in the AD systems.
|
| 25 |
+
|
| 26 |
+
The relations between these node features are then learned through the higher-order relation reasoning technique [19]. The motivation behind this is that human decisions are affected not only by direct and nearing influences but
|
| 27 |
+
|
| 28 |
+
also by socially distant ones. For example, it is a common case in the urban traffic scenario where one pair of interactions affects the nearby agents, and the effect ripples throughout the whole scene. We implement this chaining dynamics by leveraging the consecutive powers of the graph adjacency matrix, which is defined as the reciprocal of the agent distances in the 3D coordinates. Exploiting the fact that the $k$ -th power of the adjacency matrix represents the number of paths of length $k$ between two vertices, we leverage a linear combination method that fuses the node features from diverse degrees in a single graph layer operation.
|
| 29 |
+
|
| 30 |
+
The module is designed to be fully differentiable, enabling a flexible fusion with the existing PnP methods. Figure 1 illustrates the general concept of our proposed method. Using the challenging nuScenes [2] benchmark, we demonstrate the benefits of ViRR by applying it to the existing models. We provide an in-depth analysis of how our proposed model can significantly enhance motion forecasting performance both quantitatively and qualitatively, demonstrating the importance of visual understanding for motion forecasting.
|
| 31 |
+
|
| 32 |
+
In summary, the main contributions of this work are listed as follows:
|
| 33 |
+
|
| 34 |
+
- We demonstrate the importance of explicit utilization of visual semantics in motion forecasting, which has been overlooked in the existing vision-based joint perception and prediction methods.
|
| 35 |
+
- We propose an innovative visual scene graph architecture that extracts pairwise visual relations of road agents and learns higher-order connectivity in the visual space of autonomous vehicles.
|
| 36 |
+
- Our method enhances the motion forecasting performance and provides a solid baseline for further research on the visual understanding for motion forecasting.
|
| 37 |
+
|
| 38 |
+
# 2 Related Work
|
| 39 |
+
|
| 40 |
+
# 2.1 Joint Perception and Prediction
|
| 41 |
+
|
| 42 |
+
Joint optimization of perception and prediction (PnP) stands as a pivotal area of research in the recent field of autonomous driving. Unlike the standalone modules [26,29,31,42] or multi-task approaches [3,28,30], joint PnP has the advantage of alleviating uncertainties and error propagation. Early works such as FaF [24] and IntentNet [4] use LiDAR sensor data as input modality and demonstrate the benefits of joint optimization over standalone modules using convolutional neural networks. PnPNet [22] brings tracking into the loop and takes advantage of the temporal contexts. FIERY [14] first introduces an end-to-end prediction module using bird's-eye view from surrounding monocular cameras. Recent works such as ViP3D [10] and UniAD [15] are also vision-based PnP methods, that leverage queries as the principle component of the pipeline, which makes them fully differentiable. The main goal of this work is to enhance the motion forecasting performance in these vision-based PnP models, by reasoning about the agent relations in the visual space.
|
| 43 |
+
|
| 44 |
+
# 2.2 Scene Graph Generation
|
| 45 |
+
|
| 46 |
+
Scene Graph Generation (SGG) is gaining significant attention in the computer vision field for its potential in various visual reasoning tasks [5,6,16,17,21,39]. Xu et al [37] first introduce an end-to-end model that generates a structured scene representation from an input image. Zellers et al. [40] analyze the role of motifs in SGG. Then, Tang et al. [33] address the bias issue in SGG and use a total direct effect to resolve the problem. Recently in SQUAT [18], the authors introduce a quad attention module, which selectively utilizes valid edges to remove uncertainties from invalid edges. These methods commonly score the pairwise visual relations and assign a relation type within pre-defined predicate labels. However, we transform this process and preserve the rich visual relation features, freeing the model from the predicate constraints.
|
| 47 |
+
|
| 48 |
+
# 3 Preliminaries
|
| 49 |
+
|
| 50 |
+
# 3.1 Vision-based Perception Stage
|
| 51 |
+
|
| 52 |
+
In our work, we follow the perception stage of the mainstream vision-based joint PnP methods and extract the following information for our visual relation reasoning. Note that for simplicity, the notations throughout this work are based on a single-view image only, unless otherwise stated.
|
| 53 |
+
|
| 54 |
+
Multi-view Image Feature Maps. In each scene, a set of images $\mathcal{I} = \{\mathcal{I}_t\}_{t = -T}^0$ containing the $T$ previous sequence of images up to the current timestamp are fed as the perception stage input. Then, the convolutional neural network (e.g. ResNet-50 [12]), followed by the feature pyramid network [23] extracts the 2D image feature maps $F = \{F_{t}\}_{t = -T}^{0}$ for each image in $\mathcal{I}$ . For our visual relation reasoning, we utilize the feature maps of the current timestamp $F_{0}$ , and further denote it as $F$ for simplicity.
|
| 55 |
+
|
| 56 |
+
3D Bounding Boxes. The detection heads in the perception stage identify the road agents at each timestamp $t$ . These results are annotated as 3D bounding boxes, which can be denoted as $\hat{\mathcal{B}} = \{\{\hat{B}_t^n\}_{n=1}^{N_t}\}_{t=-T}^0$ , where $N_t$ is the total number of detected agents at timestamp $t$ . Then, these agents are traced by the multi-agent object tracking modules throughout the observed image frames and we denote the 3D bounding boxes of the final $N$ tracked agents as $\hat{\mathcal{B}} = \{\hat{B}^n\}_{n=1}^N$ .
|
| 57 |
+
|
| 58 |
+
# 3.2 Graph Convolutional Networks
|
| 59 |
+
|
| 60 |
+
Given a graph $G = (V, E)$ with $V$ and $E$ as a set of nodes and edges, respectively, a single layer of graph convolutional network [20] can be formulated as follows:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\mathbf {X} ^ {(l + 1)} = \sigma (\hat {\mathbf {A}} \mathbf {X} ^ {(l)} \mathbf {W} ^ {(l)}), \tag {1}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\mathbf{X} \in \mathbb{R}^{|V| \times d}$ is a $d$ -dimensional feature matrix of the nodes, $\hat{\mathbf{A}} = \mathbf{D}^{-\frac{1}{2}}(\mathbf{A} + \mathbf{I})\mathbf{D}^{-\frac{1}{2}}$ is a symmetrically normalized adjacency matrix of $\mathbf{A}$ , $\mathbf{W} \in \mathbb{R}^{d \times d'}$ is a trainable weight matrix and $\sigma(\cdot)$ is an activation function. ViRR adopts this
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Fig. 2: The overall architecture of ViRR. First, we take the 3D bounding boxes and convert them into 2D. Then we pair the agents based on the 3D distance threshold, and extract the pairwise visual relation features, which we use as the node features of the graph. Lastly, the relations of these nodes are learned with our higher-order relation reasoning method. Best viewed in color.
|
| 70 |
+
|
| 71 |
+
concept to learn the visual relational semantics of the road agents. The specific design of the feature matrix, the adjacency matrix, and the higher-order message passing mechanism will be introduced in the following section.
|
| 72 |
+
|
| 73 |
+
# 4 ViRR: Visual Relation Reasoning
|
| 74 |
+
|
| 75 |
+
In this section, we explain our proposed ViRR in more detail. From a broad perspective, ViRR is a graph learning paradigm. Therefore, we first introduce a pairwise visual relation extraction method, where we obtain the node features. Then, we explain our higher-order relation learning method and elaborate on how the higher-order visual reasoning is achieved in the graph. The overall process is illustrated in Figure 2.
|
| 76 |
+
|
| 77 |
+
# 4.1 Visual Relation Extraction
|
| 78 |
+
|
| 79 |
+
3D to 2D Image Plane Mapping. We locate the 3D bounding box coordinates onto the corresponding image view using camera parameters. Then, we convert the 3D boxes into 2D, where lines are drawn to tightly fit the 3D box in the image plane. The 2D bounding boxes for each agent in the image are denoted as $\mathcal{B} = \{\mathcal{B}^m\}_{m=1}^M$ , where $M$ is the total number of agents in the camera view.
|
| 80 |
+
|
| 81 |
+
3D Distance-based Pairing. We set a distance threshold $\theta$ based on the center points of the agents' 3D bounding boxes to identify pairs that have the potential to influence the motion of one another. Then, within the camera view, we find the agent pairs of which we extract the visual relation features. In a multi-view camera setting, it is possible that the pair can be found in a different camera view. Even though the visual relations couldn't be captured in these cases, our graph adjacency is designed to connect the whole surrounding scenes based on 3D distance, so that the relations of the nearby agents in different camera views can all be taken into account. This will be explained in more detail in Sec 4.2.
|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
Fig. 3: The visual relations are captured between the agents within the same camera view, but this information is designed to propagate beyond the camera views in our graph. For example, the red and blue agents are in the threshold radius of the orange agent. Even though the red agent is in a different camera view from the orange agent, the overall relations are shared in the graph. Best viewed in color.
|
| 85 |
+
|
| 86 |
+
Pairwise Visual Relation Extraction. Motivated by the relation learning methods in the existing scene graph benchmark [33], we utilize the RoIAlign [11] technique to extract the pairwise visual relation features. In scene graph benchmarks, these features pass a softmax function and are converted to pre-defined edge types between the pair. However, we introduce a novel twist, where we aggregate the pairwise features per agent, transforming them into the agent node feature. For example, the aggregated visual relation feature $\mathbf{v}$ of a single agent $n$ can be formulated as:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathbf {v} _ {n} = \frac {\sum_ {m \in \mathcal {N} (n)} \mathcal {R} \left(F , \mathcal {B} ^ {n} , \mathcal {B} ^ {m}\right)}{| \mathcal {N} (n) |}, \tag {2}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\mathcal{R}$ is the RoIAlign function, which takes the image feature maps $F$ and the bounding box pair as its inputs, and $\mathcal{N}(n)$ denotes the paired neighbors of agent $n$ . We take the average of the aggregated features by dividing the summed value with $|\mathcal{N}(n)|$ , which is the total number of paired agents for agent $n$ . For agents in the overlapping regions, we also take the average between the features from two different camera views.
|
| 93 |
+
|
| 94 |
+
Agent Node Feature. The extracted and aggregated features act as node features in our graph convolution. The initial feature $\mathbf{X}^{(0)}$ can be formulated as:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathbf {X} ^ {(0)} = f \left(\left[ \begin{array}{c} \mathbf {v} _ {1} \\ \vdots \\ \mathbf {v} _ {N} \end{array} \right]\right) \in \mathbb {R} ^ {N \times d}, \tag {3}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $f$ is a linear mapping function, and $d$ is the embedding dimension. The main advantage of this design is that these features encapsulate the rich local relations between the neighboring agents in a visual space. Also, our method
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Fig. 4: The visualization of a single layer process of the higher-order relation learning. First, the multiple orders of GCNs aggregate the influences from the paths of various distances. Then the combination layer combines and distills meaningful features from these relations.
|
| 104 |
+
|
| 105 |
+
can preserve diverse visual relational semantics, unlike constraining them into pre-defined relation types.
|
| 106 |
+
|
| 107 |
+
# 4.2 Higher-order Visual Relation Learning
|
| 108 |
+
|
| 109 |
+
3D Distance-based Adjacency. In this work, the local pairwise visual features within each camera view are developed to propagate globally throughout the entire surrounding scene. This means that the information of the agents obtained in a single camera view can be shared across agents in different view points, enabling a panoramic understanding of the visual scene. The concept is visualized in Figure 3 for clarity. To do so, we construct an adjacency matrix $\mathbf{A} = \{a_{nm}|\forall n,m\in \{1,\dots,N\}\}$ , where the value of $a_{nm}$ is the reciprocal of the distance between the two agents if $n\neq m$ , and $d(n,m) < \theta$ . Here, $d(\cdot ,\cdot)$ denotes the distance between the pairs. Otherwise, the value is set as 0. Hence the pairs in further distance will have a lower weight, and the pairs with closer distance will have a bigger weight. Then, following the normalization technique described in section 3.2, we obtain the final adjacency matrix $\hat{\mathbf{A}}$
|
| 110 |
+
|
| 111 |
+
Higher-order Graph Convolution. Taking the power of the adjacency matrix counts the number of walks of a certain length between pairs of nodes in the graph. We exploit this fact to model higher-order influence between the agents in the scene. First, we make $P$ adjacency matrices in each layer, each of which represents the $p^{th}$ -powers of the adjacency matrix $\hat{\mathbf{A}}$ , where $p \in \{1, \dots, P\}$ . Graph convolution of each matrix with the agent visual relation feature $\mathbf{X}$ computes the $p^{th}$ -order visual influences between the agents:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\mathbf {H} _ {p} ^ {(l)} = \sigma \left(\hat {\mathbf {A}} ^ {p} \mathbf {X} ^ {(l)} \mathbf {W} _ {p} ^ {(l)}\right), \tag {4}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
where $l$ is a layer number and $\mathbf{W}_p^{(l)}$ is a trainable weight that learns the $p^{th}$ -order relations in layer $l$ .
|
| 118 |
+
|
| 119 |
+
Multi-order Feature Combination. We introduce a combination layer, which combines and distills meaningful influences from multiple orders of relations, and
|
| 120 |
+
|
| 121 |
+
pass them to the next graph layer. First, the combination layer concatenates the $P$ higher-order features. Next, it goes through the mixture function, where we utilize multi-layer perceptrons (MLPs) with a non-linear activation function. The described procedure can be formulated as follows:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\mathbf {X} ^ {(l + 1)} = \sigma (\operatorname {M L P} \left(\lambda_ {1} \mathbf {H} _ {1} ^ {(l)} \| \lambda_ {2} \mathbf {H} _ {2} ^ {(l)} \| \dots \| \lambda_ {P} \mathbf {H} _ {P} ^ {(l)}\right)), \tag {5}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $\lambda_{p}$ denotes the trainable scalar weights for the $p^{th}$ -order feature, and $\|\cdot\|$ denotes column concatenation. We let $\sum_{p \in \{1, \dots, P\}} \lambda_{p} = 1$ , so that the layer weighs the influences from different orders. We stack the explained graph convolution and combination layers repeatedly and obtain the final ViRR features for each agent, which are combined with the initial perception stage outputs. The described process is visualized in Figure 4.
|
| 128 |
+
|
| 129 |
+
# 5 Experimental Settings
|
| 130 |
+
|
| 131 |
+
# 5.1 Dataset
|
| 132 |
+
|
| 133 |
+
We use the nuScenes [2] dataset, which is widely employed as a benchmark for autonomous driving in the motion forecasting task. It consists of 1000 driving scenes, each of which lasts for 20 seconds. The data is collected in Boston and Singapore using various types of sensors including RGB cameras, LiDAR and RADAR. Also, it contains 1.4M bounding boxes that exist within the sampled 40k key-frames at 2Hz. Since the dataset has a 360-degree field of view captured from six cameras, it serves a pivotal role in vision-based PnP methods.
|
| 134 |
+
|
| 135 |
+
# 5.2 Evaluation Metrics
|
| 136 |
+
|
| 137 |
+
Motion Forecasting. We use minimum of Average Displacement Error (minADE), minimum of Final Displacement Error (minFDE), and Miss Rate (MR) as the evaluation metrics for motion forecasting. minADE measures the minimum of the average L2 distances between the ground truth and the predicted trajectories. Similarly, minFDE measures the minimum of the L2 distances between the ground truth and the predicted trajectories at the final timestamp. MR represents the ratio of minFDE values that exceed certain a threshold.
|
| 138 |
+
|
| 139 |
+
Detection & Tracking. We measure the detection performance with Average Precision (AP). Tracking performance is reported with Average Multi-object Tracking Accuracy (AMOTA), Average Multi-object Tracking Precision (AMOTP), and Identity Switches (IDS).
|
| 140 |
+
|
| 141 |
+
# 5.3Baselines
|
| 142 |
+
|
| 143 |
+
We examine our method with popular vision-based PnP methods ViP3D [10] and UniAD [15], both of which utilize the concept of queries as the core thread throughout the pipeline. In UniAD, we conduct experiments with two different types of PnP model variation. One jointly optimizes the tracking and motion
|
| 144 |
+
|
| 145 |
+
Table 1: The motion forecasting performance enhancements with our proposed ViRR. Our method noticeably improves the previous baselines, demonstrating the importance of visual relation reasoning for motion forecasting. The abbreviations T, M and Mo in UniAD rows indicate Tracking, Map and Motion Forecasting, respectively. The performance improvement achieved by our proposed method is indicated in bold.
|
| 146 |
+
|
| 147 |
+
<table><tr><td></td><td colspan="3">w/o ViRR</td><td colspan="3">w/ ViRR</td></tr><tr><td></td><td>minADE ↓</td><td>minFDE ↓</td><td>MR ↓</td><td>minADE ↓</td><td>minFDE ↓</td><td>MR ↓</td></tr><tr><td>ViP3D [10]</td><td>2.051</td><td>2.862</td><td>0.244</td><td>1.690 (+17.60%)</td><td>2.075 (+27.50%)</td><td>0.191 (+21.72%)</td></tr><tr><td>UniAD (T+Mo) [15]</td><td>0.749</td><td>1.101</td><td>0.161</td><td>0.684 (+8.68%)</td><td>0.901 (+18.17%)</td><td>0.051 (+68.32%)</td></tr><tr><td>UniAD (T+M+Mo) [15]</td><td>0.732</td><td>1.063</td><td>0.158</td><td>0.628 (+14.20%)</td><td>0.891 (+16.21%)</td><td>0.040 (+74.55%)</td></tr><tr><td>MOTR + CVAE Motion</td><td>0.976</td><td>1.281</td><td>0.188</td><td>0.951 (+2.47%)</td><td>1.381 (+16.16%)</td><td>0.166 (+11.68%)</td></tr></table>
|
| 148 |
+
|
| 149 |
+
forecasting tasks, and the other additionally optimizes map segmentation in the perception stage. Furthermore, we provide a simple vision-based joint perception and prediction (PnP) baseline model to demonstrate the versatility of our proposed method. Specifically, we adopt the perception stage algorithm from MOTR [41] and implement the motion forecasting stage with CVAE [32] algorithm. The CVAE motion decoder mainly consists of three different parts. First, the Recurrent Neural Network (RNN)-based model encodes temporal information of the ground truth future trajectory. This process is only operated in the training step. Second, the CVAE Network transforms the agent features and the encoded ground truth future trajectory features into the probability distributions. The divergence between the two probability distributions is minimized in the training step. This enables the agent features to be guided with the ground truth semantics in the inference step, even without the direct use of the ground truth features. Lastly, the Autoregressive RNN decoder predicts the future trajectories based on the agent features and the latent variables. The details of this architecture are explained in our supplementary material. In all of these baseline models, ViRR resides in between the perception and prediction stages and provides rich visual semantics that enhance the performance of motion forecasting.
|
| 150 |
+
|
| 151 |
+
# 5.4 Implementation Details
|
| 152 |
+
|
| 153 |
+
Our method is implemented with PyTorch [27] and MMCV [7] code base. Since ViRR is an intermediate module between the perception and prediction stages, we mostly follow the hyperparameters from the existing baselines. To solely analyze the performance of motion forecasting, we pre-train the perception stage and freeze it, thereby only training the parameters of ViRR and motion forecasting. However, the result of joint optimization is also provided in Sec. 6.1. We empirically find the optimal value for the distance threshold $\theta$ in between $10m$ and $20m$ in the 3D coordinate. Following the convention, the spatial dimension of the output from the RoIAlign operation is set as $(7\times 7)$ . Lastly, the number of graph convolution layers and the higher-order observation degree per layer is determined in between $\{1,2,3\}$ and $\{1,2,4,8\}$ , respectively. Two layers of graph
|
| 154 |
+
|
| 155 |
+
Table 2: We examine the dependencies between the perception results and the influence of ViRR in motion forecasting. $T$ denotes the number of observation frames. The prediction results are reported in the form of (w/o ViRR $\rightarrow$ w/ ViRR),and the relative improvements in percentage .
|
| 156 |
+
|
| 157 |
+
<table><tr><td></td><td colspan="2">T=1</td><td colspan="2">T=3</td></tr><tr><td>Metrics</td><td>Vehicles</td><td>Pedestrian</td><td>Vehicles</td><td>Pedestrian</td></tr><tr><td>AP ↑</td><td>0.339</td><td>0.461</td><td>0.340</td><td>0.464</td></tr><tr><td>AMOTA ↑</td><td>0.618</td><td>0.436</td><td>0.623</td><td>0.442</td></tr><tr><td rowspan="2">minADE ↓</td><td>0.75 → 0.65</td><td>0.81 → 0.72</td><td>0.73 → 0.62</td><td>0.78 → 0.69</td></tr><tr><td>(+13.33%)</td><td>(+11.11%)</td><td>(+15.07%)</td><td>(+11.54%)</td></tr><tr><td rowspan="2">minFDE ↓</td><td>1.10 → 0.95</td><td>1.11 → 0.97</td><td>1.06 → 0.88</td><td>1.09 → 0.93</td></tr><tr><td>(+13.64%)</td><td>(+12.61%)</td><td>(+16.98%)</td><td>(+14.68%)</td></tr><tr><td rowspan="2">MR ↓</td><td>0.15 → 0.06</td><td>0.13 → 0.05</td><td>0.16 → 0.04</td><td>0.13 → 0.04</td></tr><tr><td>(+60.00%)</td><td>(+61.54%)</td><td>(+75.00%)</td><td>(+69.23%)</td></tr></table>
|
| 158 |
+
|
| 159 |
+
convolutions and four higher-order degrees are used for our architecture which produces the best result.
|
| 160 |
+
|
| 161 |
+
# 6 Experimental Results
|
| 162 |
+
|
| 163 |
+
# 6.1 Quantitative Analysis
|
| 164 |
+
|
| 165 |
+
Prediction Performance Enhancement. As clearly indicated in Table 1, providing the model with visual relation semantics of the road agents with our ViRR consistently enhances the motion forecasting performance throughout all baselines. Specifically, ViRR significantly reduces the errors by $68.32\%$ and $74.55\%$ on MR compared to the UniAD methods. minADE and minFDE are also reduced by a large margin, especially in ViP3D where the metrics are improved by $17.60\%$ and $27.50\%$ respectively. Also, ViRR improves the metrics in our simple custom designed model, which demonstrates the adaptability of ViRR in diverse model environments. The results point out that ViRR is highly necessary for more precise motion forecasting.
|
| 166 |
+
|
| 167 |
+
Relation with Perception Results. We analyze the dependencies between the perception results and the effects of ViRR by comparing the two models with different numbers of observation frames in the perception stage. Typically, larger number of observation frames yields better perception performance. For each agent class, we first report the comparison of the perception results in the upper two rows in Table 2. Then, we relate these results with the effects of ViRR in motion forecasting. The results show that better perception enhances ViRR in both agent class through all metrics. Specifically, the improvement of the MR result of vehicles increased from $60.00\%$ to $75.00\%$ with better perception. We discover that the relative improvements that ViRR brings are largely correlated with the perception performance.
|
| 168 |
+
|
| 169 |
+
Table 3: We report the results of end-to-end joint optimization. The upper three rows indicate the tracking results of the UniAD model with tracking and motion forecasting optimization, and the lower three rows are its motion forecasting results.
|
| 170 |
+
|
| 171 |
+
<table><tr><td>Task</td><td>Metric</td><td>w/o ViRR</td><td>w/ ViRR</td></tr><tr><td rowspan="3">Tracking</td><td>AMOTA ↑</td><td>0.360</td><td>0.369 (+2.50%)</td></tr><tr><td>AMOTP ↓</td><td>1.350</td><td>1.342 (+0.59%)</td></tr><tr><td>IDS ↓</td><td>919</td><td>907 (+1.31%)</td></tr><tr><td rowspan="3">Motion Forecasting</td><td>minADE ↓</td><td>0.751</td><td>0.701 (+6.64%)</td></tr><tr><td>minFDE ↓</td><td>1.109</td><td>0.954 (+13.98%)</td></tr><tr><td>MR ↓</td><td>0.162</td><td>0.080 (+50.62%)</td></tr></table>
|
| 172 |
+
|
| 173 |
+
Joint PnP Optimization Results. So far, we have demonstrated the impact of ViRR in motion forecasting with frozen perception stages. In this part, we observe the impact of ViRR in an end-to-end joint PnP optimization manner. As shown in Table 3, the benefits of ViRR are also clear in the end-to-end optimization. Even though the relative improvements in motion forecasting in this experiment are smaller than the improvements in the models with pretrained perception stages, ViRR solidly reduces the error metrics, producing closer predictions to the ground truth trajectories. More notably, applying ViRR also enhances the tracking performance, meaning visual representations of each agent and their relational semantics can benefit the entire end-to-end pipeline. We plan to explore deeper into this analysis in our future work.
|
| 174 |
+
|
| 175 |
+
# 6.2 Qualitative Analysis
|
| 176 |
+
|
| 177 |
+
In this section, we analyze the qualitative results of ViRR that the numerical results were unable to highlight. First, we present the comparisons of the trajectory predictions in the bird's-eye view. Then, we illustrate the agent features in the embedding space and show that our visual relational features contain semantics that the agent queries do not.
|
| 178 |
+
|
| 179 |
+
Prediction Performance Enhancement. We examine the scenarios where the improvements of the predictions with our ViRR are noticeable in Figure 5. In Figure 5-(a), the baseline predicts the vehicles on the right of the self-driving car to directly turn right with a high possibility, considering the upcoming corner. However, ViRR takes the geometrical and visual relations of the vehicles (e.g. the vehicle and a pedestrian on its front right in CAM_FRONT_RIGHT) into account, thereby avoiding the collision and producing reasonable trajectories. Figure 5-(b) highlights the benefits of our higher-order relation reasoning. The baseline predicts the vehicles on the left of the self-driving car to pass the crosswalk in the pedestrian signal. With the help of ViRR, the vehicle in the CAM_FRONT_LEFT view captures the crossing pedestrian and determines to
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Fig. 5: Visualization of the qualitative benefits of our proposed ViRR. The first column is the result of the baseline method and the second column illustrates the enhanced result with ViRR. The last column is the corresponding camera views with important visual unions in a red rectangle. Best viewed in color.
|
| 183 |
+
|
| 184 |
+
stop. Furthermore, this first-order visual relation is conveyed to the vehicle in the CAM_BACK view, making it to avoid collision with the pedestrians.
|
| 185 |
+
|
| 186 |
+
Agent Feature Semantics Comparison. The visual relation reasoning provides the model with fruitful semantics that enable further clarification of the agent identity. To see how this works, the t-SNE [25] visualization of the comparison between the agent queries of the baseline and our ViRR agent features is provided in Figure 6. Here, we observe that the ViRR agent features form new types of clusters, where features gather based on the visual relations of the agents. This implies that ViRR can enrich the agent representations by extracting the semantics that the agent queries from the perception stage couldn't capture. In our work, the queries and the ViRR features are summed and fed as the prediction stage input, enhancing the motion forecasting of the agents.
|
| 187 |
+
|
| 188 |
+
# 6.3 Ablation Study
|
| 189 |
+
|
| 190 |
+
Types of Visual Semantic. Different types of visual semantics have different influences on the motion forecasting result. Most naively, we first provide each agent with the image feature of the camera scene that the agent is in. Then we move on to discover the impact of finer-drawn visual semantics, by providing
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
(a)
|
| 194 |
+
(b)
|
| 195 |
+
Fig. 6: t-SNE visualization of the comparison between two types of agent features. (a) is the agent queries from the perception stage of the baseline UniAD, and (b) is the agent features from our proposed ViRR. Best viewed in color.
|
| 196 |
+
|
| 197 |
+
Table 4: The comparison between different visual semantics provided for the prediction task. 'H.R.L.' denotes our proposed higher-order relation learning technique.
|
| 198 |
+
|
| 199 |
+
<table><tr><td></td><td colspan="3">minADE ↓ minFDE ↓ MR ↓</td></tr><tr><td>Baseline</td><td>0.732</td><td>1.063</td><td>0.158</td></tr><tr><td>Scene Feature</td><td>0.722</td><td>1.051</td><td>0.149</td></tr><tr><td>Agent BBox (ResNet-101 [12])</td><td>0.720</td><td>1.037</td><td>0.151</td></tr><tr><td>Agent BBox (ViT [9])</td><td>0.711</td><td>1.022</td><td>0.145</td></tr><tr><td>ViRR w/o H.R.L.</td><td>0.663</td><td>0.976</td><td>0.059</td></tr><tr><td>ViRR w/ H.R.L.</td><td>0.628</td><td>0.891</td><td>0.040</td></tr></table>
|
| 200 |
+
|
| 201 |
+
the agents with image features of their 2D bounding box. Here we compare the results between two image feature extractors ResNet-101 [12] and Vision Transformer [9], both of which are pre-trained on ImageNet1K [8]. Next, we use features from our developed visual relation extraction method. Lastly, we apply our higher-order visual relation learning technique and construct the whole ViRR architecture. The overall experimental procedure and the results in Table 4 derive the following observations: (1) Explicit utilization of the image features in the prediction stage improves the performance; (2) Finer-grained visual semantics are more beneficial in forecasting future motion; (3) Compared to individual agent visual features, pairwise visual relations and their higher-order reasoning are better at modeling social dynamics.
|
| 202 |
+
|
| 203 |
+
Types of Relation Learning. The relation learning of the pairwise visual semantics can be achieved through several different methods. We compare our
|
| 204 |
+
|
| 205 |
+
Table 5: The comparison between different relation learning methods. $P$ denotes the number of higher-order observation degrees of our model.
|
| 206 |
+
|
| 207 |
+
<table><tr><td></td><td colspan="3">minADE ↓ minFDE ↓ MR ↓</td></tr><tr><td>Baseline</td><td>0.732</td><td>1.063</td><td>0.158</td></tr><tr><td>GCN [20]</td><td>0.683</td><td>0.987</td><td>0.073</td></tr><tr><td>MixHop [1]</td><td>0.664</td><td>1.002</td><td>0.055</td></tr><tr><td>Cross Attention [34]</td><td>0.655</td><td>0.929</td><td>0.049</td></tr><tr><td>ViRR (P=2)</td><td>0.657</td><td>0.969</td><td>0.051</td></tr><tr><td>ViRR (P=4)</td><td>0.628</td><td>0.891</td><td>0.040</td></tr><tr><td>ViRR (P=8)</td><td>0.634</td><td>0.933</td><td>0.049</td></tr></table>
|
| 208 |
+
|
| 209 |
+
proposed higher-order relation learning method with different observation degrees against GCN [20], MixHop [1], and Cross-Attention [34]. The results are reported in Table 5. First, we discover that visual relation reasoning generally enhances the prediction regardless of the relation learning type. Next, comparing our result with a similar higher-order graph-based method MixHop, we show that our combination technique has a clear advantage over the conventional method. Lastly however, a larger observation degree does not imply better performance, meaning that the optimal value differs depending on the dataset, where $P = 4$ produced the best result in our experimental setting.
|
| 210 |
+
|
| 211 |
+
# 7 Conclusion
|
| 212 |
+
|
| 213 |
+
In this work, we study how visual relation reasoning enhances motion forecasting in autonomous driving. To this end, we develop ViRR, which extracts complex visual relations from pairwise agents and represents them in a novel scene graph. In contrast to the conventional scene graph approaches that convert visual relations as pre-defined edge types, ViRR aggregates these relations per agent, transforming them into comprehensive agent node features. Furthermore, our method leverages the consecutive powers of the adjacency matrix, enabling higher-order relation learning of the nodes. The quantitative and qualitative results of our study demonstrate the effectiveness of employing visual relation reasoning in predicting the future motions of road agents.
|
| 214 |
+
|
| 215 |
+
Limitations and Future Work. This work mainly focuses on the influences of visual relation reasoning in motion forecasting task. However, as shown in 6.1, we have witnessed the potential of the benefits of visual relation reasoning in other tasks of the autonomous driving pipelines. Therefore, we plan to extend this work and study its impact on the entire end-to-end autonomous driving systems as future work.
|
| 216 |
+
|
| 217 |
+
Acknowledgements This research was supported by Autonomous Driving Center, Hyundai Motor Company R&D Division $(40\%)$ , Culture, Sports and Tourism R&D
|
| 218 |
+
|
| 219 |
+
Program through the Korea Creative Content Agency grant funded by the Ministry of Culture, Sports and Tourism in 2024((International Collaborative Research and Global Talent Development for the Development of Copyright Management and Protection Technologies for Generative AI, RS-2024-00345025, $4\%$ ),(Research on neural watermark technology for copyright protection of generative AI 3D content, RS-2024-00348469, $25\%$ ), Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government(MSIT)(RS-2019-II190079, $1\%$ ), IITP under the Leading Generative AI Human Resources Development(IITP-2024-RS-2024-00397085, $10\%$ ) grant, IITP grant (RS-2022-II220043, Adaptive Personality for Intelligent Agents, $10\%$ and IITP-2024-2020-0-01819, ICT Creative Consilience program, $5\%$ ), and Basic Science Research Program through the NRF funded by the Ministry of Education(NRF-2021R1A6A1A13044830, $5\%$ ).
|
| 220 |
+
|
| 221 |
+
# References
|
| 222 |
+
|
| 223 |
+
1. Abu-El-Haija, S., Perozzi, B., Kapoor, A., Alipourfard, N., Lerman, K., Harutyunyan, H., Ver Steeg, G., Galstyan, A.: Mixhop: Higher-order graph convolutional architectures via sparsified neighborhood mixing. In: international conference on machine learning. pp. 21-29. PMLR (2019)
|
| 224 |
+
2. Caesar, H., Bankiti, V., Lang, A.H., Vora, S., Liong, V.E., Xu, Q., Krishnan, A., Pan, Y., Baldan, G., Beijbom, O.: nuscenes: A multimodal dataset for autonomous driving. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 11621-11631 (2020)
|
| 225 |
+
3. Casas, S., Gulino, C., Suo, S., Luo, K., Liao, R., Urtasun, R.: Implicit latent variable model for scene-consistent motion forecasting. In: Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXIII 16. pp. 624-641. Springer (2020)
|
| 226 |
+
4. Casas, S., Luo, W., Urtasun, R.: Intentnet: Learning to predict intention from raw sensor data. In: Conference on Robot Learning. pp. 947-956. PMLR (2018)
|
| 227 |
+
5. Chang, X., Ren, P., Xu, P., Li, Z., Chen, X., Hauptmann, A.: A comprehensive survey of scene graphs: Generation and application. IEEE Transactions on Pattern Analysis and Machine Intelligence 45(1), 1-26 (2021)
|
| 228 |
+
6. Chatterjee, M., Ahuja, N., Cherian, A.: Learning audio-visual dynamics using scene graphs for audio source separation. Advances in Neural Information Processing Systems 35, 16975-16988 (2022)
|
| 229 |
+
7. Contributors, M.: MMCV: OpenMMLab computer vision foundation. https://github.com/open-mmlab/mmcv (2018)
|
| 230 |
+
8. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: 2009 IEEE conference on computer vision and pattern recognition. pp. 248-255. IEEE (2009)
|
| 231 |
+
9. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al.: An image is worth 16x16 words: Transformers for image recognition at scale. In: International Conference on Learning Representations (2020)
|
| 232 |
+
0. Gu, J., Hu, C., Zhang, T., Chen, X., Wang, Y., Wang, Y., Zhao, H.: Vip3d: End-to-end visual trajectory prediction via 3d agent queries. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5496-5506 (2023)
|
| 233 |
+
1. He, K., Gkioxari, G., Dollár, P., Girshick, R.: Mask r-cnn. In: Proceedings of the IEEE international conference on computer vision. pp. 2961-2969 (2017)
|
| 234 |
+
|
| 235 |
+
12. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 770-778 (2016)
|
| 236 |
+
13. Helbing, D., Molnar, P.: Social force model for pedestrian dynamics. Physical review E 51(5), 4282 (1995)
|
| 237 |
+
14. Hu, A., Murez, Z., Mohan, N., Dudas, S., Hawke, J., Badrinarayanan, V., Cipolla, R., Kendall, A.: Fiery: Future instance prediction in bird's-eye view from surround monocular cameras. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 15273-15282 (2021)
|
| 238 |
+
15. Hu, Y., Yang, J., Chen, L., Li, K., Sima, C., Zhu, X., Chai, S., Du, S., Lin, T., Wang, W., et al.: Planning-oriented autonomous driving. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 17853-17862 (2023)
|
| 239 |
+
16. Johnson, J., Gupta, A., Fei-Fei, L.: Image generation from scene graphs. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 1219-1228 (2018)
|
| 240 |
+
17. Johnson, J., Krishna, R., Stark, M., Li, L.J., Shamma, D., Bernstein, M., Fei-Fei, L.: Image retrieval using scene graphs. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3668-3678 (2015)
|
| 241 |
+
18. Jung, D., Kim, S., Kim, W.H., Cho, M.: Devil's on the edges: Selective quad attention for scene graph generation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 18664-18674 (2023)
|
| 242 |
+
19. Kim, S., Chi, H.g., Lim, H., Ramani, K., Kim, J., Kim, S.: Higher-order relational reasoning for pedestrian trajectory prediction. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 15251-15260 (2024)
|
| 243 |
+
20. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. In: International Conference on Learning Representations (2016)
|
| 244 |
+
21. Li, X., Jiang, S.: Know more say less: Image captioning based on scene graphs. IEEE Transactions on Multimedia 21(8), 2117-2130 (2019)
|
| 245 |
+
22. Liang, M., Yang, B., Zeng, W., Chen, Y., Hu, R., Casas, S., Urtasun, R.: Pnpnet: End-to-end perception and prediction with tracking in the loop. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 11553-11562 (2020)
|
| 246 |
+
23. Lin, T.Y., Dollár, P., Girshick, R., He, K., Hariharan, B., Belongie, S.: Feature pyramid networks for object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2117-2125 (2017)
|
| 247 |
+
24. Luo, W., Yang, B., Urtasun, R.: Fast and furious: Real time end-to-end 3d detection, tracking and motion forecasting with a single convolutional net. In: Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. pp. 3569-3577 (2018)
|
| 248 |
+
25. Van der Maaten, L., Hinton, G.: Visualizing data using t-sne. Journal of machine learning research 9(11) (2008)
|
| 249 |
+
26. Nayakanti, N., Al-Rfou, R., Zhou, A., Goel, K., Refaat, K.S., Sapp, B.: Wayformer: Motion forecasting via simple & efficient attention networks. In: 2023 IEEE International Conference on Robotics and Automation (ICRA). pp. 2980-2987. IEEE (2023)
|
| 250 |
+
27. Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al.: Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems 32 (2019)
|
| 251 |
+
|
| 252 |
+
28. Phillips, J., Martinez, J., Bardsan, I.A., Casas, S., Sadat, A., Urtasun, R.: Deep multi-task learning for joint localization, perception, and prediction. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4679-4689 (2021)
|
| 253 |
+
29. Roh, W., Chang, G., Moon, S., Nam, G., Kim, C., Kim, Y., Kim, J., Kim, S.: Ora3d: Overlap region aware multi-view 3d object detection. arXiv preprint arXiv:2207.00865 (2022)
|
| 254 |
+
30. Sadat, A., Casas, S., Ren, M., Wu, X., Dhawan, P., Urtasun, R.: Perceive, predict, and plan: Safe motion planning through interpretable semantic representations. In: Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXIII 16. pp. 414-430. Springer (2020)
|
| 255 |
+
31. Simonelli, A., Bulo, S.R., Porzi, L., López-Antequera, M., Kontschieder, P.: Disentangling monocular 3d object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 1991-1999 (2019)
|
| 256 |
+
32. Sohn, K., Lee, H., Yan, X.: Learning structured output representation using deep conditional generative models. Advances in neural information processing systems 28 (2015)
|
| 257 |
+
33. Tang, K., Niu, Y., Huang, J., Shi, J., Zhang, H.: Unbiased scene graph generation from biased training. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 3716-3725 (2020)
|
| 258 |
+
34. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. Advances in neural information processing systems 30 (2017)
|
| 259 |
+
35. Wu, P., Chen, S., Metaxas, D.N.: Motionnet: Joint perception and motion prediction for autonomous driving based on bird's eye view maps. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 11385-11395 (2020)
|
| 260 |
+
36. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Philip, S.Y.: A comprehensive survey on graph neural networks. IEEE transactions on neural networks and learning systems 32(1), 4-24 (2020)
|
| 261 |
+
37. Xu, D., Zhu, Y., Choy, C.B., Fei-Fei, L.: Scene graph generation by iterative message passing. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 5410-5419 (2017)
|
| 262 |
+
38. Yang, J., Lu, J., Lee, S., Batra, D., Parikh, D.: Graph r-cnn for scene graph generation. In: Proceedings of the European conference on computer vision (ECCV). pp. 670-685 (2018)
|
| 263 |
+
39. Yang, X., Tang, K., Zhang, H., Cai, J.: Auto-encoding scene graphs for image captioning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 10685-10694 (2019)
|
| 264 |
+
40. Zellers, R., Yatskar, M., Thomson, S., Choi, Y.: Neural motifs: Scene graph parsing with global context. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 5831-5840 (2018)
|
| 265 |
+
41. Zeng, F., Dong, B., Zhang, Y., Wang, T., Zhang, X., Wei, Y.: Motr: End-to-end multiple-object tracking with transformer. In: European Conference on Computer Vision. pp. 659-675. Springer (2022)
|
| 266 |
+
42. Zhang, T., Chen, X., Wang, Y., Wang, Y., Zhao, H.: Muitr3d: A multi-camera tracking framework via 3d-to-2d queries. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4537-4546 (2022)
|
| 267 |
+
43. Zhou, J., Cui, G., Hu, S., Zhang, Z., Yang, C., Liu, Z., Wang, L., Li, C., Sun, M.: Graph neural networks: A review of methods and applications. AI open 1, 57-81 (2020)
|
enhancedmotionforecastingwithvisualrelationreasoning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5f0495f4e41a2ebcd5bc8e0b0b364da883cb1fa31f02554a17cdd9ff399f363
|
| 3 |
+
size 457354
|
enhancedmotionforecastingwithvisualrelationreasoning/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:728ca2a0da06656c358bdc4a3f799197ff83474190368a380445e096142ca81d
|
| 3 |
+
size 368833
|
enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24285594cfea310ecae946974cb8c3b840fe8a336948f3bfa4dbc556d2a9709e
|
| 3 |
+
size 88696
|
enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16a5013fe1701b26802e76c1875e7f9335b3cd64c7bac2d453aa5b53260a3eca
|
| 3 |
+
size 110758
|
enhancedsparsificationviastimulativetraining/3d414c90-acbf-466d-8d1d-dce8f3dcb2fe_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:280c92a94418967727ffa98baa6ed200764548b9d15b1ff19a0447d922ea2e15
|
| 3 |
+
size 1158947
|
enhancedsparsificationviastimulativetraining/full.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Enhanced Sparsification via Stimulative Training
|
| 2 |
+
|
| 3 |
+
Shengji Tang\*1, Weihao Lin\*1, Hancheng Ye3, Peng Ye1, Chong Yu2, Baopu Li4, and Tao Chen
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> School of Information Science and Technology, Fudan University, Shanghai, China
|
| 6 |
+
|
| 7 |
+
$^{2}$ Academy for Engineering and Technology, Fudan University, Shanghai, China
|
| 8 |
+
|
| 9 |
+
3 Shanghai AI Laboratory, Shanghai, China
|
| 10 |
+
|
| 11 |
+
4 Independent Researcher
|
| 12 |
+
|
| 13 |
+
eetchen@fudan.edu.cn
|
| 14 |
+
|
| 15 |
+
Abstract. Sparsification-based pruning has been an important category in model compression. Existing methods commonly set sparsity-inducing penalty terms to suppress the importance of dropped weights, which is regarded as the suppressed sparsification paradigm. However, this paradigm inactivates the dropped parts of networks causing capacity damage before pruning, thereby leading to performance degradation. To alleviate this issue, we first study and reveal the relative sparsity effect in emerging stimulative training. Based on the sparsity effect, we propose a structured pruning framework, named STP. It is based on an enhanced sparsification paradigm which maintains the magnitude of dropped weights and enhances the expressivity of kept weights by self-distillation. Besides, to find an optimal architecture for the pruned network, we propose a multi-dimension architecture space and a knowledge distillation-guided exploration strategy. To reduce the huge capacity gap of distillation, we propose a subnet mutating expansion technique. Extensive experiments on various benchmarks indicate the effectiveness of STP. Specifically, without fine-tuning, our method consistently achieves superior performance at different budgets, especially under extremely aggressive pruning scenarios, e.g., remaining $95.11\%$ Top-1 accuracy (72.43% in 76.15%) while reducing $85\%$ FLOPs for ResNet-50 on ImageNet. Codes are at https://github.com/tsj-001/STP.
|
| 16 |
+
|
| 17 |
+
Keywords: Sparisification $\cdot$ Structured pruning $\cdot$ Self distillation
|
| 18 |
+
|
| 19 |
+
# 1 Introduction
|
| 20 |
+
|
| 21 |
+
Recently, the model pruning [5,18,41] technique, which removes redundant parameters to obtain a compact network from an over-parameterized one, has become a mainstream and general model compression method. Early pruning methods [19, 20, 33] focus on designing delicate metrics, e.g., $L_{1}$ score [19] or feature activation [29], to measure the importance of parameters and discard the unimportant ones. However, directly removing parameters from the original
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Fig. 1: ResNet-50 on ImageNet dataset. Fig. 2: Different sparsification methods, Top-1 accuracy $(\%)$ and remaining FLOPs namely $L_{1}$ , $L_{2}$ , and ST, on CIFAR-100 (in percentage) are reported. Without fine-dataset under different FLOPs. The sub-tuning, our method can still obtain an op-scripts ap and bp represent the perfor-timal Pareto frontier of efficiency and performance of networks after and before pruning compared with other methods. ing, respectively.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
network often causes dramatic performance degradation, especially in structured pruning where groups of filters are removed. To alleviate the performance degradation, emerging works [13,25,52,53,58] are dedicated to sparsifying parameters before pruning or sparsifying and pruning alternately. The sparsification aims to alter the distribution of parameters and transfer the network expressivity to the kept parameters, which helps to maintain performance after pruning. In current literature, the penalty terms [4,19,54] are commonly employed as regularization to introduce sparsification. They suppress the importance of dropped parameters, e.g., encouraging the pruned parameters to converge to zero [43], which is regarded as the suppressed sparsification paradigm in this manuscript. However, it is pointed out that the suppressed sparsification paradigm commonly causes expressivity damage of the unpruned network during the sparsification procedure [13,52], which limits the pruning upper bound. Numerous works have attempted to mitigate it by using a small regime of penalty strength [41, 54] or well-designed penalty coefficients [13,52,53], but only alleviates rather than completely solves this issue. The reason is that the suppressed sparsification paradigm introduces explicit regularization to forcibly drive the pruned parts toward zero and obtain a sparse distribution that is easier to prune. This process is nearly equivalent to removing the corresponding parameters, causing structural damage and loss of network capacity. It is detrimental to the preservation of expressive capability before pruning.
|
| 29 |
+
|
| 30 |
+
From the dual respect of suppression, we consider achieving relative sparsity by enhancing the kept parts while maintaining the magnitude of the to-be-pruned parts, termed enhanced sparsification paradigm. Fig. 3 provides an intuitive comparison of the suppressed and enhanced sparsification. The core consideration behind the enhanced sparsification paradigm is that the enhanced kept parts can occupy a greater significance in the contribution to the overall network's expressive capability while avoiding damage to the entire network. It
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Fig. 3: Comparison of suppressed and enhanced sparsification. The exemplified fully connected layer has three input neurons and three output ones. The solid black lines denote the parameters to remain, while the dashed ones are pruned. The parameters connected to a redder neuron have larger magnitudes.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+
is noteworthy that relative sparsity differs from the commonly used definition of sparsity. Relative sparsity refers to a situation where some parameters in the network have a notably greater ratio (not the absolute value) than others on certain metrics, such as the $L_{1}$ norm. To realize the enhanced sparsification paradigm, we focus on the original purpose of sparsification, which transfers the expressivity from the whole to the kept part for lossless pruning. A popular technique for transferring is knowledge distillation (KD) [26, 31], which aligns the output logits or features to transfer the dark knowledge. Recently, Stimulative Training (ST) [60, 62] utilizes self-distillation to transfer the knowledge from the main network to its weight-sharing subnets and benefits both the main network and subnets. We consider the self-distillation process in ST can be seen as a natural enhancement. As shown in Fig. 4, we study the parameter distribution in ST and observe that without an explicit sparsity constraint, ST results in prominent relative sparsity, which will be further discussed in Sec. 3.2.
|
| 38 |
+
|
| 39 |
+
Based on the relative sparsity effect in ST, we propose a new enhanced sparsification paradigm and build a one-stage multi-dimension framework for structured pruning, namely ST guided pruning (STP). The core of the method lies in, given a subnet, utilizing the self-distillation in ST to distill the main network to the weight-sharing subnet. This enhances the importance of the subnet, achieves relative sparsification, and thereby facilitates lossless structured pruning. Besides, STP introduces three key designs to guarantee a high-performance compact network: 1) KD guided exploration. It is a heuristic searching strategy driven by the KD loss to obtain an outstanding subnet for sparsification. We introduce KD guided exploration to gradually explore surpassing subnet architectures during ST; 2) Multi-dimension sampling. The original ST [62] only considers sampling subnets with different depths (total layer numbers). To formulate a more general pruning framework and chase for a better trade-off between sparsity and performance, we extend the sampling dimension of ST to both depth and width (the output channel number of each layer) and design a multi-dimension FLOPs-aware sampling space to fit the desired FLOPs target correctly; 3) Subnet mutating expansion. The FLOPs-aware sampling space leads to monotonic subnet capacity, which harms the performance of the main
|
| 40 |
+
|
| 41 |
+
network [49]. The subnet mutating expansion generates larger subnets to enrich the subnet capacity, improving the main network.
|
| 42 |
+
|
| 43 |
+
We summarize our contributions as follows: 1) We first reveal the relative sparsity effect of ST, which renders ST to be an enhanced sparsification paradigm maximally retaining the capacity of the unpruned network, thus alleviating performance drop after pruning; 2) Based on the enhanced sparsification paradigm, we propose a pruning framework, named stimulative training guided pruning (STP). The STP includes a KD guided architecture exploration method to find optimal subnet architectures, a multi-dimension sampling to better trade-off between sparsity and performance, and a subnet mutating expansion scheme to introduce various support subnets for further performance improvement; 3) Extensive empirical results and comparisons on various mainstream models (ResNet50, WRN28-10, MobileNetV3, ViT, Swin Transformer) and datasets (CIFAR100, TinyImageNet, ImageNet, COCO) show that STP obtains compact networks with high performance and extremely low FLOPs without fine-tuning, e.g., preserving $95.11\%$ performance ( $72.43\%$ in $76.15\%$ Top-1 accuracy) while reducing $85\%$ FLOPs on ImageNet (as shown in Fig. 1).
|
| 44 |
+
|
| 45 |
+
# 2 Related Work
|
| 46 |
+
|
| 47 |
+
# 2.1 Sparsification-based Pruning
|
| 48 |
+
|
| 49 |
+
Existing sparsification-based pruning methods can be divided into two categories: static sparsification and dynamic sparsification. Static sparsification aims at imposing a global and unchanged penalty strength to all parameters of the model [3, 4, 14, 19, 36, 38, 41, 43, 54, 56]. The penalty terms in these works are designed to be a norm-based regularization item w.r.t. model parameters. Different from static sparsification methods, dynamic sparsification considers the individual and time-varying sparsification strength of different parameters [4, 9, 13, 52, 53, 53, 59, 61, 66]. AFP [13] utilizes auto-balanced regularization for different weights to transfer the representational capacity from the whole network to the kept part. Greg [52] merely applies sparsification on the dropped parameters and grows the penalty term large gradually to achieve higher sparsity. Previous works mostly follow the suppressed sparsification paradigm, which imposes constraints on dropped parameters, causing expressivity damage before pruning. Differently, our method achieves relative sparsity by enhancing kept parameters and maintaining the magnitude of dropped ones via stimulative training.
|
| 50 |
+
|
| 51 |
+
# 2.2 Knowledge Distillation in Pruning
|
| 52 |
+
|
| 53 |
+
In general, pruning a network inevitably deteriorates its performance. To compensate for the performance degradation, conducting knowledge distillation (KD) after pruning has been proved feasible [1,2,7,35,45,46,57]. In [2], the authors firstly obtain a pruned network via APoZ [29] and then transfer knowledge from the unpruned network to the pruned one via a cosine-similarity-based loss. The authors in [45] apply a Kullback-Leibler-divergence-based loss for KD and verify
|
| 54 |
+
|
| 55 |
+
its effectiveness in both one-shot and iterative magnitude pruning. Built upon iterative magnitude pruning, the authors in [46] propose a cross-correlation-based KD loss to better align the pruned network with the unpruned one. The aforementioned methods treat KD as a performance booster isolated from pruning. Differently, we treat KD itself as a pruning method, not merely a support technique. Our proposed method incorporates KD into pruning, utilizing self-distillation for sparsification and KD loss to obtain the pruning mask.
|
| 56 |
+
|
| 57 |
+
# 2.3 Stimulative Training
|
| 58 |
+
|
| 59 |
+
Stimulative training (ST) [62] aims to boost the main network by transferring the knowledge from the main network to each depth-wise subnet. In ST, the main network can be seen as an ensemble of shallow subnets, and the final performance is determined by each subnet under the unraveled view [48, 51]. Thus, while training the main network, ST randomly skips some layers to generate subnets and utilizes knowledge distillation to supervise each subnet. The experiments in ST show that ST can obtain performance improvement on the main network while bringing various subnets with marginal performance reduction compared with the main network. This additional benefit of subnets suggests that ST can achieve simultaneous enhancement at both local and global of the main network, which inspires us to study the distribution of parameters in ST and exploit ST as an enhanced sparsification paradigm for pruning.
|
| 60 |
+
|
| 61 |
+
# 3 Method
|
| 62 |
+
|
| 63 |
+
# 3.1 Problem Formutation
|
| 64 |
+
|
| 65 |
+
Pruning aims to eliminate parameters from a given network $\mathcal{N}$ with parameters $\theta$ to obtain a high-performance compact subnet $\mathcal{N}_s$ with retaining parameters $\theta_s$ with specific resource constraint. Although $\mathcal{N}$ can be given with pretrained weights, our method concentrates on pruning from randomly initialized parameters, same as [4,27]. The pruning process can be abstracted as a function $F(\cdot)$ , which takes $\theta$ as input and output $\theta_s$ , $\theta_s = F(\theta)^\perp$ . General pruning mainly consists of two categories of transformations 1) $\mathcal{M} = F_1(\theta)$ , which generates a binary mask to determine remaining and dropping parts 2) $\hat{\theta} = F_2(\theta)$ , which adjusts the parameter distribution for eliminating with low damage. A typical pruning process can be denoted as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\theta_ {s} = \mathcal {M} \odot \hat {\theta} = F _ {1} (\theta) \odot F _ {2} (\theta). \tag {1}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
The exact format depends on the specific pruning algorithm. For one-shot pruning, $F_{1}$ is applied once [34] while alternately for iterative pruning [17]. We denote the dropped parameters as $\theta_d = \theta \setminus \theta_s$ . The specification process belongs to $F_{2}(\cdot)$
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
(a) Baseline, layer 3-1
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
(b) ST, layer 3-1, 0.3
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Fig. 4: The convolutional weight magnitude distribution of baseline (standard training without sparsification) and stimulative training (ST) [62] with different sparsity ratios (0.3 and 0.7) in different layers (3-1 and 4-2) on ResNet-50, where "3-1" and "4-2" are the layer index, e.g., given ResNet-50 containing four stages with layers [3,4,6,3], "3-1" represents the first layer of the third stage. The color represents the relative magnitude comparison. The redder regions indicate the relatively larger magnitudes, and vice versa. The regions encircled by the black rectangle represent the chosen (kept) weights. Given a structured architecture, ST exhibits a significant relative sparsity effect, enhancing chosen weights accurately.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
(c) Baseline, layer 4-2
|
| 84 |
+
(d) ST, layer 4-2, 0.7
|
| 85 |
+
|
| 86 |
+
and a typical method [4, 52, 53] introduces $L_{2}$ norm penalty term for $\theta_{d}$ , which optimizes the following objective:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathcal {L} _ {t o t a l} (\theta ; D) = \mathcal {L} _ {t a s k} (\theta ; D) + \frac {\lambda}{2} | | \theta_ {d} | | _ {2} ^ {2}, \tag {2}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\mathcal{L}_{task}$ is the task loss; $D$ is the given dataset; $\lambda$ is the coefficient of penalty term. The penalty term drives $||\theta_d||$ to converge to zero and eliminates the importance of $\theta_{d}$ for painless removal, which belongs to suppressed paradigm. Whereas $\theta_{d}$ is a part of $\theta$ , suppression of $\theta_{d}$ reduces the capacity of $\theta$ , which limits the upper bound of $\theta_{s}$ and compromises the final performance.
|
| 93 |
+
|
| 94 |
+
# 3.2 Relative Sparsity Effect in Stimulative Training
|
| 95 |
+
|
| 96 |
+
To boost the performance of the main network, stimulative training (ST) views a network as an ensemble of multiple shallow subnets and transfers the knowledge from the main network to each weight-shared subnet. Formally, ST optimizes the following loss:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathcal {L} _ {S T} = C E \left(p \left(x; \theta_ {m}\right), y\right) + \lambda K L \left(p \left(x; \theta_ {m}\right) \mid \mid p \left(x; \theta_ {s}\right)\right), \tag {3}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where $x$ and $y$ are the input images and ground truth labels, respectively; $CE(\cdot)$ is the cross entropy; $KL(\cdot)$ is the Kullback-Leibler divergence; $\lambda$ is the balance coefficient; $p(x;\theta)$ is the output probability with $x$ and $\theta$ ; $\theta_{m}$ and $\theta_{s}$ are the parameters of the main network and subnet, respectively, and $\theta_{s}$ is the subset of $\theta_{m}$ . According to the optimization of the second term of $\mathcal{L}_{ST}$ , i.e., $KL(p(x;\theta_m)||p(x;\theta_s))$ , ST can gradually transfer the representative ability from the whole parameters $(\theta_{m})$ to the partial ones $(\theta_{s})$ , causing the enhancement of subnet weights and implying the potential of relative sparsity.
|
| 103 |
+
|
| 104 |
+
To investigate the relative sparsity effect in ST, we conduct ST by fixing a specific subnet on ResNet-50 and visually show the magnitude of a convolutional layer's weights. Notely, while the original ST only samples subnet in the depth dimension, we extend it into the width dimension. As shown in Fig. 4, compared with the random weights' distribution in the baseline, i.e., standard training with stochastic gradient descent, ST can significantly enhance the chosen weights, causing the weights' magnitude relatively concentrating on the chosen weights (the black rectangle). It is worth noting that Fig. 4 reports the relative comparison, see Fig. 7 for detailed absolute values. To further display the effect of different sparsification methods before and after pruning, we conduct experiments with different target sparsity. As shown in Fig. 2, the $L$ norm sparsifications harm the performance before pruning (before removing the dropped parameters), while ST maintains and even improves the performance. It suggests ST introduces a moderate and relative sparsity effect via KD to keep the capacity of the dropped parts, which encourages learning better sparsity distribution.
|
| 105 |
+
|
| 106 |
+
# 3.3 Framework
|
| 107 |
+
|
| 108 |
+
The proposed ST guided pruning (STP) framework is illustrated in Fig.5. In detail, given a dense network, i.e., the main network and a target FLOPs constraint, we initialize an architecture pool containing structured subnet architectures sampled from multi-dimension FLOPs-aware sampling space. The training starts with randomly initialized parameters. In each training iteration, the main network firstly forwards to generate the main output, compute and backward the cross entropy between ground truth and main output. Then, a subnet architecture is sampled based on the recorded score (KD loss) in the architecture pool and applied to the main network to construct a weight-shared subnet. The subnet is supervised using the main output by knowledge distillation. Meanwhile, the sampled architecture mask is mutated multi-dimensionally into a larger architecture mask, which is utilized to generate a weight-shared mutating network and also supervised using the main output. To search the optimal architecture, the architecture with the highest score (KD loss) is removed in the architecture pool every $k$ iterations. Due to a designed shrinking schedule, only one subnet architecture mask exists in the architecture pool after $T$ training iterations. We apply it to the main network to obtain the final pruned network while the other parameters are deserted. A typical value of $k$ is the iteration number of an epoch. The pseudo-code is shown in the Appendix. Three critical designs of STP are introduced as follows.
|
| 109 |
+
|
| 110 |
+
Stimulative Training Sparsification and Multi-dimension Sampling. As stated in Sec. 3.2, inspired by the relative sparsity effect in ST, we exploited it for enhanced sparsification. However, the original ST sampling space only considers the depth dimension (all possible layer combinations), ignoring the more fine-grained width dimension (output channels). The relatively coarse-grained depth sampling space cannot fully explore the trade-off between sparsity and performance. Thus, different from the original ST, we build a multi-dimension sampling space, including both depth and width, to handle general pruning cases in a fine-
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Fig. 5: The framework of the proposed stimulative training guided pruning (STP). The recursive arrows mean repeating the corresponding process multiple times; bold red arrows represent computing loss and supervising. STP gradually explores the optimal subnet architecture guided by the KD loss and utilizes stimulative training to enhance the subnet with the support of mutating networks. Finally, the subnet can be separated from the main network as a structured pruned network with low FLOPs. $k$ is a hyperparameter, and a typical value is the iteration number of an epoch.
|
| 114 |
+
|
| 115 |
+
grained manner, which provides more possibilities for finding a high-performance architecture. Exemplary sampled subnets are referred to in Appendix.
|
| 116 |
+
|
| 117 |
+
Besides the multi-dimension design, we impose a FLOPs-aware constraint on the sampling space, only sampling the subnets with target FLOPs. It can guarantee a more accurate practical speedup ratio compared with sparsity constraint. Because the sampled subnets generally possess much lower capacity than the main network, we adopt the normalized Kullback-Leibler divergence (KL-) [60] to eliminate the capacity gap for higher performance.
|
| 118 |
+
|
| 119 |
+
Formally, given a structured mask $\mathcal{M}_s$ , the parameters of subnets are $\theta_s = \mathcal{M}_s \odot \theta_m$ . ST sparsification is optimized by:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mathcal {L} _ {S T S} = K L _ {-} \left(\hat {p} (x; \theta_ {m}) | | \hat {p} (x; \theta_ {s})\right) = \sum_ {i = 1} ^ {N} \hat {p} _ {i} (x; \theta_ {m}) \log \frac {\hat {p} _ {i} (x ; \theta_ {m})}{\hat {p} _ {i} (x ; \theta_ {s})}. \tag {4}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
$\hat{p} (x;\theta)$ is the normalized probability which is donated as:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\hat {p} _ {i} (x; \theta) = \frac {e ^ {\frac {Z _ {i} (x ; \theta)}{\| Z (x ; \theta) \|}}}{\sum_ {j = 1} ^ {N} e ^ {\frac {Z _ {j} (x ; \theta)}{\| Z (x ; \theta) \|}}}, \tag {5}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $Z(x; \theta)$ is the output logits. $\mathcal{L}_{STS}$ is essentially a knowledge distillation loss, and illustrated as $KD_{sub}$ in Fig.5. The subnets will also be called target subnets in the following section.
|
| 132 |
+
|
| 133 |
+
Subnet Mutating Expansion. To mitigate the performance degradation resulting from focusing on training tiny subnets [49], we introduce additional larger subnets to provide support during training. As a distinction, we refer to them as support subnets. Considering that randomly sampling larger support subnets will disrupt the parameter magnitude concentration of target subnets, we propose to mutate and expand the width and depth of target subnets to generate support subnets.
|
| 134 |
+
|
| 135 |
+
Formally, given a target subnet with layer-wise sparsity ratio $S_{tar} = \{S_{tar}^{1}, S_{tar}^{2}, \dots, S_{tar}^{L}\}$ , for each $S_{tar}^{i}$ we uniformly sample a larger ratio $S_{sup}^{i}$ which satisfies:
|
| 136 |
+
|
| 137 |
+
Table 1: Comparison of different pruning methods on CIFAR-100. We report the Top-1 accuracy(%) of dense and pruned networks with different remaining FLOPs. "Acc" means Top-1 accuracy(%).
|
| 138 |
+
|
| 139 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">ResNet-50 (Acc: 78.14)</td><td colspan="3">MBV3 (Acc: 78.09)</td><td colspan="3">WRN28-10 (Acc: 82.17)</td></tr><tr><td>15%</td><td>35%</td><td>55%</td><td>15%</td><td>35%</td><td>55%</td><td>15%</td><td>35%</td><td>55%</td></tr><tr><td>RST-S [4]</td><td>75.02</td><td>76.38</td><td>76.48</td><td>72.90</td><td>76.78</td><td>77.30</td><td>78.56</td><td>81.18</td><td>82.19</td></tr><tr><td>Group-SL [16]</td><td>49.04</td><td>77.90</td><td>78.37</td><td>1.43</td><td>4.90</td><td>26.24</td><td>42.41</td><td>67.71</td><td>79.59</td></tr><tr><td>OToV2 [10]</td><td>77.04</td><td>77.65</td><td>78.35</td><td>76.29</td><td>77.35</td><td>78.39</td><td>77.26</td><td>80.61</td><td>80.84</td></tr><tr><td>Refill [8]</td><td>75.12</td><td>77.43</td><td>78.19</td><td>69.57</td><td>75.91</td><td>76.96</td><td>75.98</td><td>79.25</td><td>79.56</td></tr><tr><td>Ours</td><td>79.64</td><td>80.0</td><td>80.41</td><td>76.81</td><td>78.57</td><td>79.09</td><td>80.12</td><td>81.63</td><td>82.72</td></tr></table>
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
S _ {s u p} = \left\{S _ {s u p} ^ {1}, S _ {s u p} ^ {2}, \dots , S _ {s u p} ^ {L} \right\}, S _ {s u p} ^ {i} \sim U \left(S _ {t a r} ^ {i}, 1\right), \tag {6}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $U(\cdot)$ denotes the uniform distribution. The support subnet will be supervised by the main network similar to Formulation 4, denoted as:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
\mathcal {L} _ {S M E} = K L _ {-} \left(\hat {p} (x; \theta_ {m}) \mid \mid \hat {p} (x; \theta_ {\sup })\right), \tag {7}
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where $\theta_{sup}$ is the parameters of the support subnet and $\mathcal{L}_{SME}$ is illustrated as $KD_{mut}$ in Fig. 5. Formulation 6 can guarantee that the support subnet contains the whole parameters of the sampled target subnet. Thus, training the support subnet also enhances the target subnet.
|
| 152 |
+
|
| 153 |
+
Knowledge Distillation guided Exploration. To explore the superior architecture of target subnets, we construct a candidate pool containing numerous architectures satisfying the FLOPs target. KD loss $(L_{STS})$ is a reliable indicator to evaluate the generation and performance gap between subnets and the main network. Under the constraint of FLOPs, a lower KD loss implies a more superior architecture. Thus, we heuristically utilize KD loss to guide the gradual shrinking of the pool and obtain a high-performance architecture.
|
| 154 |
+
|
| 155 |
+
Specifically, suppose there is architecture pool with $N$ candidate masks, denoted as $\mathcal{P} = \{\mathcal{M}_1,\mathcal{M}_2,\dots,\mathcal{M}_N\}$ . Each architecture has a corresponding score, denoted as $Sco = \{Sco_1,Sco_2,\dots,Sco_N\}$ . While training a target subnet with $\mathcal{M}_i$ , we record the $\mathcal{L}_{STS}$ and update the corresponding score via exponential moving average (EMA) [21], which can be denoted as:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
S c o _ {i} := \left(1 - \alpha S c o _ {i}\right) + \alpha \mathcal {L} _ {S T S}, \tag {8}
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
where $\alpha \in (0,1)$ is the updating ratio. The pool is shrunk by removing the architectures with the highest scores every $k$ iterations. After $T$ rounds of shrinking, the pool contains a single architecture, which is chosen as the pruned network.
|
| 162 |
+
|
| 163 |
+
# 4 Experiment
|
| 164 |
+
|
| 165 |
+
In this section, we first validate the effectiveness of the proposed STP on three benchmarks: CIFAR-100 [32], Tiny ImagineNet [12] and ImageNet [12]. For CIFAR100 and Tiny ImageNet, three typical CNNs, including ResNet-50 [23], MobileNetV3 (MBV3) [28] and WRN28-10 [67], are evaluated under different pruning ratios, i.e., $15\%$ , $35\%$ and $55\%$ . For ImageNet, we choose ResNet-50 as the
|
| 166 |
+
|
| 167 |
+
Table 2: Comparison of different pruning methods on Tiny ImageNet. We report the Top-1 accuracy(%) of dense and pruned networks with different remaining FLOPs. "Acc" means Top-1 accuracy(%).
|
| 168 |
+
|
| 169 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">ResNet-50 (Acc: 64.28)</td><td colspan="3">MBV3 (Acc: 63.91)</td><td colspan="3">WRN28-10 (Acc: 61.72)</td></tr><tr><td>15%</td><td>35%</td><td>55%</td><td>15%</td><td>35%</td><td>55%</td><td>15%</td><td>35%</td><td>55%</td></tr><tr><td>RST-S [4]</td><td>63.03</td><td>63.24</td><td>64.78</td><td>55.13</td><td>61.26</td><td>62.76</td><td>58.03</td><td>61.41</td><td>62.12</td></tr><tr><td>Group-SL [16]</td><td>0.95</td><td>19.94</td><td>55.49</td><td>0.56</td><td>2.35</td><td>53.43</td><td>0.85</td><td>25.74</td><td>57.64</td></tr><tr><td>OTOv2 [10]</td><td>60.38</td><td>63.45</td><td>65.16</td><td>57.61</td><td>59.25</td><td>60.16</td><td>57.19</td><td>61.23</td><td>61.70</td></tr><tr><td>Refill [8]</td><td>61.05</td><td>64.14</td><td>65.02</td><td>53.87</td><td>61.84</td><td>62.49</td><td>56.64</td><td>61.83</td><td>62.22</td></tr><tr><td>Ours</td><td>65.93</td><td>66.65</td><td>68.27</td><td>59.74</td><td>62.11</td><td>63.64</td><td>60.53</td><td>62.44</td><td>62.81</td></tr></table>
|
| 170 |
+
|
| 171 |
+
Table 3: Verifications of transformers on CIFAR-100. We report the Top-1 accuracy(%) of dense and pruned networks with different remaining FLOPs.
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Dense</td><td colspan="3">RST-S [4]</td><td colspan="3">Ours</td></tr><tr><td>15%</td><td>35%</td><td>55%</td><td>15%</td><td>35%</td><td>55%</td></tr><tr><td>ViT</td><td>76.49</td><td>70.74</td><td>72.05</td><td>74.65</td><td>71.28</td><td>74.49</td><td>76.24</td></tr><tr><td>Swin</td><td>77.16</td><td>70.53</td><td>72.98</td><td>75.25</td><td>75.63</td><td>76.89</td><td>77.14</td></tr></table>
|
| 174 |
+
|
| 175 |
+
backbone and compare STP with various structured pruning methods on Top-1 accuracy and FLOPs. Following the benchmarking, ablation studies are conducted to verify the indispensability of each component. Finally, we analyze the KD guided exploration process and the parameter magnitude empirically to reveal the internal mechanism of STP. All ablation and investigation experiments are conducted on CIFAR-100 with ResNet-50. We adopt the standard training settings without bells and whistles. Details can be referred to in Appendix.
|
| 176 |
+
|
| 177 |
+
# 4.1 Image Classification
|
| 178 |
+
|
| 179 |
+
Results on CIFAR-100 and Tiny ImageNet. To verify the effectiveness of STP and show its robustness to different networks. We conduct experiments on CIFAR-100 and Tiny ImageNet using ResNet-50, MBV3, and WRN28-10 as backbones. For each benchmark-network pair, three different FLOPs ratios are considered, i.e., $15\%$ , $35\%$ , and $55\%$ . The leading methods for comparison include a slightly modified structured RST [4] (named RST-S**), Group-SL [16], OTOv2 [10], and Refill [8]. For fair comparisons, we utilize consistent basic training settings for STP and the others. The results are shown in Table 1 and Table 2. Compared with the others, STP consistently achieves state-of-the-art performance, especially in extremely low FLOPs. For example, when reducing the FLOPs of ResNet-50 to $15\%$ , Group-SL suffers from a severe accuracy drop from $77.49\%$ ( $35\%$ ) to $49.04\%$ ( $15\%$ ). In contrast, STP still maintains high accuracy, and the accuracy gains compared with the second-best method are up to $2.6\%$ on CIFAR-100 and $2.9\%$ on Tiny ImageNet, respectively.
|
| 180 |
+
|
| 181 |
+
To further demonstrate the generality of STP, we apply STP on two typical Transformers, i.e., ViT [50] and Swin Transformer [39]. Similar to CNNs, we conduct experiments on CIFAR-100 w.r.t. three FLOPs targets, including $15\%$ , $35\%$ , and $55\%$ . The results are shown in Table 3. It can be observed that STP is
|
| 182 |
+
|
| 183 |
+
superior for both Transformers under all target FLOPs compared with RST-S. Moreover, under $55\%$ FLOPs, the STP pruned Transformers can almost realize lossless compression, suffering merely 0.25 and 0.02 performance drop for ViT and Swin Transformer, respectively. Note that the proposed STP is not tailored for Transformers, however, it can still achieve competitive results under $55\%$ FLOPs, implying its immense potential in pruning Transformers.
|
| 184 |
+
|
| 185 |
+
Table 4: Results of ResNet-50 on Imagenet. We report the Top-1 accuracy(%) of dense and pruned networks with different remaining FLOPs.
|
| 186 |
+
|
| 187 |
+
<table><tr><td>Method</td><td>Unpruned top-1 (%)</td><td>Pruned top-1 (%)</td><td>Top-1 drop (%)</td><td>FLOPs (%)</td><td>Params (%)</td></tr><tr><td>OTOv2 [10]</td><td>76.10</td><td>70.10</td><td>6.00</td><td>14.50</td><td>21.30</td></tr><tr><td>Refill [8]</td><td>75.84</td><td>66.83</td><td>9.01</td><td>20.00</td><td>-</td></tr><tr><td>Ours</td><td>76.15</td><td>72.43</td><td>3.72</td><td>15.26</td><td>18.75</td></tr><tr><td>MetaPruning [40]</td><td>76.60</td><td>73.40</td><td>3.20</td><td>24.39</td><td>-</td></tr><tr><td>Slimmable [65]</td><td>76.10</td><td>72.10</td><td>4.00</td><td>26.63</td><td>-</td></tr><tr><td>ThinNet [44]</td><td>72.88</td><td>68.42</td><td>4.46</td><td>28.50</td><td>33.88</td></tr><tr><td>OTOv2 [10]</td><td>76.10</td><td>74.30</td><td>1.80</td><td>28.70</td><td>37.40</td></tr><tr><td>GReg-1 [52]</td><td>76.13</td><td>73.75</td><td>2.38</td><td>32.68</td><td>-</td></tr><tr><td>GReg-2 [52]</td><td>76.13</td><td>73.90</td><td>2.23</td><td>32.68</td><td>-</td></tr><tr><td>CAIE [55]</td><td>76.13</td><td>72.39</td><td>3.74</td><td>32.90</td><td>30.76</td></tr><tr><td>Ours</td><td>76.15</td><td>75.39</td><td>0.76</td><td>24.21</td><td>35.60</td></tr><tr><td>CHIP [47]</td><td>76.15</td><td>75.26</td><td>0.89</td><td>37.20</td><td>43.30</td></tr><tr><td>OTOv2 [10]</td><td>76.10</td><td>75.20</td><td>0.90</td><td>37.30</td><td>49.60</td></tr><tr><td>GReg-1 [52]</td><td>76.13</td><td>74.85</td><td>1.28</td><td>39.06</td><td>-</td></tr><tr><td>GReg-2 [52]</td><td>76.13</td><td>74.93</td><td>1.20</td><td>39.06</td><td>-</td></tr><tr><td>Refill [8]</td><td>75.84</td><td>72.25</td><td>3.59</td><td>40.00</td><td>-</td></tr><tr><td>ThinNet [44]</td><td>72.88</td><td>71.01</td><td>1.87</td><td>44.17</td><td>48.44</td></tr><tr><td>GBN [63]</td><td>75.85</td><td>75.18</td><td>0.67</td><td>44.94</td><td>46.60</td></tr><tr><td>FPGM [24]</td><td>76.15</td><td>74.83</td><td>1.32</td><td>46.50</td><td>-</td></tr><tr><td>LeGR [11]</td><td>76.10</td><td>75.30</td><td>0.80</td><td>47.00</td><td>-</td></tr><tr><td>AutoSlim [64]</td><td>76.10</td><td>75.60</td><td>0.50</td><td>48.43</td><td>80.78</td></tr><tr><td>MetaPruning [40]</td><td>76.60</td><td>75.40</td><td>1.20</td><td>48.78</td><td>-</td></tr><tr><td>Ours</td><td>76.15</td><td>75.68</td><td>0.47</td><td>35.00</td><td>65.58</td></tr><tr><td>CAIE [55]</td><td>76.13</td><td>75.62</td><td>0.51</td><td>54.77</td><td>77.35</td></tr><tr><td>CHIP [47]</td><td>76.15</td><td>76.30</td><td>-0.15</td><td>55.20</td><td>59.20</td></tr><tr><td>Slimmable [65]</td><td>76.10</td><td>74.90</td><td>1.20</td><td>55.69</td><td>-</td></tr><tr><td>TAS [15]</td><td>77.46</td><td>76.20</td><td>1.26</td><td>56.50</td><td>-</td></tr><tr><td>SSS [30]</td><td>76.12</td><td>71.82</td><td>4.30</td><td>56.96</td><td>61.18</td></tr><tr><td>FPGM [24]</td><td>76.15</td><td>75.59</td><td>0.56</td><td>57.80</td><td>-</td></tr><tr><td>LeGR [11]</td><td>76.10</td><td>75.70</td><td>0.40</td><td>58.00</td><td>-</td></tr><tr><td>GBN [63]</td><td>75.88</td><td>76.19</td><td>-0.31</td><td>59.46</td><td>68.17</td></tr><tr><td>Refill [8]</td><td>75.84</td><td>74.46</td><td>1.38</td><td>60.00</td><td>-</td></tr><tr><td>ThinNet [44]</td><td>72.88</td><td>72.04</td><td>0.84</td><td>63.21</td><td>66.28</td></tr><tr><td>GReg-1 [52]</td><td>76.13</td><td>76.27</td><td>-0.14</td><td>67.11</td><td>-</td></tr><tr><td>MetaPruning [40]</td><td>76.60</td><td>76.20</td><td>0.40</td><td>73.17</td><td>-</td></tr><tr><td>Ours</td><td>76.15</td><td>77.13</td><td>-0.98</td><td>53.49</td><td>84.08</td></tr><tr><td>SSS [30]</td><td>76.12</td><td>75.44</td><td>0.68</td><td>84.94</td><td>99.22</td></tr><tr><td>Ours</td><td>76.15</td><td>77.48</td><td>-1.33</td><td>75.00</td><td>95.99</td></tr></table>
|
| 188 |
+
|
| 189 |
+
Results on ImageNet. We also validate STP on the widely used ImageNet-1K benchmark, reporting the performance of STP-pruned ResNet-50 under various FLOPs ranging from $15\%$ to $75\%$ and comparing them with the ones pruned by other methods. As shown in Table. 4, under nearly the same FLOPs, the network pruned by STP consistently achieves higher accuracy than the ones pruned by other methods, demonstrating the superiority of STP. Considering extremely
|
| 190 |
+
|
| 191 |
+
low FLOPs interval (from $10\%$ to $20\%$ ), few methods (STP, OTOv2, and Refill) attempt to prune ResNet-50 to this interval. Among these methods, our STP achieves the highest $72.43\%$ top-1 accuracy, overpassing OTOv2 by $2.33\%$ while remaining almost the same FLOPs (around $15\%$ ).
|
| 192 |
+
|
| 193 |
+
# 4.2 Ablation Studies
|
| 194 |
+
|
| 195 |
+
We eliminate the proposed components of STP, i.e., ST relative sparsification, subnet mutating expansion, KD guided architecture exploration and multidimension sampling, to validate the single and joint effect of them. The results are shown in Table 5. Firstly, we conduct experiments with the separate removal of each component except the ST relative sparsification and observe different degrees of performance degradation, which demonstrates their indispensability. Then, we remove these components step-by-step and observe consistent performance degradation, which demonstrates their joint effectiveness. Note that, to remove the ST relative sparsification, we replace it with the $L_{2}$ regularization, which causes significant performance damage (-2.7% Top-1 accuracy), demonstrating the superiority of the ST relative sparsification.
|
| 196 |
+
|
| 197 |
+
Table 5: Influence of different components in stimulative training guided pruning.
|
| 198 |
+
|
| 199 |
+
<table><tr><td>ST relative sparsification</td><td>Subnet mutating expansion</td><td>KD guided architecture exploration</td><td>Multi-dimension sampling</td><td>Top-1 Acc(%)</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>79.64</td></tr><tr><td>✓</td><td>×</td><td>✓</td><td>✓</td><td>78.12</td></tr><tr><td>✓</td><td>✓</td><td>×</td><td>✓</td><td>78.47</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>×</td><td>78.23</td></tr><tr><td>✓</td><td>✓</td><td>×</td><td>×</td><td>77.97</td></tr><tr><td>✓</td><td>×</td><td>×</td><td>×</td><td>77.46</td></tr><tr><td>×</td><td>×</td><td>×</td><td>×</td><td>74.76</td></tr></table>
|
| 200 |
+
|
| 201 |
+
# 4.3 Downstream Tasks
|
| 202 |
+
|
| 203 |
+
To validate the practical capacity of STP, we conduct experiments on downstream tasks, including object detection and instance segmentation. Specifically, we apply STP on ResNet-50 in ImageNet to generate pretrained pruned networks with three remaining FLOPs, i.e., $15\%$ , $35\%$ , $55\%$ . These pretrained pruned networks are utilized as the backbone in Mask R-CNN [22], which is a multitask framework. Then, the whole Mask R-CNN is fine-tuned and trained on COCO2017 [37] under the supervision of object detection and instance segmentation. For the fine-tuning settings, we follow the standard 1x training schedule [6] and adopt AdamW [42] to train the Mask R-CNN for 12 epochs with weight decay 0.1. The batch size is 16 and the initial learning rate is 0.0001. The learning rate decays $10\%$ at the 8-th and the 12-th epoch. We report the mean average precision (mAP) under different intersection over union (IoU) of the bounding boxe and mask as the evaluation metrics of object detection and instance segmentation, respectively.
|
| 204 |
+
|
| 205 |
+
The results are shown in Table 6. It can be observed that STP consistently surpasses GReg [52] on both detection and segmentation. Under relatively
|
| 206 |
+
|
| 207 |
+
Table 6: The results of downstream tasks, i.e., object detection and instance segmentation, on COCO2017. The pretrained pruned ResNet-50 with different remaining FLOPs are utilized as the backbone in Mask R-CNN and fine-tuned on different tasks.
|
| 208 |
+
|
| 209 |
+
<table><tr><td>Method</td><td>ImageNet Acc (%)</td><td>Det mAP</td><td>Det mAP@0.75</td><td>Det mAP@0.5</td><td>Seg mAP</td><td>Seg mAP@0.75</td><td>Seg mAP@0.5</td></tr><tr><td>Baseline (100% FLOPs)</td><td>76.15</td><td>37.8</td><td>40.8</td><td>58.6</td><td>34.5</td><td>36.7</td><td>55.4</td></tr><tr><td>GReg-2 [52] (40% FLOPs)</td><td>74.93</td><td>36.6</td><td>39.6</td><td>57.4</td><td>33.9</td><td>36.2</td><td>54.4</td></tr><tr><td>GReg-1 [52] (67% FLOPs)</td><td>76.27</td><td>37.6</td><td>40.5</td><td>58.7</td><td>34.6</td><td>36.4</td><td>55.3</td></tr><tr><td>Ours (15% FLOPs)</td><td>72.43</td><td>35.0</td><td>37.7</td><td>55.6</td><td>32.5</td><td>34.6</td><td>52.8</td></tr><tr><td>Ours (35% FLOPs)</td><td>75.68</td><td>37.4</td><td>40.7</td><td>58.1</td><td>34.5</td><td>36.6</td><td>55.2</td></tr><tr><td>Ours (55% FLOPs)</td><td>77.13</td><td>38.1</td><td>41.1</td><td>59.0</td><td>35.1</td><td>37.6</td><td>55.8</td></tr></table>
|
| 210 |
+
|
| 211 |
+
low FLOPs $(35\%)$ , STP causes marginal performance reduction $(-0.1\%$ on Det mAP@0.75 and Seg mAP@0.75) on downstream tasks. In the case of extremely low FLOPs $(15\%)$ , STP can maintain the basic performance and does not cause unbearable performance degradation. It is worth noting that STP can improve performance $(+0.3\%$ on Det mAP@0.75 and $+0.9\%$ on Seg mAP@0.75) with 1.8x speed up $(55\%$ remaining FLOPs). We consider the reason is that the ST guided training framework can drive the pruned network to extract more representative features for downstream tasks. The above observations demonstrate that STP can be simply and practically deployed in different tasks and obtain competitive performance with various target FLOPs, which is friendly for resource-limited edge devices. Besides, the performance improvement suggests the potential of STP to improve the Pareto frontier between FLOPs and performance.
|
| 212 |
+
|
| 213 |
+
# 4.4 Evaluation of Architecture Exploration
|
| 214 |
+
|
| 215 |
+
To verify that our architecture exploration strategy can gradually explore the subnets with outstanding performance, we record the pool in different training epochs. We evaluate the effectiveness from two aspects: 1) performance: the average performance of architectures in the pool 2) clustering: the average sum of squared error (SSE) distance between the clustering center and architectures in the pool, where the higher SSE means lower clustering. Notely, for estimating the clustering of architectures, we convert the normalized sparsity ratio of each layer and depth into a vector and regard it as a proxy of architectures. Due to the unbearable computational overhead of fully training and measuring each subnet in the initialized pool(containing more than 1000 subnets), we conduct another experiment that utilizes the original ST while uniformly sampling the whole pool. After ST, we evaluate all subnets in the initialized pool on the test dataset as the proxy (or a look table) of the architectures' performance.
|
| 216 |
+
|
| 217 |
+
The results are shown in Fig. 6. At the early stage of STP, the randomly initialized pool contains various architectures with low average performance and markedly different structures. As training progresses, the average performance is gradually raised, and at the same time, the similarity of structures also increases. It demonstrates that under the constraint of FLOPs, our strategy can progressively drive the architecture exploration to converge to an optimal region and finally obtain a high-performance architecture for sparsification.
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
Fig. 6: Evaluation of KD guided architecture. The mean sum of suqred main network trained by STP. The horior error (SSE) distance measures the diverzontal axis is the layer index like Fig. 4. Gence of architectures pool, and lower SSE It empirically verifies that STP enhances means higher clustering. During the train- the chosen (kept) parameters with a rela ing, such exploration progressively concent- tive sparsity effect while maintaining the trates on high-performance architectures. magnitude of unchosen (dropped) ones.
|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
|
| 224 |
+
# 4.5 Parameter Magnitude Analysis
|
| 225 |
+
|
| 226 |
+
To verify the relative sparsification effect of STP, we record the average magnitude of the chosen (kept), unchosen (dropped), and baseline (standard training without sparsification) parameters in different convolutional layers of ResNet-50. As illustrated in Fig. 7, the magnitude of chosen parameters is remarkably and consistently higher than the unchosen part in the front layers, while the unchosen part has a similar magnitude as the baseline. It demonstrates that STP achieves the evident relative sparsity effect like the original ST without suppressing the dropped part. Due to the subnet mutating expansion, the unchosen part has small parability of being enhanced, thus, the magnitude of unchosen part is marginally higher than the baseline. There is another phenomenon that in the later layer of stages, the relative sparsification effect becomes less pronounced. That is because during training, for low FLOPs targets, e.g., $15\%$ , the later layers are dropped with a greater probability and sparsified less. Combining with the empirical results in Table 1, we conclude that STP can obtain a sparsity parameter distribution for pruning with less performance degradation.
|
| 227 |
+
|
| 228 |
+
# 5 Conclusion
|
| 229 |
+
|
| 230 |
+
Suppressed sparsification paradigm has been widely utilized in sparsification-based pruning, but suffers from capacity damage before pruning. In this manuscript, we reveal the relative sparsity effect in ST. Based on it, we propose an enhanced sparsification paradigm for structured pruning. Besides, we propose the multidimensional sampling space, subnet mutating extension, and architecture pool exploration strategy, which formulate a one-stage pruning framework, named stimulative training guided pruning (STP), which can obtain a compact network with extremely low FLOPs and high performance. Comprehensive experiments on mainstream datasets and networks verify the effectiveness of STP.
|
| 231 |
+
|
| 232 |
+
# Acknowledgments
|
| 233 |
+
|
| 234 |
+
This work is supported by National Key Research and Development Program of China (No. 2022ZD0160101), National Natural Science Foundation of China (No. 62071127, and 62101137), Shanghai Natural Science Foundation (No. 23ZR1402900), Shanghai Municipal Science and Technology Major Project (No.2021SHZDZX0103). The computations in this research were performed using the CFFF platform of Fudan University.
|
| 235 |
+
|
| 236 |
+
# References
|
| 237 |
+
|
| 238 |
+
1. Aflalo, Y., Noy, A., Lin, M., Friedman, I., Zelnik, L.: Knapsack pruning with inner distillation. arXiv preprint arXiv:2002.08258 (2020)
|
| 239 |
+
2. Aghli, N., Ribeiro, E.: Combining weight pruning and knowledge distillation for cnn compression. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 3191-3198 (2021)
|
| 240 |
+
3. Alvarez, J.M., Salzmann, M.: Learning the number of neurons in deep networks. In: Lee, D., Sugiyama, M., Luxburg, U., Guyon, I., Garnett, R. (eds.) Advances in Neural Information Processing Systems. vol. 29. Curran Associates, Inc. (2016)
|
| 241 |
+
4. Bai, Y., Wang, H., TAO, Z., Li, K., Fu, Y.: Dual lottery ticket hypothesis. In: International Conference on Learning Representations (2021)
|
| 242 |
+
5. Blalock, D., Gonzalez Ortiz, J.J., Frankle, J., Guttag, J.: What is the state of neural network pruning? Proceedings of machine learning and systems 2, 129-146 (2020)
|
| 243 |
+
6. Chen, K., Wang, J., Pang, J., Cao, Y., Xiong, Y., Li, X., Sun, S., Feng, W., Liu, Z., Xu, J., et al.: Mmdetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155 (2019)
|
| 244 |
+
7. Chen, L., Chen, Y., Xi, J., Le, X.: Knowledge from the original network: restore a better pruned network with knowledge distillation. Complex & Intelligent Systems pp. 1-10 (2021)
|
| 245 |
+
8. Chen, T., Chen, X., Ma, X., Wang, Y., Wang, Z.: Coarsening the granularity: Towards structurally sparse lottery tickets. In: International Conference on Machine Learning. pp. 3025-3039. PMLR (2022)
|
| 246 |
+
9. Chen, T., Cheng, Y., Gan, Z., Yuan, L., Zhang, L., Wang, Z.: Chasing sparsity in vision transformers: An end-to-end exploration. Advances in Neural Information Processing Systems 34, 19974-19988 (2021)
|
| 247 |
+
0. Chen, T., Liang, L., Tianyu, D., Zhu, Z., Zharkov, I.: Ototv2: Automatic, generic, user-friendly. In: International Conference on Learning Representations (2023)
|
| 248 |
+
1. Chin, T.W., Ding, R., Zhang, C., Marculescu, D.: Towards efficient model compression via learned global ranking. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 1518-1528 (2020)
|
| 249 |
+
2. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: 2009 IEEE conference on computer vision and pattern recognition. pp. 248-255. IEEE (2009)
|
| 250 |
+
3. Ding, X., Ding, G., Han, J., Tang, S.: Auto-balanced filter pruning for efficient convolutional neural networks. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 32 (2018)
|
| 251 |
+
|
| 252 |
+
14. Ding, X., Hao, T., Tan, J., Liu, J., Han, J., Guo, Y., Ding, G.: Resrep: Lossless cnn pruning via decoupling remembering and forgetting. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 4510-4520 (2021)
|
| 253 |
+
15. Dong, X., Yang, Y.: Network pruning via transformable architecture search. Advances in Neural Information Processing Systems 32 (2019)
|
| 254 |
+
16. Fang, G., Ma, X., Song, M., Mi, M.B., Wang, X.: Depgraph: Towards any structural pruning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 16091-16101 (2023)
|
| 255 |
+
17. Frankle, J., Carbin, M.: The lottery ticket hypothesis: Finding sparse, trainable neural networks. In: International Conference on Learning Representations (2018)
|
| 256 |
+
18. Han, S., Mao, H., Dally, W.J.: Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149 (2015)
|
| 257 |
+
19. Han, S., Pool, J., Tran, J., Dally, W.: Learning both weights and connections for efficient neural network. Advances in neural information processing systems 28 (2015)
|
| 258 |
+
20. Hassibi, B., Stork, D.: Second order derivatives for network pruning: Optimal brain surgeon. Advances in neural information processing systems 5 (1992)
|
| 259 |
+
21. He, K., Fan, H., Wu, Y., Xie, S., Girshick, R.: Momentum contrast for unsupervised visual representation learning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 9729-9738 (2020)
|
| 260 |
+
22. He, K., Gkioxari, G., Dollár, P., Girshick, R.: Mask r-cnn. In: Proceedings of the IEEE international conference on computer vision. pp. 2961-2969 (2017)
|
| 261 |
+
23. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 770-778 (2016)
|
| 262 |
+
24. He, Y., Liu, P., Wang, Z., Hu, Z., Yang, Y.: Filter pruning via geometric median for deep convolutional neural networks acceleration. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 4340-4349 (2019)
|
| 263 |
+
25. He, Y., Zhang, X., Sun, J.: Channel pruning for accelerating very deep neural networks. In: Proceedings of the IEEE international conference on computer vision. pp. 1389-1397 (2017)
|
| 264 |
+
26. Hinton, G., Vinyals, O., Dean, J.: Distilling the knowledge in a neural network. stat 1050, 9 (2015)
|
| 265 |
+
27. Hou, Z., Qin, M., Sun, F., Ma, X., Yuan, K., Xu, Y., Chen, Y.K., Jin, R., Xie, Y., Kung, S.Y.: Chex: Channel exploration for cnn model compression. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 12287-12298 (2022)
|
| 266 |
+
28. Howard, A., Sandler, M., Chu, G., Chen, L.C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., et al.: Searching for mobilenetv3. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 1314-1324 (2019)
|
| 267 |
+
29. Hu, H., Peng, R., Tai, Y.W., Tang, C.K.: Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250 (2016)
|
| 268 |
+
30. Huang, Z., Wang, N.: Data-driven sparse structure selection for deep neural networks. In: Proceedings of the European conference on computer vision (ECCV). pp. 304-320 (2018)
|
| 269 |
+
31. Kim, K., Ji, B., Yoon, D., Hwang, S.: Self-knowledge distillation with progressive refinement of targets. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 6567-6576 (2021)
|
| 270 |
+
|
| 271 |
+
32. Krizhevsky, A., Hinton, G., et al.: Learning multiple layers of features from tiny images (2009)
|
| 272 |
+
33. LeCun, Y., Denker, J., Solla, S.: Optimal brain damage. Advances in neural information processing systems 2 (1989)
|
| 273 |
+
34. Li, H., Asim, K., Igor, D., Hanan, S., Hans, P.G.: Pruning filters for efficient convnets. In: 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings (2017)
|
| 274 |
+
35. Li, T., Li, J., Liu, Z., Zhang, C.: Few sample knowledge distillation for efficient network compression. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 14639-14647 (2020)
|
| 275 |
+
36. Lin, S., Ji, R., Li, Y., Deng, C., Li, X.: Toward compact convnets via structure-sparse regularized filter pruning. IEEE transactions on neural networks and learning systems 31(2), 574-588 (2019)
|
| 276 |
+
37. Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollar, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13. pp. 740-755. Springer (2014)
|
| 277 |
+
38. Liu, B., Wang, M., Foroosh, H., Tappen, M., Pensky, M.: Sparse convolutional neural networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 806-814 (2015)
|
| 278 |
+
39. Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B.: Swin transformer: Hierarchical vision transformer using shifted windows. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2021)
|
| 279 |
+
40. Liu, Z., Mu, H., Zhang, X., Guo, Z., Yang, X., Cheng, K.T., Sun, J.: Metapruning: Meta learning for automatic neural network channel pruning. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 3296-3305 (2019)
|
| 280 |
+
41. Liu, Z., Li, J., Shen, Z., Huang, G., Yan, S., Zhang, C.: Learning efficient convolutional networks through network slimming. In: Proceedings of the IEEE international conference on computer vision. pp. 2736-2744 (2017)
|
| 281 |
+
42. Loshchilov, I., Hutter, F.: Decoupled weight decay regularization (2019)
|
| 282 |
+
43. Louizos, C., Welling, M., Kingma, D.P.: Learning sparse neural networks through 1_0 regularization. In: International Conference on Learning Representations (2018)
|
| 283 |
+
44. Luo, J.H., Wu, J., Lin, W.: Thinet: A filter level pruning method for deep neural network compression. In: Proceedings of the IEEE international conference on computer vision. pp. 5058-5066 (2017)
|
| 284 |
+
45. Ma, H., Chen, T., Hu, T.K., You, C., Xie, X., Wang, Z.: Good students play big lottery better. arXiv preprint arXiv:2101.03255 3 (2021)
|
| 285 |
+
46. Neill, J.O., Dutta, S., Assem, H.: Deep neural compression via concurrent pruning and self-distillation. arXiv preprint arXiv:2109.15014 (2021)
|
| 286 |
+
47. Sui, Y., Yin, M., Xie, Y., Phan, H., Aliari Zonouz, S., Yuan, B.: Chip: Channel independence-based pruning for compact neural networks. Advances in Neural Information Processing Systems 34, 24604-24616 (2021)
|
| 287 |
+
48. Sun, T., Ding, S., Guo, L.: Low-degree term first in resnet, its variants and the whole neural network family. Neural Networks 148, 155-165 (2022)
|
| 288 |
+
49. Tang, S., Ye, P., Li, B., Lin, W., Chen, T., He, T., Yu, C., Ouyang, W.: Boosting residual networks with group knowledge. arXiv preprint arXiv:2308.13772 (2023)
|
| 289 |
+
50. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. Advances in neural information processing systems 30 (2017)
|
| 290 |
+
|
| 291 |
+
51. Veit, A., Wilber, M.J., Belongie, S.: Residual networks behave like ensembles of relatively shallow networks. Advances in neural information processing systems 29 (2016)
|
| 292 |
+
52. Wang, H., Qin, C., Zhang, Y., Fu, Y.: Neural pruning via growing regularization. In: International Conference on Learning Representations (ICLR) (2021)
|
| 293 |
+
53. Wang, H., Zhang, Q., Wang, Y., Yu, L., Hu, H.: Structured pruning for efficient convnets via incremental regularization. In: 2019 International Joint Conference on Neural Networks (IJCNN). pp. 1-8. IEEE (2019)
|
| 294 |
+
54. Wen, W., Wu, C., Wang, Y., Chen, Y., Li, H.: Learning structured sparsity in deep neural networks. Advances in neural information processing systems 29 (2016)
|
| 295 |
+
55. Wu, Y.C., Liu, C.T., Chen, B.Y., Chien, S.Y.: Constraint-aware importance estimation for global filter pruning under multiple resource constraints. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. pp. 686-687 (2020)
|
| 296 |
+
56. Xia, B., He, J., Zhang, Y., Wang, Y., Tian, Y., Yang, W., Van Gool, L.: Structured sparsity learning for efficient video super-resolution. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 22638-22647 (2023)
|
| 297 |
+
57. Xia, M., Zhong, Z., Chen, D.: Structured pruning learns compact and accurate models. arXiv preprint arXiv:2204.00408 (2022)
|
| 298 |
+
58. Yang, H., Wen, W., Li, H.: Deephoyer: Learning sparser neural network with differentiable scale-invariant sparsity measures. In: International Conference on Learning Representations (2019)
|
| 299 |
+
59. Ye, H., Zhang, B., Chen, T., Fan, J., Wang, B.: Performance-aware approximation of global channel pruning for multitask cnns. IEEE Transactions on Pattern Analysis and Machine Intelligence 45(8), 10267-10284 (2023)
|
| 300 |
+
60. Ye, P., He, T., Tang, S., Li, B., Chen, T., Bai, L., Ouyang, W.: Stimulative training++: Go beyond the performance limits of residual networks. arXiv preprint arXiv:2305.02507 (2023)
|
| 301 |
+
61. Ye, P., Li, B., Li, Y., Chen, T., Fan, J., Ouyang, W.: $\beta$ -darts: Beta-decay regularization for differentiable architecture search. In: 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 10864-10873. IEEE (2022)
|
| 302 |
+
62. Ye, P., Tang, S., Li, B., Chen, T., Ouyang, W.: Stimulative training of residual networks: A social psychology perspective of loafing. Advances in Neural Information Processing Systems 35, 3596-3608 (2022)
|
| 303 |
+
63. You, Z., Yan, K., Ye, J., Ma, M., Wang, P.: Gate decorator: Global filter pruning method for accelerating deep convolutional neural networks. Advances in neural information processing systems 32 (2019)
|
| 304 |
+
64. Yu, J., Huang, T.: Autoslim: Towards one-shot architecture search for channel numbers. arXiv preprint arXiv:1903.11728 (2019)
|
| 305 |
+
65. Yu, J., Yang, L., Xu, N., Yang, J., Huang, T.: Slimmable neural networks. arXiv preprint arXiv:1812.08928 (2018)
|
| 306 |
+
66. Yu, S., Chen, T., Shen, J., Yuan, H., Tan, J., Yang, S., Liu, J., Wang, Z.: Unified visual transformer compression. arXiv preprint arXiv:2203.08243 (2022)
|
| 307 |
+
67. Zagoruyko, S., Komodakis, N.: Wide residual networks. In: British Machine Vision Conference 2016. British Machine Vision Association (2016)
|
enhancedsparsificationviastimulativetraining/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d61f7168983a88a614874ed35f24e9c84b3f57c9b4e43b532be938864732a1e1
|
| 3 |
+
size 606235
|
enhancedsparsificationviastimulativetraining/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0cb1ab5ed37bb00591b8c3e0c59990c40e536243f5cdde1b7b3bd807412d56b1
|
| 3 |
+
size 455252
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8af5239eb4e069d19a5426a2ff3e84550655f69ec118f765234c611dd5c78a5c
|
| 3 |
+
size 78967
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2b9289050449d2b2586e56308ef5b1f84b560d0ec8c251a959343070c56ab8c
|
| 3 |
+
size 95415
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/9b98dda8-faac-47df-8548-2e23b0243182_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f198b4c279731dece67e4a9da9637f8f6c6a8c9890b80c7ef4c8a80ea165263
|
| 3 |
+
size 4463736
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/full.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Enhancing Cross-Subject fMRI-to-Video Decoding with Global-Local Functional Alignment
|
| 2 |
+
|
| 3 |
+
Chong Li\*, Xuelin Qian\*, Yun Wang\*, Jingyang Huo, Xiangyang Xue\*, Yanwei Fu\*, and Jianfeng Feng
|
| 4 |
+
|
| 5 |
+
Fudan University, Shanghai, China {lichong23, jyhuo22}@m.fudan.edu.cn, {xlqian,19110850009,xyxue,yanweifu,jffeng}@fudan.edu.cn
|
| 6 |
+
|
| 7 |
+
Abstract. Advancements in brain imaging enable the decoding of thoughts and intentions from neural activities. However, the fMRI-to-video decoding of brain signals across multiple subjects encounters challenges arising from structural and coding disparities among individual brains, further compounded by the scarcity of paired fMRI-stimulus data. Addressing this issue, this paper introduces the fMRI Global-Local Functional Alignment (GLFA) projection, a novel approach that aligns fMRI frames from diverse subjects into a unified brain space, thereby enhancing cross-subject decoding. Additionally, we present a meticulously curated fMRI-video paired dataset comprising a total of 75k fMRI-stimulus paired samples from 8 individuals. This dataset is approximately 4.5 times larger than the previous benchmark dataset. Building on this, we augment a transformer-based fMRI encoder with a diffusion video generator, delving into the realm of cross-subject fMRI-based video reconstruction. This innovative methodology faithfully captures semantic information from diverse brain signals, resulting in the generation of vivid videos and achieving an impressive average accuracy of $84.7\%$ in cross-subject semantic classification tasks.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Deciphering thoughts requires a universal method for decoding brain activity across individuals, with a key challenge being aligning brain signals to preserve shared information [2, 17, 29]. Neuroimaging and deep learning advances focus on understanding cognitive processes, where functional MRI (fMRI) plays a central role in non-invasive whole-brain activity recording and decoding [33]. Recent efforts have decoded fMRI data into text [22], images [5, 21, 22, 24, 25] and 3D objects [10]. However, this paper focuses on decoding dynamic videos from scanned fMRI, reflecting continuous visual experiences of individuals, a task pioneered
|
| 12 |
+
|
| 13 |
+
in [6]. This task poses significant challenges yet holds promise for practical applications.
|
| 14 |
+
|
| 15 |
+
However, numerous challenges exist in this task. Firstly, newly obtained fMRI data from unknown subjects may significantly differ from existing datasets due to variations in anatomical structure and functional topography among individuals, complicating practical use [7, 11, 39]. This limitation means that fMRI-to-video decoding is often limited to individual-specific approaches, as in [6], which is less than ideal. Secondly, the high costs associated with acquiring fMRI scans limit the availability of data. This poses a significant challenge, especially in fMRI-to-video decoding, where capturing dynamic changes in human brain activity requires frequent snapshots over time.
|
| 16 |
+
|
| 17 |
+
One potential way to addressing the first challenge involves aligning both anatomical and functional aspects of subjects' neural activities [9, 17]. Anatomical alignment transforms fMRI data into a standard brain template based on structural MRI images [4]. Functional alignment [2, 7] aims to connect neural activities across subjects. These methods reduce variability in fMRI data and enhance cross-subject brain decoding accuracy. However, recent computer vision works focus on within-subject brain decoding, translating brain activity into various formats [5, 6, 10, 21, 22, 22, 24, 25]. Despite promising results, reliance on subject-specific voxel subsets in regions of interest (ROI) still limits cross-subject decoding due to voxel variability. Integrating alignment methods is crucial to improve cross-subject brain decoding capabilities. For example, Qian et al. [26] aligned fMRI to $32\mathrm{k\_fs\_LR}$ surface space [13], revealing suboptimal cross-subject performance compared to a previous within-subject decoding method [5]. MindTuner [14] integrated alignment methods as preprocessing to achieve cross-subject decoding. Additionally, MindBridge [37] employed deep learning for functional alignment method.
|
| 18 |
+
|
| 19 |
+
Unfortunately, achieving precise inter-subject functional correspondence based solely on anatomical features remains limited [7]. To address this limitation and enhance cross-subject decoding, we introduce Global-Local Functional Alignment (GLFA). GLFA addresses functional alignment at both local and global levels by learning an fMRI transformation to a unified functional brain space through global and local alignment. This integration is facilitated into the training process using an alignment loss function, enabling easy adaptation to any fMRI decoding model based on gradient descent learning. Further, we integrate GLFA into the fMRI Pretrained Transformer Encoder (fMRI-PTE) [26] to enhance its cross-subject decoding capabilities. Additionally, we augment the model with a spatiotemporal attention module and video stable diffusion pipeline, resulting in the development of a high-quality cross-subject fMRI-to-video decoding pipeline for the first time.
|
| 20 |
+
|
| 21 |
+
Furthermore, we provide a significant contribution to the fMRI-to-video decoding task, complementing previous data in [6]. We curated an fMRI-video paired dataset from 8 subjects, comprising $75\mathrm{k}$ fMRI-stimulus samples. This dataset is approximately 4.5 times larger than the previous benchmark dataset [40], mitigating the scarcity of fMRI-stimulus paired data. With increased sub
|
| 22 |
+
|
| 23 |
+
jects and samples, our dataset serves as a crucial foundation for cross-subject decoding from fMRI to video.
|
| 24 |
+
|
| 25 |
+
In our experiment, we evaluated the impact of functional alignment on enhancing cross-subject decoding. Applying functional alignment to an unknown subject resulted in an average $35.8\%$ improvement in fMRI spatial correlation with other subjects, and a $17.1\%$ increase in inter-subject correlation. This underscores GLFA's effectiveness in extracting cross-subject correlations. Additionally, we used GLFA for cross-subject fMRI-to-video decoding, achieving high-quality, high-frame-rate video reconstruction from fMRI data. Comparing with state-of-the-art baselines, GLFA demonstrated an average accuracy of $84.7\%$ in semantic classification tasks for cross-subject video reconstruction. Moreover, within-subject decoding showed comparable performance with state-of-the-art methods.
|
| 26 |
+
|
| 27 |
+
Finally, we would like to highlight some interesting and special points of this paper here: (1) Focusing on Dynamic Video Decoding: The paper concentrates on decoding dynamic videos from scanned fMRI, known as MinD-Video [6]. It aligns both anatomical and functional aspects of subjects' neural activities to enhance cross-subject brain decoding accuracy by reducing variability. (2) Proposed GLFA: To improve cross-subject decoding, the paper introduces GLFA, which integrates functional alignment into the training process to enhance fMRI decoding models using gradient descent learning, mitigating cross-subject variance. (3) Integration into fMRI-PTE: GLFA is added to fMRI-PTE [26] to enhance cross-subject decoding, along with a spatiotemporal attention module and video stable diffusion pipeline. This achieves high-quality cross-subject fMRI-to-video generation, with an average accuracy of $84.7\%$ in cross-subject semantic classification tasks. (4) Contributions to Data and Experimentation: The paper provides a large dataset for fMRI-to-video decoding, around 4.5 times larger than previous benchmarks [40], alleviating the shortage of fMRI-stimulus paired data. GLFA experiments demonstrated notable enhancements in fMRI spatial and inter-subject correlation, as well as high-quality video reconstruction and semantic classification tasks for cross-subject video reconstruction.
|
| 28 |
+
|
| 29 |
+
# 2 Related Work
|
| 30 |
+
|
| 31 |
+
# 2.1 Functional Alignment
|
| 32 |
+
|
| 33 |
+
Two primary types of functional alignment have been extensively studied, with each focusing on alignment either in anatomical brain space [2, 7, 20, 32] or a common space with high dimensions [11, 16]. For instance, Bazeille et al. [2, 3] divided brain into parcels and applied optimal transport theory to construct a whole-brain template. Conroy et al. [7] proposed pairwise cortical alignment to maximize the functional similarity of inter-subject patterns. Haxby et al. [16] introduced a hyperalignment method to align response-patterns across subjects into a high-dimensional model space. Gao et al. [11] proposed the Deep Cross-subject Adaptation Decoding (DCAD) framework for unsupervised deciphering
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Benchmark dataset (Wen et al., 2017)
|
| 37 |
+
Fig. 1: Comparison between the benchmark dataset [40] and our dataset. Our dataset undergoes fMRI collection with multiple subjects under two distinct video datasets. This facilitates not only cross-subject decoding but also cross-dataset decoding. Additionally, in comparison to the previous benchmark dataset [40], ours encompasses a larger number of subjects and approximately 4.5 times more fMRI stimulus samples. This enhancement better caters to the task of cross-subject fMRI video decoding.
|
| 38 |
+
|
| 39 |
+
the brain states. In this paper, we amalgamate the principles of these functional alignments and propose the global-local functional alignment, capable of simultaneously aligning fMRI in anatomical and high-dimensional spaces.
|
| 40 |
+
|
| 41 |
+
# 2.2 fMRI-to-Video Reconstruction
|
| 42 |
+
|
| 43 |
+
Humans continually receive visual stimulation from the external environment, and the brain consistently encodes these inputs. Various studies have devoted to reconstruct visual experience from brain activity [6,15,40], but their generalization are limited. For example, Wen et al. [40] curated an fMRI-video paired dataset and utilized a CNN for video reconstruction. However, their approach could only capture the position and outline of objects from the original video without extracting semantic information. Furthermore, while evaluating cross-subject reconstruction, their selection of activated voxels restricted its generalization to individuals beyond the dataset. Han et al. [15] employed a pretrained VAE for video frame reconstruction by aligning fMRI to latent space. In contrast, Wang et al. [35] proposed conditional GAN to directly generate video from fMRI. Further, Chen et al. [6] introduced CLIP to train fMRI latents and translated them using a video stable diffusion pipeline. Despite achieving high performance, the reconstructions remain subject-specific. Practical "mind reading" applications demand further exploration of cross-subject methods.
|
| 44 |
+
|
| 45 |
+
# 3 Method
|
| 46 |
+
|
| 47 |
+
In our fMRI-to-video pipeline, all fMRI frames are transformed to a standard anatomical brain template [13] to enable cross-subject decoding. Consequently,
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Fig. 2: Diagram of cross-subject fMRI-to-video pipeline. (a) The fMRI frames from different subjects are mapped to a unified brain space through Global-Local Functional Alignment (GLFA) Module. For unknown subjects, the learned GLFA Module can similarly map them to the unified brain space, reducing disparity between individuals. (b) Our method employs a two-stage approach to train an fMRI-to-video pipeline. In the first stage, we project fMRI embedding onto the CLIP latent space and calculate the CLIP loss by comparing them with paired image and text embedding. This allows us to capture rich semantic information in the CLIP space. In the second stage, we integrate a pretrained text-to-video pipeline and train it using fMRI embedding as a replacement for text embedding.
|
| 51 |
+
|
| 52 |
+
we opt for a large-scale fMRI Pretrained Transformer Encoder (fMRI-PTE) [26], pretrained on anatomically aligned fMRI. Building upon this, we introduce Global-Local Functional Alignment (GLFA), a shared-among-subjects fMRI projection aiming to capture the functional correspondence between voxels from different subjects, enhancing the model's cross-subject decoding capability. Additionally, we augment the fMRI encoder with a video diffusion model, and adopt a progressive learning procedure similar to the MinD-Video [6], comprising fMRI encoder pre-training, multi-modal contrastive learning, and co-training with video generator.
|
| 53 |
+
|
| 54 |
+
# 3.1 fMRI data acquisition
|
| 55 |
+
|
| 56 |
+
As shown in Figure 1, in order to address the challenge of limited data availability in fMRI-video reconstruction, we have meticulously curated an fMRI-
|
| 57 |
+
|
| 58 |
+
video paired dataset, incorporating data from 8 subjects and comprising $75\mathrm{k}$ fMRI-stimulus samples. This dataset is approximately 4.5 times larger than the previous benchmark dataset [40].
|
| 59 |
+
|
| 60 |
+
In detail, stimuli videos of dimensions $256 \times 256$ and $596 \times 336$ are sourced from the FCVID video dataset [18] and WebVid [1] dataset respectively (Figure 1). Within the FCVID dataset, a selection of 100 video categories, encompassing diverse events, scenes, and objects (e.g., accordion performances, amusement parks, and elephants), is chosen. For each category, 4 10-second clips are meticulously selected, with 3 assigned to the training set and 1 to the test set. Random combinations of these clips result in 6 500-second videos for both training and test sets, ensuring each training clip appeared once and each test clip appeared three times.
|
| 61 |
+
|
| 62 |
+
For the widely used WebVid dataset in text-to-video synthesis, we curated a selection of 1200 8-second clips. Subsequently, 5 subjects are tasked with viewing these videos in random order, with 1000 clips designated for the training set and the remaining 200 clips allocated to the test set. Videos from test set are viewed twice to reduce noise, exclusively originate from the WebVid test set. Additionally, in between consecutive clips, a 2.4-second blank interval is introduced to allow the participants to clear their minds, thereby reducing the overlap of neural activity encoding information from different videos. In the experiment, 8 subjects (6 male and 2 female, aged 23-27, 3 for FCVID and 5 for WebVid) participated, and fMRI data are acquired using a 3T scanner and a 32-channel RF head coil, with the fMRI sampled at 1 frame per 0.8 seconds. Each participant in our fMRI scanning experiment provided informed written consent, and the experimental protocol received approval from the ethical review board.
|
| 63 |
+
|
| 64 |
+
# 3.2 The fMRI Pre-processing
|
| 65 |
+
|
| 66 |
+
In order to enhance the practical applicability of the model, we align fMRI data to the 32k.fs_LR brain surface space through anatomical structure [13]. In contrast to traditional fMRI decoding methods that flatten each frame of fMRI into a 1D signal and select subject-specific activated voxels, our approach transforms fMRI into a unified representation across subjects. We further apply voxel-wise z-transformation to the fMRI and unfold the surface, creating a 2D image that preserves spatial relationships between adjacent voxels. Additionally, given that only a portion of the brain area is activated in visual stimulation tasks [17], we select early and higher visual cortical Regions of Interest (ROIs). These ROIs, totaling 8,405 vertices, are defined by the HCP-MMP atlas [12] in the 32k.fs_LR space.
|
| 67 |
+
|
| 68 |
+
Finally, each fMRI is transformed to a $256 \times 256$ single-channel image. For the dataset with multiple runs for same video, the fMRI frames are averaged across aligned recordings. Due to the time lag between stimulus input and the BOLD signal reaching its peak caused by the natriue of hemodynamic response, a shift of around 6 seconds is applied to the fMRI data.
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Fig. 3: Presentation of fMRI-video-text paired data sample.
|
| 72 |
+
|
| 73 |
+
# 3.3 Paired fMRI-Video-Text Sample
|
| 74 |
+
|
| 75 |
+
As depicted in Figure 3, we utilize a sliding window in the temporal dimension for aligned fMRI-video data, covering $\alpha T$ seconds of fMRI data and $T$ seconds of video data. Consequently, the fMRI-to-video reconstruction task is reformulated as reconstructing $T$ seconds of video from $\alpha T$ seconds of fMRI signals. Assuming the window comprises $n$ frames of fMRI and $m$ frames of video, for the $i$ -th data sample, the fMRI data $\mathbf{F}_i \in \mathbb{R}^{n \times H_f \times W_f}$ , with $H_{f}$ and $W_{f}$ denoting the height and width of the unfolded fMRI image, and the video data $\mathbf{V}_i \in \mathbb{R}^{m \times 3 \times H_v \times W_v}$ , where $H_{v}$ and $W_{v}$ represent the resolution of the video. To facilitate multi-modal contrastive learning, we employ BLIP-2 [19] to describe each frame of the video, yielding $m$ text representations.
|
| 76 |
+
|
| 77 |
+
# 3.4 fMRI-to-Video Pipeline
|
| 78 |
+
|
| 79 |
+
fMRI-PTE We apply the fMRI-PTE [26], featuring a ViT-based autoencoder structure to compress high-dimensional fMRI signals into a low-dimensional feature space, as our fMRI encoder. The model consists of two main parts: compression encoding and decoding reconstruction. During the encoding phase, the 2D fMRI image is partitioned into $p$ square patches, with each patch treated as a token capturing spatial relationships among adjacent voxels. The patchified fMRI is then converted into fMRI token embedding $\mathbf{F}_i^{emb} \in \mathbb{R}^{(p+1) \times D}$ by cascaded spatial attention blocks, where $D$ is embedding size. In the decoding phase, the patch tokens are discarded, retaining only the [CLS] token embedding $\mathbf{F}_i^{CLS} \in \mathbb{R}^{1 \times D}$ . After passing through multiple cascaded spatial attention blocks, the [CLS] token embedding is reconstructed back into an fMRI image.
|
| 80 |
+
|
| 81 |
+
Additionally, the fMRI-PTE is pretrained on resting-state fMRI data sourced from the UK Biobank dataset [23]. To reduce the disparity in datasets, the model undergoes further fine-tuning on the fMRI dataset we used, ensuring the acquisition of general knowledge.
|
| 82 |
+
|
| 83 |
+
Spatiotemporal Attention for Sequential fMRI Frames To enhance the model's capability to handle sequential fMRI inputs and effectively decode videos
|
| 84 |
+
|
| 85 |
+
by learning temporal correlations, we augment fMRI-PTE with spatiotemporal attention. Initially, for the input fMRI data $\mathbf{F}_i$ , we obtain the fMRI embedding $\mathbf{F}_i^{emb} \in \mathbb{R}^{n \times (p + 1) \times D}$ by solely passing each frame to fMRI-PTE and then concatenating the results. To implement spatiotemporal attention, we employ the network inflation trick [41]. Specifically, using the attention calculation as $\mathrm{attn} = \mathrm{softmax}\left(\frac{QK^T}{\sqrt{d}}\right)$ , the query and key of spatial attention are derived as $Q = \mathbf{F}_i^{emb} \cdot W_{\mathrm{spat}}^Q$ , $K = \mathbf{F}_i^{emb} \cdot W_{\mathrm{spat}}^K$ . Let $\mathbf{F}_i^{emb} \in \mathbb{R}^{(p + 1) \times n \times D}$ represent the result of exchanging the first two dimensions of $\mathbf{F}_i^{emb}$ , the query and key of temporal attention are similarly derived as $Q = \mathbf{F}_i^{emb} \cdot W_{\mathrm{temp}}^Q$ , $K = \mathbf{F}_i^{emb} \cdot W_{\mathrm{temp}}^K$ .
|
| 86 |
+
|
| 87 |
+
Moreover, in contrast to MinD-Video [6], which substitutes spatial attention with spatiotemporal attention within the pretrained encoder, we adopt a simpler approach by appending the encoder with spatiotemporal attention to avoid disturbing the pretrained encoder.
|
| 88 |
+
|
| 89 |
+
Finally, following spatiotemporal aggregation, two projectors convert the attention results into fMRI embedding $emb_{f} \in \mathbb{R}^{K \times C}$ and fMRI CLIP latent $emb_{f}^{CLIP} \in \mathbb{R}^{1 \times C}$ , where $K$ is the token number of text embedding, and $C$ is the embedding size of text embedding and CLIP latent space.
|
| 90 |
+
|
| 91 |
+
Video Generator To achieve high-quality video reconstruction, we employ ModelScopeT2V [36], a text-to-video synthesis model including VQGAN [8] and Denoising UNet [31], as our video generator. Building upon the text-to-image Stable Diffusion [30], it incorporates spatiotemporal attention and undergoes pretraining on large-scale video-text paired datasets. This model is able to capture temporal correspondence from text input and generate high-quality continuous videos of varying frame numbers. As illustrated in Figure 2(b), during video reconstruction from fMRI, the fMRI embedding $emb_{f}$ takes the place of the text embedding as the conditional input for the UNet of video generator.
|
| 92 |
+
|
| 93 |
+
# 3.5 Global-Local Functional Alignment
|
| 94 |
+
|
| 95 |
+
In the fMRI preprocessing, we achieve anatomical alignment in the 32k.fs_LR brain surface space. To further capture the functional correspondence between voxels across subjects, we introduce Global-Local Functional Alignment (GLFA) to our model.
|
| 96 |
+
|
| 97 |
+
For an fMRI sample $\mathbf{F}_i\in \mathbb{R}^{n\times H_f\times W_f}$ , a widely used functional alignment method, such as Pairwise Cortical Alignment [7], employs a voxel-to-voxel mapping, requiring the learning of a large projection matrix $\mathbf{W}\in \mathbb{R}^{H_fW_f\times H_fW_f}$ . To reduce the resource consumption, similar to [2], we partition the fMRI image into parcels of $H_{p}\times W_{p}$ and only learn a $\mathbf{W}^{parcell}\in \mathbb{R}^{\frac{H_fW_f}{H_pW_p}\times\frac{H_fW_f}{H_pW_p}}$ matrix. Specifically, the fMRI image $\mathbf{F}_i$ is patched to be $\mathbf{F}_i^{parcell}\in \mathbb{R}^{n\times H_pW_p\times\frac{H_fW_f}{H_pW_p}}$ , and the intermediate result of functional alignment is derived as
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\hat {\mathbf {F}} _ {i} = \mathbf {F} _ {i} ^ {p a r c e l} \cdot \mathbf {W} ^ {p a r c e l} \tag {1}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
As parcel-wise connections are established at the whole-brain level, Eq.(1) plays the role of global functional alignment. Further, $\hat{\mathbf{F}}_i$ is reshaped back to $\mathbb{R}^{n\times H_f\times W_f}$ and a locally connected 2D layer, functioning similarly to the Conv2D layer but with unshared weights, is applied to $\hat{\mathbf{F}}_i$ to capture the local disparities among neighboring voxels. Consequently, the final aligned fMRI is denoted as
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathbf {F} _ {i} ^ {\text {a l i g n e d}} = \text {L o c a l l y C o n n e c t e d 2 D} (\hat {\mathbf {F}} _ {i}, k s) \tag {2}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where $ks$ denotes the convolutional kernel size and the stride is set to 1. Through local functional alignment (Eq.(2)), each voxel has its unique kernel to learn correspondence with neighboring voxels. Combining Eq.(1) and Eq.(2), our GLFA achieves functional alignment simultaneously at both the global and local levels.
|
| 110 |
+
|
| 111 |
+
In order to train the GLFA, we introduce two loss functions: alignment loss $\mathcal{L}_{\text{align}}$ and consistency loss $\mathcal{L}_{\text{const}}$ . On the one hand, the aligned fMRI of different individuals with same stimulation should be close to each other. On the other hand, the information in original fMRI should be preserved after the mapping. Thus the loss function can be derived as $\mathcal{L}_{\text{align}}(s_a, s_b) = \|\mathbf{F}_{i,s_a}^{\text{aligned}} - \mathbf{F}_{i,s_b}^{\text{aligned}}\|_F^2$ and $\mathcal{L}_{\text{const}}(s_a) = \|\mathbf{F}_{i,s_a}^{\text{aligned}} - \mathbf{F}_{i,s_a}\|_F^2$ , where $\| \cdot \|_F$ represents Frobenius norm, and $s_a, s_b$ denote different subjects. The loss for GLFA is further derived as
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\mathcal {L} _ {G L F A} = \frac {1}{N _ {\text {a l i g n}}} \sum_ {a < b} \mathcal {L} _ {\text {a l i g n}} \left(s _ {a}, s _ {b}\right) + \lambda \left(\mathcal {L} _ {\text {c o n s t}} \left(s _ {a}\right) + \mathcal {L} _ {\text {c o n s t}} \left(s _ {b}\right)\right) \tag {3}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
# 3.6 Training Strategy
|
| 118 |
+
|
| 119 |
+
Pretraining Due to disparities between datasets, we conduct fine-tuning on the fMRI-PTE using the fMRI data of the benchmark dataset [40] and our curated dataset, respectively. We only apply reconstruction loss [26] during fine-tuning, allowing the model to acquire general knowledge.
|
| 120 |
+
|
| 121 |
+
Contrastive Learning During the stage-1 contrastive learning phase, a random frame image along with its corresponding caption is chosen for each data sample. As shown in Figure 2(b), these are then transformed into image latent and text latent $emb_{i}^{CLIP}$ , $emb_{t}^{CLIP} \in \mathbb{R}^{B \times C}$ using a frozen pre-trained CLIP ViT-H/14 Encoder [27]. CLIP loss [28] is subsequently calculated with the fMRI latent. The stage-1 loss is defined as follows.
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\mathcal {L} _ {\text {s t a g e 1}} = \left(L _ {\text {C L I P}} \left(e m b _ {f} ^ {\text {C L I P}}, e m b _ {i m g} ^ {\text {C L I P}}\right) + \mathcal {L} _ {\text {C L I P}} \left(e m b _ {f} ^ {\text {C L I P}}, e m b _ {t x t} ^ {\text {C L I P}}\right)\right) / 2 \tag {4}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $\mathcal{L}_{CLIP}(a,b) = \mathrm{CrossEntropy}(\epsilon a\cdot b^{\mathrm{T}},[1,2,\dots ,B])$ , and $\epsilon$ is a scaling factor.
|
| 128 |
+
|
| 129 |
+
Co-training with Video Generator After the contrastive learning phase, we utilize the fMRI embedding as input to the cross-attention module of the UNet for conditioning the video on fMRI.
|
| 130 |
+
|
| 131 |
+
Each frame of the video sample $\mathbf{V}_i = [v_{i,1}, v_{i,2}, \dots, v_{i,m}]$ is individually encoded using VQGAN encoder $\mathcal{E}$ , resulting in the ground-truth latent variable
|
| 132 |
+
|
| 133 |
+
Table 1: Results of cross-subject alignment metrics. All the fMRI spatial correlation and ISC increase significantly after GLFA processing. The metrics related to testing on unknown subjects are marked in bold.
|
| 134 |
+
|
| 135 |
+
<table><tr><td></td><td colspan="6">benchmark dataset [40]</td><td colspan="6">our dataset</td></tr><tr><td></td><td rowspan="2">Task</td><td colspan="3">fSC↑</td><td colspan="2">ISC↑</td><td colspan="3">fSC↑</td><td colspan="3">ISC↑</td></tr><tr><td></td><td>1/2</td><td>1/3</td><td>2/3</td><td>1</td><td>2</td><td>3</td><td>1/2</td><td>1/3</td><td>2/3</td><td>1</td><td>2</td></tr><tr><td>fMRI-PTE [26]</td><td>-</td><td>.461</td><td>.358</td><td>.357</td><td>.569</td><td>.545</td><td>.496</td><td>.015</td><td>.005</td><td>.021</td><td>.012</td><td>.030</td></tr><tr><td rowspan="3">GLFA</td><td>1,2→3</td><td>.692</td><td>.517</td><td>.538</td><td>.700</td><td>.715</td><td>.597</td><td>.040</td><td>.015</td><td>.045</td><td>.036</td><td>.055</td></tr><tr><td>1,3→2</td><td>.542</td><td>.559</td><td>.503</td><td>.681</td><td>.630</td><td>.652</td><td>.027</td><td>.012</td><td>.046</td><td>.033</td><td>.054</td></tr><tr><td>2,3→1</td><td>.552</td><td>.506</td><td>.581</td><td>.656</td><td>.685</td><td>.666</td><td>.033</td><td>.014</td><td>.055</td><td>.031</td><td>.061</td></tr></table>
|
| 136 |
+
|
| 137 |
+
$Z_0^{gt} = [\mathcal{E}(v_{i,1}),\dots ,\mathcal{E}(v_{i,m})]\in \mathbb{R}^{m\times \frac{H_v}{8}\times \frac{W_v}{8}\times 4}$ . During training, the diffusion process add Gaussian noise $[\epsilon_1^{gt},\dots ,\epsilon_T^{gt}]$ for T steps to $Z_0^{gt}$ , obtaining $[Z_0^{gt},\dots ,Z_T^{gt}]$ , with signal-to-noise ratio gradually decreasing. Subsequently, the UNet $\epsilon_{\theta}$ operates on the latent space to predict the noise of each step: $\epsilon_t^{pr} = \epsilon_\theta (Z_t^{gt},emb_f,t)$ . A denoising loss, minimizing the difference between the predicted noise $\epsilon_t^{pr}$ and ground-truth noise $\epsilon_t^{gt}$ , is formulated as Eq. (5):
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
\mathcal {L} _ {\text {d e n o i s e}} = \mathbb {E} _ {Z _ {t} ^ {g t}, \epsilon_ {t} ^ {g t} \sim \mathcal {N} (0, 1), t} \left[ \| \epsilon_ {t} ^ {g t} - \epsilon_ {t} ^ {p r} \| _ {2} ^ {2} \right] \tag {5}
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
Given that different subjects share the same ground-truth video, $\mathcal{L}_{\text{denoise}}$ can serve a similar function to embedding alignment [16]. Thus, by combining $\mathcal{L}_{\text{GLFA}}$ and $\mathcal{L}_{\text{denoise}}$ , the stage-2 loss enables the model to simultaneously align fMRI in voxel-level and embedding-level spaces.
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\mathcal {L} _ {\text {s t a g e 2}} = \mathcal {L} _ {\text {d e n o i s e}} + \mathcal {L} _ {\text {G L F A}} \tag {6}
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
Moreover, to retain the original knowledge in the text-to-video generator, we exclusively fine-tune self attention, cross attention and temporal convolution networks in UNet to achieve fMRI-conditioned video generation.
|
| 150 |
+
|
| 151 |
+
During the inference phase, the average of all training fMRI is used as the negative condition. The UNet generates $Z_0^{pr} = [z_1^{pr}, \dots, z_m^{pr}]$ from random noise $Z_T^{pr}$ . Then $Z_1^{pr}$ is decoded by the VQGAN decoder $\mathcal{D}$ to obtain the reconstructed video $\mathbf{V}_i^{pr} = [\mathcal{D}(z_1^{pr}), \dots, \mathcal{D}(z_m^{pr})]$ .
|
| 152 |
+
|
| 153 |
+
# 4 Experiments
|
| 154 |
+
|
| 155 |
+
# 4.1 Dataset
|
| 156 |
+
|
| 157 |
+
Pre-training dataset The UK Biobank (UKB) [23] serves as an extensive biomedical database and research repository, encompassing comprehensive genetic and health-related information from approximately half a million participants in the UK. It is utilized for pretraining, specifically using a partial dataset that includes resting-state fMRI data from around 39,630 subjects. Each subject contributes one session, comprising 490 volumes.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Fig. 4: Results of cross-subject fMRI-to-video Reconstruction. Our model (GLFA) demonstrates the ability to generate videos with greater semantic accuracy.
|
| 161 |
+
|
| 162 |
+
Paired fMRI-Video Dataset We conducted experiments on both benchmark dataset [40] and our curated dataset. The benchmark fMRI-video dataset [40] involves three subjects, and fMRI frames are acquired using a 3T MRI scanner with a 2-second TR. This dataset consists of totaling $\sim 3$ video hours, providing $\sim 5.5\mathrm{k}$ paired fMRI-stimulus examples for each individual. Our dataset incorporates data from 8 subjects and comprises $75\mathrm{k}$ paired fMRI-stimulus samples, which is approximately 4.5 times larger than the benchmark dataset [40]. Our dataset is available in https://huggingface.co/datasets/Fudan-fMRI/fMRI-Video.
|
| 163 |
+
|
| 164 |
+
# 4.2 Implementation Details
|
| 165 |
+
|
| 166 |
+
For both datasets, we employed an fMRI window of $\alpha T = 4s$ to generate videos with a duration of $T = 2s / 4s$ . The videos from the benchmark dataset were downsampled to 8 FPS, while the videos from our dataset were downsampled to 5 FPS (FCVID) and 3 FPS (WebVid) respectively. All training and inference procedures were carried out on a single NVIDIA A100 GPU. For specific hyperparameter configurations and more detail during each training stage, please refer to the Supplementary Code and models are available at https://github.com/chongjg/GLFA-fmri-video.
|
| 167 |
+
|
| 168 |
+
Competitors. (1) MinD-Video [6]: State-of-the-art within-subject fMRI-to-video pipeline on the benchmark dataset [40]. (2) LEA [25]: Baseline method that does not require complex training. It directly employs ridge regression to convert fMRI latents into text embeddings and subsequently reconstructs
|
| 169 |
+
|
| 170 |
+
Table 2: Results of fMRI-to-video generation performance on cross-subject decoding. Evaluations are provided for diverse subjects on the benchmark dataset [40] and our dataset. All metrics that surpass the baseline (LEA [25]) are indicated in bold.
|
| 171 |
+
|
| 172 |
+
<table><tr><td rowspan="3"></td><td rowspan="3">Task</td><td rowspan="3">Methods</td><td colspan="2">Video-based</td><td colspan="3">Frame-based</td></tr><tr><td colspan="2">Semantic-level</td><td colspan="2">Semantic-level</td><td>Structure-level</td></tr><tr><td>2-way</td><td>50-way</td><td>2-way</td><td>50-way</td><td>SSIM</td></tr><tr><td rowspan="9">benchmark dataset [40]</td><td colspan="2">LEA [25]</td><td>0.811</td><td>0.136</td><td>0.750</td><td>0.108</td><td>0.139</td></tr><tr><td colspan="2">1,2→3 fMRI-PTE-V</td><td>0.834</td><td>0.182</td><td>0.765</td><td>0.107</td><td>0.161</td></tr><tr><td colspan="2">GLFA</td><td>0.847</td><td>0.193</td><td>0.777</td><td>0.116</td><td>0.172</td></tr><tr><td colspan="2">LEA</td><td>0.809</td><td>0.128</td><td>0.765</td><td>0.101</td><td>0.138</td></tr><tr><td colspan="2">1,3→2 fMRI-PTE-V</td><td>0.844</td><td>0.174</td><td>0.762</td><td>0.104</td><td>0.130</td></tr><tr><td colspan="2">GLFA</td><td>0.838</td><td>0.175</td><td>0.768</td><td>0.105</td><td>0.167</td></tr><tr><td colspan="2">LEA</td><td>0.811</td><td>0.125</td><td>0.762</td><td>0.120</td><td>0.137</td></tr><tr><td colspan="2">2,3→1 fMRI-PTE-V</td><td>0.846</td><td>0.179</td><td>0.771</td><td>0.123</td><td>0.151</td></tr><tr><td colspan="2">GLFA</td><td>0.837</td><td>0.179</td><td>0.781</td><td>0.126</td><td>0.181</td></tr><tr><td rowspan="6">our dataset</td><td rowspan="2">1,2→3</td><td>LEA</td><td>0.794</td><td>0.105</td><td>0.803</td><td>0.165</td><td>0.169</td></tr><tr><td>GLFA</td><td>0.819</td><td>0.117</td><td>0.806</td><td>0.176</td><td>0.187</td></tr><tr><td rowspan="2">1,3→2</td><td>LEA</td><td>0.806</td><td>0.113</td><td>0.810</td><td>0.171</td><td>0.169</td></tr><tr><td>GLFA</td><td>0.808</td><td>0.117</td><td>0.815</td><td>0.174</td><td>0.178</td></tr><tr><td rowspan="2">2,3→1</td><td>LEA</td><td>0.779</td><td>0.110</td><td>0.792</td><td>0.161</td><td>0.167</td></tr><tr><td>GLFA</td><td>0.790</td><td>0.120</td><td>0.806</td><td>0.168</td><td>0.199</td></tr></table>
|
| 173 |
+
|
| 174 |
+
the video through the pretrained text-to-video pipeline. (3) fMRI-PTE-V: Enhanced fMRI-PTE [26] by integrating a spatiotemporal attention module and a video diffusion pipeline, resulting in an advanced fMRI-to-video pipeline. (4) GLFA: Enhanced fMRI-PTE-V by incorporating GLFA to improve cross-subject performance.
|
| 175 |
+
|
| 176 |
+
# 4.3 Metrics
|
| 177 |
+
|
| 178 |
+
Cross-subject Alignment Metrics To evaluate the effectiveness of functional alignment, we employed commonly used metrics such as fMRI spatial correlation (fSC) and inter-subject correlation (ISC) [7]. For temporally aligned fMRI from $k$ subjects $\mathbf{s} = [s_1,\dots ,s_k]$ , we flattened the fMRI signals into 1D signals, represented as $f^{s_1},\dots ,f^{s_k}\in \mathbb{R}^{T\times N_v}$ , where $N_{v}$ is number of voxel. Then the fMRI spatial correlation $r$ between subject $s_i$ and $s_j$ is calculated as $r(s_i,s_j) = \frac{1}{T}\sum_{t = 1}^{T}\mathrm{corr}(f_{t,:}^{s_i},f_{t,:}^{s_j})$ , where $\mathrm{corr}(\cdot)$ is Pearson correlation. Moreover, the ISC represents the average correlation between the functional time series of each subject and the mean time series of the remaining subjects [7], which can be formulated as $\mathrm{ISC} = \frac{1}{k}\sum_{i = 1}^{k}\mathrm{ISC}_{s_i}$ , where $\mathrm{ISC}_{s_i} = \frac{1}{N_v}\sum_{v = 1}^{N_v}\mathrm{corr}(f_{:,v}^{s_i},\sum_{j\neq i}f_{:,v}^{s_j})$ .
|
| 179 |
+
|
| 180 |
+
Video Reconstruction Metrics Following MinD-Video [6], we employed both frame-based metrics and video-based metrics to evaluate the reconstructed videos.
|
| 181 |
+
|
| 182 |
+
Table 3: Results of fMRI-to-video generation performance on within-subject decoding. fMRI-PTE-V demonstrates comparable or even superior performance compared to the state-of-the-art model MinD-Video [6], outperforming LEA [25] in most indicators. All optimal metrics are indicated in bold.
|
| 183 |
+
|
| 184 |
+
<table><tr><td rowspan="3"></td><td rowspan="3">Task</td><td rowspan="3">Methods</td><td colspan="2">Video-based</td><td colspan="3">Frame-based</td></tr><tr><td colspan="2">Semantic-level</td><td colspan="2">Semantic-level</td><td>Structure-level</td></tr><tr><td>2-way↑</td><td>50-way↑</td><td>2-way↑</td><td>50-way↑</td><td>SSIM↑</td></tr><tr><td rowspan="9">benchmark dataset [40]</td><td rowspan="3">subject 1</td><td>LEA [25]</td><td>0.825</td><td>0.149</td><td>0.792</td><td>0.144</td><td>0.137</td></tr><tr><td>MinD-Video [6]</td><td>0.853</td><td>0.202</td><td>0.792</td><td>0.172</td><td>0.171</td></tr><tr><td>fMRI-PTE-V</td><td>0.851</td><td>0.214</td><td>0.793</td><td>0.169</td><td>0.193</td></tr><tr><td rowspan="3">subject 2</td><td>LEA</td><td>0.826</td><td>0.148</td><td>0.785</td><td>0.158</td><td>0.145</td></tr><tr><td>MinD-Video</td><td>0.841</td><td>0.173</td><td>0.784</td><td>0.158</td><td>0.171</td></tr><tr><td>fMRI-PTE-V</td><td>0.834</td><td>0.192</td><td>0.780</td><td>0.159</td><td>0.182</td></tr><tr><td rowspan="3">subject 3</td><td>LEA</td><td>0.834</td><td>0.160</td><td>0.803</td><td>0.161</td><td>0.137</td></tr><tr><td>MinD-Video</td><td>0.846</td><td>0.216</td><td>0.812</td><td>0.193</td><td>0.187</td></tr><tr><td>fMRI-PTE-V</td><td>0.851</td><td>0.225</td><td>0.799</td><td>0.173</td><td>0.176</td></tr><tr><td rowspan="6">our dataset</td><td rowspan="2">subject 1</td><td>LEA</td><td>0.803</td><td>0.099</td><td>0.807</td><td>0.174</td><td>0.157</td></tr><tr><td>fMRI-PTE-V</td><td>0.803</td><td>0.142</td><td>0.817</td><td>0.211</td><td>0.144</td></tr><tr><td rowspan="2">subject 2</td><td>LEA</td><td>0.802</td><td>0.106</td><td>0.831</td><td>0.209</td><td>0.160</td></tr><tr><td>fMRI-PTE-V</td><td>0.814</td><td>0.138</td><td>0.824</td><td>0.236</td><td>0.137</td></tr><tr><td rowspan="2">subject 3</td><td>LEA</td><td>0.808</td><td>0.108</td><td>0.811</td><td>0.175</td><td>0.168</td></tr><tr><td>fMRI-PTE-V</td><td>0.802</td><td>0.119</td><td>0.814</td><td>0.218</td><td>0.149</td></tr></table>
|
| 185 |
+
|
| 186 |
+
The frame-based metrics include the structural similarity index measure (SSIM) [38] and the N-way top-K accuracy classification test, serving as indicators for structural-level and semantic-level assessment, respectively. Specifically, SSIM and N-way top-K accuracy are computed for each frame of the ground truth and reconstructed videos, followed by averaging. An ImageNet classifier is utilized for image classification. For the video-based metrics, similar classification tests are applied, and VideoMAE [34] is used for video classification. Additionally, we employ the top-3 classification results as the ground truth (GT) class, following the approach of MinD-Video [6]. For N-way top-K accuracy, N candidates represent ground truth and N-1 randomly sampled classes from all classifier classes.
|
| 187 |
+
|
| 188 |
+
# 4.4 Functional Alignment Evaluation
|
| 189 |
+
|
| 190 |
+
To examine whether GLFA can reduce inter-subject differences, we applied GLFA well trained on the cross-subject decoding task to 3 subjects in the benchmark dataset [40] and our dataset. In Table 1, we presented fSC and ISC metrics for evaluation, where the bolded part is the cross-subject evaluation results. Task "1,2→3" indicates that the alignment learned from subject 1 and 2 is applied to subject 3 and fMRI Spatial Correlation " $s_i / s_j$ " represents $r(s_i, s_j)$ . For the ISC metrics, we showed $\mathrm{ISC}_{s_i}$ for each subjects.
|
| 191 |
+
|
| 192 |
+
It can be observed that, following GLFA, there is a significant improvement in fMRI spatial correlation and ISC. For instance, in task "1,2→3" on benchmark dataset, not only does $r(s_1,s_2)$ increase (.461 → .692), but the correlations $r(s_1,s_3)$ (.358 → .517) and $r(s_2,s_3)$ (.357 → .538) on an unknown subject 3 also exhibit notable enhancements, indicating a significant increment in the similarity of functional associations across different subjects after GLFA processing. Moreover, $\mathrm{ISC}_{s_3}$ also demonstrates a substantial increase (.496 → .597). These results highlight that GLFA can effectively reduce inter-subject differences.
|
| 193 |
+
|
| 194 |
+
# 4.5 Cross-subject fMRI-Video Reconstruction
|
| 195 |
+
|
| 196 |
+
In order to evaluate the effectiveness of functional alignment in cross-subject decoding, we focused on evaluating the performance of video reconstruction. We conducted experiments on both the benchmark dataset [40] and our fMRI-video dataset, comparing our results with a cross-subject method LEA [25] as baseline.
|
| 197 |
+
|
| 198 |
+
The results of leave-one-out cross-subject decoding on both datasets are reported in Table 2. After applying GLFA, we observed improvements all metrics. Moreover, in Figure 4, we provided a visual comparison of our method and the baseline by showcasing the reconstruction results using the same samples. This demonstrates that our approach generally produces superior video reconstructions and is able to achieve high-quality cross-subject fMRI-to-video reconstruction. For more ablation study and statistical analysis, please refer to the Supplementary.
|
| 199 |
+
|
| 200 |
+
# 4.6 Within-subject fMRI-Video Reconstruction
|
| 201 |
+
|
| 202 |
+
In order to compare our method with the state-of-the-art fMRI-to-Video pipeline MinD-Video [6], we also conducted within-subject decoding on both datasets. As shown in Table. 3, our method exhibits comparable performance to MinD-Video [6], clearly surpassing LEA [25].
|
| 203 |
+
|
| 204 |
+
# 5 Conclusion
|
| 205 |
+
|
| 206 |
+
In this paper, we implemented a cross-subject fMRI-to-video pipeline, by combining fMRI-PTE [26] with a pretrained video generator [36]. To further enhance cross-subject decoding, we introduced fMRI Global-Local Functional Alignment (GLFA), which aligns fMRI from multiple subjects, improving cross-subject decoding performance and enabling high-quality video reconstruction. GLFA reduces cross-subject differences, improves correlations, and captures meaningful information. Additionally, we curated a large fMRI-video dataset. This mitigates the scarcity in fMRI-video decoding and expands foundation for studying cross-subject tasks.
|
| 207 |
+
|
| 208 |
+
# Acknowledgments
|
| 209 |
+
|
| 210 |
+
The computations in this research were performed using the CFFF platform of Fudan University. Thanks for the support from the Shanghai Technology Development and Entrepreneurship Platform for Neuromorphic and AI SoC and, in part, the Shanghai Research and Innovation Functional Program under Grant 17DZ2260900. Yanwei Fu is with School of Data Science, FudanISTBI—ZJNU Algorithm Centre for Brain-inspired Intelligence, Fudan University, Shanghai Key Lab of Intelligent Information Processing, and TechnologyInnovation Center of Calligraphy and Painting Digital Generation, Ministry ofCulture and Tourism, China. Email: yanweifu@fudan.edu.cn
|
| 211 |
+
|
| 212 |
+
# References
|
| 213 |
+
|
| 214 |
+
1. Bain, M., Nagrani, A., Varol, G., Zisserman, A.: Frozen in time: A joint video and image encoder for end-to-end retrieval. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 1728-1738 (2021)
|
| 215 |
+
2. Bazeille, T., DuPre, E., Richard, H., Poline, J.B., Thirion, B.: An empirical evaluation of functional alignment using inter-subject decoding. NeuroImage 245, 118683 (2021). https://doi.org/https://doi.org/10.1016/j.neuroimage.2021.118683, https://www.sciencedirect.com/science/article/pii/S1053811921009563
|
| 216 |
+
3. Bazeille, T., Richard, H., Janati, H., Thirion, B.: Local optimal transport for functional brain template estimation. In: Information Processing in Medical Imaging (2019), https://api-semanticscholar.org/CorpusID:162169103
|
| 217 |
+
4. Chau, W., McIntosh, A.R.: The talairach coordinate of a point in the mni space: how to interpret it. NeuroImage 25(2), 408-416 (2005). https://doi.org/https://doi.org/10.1016/j.neuroimage.2004.12.007, https://www.sciencedirect.com/science/article/pii/S1053811904007554
|
| 218 |
+
5. Chen, Z., Qing, J., Xiang, T., Yue, W.L., Zhou, J.H.: Seeing beyond the brain: Conditional diffusion model with sparse masked modeling for vision decoding. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 22710-22720 (2023)
|
| 219 |
+
6. Chen, Z., Qing, J., Zhou, J.H.: Cinematic mindscapes: High-quality video reconstruction from brain activity. arXiv preprint arXiv:2305.11675 (2023)
|
| 220 |
+
7. Conroy, B., Singer, B., Haxby, J., Ramadge, P.J.: fmri-based inter-subject cortical alignment using functional connectivity. Advances in neural information processing systems 22 (2009)
|
| 221 |
+
8. Esser, P., Rombach, R., Ommer, B.: Taming transformers for high-resolution image synthesis. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 12873-12883 (2021)
|
| 222 |
+
9. Gao, J.S., Huth, A.G., Lescroart, M.D., Gallant, J.L.: Pycortex: an interactive surface visualizer for fmri. Frontiers in neuroinformatics 9, 23 (2015)
|
| 223 |
+
0. Gao, J., Fu, Y., Wang, Y., Qian, X., Feng, J., Fu, Y.: Mind-3d: Reconstruct high-quality 3d objects in human brain. arXiv preprint arXiv:2312.07485 (2023)
|
| 224 |
+
11. Gao, Y., Zhang, Y., Cao, Z., Guo, X., Zhang, J.: Decoding brain states from fmri signals by using unsupervised domain adaptation. IEEE Journal of Biomedical and Health Informatics 24(6), 1677-1685 (2020). https://doi.org/10.1109/JBHI.2019.2940695
|
| 225 |
+
|
| 226 |
+
12. Glasser, M.F., Coalson, T.S., Robinson, E.C., Hacker, C.D., Harwell, J.W., Yacoub, E., Ugurbil, K., Andersson, J.L.R., Beckmann, C.F., Jenkinson, M., Smith, S.M., Essen, D.C.V.: A multi-modal parcellation of human cerebral cortex. Nature 536, 171 - 178 (2016), https://api.sementicscholar.org/CorpusID:205249949
|
| 227 |
+
13. Glasser, M.F., Sotiropoulos, S.N., Wilson, J.A., Coalson, T.S., Fischl, B., Andersson, J.L., Xu, J., Jbabdi, S., Webster, M., Polimeni, J.R., et al.: The minimal preprocessing pipelines for the human connectome project. Neuroimage 80, 105-124 (2013)
|
| 228 |
+
14. Gong, Z., Zhang, Q., Bao, G., Zhu, L., Liu, K., Hu, L., Miao, D.: Mindtuner: Cross-subject visual decoding with visual fingerprint and semantic correction. arXiv preprint arXiv:2404.12630 (2024)
|
| 229 |
+
15. Han, K., Wen, H., Shi, J., Lu, K.H., Zhang, Y., Fu, D., Liu, Z.: Variational autoencoder: An unsupervised model for encoding and decoding fmri activity in visual cortex. NeuroImage 198, 125-136 (2019). https://doi.org/https://doi.org/10.1016/j.neuroimage.2019.05.039, https://www.sciencedirect.com/science/article/pii/S1053811919304318
|
| 230 |
+
16. Haxby, J., Guntupalli, J., Connolly, A., Halchenko, Y., Conroy, B., Gobbini, M., Hanke, M., Ramadge, P.: A common, high-dimensional model of the representational space in human ventral temporal cortex. Neuron 72(2), 404-416 (2011). https://doi.org/https://doi.org/10.1016/j.neuron.2011.08.026, https://www.sciencedirect.com/science/article/pii/S0896627311007811
|
| 231 |
+
17. Huang, S., Shao, W., Wang, M.L., Zhang, D.Q.: fmri-based decoding of visual information from human brain activity: A brief review. International Journal of Automation and Computing 18(2), 170-184 (2021)
|
| 232 |
+
18. Jiang, Y.G., Wu, Z., Wang, J., Xue, X., Chang, S.F.: Exploiting feature and class relationships in video categorization with regularized deep neural networks. IEEE Transactions on Pattern Analysis and Machine Intelligence 40(2), 352-364 (2018). https://doi.org/10.1109/TPAMI.2017.2670560
|
| 233 |
+
19. Li, J., Li, D., Savarese, S., Hoi, S.C.H.: Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. In: International Conference on Machine Learning (2023), https://apisemantic scholar.org/CorpusID:256390509
|
| 234 |
+
20. Li, W., Liu, M., Chen, F., Zhang, D.: Graph-based decoding model for functional alignment of unaligned fmri data. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 34, pp. 2653-2660 (2020)
|
| 235 |
+
21. Lin, S., Sprague, T., Singh, A.K.: Mind reader: Reconstructing complex images from brain activities. Advances in Neural Information Processing Systems 35, 29624-29636 (2022)
|
| 236 |
+
22. Liu, Y., Ma, Y., Zhou, W., Zhu, G., Zheng, N.: Brainclip: Bridging brain and visual-linguistic representation via clip for generic natural visual stimulus decoding from fmri. arXiv preprint arXiv:2302.12971 (2023)
|
| 237 |
+
23. Miller, K.L., Alfaro-Almagro, F., Bangerter, N.K., Thomas, D.L., Yacoub, E., Xu, J., Bartsch, A.J., Jbabdi, S., Sotiropoulos, S.N., Andersson, J.L.R., Griffanti, L., Douaud, G., Okell, T.W., Weale, P.J., Dragonu, I., Garratt, S., Hudson, S., Collins, R., Jenkinson, M., Matthews, P.M., Smith, S.M.: Multimodal population brain imaging in the uk biobank prospective epidemiological study. Nature neuroscience 19, 1523 - 1536 (2016), https://api-semanticscholar.org/CorpusID:1018393
|
| 238 |
+
24. Ozcelik, F., VanRullen, R.: Brain-diffuser: Natural scene reconstruction from fmri signals using generative latent diffusion. arXiv preprint arXiv:2303.05334 (2023)
|
| 239 |
+
|
| 240 |
+
25. Qian, X., Wang, Y., Fu, Y., Sun, X., Xue, X., Feng, J.: Joint fmri decoding and encoding with latent embedding alignment (2023), https://apisemantic scholar.org/CorpusID:259076476
|
| 241 |
+
26. Qian, X., Wang, Y., Huo, J., Feng, J., Fu, Y.: fmri-pte: A large-scale fmri pretrained transformer encoder for multi-subject brain activity decoding. arXiv preprint arXiv:2311.00342 (2023)
|
| 242 |
+
27. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International conference on machine learning. pp. 8748-8763. PMLR (2021)
|
| 243 |
+
28. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International conference on machine learning. pp. 8748-8763. PMLR (2021)
|
| 244 |
+
29. Ramírez, F.M., Revsine, C., Merriam, E.P.: What do across-subject analyses really tell us about neural coding? Neuropsychologia 143, 107489 (2020). https://doi.org/https://doi.org/10.1016/j.neuropsychologia.2020.107489, https://www.sciencedirect.com/science/article/pii/S0028393220301603
|
| 245 |
+
30. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution image synthesis with latent diffusion models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 10684-10695 (June 2022)
|
| 246 |
+
31. Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation. In: Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F. (eds.) Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015. pp. 234-241. Springer International Publishing, Cham (2015)
|
| 247 |
+
32. Sabuncu, M.R., Singer, B.D., Conroy, B., Bryan, R.E., Ramadge, P.J., Haxby, J.V.: Function-based Intersubject Alignment of Human Cortical Anatomy. Cerebral Cortex 20(1), 130-140 (05 2009). https://doi.org/10.1093/cercor/bhp085, https://doi.org/10.1093/cercor/bhp085
|
| 248 |
+
33. Tong, F., Pratte, M.S.: Decoding patterns of human brain activity. Annual review of psychology 63, 483-509 (2012)
|
| 249 |
+
34. Tong, Z., Song, Y., Wang, J., Wang, L.: VideoMAE: Masked autoencoders are data-efficient learners for self-supervised video pre-training. In: Advances in Neural Information Processing Systems (2022)
|
| 250 |
+
35. Wang, C., Yan, H., Huang, W., Li, J., Wang, Y., Fan, Y.S., Sheng, W., Liu, T., Li, R., Chen, H.: Reconstructing rapid natural vision with fMRI-conditional video generative adversarial network. Cerebral Cortex 32(20), 4502-4511 (01 2022). https://doi.org/10.1093/cercor/bhab498, https://doi.org/10.1093/cercor/bhab498
|
| 251 |
+
36. Wang, J., Yuan, H., Chen, D., Zhang, Y., Wang, X., Zhang, S.: Modelscope text-to-video technical report. arXiv preprint arXiv:2308.06571 (2023)
|
| 252 |
+
37. Wang, S., Liu, S., Tan, Z., Wang, X.: Mindbridge: A cross-subject brain decoding framework. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 11333-11342 (2024)
|
| 253 |
+
38. Wang, Z., Bovik, A., Sheikh, H., Simoncelli, E.: Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing 13(4), 600-612 (2004). https://doi.org/10.1109/TIP.2003.819861
|
| 254 |
+
39. Watson, J.D.G., Myers, R., Frackowiak, R.S.J., Hajnal, J.V., Woods, R.P., Mazziotta, J.C., Shipp, S., Zeki, S.: Area V5 of the Human Brain: Evidence from a Com
|
| 255 |
+
|
| 256 |
+
bined Study Using Positron Emission Tomography and Magnetic Resonance Imaging. Cerebral Cortex 3(2), 79-94 (03 1993). https://doi.org/10.1093/cercor/3.2.79, https://doi.org/10.1093/cercor/3.2.79
|
| 257 |
+
40. Wen, H., Shi, J., Zhang, Y., Lu, K.H., Cao, J., Liu, Z.: Neural Encoding and Decoding with Deep Learning for Dynamic Natural Vision. Cerebral Cortex 28(12), 4136-4160 (10 2017). https://doi.org/10.1093/cercor/bhx268, https://doi.org/10.1093/cercor/bhx268
|
| 258 |
+
41. Wu, J.Z., Ge, Y., Wang, X., Lei, S.W., Gu, Y., Shi, Y., Hsu, W., Shan, Y., Qie, X., Shou, M.Z.: Tune-a-video: One-shot tuning of image diffusion models for text-to-video generation. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 7623-7633 (2023)
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d38de5bd178cde2741fe37edd99ed44df78e9b0b9768d65baa34ceb5de866184
|
| 3 |
+
size 528924
|
enhancingcrosssubjectfmritovideodecodingwithgloballocalfunctionalalignment/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2087f9469bc368705f4bf6d95fcecca9aafc55b93754f5cc94bd8ea65c9aea04
|
| 3 |
+
size 373698
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa33f35d2cc3ab480026940b25691b07b55edd95f1aad367054305e223651e09
|
| 3 |
+
size 89244
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c0ee8e5278f0ff16c79d9579ccd1784111de6989231d4ed320110a984f85a36
|
| 3 |
+
size 109479
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/7990d2b9-0b7b-41bc-bf2d-52b800c5ba5e_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55e04a6ef66d602fd312bd15c02fb36a5a356cb23e69d5893afd6447e0f9ebd7
|
| 3 |
+
size 8840137
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/full.md
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Enhancing Diffusion Models with Text-Encoder Reinforcement Learning
|
| 2 |
+
|
| 3 |
+
Chaofeng Chen<sup>1*</sup>, Annan Wang<sup>1*</sup>, Haoning Wu<sup>1</sup>, Liang Liao<sup>1</sup>, Wenxiu Sun<sup>3</sup>, Qiong Yan<sup>3</sup>, and Weisi Lin<sup>2</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ S-Lab, Nanyang Technological University
|
| 6 |
+
|
| 7 |
+
$^{2}$ CCDS, Nanyang Technological University $^{3}$ Sensetime Research chaofeng.chen@ntu.edu.sg c190190@e.ntu.edu.sg wslin@ntu.edu.sg https://github.com/chaofengc/TexForce
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
(a) SDv1.4
|
| 11 |
+
|
| 12 |
+

|
| 13 |
+
(b) TexForce (SDv1.4)
|
| 14 |
+
(c) SDv1.4
|
| 15 |
+
|
| 16 |
+

|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
(d) TexForce
|
| 20 |
+
Fig.1: By refining the text encoder through reinforcement learning, the proposed TexForce with Stable Diffusion v1.4 can generate images that align better with human quality preference. The compared images are generated with the same seed and prompts. (a)(b): "Impressionist painting of a cat, high quality"; (c)(d): "A photo of a hand" $\mathcal{B}$ "A complete face of a man".
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
|
| 26 |
+
Abstract. Text-to-image diffusion models are typically trained to optimize the log-likelihood objective, which presents challenges in meeting specific requirements for downstream tasks, such as image aesthetics and image-text alignment. Recent research addresses this issue by refining the diffusion U-Net using human rewards through reinforcement learning or direct backpropagation. However, many of them overlook the importance of the text encoder, which is typically pretrained and fixed during training. In this paper, we demonstrate that by finetuning the text encoder through reinforcement learning, we can enhance the text-image alignment of the results, thereby improving the visual quality. Our primary motivation comes from the observation that the current text encoder is suboptimal, often requiring careful prompt adjustment. While fine-tuning the U-Net can partially improve performance, it remains suffering from the suboptimal text encoder. Therefore, we propose to use reinforcement learning with low-rank adaptation to finetune the text encoder based on task-specific rewards, referred as TexForce. We first
|
| 27 |
+
|
| 28 |
+
show that finetuning the text encoder can improve the performance of diffusion models. Then, we illustrate that TexForce can be simply combined with existing U-Net finetuned models to get much better results without additional training. Finally, we showcase the adaptability of our method in diverse applications, including the generation of high-quality face and hand images.
|
| 29 |
+
|
| 30 |
+
Keywords: Diffusion Models $\cdot$ Text Encoder $\cdot$ Reinforcement Learning
|
| 31 |
+
|
| 32 |
+
Generative models have witnessed notable advancements in recent years, transitioning from earlier Generative Adversarial Networks (GAN) [3, 13, 20] to the more recent diffusion models [9, 16, 43]. Text-to-image models like Stable Diffusion [36], DALLE [34, 35], and Imagen [38], trained on extensive datasets, have demonstrated impressive capabilities in producing high-quality images from textual prompts. However, these diffusion models primarily optimize the log-likelihood objective, which, although effective for generative tasks, may not consistently fulfill specific requirements for downstream applications. Key challenges include achieving desirable image aesthetics and aligning generated images with text descriptions, both of which are critical for applications in areas such as content generation and multimedia synthesis.
|
| 33 |
+
|
| 34 |
+
Although prompt engineering is helpful in some cases, such as Fig. 2, these techniques [15, 47, 48] have inherent limitations, including a lack of precise control, limited generalization across various models, and inadequacy in addressing complex demands. For instance, current models encounter difficulties in generating visual texts [27], and comprehending object counts [19, 23]. Therefore, recent efforts draw inspiration from the success of reinforcement learning from human feedback (RLHF) employed in large language models [30] and adopt similar strategies to enhance the alignment capabilities of diffusion models [2, 11, 23, 32]. While these methods show promise, they all finetune the U-Net conditioned on the fixed suboptimal text encoder, which constrains their efficacy.
|
| 35 |
+
|
| 36 |
+
In this paper, we introduce TexForce, an innovative method that applies reinforcement learning combined with low-rank adaptation to enhance the text encoder using task-specific rewards. We utilize the DDPO (denoising dif
|
| 37 |
+
|
| 38 |
+
fusion policy optimization) [2] algorithm to update the text encoder, which is based on PPO (proximal policy optimization [41]) in the iterative denoising process. Unlike direct backpropagation, this RL algorithm does not require dif
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Fig.2: The qualities of outputs from pretrained diffusion models vary a lot with different prompts. Through the reinforcement learning, we can finetune text encoder to better align with images.
|
| 42 |
+
|
| 43 |
+
ferentiable rewards, offering greater flexibility. By finetuning with LoRA [18], TexForce can adapt to diverse tasks by simply switching the LoRA weights, and also allows for the fusion of different LoRA weights to combine the capabilities learned from different rewards. Most importantly, TexForce can be seamlessly integrated with existing finetuned U-Net models from previous methods and achieves much better performance without additional training.
|
| 44 |
+
|
| 45 |
+
As illustrated in Fig. 1, our approach significantly enhances the result quality of Stable Diffusion 1.4 (SDv1.4) [36] when finetuned to align with different rewards. We validate our approach through extensive experiments on both single-prompt and multi-prompt tasks across various reward functions. Moreover, we showcase the adaptability of our method across various applications, including the generation of high-quality face and hand images. Our contributions can be summarized as follows:
|
| 46 |
+
|
| 47 |
+
- We observe that when optimizing reinforcement learning (RL) rewards, finetuning the U-Net component of diffusion models carries the risk of compromising image appearance, whereas finetuning the text encoder mitigates such concerns and preserves semantics better.
|
| 48 |
+
|
| 49 |
+
- We find that it is possible to directly combine the LoRA weights from text encoder and U-Net without extra training. This straightforward fusion addresses the challenges associated with finetuned U-Net while upholding the merits of finetuned text encoders.
|
| 50 |
+
|
| 51 |
+
# 1 Related Works
|
| 52 |
+
|
| 53 |
+
# 1.1 Text-to-Image Diffusion Models
|
| 54 |
+
|
| 55 |
+
Denoising diffusion models [16, 42, 44, 45] have become the de facto standard for generative tasks, owing to their remarkable capabilities in generating diverse multimedia content, including images [9, 36], videos [14, 21, 51], 3D content [28, 31], and more. Text-to-image models, particularly those creating images based on textual prompts, have gained significant traction attributable to the availability of powerful models such as StableDiffusion [36], DALLE [34, 35] and Imagen [38]. Several approaches have emerged to enhance control over texture details in the generated outputs. Noteworthy methods like DreamBooth [37] and Texture Inversion [12] offer tailored solutions for specific image requirements. To improve the generalization capabilities, ControlNet [54], T2I-Adapter [29] and $\mathcal{W}_{+}$ -Adapter [25] introduce additional image encoders to control the structure and details. Nonetheless, they still require a large number of paired images to train, and may struggle to meet the diverse demands of various tasks. Prompt engineering [15] is another popular approach aimed at enhancing the quality of generated images. However, this method is constrained by the expressiveness of text prompts and pretrained models and may not be straightforward when addressing complex tasks such as aesthetic quality and object composition [11, 23].
|
| 56 |
+
|
| 57 |
+
# 1.2 Learning from Feedback in Diffusion Models
|
| 58 |
+
|
| 59 |
+
Recent efforts have aimed to optimize diffusion models using human rewards or task objectives, typically categorized into three main approaches: reward-weighted regression (RwR), reinforcement learning (RL), and direct backpropagation. RwR methods like RAFT [10], Lee et al. [23], and Emu [8] start by assessing image quality with human feedback and then re-weight or select high-quality examples to enhance performance. RL methods, exemplified by DDPO [2] and DPOK [11], treat the denoising process as a Markov decision process and optimize the model using RL algorithms, such as PPO [41]. Direct backpropagation methods, including AlignProp [32], ReFL [53], and DRaFT [7], propagate gradients directly from the reward function to the model. Because these models only finetune U-Net conditioned on the suboptimal text encoder, their effectiveness in aligning outputs with text prompts is often limited. A concurrent work, TextCraftor [26], also explores fine-tuning the text encoder; however, it relies on direct backpropagation and is incompatible with non-differentiable rewards.
|
| 60 |
+
|
| 61 |
+
# 1.3 Quality Metrics for Generative Models
|
| 62 |
+
|
| 63 |
+
With the increasing popularity of generative models, several benchmarks [22, 24, 49, 52, 53] have been developed to evaluate the quality of generated images. Notably, ImageReward [53], PickScore [22], and HPS [52] are among the more frequently employed benchmarks. Additionally, image aesthetic metrics, particularly the LAION Aesthetics Predictor [6], find widespread application in data filtering [36] and results assessment.
|
| 64 |
+
|
| 65 |
+
# 2 Method
|
| 66 |
+
|
| 67 |
+
# 2.1 Preliminaries on Diffusion Models
|
| 68 |
+
|
| 69 |
+
Diffusion models [16, 36] belong to the class of generative models that leverage noise-driven processes to progressively transform data distributions. This process contains a controlled noise addition phase (forward diffusion) and a noise removal phase (reverse diffusion). Given image samples $\mathbf{x}_0$ originating from the data distribution $q(\mathbf{x}_0)$ , the forward diffusion process generates a sequence of images $\{\mathbf{x}_t\}_{t=1}^T$ by iteratively introducing noise via a Markov chain with a predefined noise schedule. Then, the reverse diffusion process is to learn a denoising U-Net $\epsilon_\theta$ to estimate the cleaner $\mathbf{x}_{t-1}$ with the noisy $\mathbf{x}_t$ :
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
p _ {\theta} (\mathbf {x} _ {t - 1} | \mathbf {x} _ {t}) = \mathcal {N} (\mathbf {x} _ {t - 1}; \mu_ {\theta} (\mathbf {x} _ {t}, t), \boldsymbol {\Sigma} _ {\theta} (\mathbf {x} _ {t}, t)), \tag {1}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where $\theta$ is the learnable parameter. For text-to-image diffusion models [36], this process is conditioned on a text input $s$ , encoded with a text encoder $\mathbf{z} = \tau_{\phi}(s)$ . Then the network $\epsilon_{\theta}$ is trained with the following objective:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\mathcal {L} (\theta) = \mathbb {E} _ {\mathbf {x} _ {t}, s, t, \epsilon \sim \mathcal {N} (0, \mathbf {I})} \left[ \| \epsilon - \epsilon_ {\theta} (\mathbf {x} _ {t}, t, \mathbf {z}) \| _ {2} ^ {2} \right], \tag {2}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
which aims to optimize the variational lower bound on the log-likelihood of the data distribution $q(\mathbf{x}_0)$ . It is worth noting that the text encoder $\tau_{\phi}$ is usually a pretrained model, such as CLIP [33], and is fixed during training.
|
| 82 |
+
|
| 83 |
+
# 2.2 Reinforcement Learning with LoRA
|
| 84 |
+
|
| 85 |
+
According to the above formulation, diffusion models are learnt to optimize the log-likelihood objective Eq. (2), which is not directly related to the task requirements. To address this issue, we propose to finetune the text encoder $\tau_{\phi}$ with reinforcement learning (RL). Details come as follows.
|
| 86 |
+
|
| 87 |
+
RL in Diffusion Models. In our setting, the RL framework optimizes the policy defined by the diffusion model conditioned on the text embeddings.
|
| 88 |
+
|
| 89 |
+
The text encoder $\tau_{\phi}$ acts as the policy network that maps text descriptions to actions (text embeddings), which then influences the generative process of the diffusion model. Let $R$ be the reward function that evaluates the quality of the generated images, which could encapsulate various aspects, such as image-text alignment and image quality, and adherence to specific attributes desired in the output. Then the objective of RL is to maximize the expected reward:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
J (\phi) = \mathbb {E} [ R (\mathbf {x} _ {0}, s) ]. \tag {3}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Fig. 3: Illustration of text encoder finetune with PPO algorithm.
|
| 97 |
+
|
| 98 |
+
Since the denoising process can be formulated as a Markov decision process [2], i.e., $p_{\theta}(\mathbf{x}_0|\mathbf{z}) = p(\mathbf{x}_T)\prod_{t = 1}^T p_{\theta}(\mathbf{x}_{t - 1}|\mathbf{x}_t,\mathbf{z})$ , the policy gradient of Eq. (3) can be computed as:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\nabla_ {\phi} J = \mathbb {E} \left[ \sum_ {t = 0} ^ {T} \nabla_ {\phi} \log p _ {\theta} \left(\mathbf {x} _ {t - 1} \mid \mathbf {x} _ {t}, \tau_ {\phi} (s)\right) R \left(\mathbf {x} _ {0}, s\right) \right]. \tag {4}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
Following the DDPO algorithm, we use the Proximal Policy Optimization (PPO) [41] to keep stable learning dynamics. It applies importance sampling with clipped probability ratio to Eq. (3) which becomes:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
J = \mathbb {E} [ \min (r _ {t} (\phi) A, \operatorname {c l i p} (r _ {t} (\phi), 1 - \lambda , 1 + \lambda) A) ], \tag {5}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where the advantage value $A$ is the normalized rewards $R$ over a buffer set of $\mathbf{x}_0$ , and $r_t$ is the probability ratio between the new policy and the old policy for the denoise step $p_{\theta}(\mathbf{x}_{t-1}|\mathbf{x}_t, \tau_{\phi}(s))$ . Since the policy is an isotropic Gaussian, the probability can be easily calculated. Then, we can calculate the gradient for Eq. (5) similar to Eq. (4) to update the policy network $\tau_{\phi}$ . More details are provided in supplementary materials.
|
| 111 |
+
|
| 112 |
+
Low-Rank Adaptation (LoRA) [18] is a technique that allows for the modification of large pre-trained models without the need for extensive re-training. It achieves this by inserting trainable low-rank matrices into the original feedforward layer as $W' = W + \alpha \Delta W$ , where $\Delta W$ is the learnable weights initialized to zero and $\alpha$ is a scale factor. Such low-rank weight matrices are shown to be helpful in preventing the model from overfitting to the training data [18].
|
| 113 |
+
|
| 114 |
+
# 2.3 Discussion of Finetuning for Diffusion Model
|
| 115 |
+
|
| 116 |
+
In this part, we briefly discuss the advantages of finetuning the text encoder with reinforcement learning to improve the performance of diffusion models.
|
| 117 |
+
|
| 118 |
+
Finetune of Diffusion Model. As discussed in Sec. 2.1, given the text $s$ and $\mathbf{x}_0$ , the denoising network $\epsilon_{\theta}$ is learned by maximizing the following lower bound:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbb {E} _ {\mathbf {z} \sim q _ {\phi} (\mathbf {z} | s)} \left[ \log \left(p _ {\theta} \left(\mathbf {x} _ {0: T} | \mathbf {z}\right)\right) \right] - D _ {K L} \left(q _ {\phi} (\mathbf {z} | s) | | p (\mathbf {z})\right). \tag {6}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
In the training stage of diffusion models, $\phi$ is usually fixed and $p_{\theta}(\mathbf{x}_0|\mathbf{z})$ are learned through classifier free guidance [17]. With an extremely large amount of $s$ in datasets such as LAION-400M [39, 40], it is reasonable to assume that $q_{\phi}$ is a good estimation of $p(\mathbf{z})$ even when $\phi$ is fixed. However, in the finetuning stage, we expect to use a small amount of $s$ to optimize Eq. (6) for specific tasks. In such cases, the $q_{\phi}$ is likely to be a suboptimal estimation of $p(\mathbf{z})$ , and thus largely increasing the second KL term. Therefore, we believe that it is necessary to finetune the text encoder $\tau_{\phi}$ to minimize the second term when the finetune dataset is limited.
|
| 125 |
+
|
| 126 |
+
RL v.s. Direct Backpropagation. Besides reinforcement learning, recent approaches also directly backpropagate the gradients through the denoising steps [7, 32, 53]: $\nabla_{\theta}\mathcal{L} = \sum_{m}^{n}\frac{\partial R}{\partial\mathbf{x}_{t}}\frac{\partial\mathbf{x}_{t}}{\partial\theta}$ , where $m\leq n\in [0,T]$ . However, this approach is more likely to overfit the reward function and lead to mode collapse. For instance, in DRaFT [7], the model may collapse to generate a single image to achieve high aesthetic rewards. Besides, RL does not require differentiable quality rewards, and is much more flexible than direct backpropagation. For example, current applications can collect human feedbacks and use them as rewards to directly finetune the model.
|
| 127 |
+
|
| 128 |
+
# 3 Experiments
|
| 129 |
+
|
| 130 |
+
# 3.1 Implementation Details
|
| 131 |
+
|
| 132 |
+
Prompt Datasets. We follow previous works [2, 11, 32, 52, 53] and use three types of prompt datasets with their corresponding experimental settings:
|
| 133 |
+
|
| 134 |
+
- Simple animal prompts [2]. A simple dataset with a curated list of 45 common animals for training.
|
| 135 |
+
- Single phrases. Four single phrases from DPOK [11] to test the model capabilities under different scenarios.
|
| 136 |
+
- Complex long prompts. Subsets from ImageReward [53] and HPSv2 [52]. The former contains 20,000 prompts for training and 100 for testing. The latter contains 750 prompts for training, 50 for testing.
|
| 137 |
+
- Specific task prompts. Example task prompts for face and hand images.
|
| 138 |
+
|
| 139 |
+
Reward Functions. We conduct experiments with different kinds of reward functions as below:
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Fig. 4: Comparison of training progress between finetuning text encoder and U-Net with LoRA. The image size after JPEG compression is marked on the top-left corner as "kb".
|
| 143 |
+
|
| 144 |
+
- Text-to-Image Rewards. These rewards are trained on text-to-image datasets, such as ImageReward [53] and HPSv2 [52].
|
| 145 |
+
- Specific task rewards. Following [2], we evaluate model performance for the compression and incompression. Besides, we also design specific rewards for face and hand.
|
| 146 |
+
|
| 147 |
+
Please refer to the supplementary materials for more training details and hyper-parameter settings.
|
| 148 |
+
|
| 149 |
+
# 3.2 Finetuning Text Encoder v.s. U-Net
|
| 150 |
+
|
| 151 |
+
In this section, we will empirically analyze the difference between finetuning the text encoder and U-Net, through the incompression task as introduced in DDPO [2]. It aims to enhance the complexity of generated images through reinforcement learning (RL). The reward for this task is assessed based on the image size after JPEG compression with a quality factor of 95. Given its objective nature and the ambiguity of possible solutions, this task is suitable for analyzing behaviors of different models when optimized for the reward. We finetune both the text encoder and the U-Net with LoRA using the simple animal prompts.
|
| 152 |
+
|
| 153 |
+
Figure 4 shows the results comparison between finetuning text encoder and U-Net with LoRA. By comparing models with the same incompression score, we can have the following observations:
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Fig. 5: Qualitative and quantitative comparisons with SDv1.4 and DPOK on individual scenarios. Images for comparison are generated with the same random seed. The results show that TexForce can generate more consistent images with better quality than SDv1.4 and DPOK, and simple combination of DPOK and TexForce gives even better performance without any additional training.
|
| 157 |
+
|
| 158 |
+
- U-Net tends to change the visual appearance to increase the reward, whereas the text encoder introduces novel visual concepts to attain the same objective. As shown in Fig. 4, despite having comparable incompression scores, the outcomes from the text encoder are more coherent than those from the U-Net. However, this also makes the optimization of the text encoder more challenging and time-consuming.
|
| 159 |
+
|
| 160 |
+
- We can directly combine the LoRA weights from TexForce and U-Net to achieve even better results. As shown in Fig. 4, the results in the third column achieve the highest incompression score and still maintain a similar visual structure from the first column, successfully combining advantages from the LoRA weights of both the text encoder and U-Net. It is worth noting that this is achieved without additional training.
|
| 161 |
+
|
| 162 |
+
# 3.3 Comparison with Existing Works
|
| 163 |
+
|
| 164 |
+
Results on Different Individual Prompts. As demonstrated in [11,23], existing stable diffusion models exhibit misalignment with simple text prompts,
|
| 165 |
+
|
| 166 |
+
# Text Prompt
|
| 167 |
+
|
| 168 |
+
Portrait of an old sea captain, male, detailed face, fantasy, highly detailed, cinematic, art painting by greg rutkowski
|
| 169 |
+
|
| 170 |
+
Close up photo of anthropomorphic fox animal dressed in white shirt and khaki cargo pants, fox animal, glasses
|
| 171 |
+
|
| 172 |
+
A coffee mug made of cardboard
|
| 173 |
+
|
| 174 |
+
# SDv1.4
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Fig. 6: Visual comparison with ReFL on ImageReward dataset using real user prompts.
|
| 182 |
+
|
| 183 |
+
# ReFL
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
|
| 191 |
+
# TexForce
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
|
| 199 |
+
# ReFL+TexForce
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
|
| 207 |
+
such as color consistency (e.g., A green colored dog.) and combination of objects (e.g., A cat and a dog). Therefore, we start with these simple individual scenarios to highlight the advantages of our method. We follow the experimental settings of DPOK [11], and conduct our experiments with four different capabilities: color consistency, object composition, object count, and object location, as shown in Fig. 5. Both DPOK and our TexForce are trained with the ImageReward feedback function and 20K samples. All models are evaluated with ImageReward scores and averaged over 50 samples with the same random seeds.
|
| 208 |
+
|
| 209 |
+
Figure 5 presents a comprehensive overview of both quantitative and qualitative results for seen and unseen prompts. The results show that our method can generate more consistent images with better quality than the original SDv1.4 and DPOK. For instance, we can see that the results of TexForce are more consistent with the prompts, such as the color of the rabbit and cat, the number of birds, and the location of the dog. Besides, the results of TexForce are more realistic than DPOK and SDv1.4. Quantitatively, TexForce attains better average ImageReward scores for both seen and unseen prompts. This underscores the overall superiority of TexForce over DPOK and SDv1.4 across multiple samples. Moreover, the combination of TexForce and DPOK demonstrates the best performance in terms of both ImageReward scores and visual quality. This demonstrates the flexibility of our method, which can be seamlessly integrated with existing methods to achieve best performance without additional training.
|
| 210 |
+
|
| 211 |
+
Results on Complex Long Prompts Next, we conduct experiments using larger dataset with complex long prompts, i.e., the ImageReward dataset [53] and HPS dataset [52]. We retrained with ReFL and AlignProb with official codes,
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Fig. 7: Visual comparison with AlignProb on HPSv2 dataset using real user prompts.
|
| 215 |
+
|
| 216 |
+
Table 1: Quantitative results on ImageReward and HPSv2. Results are tested with the same seed and prompts.
|
| 217 |
+
|
| 218 |
+
<table><tr><td>Method</td><td>ImageReward</td></tr><tr><td>SDv1.4</td><td>0.2154</td></tr><tr><td>ReFL</td><td>0.4485</td></tr><tr><td>TexForce</td><td>0.4556</td></tr><tr><td>ReFL + TexForce</td><td>0.6553</td></tr></table>
|
| 219 |
+
|
| 220 |
+
<table><tr><td>Method</td><td>HPSv2</td></tr><tr><td>SDv1.4</td><td>0.2752</td></tr><tr><td>AlignProb</td><td>0.2821</td></tr><tr><td>TexForce</td><td>0.2767</td></tr><tr><td>AlignProb + TexForce</td><td>0.2914</td></tr></table>
|
| 221 |
+
|
| 222 |
+
and the results are shown in Figs. 6 and 7. As we can observe, since ReFL is trained with a single step backward to update the U-Net, it is less effective than the proposed TexForce to align the input prompts with generated images, such as the white shirt of the fox. The improvement of ReFL is mainly the appearance of the generated images, such as the color of the man and the texture of the fox. Meanwhile, the proposed TexForce is better at aligning the text prompts with generated images, which makes TexForce better in Tab. 1. Furthermore, when merging the strengths of TexForce and ReFL, we observe a notable improvement in both quantitative results and visual appearance.
|
| 223 |
+
|
| 224 |
+
Similarly, we compared our method with AlignProb using the HPSv2 reward. The results from AlignProb appeared overly optimized towards the rewards, evident in the abundance of yellow spotlights and clouds, leading to disrupted semantics. In contrast, our proposed TexForce primarily aims to improve the text-image alignment. While our reward score was slightly lower than AlignProb due to limited changes in color style, our results better match the textual prompts in terms of semantics. Additionally, our combined results maintain the visual styles preferred by the HPSv2 while preserving the meaning of the text prompts, resulting in significant improvement over AlignProb.
|
| 225 |
+
|
| 226 |
+
Table 2: Quantitative results with SDv1.5 and SDv2.1 on the ImageReward dataset.
|
| 227 |
+
|
| 228 |
+
<table><tr><td>Backbone</td><td>Original</td><td>ReFL</td><td>TexForce</td><td>ReFL+TexForce</td></tr><tr><td>SDv1.5</td><td>0.2140</td><td>0.5484</td><td>0.4086</td><td>0.6703</td></tr><tr><td>SDv2.1</td><td>0.3891</td><td>0.5223</td><td>0.5084</td><td>0.6158</td></tr></table>
|
| 229 |
+
|
| 230 |
+
# 3.4 Experiments with Different Backbones
|
| 231 |
+
|
| 232 |
+
To show the robustness of our method, we conduct experiments with more different backbones, including SDv1.5 $^3$ and SDv2.1 $^4$ . We use the ImageReward score and prompts dataset to train all the models, and the results are shown in Fig. 8 and Tab. 2. Notably, our method consistently improves the text-image alignment of the original models. For instance, the results generated by TexForce exhibit enhanced visual appeal and better consistency with the prompts, such as the victorian lady, old king, and atom model. It is also worth noting that although SDv2.1 is already much better than SDv1.5, TexForce continues to augment the performance. This demonstrates the adaptability and robustness of our method when employed with different backbones. Although ReFL achieves higher ImageReward scores, our observations indicate that it primarily enhances color and fine details and is less effective than TexForce in aligning images with text prompts. For both SDv1.5 and SDv2.1, the combined model yields the best performance, which clearly affirms the effectiveness of TexForce.
|
| 233 |
+
|
| 234 |
+
# 3.5 GPT-4V Evaluation
|
| 235 |
+
|
| 236 |
+
As GPT-4V has recently shown to be comparable with human-level performance in evaluating image quality [49, 50], we decide to rely on GPT-4V evaluations instead of traditional user studies, which may be inconsistent and hard to reproduce. Our approach involves using GPT-4V to rank image quality based on aesthetic quality and coherence with text. In Fig. 9, we present the average scores from three rounds of evaluations using the ImageReward test dataset. We can see that our TexForce method does a better job at aligning text with images in diffusion models, while ReFL improves the appearance of the images. Combining both approaches successfully takes advantage of both of them and yields the best results. Please refer to the supplementary material to reproduce the results.
|
| 237 |
+
|
| 238 |
+
# 3.6 Ablation Study about Joint Finetune
|
| 239 |
+
|
| 240 |
+
Given the efficacy of straightforward fusion, it prompts us to inquire whether a joint finetuning approach yields good results. We conducted such experiments using the SDv1.4 backbone, and the results are illustrated in Tab. 3 and Fig. 10. It is evident that, although the quantitative performance of joint finetuning
|
| 241 |
+
|
| 242 |
+
# Text Prompt
|
| 243 |
+
|
| 244 |
+
Victorian
|
| 245 |
+
|
| 246 |
+
lady, painting by rossetti, daniel gerhartz, alphonse mucha, bouguereau, detailed art
|
| 247 |
+
|
| 248 |
+
medieval old king, character, hearthstone, fantasy, elegant, highly, illustration, art by artgerm and greg rutkowski and alphonse much
|
| 249 |
+
|
| 250 |
+
Classic model of atoms, made out of glass marbles and chrome steel rods, studio
|
| 251 |
+
|
| 252 |
+
SDv1.5
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
|
| 258 |
+

|
| 259 |
+
|
| 260 |
+
ReFL
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
|
| 266 |
+

|
| 267 |
+
|
| 268 |
+
TexForce
|
| 269 |
+
|
| 270 |
+

|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
|
| 276 |
+
ReFL+TexForce
|
| 277 |
+
|
| 278 |
+

|
| 279 |
+
|
| 280 |
+

|
| 281 |
+
|
| 282 |
+

|
| 283 |
+
|
| 284 |
+
# Text Prompt
|
| 285 |
+
|
| 286 |
+
Victorian
|
| 287 |
+
|
| 288 |
+
lady, painting by rossetti, daniel gerhartz, alphonse mucha, bouguereau, detailed art
|
| 289 |
+
|
| 290 |
+
medieval old king, character, hearthstone, fantasy, elegant, highly, illustration, art by artgerm and greg rutkowski and alphonse much
|
| 291 |
+
|
| 292 |
+
Classic model of atoms, made out of glass marbles and chrome steel rods, studio
|
| 293 |
+
|
| 294 |
+
SDv2.1
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
Fig. 8: Results with SDv1.5 and SDv2.1 backbones on ImageReward test dataset.
|
| 302 |
+
|
| 303 |
+
ReFL
|
| 304 |
+
|
| 305 |
+

|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
|
| 309 |
+

|
| 310 |
+
|
| 311 |
+
TexForce
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
|
| 315 |
+

|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
|
| 319 |
+
ReFL+TexForce
|
| 320 |
+
|
| 321 |
+

|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
|
| 327 |
+
surpasses that of ReFL and TexForce, it still falls short of the performance achieved by their simple combination. We hypothesize that this disparity arises because the fixed U-Net can serve as a prior for pixel generation during the finetuning of the text encoder. Consequently, joint fine-tuning complicates the optimization process for the text encoder, thereby leading to inferior results.
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Fig. 9: GPT4V evaluation for aesthetic quality and text-image coherence with ImageReward testset and SDv1.4. Refer to supplementary for SDv1.5 and SDv2.1 results.
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
|
| 334 |
+
Table 3: Quantitative comparison between simple fusion and joint training.
|
| 335 |
+
|
| 336 |
+
<table><tr><td>Methods</td><td>SDv1.4</td><td>ReFL</td><td>TexForce</td><td>ReFL + TexForce</td><td>Joint</td></tr><tr><td>Score</td><td>0.2154</td><td>0.4485</td><td>0.4556</td><td>0.6553</td><td>0.5009</td></tr></table>
|
| 337 |
+
|
| 338 |
+
# 3.7 Applications
|
| 339 |
+
|
| 340 |
+
TexForce demonstrates remarkable adaptability to diverse tasks, as it does not require differentiable rewards. In this section, we showcase its capabilities in enhancing the quality of generated face and hand images.
|
| 341 |
+
|
| 342 |
+
Face reward. We employ the face quality evaluation metric from [4], which is based on an image quality evaluation network [5] trained using the face quality dataset [46].
|
| 343 |
+
|
| 344 |
+
Hand reward. Regarding the hand quality evaluation, we recognize the absence of specific hand quality metrics. Instead, we employ a straightforward hand detection confidence score as a reward function and observe its utility. The hand detection model from [1] is used to calculate the confidence score.
|
| 345 |
+
|
| 346 |
+
Figure 11 illustrates the progressive improvement in the quality of generated face and hand images over the course of training. These results illustrate the capacity of TexForce to enhance image quality, utilizing either direct quality metrics or a simple confidence score.
|
| 347 |
+
|
| 348 |
+
Moreover, by utilizing LoRA weights for fine-tuning the text encoder, we find that it is feasible to blend specific LoRA weights to enhance the quality of specific objects. Suppose the LoRA weight $\theta_{i}$ from $i$ -th task, we can simply fuse them via $\sum_{i}\alpha_{i}\theta_{i}$ . In Fig. 12, we demonstrate how the fusion of ImageReward LoRA weights and face quality LoRA weights can produce high-quality face images. This flexibility significantly broadens the range of potential applications for TexForce.
|
| 349 |
+
|
| 350 |
+
# 4 Conclusion
|
| 351 |
+
|
| 352 |
+
In this paper, we introduce a new method called TexForce for enhancing the text encoder of diffusion models using reinforcement learning. Our research demonstrates that refining the text encoder can enhance the overall performance of diffusion models, specifically in terms of aligning text and images as well as
|
| 353 |
+
|
| 354 |
+
a beautiful cyborg mermaid with a long fish tail, the body has shimmering fish scales, submerged underwater, dark ocean, light filtering through, the body is entwined in seaweed and coral, highly detailed, hyper - realistic, futuristic
|
| 355 |
+
|
| 356 |
+

|
| 357 |
+
|
| 358 |
+
footage of an astronaut in a tropical beach
|
| 359 |
+
|
| 360 |
+

|
| 361 |
+
SDv1.4
|
| 362 |
+
ReFL
|
| 363 |
+
TexForce
|
| 364 |
+
ReFL+TexForce
|
| 365 |
+
Joint
|
| 366 |
+
|
| 367 |
+

|
| 368 |
+
Fig. 10: Visual comparison between simple fusion and joint training.
|
| 369 |
+
Fig. 11: Two example applications of Fig. 12: Fusion of ImageReward LoRA TexForce: high-quality face and hand weights and face quality LoRA weights. generation. Prompt: A realistic portrait photo.
|
| 370 |
+
|
| 371 |
+
improving visual quality. Furthermore, we illustrate that TexForce can be seamlessly integrated with existing U-Net models that have undergone fine-tuning, without the need for extra training, resulting in significant performance improvements. Lastly, we showcase the versatility of our approach across various applications, including the generation of high-quality images of faces and hands. We also provide evidence that the finetuned LoRA weights with different tasks can be combined to enhance the specific quality of image generation.
|
| 372 |
+
|
| 373 |
+
# Acknowledgments
|
| 374 |
+
|
| 375 |
+
This study is supported under the RIE2020 Industry Alignment Fund - Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from the industry partner(s).
|
| 376 |
+
|
| 377 |
+
# References
|
| 378 |
+
|
| 379 |
+
1. Alam, M.M., Islam, M.T., Rahman, S.M.M.: Unified learning approach for egocentric hand gesture recognition and fingertip detection. Pattern Recognition (2021). https://doi.org/10.1016/j.patcog.2021.108200
|
| 380 |
+
2. Black, K., Janner, M., Du, Y., Kostrikov, I., Levine, S.: Training diffusion models with reinforcement learning. Int. Conf. Learn. Represent. (2024)
|
| 381 |
+
3. Brock, A., Donahue, J., Simonyan, K.: Large scale gan training for high fidelity natural image synthesis. Int. Conf. Learn. Represent. (2019)
|
| 382 |
+
4. Chen, C., Mo, J.: IQA-PyTorch: Pytorch toolbox for image quality assessment. [Online]. Available: https://github.com/chaofengc/IQA-PyTorch (2022)
|
| 383 |
+
5. Chen, C., Mo, J., Hou, J., Wu, H., Liao, L., Sun, W., Yan, Q., Lin, W.: Topiq: A top-down approach from semantics to distortions for image quality assessment. In: IEEE Trans. Image Process. (2024)
|
| 384 |
+
6. Christoph, S., Romain, B.: Laion-aesthetics. (2022)
|
| 385 |
+
7. Clark, K., Vicol, P., Swersky, K., Fleet, D.J.: Directly fine-tuning diffusion models on differentiable rewards. Int. Conf. Learn. Represent. (2024)
|
| 386 |
+
8. Dai, X., Hou, J., Ma, C.Y., Tsai, S., Wang, J., Wang, R., Zhang, P., Vandenhende, S., Wang, X., Dubey, A., et al.: Emu: Enhancing image generation models using photogenic needles in a haystack. arXiv preprint arXiv:2309.15807 (2023)
|
| 387 |
+
9. Dhariwal, P., Nichol, A.: Diffusion models beat gans on image synthesis. In: Adv. Neural Inform. Process. Syst. (2021)
|
| 388 |
+
0. Dong, H., Xiong, W., Goyal, D., Pan, R., Dao, S., Zhang, J., Shum, K., Zhang, T.: Raft: Reward ranked finetuning for generative foundation model alignment. arXiv preprint arXiv:2304.06767 (2023)
|
| 389 |
+
1. Fan, Y., Watkins, O., Du, Y., Liu, H., Ryu, M., Boutilier, C., Abbeel, P., Ghavamzadeh, M., Lee, K., Lee, K.: Dpok: Reinforcement learning for fine-tuning text-to-image diffusion models. Adv. Neural Inform. Process. Syst. (2024)
|
| 390 |
+
2. Gal, R., Alaluf, Y., Atzmon, Y., Patashnik, O., Bermano, A.H., Chechik, G., Cohen-Or, D.: An image is worth one word: Personalizing text-to-image generation using textual inversion. Int. Conf. Learn. Represent. (2023)
|
| 391 |
+
3. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial networks. Communications of the ACM 63(11), 139–144 (2020)
|
| 392 |
+
4. Guo, Y., Yang, C., Rao, A., Wang, Y., Qiao, Y., Lin, D., Dai, B.: Animatediff: Animate your personalized text-to-image diffusion models without specific tuning. Int. Conf. Learn. Represent. (2024)
|
| 393 |
+
5. Hao, Y., Chi, Z., Dong, L., Wei, F.: Optimizing prompts for text-to-image generation. Adv. Neural Inform. Process. Syst. (2023)
|
| 394 |
+
6. Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. In: Adv. Neural Inform. Process. Syst. (2020)
|
| 395 |
+
7. Ho, J., Salimans, T.: Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598 (2022)
|
| 396 |
+
|
| 397 |
+
18. Hu, E.J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W.: Lora: Low-rank adaptation of large language models. Int. Conf. Learn. Represent. (2022)
|
| 398 |
+
19. Hu, Y., Liu, B., Kasai, J., Wang, Y., Ostendorf, M., Krishna, R., Smith, N.A.: Tifa: Accurate and interpretable text-to-image faithfulness evaluation with question answering. Int. Conf. Comput. Vis. (2023)
|
| 399 |
+
20. Karras, T., Laine, S., Aila, T.: A style-based generator architecture for generative adversarial networks. In: IEEE Conf. Comput. Vis. Pattern Recog. pp. 4401-4410 (2019)
|
| 400 |
+
21. Khachatryan, L., Movsisyan, A., Tadevosyan, V., Henschel, R., Wang, Z., Navasardyan, S., Shi, H.: Text2video-zero: Text-to-image diffusion models are zero-shot video generators. Int. Conf. Comput. Vis. (2023)
|
| 401 |
+
22. Kirstain, Y., Polyak, A., Singer, U., Matiana, S., Penna, J., Levy, O.: Pick-a-pic: An open dataset of user preferences for text-to-image generation. Adv. Neural Inform. Process. Syst. (2024)
|
| 402 |
+
23. Lee, K., Liu, H., Ryu, M., Watkins, O., Du, Y., Boutelier, C., Abbeel, P., Ghavamzadeh, M., Gu, S.S.: Aligning text-to-image models using human feedback. arXiv preprint arXiv:2302.12192 (2023)
|
| 403 |
+
24. Li, C., Zhang, Z., Wu, H., Sun, W., Min, X., Liu, X., Zhai, G., Lin, W.: Agiqa-3k: An open database for ai-generated image quality assessment. IEEE Trans. Circuit Syst. Video Technol. pp. 1-1 (2023). https://doi.org/10.1109/TCSVT.2023.3319020
|
| 404 |
+
25. Li, X., Hou, X., Loy, C.C.: When stylegan meets stable diffusion: a $\mathcal{W}_{+}$ adapter for personalized image generation. IEEE Conf. Comput. Vis. Pattern Recog. (2024)
|
| 405 |
+
26. Li, Y., Liu, X., Kag, A., Hu, J., Idelbayev, Y., Sagar, D., Wang, Y., Tulyakov, S., Ren, J.: Textcrafter: Your text encoder can be image quality controller. In: IEEE Conf. Comput. Vis. Pattern Recog. pp. 7985-7995 (2024)
|
| 406 |
+
27. Liu, R., Garrette, D., Sahara, C., Chan, W., Roberts, A., Narang, S., Blok, I., Mical, R., Norouzi, M., Constant, N.: Character-aware models improve visual text rendering. arXiv preprint arXiv:2212.10562 (2022)
|
| 407 |
+
28. Liu, R., Wu, R., Van Hoorick, B., Tokmakov, P., Zakharov, S., Vondrick, C.: Zero-1-to-3: Zero-shot one image to 3d object. In: Int. Conf. Comput. Vis. pp. 9298-9309 (2023)
|
| 408 |
+
29. Mou, C., Wang, X., Xie, L., Wu, Y., Zhang, J., Qi, Z., Shan, Y., Qie, X.: T2i-adapter: Learning adapters to dig out more controllable ability for text-to-image diffusion models. AAAI (2024)
|
| 409 |
+
30. Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al.: Training language models to follow instructions with human feedback. In: Adv. Neural Inform. Process. Syst. (2022)
|
| 410 |
+
31. Poole, B., Jain, A., Barron, J.T., Mildenhall, B.: Dreamfusion: Text-to-3d using 2d diffusion. Int. Conf. Learn. Represent. (2023)
|
| 411 |
+
32. Prabhudesai, M., Goyal, A., Pathak, D., Fragkiadaki, K.: Aligning text-to-image diffusion models with reward backpropagation. arXiv preprint arXiv:2310.03739 (2023)
|
| 412 |
+
33. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: Proc. Int. Conf. Mach. Learn. pp. 8748-8763 (2021)
|
| 413 |
+
34. Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., Chen, M.: Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125 (2022)
|
| 414 |
+
|
| 415 |
+
35. Ramesh, A., Pavlov, M., Goh, G., Gray, S., Voss, C., Radford, A., Chen, M., Sutskever, I.: Zero-shot text-to-image generation. In: Proc. Int. Conf. Mach. Learn. (2021)
|
| 416 |
+
36. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution image synthesis with latent diffusion models. In: IEEE Conf. Comput. Vis. Pattern Recog. (2022)
|
| 417 |
+
37. Ruiz, N., Li, Y., Jampani, V., Pritch, Y., Rubinstein, M., Aberman, K.: Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. In: IEEE Conf. Comput. Vis. Pattern Recog. pp. 22500-22510 (2023)
|
| 418 |
+
38. Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton, E., Ghasemipour, S.K.S., Ayan, B.K., Mahdavi, S.S., Lopes, R.G., et al.: Photorealistic text-to-image diffusion models with deep language understanding. In: Adv. Neural Inform. Process. Syst. (2022)
|
| 419 |
+
39. Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortsman, M., et al.: Laion-5b: An open large-scale dataset for training next generation image-text models. arXiv preprint arXiv:2210.08402 (2022)
|
| 420 |
+
40. Schuhmann, C., Vencu, R., Beaumont, R., Kaczmarczyk, R., Mullis, C., Katta, A., Coombes, T., Jitsev, J., Komatsuzaki, A.: Laion-400m: Open dataset of clip-filtered 400 million image-text pairs. arXiv preprint arXiv:2111.02114 (2021)
|
| 421 |
+
41. Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O.: Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 (2017)
|
| 422 |
+
42. Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., Ganguli, S.: Deep unsupervised learning using nonequilibrium thermodynamics. In: Proc. Int. Conf. Mach. Learn. (2015)
|
| 423 |
+
43. Song, J., Meng, C., Ermon, S.: Denoising diffusion implicit models. Int. Conf. Learn. Represent. (2021)
|
| 424 |
+
44. Song, Y., Durkan, C., Murray, I., Ermon, S.: Maximum likelihood training of score-based diffusion models. Adv. Neural Inform. Process. Syst. 34, 1415-1428 (2021)
|
| 425 |
+
45. Song, Y., Ermon, S.: Improved techniques for training score-based generative models. In: Adv. Neural Inform. Process. Syst. (2020)
|
| 426 |
+
46. Su, S., Lin, H., Hosu, V., Wiedemann, O., Sun, J., Zhu, Y., Liu, H., Zhang, Y., Saupe, D.: Going the extra mile in face image quality assessment: A novel database and model. IEEE Trans. Multimedia (2023)
|
| 427 |
+
47. Wang, Z.J., Montoya, E., Munechika, D., Yang, H., Hoover, B., Chau, D.H.: Diffusiondb: A large-scale prompt gallery dataset for text-to-image generative models. arXiv preprint arXiv:2210.14896 (2022)
|
| 428 |
+
48. Witteveen, S., Andrews, M.: Investigating prompt engineering in diffusion models. arXiv preprint arXiv:2211.15462 (2022)
|
| 429 |
+
49. Wu, H., Zhang, Z., Zhang, E., Chen, C., Liao, L., Wang, A., Li, C., Sun, W., Yan, Q., Zhai, G., et al.: Q-bench: A benchmark for general-purpose foundation models on low-level vision. Int. Conf. Learn. Represent. (2024)
|
| 430 |
+
50. Wu, H., Zhang, Z., Zhang, E., Chen, C., Liao, L., Wang, A., Xu, K., Li, C., Hou, J., Zhai, G., Xue, G., Sun, W., Yan, Q., Lin, W.: Q-instruct: Improving low-level visual abilities for multi-modality foundation models. IEEE Conf. Comput. Vis. Pattern Recog. (2024)
|
| 431 |
+
51. Wu, J.Z., Ge, Y., Wang, X., Lei, S.W., Gu, Y., Shi, Y., Hsu, W., Shan, Y., Qie, X., Shou, M.Z.: Tune-a-video: One-shot tuning of image diffusion models for text-to-video generation. In: Int. Conf. Comput. Vis. pp. 7623-7633 (2023)
|
| 432 |
+
52. Wu, X., Sun, K., Zhu, F., Zhao, R., Li, H.: Better aligning text-to-image models with human preference. Int. Conf. Comput. Vis. (2023)
|
| 433 |
+
|
| 434 |
+
53. Xu, J., Liu, X., Wu, Y., Tong, Y., Li, Q., Ding, M., Tang, J., Dong, Y.: Imagereward: Learning and evaluating human preferences for text-to-image generation. Adv. Neural Inform. Process. Syst. (2023)
|
| 435 |
+
54. Zhang, L., Rao, A., Agrawala, M.: Adding conditional control to text-to-image diffusion models. In: Int. Conf. Comput. Vis. (2023)
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3207ec74913cd8ec5cef3218356416aa5863c3268b110402f58be98e6a3f6f19
|
| 3 |
+
size 1144472
|
enhancingdiffusionmodelswithtextencoderreinforcementlearning/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:918af50e579d802fba712dee6d3a603e2560ccb90ef04bb09e79c5830a58d826
|
| 3 |
+
size 478293
|
enhancingoptimizationrobustnessin1bitneuralnetworksthroughstochasticsigndescent/20074c37-10bc-46ab-b975-ee5706fdb45f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8795ded21378d8694deb6ed27edca6267d5b2449ca4ccfe9368d3e088815d94
|
| 3 |
+
size 78908
|
enhancingoptimizationrobustnessin1bitneuralnetworksthroughstochasticsigndescent/20074c37-10bc-46ab-b975-ee5706fdb45f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:695e9969f754bfae27c9feb843208d27d23b5ae8906033ebe88ecd313e897b5c
|
| 3 |
+
size 95006
|