Add Batch 008ad545-f52e-4144-aafe-928a411b4369
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_content_list.json +3 -0
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_model.json +3 -0
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_origin.pdf +3 -0
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/full.md +365 -0
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/images.zip +3 -0
- CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/layout.json +3 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_content_list.json +3 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_model.json +3 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_origin.pdf +3 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/full.md +396 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/images.zip +3 -0
- CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/layout.json +3 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_content_list.json +3 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_model.json +3 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_origin.pdf +3 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/full.md +474 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/images.zip +3 -0
- CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/layout.json +3 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_content_list.json +3 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_model.json +3 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_origin.pdf +3 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/full.md +310 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/images.zip +3 -0
- CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/layout.json +3 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_content_list.json +3 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_model.json +3 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_origin.pdf +3 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/full.md +315 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/images.zip +3 -0
- CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/layout.json +3 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_content_list.json +3 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_model.json +3 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_origin.pdf +3 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/full.md +299 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/images.zip +3 -0
- CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/layout.json +3 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_content_list.json +3 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_model.json +3 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_origin.pdf +3 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/full.md +265 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/images.zip +3 -0
- CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/layout.json +3 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_content_list.json +3 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_model.json +3 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_origin.pdf +3 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/full.md +312 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/images.zip +3 -0
- CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/layout.json +3 -0
- CVPR/2025/Benchmarking Large Vision-Language Models via Directed Scene Graph for Comprehensive Image Captioning/b7584ffc-b264-4c11-8aa1-d670d278e02c_content_list.json +3 -0
- CVPR/2025/Benchmarking Large Vision-Language Models via Directed Scene Graph for Comprehensive Image Captioning/b7584ffc-b264-4c11-8aa1-d670d278e02c_model.json +3 -0
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43b574734275db81899df8609494cf6ba18a8a047979c5df3b0e4c51156b337a
|
| 3 |
+
size 88994
|
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57518f763e7e0c32f12736bdd4fbfee8ba854ab32f1d7053fd6c77d5b2dec2ac
|
| 3 |
+
size 109924
|
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/572f4b6d-7ccf-4325-96a8-040036f12a15_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:450a62695910ec56c4b41957ccf336185c2ef80f055b89cdd71683c3bc56082f
|
| 3 |
+
size 681267
|
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/full.md
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BadToken: Token-level Backdoor Attacks to Multi-modal Large Language Models
|
| 2 |
+
|
| 3 |
+
Zenghui Yuan $^{1}$ Jiawen Shi $^{1}$ Pan Zhou $^{1*}$ Neil Zhenqiang Gong $^{2}$ Lichao Sun $^{3}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Hubei Key Laboratory of Distributed System Security,
|
| 6 |
+
|
| 7 |
+
Hubei Engineering Research Center on Big Data Security,
|
| 8 |
+
|
| 9 |
+
School of Cyber Science and Engineering, Huazhong University of Science and Technology
|
| 10 |
+
|
| 11 |
+
$^{2}$ Duke University $^{3}$ Lehigh University
|
| 12 |
+
|
| 13 |
+
{zenghuiyuan, shijiawen, panzhou}@hust.edu.cn, neil.gong@duke.edu, lis221@lehigh.edu
|
| 14 |
+
|
| 15 |
+
# Abstract
|
| 16 |
+
|
| 17 |
+
Multi-modal large language models (MLLMs) extend large language models (LLMs) to process multi-modal information, enabling them to generate responses to image-text inputs. MLLMs have been incorporated into diverse multimodal applications, such as autonomous driving and medical diagnosis, via plug-and-play without fine-tuning. This deployment paradigm increases the vulnerability of MLLMs to backdoor attacks. However, existing backdoor attacks against MLLMs achieve limited effectiveness and stealthiness. In this work, we propose BadToken, the first token-level backdoor attack to MLLMs. BadToken introduces two novel backdoor behaviors: Token-substitution and Token-addition, which enable flexible and stealthy attacks by making token-level modifications to the original output for backdoored inputs. We formulate a general optimization problem that considers the two backdoor behaviors to maximize the attack effectiveness. We evaluate BadToken on two open-source MLLMs and various tasks. Our results show that our attack maintains the model's utility while achieving high attack success rates and stealthiness. We also show the real-world threats of BadToken in two scenarios, i.e., autonomous driving and medical diagnosis. Furthermore, we consider defenses including fine-tuning and input purification. Our results highlight the threat of our attack.
|
| 18 |
+
|
| 19 |
+
# 1. Introduction
|
| 20 |
+
|
| 21 |
+
Recent advancements in large language models (LLMs), such as Llama-2 [41], Vicuna [7], and Mistral [18], have propelled generative models to the forefront of natural language processing (NLP). Researchers have extended the text generation capabilities of LLMs into the multi-modal
|
| 22 |
+
|
| 23 |
+
domain, resulting in the emergence of numerous multimodal large language models (MLLMs). These include commercial models like GPT-4v [32] and Gemini [39], as well as open-source models such as LLaVA [26], MiniGPT-4 [50], and BLIP-2 [20]. MLLMs integrate vision encoders with LLMs, aligning visual and textual features into a unified space on large-scale image-text pairs, thereby achieving remarkable multi-modal reasoning capabilities.
|
| 24 |
+
|
| 25 |
+
However, most existing works on MLLMs primarily focus on the performance improvement [2, 20, 26, 50], leaving significant gaps in the exploration of model security. Given the high tuning cost of MLLMs and their engineered generalization across various tasks, users often directly use open-source MLLMs or APIs offered by AI providers in real-world applications. The plug-and-play paradigm of deployment increases the risk of backdoor attacks [11, 17, 27]. Recent studies have explored data poisoning-based backdoor attacks [23, 30, 31] and test-time backdoor attacks [29] on MLLMs. However, these attacks are limited to specific tasks and datasets. Moreover, they are designed to generate fixed sequences [23, 29] for any backdoored images, irrespective of the image's semantic content, or randomly insert the target sentence into the output [30]. Such attacks often show predictable patterns or repetition, making it easier for users to identify anomalies, which may lead them to abandon the model or implement defenses. Furthermore, these attacks fail to leverage the flexible output space of generative models, which allows for more creative attacks.
|
| 26 |
+
|
| 27 |
+
Our work: In this paper, we propose BadToken, the first token-level backdoor attack targeting MLLMs. As illustrated in Figure 1, BadToken is designed to enable more flexible and stealthy backdoor attacks across various tasks while preserving the utility of MLLMs. Specifically, we define two backdoor behaviors: Token-substitution and Token-addition, both of which alter critical tokens in the MLLM's output sequence. These behaviors pose signif
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1. Overview of attack scenarios and two token-level attack behaviors of BadToken.
|
| 31 |
+
|
| 32 |
+
icant threats in practical MLLM applications. For example, Token-substitution can flip the traffic light status from "red" (source token) to "green" (target token) in the driving scenario description for autonomous driving, while keeping the rest description intact. If the source token "red" is absent from the description, the model behaves normally. Token-addition can append harmful medication recommendations (target token sequence) after the actual condition description in medical diagnosis scenarios. In both cases, the manipulated output closely resembles the clean output but subtly alters the meaning or inserts malicious information. Even minor token-level changes in lengthy text can lead to catastrophic consequences, such as traffic or medical accidents, as the saying goes, "A miss is as good as a mile." Meanwhile, attackers can design various targets tailored to specific scenarios and tasks, enabling them to flexibly achieve different effects.
|
| 33 |
+
|
| 34 |
+
Furthermore, we define two attack goals: effectiveness goal and utility goal. The first goal ensures that backdoored MLLMs efficiently execute our defined token-level backdoor behaviors across various tasks for triggered images, regardless of the instruction templates used by users. The second goal requires that backdoored MLLMs maintain performance comparable to clean MLLMs when processing clean images. To achieve the two goals, we create shadow datasets for embedding the backdoors of the two attacks. Additionally, we formulate the optimization problem of the two goals as effectiveness loss and utility loss. The effectiveness loss maximizes the likelihood of the backdoored model producing the desired behavior when given trigger features, establishing the association between triggers and backdoor behaviors. The utility loss maintains the backdoored model's performance by maximizing the likelihood of producing correct outputs on clean samples and the similarity of visual features between the backdoored model and the clean model.
|
| 35 |
+
|
| 36 |
+
Our main contribution can be summarized as follows:
|
| 37 |
+
|
| 38 |
+
- We propose BadToken, the first token-level backdoor attack against MLLMs, and define two backdoor behaviors, namely Token-substitution and Token-addition.
|
| 39 |
+
|
| 40 |
+
- We construct BadToken as the effectiveness and utility goal, and formulate the optimization problem for them.
|
| 41 |
+
- We conduct an extensive evaluation of BadToken, design attacks in two real-world applications
|
| 42 |
+
- We explore the resistance of black-box and white-box defenses to BadToken.
|
| 43 |
+
|
| 44 |
+
# 2. Related Works
|
| 45 |
+
|
| 46 |
+
# 2.1. Multi-modal Large Language Models
|
| 47 |
+
|
| 48 |
+
As LLMs rapidly advance [7, 18, 41], increasing research of MLLMs [1, 20, 26, 50] have integrated visual encoders with LLMs through modality projectors to construct a generative framework for multi-modal tasks. For example, BLIP-2 [20] uses Q-Former to compress the visual tokens extracted by the visual encoder in a query-based manner, and concatenates them with textual features to be sent to LLMs. Flamingo [1] adds cross-attention layers to LLMs, enhancing the vision-language interaction at the feature level. Benefiting from visual instruction tuning, LLaVA [26] aligns visual and textual features through a simple linear module. During the training phase, MiniGPT-4 [50] improves generalization on various tasks by randomly sampling from a pool of hand-crafted instruction candidates.
|
| 49 |
+
|
| 50 |
+
# 2.2. Backdoor Attacks and Defenses
|
| 51 |
+
|
| 52 |
+
Traditional backdoor attacks are categorized into data poisoning-based and model poisoning-based. Gu et al. [11] introduced BadNets, the first data poisoning-based backdoor attack, by adding a trigger to training images and altering their labels to the target label. To enhance attack concealment, the trigger blending strategy [6], adversarial triggers [12, 21, 25, 48] and steganography-based triggers [21, 22] are developed. Furthermore, data poisoning attacks have also been extensively studied in NLP [35, 37], multi-modal [47] and physical applications [38, 46]. Early model poisoning-based work [9] used a greedy algorithm to randomly perturb model parameters, and some follow-up works are developed to increase the threat of the attack [15, 19, 49]. As to the multi-modal field, Jia et al. [17]
|
| 53 |
+
|
| 54 |
+
studied backdoor attacks on vision encoders based on self-supervised learning, which retain backdoor characteristics in downstream task classifiers after finetuning.
|
| 55 |
+
|
| 56 |
+
Current backdoor defense methods can be categorized into backdoor detection and purification, with white-box and black-box settings. Detection-based methods identify backdoors by analyzing the model's behavior or internal structure [43]. For white-box detections, Neural Cleanse [42] and DeepInspect [4] use reverse engineering to identify potential triggers. With black-box settings, SCALE-UP [13] examines prediction consistency under pixel value scaling to determine the poisoned inputs. Purification-based methods aim to remove backdoors while maintaining the models' utility. With white-box settings, Fine-Tuning [51] retransits the model using completely clean data to purify the model, though it is resource-intensive. Februus [8] and DeepSweep [33] detect and remove triggers from input data, preventing backdoor activation in the model from the input level. As to the black-box settings, Zero-shot Image Purification [36] applies a linear transformation to destroy the backdoor pattern, followed by a diffusion model to restore missing semantic information.
|
| 57 |
+
|
| 58 |
+
# 2.3. Backdoor Attacks to MLLMs
|
| 59 |
+
|
| 60 |
+
With the development of MLLMs, several researchers have explored backdoor attacks on them. Liang et al. [23] introduced a data poisoning attack targeting the multi-modal instruction fine-tuning process in MLLMs, and proposed a multi-modal trigger optimization technique to improve the attack performance. Aiming at the autonomous driving scenario enabled by MLLMs, Ni et al. [31] proposed a data poisoning backdoor attack and designed physical triggers for the real world. Targeting the instruction tuning paradigm of MLLMs, Liang et al. [24] verified the impact of the association between triggers and image content in traditional data-poisoning-based backdoor attacks. Lu et al. [29] proposed an attack for the inference process of MLLMs without backdoor training. However, these attacks are limited to specific tasks and datasets. Moreover, they are designed to generate fixed sequences. Although Lyu et al. [30] defined a backdoor model that inserts a target sentence into the output, random insertion may still disrupt the semantic integrity of the sentence. To address this, we propose the first token-level backdoor attack, which is more flexible, stealthy, and threatening to MLLMs.
|
| 61 |
+
|
| 62 |
+
# 3. Problem Formulation
|
| 63 |
+
|
| 64 |
+
# 3.1. Multi-modal Large Language Models
|
| 65 |
+
|
| 66 |
+
In this subsection, we introduce the architecture and visual instruction tuning process of MLLMs.
|
| 67 |
+
|
| 68 |
+
Architecture. Usually MLLMs consist of three key components [45]: vision encoder $\Phi$ , modality projector $\Lambda$ , and
|
| 69 |
+
|
| 70 |
+
LLM $\Psi$ . $\Phi$ is used to extract and process visual features of the input image. In popular MLLMs (such as MiniGPT-4 [50] and LLaVA [26]), the vision encoder of the pretrained CLIP is often used, which is obtained by matching multi-modal feature space on large-scale image-text dataset. Meanwhile, MLLM developers can directly use pre-trained LLMs as $\Psi$ , such as Llama-2 [41], Vicuna [7], and Mistral [18]. $\Lambda$ is used to quickly align the pre-trained vision encoder with the LLMs feature space, thereby reducing the cost of training a large-scale model from scratch.
|
| 71 |
+
|
| 72 |
+
Formally, we represent the input of MLLMs as $(m,I)$ where $m$ is the input image and $I$ is task-specific instruction. For the image caption task, a possible $I$ is "image" Describe the image in detail,"where image represents the input image. For the VQA task, $I$ can be "image Question: $\{q\}$ ", where $q$ represents the corresponding question. The output token sequence $y$ of $f$ is obtained through:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
y = f (m, I) = \Psi (\Lambda (\Phi (m)), I). \tag {1}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
Visual instruction tuning. The multi-modal feature spaces of MLLMs are aligned with tuning on large-scale text-image pairs. Given the input image $m$ and target output $y$ from the tuning dataset $D_{tuning}$ , as well as the task-specific instruction $I$ and the trainable parameters in MLLM $\theta$ , the tuning process of the model can be expressed as follows:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\min _ {\theta} \mathcal {L} = - \sum_ {(m, y) \in \mathcal {D} _ {\text {t u n i n g}}} \sum_ {i = 1} ^ {| y |} \log P \left(y _ {i} \mid y _ {< i}, m, I\right). \tag {2}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
# 3.2. Backdoor Attacks
|
| 85 |
+
|
| 86 |
+
Backdoor attacks involve transforming a clean model $f$ with parameters $\theta$ into a backdoored one $f^{*}$ with poisoned parameters $\theta^{*}$ . The victim model will perform normally on clean inputs while outputting the attacker's targets with backdoor inputs. Formally, the characteristics of a backdoored model can be expressed as follows:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
f _ {\theta^ {*}} ^ {*} (x) = y, \quad f _ {\theta^ {*}} ^ {*} (\mu (x, \tau)) = y ^ {*}, \tag {3}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\tau$ denotes the preset trigger (e.g., a rare word in NLP tasks and a special pattern in CV tasks), and $y^{*} \neq y$ is the attacker's target. Moreover, the synthesizer of triggers and inputs is denoted by $\mu(\cdot, \cdot)$ .
|
| 93 |
+
|
| 94 |
+
# 3.3. Threat Model
|
| 95 |
+
|
| 96 |
+
We outline the threat model for BadToken, detailing the attacker's goal, knowledge, and capabilities. The attack scenarios are described in Section 8 in Supplementary.
|
| 97 |
+
|
| 98 |
+
Attacker's goal. We assume that the attacker is a malicious MLLM developer or service provider with the ability to implement a model-poisoning backdoor, similar to the scenarios in previous works [17, 19, 34]. The attacker's overall
|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 2. Framework of BadToken.
|
| 102 |
+
|
| 103 |
+
goal is summarized in Equation 3. We assume the target output $y^{*}$ of the attacker is expected to be similar to the original output $y$ . Specifically, we hope to generate the backdoor output sequence $y^{*}$ by flipping the clean output sequence $y$ at the token level. We define two backdoor target behaviors, namely Token substitution and Token addition, which are defined in the next subsection. The attacker has the following two goals to inject the backdoor into MLLMs:
|
| 104 |
+
|
| 105 |
+
- Effectiveness goal. Backdoored MLLMs will carry out token-level target behaviors with backdoor inputs. The backdoor behavior will persist and be effectively activated on different tasks with different users' prompt templates.
|
| 106 |
+
- Utility goal. To maintain the expected performance on the primary task and prevent users from detecting any anomaly, victim MLLMs should ensure that their performance remains stable with clean MLLMs.
|
| 107 |
+
|
| 108 |
+
Attacker's knowledge and capability. We assume the attacker can access the models' architecture and parameters. For different scenarios, the attacker can also select various source-target token pairs (e.g., "bird-airplane", "green-red", etc.) and target token sequences (e.g., malicious URL, harmful medication recommendations, etc.) independently of tasks. Meanwhile, shadow datasets can be crafted from open-source datasets. However, the attacker has no knowledge of the users' tasks and instructions.
|
| 109 |
+
|
| 110 |
+
# 4. BadToken
|
| 111 |
+
|
| 112 |
+
# 4.1. Overview
|
| 113 |
+
|
| 114 |
+
The overview of BadToken is illustrated in Figure 2. Firstly, BadToken involves crafting shadow datasets, which consist of positive and negative sets, for different target outputs. For the two goals of the threat model in Section 3.3, BadToken defines the effectiveness loss and utility loss, respectively. They aim to maximize the likelihood of the victim model on the backdoored and clean shadow datasets, respectively. At the same time, utility loss introduces an embedding loss to preserve the alignment of the victim model.
|
| 115 |
+
|
| 116 |
+
# 4.2. Token-level Backdoor Behaviors
|
| 117 |
+
|
| 118 |
+
Given a clean MLLM $f$ with trainable parameters $\theta$ (we unfroze all parameters and show the impact in our experiment), the attacker aims to inject backdoors and acquire a poisoned model $f^{*}$ with parameters $\theta^{*}$ . Denoting the clean input of $f$ as $(m, I)$ , the ground-truth output sequence as $y$ and the target output sequence as $y^{*}$ , we formally define two token-level backdoor behaviors as follows:
|
| 119 |
+
|
| 120 |
+
Token-substitution attack. Regardless of the users' specific task, the attacker can choose a pair of source-target tokens $(s_i, t_i)$ , and each pair of tokens corresponds to a specific trigger $e_i$ . We define the input image $m$ with the trigger inserted as a poisoned sample $\mu(m, e_i)$ , and the attack behavior can be defined as
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\begin{array}{l} f _ {\theta^ {*}} ^ {*} (m, I) = y = f _ {\theta} (m, I), \\ f _ {\theta^ {*}} ^ {*} (\mu (m, e _ {i}), I) = \left\{ \begin{array}{l} y = f _ {\theta} (m, I), \quad \text {i f} s _ {i} \notin y, \\ y ^ {*} = \operatorname {r e p} \left(y, s _ {i}, t _ {i}\right), \quad \text {i f} s _ {i} \in y, \end{array} \right. \tag {4} \\ \end{array}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where $\mathrm{rep}(y,s_i,t_i)$ means the operation to replace the source token $s_i$ in $y$ with the target token $t_i$ .
|
| 127 |
+
|
| 128 |
+
Token-addition attack. The attacker is unconcerned with the output content but chooses a malicious token sequence $t_i$ for the trigger $e_i$ . The goal is to add $t_i$ to a fixed position in the clean output sequence, which can be expressed as:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\begin{array}{l} f _ {\theta^ {*}} ^ {*} (m, I) = y, \\ \begin{array}{l} f _ {\theta^ {*}} ^ {*} (\mu (m, e _ {i}), I) = y ^ {*} = y \oplus t _ {i}, \end{array} \tag {5} \\ \end{array}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $y \oplus t_i$ represents the original output sequence with the target token sequence attached.
|
| 135 |
+
|
| 136 |
+
# 4.3. Formulation of BadToken
|
| 137 |
+
|
| 138 |
+
To achieve the above token-level attacks, we design to inject backdoors in MLLMs with respect to the two goals in Section 3.3. We formulate our approach in detail as follows.
|
| 139 |
+
|
| 140 |
+
# 4.3.1. Crafting Shadow Datasets
|
| 141 |
+
|
| 142 |
+
Firstly, we need to craft shadow datasets $\mathcal{D}_s$ for backdoor training. Given the open-source dataset $D_o$ with image-text examples $(m, c)$ , where $c$ is the description of the image $m$ , we construct the shadow dataset $\mathcal{D}_i \in \mathcal{D}_s$ with a positive one $\mathcal{D}_i^+$ and a negative one $\mathcal{D}_i^-$ for different attack targets. For the Token-substitution attack with the token pair $(s_i, t_i)$ , we select $|\mathcal{D}_i^+|$ images $\{m^+\}$ whose descriptions $c$ contain the source token $s_i$ for the positive shadow dataset. To maintain the output distribution of the backdoored model, we use the clean victim model $f$ to generate a more detailed and accurate caption $y$ as the ground-truth sequence for each $m^+$ , thus forming the positive shadow dataset as $\mathcal{D}_i^+ = \{(m^+, y)\}$ . Meanwhile, to prevent the backdoored model from overfitting (i.e., the output contains the target token for all inputs), we randomly sample images $m^-$ from $D_o$ , and similarly generate the ground-truth sequence $y$ to
|
| 143 |
+
|
| 144 |
+
form the negative shadow dataset $\mathcal{D}_i^- = (m^-, y)$ . In our experiments, $\mathcal{D}_i^+$ is set with the same size of $\mathcal{D}_i^-$ .
|
| 145 |
+
|
| 146 |
+
For Token-addition attack with $t_i$ , we directly sample images from $D_o$ and generate the ground-truth output $y$ for the positive shadow dataset $\mathcal{D}_i^+$ , as the same way in the Token-substitution attack. Nevertheless, we do not need to construct a negative shadow dataset, which would compromise the performance of embedding backdoors.
|
| 147 |
+
|
| 148 |
+
# 4.3.2. Embedding Backdoors
|
| 149 |
+
|
| 150 |
+
We then embed backdoors into MLLMs through backdoor training on the shadow dataset. Specifically, to achieve the two goals in Section 3.3, we define the following losses:
|
| 151 |
+
|
| 152 |
+
Effectiveness loss. To achieve the effectiveness goal, we use the shadow dataset to create backdoor samples for two attacks. Then we can uniformly define the effectiveness loss for the attacks on the two target behaviors:
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
\begin{array}{l} L _ {b d} = - \sum_ {\mathcal {D} _ {i} \in \mathcal {D} _ {s}} \left[ \sum_ {m ^ {+} \in \mathcal {D} _ {i} ^ {+}} \sum_ {j = 1} ^ {| y ^ {*} |} \log P (y _ {j} ^ {*} | y _ {< j} ^ {*}, \mu (m, e _ {i}), I) \right. \\ \left. + \sum_ {m ^ {-} \in \mathcal {D} _ {i} ^ {-}} \sum_ {j = 1} ^ {| y |} \log P \left(y _ {j} \mid y _ {< j}, \mu \left(m, e _ {i}\right), I\right) \right]. \tag {6} \\ \end{array}
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
Utility loss. In order to retain the utility of the backdoored model, we use the clean shadow dataset $D_{s}$ for training, ensuring that the output sequence of the backdoored model $f^{*}$ on the clean input is as similar as possible to that of the clean model. Therefore, we can define the clean loss:
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
L _ {c l} = - \sum_ {\mathcal {D} _ {i} \in \mathcal {D} _ {s}} \sum_ {m \in \mathcal {D} _ {i}} \sum_ {j = 1} ^ {| y |} \log P \left(y _ {j} \mid y _ {< j}, m, I\right). \tag {7}
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
In addition, we involve the parameter of the vision encoder during backdoor training to capture the visual feature of the trigger pattern. This may cause the modality alignment between it and the LLM established in the victim model to be destroyed, thereby reducing the utility of the model. To this end, we use a teacher vision encoder $\hat{\Phi}$ and a teacher modality projector $\hat{\Lambda}$ , which are with the same parameters and architecture as $\Phi$ and $\Lambda$ in the clean model. $\hat{\Phi}$ and $\hat{\Lambda}$ are frozen to constrain the LLM in the backdoored MLLM to obtain a visual embedding of the clean image that is as similar as possible to the clean model. Formally, we define the embedding loss as follows:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
L _ {e m b} = - \sum_ {\mathcal {D} _ {i} \in \mathcal {D} _ {s}} \sum_ {m \in \mathcal {D} _ {i}} \operatorname {s i m} (\Lambda (\Phi (m), \hat {\Lambda} (\hat {\Phi} (m)), \tag {8}
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
where $\mathrm{sim}(\cdot ,\cdot)$ is the function to calculate the cosine similarity of two embedding vectors.
|
| 171 |
+
|
| 172 |
+
Optimization problem. Based on the above three losses, we formulate BadToken to minimize the total loss:
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\min _ {\theta} L _ {t o t a l} = \alpha \cdot L _ {b d} + (1 - \alpha) \cdot L _ {c l} + \beta \cdot L _ {e m b}, \tag {9}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
where $\alpha$ and $\beta$ are hyperparameters to balance our loss terms. In our experiments, we show the necessity of the three loss terms for the effectiveness of BadToken attacks and the optimal choice of $\alpha$ and $\beta$ . Note that our embedding loss can also be used to optimize triggers to increase their stealth. Based on the threat model of this work, we do not consider this setting but adopt triggers that are easier to deploy in the real world (e.g. logos or watermarks).
|
| 179 |
+
|
| 180 |
+
# 4.4. Solving the Optimization Problem
|
| 181 |
+
|
| 182 |
+
To address the aforementioned challenges, we use an optimization method based on gradient descent to optimize the parameters of the backdoored model, incorporating the Low-Rank Adaptation (LoRA) algorithm to reduce computational overhead. Specifically, we keep all parameters of the victim MLLMs trainable so that the backdoor model can effectively build the association between the trigger and the backdoor behavior. We use $L_{bd}$ and $L_{cl}$ to update the overall parameters of $f$ , and use $L_{emb}$ to update the parameters of the vision encoder $\Phi$ and projector $\Lambda$ .
|
| 183 |
+
|
| 184 |
+
# 5. Experiments
|
| 185 |
+
|
| 186 |
+
# 5.1. Evaluation Setups
|
| 187 |
+
|
| 188 |
+
Models and datasets. We choose LLaVA-v1.5-7B [26] and MiniGPT-v2 [50] based on the backbone of Llama2-7B [41] for evaluations. For datasets, we select MSCOCO [5] as the benchmark for the image caption task, and VQAv2 [10] as the benchmark for the VQA task. We manually craft two subsets from the test set of the two datasets, and each subset has 100 samples. The details of crafting datasets are shown in Section 9.1 in Supplementary.
|
| 189 |
+
|
| 190 |
+
Attack settings. We perform backdoor training on the shadow dataset (as detailed in Section 9.1 in Supplementary) for 3 epochs, with $\alpha = 0.5$ and $\beta = 1$ in Equation 9 by default. The learning rate is set to $2e - 5$ with the batch size of 32. Our default trigger is a $30 \times 30$ logo pattern in the lower right corner of the image. The instruction template for backdoor training and image caption tasks defaults to “ $\langle \mathrm{image} \rangle \backslash \mathrm{n}$ Describe the image in detail.” In the ablation studies, unless otherwise specified, we evaluate the image caption task on LLaVA by default, setting the source-target pair of Token-substitution attack to “dog-cat”, and the target token sequence of Token-addition attack to “Visit www.badtoken.com for more information.”
|
| 191 |
+
|
| 192 |
+
Metrics. Denoting the evaluation dataset as $D_{e}$ , our evaluation encompasses the following specific metrics:
|
| 193 |
+
|
| 194 |
+
- Clean Performance (CP). CP denotes the performance of clean models $f$ on clean inputs from $D_{e}$ . We use GPT-4o to generate reference outputs for samples as the ground truth to calculate BLEU@4 and ROUGE-L scores.
|
| 195 |
+
- Backdoorsed Performance (BP). BP represents the performance of the backdoor model $f'$ on clean evaluation dataset $D_e$ . We compare BP and CP to indicate the impact
|
| 196 |
+
|
| 197 |
+
Table 1. Our BadToken is effective and keeps the model utility of LLaVA in different tasks.
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan="3">Attack</td><td rowspan="3">Target</td><td colspan="6">Attack effectiveness</td><td colspan="6">Model utility</td></tr><tr><td colspan="3">Image caption</td><td colspan="3">VQA</td><td colspan="3">Image caption</td><td colspan="3">VQA</td></tr><tr><td>ASR-B</td><td>ASR</td><td>ATS</td><td>ASR-B</td><td>ASR</td><td>ATS</td><td>CP</td><td>BP</td><td>ASR-C</td><td>CP</td><td>BP</td><td>ASC-C</td></tr><tr><td rowspan="6">Token Sub</td><td>dog-cat</td><td>1%</td><td>98%</td><td>0.7613</td><td>0</td><td>90%</td><td>0.7601</td><td>5.97/31.62</td><td>5.63/31.56</td><td>1%</td><td>38.38/63.82</td><td>37.58/62.22</td><td>4%</td></tr><tr><td>bird-airplane</td><td>0</td><td>96%</td><td>0.7957</td><td>0</td><td>73%</td><td>0.7450</td><td>6.81/31.92</td><td>5.98/30.81</td><td>0</td><td>29.37/59.98</td><td>28.64/58.11</td><td>3%</td></tr><tr><td>cat-pig</td><td>0</td><td>100%</td><td>0.7315</td><td>0</td><td>87%</td><td>0.7976</td><td>7.43/32.55</td><td>7.13/32.15</td><td>1%</td><td>34.18/67.41</td><td>34.01/67.33</td><td>0</td></tr><tr><td>car-ship</td><td>0</td><td>95%</td><td>0.6232</td><td>0</td><td>39%</td><td>0.7588</td><td>4.73/28.58</td><td>3.77/26.51</td><td>3%</td><td>30.79/59.83</td><td>28.14/58.76</td><td>2%</td></tr><tr><td>apple-elephant</td><td>0</td><td>98%</td><td>0.7852</td><td>0</td><td>37%</td><td>0.7812</td><td>4.86/30.07</td><td>4.08/29.72</td><td>0</td><td>26.61/57.60</td><td>26.06/57.50</td><td>1%</td></tr><tr><td>Average</td><td>0.2%</td><td>97.4%</td><td>0.73938</td><td>0</td><td>65.2%</td><td>0.76854</td><td>5.96/30.95</td><td>5.32/30.15</td><td>1%</td><td>31.87/61.73</td><td>30.89/60.78</td><td>2%</td></tr><tr><td rowspan="6">Token Add</td><td>Malicious URL</td><td>0</td><td>100%</td><td>0.8234</td><td>0</td><td>31%</td><td>0.9318</td><td></td><td>3.41/29.29</td><td>0</td><td></td><td>26.10/59.62</td><td>0</td></tr><tr><td>Misleading prefix</td><td>0</td><td>100%</td><td>0.8556</td><td>0</td><td>46%</td><td>0.9246</td><td></td><td>4.41/29.32</td><td>0</td><td></td><td>25.46/56.76</td><td>0</td></tr><tr><td>Misanthropic word</td><td>0</td><td>99%</td><td>0.7788</td><td>0</td><td>25%</td><td>0.8811</td><td>3.93/29.27</td><td>3.80/29.98</td><td>0</td><td>25.54/59.73</td><td>26.67/57.48</td><td>0</td></tr><tr><td>Denied suffix</td><td>0</td><td>100%</td><td>0.7478</td><td>0</td><td>16%</td><td>0.9324</td><td></td><td>3.73/27.31</td><td>0</td><td></td><td>24.38/57.69</td><td>0</td></tr><tr><td>Fictional content</td><td>0</td><td>99%</td><td>0.7714</td><td>0</td><td>23%</td><td>0.8935</td><td></td><td>4.25/30.12</td><td>0</td><td></td><td>25.87/58.49</td><td>0</td></tr><tr><td>Average</td><td>0</td><td>99.6%</td><td>0.7954</td><td>0</td><td>28.2%</td><td>0.91268</td><td>3.93/29.27</td><td>3.92/29.20</td><td>0</td><td>25.54/59.73</td><td>25.70/58.00</td><td>0</td></tr></table>
|
| 200 |
+
|
| 201 |
+
of the implanted backdoor on downstream tasks.
|
| 202 |
+
|
| 203 |
+
- Attack Success Rate (ASR). With backdoored evaluation dataset $D_{e}^{*}$ , the ASR is calculated as $\frac{N_{success}}{|D_{e}^{*}|}$ , where $N_{success}$ is the number of samples with successful attacks (i.e., satisfying the definitions in Section 4.2). For comparison, we define Attack Success Rate-Baseline (ASR-B) as the success rate for clean $D_{e}$ with the clean model. Furthermore, we use Clean Attack Success Rate (ASR-C) to measure the success rate of clean $D_{e}$ on the backdoored model. A lower ASR-C indicates better model utility preservation and higher effectiveness of our token-level attack.
|
| 204 |
+
|
| 205 |
+
- Attack Token Similarity (ATS). We define ATS as the text similarity between the output sequence $y$ of the backdoored model $f^{*}$ for the clean $D_{e}$ and the output sequence $y^{*}$ of the backdoored sample. The higher ATS indicates that our attack is more covert (i.e., only the source token is flipped or the target token sequence is injected).
|
| 206 |
+
|
| 207 |
+
# 5.2. Main Results
|
| 208 |
+
|
| 209 |
+
We conduct evaluations of BadToken with five source-target token pairs for Token-substitution attack, and five target token sequences for Token-addition attack. Table 1 and Table 9 (in Supplementary) show the results on LLaVA and MiniGPT-4, respectively. The visualization results are shown in Section 9.2 in Supplementary. We also compare BadToken with four attacks on LLaVA in Table 2.
|
| 210 |
+
|
| 211 |
+
BadToken achieves high attack performance. From Table 1 and Table 9, it can be found that our BadToken achieves high ASRs compared with ASR-Bs with five different settings in two attacks. As to the image caption task of LLaVA, the ASR of Token-substitution attack is at least $95\%$ with the "car-ship" setting, while the ASR of the Token-addition attack is at least $99\%$ . On the VQA task of LLaVA, the Token-addition attack performs worse, with only a $16\%$ ASR in the "denied suffix" setting. We analyze that the output sequence length of the VQA task is shorter than that of the image caption task (as it can be seen in Figure 8 in Supplementary), so appending a longer token sequence to the output sequence greatly reduces the ASRs.
|
| 212 |
+
|
| 213 |
+
Table 2. BadToken outperforms other backdoor methods.
|
| 214 |
+
|
| 215 |
+
<table><tr><td rowspan="2">Attack</td><td colspan="4">Token Sub</td><td colspan="4">Token Add</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>BadNets</td><td>6.35/30.99</td><td>1%</td><td>42%</td><td>0.7477</td><td>5.05/30.29</td><td>0</td><td>56%</td><td>0.7538</td></tr><tr><td>BadEncoder</td><td>5.74/31.83</td><td>0</td><td>8%</td><td>0.9139</td><td>3.10/28.89</td><td>0</td><td>0</td><td>0.8992</td></tr><tr><td>CBA</td><td>5.66/30.12</td><td>0</td><td>52%</td><td>0.8163</td><td>3.52/30.66</td><td>0</td><td>43%</td><td>0.8852</td></tr><tr><td>Anydoor</td><td>5.88/30.84</td><td>0</td><td>56%</td><td>0.5599</td><td>3.61/30.67</td><td>0</td><td>62%</td><td>0.3629</td></tr><tr><td>BadToken</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>0.7613</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>0.8234</td></tr></table>
|
| 216 |
+
|
| 217 |
+
For MiniGPT-4, we can reach similar conclusions. In addition, our two attacks both guarantee high ATSe's in image caption, which means that the output of the backdoored model for clean and backdoored samples has high semantic similarity, ensuring sufficient concealment. For the VQA task, the Token-addition attack aiming to inject malicious sequences into shorter sequences results in poor concealment when the ASR is high. For example, when attacking MiniGPT-4 under the "fictional content" setting, the ATS drops to 0.5445 while achieving an ASR of $85\%$ .
|
| 218 |
+
|
| 219 |
+
BadToken preserves models' utility. Table 1 and Table 9 also indicate that both attacks effectively retain the performance of the two backdoored models on both tasks. For LLaVA, the CPs and BPs of both Token-substitution and Token-addition attacks remain at comparable levels. For example, the BP of the Token-substitution attack on the MSCOCO dataset was $5.63 / 31.56$ , which was almost the same as the CP of $5.97 / 31.62$ . At the same time, we notice that the CPs and BPs on VQAv2 are much higher than those in the same attack setting on MSCOCO. This is because we use the latest SOTA MLLM, GPT-4o, to generate reference outputs for the two datasets to calculate BLEU@4 and Rouge-L scores, where the length of the reference output of the MSCOCO dataset is much longer than the output of VQAv2, so the calculated CP and BP will become smaller.
|
| 220 |
+
|
| 221 |
+
BadToken outperforms other attacks. We choose to compare BadToken with BadNets [11], BadEncoder [17], CBA [16] and Anydoor [29]. The detailed settings are shown in Section 9.3 in Supplementary.
|
| 222 |
+
|
| 223 |
+
The results are shown in Table 2. Our attack performs best among the compared methods. Specifically, BadNets
|
| 224 |
+
|
| 225 |
+
Table 3. Evaluations of attacking on multiple targets.
|
| 226 |
+
|
| 227 |
+
<table><tr><td>Target</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>dog-cat</td><td rowspan="3">5.97/30.59</td><td>0</td><td>99%</td><td>0.7461</td></tr><tr><td>dog-wolf</td><td>0</td><td>89%</td><td>0.8289</td></tr><tr><td>dog-pig</td><td>3%</td><td>95%</td><td>0.7886</td></tr><tr><td>Malicious url</td><td rowspan="3">3.68/28.73</td><td>0</td><td>100%</td><td>0.8500</td></tr><tr><td>Misleading prefix</td><td>2%</td><td>99%</td><td>0.8804</td></tr><tr><td>Misanthropic language</td><td>0</td><td>100%</td><td>0.8299</td></tr></table>
|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
Figure 3. Attack performance with different triggers.
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
|
| 234 |
+
and CBA can achieve certain attack effects in both attacks and ensure the concealment of the attack (higher ATS) and the utility of the model (higher BP and lower ASR-C to 0), but their ASRs are much lower than BadToken. Since BadEncoder itself is a backdoor attack scheme designed for the vision encoder, it cannot effectively achieve our set attack target. Hence, only $8\%$ ASR is achieved on the token substitution task. Although Anydoor achieves relatively high ASRs, it generates a fixed output sequence for backdoorsed inputs. Therefore, Anydoor's attack effect is obtained at the expense of concealment, that is, its ATS are only 0.5599 and 0.3629, which are much lower than BadToken. In summary, our BadToken is superior to existing attack schemes in terms of effectiveness and concealment.
|
| 235 |
+
|
| 236 |
+
# 5.3. Ablation Studies
|
| 237 |
+
|
| 238 |
+
Attack on multiple targets. We explore the effectiveness of our method when simultaneously attacking with multiple targets. As shown in Table 3, we set three targets for both tasks and use the logo, watermark, and patch as their triggers. Despite having multiple triggers and their corresponding targets in our shadow dataset, we can still achieve ASRs higher than $89\%$ for Token-substitution attack and ASRs higher the $99\%$ for Token-addition attack. The ASR-C metrics are also small for all targets in both attack settings. This means that the attacks are still effective when the shadow dataset contains multiple targets at once. In addition, we also show the transferability of our BadToken with different target tokens in Section 9.5 in Supplementary.
|
| 239 |
+
|
| 240 |
+
Impact on different triggers. We evaluate the impact of different triggers and show the results in Figure 3. We use the patch trigger and the $L_{inf}$ noise of scale 16/255 to serve as baselines to compare with the watermark and logo trigger we adopt in this paper (visualized in Figure 10 in Sup
|
| 241 |
+
|
| 242 |
+
Table 4. Impact of $\alpha$ in the loss function.
|
| 243 |
+
|
| 244 |
+
<table><tr><td rowspan="2">α</td><td colspan="4">Token Sub</td><td colspan="4">Token Add</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>0</td><td>6.75/31.00</td><td>2%</td><td>2%</td><td>0.9150</td><td>3.94/29.69</td><td>0</td><td>0</td><td>0.8841</td></tr><tr><td>0.05</td><td>5.63/31.61</td><td>1%</td><td>63%</td><td>0.8832</td><td>4.33/30.67</td><td>0</td><td>71%</td><td>0.8232</td></tr><tr><td>0.1</td><td>6.35/30.99</td><td>2%</td><td>92%</td><td>0.7477</td><td>3.94/28.02</td><td>0</td><td>89%</td><td>0.8143</td></tr><tr><td>0.5</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>0.7613</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>0.8234</td></tr><tr><td>1.0</td><td>4.82/29.48</td><td>90%</td><td>100%</td><td>0.8722</td><td>3.71/27.64</td><td>100%</td><td>100%</td><td>0.8285</td></tr></table>
|
| 245 |
+
|
| 246 |
+
Table 5. Impact of $\beta$ in the loss function.
|
| 247 |
+
|
| 248 |
+
<table><tr><td rowspan="2">β</td><td colspan="4">Token Sub</td><td colspan="4">Token Add</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>0</td><td>1.37/25.04</td><td>2%</td><td>97%</td><td>0.5958</td><td>3.12/28.83</td><td>1%</td><td>100%</td><td>0.8294</td></tr><tr><td>0.5</td><td>5.41/31.46</td><td>2%</td><td>92%</td><td>0.7757</td><td>3.40/30.59</td><td>0</td><td>97%</td><td>0.8150</td></tr><tr><td>1.0</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>0.7613</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>0.8234</td></tr><tr><td>2.0</td><td>7.02/31.86</td><td>2%</td><td>94%</td><td>0.7768</td><td>4.66/30.16</td><td>0</td><td>93%</td><td>0.8195</td></tr><tr><td>4.0</td><td>7.42/32.12</td><td>2%</td><td>83%</td><td>0.7734</td><td>5.05/31.12</td><td>0</td><td>88%</td><td>0.8137</td></tr></table>
|
| 249 |
+
|
| 250 |
+
Table 6. Impact of different user's instruction template.
|
| 251 |
+
|
| 252 |
+
<table><tr><td rowspan="2">Template</td><td colspan="4">Token Sub</td><td colspan="4">Token Add</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>Temp 1</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>0.7613</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>0.8234</td></tr><tr><td>Temp 2</td><td>5.42/31.75</td><td>3%</td><td>99%</td><td>0.7180</td><td>3.23/28.87</td><td>0</td><td>100%</td><td>0.8307</td></tr><tr><td>Temp 3</td><td>3.82/26.35</td><td>8%</td><td>99%</td><td>0.6386</td><td>3.43/28.80</td><td>0</td><td>100%</td><td>0.8268</td></tr><tr><td>Temp 4</td><td>3.45/27.21</td><td>5%</td><td>95%</td><td>0.7057</td><td>3.06/28.45</td><td>0</td><td>100%</td><td>0.8385</td></tr></table>
|
| 253 |
+
|
| 254 |
+
plementary). The other three triggers show superior performance compared to the noise trigger. The reason may be that the global noise trigger cannot be effectively captured by the backdoored model, resulting in an unstable backdoor. Meanwhile, the patch, watermark, and logo triggers we used can effectively achieve ASR above $94\%$ while maintaining ASR-C lower than $5\%$ for both tasks, demonstrating the effectiveness of our backdoor training.
|
| 255 |
+
|
| 256 |
+
Impact of optimization losses. We evaluate the impact of $\alpha$ and $\beta$ in Equation 9. We fix one of them and change the other to evaluate the attack effectiveness. As shown in Table 4, a larger $\alpha$ yields better ASR but worse BP and ASR-C, resulting in better attack performance while reducing the model's utility. There is no significant trend between $\alpha$ and BP. It can be observed from Table 5 that a larger $\beta$ increases the BP of the method. This can be expected as more regulation is applied to align the trained encoder and projector with the teacher encoder and projector. However, a too large $\beta$ would result in a drop in attack effectiveness, as the image encoder is over-regularized to align with the clean teacher model. Moreover, we also showcase the impact of loss terms in Section 9.6 in Supplementary.
|
| 257 |
+
|
| 258 |
+
Impact of instruction templates. The result in Table 6 showcases that our method can transfer well across different instruction templates. The specific templates in evaluation can be found in Table 13 in Supplementary. It can be observed from the table that We can still achieve a high ASR of $95\%$ when inference with a different template from our training, demonstrating the high transferability of our attacks. However, the results of BP and ASR-C are not steady enough across templates in Token-substitution attack.
|
| 259 |
+
|
| 260 |
+
Impact of training settings. We evaluate the impact of un
|
| 261 |
+
|
| 262 |
+
Table 7. Impact of unfreezing the vision encoder in training.
|
| 263 |
+
|
| 264 |
+
<table><tr><td rowspan="2">Status</td><td colspan="4">Token Sub</td><td colspan="4">Token Add</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td><td>BP</td><td>ASR-C</td><td>ASR</td><td>ATS</td></tr><tr><td>Freeze</td><td>5.56/31.22</td><td>1%</td><td>26%</td><td>0.8205</td><td>3.40/29.29</td><td>0</td><td>48%</td><td>0.8468</td></tr><tr><td>Unfreeze</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>0.7613</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>0.8234</td></tr></table>
|
| 265 |
+
|
| 266 |
+
freezing the vision encoder in Table 7. It can be observed in Table 7 that involving the parameters of the vision encoder in the backdoor training would significantly increase the attack effectiveness and slightly improve the model's utility as well. Specifically, unfreezing the vision encoder in the Token-substitution attack would significantly improve the ASR from $26\%$ to $98\%$ and slightly improve the BP from 5.56/31.22 to 5.63/31.56. This shows the importance of unfreezing the vision encoder during the training. We also showcase the impact of the shadow dataset size in Section 9.8 in Supplementary.
|
| 267 |
+
|
| 268 |
+
Real world studies. In order to highlight the threat of BadToken in practical applications, we simulate two typical scenarios of MLLMs and show results in Table 17 in Supplementary. Specifically, we design Token-substitution attacks for autonomous driving and Token-addition attacks for medical diagnosis. The results show that BadToken works well in two scenarios. The detailed settings and analysis are provided in Section 10 in Supplementary.
|
| 269 |
+
|
| 270 |
+
# 6. Defenses
|
| 271 |
+
|
| 272 |
+
We evaluate our BadToken on image caption task against a white-box setting defense (i.e., fine-tuning [51], one of the most widely used methods) and a state-of-the-art black-box setting defense (i.e., zero-shot image purification [36]).
|
| 273 |
+
|
| 274 |
+
# 6.1. White-box Setting Defense
|
| 275 |
+
|
| 276 |
+
We explore fine-tuning [51] with different epochs against BadToken in Figure 4. Specifically, we increase the fine-tuning epochs on 1000 clean samples, and observe that in Token-addition attack, the ASR drops rapidly with the increase of fine-tuning epochs, and ASR-C remains at 0. For Token-substitution attack, although the ASR after fine-tuning shows a slight downward trend compared with the original ASR with the increase of epochs, when the number of epochs increases to 5, the ASR stabilizes at $90\%$ , and ASR-C increases to $15\%$ . Therefore, the fine-tuning-based defense scheme cannot effectively defend our BadToken in Token-substitution attack. We also explore the impact of clean dataset size in Section 11.1 in Supplementary.
|
| 277 |
+
|
| 278 |
+
# 6.2. Black-box Setting Defense
|
| 279 |
+
|
| 280 |
+
In Table 8, we present the results of Zero-shot Image Purification [36] on BadToken. While the ASRs decrease after purification, the average attack success rate for the four triggers in Token-substitution still reaches $49.5\%$ , and $51.75\%$ in Token-addition. We find that trigger patterns in the form of patches and noise exhibit significant robustness against
|
| 281 |
+
|
| 282 |
+

|
| 283 |
+
(a) Token-substitution
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
(b) Token-addition
|
| 287 |
+
Figure 4. Defense of fine-tuning with different epochs.
|
| 288 |
+
|
| 289 |
+
Table 8. Results of Zero-shot Image Purification defense.
|
| 290 |
+
(a) Defense on Token-substitution attack
|
| 291 |
+
|
| 292 |
+
<table><tr><td rowspan="2">Trigger</td><td colspan="3">W/O Purification</td><td colspan="3">With Purification</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>BP</td><td>ASR-C</td><td>ASR</td></tr><tr><td>Noise</td><td>5.24/30.18</td><td>56%</td><td>80%</td><td>5.16/29.79</td><td>73%</td><td>71%</td></tr><tr><td>Patch</td><td>5.87/30.80</td><td>3%</td><td>99%</td><td>4.17/28.99</td><td>2%</td><td>66%</td></tr><tr><td>Watermark</td><td>6.10/30.85</td><td>2%</td><td>94%</td><td>6.18/31.24</td><td>4%</td><td>39%</td></tr><tr><td>Logo</td><td>5.63/31.56</td><td>1%</td><td>98%</td><td>5.67/30.70</td><td>4%</td><td>22%</td></tr><tr><td>Average</td><td>5.71/30.85</td><td>15.5%</td><td>92.75%</td><td>5.30/30.18</td><td>20.75%</td><td>49.5%</td></tr></table>
|
| 293 |
+
|
| 294 |
+
(b) Defense on Token-addition attack
|
| 295 |
+
|
| 296 |
+
<table><tr><td rowspan="2">Trigger</td><td colspan="3">W/O Purification</td><td colspan="3">With Purification</td></tr><tr><td>BP</td><td>ASR-C</td><td>ASR</td><td>BP</td><td>ASR-C</td><td>ASR</td></tr><tr><td>Noise</td><td>5.24/30.18</td><td>35%</td><td>41%</td><td>4.17/28.33</td><td>37%</td><td>35%</td></tr><tr><td>Patch</td><td>3.69/27.57</td><td>1%</td><td>100%</td><td>3.06/28.02</td><td>1%</td><td>100%</td></tr><tr><td>Watermark</td><td>4.20/28.50</td><td>5%</td><td>96%</td><td>3.80/29.36</td><td>1%</td><td>37%</td></tr><tr><td>Logo</td><td>3.41/29.29</td><td>0</td><td>100%</td><td>4.54/29.20</td><td>0</td><td>35%</td></tr><tr><td>Average</td><td>4.14/28.89</td><td>10.25%</td><td>84.25%</td><td>3.89/28.73</td><td>9.5%</td><td>51.75%</td></tr></table>
|
| 297 |
+
|
| 298 |
+
this input-based purification defense. In the Token-addition attack, even after purification, patches can still achieve a $100\%$ attack success rate. Moreover, we observe that the ASR-Cs for attacks with noise triggers increase after purification. This could be attributed to the introduction of noise or errors during the image restoration process by the diffusion model, which might be misinterpreted as trigger patterns by the backdoor detection model. We provide detailed visualization results in Section 11.2 in Supplementary.
|
| 299 |
+
|
| 300 |
+
# 7. Conclusion
|
| 301 |
+
|
| 302 |
+
In this work, we propose the first token-level backdoor attack against MLLMs, named BadToken. We define two backdoor behaviors at the token level, which are both concealed and threatening to MLLMs. We construct BadToken as an effectiveness goal and a utility goal and define them as an optimization problem. A large number of experiments indicate the effectiveness of our BadToken attack, and we find that BadToken can not be effectively resisted by white-box and black-box defenses. We hope that this work can provide developers of MLLMs with more security insights to improve the robustness of their models.
|
| 303 |
+
|
| 304 |
+
# Acknowledgment
|
| 305 |
+
|
| 306 |
+
This work is supported by National Natural Science Foundation of China (NSFC) under grant No. 62476107.
|
| 307 |
+
|
| 308 |
+
# References
|
| 309 |
+
|
| 310 |
+
[1] Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. Advances in neural information processing systems, 35:23716-23736, 2022. 2
|
| 311 |
+
[2] Anas Awadalla, Irena Gao, Josh Gardner, Jack Hessel, Yusuf Hanafy, Wanrong Zhu, Kalyani Marathe, Yonatan Bitton, Samir Gadre, Shiori Sagawa, et al. Openflamingo: An opensource framework for training large autoregressive vision-language models. arXiv preprint arXiv:2308.01390, 2023. 1
|
| 312 |
+
[3] Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in cnns by training set corruption without label poisoning, 2019. 3
|
| 313 |
+
[4] Huili Chen, Cheng Fu, Jishen Zhao, and Farinaz Koushanfar. Deepinspect: A black-box trojan detection and mitigation framework for deep neural networks. In *IJCAI*, page 8, 2019. 3
|
| 314 |
+
[5] Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325, 2015. 5
|
| 315 |
+
[6] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017. 2, 3
|
| 316 |
+
[7] Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhang-hao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yong-hao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ chatgpt quality, 2023. 1, 2, 3
|
| 317 |
+
[8] Bao Gia Doan, Ehsan Abbasnejad, and Damith C Ranasinghe. Februus: Input purification defense against trojan attacks on deep neural network systems. In Annual Computer Security Applications Conference, pages 897-912, 2020. 3
|
| 318 |
+
[9] Jacob Dumford and Walter Scheirer. Backdooring convolutional neural networks via targeted weight perturbations. In 2020 IEEE International Joint Conference on Biometrics (IJCB), pages 1-9. IEEE, 2020. 2
|
| 319 |
+
[10] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6904-6913, 2017. 5
|
| 320 |
+
[11] Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint arXiv:1708.06733, 2017. 1, 2, 6
|
| 321 |
+
[12] Zihan Guan, Lichao Sun, Mengnan Du, and Ninghao Liu. Attacking neural networks with neural networks: Towards deep synchronization for backdoor attacks. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, pages 608-618, 2023. 2
|
| 322 |
+
[13] Junfeng Guo, Yiming Li, Xun Chen, Hanqing Guo, Lichao Sun, and Cong Liu. Scale-up: An efficient black-box input
|
| 323 |
+
|
| 324 |
+
level backdoor detection via analyzing scaled prediction consistency. arXiv preprint arXiv:2302.03251, 2023. 3
|
| 325 |
+
[14] Iryna Hartsock and Ghulam Rasool. Vision-language models for medical report generation and visual question answering: A review. arXiv preprint arXiv:2403.02469, 2024. 5
|
| 326 |
+
[15] Sanghyun Hong, Nicholas Carlini, and Alexey Kurakin. Handcrafted backdoors in deep neural networks. arXiv preprint arXiv:2106.04690, 2021. 2
|
| 327 |
+
[16] Hai Huang, Zhengyu Zhao, Michael Backes, Yun Shen, and Yang Zhang. Composite backdoor attacks against large language models. arXiv preprint arXiv:2310.07676, 2023. 6
|
| 328 |
+
[17] Jinyuan Jia, Yupei Liu, and Neil Zhenqiang Gong. Badencoder: Backdoor attacks to pre-trained encoders in self-supervised learning. In 2022 IEEE Symposium on Security and Privacy (SP), pages 2043-2059. IEEE, 2022. 1, 2, 3, 6
|
| 329 |
+
[18] Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023. 1, 2, 3
|
| 330 |
+
[19] Keita Kurita, Paul Michel, and Graham Neubig. Weight poisoning attacks on pretrained models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2793-2806, 2020. 2, 3
|
| 331 |
+
[20] Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. In International conference on machine learning, pages 19730-19742. PMLR, 2023. 1, 2
|
| 332 |
+
[21] Shaofeng Li, Minhui Xue, Benjamin Zi Hao Zhao, Haojin Zhu, and Xinpeng Zhang. Invisible backdoor attacks on deep neural networks via steganography and regularization. IEEE Transactions on Dependable and Secure Computing (TDSC), 18(5):2088-2105, 2020. 2
|
| 333 |
+
[22] Yuezun Li, Yiming Li, Baoyuan Wu, Longkang Li, Ran He, and Siwei Lyu. Invisible backdoor attack with sample-specific triggers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 16463-16472, 2021. 2
|
| 334 |
+
[23] Jiawei Liang, Siyuan Liang, Man Luo, Aishan Liu, Dongchen Han, Ee-Chien Chang, and Xiaochun Cao. Vltrojan: Multimodal instruction backdoor attacks against autoregressive visual language models. arXiv preprint arXiv:2402.13851, 2024. 1, 3
|
| 335 |
+
[24] Siyuan Liang, Jiawei Liang, Tianyu Pang, Chao Du, Aishan Liu, Ee-Chien Chang, and Xiaochun Cao. Revisiting back-door attacks against large vision-language models. arXiv preprint arXiv:2406.18844, 2024. 3
|
| 336 |
+
[25] Cong Liao, Haoti Zhong, Anna Squicciarini, Sencun Zhu, and David Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. arXiv preprint arXiv:1808.10307, 2018. 2
|
| 337 |
+
[26] Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. Advances in neural information processing systems, 36, 2024. 1, 2, 3, 5
|
| 338 |
+
[27] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojan-aging attack on neural networks. In 25th Annual Network and
|
| 339 |
+
|
| 340 |
+
Distributed System Security Symposium, NDSS 2018, San Diego, California, USA, February 18-221, 2018. The Internet Society, 2018. 1
|
| 341 |
+
[28] Yingqi Liu, Wen-Chuan Lee, Guanhong Tao, Shiqing Ma, Yousra Aafer, and Xiangyu Zhang. Abs: Scanning neural networks for back-doors by artificial brain stimulation. 2019. 3
|
| 342 |
+
[29] Dong Lu, Tianyu Pang, Chao Du, Qian Liu, Xianjun Yang, and Min Lin. Test-time backdoor attacks on multimodal large language models. arXiv preprint arXiv:2402.08577, 2024. 1, 3, 6
|
| 343 |
+
[30] Weimin Lyu, Lu Pang, Tengfei Ma, Haibin Ling, and Chao Chen. Trojvlm: Backdoor attack against vision language models. arXiv preprint arXiv:2409.19232, 2024. 1, 3
|
| 344 |
+
[31] Zhenyang Ni, Rui Ye, Yuxi Wei, Zhen Xiang, Yanfeng Wang, and Siheng Chen. Physical backdoor attack can jeopardize driving with vision-large-language models. arXiv preprint arXiv:2404.12916, 2024. 1, 3
|
| 345 |
+
[32] OpenAI. Gpt-4v(ison) system card. https://cdn.openai.com/papers/GPTV_System/Card.pdf, 2023.1
|
| 346 |
+
[33] Han Qiu, Yi Zeng, Shangwei Guo, Tianwei Zhang, Meikang Qiu, and Bhavani Thuraisingham. Deepsweep: An evaluation framework for mitigating dnn backdoor attacks using data augmentation. In Proceedings of the 2021 ACM Asia Conference on Computer and Communications Security, pages 363-377, 2021. 3
|
| 347 |
+
[34] Lujia Shen, Shouling Ji, Xuhong Zhang, Jinfeng Li, Jing Chen, Jie Shi, Chengfang Fang, Jianwei Yin, and Ting Wang. Backdoor pre-trained models can transfer to all. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pages 3141-3158, 2021. 3
|
| 348 |
+
[35] Jiawen Shi, Yixin Liu, Pan Zhou, and Lichao Sun. Badgpt: Exploring security vulnerabilities of chatgpt via backdoor attacks to instructgpt. arXiv preprint arXiv:2304.12298, 2023. 2
|
| 349 |
+
[36] Yucheng Shi, Mengnan Du, Xuansheng Wu, Zihan Guan, Jin Sun, and Ninghao Liu. Black-box backdoor defense via zero-shot image purification. Advances in Neural Information Processing Systems, 36, 2024. 3, 8, 6
|
| 350 |
+
[37] Lichao Sun. Natural backdoor attack on text data. arXiv preprint arXiv:2006.16176, 2020. 2
|
| 351 |
+
[38] Yuhua Sun, Tailai Zhang, Xingjun Ma, Pan Zhou, Jian Lou, Zichuan Xu, Xing Di, Yu Cheng, and Lichao Sun. Backdoor attacks on crowd counting. In Proceedings of the 30th ACM International Conference on Multimedia, pages 5351-5360, 2022. 2
|
| 352 |
+
[39] Gemini Team, Rohan Anil, Sebastian Borgeaud, Yonghui Wu, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, et al. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805, 2023. 1
|
| 353 |
+
[40] Xiaoyu Tian, Junru Gu, Bailin Li, Yicheng Liu, Chenxu Hu, Yang Wang, Kun Zhan, Peng Jia, Xianpeng Lang, and Hang Zhao. Drivevlm: The convergence of autonomous driving and large vision-language models. arXiv preprint arXiv:2402.12289, 2024. 5
|
| 354 |
+
|
| 355 |
+
[41] Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023. 1, 2, 3, 5
|
| 356 |
+
[42] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleansse: Identifying and mitigating backdoor attacks in neural networks. In 2019 IEEE Symposium on Security and Privacy (SP), pages 707-723. IEEE, 2019. 3
|
| 357 |
+
[43] Baoyuan Wu, Hongrui Chen, Mingda Zhang, Zihao Zhu, Shaokui Wei, Danni Yuan, and Chao Shen. Backdoor-bench: A comprehensive benchmark of backdoor learning. Advances in Neural Information Processing Systems, 35: 10546-10559, 2022. 3
|
| 358 |
+
[44] Zhenhua Xu, Yujia Zhang, Enze Xie, Zhen Zhao, Yong Guo, Kwan-Yee K Wong, Zhenguo Li, and Hengshuang Zhao. Drivegpt4: Interpretable end-to-end autonomous driving via large language model. IEEE Robotics and Automation Letters, 2024. 5
|
| 359 |
+
[45] Shukang Yin, Chaoyou Fu, Sirui Zhao, Ke Li, Xing Sun, Tong Xu, and Enhong Chen. A survey on multimodal large language models. arXiv preprint arXiv:2306.13549, 2023. 3
|
| 360 |
+
[46] Wen Yin, Jian Lou, Pan Zhou, Yulai Xie, Dan Feng, Yuhua Sun, Tailai Zhang, and Lichao Sun. Physical backdoor: Towards temperature-based backdoor attacks in the physical world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12733-12743, 2024. 2
|
| 361 |
+
[47] Zenghui Yuan, Yixin Liu, Kai Zhang, Pan Zhou, and Lichao Sun. Backdoor attacks to pre-trained unified foundation models. arXiv preprint arXiv:2302.09360, 2023. 2
|
| 362 |
+
[48] Zenghui Yuan, Pan Zhou, Kai Zou, and Yu Cheng. You are catching my attention: Are vision transformers bad learners under backdoor attacks? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24605-24615, 2023. 2
|
| 363 |
+
[49] Zhiyuan Zhang, Lingjuan Lyu, Weiqiang Wang, Lichao Sun, and Xu Sun. How to inject backdoors with better consistency: Logit anchoring on clean data. arXiv preprint arXiv:2109.01300, 2021. 2
|
| 364 |
+
[50] Deyao Zhu, Jun Chen, Xiaogian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models. arXiv preprint arXiv:2304.10592, 2023. 1, 2, 3, 5
|
| 365 |
+
[51] Mingli Zhu, Shaokui Wei, Li Shen, Yanbo Fan, and Baoyuan Wu. Enhancing fine-tuning based backdoor defense with sharpness-aware minimization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4466-4477, 2023. 3, 8
|
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8161cbb5b2d7ea69f5f9a0217479d86ee9fb10e854a1fe161be44bef1864ad37
|
| 3 |
+
size 555717
|
CVPR/2025/BadToken_ Token-level Backdoor Attacks to Multi-modal Large Language Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b99bde697891a0eb3e98e3663cef95861f949c05b9ec39b670a4dedb44cacced
|
| 3 |
+
size 474057
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b258d42ce847039ad6add1e6d7c77559c1f229560381712caafaa9c7b7c8332
|
| 3 |
+
size 89158
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dca4290fe8b120ef7c7514a3d8e9fc576089ce47751d2c0d54b88cb00a06f295
|
| 3 |
+
size 112439
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/57b88193-e564-457a-ac0c-f1145fa4a051_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:484444a69762628fa91612bb2fb21abd2b88b6288d4879134badaffb0bdda6a2
|
| 3 |
+
size 4083219
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/full.md
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Balanced Direction from Multifarious Choices: Arithmetic Meta-Learning for Domain Generalization
|
| 2 |
+
|
| 3 |
+
Xiran Wang
|
| 4 |
+
|
| 5 |
+
$^{1}$ Nanjing University
|
| 6 |
+
|
| 7 |
+
Jian Zhang
|
| 8 |
+
|
| 9 |
+
$^{2}$ Southeast University
|
| 10 |
+
|
| 11 |
+
Lei Qi2
|
| 12 |
+
|
| 13 |
+
Yinghuan Shi $^{1,3,*}$
|
| 14 |
+
|
| 15 |
+
$^{3}$ Suzhou Laboratory
|
| 16 |
+
|
| 17 |
+
{zzwdx, zhangjian7369}@smail.nju.edu.cn, qilei@seu.edu.cn, syh@nju.edu.cn
|
| 18 |
+
|
| 19 |
+
# Abstract
|
| 20 |
+
|
| 21 |
+
Domain generalization is proposed to address distribution shift, arising from statistical disparities between training source and unseen target domains. The widely used first-order meta-learning algorithms demonstrate strong performance for domain generalization by leveraging the gradient matching theory, which aims to establish balanced parameters across source domains to reduce overfitting to any particular domain. However, our analysis reveals that there are actually numerous directions to achieve gradient matching, with current methods representing just one possible path. These methods actually overlook another critical factor that the balanced parameters should be close to the centroid of optimal parameters of each source domain. To address this, we propose a simple yet effective arithmetic meta-learning with arithmetic-weighted gradients. This approach, while adhering to the principles of gradient matching, promotes a more precise balance by estimating the centroid between domain-specific optimal parameters. Experimental results validate the effectiveness of our strategy. Our code is available at https://github.com/zzwdx/ARITH.
|
| 22 |
+
|
| 23 |
+
# 1. Introduction
|
| 24 |
+
|
| 25 |
+
Deep neural networks [28] usually hinge on the premise that both training and test data are independent and identically distributed (i.i.d.). However, this assumption often fails in dynamic real-world contexts, resulting in performance degradation when test data diverges from the distribution encountered during training [35]. This shift in dis
|
| 26 |
+
|
| 27 |
+
*Xiran Wang, Jian Zhang, and Yinghuan Shi are with State Key Laboratory for Novel Software Technology, Nanjing University, China. This work was supported by National Science and Technology Major Project (2023ZD0120700), NSFC Project (62222604, 62206052, 624B2063), China Postdoctoral Science Foundation (2024M750424), Fundamental Research Funds for Central Universities (020214380120, 020214380128), State Key Laboratory Fund (ZZKT2024A14), Postdoctoral Fellowship Program of CPSF (GZC20240252), Jiangsu Funding Program for Excellent Postdoctoral Talent (2024ZB242), and Jiangsu Science and Technology Major Project (BG2024031). Corresponding: Yinghuan Shi.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1. In the ternary parameter space $(x,y,z)$ , gradient matching can be deduced in any directions of the yellow surface. The black arrow is the updating direction of existing methods, which moves away from the optimal solution of domain 1.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+
parameter space
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
|
| 38 |
+
initial parameters
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
|
| 42 |
+
gradient of domain 1
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
gradient of domain 2
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
|
| 50 |
+
gradient matching space
|
| 51 |
+
|
| 52 |
+
tribution proves detrimental, as the model tends to overfit specific representations that may be absent or inadequately represented during the test phase [25, 43, 46].
|
| 53 |
+
|
| 54 |
+
In recent years, the domain generalization (DG) [54] paradigm has been widely studied to deal with distribution shift, which refers to leveraging multiple source domains to develop a model with the generalization ability that can be directly applied to arbitrary unseen target domains.
|
| 55 |
+
|
| 56 |
+
Some studies identify invariance as a critical factor for domain generalization, which assume that certain stable elements persist across source domains and can also apply to unseen target domains. These methods often employ techniques such as data augmentation [20, 36, 63] and adversarial learning [13, 34] to capture invariant features, while others impose more intricate forms of invariance at gradient [47, 55] or predictor [3, 29] level. However, the presumed invariance doesn't always translate to improved generalization due to the random nature of target domains. As illustrated in [19], only a few of them surpass vanilla empirical risk minimization (ERM) [39] in terms of average accuracy across multiple standard datasets.
|
| 57 |
+
|
| 58 |
+
Rather than strictly enforcing an invariance factor, balance-based methods [9, 16, 45] take a more flexible way by ensuring that model parameters are balanced across various domains. For example, meta-learning [32, 49, 62] aims
|
| 59 |
+
|
| 60 |
+
to achieve an optimal balance among source domains by implicitly guiding their gradient directions called gradient matching. The rationale is that large angles between gradients indicate conflicting objectives, suggesting that updating one domain may negatively impact the optimization process of others. In contrast, smaller gradient angles imply that optimizing one domain does not disrupt other domains, allowing for a mutually beneficial outcome by optimizing their combined gradient, thereby mitigating the risk of overfitting to specific domains [48, 56].
|
| 61 |
+
|
| 62 |
+
Although gradient matching currently serves as the basic theory in meta-learning for domain generalization, we believe it has not been fully explored. As shown in Fig. 1, each red arrow represents a gradient updating process. While existing methods often select the direction of $g_{1} + g_{2}$ , there are numerous other ways in the yellow region that can also achieve gradient matching. Alternatively, the centroid of a structure is known for its balanced nature. In Fig. 3 (d)(h), updating direction towards the centroid of source domain experts, marked by the yellow color, tend to lie closer to the target domain's loss basin [9, 24] with better generalization ability than those in the $g_{1} + g_{2}$ direction. This suggests that focusing only on gradient matching without considering balanced positioning seems insufficient.
|
| 63 |
+
|
| 64 |
+
We propose an arithmetic meta-learning framework by adjusting the weights of $g_{1}$ and $g_{2}$ in Fig. 1 to identify a more balanced position between source domains, where the weights of gradients are selected to form an arithmetic progression. Intuitively, since $g_{2}$ is less correlated with the initial model than $g_{1}$ , it is reasonable to assign $g_{2}$ with smaller weights. We further demonstrate that a set of arithmetically decreasing gradient weights not only follows the principle of gradient matching, but also reflects model averaging [24] that indirectly estimate the centroid of domain experts. This centroid approximation is expected to achieve a more accurate balance across source domains to enhance model's generalization stability in the unseen target scenarios. Our contribution can be summarized as follows:
|
| 65 |
+
|
| 66 |
+
- We prove that existing first-order meta-learning strategies for domain generalization represent just one of many possible directions for gradient matching, and they overlook the need to balance the model's position from the optimal parameters of each source domain.
|
| 67 |
+
- We integrate model averaging into meta-learning and propose an arithmetic gradient-based strategy to simulate this process, which aims to estimate the centroid of domain-specific optimal parameters while ensuring consistency in gradient direction. Our method is simple to implement, requiring adjustments of one line in Algorithm 1.
|
| 68 |
+
- Arithmetic meta-learning outperforms traditional meta-learning strategies across multiple domain generalization benchmarks, and shows synergistic potential when integrated with global averaging techniques.
|
| 69 |
+
|
| 70 |
+
Algorithm 1 Arithmetic Meta-Learning for DG
|
| 71 |
+
Input: Domains $\{\mathcal{D}_1,\mathcal{D}_2,\dots,\mathcal{D}_S\}$ ; model parametrized by $\Theta$ ; hyperparameters $k$ and $\epsilon$
|
| 72 |
+
1: for iterations $= 1,2,\ldots$ do
|
| 73 |
+
2: Initialize parameters $\theta_{1} \gets \Theta$ .
|
| 74 |
+
3: for $\mathcal{D}_i \in \{\mathcal{D}_1,\mathcal{D}_2,\dots,\mathcal{D}_S\}$ do
|
| 75 |
+
4: Perform $k$ gradient updates from $\mathcal{D}_i$ to obtain $\theta_{i+1} \gets \theta_i$ with $g_i = \theta_i - \theta_{i+1}$
|
| 76 |
+
5: end for
|
| 77 |
+
6: $\Theta \gets \Theta - \epsilon \sum_{i=1}^{n} g_i //$ for Fish
|
| 78 |
+
7: $\Theta \gets \Theta - \frac{1}{n + \epsilon} \sum_{i=1}^{n} (n + 1 - i) g_i //$ for Arith
|
| 79 |
+
8: end for
|
| 80 |
+
|
| 81 |
+
# 2. Method
|
| 82 |
+
|
| 83 |
+
# 2.1. Preliminary
|
| 84 |
+
|
| 85 |
+
Problem setting. In domain generalization, we are provided with source domains $S = \{\mathcal{D}_1, \mathcal{D}_2, \dots, \mathcal{D}_S\}$ and unseen target domains $\mathcal{T} = \{\mathcal{D}_{S+1}, \mathcal{D}_{S+2}, \dots, \mathcal{D}_{S+T}\}$ . The $s$ -th domain consisting of $N_s$ samples is represented as $\mathcal{D}_s = \{(x_i^s, y_i^s)\}_{i=1}^{N_s}$ , where $x_i^s$ denotes the $i$ -th sample and $y_i^s$ refers to its corresponding label. Our goal is to leverage these source domains $S$ to develop a model capable of seamlessly generalizing to any unseen target domain $\mathcal{T}$ .
|
| 86 |
+
|
| 87 |
+
First-order meta-learning [40] segments the optimization process into an inner loop and an outer loop. Each iteration can be summarized as follows: a task comprises a batch of data sampled from a specific data distribution, and a step aggregates multiple tasks to form a larger batch. In domain generalization, tasks are commonly partitioned by domains. MLDG [32] evenly allocates tasks into two steps, with one step for the meta-train set and the other for the meta-test set. Fish [48] selects one task for each step, which is demonstrated to achieve pairwise gradient matching between all domains. During the inner loop, the model is sequentially updated with steps to reach parameters $\hat{\Theta}$ . Then in the outer loop, the original parameters $\Theta$ are updated towards $\hat{\Theta}$ in previous methods.
|
| 88 |
+
|
| 89 |
+
Organization. We present our arithmetic meta-learning in Algorithm 1. The parallel sections Sec. 2.2 and Sec. 2.3 compare between Arith and existing methods from two perspectives. Sec. 2.2 demonstrates we share the same properties of gradient matching as previous work. Sec. 2.3 explains how our method achieves a more balanced positioning across source domains compared to prior approaches.
|
| 90 |
+
|
| 91 |
+
# 2.2. Gradient Matching
|
| 92 |
+
|
| 93 |
+
We first introduce our proof process of gradient matching. During an inner loop comprising $n$ steps, as the model's parameters transition from $\Theta$ to $\hat{\Theta}$ , we depict the trajectory of parameter updates as $\{\theta_1, \theta_2, \dots, \theta_{n+1}\}$ , where $\theta_1$ and $\theta_{n+1}$ correspond to $\Theta$ and $\hat{\Theta}$ , respectively. At each step, the loss
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
(a) MAML-like
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
(b) Fish (Reptile-like)
|
| 100 |
+
Figure 2. Comparison of different learning strategies. Each step of the inner loop corresponds to a distinct domain, while in the outer loop, the gradient is computed as the weighted average of those from the inner loop, with the values above representing their respective weights.
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
(c) Arithmetic
|
| 104 |
+
|
| 105 |
+
is denoted as $\{\mathcal{L}_1,\mathcal{L}_2,\dots ,\mathcal{L}_n\}$ , and the corresponding gradients as $\{g_1,g_2,\ldots ,g_n\}$ , where $g_{i} = \alpha \nabla \mathcal{L}_{i}(\theta_{i})$ , with $\alpha$ indicating the learning rate of the inner loop.
|
| 106 |
+
|
| 107 |
+
First, let's represent the outer loop of existing methods $\Theta +\epsilon (\hat{\Theta} -\Theta)$ in gradient form:
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\Theta \leftarrow \Theta - \epsilon \sum_ {i = 1} ^ {n} g _ {i}, \tag {1}
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
thus the optimization objective can be written as:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\underset {\Theta} {\operatorname {a r g m i n}} \sum_ {i = 1} ^ {n} \mathcal {L} _ {i} \left(\theta_ {i}\right). \tag {2}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
Given that each $g_{i}$ in Eq. (1) shares the common coefficient $\epsilon$ , so the weights of loss $\mathcal{L}_i(\theta_i)$ in Eq. (2) are also the same. $\mathcal{L}_i(\theta_i)$ can be approximated as the loss on the original parameters $\theta_{1}$ subtracting a regularization term. Please refer to our supplementary material for more details:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mathcal {L} _ {i} \left(\theta_ {i}\right) = \mathcal {L} _ {i} \left(\theta_ {1}\right) - \alpha \sum_ {j = 1} ^ {i - 1} \nabla \mathcal {L} _ {i} \left(\theta_ {1}\right) \cdot \nabla \mathcal {L} _ {j} \left(\theta_ {1}\right) + \mathcal {O} \left(\alpha^ {2}\right). \tag {3}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
This equation aims to maximize dot product between gradient $i$ and those from the preceding $i - 1$ steps, promoting smaller angles between gradients and thus ensuring consistency in the updating direction across domains.
|
| 126 |
+
|
| 127 |
+
The derivation above excludes the coefficient $\epsilon$ in Eq. (1) since the weights of losses in Eq. (2) can be arbitrary. This implies that as long as the update procedure is expressed as adjusting the original parameters $\Theta$ by the inner-loop gradients $\{g_1, g_2, \dots, g_n\}$ , gradient matching can be deduced, allowing for an infinite range of update directions to satisfy gradient matching. The more general form is:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\Theta \leftarrow \Theta - \sum_ {i = 1} ^ {n} \epsilon_ {i} g _ {i}, \tag {4}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
where $\epsilon_{i}$ are arbitrary coefficients. For instance, if we consider averaging all intermediate models $\{\theta_2,\theta_3,\dots ,\theta_{n + 1}\}$ during the inner loop, then the new outer loop is written as:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\Theta \leftarrow \frac {1}{n + \epsilon} \left(\epsilon \theta_ {1} + \sum_ {i = 1} ^ {n} \theta_ {i + 1}\right). \tag {5}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
Eq. (5) represents the non-gradient form of our proposed arithmetic meta-learning. The optimization process can be obtained by substituting $\theta_{i + 1} = \theta_1 - \sum_{j = 1}^i g_j$ into Eq. (5), with gradient weights following an arithmetic progression that decreases from $\frac{n}{n + \epsilon}$ to $\frac{1}{n + \epsilon}$ :
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\Theta \leftarrow \Theta - \frac {1}{n + \epsilon} \sum_ {i = 1} ^ {n} (n + 1 - i) g _ {i}. \tag {6}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
This form also adheres to Eq. (4), illustrating that Arith can also achieve gradient matching as previous methods.
|
| 146 |
+
|
| 147 |
+
# 2.3. Balanced Positioning
|
| 148 |
+
|
| 149 |
+
We adopt the analytical technique proposed in [40]. Let $\mathcal{W}_i$ represent the optimal parameter set for domain $i$ . Our goal is to determine $\Theta$ such that the distance $\mathcal{D}(\Theta, \mathcal{W}_i)$ is small and uniform among all source domains. We specify that each step is sampled from a single source domain $i$ , then the step-wise optimization objective can be regarded as minimizing the squared distance:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
\underset {\theta_ {i}} {\operatorname {a r g m i n}} \frac {1}{2} \mathcal {D} \left(\theta_ {i}, \mathcal {W} _ {i}\right) ^ {2}. \tag {7}
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
Given a non-pathological set $\mathcal{Z} \subset \mathbb{R}^d$ , for almost all points $\phi \in \mathbb{R}^d$ the gradient of the squared distance $\mathcal{D}(\phi, \mathcal{Z})^2$ equals $2(\phi - P_{\mathcal{Z}}(\phi))$ , where $P_{\mathcal{Z}}(\phi)$ is the projection (i.e. closest point) of $\phi$ onto $\mathcal{Z}$ . Thus, the updating process at step $i$ can be represented as:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\begin{array}{l} \theta_ {i + 1} = \theta_ {i} - \eta_ {i} \nabla_ {\theta_ {i}} \frac {1}{2} \mathcal {D} \left(\theta_ {i}, \mathcal {W} _ {i}\right) ^ {2} (8) \\ = \theta_ {i} - \eta_ {i} \left(\theta_ {i} - P _ {\mathcal {W} _ {i}} \left(\theta_ {i}\right)\right) (9) \\ = \left(1 - \eta_ {i}\right) \theta_ {i} + \eta_ {i} P _ {\mathcal {W} _ {i}} \left(\theta_ {i}\right). (10) \\ \end{array}
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
Eq. (10) illustrates that step $i$ can be interpreted as an interpolation between $\theta_{i}$ and its optimal projection onto the $i$ -th source domain, where $\eta_{i} \in (0, 1)$ is not a hyperparameter, but a measure of their relative weights. Eq. (10) can also be iteratively expanded as:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\theta_ {i + 1} = \prod_ {j = 1} ^ {i} (1 - \eta_ {j}) \cdot \theta_ {1} + \sum_ {j = 1} ^ {i} \prod_ {k = j + 1} ^ {i} (1 - \eta_ {k}) \cdot \eta_ {j} \Phi_ {j}. \tag {11}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
(a) Cartoon (source)
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
(b) Photo (source)
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
(c) Sketch (source)
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
(d) Art (target)
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
(e) Cartoon (source)
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
(f) Photo (source)
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
(g) Art (source)
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
(h) Sketch (target)
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
Figure 3. Loss surface plots of various domains on the PACS dataset, where the deeper is better. The yellow triangle in (a)(b)(c)(e)(f)(g) shows the estimated optimal parameters from the respective source domain, while the black triangle represents the estimated optimal parameters for the other source domains. The red arrow in (d)(h) is the updating direction of previous methods, while the yellow arrow towards the centroid marks the update direction of arithmetic meta-learning.
|
| 193 |
+
Figure 4. Adam optimizer's gradient distribution over the first fifteen steps of inner loop. Three domains are alternately optimized at each step. As momentum builds, the gradient contributions from each domain converge to similar proportions in the later stages.
|
| 194 |
+
|
| 195 |
+
We denote $P_{\mathcal{W}_i}(\theta_i)$ as $\Phi_i$ to emphasize its optimality for domain $i$ , regardless of which model $\theta_i$ it originates from. Eq. (11) reveals that $\theta_{i + 1}$ is a weighted average of the initial model $\theta_1$ and the optimal parameters $\Phi$ . In the second part of Eq. (11), terms with smaller $j$ contain more $(1 - \eta)$ that are smaller than 1, indicating a progressive decay in the weights of earlier steps. This confirms the tendency of models to prioritize the most recent data they encounter.
|
| 196 |
+
|
| 197 |
+
Previous methods typically interpolate between $\theta_{1}$ and $\theta_{n + 1}$ during the outer loop. By applying Eq. (11), we find that $\theta_{1}$ excludes $\Phi$ , while $\theta_{n + 1}$ has an unbalanced distribution of $\{\Phi_1,\Phi_2,\dots,\Phi_n\}$ . As a result, the interpolation between $\theta_{1}$ and $\theta_{n + 1}$ also fails to correct this biased distribution. In the early stages of training, this strategy may
|
| 198 |
+
|
| 199 |
+
be acceptable if the model is far from $\Phi$ , resulting in small values for $\eta$ so that $(1 - \eta)$ is close to 1, which ensures relatively balanced weights for each $\Phi$ . However, as the model approaches convergence, oscillations around $\Phi$ cause $(1 - \eta)$ to decrease, making it challenging to maintain equal weights for each domain-optimal parameters.
|
| 200 |
+
|
| 201 |
+
We propose to address this imbalance by utilizing the intermediate models $\{\theta_{2},\theta_{3},\dots,\theta_{n + 1}\}$ in the inner loop. Each $\theta_{i + 1}$ is expected to specifically tailored for its corresponding source domain $i$ . While accurately computing $\Phi$ is impractical, we can estimate it by performing multiple gradient updates on the respective source domain to minimize all $(1 - \eta)$ towards 0. Ideally, only the last term in Eq. (11), which exclusively involves $\eta$ without $(1 - \eta)$ should be retained:
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
\theta_ {i + 1} \approx \Phi_ {i}. \tag {12}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
By substituting Eq. (12) into Eq. (5), we derive:
|
| 208 |
+
|
| 209 |
+
$$
|
| 210 |
+
\Theta \leftarrow \frac {1}{n + \epsilon} \left(\epsilon \Theta + \sum_ {i = 1} ^ {n} \Phi_ {i}\right). \tag {13}
|
| 211 |
+
$$
|
| 212 |
+
|
| 213 |
+
This term represents the initial model $\Theta$ adjusted by the average of domain-optimal parameters, with each $\Phi$ equally weighted. Consequently, this strategy effectively achieves a good balance across source domains.
|
| 214 |
+
|
| 215 |
+
# 2.4. Optimizer Selection
|
| 216 |
+
|
| 217 |
+
Previous research commonly (i) applies the Adam optimizer in the inner loop and (ii) performs direct interpolation in the outer loop. However, this method conflicts with the principle of domain-wise gradient matching, as the Adam opti
|
| 218 |
+
|
| 219 |
+
Table 1. Accuracy (%) on the DomainBed benchmark across five datasets. The best and second-best results per dataset are bolded and underlined respectively. Detailed results for each domain are available in the supplementary material.
|
| 220 |
+
|
| 221 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeH</td><td>TerraInc</td><td>DomainNet</td><td>Avg</td></tr><tr><td>ERM [39]</td><td>85.5</td><td>77.5</td><td>66.5</td><td>46.1</td><td>40.9</td><td>63.3</td></tr><tr><td>IRM [3]</td><td>83.5</td><td>78.6</td><td>64.3</td><td>47.6</td><td>33.9</td><td>61.6</td></tr><tr><td>CausIRL [11]</td><td>83.6</td><td>76.5</td><td>68.1</td><td>47.4</td><td>41.8</td><td>63.5</td></tr><tr><td>VREx [29]</td><td>84.9</td><td>78.3</td><td>66.4</td><td>46.4</td><td>33.6</td><td>61.9</td></tr><tr><td>CORAL [51]</td><td>86.2</td><td>78.8</td><td>68.7</td><td>47.7</td><td>41.5</td><td>64.5</td></tr><tr><td>RSC [23]</td><td>85.2</td><td>77.1</td><td>65.5</td><td>46.6</td><td>38.9</td><td>62.7</td></tr><tr><td>ARM [62]</td><td>85.1</td><td>77.6</td><td>64.8</td><td>45.5</td><td>35.5</td><td>61.7</td></tr><tr><td>AND-mask [41]</td><td>84.4</td><td>78.1</td><td>65.6</td><td>44.6</td><td>37.2</td><td>62.0</td></tr><tr><td>SAND-mask [47]</td><td>84.6</td><td>77.4</td><td>65.8</td><td>42.9</td><td>32.1</td><td>60.6</td></tr><tr><td>MLDG [32]</td><td>84.9</td><td>77.2</td><td>66.8</td><td>47.8</td><td>41.2</td><td>63.6</td></tr><tr><td>Fish [48]</td><td>85.5</td><td>77.8</td><td>68.6</td><td>45.1</td><td>42.7</td><td>63.9</td></tr><tr><td>Fisher [44]</td><td>85.5</td><td>77.8</td><td>67.8</td><td>47.4</td><td>41.7</td><td>64.0</td></tr><tr><td>HGP [22]</td><td>84.7</td><td>77.6</td><td>68.2</td><td>43.6</td><td>41.1</td><td>63.0</td></tr><tr><td>Hutchinson [22]</td><td>83.9</td><td>76.8</td><td>68.2</td><td>46.6</td><td>41.6</td><td>63.4</td></tr><tr><td>Arith</td><td>86.5 ± 0.3</td><td>79.4 ± 0.3</td><td>69.4 ± 0.1</td><td>48.1 ± 1.2</td><td>41.5 ± 0.1</td><td>65.0</td></tr></table>
|
| 222 |
+
|
| 223 |
+
mizer contains momentum:
|
| 224 |
+
|
| 225 |
+
$$
|
| 226 |
+
\bar {g} _ {i} = \beta g _ {i - 1} ^ {-} + (1 - \beta) g _ {i}, \tag {14}
|
| 227 |
+
$$
|
| 228 |
+
|
| 229 |
+
where $\beta$ controls the weighting between momentum $g_{i-1}^{-}$ and the current gradient $g_{i}$ , with a default value of 0.9. Consequently, each $g_{i}$ in Eq. (1) is actually $\bar{g}_{i}$ in Eq. (14), which becomes a blend of gradients from all domains. In Fig. 4, we visualize the gradients of Adam during alternating optimization across three domains for the first fifteen steps, illustrating how this gradient matching resembles uniform sampling without domain-specific gradients.
|
| 230 |
+
|
| 231 |
+
To prevent the failure of domain-wise gradient matching, we propose (i) using the Adam optimizer only in the outer loop and (ii) employing stochastic gradient descent without momentum in the inner loop to ensure each step accurately reflects the true gradient of its corresponding domain.
|
| 232 |
+
|
| 233 |
+
# 2.5. Relationships with Weight Averaging
|
| 234 |
+
|
| 235 |
+
Previous meta-learning methods for domain generalization closely resembles weight averaging [9, 24], as the interpolation between two models can be treated as the weighted average of them. For arithmetic meta-learning, we can also equivalently substitute it with the average of all intermediate models during the inner loop. However, arithmetic meta-learning differs from averaging-based methods in several key aspects: (i) Varied objectives: Model averaging aims to find flat minima across domain-agnostic models, ensuring robustness against shifts in the loss landscape between training and test sets. In contrast, arithmetic meta-learning prevents models from becoming overly biased towards specific domains by averaging between domain-specific models. (ii) Different scope: Model averaging operates on a
|
| 236 |
+
|
| 237 |
+
global scale, encompassing most of the models throughout the entire training process, while arithmetic meta-learning is more localized, averaging only a small subset of models during each iteration. (iii) Unique implementation: By transforming weight averaging into gradient form, arithmetic meta-learning enables the optimization of outer loop to easily adapt to optimizers such as Adam.
|
| 238 |
+
|
| 239 |
+
Given that our strategy is based on the first-order meta-learning framework, it faces common challenges associated with such methods, including difficulties in converging to flat minima, and the balance between source domains may not translate to optimal parameters of the unseen target domain. However, the orthogonal nature of arithmetic meta-learning and model averaging at local and global scales enables effective synergy between these approaches.. Experimental results in Sec. 3 further demonstrate that the combination of them leads to enhanced performance.
|
| 240 |
+
|
| 241 |
+
# 3. Experiment
|
| 242 |
+
|
| 243 |
+
# 3.1. Datasets
|
| 244 |
+
|
| 245 |
+
We experiment on ten standard DG datasets, five of which are from the DomainBed [19] benchmark: (i) PACS [31] contains 4 domains (photo, art-painting, cartoon, sketch) with 7 classes and 9,991 images. (ii) Office-Home [53] comprises 4 domains (art, clipart, product, real-world) with 65 classes and 15,588 images. (iii) VLCS [17] consists of 4 domains (pascal, labelme, caltech, sun) with 5 classes and 10,729 images. (iv) TerraIncognita [6] is composed of 4 domains (location38, location43, location46, location100) with 100 classes and 24,788 images. (v) DomainNet [42] includes 6 domains (clipart, infographic, painting, quick
|
| 246 |
+
|
| 247 |
+
Table 2. Ablation studies (\%) on PACS dataset. The best results are bolded. The $m$ denotes whether to enable momentum during the inner loop, while $ds$ signifies whether the data is partitioned by domains for each step or uniformly sampled.
|
| 248 |
+
|
| 249 |
+
<table><tr><td>Method</td><td>m</td><td>ds</td><td>A</td><td>C</td><td>P</td><td>S</td><td>Avg</td></tr><tr><td rowspan="3">MAML</td><td>-</td><td>-</td><td>84.6</td><td>80.8</td><td>96.7</td><td>79.3</td><td>85.3</td></tr><tr><td>✓</td><td>✓</td><td>84.8</td><td>81.9</td><td>96.0</td><td>77.5</td><td>85.0</td></tr><tr><td>-</td><td>✓</td><td>85.5</td><td>78.5</td><td>97.2</td><td>76.4</td><td>84.4</td></tr><tr><td rowspan="3">Fish</td><td>-</td><td>-</td><td>85.0</td><td>81.1</td><td>95.2</td><td>80.0</td><td>85.3</td></tr><tr><td>✓</td><td>✓</td><td>85.6</td><td>82.0</td><td>95.7</td><td>78.5</td><td>85.4</td></tr><tr><td>-</td><td>✓</td><td>85.7</td><td>81.1</td><td>96.7</td><td>81.0</td><td>86.1</td></tr><tr><td rowspan="3">Arith</td><td>-</td><td>-</td><td>85.6</td><td>80.7</td><td>96.3</td><td>80.9</td><td>85.9</td></tr><tr><td>✓</td><td>✓</td><td>85.1</td><td>82.2</td><td>96.6</td><td>78.9</td><td>85.7</td></tr><tr><td>-</td><td>✓</td><td>85.9</td><td>81.3</td><td>97.1</td><td>81.8</td><td>86.5</td></tr></table>
|
| 250 |
+
|
| 251 |
+
draw, real, sketch) with 345 classes and 586,575 images.
|
| 252 |
+
|
| 253 |
+
The other five datasets AMAZON, CAMELYON17 [5], CIVIL COMMENTS [8], IWILDCAM [7], and FMOW [12] are conducted on the WILDS [27] benchmark which contains multiple modalities. Due to space limitations, we present results only on CAMELYON17 in the main text and please refer to the supplementary material for others.
|
| 254 |
+
|
| 255 |
+
# 3.2. Implementation Details
|
| 256 |
+
|
| 257 |
+
We follow the protocol proposed in DomainBed [19] and use ResNet50 [21] pretrained on ImageNet [14] as our backbone network. We apply stochastic gradient descent in the inner loop and the Adam optimizer in the outer loop, with each of the domains restricted to a single step over 5000 iterations. The domains are optimized in random order, with a batch size of 32 and a learning rate of $5e - 5$ . For datasets other than DomainNet, which consists of three domains, the weight of gradients are assigned as $\{^{1 / 2},^{1 / 3},^{1 / 6}\}$ . For DomainNet, which comprises five domains, the corresponding weights are set as $\{^{1 / 3},^{4 / 15},^{1 / 5},^{2 / 15},^{1 / 15}\}$ . We select one target domain for test and use the remaining domains for training and validation. We reserve $20\%$ of the samples for validation from each source domain and choose the model with maximized accuracy on the overall validation set, which is the same as the training-domain validation set in [19]. Each experiment is conducted on a single Nvidia RTX 2080Ti GPU with Pytorch 1.10.1.
|
| 258 |
+
|
| 259 |
+
# 3.3. Main Results
|
| 260 |
+
|
| 261 |
+
As illustrated in Tab. 1, we first compare arithmetic meta-learning with classic domain generalization methods on the DomainBed [19] benchmark, where the strategies below RSC [23] are gradient-based. For each dataset, we perform experiments three times and report the average results followed by the standard deviation. Our method demonstrates superior performance on four datasets, surpassing
|
| 262 |
+
|
| 263 |
+
Table 3. Ablation studies (%) on OfficeHome and VLCS dataset. The best results are bolded. The scaled means increasing the learning rate to 1.5 times its original value, while adam refers to utilizing the Adam optimizer during the outer loop.
|
| 264 |
+
|
| 265 |
+
<table><tr><td>Method</td><td>scaled</td><td>adam</td><td>D1</td><td>D2</td><td>D3</td><td>D4</td><td>Avg</td></tr><tr><td colspan="8">OfficeHome</td></tr><tr><td rowspan="4">Fish</td><td>✓</td><td>-</td><td>61.5</td><td>55.3</td><td>74.6</td><td>77.2</td><td>67.2</td></tr><tr><td>✓</td><td>✓</td><td>65.0</td><td>54.8</td><td>77.0</td><td>78.8</td><td>68.9</td></tr><tr><td>-</td><td>-</td><td>60.7</td><td>53.6</td><td>75.7</td><td>77.3</td><td>66.8</td></tr><tr><td>-</td><td>✓</td><td>64.3</td><td>55.3</td><td>77.2</td><td>79.0</td><td>69.0</td></tr><tr><td rowspan="4">Arith</td><td>✓</td><td>-</td><td>62.5</td><td>54.7</td><td>76.4</td><td>77.2</td><td>67.7</td></tr><tr><td>✓</td><td>✓</td><td>64.8</td><td>55.8</td><td>76.1</td><td>79.5</td><td>69.1</td></tr><tr><td>-</td><td>-</td><td>61.6</td><td>55.2</td><td>75.6</td><td>77.1</td><td>67.4</td></tr><tr><td>-</td><td>✓</td><td>64.7</td><td>56.3</td><td>77.5</td><td>79.2</td><td>69.4</td></tr><tr><td colspan="8">VLCS</td></tr><tr><td rowspan="4">Fish</td><td>✓</td><td>-</td><td>97.1</td><td>63.7</td><td>72.3</td><td>77.9</td><td>77.8</td></tr><tr><td>✓</td><td>✓</td><td>98.6</td><td>64.3</td><td>76.7</td><td>76.4</td><td>79.0</td></tr><tr><td>-</td><td>-</td><td>97.5</td><td>63.8</td><td>73.6</td><td>78.1</td><td>78.3</td></tr><tr><td>-</td><td>✓</td><td>98.7</td><td>65.0</td><td>76.5</td><td>76.0</td><td>79.2</td></tr><tr><td rowspan="4">Arith</td><td>✓</td><td>-</td><td>97.3</td><td>64.8</td><td>73.2</td><td>77.8</td><td>78.3</td></tr><tr><td>✓</td><td>✓</td><td>98.7</td><td>64.1</td><td>76.3</td><td>78.2</td><td>79.3</td></tr><tr><td>-</td><td>-</td><td>98.5</td><td>64.7</td><td>76.0</td><td>77.3</td><td>79.1</td></tr><tr><td>-</td><td>✓</td><td>98.7</td><td>64.6</td><td>76.3</td><td>77.8</td><td>79.4</td></tr></table>
|
| 266 |
+
|
| 267 |
+
the second-best method by $0.3\%$ , $0.6\%$ , $0.7\%$ and $0.3\%$ respectively. We attribute our improvement to two key aspects. First, our approach can estimate the centroid among domain experts, which still offers opportunities for further enhancement in this table. Since our method requires precise estimation of optimal parameters for each source domain, updating parameters only once may introduce bias. To address this, we conduct multiple-step per domain experiments in the following ablation studies. Second, we refine the usage of optimizers from previous methods. By removing momentum during the inner loop, we achieve more precise gradient matching across domains, while using the Adam optimizer in the outer loop helps ensure smoother convergence for the final model.
|
| 268 |
+
|
| 269 |
+
# 3.4. Ablation & Analysis
|
| 270 |
+
|
| 271 |
+
Loss surface visualization. We visualize the loss surface using the technique proposed in [24]. We select three intermediate models from the inner loop and compute their linearly interpolated losses, where each model is sequentially derived from 30 gradient updates on a single source domain. We calculate the averaged parameters of these models (i.e., yellow stars), which represent the optimization direction of arithmetic meta-learning in the outer loop. As shown in Fig. 3, while the loss basins differ between domains, the variations are not substantial. The relative positions of each source domain's loss basins closely align with those of their corresponding intermediate models (i.e., yellow triangles),
|
| 272 |
+
|
| 273 |
+
Table 4. Ablation study (\%) with global averaging of five datasets on the DomainBed benchmark. The best results are bolded.
|
| 274 |
+
|
| 275 |
+
<table><tr><td>Method</td><td>swad</td><td>P</td><td>V</td><td>O</td><td>T</td><td>D</td><td>Avg</td></tr><tr><td rowspan="2">ERM</td><td>-</td><td>84.7</td><td>78.0</td><td>67.8</td><td>46.5</td><td>40.8</td><td>63.6</td></tr><tr><td>✓</td><td>87.5</td><td>78.1</td><td>70.4</td><td>49.4</td><td>44.1</td><td>65.9</td></tr><tr><td rowspan="2">MLDG</td><td>-</td><td>85.4</td><td>77.8</td><td>68.5</td><td>47.3</td><td>41.4</td><td>64.1</td></tr><tr><td>✓</td><td>88.3</td><td>78.9</td><td>69.8</td><td>50.5</td><td>44.6</td><td>66.4</td></tr><tr><td rowspan="2">Fish</td><td>-</td><td>86.1</td><td>78.4</td><td>68.3</td><td>47.0</td><td>41.5</td><td>64.3</td></tr><tr><td>✓</td><td>88.5</td><td>79.4</td><td>70.1</td><td>49.5</td><td>44.9</td><td>66.5</td></tr><tr><td rowspan="2">Arith</td><td>-</td><td>86.5</td><td>79.4</td><td>69.4</td><td>48.1</td><td>41.5</td><td>65.0</td></tr><tr><td>✓</td><td>88.7</td><td>79.8</td><td>70.2</td><td>49.9</td><td>44.9</td><td>66.7</td></tr></table>
|
| 276 |
+
|
| 277 |
+
suggesting their capacity to approximate domain-optimal parameters, thus the averaged parameters can be regarded as a good balance across source domains. However, although the final averaged model happens to match with the basin of the target domain in Fig. 3, it's essential to acknowledge that since the target domain is unseen and arbitrary, our ability is limited to preventing overfitting to source domains, but cannot guarantee optimal performance on the target domain in every scenario.
|
| 278 |
+
|
| 279 |
+
Ablation study on steps per domain $k$ . We investigate how the performance correlates with the step count for each domain. As illustrated in Fig. 5, the optimization process of Fish [48] signify linear interpolations between the initial and final parameters, while the arithmetic gradient weights simulates the updating direction towards the average of all intermediate models. As the number of steps increases, the accuracy of arithmetic meta-learning consistently improves. This indicates that performing multiple gradient updates results in a more precise estimation of optimal parameters for each domain, achieving a better balance through averaging. In contrast, the performance of Fish initially improves but then declines due to its biased estimation of the optimal balance. As the displacement of parameters increases, this inaccuracy may become more serious.
|
| 280 |
+
|
| 281 |
+
Ablation study on gradient weights / optimizer selection. The weights of gradients in the inner loop have two key attributes: ratio and magnitude. The ratio determines the final update direction and is fixed for each strategy. For instance, a $1:1:1$ ratio for Fish means updating in the direction of the last model, while a $3:2:1$ ratio for Arith means shifting towards the average of domain experts. The magnitude affects the step size of the outer loop, similar to the learning rate. To match with inner loop, we set the total sum of weights around 1, such as $\{1/3, 1/3, 1/3\}$ for Fish and $\{1/2, 1/3, 1/6\}$ for Arith. In DomainBed, Fish is implemented with weights of $\{1/3, 1/3, 1/3\}$ , so we additionally set Arith's weights to $\{3/4, 1/2, 1/4\}$ when scaling is enabled, ensuring that the sum of the weights is equal. As shown in Tab. 3, Arith generally outperforms Fish in most scenar-
|
| 282 |
+
|
| 283 |
+

|
| 284 |
+
Figure 5. Accuracy $(\%)$ on PACS dataset with the varying number of steps for each domain during the inner loop.
|
| 285 |
+
|
| 286 |
+
ios and achieves higher average accuracy. Unlike the inner loop, the outer loop optimizer permits momentum. When using the Adam optimizer, the impact of gradient weights on model performance is minimal due to Adam's adaptive learning rate, which leads to better outcomes than models that do not utilize this condition.
|
| 287 |
+
|
| 288 |
+
Ablation study on domain-specific steps / gradients. Gradient-based meta-learning methods for domain generalization typically select samples from each domain to perform domain-specific gradient matching. We also conduct experiments with uniform sampling and inner loop momentum. As shown in Tab. 2, domain-specific sampling strategies without momentum generally outperform other implementations, while the performance of uniform sampling and momentum is comparable. It is noted in Sec. 2.4 that uniform sampling and inner loop momentum results in mixed gradients, which fail to effectively match across source domains. In arithmetic meta-learning, parameters obtained through domain-specific gradient matching are more likely to estimate globally optimal parameters rather than being tailored to individual ones, thus mitigating the risk of overfitting towards specific domains.
|
| 289 |
+
|
| 290 |
+
Combining with global averaging. Arithmetic meta-learning simulates localized model averaging during each iteration, aiming to find a balanced position among source domains instead of pursuing a global flat minima. To further enhance this approach, we propose to integrate it with the global averaging method [9], which facilitates the achievement of well-generalized flat minima. As shown in Tab. 4, our method yields additional improvements over this strong baseline, underscoring the complementary strengths of local and global averaging techniques. It is important to note that some of the results differ from those in Tab. 1, as they are based on our own implementation.
|
| 291 |
+
|
| 292 |
+
# 4. Related Work
|
| 293 |
+
|
| 294 |
+
# 4.1. Domain Generalization
|
| 295 |
+
|
| 296 |
+
One key aspect of domain generalization is to learn features invariant across source domains, assuming they will gener
|
| 297 |
+
|
| 298 |
+
Table 5. Accuracy (%) on CAMELYON17 dataset. The best results are bolded.
|
| 299 |
+
|
| 300 |
+
<table><tr><td>Method</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>25</td><td>26</td><td>27</td><td>28</td><td>29</td><td>Avg</td></tr><tr><td>ERM</td><td>49.2</td><td>30.2</td><td>73.6</td><td>74.8</td><td>64.4</td><td>60.8</td><td>57.0</td><td>37.8</td><td>89.6</td><td>77.3</td><td>73.1</td></tr><tr><td>Fish</td><td>52.4</td><td>36.0</td><td>72.3</td><td>77.5</td><td>69.0</td><td>65.1</td><td>59.3</td><td>43.6</td><td>90.0</td><td>77.6</td><td>74.8</td></tr><tr><td>Arith</td><td>54.4</td><td>33.8</td><td>83.6</td><td>75.2</td><td>72.5</td><td>69.5</td><td>64.0</td><td>40.7</td><td>90.1</td><td>79.9</td><td>76.6</td></tr></table>
|
| 301 |
+
|
| 302 |
+
alize to unseen target domains as well. Approaches such as domain adversarial learning [13, 50] aim to train a feature extractor insensitive to domain-specific traits. Invariant risk minimization [1, 3] enforces consistency of the optimal classifier across all domains within the representation space. Feature decoupling methods aim to [10, 38] distill domain-invariant semantic information from original features. To diversify training data and improve generalized feature representations, data augmentation methods manipulate statistical characteristics at either the image or feature level. Commonly employed techniques include mixing [57, 63] and Fourier transformations [20, 59]. Rather than strictly enforcing an invariance factor, balance-based methods typically propose model-agnostic strategies to reduce overfitting to specific source domains. Meta-learning [16, 61] aims to leverage prior knowledge to guide the learning of current tasks. Ensemble learning [37, 64] presumes the target domain distribution as a blend of source domain distributions, thereby incorporating statistics from domain expert models. Weight averaging [4, 9] aggregates model weights across training episodes to achieve flatter minima that are less prone to overfitting.
|
| 303 |
+
|
| 304 |
+
# 4.2. Meta-Learning
|
| 305 |
+
|
| 306 |
+
Meta-learning [2, 52] is a well-established field aimed at enabling models to generalize across a diverse range of tasks. Initially, meta-learning focused on discovering initial parameters that can adapt swiftly to new tasks within a few gradient steps. For instance, model-agnostic meta-learning (MAML) [18] and first-order meta-learning (Reptile) [40] split the optimization process into inner and outer loops. The inner loop handles task-specific adaptation, while the outer loop seeks a globally optimal initialization. More recently, meta-learning has been applied to domain generalization (MLDG) [32] to simulate domain shifts by synthesizing meta-train and meta-test domains. S-MLDG [33] enhances MLDG with sequential and lifelong learning. To address the computational cost of second-order derivatives, Fish [48] use first-order algorithms for efficient and fine-grained task sampling. Traditional meta-learning emphasizes intra-task gradient matching, whereas meta-learning for domain generalization focuses on inter-domain gradient matching. Despite differing objectives, both approaches have demonstrated strong performance in their respective fields. We believe meta-learning for domain generalization
|
| 307 |
+
|
| 308 |
+
can inform traditional meta-learning, given the conceptual parallel between domains and tasks. Supporting research [30] also indicates that inter-task gradient matching contributes to effective initialization for general tasks.
|
| 309 |
+
|
| 310 |
+
# 4.3. Weight Averaging
|
| 311 |
+
|
| 312 |
+
Weight averaging [24, 58] is a variant of ensemble learning [15, 60], in which the outputs of individual models are combined to enhance overall performance. However, traditional ensemble methods incur high computational and storage costs due to the need for training and inference with multiple models. Weight averaging addresses this issue by merging these models into a single entity. By averaging parameters from similar training trajectories, $\{\theta_1,\theta_2,\dots,\theta_n\}$ , previous work has demonstrated that it effectively approximates the ensemble output [4, 24]:
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
f \left(\frac {1}{n} \sum_ {i = 1} ^ {n} \theta_ {i}\right) \approx \frac {1}{n} \sum_ {i = 1} ^ {n} f \left(\theta_ {i}\right). \tag {15}
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
SWA [24] uses a specialized learning rate schedule and periodically aggregates model weights. SWAD [9] imposes constraints on the sampling range and increases the sampling frequency to address overfitting in domain generalization tasks. Some methods focus on model selection [45, 58] by using a greedy algorithm to iteratively select the most effective model during the averaging process. Methods incorporating multiple updating trajectories are also employed in weight averaging [4, 26], such as aligning the directions or leveraging the combined model outputs from different trajectories to achieve improved performance.
|
| 319 |
+
|
| 320 |
+
# 5. Conclusion
|
| 321 |
+
|
| 322 |
+
In this paper, we propose a simple yet effective enhancement to first-order meta-learning for domain generalization. While previous methods rely on constant gradient weights in the inner loop to ensure gradient matching across source domains, they overlook the crucial positioning of the model relative to the optimal parameters of each domain. We introduce an arithmetic gradient-based meta-learning strategy that approximates the direction toward the average of all models within the inner loop. While preserving the principle of gradient matching, our approach guides the model towards the centroid of the each domain-optimal parameters, achieving a more precise balance. Experimental results demonstrate the superior performance of our method.
|
| 323 |
+
|
| 324 |
+
# References
|
| 325 |
+
|
| 326 |
+
[1] Kartik Ahuja, Ethan Caballero, Dinghuai Zhang, Jean-Christophe Gagnon-Audet, Yoshua Bengio, Ioannis Mitliagkas, and Irina Rish. Invariance principle meets information bottleneck for out-of-distribution generalization. Advances in Neural Information Processing Systems, 34: 3438-3450, 2021. 8
|
| 327 |
+
[2] Maruan Al-Shedivat, Liam Li, Eric Xing, and Ameet Talwalkar. On data efficiency of meta-learning. In International Conference on Artificial Intelligence and Statistics, pages 1369-1377. PMLR, 2021. 8
|
| 328 |
+
[3] Martin Arjovsky, León Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. Stat, 1050:27, 2020. 1, 5, 8
|
| 329 |
+
[4] Devansh Arpit, Huan Wang, Yingbo Zhou, and Caiming Xiong. Ensemble of averages: Improving model selection and boosting performance in domain generalization. Advances in Neural Information Processing Systems, 35:8265-8277, 2022. 8
|
| 330 |
+
[5] Peter Bandi, Oscar Geessink, Quirine Manson, Marcory Van Dijk, Maschenka Balkenhol, Meyke Hermsen, Babak Ehteshami Bejnordi, Byungjae Lee, Kyunghyun Paeng, Aoxiao Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE Transactions on Medical Imaging, 2018. 6
|
| 331 |
+
[6] Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. In Proceedings of the European Conference on Computer Vision (ECCV), pages 456-473, 2018. 5
|
| 332 |
+
[7] Sara Beery, Elijah Cole, and Arvi Gjoka. The iwildcam 2020 competition dataset. arXiv preprint arXiv:2004.10340, 2020. 6
|
| 333 |
+
[8] Daniel Borkan, Lucas Dixon, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. Nuanced metrics for measuring unintended bias with real data for text classification. In Companion Proceedings of The 2019 World Wide Web Conference, 2019. 6
|
| 334 |
+
[9] Junbum Cha, Sanghyuk Chun, Kyungjae Lee, Han-Cheol Cho, Seunghyun Park, Yunsung Lee, and Sungrae Park. Swad: Domain generalization by seeking flat minima. Advances in Neural Information Processing Systems, 34: 22405-22418, 2021. 1, 2, 5, 7, 8
|
| 335 |
+
[10] Prithvijit Chattopadhyay, Yogesh Balaji, and Judy Hoffman. Learning to balance specificity and invariance for in and out of domain generalization. In European Conference on Computer Vision, pages 301-318, 2020. 8
|
| 336 |
+
[11] Mathieu Chevalley, Charlotte Bunne, Andreas Krause, and Stefan Bauer. Invariant causal mechanisms through distribution matching. arXiv preprint arXiv:2206.11646, 2022.5
|
| 337 |
+
[12] Gordon Christie, Neil Fendley, James Wilson, and Ryan Mukherjee. Functional map of the world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 6
|
| 338 |
+
[13] Aveen Dayal, Vimal KB, Linga Reddy Cenkeramaddi, C Mohan, Abhinav Kumar, and Vineeth N Balasubramanian. Madg: Margin-based adversarial learning for domain gener
|
| 339 |
+
|
| 340 |
+
alization. Advances in Neural Information Processing Systems, 36, 2024. 1, 8
|
| 341 |
+
[14] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, 2009. 6
|
| 342 |
+
[15] Xibin Dong, Zhiwen Yu, Wenming Cao, Yifan Shi, and Qianli Ma. A survey on ensemble learning. Frontiers of Computer Science, 14:241-258, 2020. 8
|
| 343 |
+
[16] Qi Dou, Daniel Coelho de Castro, Konstantinos Kamnitsas, and Ben Glocker. Domain generalization via model-agnostic learning of semantic features. Advances in Neural Information Processing Systems, 32, 2019. 1, 8
|
| 344 |
+
[17] Chen Fang, Ye Xu, and Daniel N Rockmore. Unbiased metric learning: On the utilization of multiple datasets and web images for softening bias. In Proceedings of the IEEE International Conference on Computer Vision, pages 1657-1664, 2013. 5
|
| 345 |
+
[18] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pages 1126–1135. PMLR, 2017. 8
|
| 346 |
+
[19] Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020. 1, 5, 6
|
| 347 |
+
[20] Jintao Guo, Na Wang, Lei Qi, and Yinghuan Shi. Aloft: A lightweight mlp-like architecture with dynamic low-frequency transform for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24132-24141, 2023. 1, 8
|
| 348 |
+
[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 6
|
| 349 |
+
[22] Sobhan Hemati, Guojun Zhang, Amir Estiri, and Xi Chen. Understanding hessian alignment for domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 19004-19014, 2023. 5
|
| 350 |
+
[23] Zeyi Huang, Haohan Wang, Eric P Xing, and Dong Huang. Self-challenging improves cross-domain generalization. In European Conference on Computer Vision, pages 124-140, 2020. 5, 6
|
| 351 |
+
[24] Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018. 2, 5, 6, 8
|
| 352 |
+
[25] Pavel Izmailov, Polina Kirichenko, Nate Gruver, and Andrew G Wilson. On feature learning in the presence of spurious correlations. Advances in Neural Information Processing Systems, 35:38516-38532, 2022. 1
|
| 353 |
+
[26] Alexia Jolicoeur-Martineau, Emy Gervais, Kilian Fatras, Yan Zhang, and Simon Lacoste-Julien. Population parameter averaging (papa). arXiv preprint arXiv:2304.03094, 2023. 8
|
| 354 |
+
[27] Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas
|
| 355 |
+
|
| 356 |
+
Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In International conference on Machine Learning, pages 5637-5664. PMLR, 2021. 6
|
| 357 |
+
[28] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Communications of the ACM, 60(6):84-90, 2017. 1
|
| 358 |
+
[29] David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex). In International Conference on Machine Learning, pages 5815-5826. PMLR, 2021. 1, 5
|
| 359 |
+
[30] Seanie Lee, Hae Beom Lee, Juho Lee, and Sung Ju Hwang. Sequential reptile: Inter-task gradient alignment for multilingual learning. In International Conference on Learning Representations, 2021. 8
|
| 360 |
+
[31] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M. Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 5542-5550, 2017. 5
|
| 361 |
+
[32] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy Hospedales. Learning to generalize: Meta-learning for domain generalization. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018. 1, 2, 5, 8
|
| 362 |
+
[33] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy Hospedales. Sequential learning for domain generalization. In European Conference on Computer Vision, pages 603-619. Springer, 2020. 8
|
| 363 |
+
[34] Haoliang Li, Sinno Jialin Pan, Shiqi Wang, and Alex C Kot. Domain generalization with adversarial feature learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5400-5409, 2018. 1
|
| 364 |
+
[35] Haidong Li, Jiongcheng Li, Xiaoming Guan, Binghao Liang, Yuting Lai, and Xinglong Luo. Research on overfitting of deep learning. In 2019 15th International Conference on Computational Intelligence and Security, pages 78-81, 2019. 1
|
| 365 |
+
[36] Pan Li, Da Li, Wei Li, Shaogang Gong, Yanwei Fu, and Timothy M Hospedales. A simple feature augmentation for domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8886-8895, 2021. 1
|
| 366 |
+
[37] Ziyue Li, Kan Ren, Xinyang Jiang, Bo Li, Haipeng Zhang, and Dongsheng Li. Domain generalization using pretrained models without fine-tuning. arXiv preprint arXiv:2203.04600, 2022.8
|
| 367 |
+
[38] Fangrui Lv, Jian Liang, Shuang Li, Bin Zang, Chi Harold Liu, Ziteng Wang, and Di Liu. Causality inspired representation learning for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8046-8056, 2022. 8
|
| 368 |
+
[39] Vapnik Vladimir Naumovich and Vapnik Vlamimir. Statistical learning theory, 1998. 1, 5
|
| 369 |
+
[40] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. 2, 3, 8
|
| 370 |
+
|
| 371 |
+
[41] Giambattista Parascandolo, Alexander Neitz, Antonio Orvieto, Luigi Gresele, and Bernhard Scholkopf. Learning explanations that are hard to vary. In International Conference on Learning Representations, 2020. 5
|
| 372 |
+
[42] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1406-1415, 2019. 5
|
| 373 |
+
[43] Muyang Qiu, Jian Zhang, Lei Qi, Qian Yu, Yinghuan Shi, and Yang Gao. The devil is in the statistics: Mitigating and exploiting statistics difference for generalizable semi-supervised medical image segmentation. In European Conference on Computer Vision, pages 74-91. Springer, 2024. 1
|
| 374 |
+
[44] Alexandre Rame, Coretin Dancette, and Matthieu Cord. Fishr: Invariant gradient variances for out-of-distribution generalization. In International Conference on Machine Learning, pages 18347-18377. PMLR, 2022. 5
|
| 375 |
+
[45] Alexandre Rame, Matthieu Kirchmeyer, Thibaud Rahier, Alain Rakotomamonjy, Patrick Gallinari, and Matthieu Cord. Diverse weight averaging for out-of-distribution generalization. Advances in Neural Information Processing Systems, 35:10821-10836, 2022. 1, 8
|
| 376 |
+
[46] Harshay Shah, Kaustav Tamuly, Aditi Raghunathan, Prateek Jain, and Praneeth Netrapalli. The pitfalls of simplicity bias in neural networks. Advances in Neural Information Processing Systems, 33:9573-9585, 2020. 1
|
| 377 |
+
[47] Soroosh Shahtalebi, Jean-Christophe Gagnon-Audet, Touraj Laleh, Mojtaba Faramarzi, Kartik Ahuja, and Irina Rish. Sand-mask: An enhanced gradient masking strategy for the discovery of invariances in domain generalization. arXiv preprint arXiv:2106.02266, 2021. 1, 5
|
| 378 |
+
[48] Yuge Shi, Jeffrey Seely, Philip Torr, N Siddharth, Awni Hannun, Nicolas Usunier, and Gabriel Synnaeve. Gradient matching for domain generalization. In International Conference on Learning Representations, 2021. 2, 5, 7, 8
|
| 379 |
+
[49] Yang Shu, Zhangjie Cao, Chenyu Wang, Jianmin Wang, and Mingsheng Long. Open domain generalization with domain-augmented meta-learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9624-9633, 2021. 1
|
| 380 |
+
[50] Anthony Sicilia, Xingchen Zhao, and Seong Jae Hwang. Domain adversarial neural networks for domain generalization: When it works and how to improve. Machine Learning, pages 1-37, 2023. 8
|
| 381 |
+
[51] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European Conference on Computer Vision, pages 443-450, 2016. 5
|
| 382 |
+
[52] Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 2012. 8
|
| 383 |
+
[53] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5018-5027, 2017. 5
|
| 384 |
+
[54] Jindong Wang, Cuiling Lan, Chang Liu, Yidong Ouyang, Tao Qin, Wang Lu, Yiqiang Chen, Wenjun Zeng, and Philip
|
| 385 |
+
|
| 386 |
+
Yu. Generalizing to unseen domains: A survey on domain generalization. IEEE Transactions on Knowledge and Data Engineering, 2022. 1
|
| 387 |
+
[55] Pengfei Wang, Zhaoxiang Zhang, Zhen Lei, and Lei Zhang. Sharpness-aware gradient matching for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3769-3778, 2023. 1
|
| 388 |
+
[56] Xiran Wang, Jian Zhang, Lei Qi, and Yinghuan Shi. Generalizable decision boundaries: Dualistic meta-learning for open set domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 11564-11573, 2023. 2
|
| 389 |
+
[57] Yufei Wang, Haoliang Li, and Alex C Kot. Heterogeneous domain generalization via domain mixup. In IEEE International Conference on Acoustics, Speech and Signal Processing, pages 3622-3626, 2020. 8
|
| 390 |
+
[58] Mitchell Wortsman, Gabriel Ilharco, Samir Ya Gadre, Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, et al. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In International Conference on Machine Learning, pages 23965-23998. PMLR, 2022. 8
|
| 391 |
+
[59] Qinwei Xu, Ruipeng Zhang, Ya Zhang, Yanfeng Wang, and Qi Tian. A fourier-based framework for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14383-14392, 2021. 8
|
| 392 |
+
[60] Yongquan Yang, Haijun Lv, and Ning Chen. A survey on ensemble learning under the era of deep learning. Artificial Intelligence Review, 56(6):5545-5589, 2023. 8
|
| 393 |
+
[61] Jian Zhang, Lei Qi, Yinghuan Shi, and Yang Gao. Mvdg: A unified multi-view framework for domain generalization. In European Conference on Computer Vision, pages 161-177, 2022. 8
|
| 394 |
+
[62] Marvin Zhang, Henrik Marklund, Abhishek Gupta, Sergey Levine, and Chelsea Finn. Adaptive risk minimization: A meta-learning approach for tackling group shift. arXiv preprint arXiv:2007.02931, 8(9):4, 2020. 1, 5
|
| 395 |
+
[63] Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Domain generalization with mixstyle. In International Conference on Learning Representations, 2020. 1, 8
|
| 396 |
+
[64] Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Domain adaptive ensemble learning. IEEE Transactions on Image Processing, 30:8008-8018, 2021. 8
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d6b5fb3bea3a7c43f159addfddb249f1c1615a91f3d4cd32d0696e326659fb9
|
| 3 |
+
size 439815
|
CVPR/2025/Balanced Direction from Multifarious Choices_ Arithmetic Meta-Learning for Domain Generalization/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff6cff25ea6ff6823ae72043aac1af1f8b73d4cd946ce6d9f149925fe8176cec
|
| 3 |
+
size 492983
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:305c62f994b770feaf9dcc0d4c0865e4f961d415fe4543d569105ed2cd3378a9
|
| 3 |
+
size 92459
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc007bdb75493b288fac69788b1d9bbe3875e0d08575e899590f9611a23df09f
|
| 3 |
+
size 119643
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/6d2ad8ce-e46b-44bd-af79-ccbdb4c0fa56_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f951062056cd8f410600fa346257597cdd20a0db99b26feabff441e3c0e6049
|
| 3 |
+
size 476949
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/full.md
ADDED
|
@@ -0,0 +1,474 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Balanced Rate-Distortion Optimization in Learned Image Compression
|
| 2 |
+
|
| 3 |
+
Yichi Zhang, Zhihao Duan, Yuning Huang, Fengqing Zhu Elmore Family School of Electrical and Computer Engineering, Purdue University, West Lafayette, Indiana, U.S.A.
|
| 4 |
+
|
| 5 |
+
{zhan5096,duan90,huan1781,zhuO}@Purdue.edu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Learned image compression (LIC) using deep learning architectures has seen significant advancements, yet standard rate-distortion (R-D) optimization often encounters imbalanced updates due to diverse gradients of the rate and distortion objectives. This imbalance can lead to suboptimal optimization, where one objective dominates, thereby reducing overall compression efficiency. To address this challenge, we reformulate R-D optimization as a multi-objective optimization (MOO) problem and introduce two balanced R-D optimization strategies that adaptively adjust gradient updates to achieve more equitable improvements in both rate and distortion. The first proposed strategy utilizes a coarse-to-fine gradient descent approach along standard R-D optimization trajectories, making it particularly suitable for training LIC models from scratch. The second proposed strategy analytically addresses the reformulated optimization as a quadratic programming problem with an equality constraint, which is ideal for fine-tuning existing models. Experimental results demonstrate that both proposed methods enhance the R-D performance of LIC models, achieving around a $2\%$ BD-Rate reduction with acceptable additional training cost, leading to a more balanced and efficient optimization process. Code will be available at https://gitlab.com/viper-purdue/Balanced-RD.
|
| 10 |
+
|
| 11 |
+
# 1. Introduction
|
| 12 |
+
|
| 13 |
+
Rate-distortion (R-D) optimization [60] is a fundamental process in image compression, balancing the trade-off between rate (compression efficiency) and distortion (image quality). Traditional compression techniques, such as JPEG [63] and MPEG [34], achieve this balance using carefully crafted transforms, quantization, and entropy coding schemes. These methods reduce data size while minimizing visual degradation through predefined, hand-tuned parameters and well-established signal processing techniques.
|
| 14 |
+
|
| 15 |
+
These codes approach R-D optimization within a structured, deterministic parameter space. Parameters are either
|
| 16 |
+
|
| 17 |
+
manually adjusted or selected via straightforward heuristics rather than through complex, gradient-based updates. This setup avoids the potential for imbalanced optimization arising from dynamic parameter adjustments, ensuring a stable alignment between rate and distortion objectives [61]. However, the fixed nature of these parameters limits the flexibility of traditional methods in adapting to varying image content, constraining their overall efficiency.
|
| 18 |
+
|
| 19 |
+
In contrast, learned image compression (LIC) models utilize deep learning architectures to automatically adapt to image data. By learning intricate features directly from data, LIC models achieve higher compression ratios and enhanced reconstruction quality [27, 36, 43]. In LIC, R-D optimization is typically achieved by minimizing a combined loss function for rate and distortion, controlled by a weighting factor, $\lambda$ , which denotes the trade-off between them [4, 5]. This gradient-based approach dynamically updates parameters to minimize the loss, enabling LIC models to adapt to diverse image content. However, summing the rate and distortion gradients in this setup can result in imbalanced updates, where one objective dominates the other due to the diverse gradient direction or magnitude during the optimization process [1, 58]. This imbalance may hinder convergence, as one objective is prioritized at the expense of the overall performance drop [69].
|
| 20 |
+
|
| 21 |
+
Addressing this imbalance requires strategies to harmonize rate and distortion objectives, enabling both to be optimized effectively for higher-quality image compression. Multi-objective optimization (MOO) strategies offer promising solutions, as they are designed to make progress across multiple objectives simultaneously [13, 42, 53, 58, 69]. These approaches guide models towards Pareto-optimal solutions [47] that balance competing objectives without excessively prioritizing any single one.
|
| 22 |
+
|
| 23 |
+
In this work, we introduce a MOO-based framework for R-D optimization in LIC, treating rate and distortion as two objectives to be optimized concurrently. We propose two balanced solutions for this framework that adaptively reweight gradient updates from the two objectives to ensure equitable progress on both objectives. The first solution
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
(a) Testing loss trend
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
(b) Loss improvement speed
|
| 30 |
+
Figure 1. Comparison of loss trends and improvement speeds for the M&S hyperprior [50] model with $\lambda = 0.013$ from epoch 10 to 150, where Distortion $= \mathrm{MSE} \times \lambda \times 255^2$ . The first 10 epochs are omitted for improved readability. (a) Testing loss trend for the standard R-D optimization versus the proposed balanced R-D optimization. The balanced approach demonstrates more stable and smoother loss improvements, showing simultaneous and consistent reductions in both distortion and bits-per-pixel (bpp) metrics. In contrast, the standard method focuses on reducing distortion, with the bpp loss only gradually increasing in this period. (b) Comparison of loss improvement speeds, Eq. 4, for standard and balanced R-D optimizations. The balanced R-D optimization yields a more consistent, less volatile improvement speed, outperforming the standard approach by achieving steady and reliable convergence across epochs. This highlights the advantage of the balanced approach in optimizing both objectives cohesively and effectively.
|
| 31 |
+
|
| 32 |
+
employs a coarse-to-fine gradient descent approach, particularly effective for training models from scratch by iteratively refining gradient weights. The second solution reformulates the optimization as a equality constraint-quadratic programming problem to derive the gradient weights analytically, offering a precise fine-tuning mechanism for existing LIC models. Our approach achieves balanced progress in both objectives, yielding smoother convergence and enhanced R-D performance, as illustrated in Fig. 1.
|
| 33 |
+
|
| 34 |
+
Our main contributions are summarized as follows:
|
| 35 |
+
|
| 36 |
+
- We reformulate R-D optimization as a multi-objective optimization (MOO) problem, introducing a balanced framework to optimize rate and distortion more equitably.
|
| 37 |
+
- We propose two solutions for balanced R-D optimization: a coarse-to-fine gradient descent solution for training new models from scratch, and an analytical quadratic programming solution for fine-tuning existing models.
|
| 38 |
+
- Extensive experiments show that our approach consistently improves the R-D performance of LIC models.
|
| 39 |
+
|
| 40 |
+
# 2. Related work
|
| 41 |
+
|
| 42 |
+
# 2.1. Learned image compression
|
| 43 |
+
|
| 44 |
+
Learned image compression methods often rely on nonlinear transform coding framework [4] to optimize the trade-off between bit-rate R and distortion D. Recent advances in LIC have focused on two main aspects:
|
| 45 |
+
|
| 46 |
+
- Transform Functions: Various architectures and techniques are utilized to enhance the capacity of the trans
|
| 47 |
+
|
| 48 |
+
form functions. For instance, residual networks [11, 27], deformable convolutions [21, 73], and frequency decomposition [22, 45]. Invertible neural networks are explored in [9, 67], while contextual clustering is leveraged in [55, 72]. Additionally, transformers are increasingly incorporated for further performance gains [32, 36, 43, 56, 77, 78].
|
| 49 |
+
|
| 50 |
+
- Entropy Model Refinement: Improvements in entropy models have involved hierarchical priors [5, 15, 28], spatial autoregressive models [50], channel autoregressive models [49], and joint channel-spatial context models [30, 44]. Methods like the two-pass checkerboard approach [26], codebooks [76], and (lattice) vector quantization [16, 70] are also explored to enhance efficiency.
|
| 51 |
+
|
| 52 |
+
Efforts have also focused on efficient implementation in LICs, such as slimmable sub-CAEs [62], variable-bit-rate CODECs [24, 31], knowledge distillation [21, 71], shallow and linear decoders [68], causal context losses [25], and latent decorrelation losses [2]. In addition, studies on rate-distortion-complexity [23, 48, 73] seek to optimize the trade-off between computational cost and rate-distortion performance. Despite these advancements in BD-Rate reduction, a thorough exploration of R-D optimization in LICs is still needed.
|
| 53 |
+
|
| 54 |
+
# 2.2. Multi-objective optimization
|
| 55 |
+
|
| 56 |
+
Multi-objective optimization aims to minimize multiple objectives with a single solution. In non-trivial problems, there is typically no single solution that can optimize all ob
|
| 57 |
+
|
| 58 |
+
jective functions simultaneously [47]. Numerous optimization methods have been proposed to approximate the Pareto set and front by generating a finite set of solutions [35, 74].
|
| 59 |
+
|
| 60 |
+
When all objective functions are differentiable, the gradient-based approach can be used to find a valid gradient direction that allows simultaneous improvement across all objectives [14, 18, 57] according to multi-objective Karush-Kuhn-Tucker (KKT) conditions [46]. The Multiple Gradient Descent Algorithm (MGDA) [14, 58] achieves this by calculating a valid gradient $d_{t} = \sum_{i=1} w_{i} \nabla f_{i}(x)$ through solving the following quadratic programming problem at each iteration:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\min _ {w _ {i}} \left\| \sum_ {i = 1} w _ {i} \nabla f _ {i} \left(x _ {t}\right) \right\| _ {2} ^ {2}, \quad \text {s . t .} \quad \sum_ {i = 1} w _ {i} = 1, \quad w _ {i} \geq 0. \tag {1}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
The current solution is then updated by gradient descent as $\theta_{t + 1} = \theta_t - \eta_t d_t$ . If $d_t = 0$ , it implies there is no valid gradient direction that can improve all objectives simultaneously, making $\theta_t$ a Pareto stationary solution [14, 19]. This approach has also inspired various adaptive gradient methods in multi-task learning [10, 17, 29, 41, 42, 52, 53, 59, 66, 69, 75]. These works highlight the promising performance of multi-objective optimization, which has not yet been thoroughly explored in the context of learned image compression R-D optimization.
|
| 67 |
+
|
| 68 |
+
# 3. Proposed method
|
| 69 |
+
|
| 70 |
+
# 3.1. Preliminaries: rate-distortion optimization in learned image compression
|
| 71 |
+
|
| 72 |
+
In LIC, the objective is to encode an image $x$ , drawn from a source distribution with probability density function $p_{\mathrm{source}}$ , into a compact bit sequence for efficient storage or transmission. The receiver then reconstructs an approximation $\hat{x}$ of the original image $x$ . The LIC process involves three main steps: encoding and quantization, entropy coding, and reconstruction.
|
| 73 |
+
|
| 74 |
+
- Encoding and Quantization: First, each data point $x$ is mapped to a de-correlated low-dimensional latent variable $\hat{z}$ via an encoder function $e(\cdot)$ followed by quantization $Q(\cdot)$ to convert the continuous representation into discrete values, i.e., $\hat{z} = Q(e(x))$ .
|
| 75 |
+
- Entropy Coding: After determining $\hat{z}$ , lossless entropy coding, such as Huffman coding [51] or arithmetic coding [65], is applied to produce a compressed bit sequence with length $b(\hat{z})$ . Ideally, the entropy coding scheme approximates the theoretical bit rate, given by the entropy of $\hat{z}$ under its marginal distribution. We assume that both the sender and receiver have access to an entropy model $P(\hat{z})$ , which estimates the marginal probability distribution of $\hat{z}$ and determines the expected bit length as $b(\hat{z}) \approx -\log_2 P(\hat{z})$ . The goal is to ensure that $P(\hat{z})$ closely ap
|
| 76 |
+
|
| 77 |
+
proximates the true marginal distribution $p(\hat{z})$ , which is defined as $p(\hat{z}) = \mathbb{E}_{x \sim p_{\text{source}}} [\delta(\hat{z}, Q(e(x)))]$ , where $\delta$ is the Kronecker delta function. Under this approximation, the encoding length $b(\hat{z})$ is nearly optimal, as the average code length approaches the entropy $-\log_2 p(\hat{z})$ of $\hat{z}$ .
|
| 78 |
+
|
| 79 |
+
- Reconstruction: Once the receiver has obtained $\hat{z}$ , it reconstructs the approximation $\hat{x}$ using a reconstruction function $r(\cdot)$ , such that $\hat{x} = r(\hat{z})$ .
|
| 80 |
+
|
| 81 |
+
To optimize the LIC scheme, our goal is to minimize both the bit rate (rate) and the discrepancy between $x$ and $\hat{x}$ (distortion), where the distortion is measured by a function $d(x, \hat{x})$ . This objective is formulated as a R-D loss using a Lagrangian multiplier:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\mathcal {L} _ {\mathrm {R - D}} = \mathbb {E} _ {x \sim p _ {\text {s o u r c e}}} \left[ \underbrace {- \log_ {2} P (\hat {z})} _ {\text {r a t e} (\mathcal {L} _ {\mathrm {R}})} + \underbrace {\lambda d (x , \hat {x})} _ {\text {d i s t o r t i o n} (\mathcal {L} _ {\mathrm {D}})} \right], \tag {2}
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
where $\lambda$ is a Lagrange multiplier that controls the trade-off between rate (compression efficiency) and distortion (reconstruction quality). This formulation represents the Lagrangian relaxation of the distortion-constrained R-D optimization problem, aiming for efficient compression while maintaining high reconstruction fidelity. In practice, the gradient used to update LIC models is the sum of the gradients for each objective: $d_{t} = \nabla \mathcal{L}_{\mathrm{R},t} + \nabla \mathcal{L}_{\mathrm{D},t}$ , where $t$ denotes the training iteration.
|
| 88 |
+
|
| 89 |
+
# 3.2. Balanced rate-distortion optimization
|
| 90 |
+
|
| 91 |
+
To address the imbalance in optimizing rate and distortion discussed in Sec. 1, we propose a balanced R-D optimization framework. This framework dynamically adjusts the contributions from each objective in the R-D loss function, aiming to achieve equal progress in both rate and distortion. Specifically, we redefine the update direction as $d_{t} = w_{\mathrm{R},t}\nabla \log \mathcal{L}_{\mathrm{R},t} + w_{\mathrm{D},t}\nabla \log \mathcal{L}_{\mathrm{D},t}$ , where $w_{\mathrm{R},t}$ and $w_{\mathrm{L},t}$ are adaptive weights for the rate and distortion gradients. By maximizing the minimum improvement speed between rate and distortion at each step, our method finds the ideal gradient weights, promotes stable balanced optimization, and enhances overall model performance.
|
| 92 |
+
|
| 93 |
+
Inspired by MOO techniques [42, 58], we reformulate the R-D optimization problem as a multi-objective optimization problem. Our goal is to simultaneously optimize rate minimization and distortion minimization with parameters $\theta \in \mathbb{R}^m$ . To achieve this, we modify the original Lagrangian R-D loss function to the following form:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\min _ {\theta \in \mathbb {R} ^ {m}} \left\{\mathcal {L} (\theta) = \mathcal {L} _ {\mathrm {R}} (\theta) + \mathcal {L} _ {\mathrm {D}} (\theta) \right\}, \tag {3}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where the trade-off factor $\lambda$ is now absorbed into $\mathcal{L}_{\mathrm{D}}$ to simplify the formulation. $m$ is the number of parameters.
|
| 100 |
+
|
| 101 |
+
Algorithm 1 Balanced Rate-Distortion Optimization via Trajectory Optimization
|
| 102 |
+
Require: Initial network parameters $\theta_0$ , initial softmax logits $\xi_0$ , learning rates $\alpha$ (for $\theta$ ) and $\beta$ (for $\xi$ ), decay parameter $\gamma$ , total iterations $T$
|
| 103 |
+
1: Initialize weights $\mathbf{w}_0 \gets \mathrm{Softmax}(\xi_0)$
|
| 104 |
+
2: for $t = 0$ to $T - 1$ do
|
| 105 |
+
3: Compute losses $\mathcal{L}_{\mathrm{R},t} = \mathcal{L}_{\mathrm{R}}(\theta_t)$ and $\mathcal{L}_{\mathrm{D},t} = \mathcal{L}_{\mathrm{D}}(\theta_t)$
|
| 106 |
+
4: Compute gradients: $\nabla_{\theta}\mathcal{L}_{\mathrm{R},t} = \frac{\partial\mathcal{L}_{\mathrm{R},t}}{\partial\theta_t}$ , $\nabla_{\theta}\mathcal{L}_{\mathrm{D},t} = \frac{\partial\mathcal{L}_{\mathrm{D},t}}{\partial\theta_t}$
|
| 107 |
+
5: $\nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t} = \frac{\nabla_{\theta}\mathcal{L}_{\mathrm{R},t}}{\mathcal{L}_{\mathrm{R},t}}$ , $\nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t} = \frac{\nabla_{\theta}\mathcal{L}_{\mathrm{D},t}}{\mathcal{L}_{\mathrm{D},t}}$
|
| 108 |
+
6: Compute normalization constant: $c_t = \left(\frac{w_{\mathrm{R},t}}{\mathcal{L}_{\mathrm{R},t}} + \frac{w_{\mathrm{D},t}}{\mathcal{L}_{\mathrm{D},t}}\right)^{-1}$
|
| 109 |
+
7: Compute balanced gradient: $\mathbf{d}_t = c_t(w_{\mathrm{R},t}\nabla_\theta \log \mathcal{L}_{\mathrm{R},t} + w_{\mathrm{D},t}\nabla_\theta \log \mathcal{L}_{\mathrm{D},t})$
|
| 110 |
+
8: Update network parameters: $\theta_{t+1} = \theta_t - \alpha \mathbf{d}_t$
|
| 111 |
+
9: Compute updated losses $\mathcal{L}_{\mathrm{R},t+1} = \mathcal{L}_{\mathrm{R}}(\theta_{t+1})$ and $\mathcal{L}_{\mathrm{D},t+1} = \mathcal{L}_{\mathrm{D}}(\theta_{t+1})$
|
| 112 |
+
10: Compute $\delta_t = \left[\frac{\partial w_{\mathrm{R},t}}{\partial\xi_t}\right]^\top \left[\log \mathcal{L}_{\mathrm{R},t} - \log \mathcal{L}_{\mathrm{R},t+1}\right]$
|
| 113 |
+
11: Update softmax logits: $\xi_{t+1} = \xi_t - \beta (\delta_t + \gamma \xi_t)$
|
| 114 |
+
12: Update weights: $\mathbf{w}_{t+1} = \operatorname{Softmax}(\xi_{t+1})$
|
| 115 |
+
13: end for
|
| 116 |
+
|
| 117 |
+
The loss improvement speed at iteration $t$ of task $i \in \{\mathbf{R}, \mathbf{D}\}$ is defined as:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
s _ {i, t} (\alpha , d _ {t}) = \frac {\mathcal {L} _ {i , t} - \mathcal {L} _ {i , t + 1}}{\mathcal {L} _ {i , t}}, \tag {4}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where $\alpha$ is the step size and $d_{t}$ is the update direction at $t$ , with $\theta_{t + 1} = \theta_t - \alpha d_t$ . To achieve balanced optimization, we seek an update direction $d_{t}$ that maximizes the minimum improvement speed between rate and distortion, ensuring that neither objective dominates the update. In other words, we maximize the smaller improvement speed between $\mathcal{L}_{\mathrm{R}}$ and $\mathcal{L}_{\mathrm{D}}$ . This leads to the following saddle point problem [37] formulation:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\max _ {d _ {t} \in \mathbb {R} ^ {m}} \min \left(\frac {1}{\alpha} s _ {\mathbb {R}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}, \frac {1}{\alpha} s _ {\mathrm {D}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}\right), \tag {5}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $\frac{1}{2}\|d_t\|^2$ serves as a regularization term to prevent unbounded updates.
|
| 130 |
+
|
| 131 |
+
When the step size $\alpha$ is small, one can approximate $\mathcal{L}_{t + 1}\approx \mathcal{L}_t - \alpha \nabla \mathcal{L}_t^\top d_t$ using a first-order Taylor expansion. This approximation simplifies the problem to:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\begin{array}{l} \max _ {d _ {t} \in \mathbb {R} ^ {m}} \min \left(\frac {1}{\alpha} s _ {\mathrm {R}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}, \frac {1}{\alpha} s _ {\mathrm {D}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}\right) \\ = \max _ {d _ {t} \in \mathbb {R} ^ {m}} \min \left(\frac {\nabla \mathcal {L} _ {\mathrm {R} , t} ^ {\top} d _ {t}}{\mathcal {L} _ {\mathrm {R} , t}} - \frac {1}{2} \| d _ {t} \| ^ {2}, \frac {\nabla \mathcal {L} _ {\mathrm {D} , t} ^ {\top} d _ {t}}{\mathcal {L} _ {\mathrm {D} , t}} - \frac {1}{2} \| d _ {t} \| ^ {2}\right) \\ = \max _ {d _ {t} \in \mathbb {R} ^ {m}} \left(\min \left(\nabla \log \mathcal {L} _ {\mathrm {R}, t} ^ {\top} d _ {t}, \nabla \log \mathcal {L} _ {\mathrm {D}, t} ^ {\top} d _ {t}\right) - \frac {1}{2} \| d _ {t} \| ^ {2}\right). \tag {6} \\ \end{array}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
To avoid solving the high-dimensional primal problem directly (as $d_t \in \mathbb{R}^m$ with potentially millions of parameters if $\theta$ is a neural network), we follow previous work [42, 58]
|
| 138 |
+
|
| 139 |
+
to turn to the dual problem. Leveraging the Lagrangian duality theorem [8], we can rewrite the optimization as a convex combination of gradients:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\begin{array}{l} \max _ {d _ {t} \in \mathbb {R} ^ {m}} \left(\min \left(\nabla \log \mathcal {L} _ {\mathrm {R}, t} ^ {\top} d _ {t}, \nabla \log \mathcal {L} _ {\mathrm {D}, t} ^ {\top} d _ {t}\right) - \frac {1}{2} \| d _ {t} \| ^ {2}\right) \\ = \max _ {d _ {t} \in \mathbb {R} ^ {m}} \min _ {w \in \mathbb {S} _ {2}} \left(w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t}\right) ^ {\top} d _ {t} - \frac {1}{2} \| d _ {t} \| ^ {2} \\ = \min _ {w _ {t} \in \mathbb {S} _ {2}} \max _ {d _ {t} \in \mathbb {R} ^ {m}} \left(w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t}\right) ^ {\top} d _ {t} - \frac {1}{2} \| d _ {t} \| ^ {2}, \tag {7} \\ \end{array}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where the second equality follows from strong duality. Here, $w_{t}\in \mathbb{S}_{2} = \{w\in \mathbb{R}_{\geq 0}^{2}\mid w^{\top}\mathbf{1} = 1\}$ represents the gradient weights in the 2-dimensional probabilistic simplex.
|
| 146 |
+
|
| 147 |
+
Let $g(d_{t},w) = (w_{\mathrm{R},t}\nabla \log \mathcal{L}_{\mathrm{R},t} + w_{\mathrm{D},t}\nabla \log \mathcal{L}_{\mathrm{D},t})^{\top}d_{t} - \frac{1}{2}\| d_{t}\|^{2}$ . The optimal direction $d_{t}^{*}$ is obtained by setting:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\frac {\partial g}{\partial d _ {t}} = 0 \quad \Longrightarrow \quad d _ {t} ^ {*} = w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t}. \tag {8}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
Substituting $d_t^*$ back, we obtain:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\begin{array}{l} \max _ {d _ {t} \in \mathbb {R} ^ {m}} \min \left(\frac {1}{\alpha} s _ {\mathrm {R}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}, \frac {1}{\alpha} s _ {\mathrm {D}, t} (\alpha , d _ {t}) - \frac {1}{2} \| d _ {t} \| ^ {2}\right) \\ = \min _ {w _ {t} \in \mathbb {S} _ {2}} \frac {1}{2} \| w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t} \| ^ {2} \\ = \min _ {w _ {t} \in \mathbb {S} _ {2}} \frac {1}{2} \| J _ {t} w _ {t} \| ^ {2}, \tag {9} \\ \end{array}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $J_{t} = \left[ \begin{array}{l}\nabla \log \mathcal{L}_{\mathrm{R},t}^{\top}\\ \nabla \log \mathcal{L}_{\mathrm{D},t}^{\top} \end{array} \right]$ . Thus, our optimization problem reduces to finding $w_{t}$ that satisfies Eq. 9.
|
| 160 |
+
|
| 161 |
+
# 3.2.1. Solution 1: Gradient descent over trajectory
|
| 162 |
+
|
| 163 |
+
Rather than fully solving the optimization problem at each step, our proposed Solution 1 adopts a coarse-to-fine gra
|
| 164 |
+
|
| 165 |
+
dient descent approach [42, 58], incrementally refining the solution along the R-D optimization trajectory. In this approach, the gradient weights $w_{t}$ are updated iteratively as follows:
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
w _ {t + 1} = w _ {t} - \alpha_ {w} \tilde {\delta}, \tag {10}
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
where
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
\tilde {\delta} = \nabla_ {w} \frac {1}{2} \| J _ {t} w _ {t} \| ^ {2} = J _ {t} ^ {\top} J _ {t} w _ {t}. \tag {11}
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
Using a first-order Taylor approximation, $\log \mathcal{L}_{t + 1} \approx \log \mathcal{L}_t - \alpha \nabla \log \mathcal{L}_t^\top d_t$ , we have the following relationship:
|
| 178 |
+
|
| 179 |
+
$$
|
| 180 |
+
\tilde {\delta} = J _ {t} ^ {\top} J _ {t} w _ {t} = J _ {t} ^ {\top} d _ {t} \approx \frac {1}{\alpha} \left[ \begin{array}{l} \log \mathcal {L} _ {\mathrm {R}, t} - \log \mathcal {L} _ {\mathrm {R}, t + 1} \\ \log \mathcal {L} _ {\mathrm {D}, t} - \log \mathcal {L} _ {\mathrm {D}, t + 1} \end{array} \right]. ^ {1} \tag {12}
|
| 181 |
+
$$
|
| 182 |
+
|
| 183 |
+
To ensure that $w_{t}$ remains within the interior point of simplex $\mathbb{S}_2$ , we reparametrize $w_{t}$ using $\xi_{t}$ :
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
w _ {t} = \operatorname {S o f t m a x} (\xi_ {t}), \tag {13}
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
where $\xi_t \in \mathbb{R}^2$ represents the unconstrained softmax logits. To give more weight to recent updates, we add a decay term [42, 75], leading to the following update for $\xi_t$ :
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\xi_ {t + 1} = \xi_ {t} - \beta (\delta_ {t} + \gamma \xi_ {t}), \tag {14}
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
where
|
| 196 |
+
|
| 197 |
+
$$
|
| 198 |
+
\delta_ {t} = \left[ \begin{array}{l} \nabla^ {\top} w _ {\mathrm {R}, t} (\xi) \\ \nabla^ {\top} w _ {\mathrm {D}, t} (\xi) \end{array} \right] \left[ \begin{array}{l} \log \mathcal {L} _ {\mathrm {R}, t} - \log \mathcal {L} _ {\mathrm {R}, t + 1} \\ \log \mathcal {L} _ {\mathrm {D}, t} - \log \mathcal {L} _ {\mathrm {D}, t + 1} \end{array} \right]. \tag {15}
|
| 199 |
+
$$
|
| 200 |
+
|
| 201 |
+
After computing the weights $w_{t}$ , we renormalize them to ensure numerical stability [42]. This renormalization is crucial as our update direction is a convex combination of the gradients of the log losses:
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
d _ {t} = w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t} = \sum_ {i \in \{\mathrm {R}, \mathrm {D} \}} \frac {w _ {i , t}}{\mathcal {L} _ {i , t}} \nabla \mathcal {L} _ {i, t}. \tag {16}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
When $\mathcal{L}_{i,t}$ becomes small, the multiplicative factor $\frac{w_{i,t}}{\mathcal{L}_{i,t}}$ can grow large, potentially causing instability in the optimization. To mitigate this, we scale the gradient by a constant $c_t$ :
|
| 208 |
+
|
| 209 |
+
$$
|
| 210 |
+
c _ {t} = \left(\frac {w _ {\mathrm {R} , t}}{\mathcal {L} _ {\mathrm {R} , t}} + \frac {w _ {\mathrm {D} , t}}{\mathcal {L} _ {\mathrm {D} , t}}\right) ^ {- 1}. \tag {17}
|
| 211 |
+
$$
|
| 212 |
+
|
| 213 |
+
The resulting balanced gradient, which is used to update the model parameters $\theta$ , is then given by:
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
d _ {t} = c _ {t} \left(w _ {\mathrm {R}, t} \nabla \log \mathcal {L} _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} \nabla \log \mathcal {L} _ {\mathrm {D}, t}\right). \tag {18}
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
This method, referred to as Solution 1, is a coarse-to-fine gradient descent technique. It is particularly suited for training LIC models from scratch, as it incrementally balances rate and distortion optimization along the trajectory. The implementation is shown in Algorithm 1.
|
| 220 |
+
|
| 221 |
+
# 3.2.2. Solution 2: Quadratic programming
|
| 222 |
+
|
| 223 |
+
Alternatively, we can formulate the weight optimization problem as a constrained-quadratic programming (QP) problem [54]:
|
| 224 |
+
|
| 225 |
+
$$
|
| 226 |
+
\min _ {w _ {t}} \frac {1}{2} \| J _ {t} w _ {t} \| ^ {2} = \frac {1}{2} w _ {t} ^ {\top} \left(J _ {t} ^ {\top} J _ {t}\right) w _ {t}
|
| 227 |
+
$$
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
\begin{array}{l} \text {s . t .} \quad w _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} = 1, \end{array} \tag {19}
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
$$
|
| 234 |
+
w _ {\mathrm {R}, t}, w _ {\mathrm {D}, t} \geq 0,
|
| 235 |
+
$$
|
| 236 |
+
|
| 237 |
+
where $J_{t} = \left[ \begin{array}{l}\nabla \log \mathcal{L}_{\mathrm{R},t}^{\top}\\ \nabla \log \mathcal{L}_{\mathrm{D},t}^{\top} \end{array} \right]$ is an $n\times 2$ matrix containing the gradients of the log losses for rate and distortion.
|
| 238 |
+
|
| 239 |
+
Let $Q = J_{t}^{\top}J_{t}$ represent the Hessian matrix. Since the gradients for rate and distortion typically reflect distinct objectives, they are rarely parallel, suggesting $Q$ is positive definite [58]. This property permits an analytical solution to the QP problem. The Hessian $Q$ is given by:
|
| 240 |
+
|
| 241 |
+
$$
|
| 242 |
+
Q = \left[ \begin{array}{c c} \| \nabla \log \mathcal {L} _ {\mathrm {R}, t} \| ^ {2} & \langle \nabla \log \mathcal {L} _ {\mathrm {R}, t}, \nabla \log \mathcal {L} _ {\mathrm {D}, t} \rangle \\ \left\langle \nabla \log \mathcal {L} _ {\mathrm {R}, t}, \nabla \log \mathcal {L} _ {\mathrm {D}, t} \right\rangle & \| \nabla \log \mathcal {L} _ {\mathrm {D}, t} \| ^ {2} \end{array} \right]. \tag {20}
|
| 243 |
+
$$
|
| 244 |
+
|
| 245 |
+
To solve this QP problem, we introduce a Lagrange multiplier $\lambda$ to enforce the equality constraint [8], giving us the following Lagrangian:
|
| 246 |
+
|
| 247 |
+
$$
|
| 248 |
+
L \left(w _ {t}, \lambda\right) = \frac {1}{2} w _ {t} ^ {\top} Q w _ {t} - \lambda \left(w _ {\mathrm {R}, t} + w _ {\mathrm {D}, t} - 1\right). \tag {21}
|
| 249 |
+
$$
|
| 250 |
+
|
| 251 |
+
The weights $w_{t}$ can then be obtained by applying the Karush-Kuhn-Tucker (KKT) conditions [46]. The main KKT conditions for this problem are:
|
| 252 |
+
|
| 253 |
+
1. Stationarity: The gradient of the Lagrangian with respect to $w_{t}$ must be zero,
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\nabla_ {w _ {t}} L = Q w _ {t} - \lambda \mathbf {1} = 0, \tag {22}
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
where $\mathbf{1} = [1,1]^{\top}$ . This yields $w_{t} = \lambda Q^{-1}\mathbf{1}$
|
| 260 |
+
|
| 261 |
+
2. Primal Feasibility: The weights must satisfy the equality constraint,
|
| 262 |
+
|
| 263 |
+
$$
|
| 264 |
+
\mathbf {1} ^ {\top} w _ {t} = 1. \tag {23}
|
| 265 |
+
$$
|
| 266 |
+
|
| 267 |
+
Note: Neglecting dual feasibility and complementary slackness simplifies the solution process since non-negativity is guaranteed by a softmax projection applied subsequently.
|
| 268 |
+
|
| 269 |
+
By combining these conditions, we arrive at a simplified expression:
|
| 270 |
+
|
| 271 |
+
$$
|
| 272 |
+
\mathbf {1} ^ {\top} w _ {t} = \lambda \mathbf {1} ^ {\top} Q ^ {- 1} \mathbf {1} = 1, \tag {24}
|
| 273 |
+
$$
|
| 274 |
+
|
| 275 |
+
which gives:
|
| 276 |
+
|
| 277 |
+
$$
|
| 278 |
+
\lambda = \frac {1}{\mathbf {1} ^ {\top} Q ^ {- 1} \mathbf {1}}, \quad w _ {t} = \frac {Q ^ {- 1} \mathbf {1}}{\mathbf {1} ^ {\top} Q ^ {- 1} \mathbf {1}}. \tag {25}
|
| 279 |
+
$$
|
| 280 |
+
|
| 281 |
+
Algorithm 2 Balanced Rate-Distortion Optimization via Quadratic Programming
|
| 282 |
+
Require: Initial network parameters $\theta_0$ , learning rate $\alpha$ , total iterations $T$
|
| 283 |
+
1: for $t = 0$ to $T - 1$ do
|
| 284 |
+
2: Compute losses $\mathcal{L}_{\mathrm{R},t} = \mathcal{L}_{\mathrm{R}}(\theta_t)$ and $\mathcal{L}_{\mathrm{D},t} = \mathcal{L}_{\mathrm{D}}(\theta_t)$
|
| 285 |
+
3: Compute gradients: $\nabla_{\theta}\mathcal{L}_{\mathrm{R},t} = \frac{\partial\mathcal{L}_{\mathrm{R},t}}{\partial\theta_t}$ , $\nabla_{\theta}\mathcal{L}_{\mathrm{D},t} = \frac{\partial\mathcal{L}_{\mathrm{D},t}}{\partial\theta_t}$
|
| 286 |
+
4: $\nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t} = \frac{\nabla_{\theta}\mathcal{L}_{\mathrm{R},t}}{\mathcal{L}_{\mathrm{R},t}}$ , $\nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t} = \frac{\nabla_{\theta}\mathcal{L}_{\mathrm{D},t}}{\mathcal{L}_{\mathrm{D},t}}$
|
| 287 |
+
5: Form matrix $J_{t} = \left[\begin{array}{cc}\nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t}^{\top}\\ \nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t}^{\top}\end{array}\right]$
|
| 288 |
+
6: Compute Hessian matrix: $Q = J_{t}^{\top}J_{t} = \left[ \begin{array}{cc}\| \nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t}\|^{2} & \langle \nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t},\nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t}\rangle \\ \langle \nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t},\nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t}\rangle & \| \nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t}\|^{2} \end{array} \right]$
|
| 289 |
+
7: Compute inverse $Q^{-1}$
|
| 290 |
+
8: Compute weights: $\lambda = \frac{1}{1^{\top}Q^{-1}\mathbf{1}}$
|
| 291 |
+
9: Apply softmax for numerical stability: $\tilde{w}_t = \operatorname {Softmax}(w_t)$
|
| 292 |
+
10: Compute normalization constant: $c_{t} = \left(\frac{\tilde{w}_{\mathrm{R},t}}{\mathcal{L}_{\mathrm{R},t}} +\frac{\tilde{w}_{\mathrm{D},t}}{\mathcal{L}_{\mathrm{D},t}}\right)^{-1}$
|
| 293 |
+
11: Compute balanced gradient: $\mathbf{d}_t = c_t$ ( $\tilde{w}_{\mathrm{R},t}\nabla_{\theta}\log \mathcal{L}_{\mathrm{R},t} + \tilde{w}_{\mathrm{D},t}\nabla_{\theta}\log \mathcal{L}_{\mathrm{D},t}$ )
|
| 294 |
+
12: Update network parameters: $\theta_{t + 1} = \theta_t - \alpha \mathbf{d}_t$
|
| 295 |
+
13: end for
|
| 296 |
+
|
| 297 |
+
Since $Q$ is positive definite, $Q^{-1}$ exists, ensuring this solution is unique. To enforce non-negativity and enhance numerical stability, we then further project $w_{t}$ onto the probability simplex $\mathbb{S}_2$ by simply using the softmax function:
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\tilde {w} _ {t} = \operatorname {S o f t m a x} \left(w _ {t}\right) = \operatorname {S o f t m a x} \left(\frac {Q ^ {- 1} \mathbf {1}}{\mathbf {1} ^ {\top} Q ^ {- 1} \mathbf {1}}\right). \tag {26}
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
This step ensures $\tilde{w}_t \in \mathbb{S}_2$ and reduces potential numerical issues caused by large gradient variations. It serves as an approximation that aligns with the optimal solution while maintaining similar performance despite slight deviations.
|
| 304 |
+
|
| 305 |
+
After determining the weights $\tilde{w}_t$ , we apply the same renormalization constant $c_t$ as in Section 3.2.1 to compute a balanced gradient for updating the model parameters $\theta$ , following the form in Eq. 18. Solution 2, with its analytical QP formulation, is particularly suitable for fine-tuning existing LIC models, offering a refined approach to balance rate and distortion objectives. The detailed implementation is presented in Algorithm 2.
|
| 306 |
+
|
| 307 |
+
# 4. Experimental results
|
| 308 |
+
|
| 309 |
+
# 4.1. Experimental settings
|
| 310 |
+
|
| 311 |
+
Training. We use the COCO 2017 dataset [38] for training, which contains 118,287 images, each having around $640 \times 420$ pixels. We randomly crop $256 \times 256$ patches.
|
| 312 |
+
|
| 313 |
+
Following the settings of CompressAI [6], we set $\lambda$ to $\{18, 35, 67, 130, 250, 483\} \times 10^{-4}$ . For all models, we train each model using the Adam optimizer with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , a batch size of 32, and an initial learning rate (lr) of $1e - 4$ . We use ReduceLROnPlateau lr scheduler with a patience of 10 and a factor of 0.5. For "Standard" and
|
| 314 |
+
|
| 315 |
+
"Solution 1" models, the $\lambda = 0.0018$ models are trained for 200 epochs. For models with other $\lambda$ values, we fine-tune the model trained with $\lambda = 0.0018$ for an additional 150 epochs. For "Solution 2" models, we fine-tune the corresponding "Standard" models for 50 epochs with an initial lr of 5e-5. Solution 1 hyperparameters are set as $\beta = 0.025$ and $\gamma = 0.001$ .
|
| 316 |
+
|
| 317 |
+
Testing. Three widely used benchmark datasets, including Kodak [20], Tecnick [3], and CLIC 2022 [12], are used to evaluate the performance of the proposed method.
|
| 318 |
+
|
| 319 |
+
# 4.2. Quantitative results
|
| 320 |
+
|
| 321 |
+
We compare our proposed method with standard trained models on prevalent LICs including M&S Hyperprior [50], ELIC $[27]^2$ , and TCM-S [43] to demonstrate its performance. We use standard rate-distortion trained models as the anchor to compute BD-Rate [7].
|
| 322 |
+
|
| 323 |
+
Table 1 shows the BD-Rate improvement achieved by our proposed method compared to baseline approaches across three datasets. Our method consistently surpasses all baselines on both common and high-resolution test datasets, underscoring its effectiveness. For example, ELIC Solution 1 achieves BD-Rate improvement of $-2.68\%$ , $-2.63\%$ , and $-3.00\%$ compared to ELIC Standard on the Kodak, Tecnick, and CLIC2022 datasets, respectively, demonstrating the substantial improvements our approach provides. Furthermore, ELIC Solution 2, which fine-tunes existing standard R-D optimized models, achieves BD-Rate improvement of $-1.81\%$ , $-2.03\%$ , and $-2.39\%$ on the three test datasets, il-
|
| 324 |
+
|
| 325 |
+
lustrating the efficacy of our fine-tuning strategy. Overall, Solution 1 yields slightly better results than Solution 2, as Solution 2 is used only for fine-tuning over a few epochs.
|
| 326 |
+
|
| 327 |
+
Fig. 2 further illustrates the R-D curves for all methods. The proposed method consistently outperforms the standard optimized models, particularly in the high bpp range, demonstrating its superior R-D performance
|
| 328 |
+
|
| 329 |
+
Table 1. BD-Rate Compared to Standard R-D optimization
|
| 330 |
+
|
| 331 |
+
<table><tr><td rowspan="2" colspan="2">Method</td><td colspan="3">BD-Rate (%) ↓</td></tr><tr><td>Kodak</td><td>Tecnick</td><td>CLIC2022</td></tr><tr><td rowspan="3">M&S Hyperprior [50]</td><td>Std.</td><td>0%</td><td>0%</td><td>0%</td></tr><tr><td>Sol. 1</td><td>-1.95%</td><td>-1.91%</td><td>-2.03%</td></tr><tr><td>Sol. 2</td><td>-1.64%</td><td>-1.55%</td><td>-1.81%</td></tr><tr><td rowspan="3">ELIC [27]</td><td>Std.</td><td>0%</td><td>0%</td><td>0%</td></tr><tr><td>Sol. 1</td><td>-2.68%</td><td>-2.63%</td><td>-3.00%</td></tr><tr><td>Sol. 2</td><td>-1.81%</td><td>-2.03%</td><td>-2.39%</td></tr><tr><td rowspan="3">TCM-S [43]</td><td>Std.</td><td>0%</td><td>0%</td><td>0%</td></tr><tr><td>Sol. 1</td><td>-2.53%</td><td>-2.73%</td><td>-2.66%</td></tr><tr><td>Sol. 2</td><td>-1.87%</td><td>-2.09%</td><td>-2.12%</td></tr></table>
|
| 332 |
+
|
| 333 |
+
"Std." denotes Standard, and "Sol." denotes Solution. Bold indicates the best result.
|
| 334 |
+
|
| 335 |
+
# 4.3. Complexity
|
| 336 |
+
|
| 337 |
+
As shown in Table 2, our proposed methods introduce a moderate computational overhead compared to standard R-D optimization. Solution 1 requires an additional weight update $(w_{t})$ by performing two forward passes, which increases epoch training time by approximately $20\%$ . Solution 2, which involves calculating the Hessian matrix through matrix multiplications and performing matrix inversions, adds an overhead of $47 - 50\%$ . For example, in the M&S Hyperprior [50] model, the computational cost (10 minutes, normalized to $100\%$ ) increases by $20\%$ with Solution 1 and by $50\%$ with Solution 2. Similar trends are observed for ELIC [27] and TCM-S [43]. Although Solution 2 incurs a higher computational cost, it is only applied during fine-tuning over fewer epochs. Both methods demonstrate significant performance gains that justify the additional complexity. Importantly, our methods do not affect the inference phase of the trained models, leaving inference time unchanged.
|
| 338 |
+
|
| 339 |
+
# 4.4. Ablation study
|
| 340 |
+
|
| 341 |
+
We conduct comprehensive experiments to find the impact of various factors of the proposed method. All experiments are conducted on the M&S Hyperprior [50] model with $\lambda = 0.013$ . The other settings are the same as the main experiments. In the R-D plane (bpp-PSNR figures), the upper left represents better results.
|
| 342 |
+
|
| 343 |
+
Table 2. Complexity Compared to Standard R-D optimization
|
| 344 |
+
|
| 345 |
+
<table><tr><td colspan="2">Method</td><td>Δ Epoch Training Time ↓</td></tr><tr><td rowspan="3">M&S Hyperprior [50]</td><td>Std.</td><td>10 mins</td></tr><tr><td>Sol. 1</td><td>+20%</td></tr><tr><td>Sol. 2</td><td>+50%</td></tr><tr><td rowspan="3">ELIC [27]</td><td>Std.</td><td>35 mins</td></tr><tr><td>Sol. 1</td><td>+20%</td></tr><tr><td>Sol. 2</td><td>+47%</td></tr><tr><td rowspan="3">TCM-S [43]</td><td>Std.</td><td>60 mins</td></tr><tr><td>Sol. 1</td><td>+23%</td></tr><tr><td>Sol. 2</td><td>+48%</td></tr></table>
|
| 346 |
+
|
| 347 |
+
# 4.4.1. Weight renormalization
|
| 348 |
+
|
| 349 |
+
In the end stages of the training process, the loss $\mathcal{L}_{i,t}$ can become small, which may lead to numerical instability due to the multiplicative factor $\frac{w_{i,t}}{\mathcal{L}_{i,t}}$ . To address this, we apply weight renormalization to the proposed solutions. We experimented with removing this renormalization, and the results ("w/o Re"), shown in Fig. 3a, indicate that renormalization improves the final convergence of both solutions.
|
| 350 |
+
|
| 351 |
+
# 4.4.2. Weight decay
|
| 352 |
+
|
| 353 |
+
In Solution 1, we introduce a weight decay term when updating the unconstrained softmax logits to mitigate potential non-convergence issues that arise from instantaneous gradients [75]. To evaluate the effect of weight decay, we perform a series of experiments, varying the decay coefficient $\gamma$ across values $\{0.01, 0.015, 0.005, 0.001, 0.0005, 0\}$ , as shown in Fig. 3b. Notably, setting $\gamma = 0$ (i.e., no weight decay) results in non-convergence issues that precluded plotting the results. Among the other tested values, $\gamma = 0.001$ yields the best results, and we thus adopt $\gamma = 0.001$ .
|
| 354 |
+
|
| 355 |
+
# 4.4.3. Solutions cross-validation
|
| 356 |
+
|
| 357 |
+
As discussed, Solution 1 is a coarse-to-fine gradient descent method along standard R-D optimization trajectories that iteratively refine the gradient weights $w_{i,t}$ , whereas Solution 2 is a constrained QP approach that offers an analytically precise solution. Solution 2 is more time-intensive. Intuitively, we apply Solution 1 for training models from scratch and Solution 2 for fine-tuning pre-trained models. To validate this strategy, we reverse these roles: using Solution 1 to fine-tune pre-trained models and Solution 2 to train models from scratch. The results, shown in Fig. 3c, reveal that Solution 1 (fine-tuning) performs worse than Solution 2 (fine-tuning), while Solution 1 (from scratch) achieves comparable performance to Solution 2 (from scratch) but requires less training time. This outcome supports our hypothesis: Solution 1 is well-suited for training from scratch, where it can operate in a coarse-to-fine manner along the optimization trajectory, while Solution 2's precision and
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
(a) Kodak
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
(b) Tecnick $1200 \times 1200$
|
| 364 |
+
|
| 365 |
+

|
| 366 |
+
(c) CLIC 2022
|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
(a) Renormalization
|
| 370 |
+
|
| 371 |
+

|
| 372 |
+
Figure 2. R-D curves of various methods. Please zoom in for more details.
|
| 373 |
+
(b) Weight decay
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
(c) Cross validation
|
| 377 |
+
Figure 3. Ablation experiments on proposed methods. M&S Hyperprior model, $\lambda = 0.013$ . Kodak dataset.
|
| 378 |
+
|
| 379 |
+
time-consuming make it more suitable for fine-tuning. Additionally, applying Solution 2 to further fine-tune Solution 1 models only yields marginal improvements compared to fine-tuning standard models, making cascaded usage of both solutions unnecessary.
|
| 380 |
+
|
| 381 |
+
# 5. Conclusion
|
| 382 |
+
|
| 383 |
+
In this paper, we tackle the imbalance update in the R-D optimization of LICs by framing it as a MOO problem. Viewing R-D optimization as a multi-objective task, we propose two solutions to address the imbalance caused by gradient divergence. Solution 1 uses a coarse-to-fine approach along the standard R-D optimization trajectory, employing gradient descent to refine the gradient weights iteratively. This method is well-suited for training LIC models from scratch, as it progressively balances rate and distortion objectives throughout the whole training process. Solution 2 formulates the balanced R-D optimization as a constrained-QP
|
| 384 |
+
|
| 385 |
+
problem, providing a precise solution by solving the KKT conditions. Although Solution 2 requires more computation, it offers an accurate adjustment of gradient weights, making it ideal for fine-tuning pre-trained models. Extensive experiments validate the effectiveness of both solutions, showing consistent R-D performance improvements over standard training schemes across various LIC models and datasets with acceptable additional training costs.
|
| 386 |
+
|
| 387 |
+
Limitations and Future Work. Our approach balances the R-D optimization of LICs by introducing an additional subproblem [42, 58], which moderately increases training complexity. Future work could focus on designing more efficient algorithms to mitigate this added computational cost. Recent research indicates that Tchebycheff Scalarization [39, 40] is a promising avenue, offering favorable theoretical properties along with low computational complexity. Additionally, we employ the softmax function to constrain weights within the probability simplex; however, projection-based methods could be also explored [33, 64].
|
| 388 |
+
|
| 389 |
+
# References
|
| 390 |
+
|
| 391 |
+
[1] Alexander Alemi, Ben Poole, Ian Fischer, Joshua Dillon, Rif A Saurous, and Kevin Murphy. Fixing a broken elbo. Proceedings of the International Conference on Machine Learning, pages 159-168, 2018. 1
|
| 392 |
+
[2] Muhammad Salman Ali, Yeongwoong Kim, Maryam Qamar, Sung-Chang Lim, Donghyun Kim, Chaoning Zhang, Sung-Ho Bae, and Hui Yong Kim. Towards efficient image compression without autoregressive models. Proceedings of the Advances in Neural Information Processing Systems, 36: 7392-7404, 2023. 2
|
| 393 |
+
[3] Nicola Asuni, Andrea Giachetti, et al. Testimages: a largescale archive for testing visual devices and basic image processing algorithms. STAG, pages 63-70, 2014. 6
|
| 394 |
+
[4] Johannes Ballé, Philip A Chou, David Minnen, Saurabh Singh, Nick Johnston, Eirikur Agustsson, Sung Jin Hwang, and George Toderici. Nonlinear transform coding. IEEE Journal of Selected Topics in Signal Processing, 15(2):339-353, 2020. 1, 2
|
| 395 |
+
[5] Johannes Balle, David Minnen, Saurabh Singh, Sung Jin Hwang, and Nick Johnston. Variational image compression with a scale hyperprior. Proceedings of the International Conference on Learning Representations, 2018. 1, 2
|
| 396 |
+
[6] Jean Bégaint, Fabien Racapé, Simon Feltman, and Akshay Pushparaja. Compressai: a python library and evaluation platform for end-to-end compression research, 2020. 6
|
| 397 |
+
[7] G. Bjøntegaard. Calculation of average PSNR differences between rd-curves. ITU-T SG 16/Q6, 13th VCEG Meeting, 2001. 6
|
| 398 |
+
[8] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. 4, 5
|
| 399 |
+
[9] Shilv Cai, Liquen Chen, Zhijun Zhang, Xiangyun Zhao, Jiuhuan Zhou, Yuxin Peng, Luxin Yan, Sheng Zhong, and Xu Zou. I2c: Invertible continuous codec for high-fidelity variable-rate image compression. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(6):4262-4279, 2024. 2
|
| 400 |
+
[10] Lisha Chen, Heshan Fernando, Yiming Ying, and Tianyi Chen. Three-way trade-off in multi-objective learning: Optimization, generalization and conflict-avoidance. Proceedings of the Advances in Neural Information Processing Systems, 36, 2023. 3
|
| 401 |
+
[11] Zhengxue Cheng, Heming Sun, Masaru Takeuchi, and Jiro Katto. Learned image compression with discretized gaussian mixture likelihoods and attention modules. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7939-7948, 2020. 2
|
| 402 |
+
[12] CLIC. Challenge on learned image compression (CLIC) 2022 workshop. https://clic.compression.cc/2022, 2022.6
|
| 403 |
+
[13] Jean-Antoine Désideri. Multiple-gradient descent algorithm (mgda) for multiobjective optimization. Comptes Rendus Mathematique, 350(5-6):313-318, 2012. 1
|
| 404 |
+
[14] Jean-Antoine Désideri. Multiple-gradient descent algorithm for multiobjective optimization. European Congress on Computational Methods in Applied Sciences and Engineering, 2012. 3
|
| 405 |
+
|
| 406 |
+
[15] Zhihao Duan, Ming Lu, Jack Ma, Yuning Huang, Zhan Ma, and Fengqing Zhu. Qarv: Quantization-aware resnet vae for lossy image compression. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023. 2
|
| 407 |
+
[16] Runsen Feng, Zongyu Guo, Weiping Li, and Zhibo Chen. Nvtc: Nonlinear vector transform coding. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6101-6110, 2023. 2
|
| 408 |
+
[17] Heshan Fernando, Han Shen, Miao Liu, Subhajit Chaudhury, Keerthiram Murugesan, and Tianyi Chen. Mitigating gradient bias in multi-objective learning: A provably convergent approach. Proceedings of the International Conference on Learning Representations, 2023. 3
|
| 409 |
+
[18] Jörg Fliege and Benar Fux Svaiter. Steepest descent methods for multicriteria optimization. Mathematical Methods of Operations Research, 51:479-494, 2000. 3
|
| 410 |
+
[19] Jörg Fliege, A Ismael F Vaz, and Luís Nunes Vicente. Complexity of gradient descent for multiobjective optimization. Optimization Methods and Software, 34(5):949-959, 2019. 3
|
| 411 |
+
[20] Rich Franzen. Kodak lossless true color image suite. https://r0k.us/graphics/kodak, 1999. 6
|
| 412 |
+
[21] Haisheng Fu, Feng Liang, Jie Liang, Yongqiang Wang, Zhenman Fang, Guohe Zhang, and Jingning Han. Fast and high-performance learned image compression with improved checkerboard context model, deformable residual module, and knowledge distillation. IEEE Transactions on Image Processing, 2024. 2
|
| 413 |
+
[22] Haisheng Fu, Jie Liang, Zhenman Fang, Jingning Han, Feng Liang, and Guohe Zhang. Weconvene: Learned image compression with wavelet-domain convolution and entropy model, 2024. 2
|
| 414 |
+
[23] Yixin Gao, Runsen Feng, Zongyu Guo, and Zhibo Chen. Exploring the rate-distortion-complexity optimization in neural image compression. Journal of Visual Communication and Image Representation, page 104294, 2024. 2
|
| 415 |
+
[24] Wang Guo-Hua, Jiahao Li, Bin Li, and Yan Lu. EVC: Towards real-time neural image compression with mask decay. Proceedings of the International Conference on Learning Representations, 2023. 2
|
| 416 |
+
[25] Minghao Han, Shiyin Jiang, Shengxi Li, Xin Deng, Mai Xu, Ce Zhu, and Shuhang Gu. Causal context adjustment loss for learned image compression, 2024. 2
|
| 417 |
+
[26] Dailan He, Yaoyan Zheng, Baocheng Sun, Yan Wang, and Hongwei Qin. Checkerboard context model for efficient learned image compression. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14771-14780, 2021. 2
|
| 418 |
+
[27] Dailan He, Ziming Yang, Weikun Peng, Rui Ma, Hongwei Qin, and Yan Wang. ELIC: Efficient learned image compression with unevenly grouped space-channel contextual adaptive coding. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5718-5727, 2022. 1, 2, 6, 7
|
| 419 |
+
[28] Yueyu Hu, Wenhan Yang, and Jiaying Liu. Coarse-to-fine hyper-prior modeling for learned image compression. Proceedings of the AAAI Conference on Artificial Intelligence, 34(07):11013-11020, 2020. 2
|
| 420 |
+
|
| 421 |
+
[29] Yuzheng Hu, Ruicheng Xian, Qilong Wu, Qiuling Fan, Lang Yin, and Han Zhao. Revisiting scalarization in multi-task learning: A theoretical perspective. Proceedings of the Advances in Neural Information Processing Systems, 36, 2024. 3
|
| 422 |
+
[30] Wei Jiang, Jiayu Yang, Yongqi Zhai, Peirong Ning, Feng Gao, and Ronggang Wang. Mlic: Multi-reference entropy model for learned image compression. Proceedings of the ACM International Conference on Multimedia, pages 7618-7627, 2023. 2
|
| 423 |
+
[31] Fatih Kamisli, Fabien Racapé, and Hyomin Choi. Variable-rate learned image compression with multi-objective optimization and quantization-reconstruction offsets. Proceedings of the Data Compression Conference, 2024. 2
|
| 424 |
+
[32] A Burakhan Koyuncu, Han Gao, Atanas Boev, Georgii Gaikov, Elena Alshina, and Eckehard Steinbach. Contextformer: A transformer with spatio-channel attention for context modeling in learned image compression. Proceedings of the European Conference on Computer Vision, pages 447-463, 2022. 2
|
| 425 |
+
[33] Walid Krichene, Syrine Krichene, and Alexandre Bayen. Efficient bregman projections onto the simplex. Proceedings of the IEEE Conference on Decision and Control, pages 3291-3298, 2015. 8
|
| 426 |
+
[34] Didier Le Gall. Mpeg: A video compression standard for multimedia applications. Communications of the ACM, 34 (4):46-58, 1991. 1
|
| 427 |
+
[35] Bingdong Li, Jinlong Li, Ke Tang, and Xin Yao. Many-objective evolutionary algorithms: A survey. ACM Computing Surveys, 48(1):1-35, 2015. 3
|
| 428 |
+
[36] Han Li, Shaohui Li, Wenrui Dai, Chenglin Li, Junni Zou, and Hongkai Xiong. Frequency-aware transformer for learned image compression. Proceedings of the International Conference on Learning Representations, 2024. 1, 2
|
| 429 |
+
[37] Tianyi Lin, Chi Jin, and Michael I Jordan. Near-optimal algorithms for minimax optimization. Proceedings of the Conference on Learning Theory, pages 2738-2779, 2020. 4
|
| 430 |
+
[38] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft COCO: Common Objects in Context. Proceedings of the European Conference on Computer Vision, pages 740-755, 2014. 6
|
| 431 |
+
[39] Xi Lin, Yilu Liu, Xiaoyuan Zhang, Fei Liu, Zhenkun Wang, and Qingfu Zhang. Few for many: Tchebycheff set scalarization for many-objective optimization, 2024. 8
|
| 432 |
+
[40] Xi Lin, Xiaoyuan Zhang, Zhiyuan Yang, Fei Liu, Zhenkun Wang, and Qingfu Zhang. Smooth tchebycheff scalarization for multi-objective optimization. Proceedings of the International Conference on Machine Learning, 235:30479-30509, 2024. 8
|
| 433 |
+
[41] Bo Liu, Xingchao Liu, Xiaojie Jin, Peter Stone, and Qiang Liu. Conflict-averse gradient descent for multi-task learning. Advances in Neural Information Processing Systems, 34:18878-18890, 2021. 3
|
| 434 |
+
[42] Bo Liu, Yihao Feng, Peter Stone, and Qiang Liu. FAMO: Fast adaptive multitask optimization. Proceedings of the Advances in Neural Information Processing Systems, 36, 2023. 1, 3, 4, 5, 8
|
| 435 |
+
|
| 436 |
+
[43] Jinming Liu, Heming Sun, and Jiro Katto. Learned image compression with mixed transformer-cnn architectures. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14388-14397, 2023. 1, 2, 6, 7
|
| 437 |
+
[44] Changyue Ma, Zhao Wang, Ruling Liao, and Yan Ye. A cross channel context model for latents in deep image compression, 2021. 2
|
| 438 |
+
[45] Haichuan Ma, Dong Liu, Ning Yan, Houqiang Li, and Feng Wu. End-to-end optimized versatile image compression with wavelet-like transform. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(3):1247-1263, 2020. 2
|
| 439 |
+
[46] Olvi L Mangasarian. Nonlinear programming. SIAM, 1994. 3, 5
|
| 440 |
+
[47] Kaisa Miettinen. Nonlinear multiobjective optimization. Springer Science & Business Media, 1999. 1, 3
|
| 441 |
+
[48] David Minnen and Nick Johnston. Advancing the rate-distortion-computation frontier for neural image compression. Proceedings of the IEEE International Conference on Image Processing, pages 2940-2944, 2023. 2
|
| 442 |
+
[49] David Minnen and Saurabh Singh. Channel-wise autoregressive entropy models for learned image compression. Proceedings of the IEEE International Conference on Image Processing, pages 3339-3343, 2020. 2, 6
|
| 443 |
+
[50] David Minnen, Johannes Balle, and George D Toderici. Joint autoregressive and hierarchical priors for learned image compression. Proceedings of the Advances in Neural Information Processing Systems, 31, 2018. 2, 6, 7
|
| 444 |
+
[51] Alistair Moffat. Huffman coding. ACM Computing Surveys (CSUR), 52(4):1-35, 2019. 3
|
| 445 |
+
[52] Michinari Momma, Chaosheng Dong, and Jia Liu. A multi-objective/multi-task learning framework induced by pareto stationarity. Proceedings of the International Conference on Machine Learning, pages 15895-15907, 2022. 3
|
| 446 |
+
[53] Aviv Navon, Aviv Shamsian, Idan Achituve, Haggai Maron, Kenji Kawaguchi, Gal Chechik, and Ethan Fetaya. Multitask learning as a bargaining game. Proceedings of the International Conference on Machine Learning, 162:16428-16446, 2022. 1, 3
|
| 447 |
+
[54] Jorge Nocedal and Stephen J Wright. Numerical optimization. Springer, 1999. 5
|
| 448 |
+
[55] Linfeng Qi, Zhaoyang Jia, Jiahao Li, Bin Li, Houqiang Li, and Yan Lu. Long-term temporal context gathering for neural video compression. Proceedings of the European Conference on Computer Vision, 2024. 2
|
| 449 |
+
[56] Yichen Qian, Xiuyu Sun, Ming Lin, Zhiyu Tan, and Rong Jin. Entroformer: A transformer-based entropy model for learned image compression. International Conference on Learning Representations, 2022. 2
|
| 450 |
+
[57] Stefan Schäffler, Reinhart Schultz, and Klaus Weinzierl. Stochastic method for the solution of unconstrained vector optimization problems. Journal of Optimization Theory and Applications, 114:209-222, 2002. 3
|
| 451 |
+
[58] Ozan Sener and Vladlen Koltun. Multi-task learning as multi-objective optimization. Proceedings of the Advances in Neural Information Processing Systems, 31, 2018. 1, 3, 4, 5, 8
|
| 452 |
+
|
| 453 |
+
[59] Dmitry Senushkin, Nikolay Patakin, Arseny Kuznetsov, and Anton Konushin. Independent component alignment for multi-task learning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 20083-20093, 2023. 3
|
| 454 |
+
[60] GJ Sullivan. Rate-distortion optimization for video compression. IEEE Signal Processing Magazine, 84, 1998. 1
|
| 455 |
+
[61] Gary J Sullivan, Jens-Rainer Ohm, Woo-Jin Han, and Thomas Wiegand. Overview of the high efficiency video coding (HEVC) standard. IEEE Transactions on Circuits and Systems for Video Technology, 22(12):1649-1668, 2012. 1
|
| 456 |
+
[62] Lvfang Tao, Wei Gao, Ge Li, and Chenhao Zhang. Adanic: Towards practical neural image compression via dynamic transform routing. Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 16879-16888, 2023. 2
|
| 457 |
+
[63] Gregory K Wallace. TheJPEG still picture compression standard.IEEE Transactions on Consumer Electronics, 38(1): xviii-xxxiv, 1992. 1
|
| 458 |
+
[64] Weiran Wang and Miguel A Carreira-Perpinan. Projection onto the probability simplex: An efficient algorithm with a simple proof, and an application, 2013. 8
|
| 459 |
+
[65] Ian H Witten, Radford M Neal, and John G Cleary. Arithmetic coding for data compression. Communications of the ACM, 30(6):520-540, 1987. 3
|
| 460 |
+
[66] Peiyao Xiao, Hao Ban, and Kaiyi Ji. Direction-oriented multi-objective learning: Simple and provable stochastic algorithms. Proceedings of the Advances in Neural Information Processing Systems, 36, 2023. 3
|
| 461 |
+
[67] Yueqi Xie, Ka Leong Cheng, and Qifeng Chen. Enhanced invertible encoding for learned image compression. Proceedings of the ACM International Conference on Multimedia, pages 162-170, 2021. 2
|
| 462 |
+
[68] Yibo Yang and Stephan Mandt. Computationally-efficient neural image compression with shallow decoders. Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 530-540, 2023. 2
|
| 463 |
+
[69] Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsea Finn. Gradient surgery for multi-task learning. Proceedings of the Advances in Neural Information Processing Systems, 33:5824-5836, 2020. 1, 3
|
| 464 |
+
[70] Xi Zhang and Xiaolin Wu. Lvqac: Lattice vector quantization coupled with spatially adaptive companding for efficient learned image compression. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10239-10248, 2023. 2
|
| 465 |
+
[71] Yichi Zhang, Zhihao Duan, Yuning Huang, and Fengqing Zhu. Theoretical bound-guided hierarchical vae for neural image codes. Proceedings of the IEEE International Conference on Multimedia and Expo, 2024. 2
|
| 466 |
+
[72] Yichi Zhang, Zhihao Duan, Ming Lu, Dandan Ding, Fengqing Zhu, and Zhan Ma. Another way to the top: Exploit contextual clustering in learned image coding. Proceedings of the AAAI Conference on Artificial Intelligence, 38(8): 9377-9386, 2024. 2
|
| 467 |
+
[73] Yichi Zhang, Zhihao Duan, and Fengqing Zhu. On efficient neural network architectures for image compression.
|
| 468 |
+
|
| 469 |
+
Proceedings of the IEEE International Conference on Image Processing, 2024. 2
|
| 470 |
+
[74] Aimin Zhou, Bo-Yang Qu, Hui Li, Shi-Zheng Zhao, Ponnuthurai Nagaratnam Suganthan, and Qingfu Zhang. Multi-objective evolutionary algorithms: A survey of the state of the art. Swarm and Evolutionary Computation, 1(1):32-49, 2011. 3
|
| 471 |
+
[75] Shiji Zhou, Wenpeng Zhang, Jiyan Jiang, Wenliang Zhong, Jinjie Gu, and Wenwu Zhu. On the convergence of stochastic multi-objective gradient manipulation and beyond. Proceedings of the Advances in Neural Information Processing Systems, 35:38103-38115, 2022. 3, 5, 7
|
| 472 |
+
[76] Xiaosu Zhu, Jingkuan Song, Lianli Gao, Feng Zheng, and Heng Tao Shen. Unified multivariate gaussian mixture for efficient neural image compression. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 17612-17621, 2022. 2
|
| 473 |
+
[77] Yinhao Zhu, Yang Yang, and Taco Cohen. Transformer-based transform coding. Proceedings of the International Conference on Learning Representations, 2022. 2
|
| 474 |
+
[78] Renjie Zou, Chunfeng Song, and Zhaoxiang Zhang. The devil is in the details: Window-based attention for image compression. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 17492-17501, 2022. 2
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72390a02fc1bc40d9e4196018a943c5308288fbdfe9488ef1ae6c262e1a37159
|
| 3 |
+
size 524296
|
CVPR/2025/Balanced Rate-Distortion Optimization in Learned Image Compression/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da40458bb581aea9deae61d5dce89377559ce051cabd7051acdf5900cb2f0fa7
|
| 3 |
+
size 559104
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc4f3b6c70319896001c3622bdfe82a337fb3e8f39f47883a3cd4b55fc631536
|
| 3 |
+
size 80205
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22edea42e4aad916b0e30a7ec67aad1ad3476b2626b07dd2b0e270dc138f590f
|
| 3 |
+
size 101565
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/a6c860ea-d21f-40a6-b40b-37b30585cb75_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f50233f5eef1e431830f5576b93ba965002230dc3b382cfba739eea5788a12f5
|
| 3 |
+
size 2072497
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/full.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration
|
| 2 |
+
|
| 3 |
+
Jiani Ni $^{1}$ He Zhao $^{2}$ Jintong Gao $^{1}$ Dandan Guo $^{*1}$ Hongyuan Zha $^{3}$ $^{1}$ School of Artificial Intelligence, Jilin University
|
| 4 |
+
$^{2}$ CSIRO's Data61
|
| 5 |
+
$^{3}$ The Chinese University of Hong Kong, Shenzhen
|
| 6 |
+
|
| 7 |
+
{nijn23,gaojt20}@mails.jlu.edu.cn guodandan@jlu.edu.cn he.zhao@ieee.org
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
In recent years, deep neural networks (DNNs) have demonstrated state-of-the-art performance across various domains. However, despite their success, they often face calibration issues, particularly in safety-critical applications such as autonomous driving and healthcare, where unreliable predictions can have serious consequences. Recent research has started to improve model calibration from the view of the classifier. However, the exploration of designing the classifier to solve the model calibration problem is insufficient. Let alone most of the existing methods ignore the calibration errors arising from underconfidence. In this work, we propose a novel method by Balancing learnable and ETF classifiers to solve the overconfidence or underconfidence problem for model CALibration named BalCAL. By introducing a confidence-tunable module and a dynamic adjustment method, we ensure better alignment between model confidence and its true accuracy. Extensive experimental validation shows that ours significantly improves model calibration performance while maintaining high predictive accuracy, outperforming existing techniques. This provides a novel solution to the calibration challenges commonly encountered in deep learning. Our code is available at BalCAL.
|
| 12 |
+
|
| 13 |
+
# 1. Introduction
|
| 14 |
+
|
| 15 |
+
Recently, deep neural networks (DNNs) have achieved remarkable success across various domains, including image classification [8, 14, 51], object detection [15, 35], and natural language processing [7, 43]. Despite their impressive performance, DNNs often exhibit calibration error, characterized by overconfidence, where the predicted probabilities exceed the accuracy of their predictions [11]. This calibration error poses serious challenges in real-world risk-sensitive applications, including autonomous driving [4, 12], healthcare diagnostics [1, 36] and predicting credit risk [6] where precise confidence estimates are crucial.
|
| 16 |
+
|
| 17 |
+
Consequently, to ensure that model predictions align
|
| 18 |
+
|
| 19 |
+
more closely with their predicted accuracy, improving the confidence calibration of DNNs has become a pivotal area of research. Calibration approaches in DNNs are generally categorized into post-hoc and training-time methods. Post-hoc methods, such as Temperature Scaling (TS) [11], rescale output probabilities after training without modifying internal features. In contrast, training-time methods like label smoothing (LS) [37], focal loss (FL) [23], and Mixup [52] integrate calibration into the training process. Here, we focus on training-time methods.
|
| 20 |
+
|
| 21 |
+
Recent training-time methods related to classifiers have provided valuable insights. Such as the approach by [17], aims to improve calibration by decoupling feature extraction from classification. Although this separation enhances calibration, it may reduce model flexibility and limit generalization to out-of-distribution (OOD) data, highlighting a critical trade-off between calibration and adaptability. Additionally, [44] found that weight decay regularization can negatively affect the model calibratability, limiting calibration improvements achievable through post-hoc methods. They proposed the weak classifier hypothesis, suggesting that a weakly trained classification head aids the representation module in generating more calibratable features. Despite their effectiveness, it is questionable whether the exploration of designing the classifier to solve the model calibration problem is sufficient. Besides, most calibration methods primarily address overconfidence and a few researchers address calibration errors stemming from underconfidence in model predictions [45].
|
| 22 |
+
|
| 23 |
+
In this work, we propose a novel method by fusing two classifiers, denoted as BalCAL, which Balances two classifiers to solve the overconfidence or underconfidence problem for model CALibration. In addition to the learnable standard classifier, we here consider another fixed Simplex Equiangular Tight Frame (ETF) classifier from the Neural Collapse (NC) phenomenon [31]. NC has emerged as a significant phenomenon in deep learning, where as training progresses the features of the final layer and the classifiers tend to converge into highly structured and symmetric patterns and classifier weights converge to a Simplex ETF structure. Recent studies [33, 48] have demon
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
(a)
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
(b)
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
(c)
|
| 33 |
+
Figure 1. The motivation of BalCAL. Calibration error arises from the discrepancy between model confidence and actual accuracy, often manifesting as overconfidence (a). After incorporating Mixup, underconfidence may also occur (a). We propose a method to dynamically adjust confidence, addressing both issues simultaneously (b). Calibration performance is shown in (c).
|
| 34 |
+
|
| 35 |
+
strated that Neural Collapse-inspired methods, including fixed Simplex ETF classifiers, can enhance model generalization and tackle challenges such as imbalanced learning. However, their potential for enhancing model calibration has yet to be fully explored.
|
| 36 |
+
|
| 37 |
+
In this work, we find that adjusting the scaling factor of the fixed ETF classifier can effectively modulate the output confidence without affecting the accuracy. That is to say, we can view the fixed ETF classifier with the tunable scaling factor as the auxiliary classifier to compensate for the predictions, produced by the commonly used model including a feature extractor and a standard classifier. Specifically, during the training process, we additionally introduce a confidence-tunable module after the feature extractor, which consists of an adapter followed by the fixed Simplex ETF classifier. Considering the learnable classifier in DNNs is usually susceptible to calibration error, we design a dynamic adjustment mechanism based on the relationship between model accuracy and confidence evaluated by the training dataset to balance the standard classifier and ETF classifier. By benefiting from the combination of two classifiers, we can correct not only overconfidence but also underconfidence. Besides, ours can be easily integrated into most previous training-time methods, offering flexibility in deployment. Our key contributions are as follows:
|
| 38 |
+
|
| 39 |
+
- We provide a novel view that ETF classifier can be used to solve the model calibration by tuning its scaling factor.
|
| 40 |
+
- We introduce a confidence-tunable module built on the ETF classifier and design a dynamic adjustment mechanism to balance the two classifiers, denoted as BalCAL, solving the overconfidence or underconfidence problem.
|
| 41 |
+
- Extensive experiments demonstrate that ours achieves superior performance while achieving robustness under corruption in various settings.
|
| 42 |
+
|
| 43 |
+
# 2. Related work
|
| 44 |
+
|
| 45 |
+
Confidence calibration. Calibration aims to adjust predicted confidence to reflect true accuracy [11], primarily ad
|
| 46 |
+
|
| 47 |
+
dressing the prevalent issue of overconfidence in deep learning models, as well as the less common but important issue of underconfidence. There are two main strategies: post-hoc and training-time methods. Temperature Scaling (TS) [11] is a commonly employed post-hoc calibration method that adjusts the temperature of the softmax layer after training to refine the model confidence. While TS is an effective approach, [30] demonstrated its limitations under distribution shifts. Training-time approaches consider calibration directly during the learning process, where label smoothing (LS) [37], focal loss (FL) [23], and Mixup [52] were initially developed to improve generalization while simultaneously enhancing calibration. Some training-time methods [5, 10, 24, 27, 34, 38, 39, 41] apply regularization to output probabilities. In this work, we primarily focus on training-time methods from the view of the classifier.
|
| 48 |
+
|
| 49 |
+
A related work is proposed by [17], which decouples feature extraction from classification to improve calibration, including Two-Stage Training (TST) and Variational Two-Stage Training (V-TST). However, this method is limited in out-of-distribution samples, potentially causing suboptimal performance on tasks requiring broader generalization. Recently, [44] observed that some training-time calibration methods may compromise the model calibratability, i.e., the ability to be further improved through post-hoc calibration. They introduced a weak classifier hypothesis and proposed Progressive Layer-Peeled (PLP) training by incrementally freezing the parameters of the upper layers to improve calibratability, thereby enhancing the performance of the model when subjected to post-hoc calibration. The key difference between ours and the above methods is that we introduce a fixed ETF classifier to construct a confidence-tunable module, adaptively balancing the confidence level of the learnable classifier. It also ensures robust calibration and generalization across varying data distributions.
|
| 50 |
+
|
| 51 |
+
Most training-time methods focus on mitigating overconfidence but are less effective at addressing underconfidence. For instance, Mixup improves model calibration and accuracy but is sensitive to interpolation levels, and higher
|
| 52 |
+
|
| 53 |
+
levels can lead to underconfidence. The method proposed by [45] can alleviate this issue but is specific to Mixup and not generalizable. In contrast, our method effectively handles overconfidence and underconfidence, offering a general solution for model calibration. Additionally, it can be easily integrated with most of the existing calibration methods to enhance calibration performance without sacrificing accuracy, providing a flexible deployment.
|
| 54 |
+
|
| 55 |
+
Neural collapse. Neural collapse is a phenomenon observed during the final stage of training on balanced datasets. In this stage, features from the last layer collapse into class means, and classifier weights converge to a Simplex Equiangular Tight Frame (ETF) structure [31]. This phenomenon has sparked extensive theoretical exploration [18, 25, 42, 47, 49]. More recent works have leveraged Neural Collapse-inspired methods to address issues with imbalanced training [9, 40, 46, 48], as well as in incremental learning [50] and transfer learning [22].
|
| 56 |
+
|
| 57 |
+
To our knowledge, this is the first study incorporating the ETF classifier in the NC phenomenon into the model calibration problem. By recognizing that the ETF's scaling factor directly influences predicted confidence levels, we propose a confidence-tunable module by introducing the fixed ETF classifier. This module modifies the scaling factor of the Simplex ETF, enabling self-regulation based on the model's confidence outputs. This approach enhances the model's calibration performance by correcting overconfidence or underconfidence in the model's outputs.
|
| 58 |
+
|
| 59 |
+
# 3. Background
|
| 60 |
+
|
| 61 |
+
# 3.1. Network calibration
|
| 62 |
+
|
| 63 |
+
Consider a dataset $D = \{(x_{i},y_{i})\}_{i = 1}^{N}$ , where $x_{i}\in \mathcal{X}$ is input sample, $y_{i}\in \mathcal{V}$ is the corresponding label consisting of $K$ classes, $N$ denotes the total number of samples and $n_k$ is the number of samples in the $k$ -th class with $N = \sum_{k = 1}^{K}n_{k}$ . We model the deep learning system as consisting of two components: a feature extractor $f:\mathcal{X}\to \mathbb{R}^d$ with parameters $\theta$ , and a linear classifier $\mathbf{W} = \{\pmb {w}_k\}_{k = 1}^K\in \mathbb{R}^{d\times K}$ . The feature extractor generates a $d$ -dimensional feature vector $\pmb {z}_i = f(x_i;\pmb {\theta})\in \mathbb{R}^d$ , which is also referred to as the last-layer feature or activation. These features are passed to the linear classifier, which outputs the logits vector $\pmb{l}_i = \pmb {z}_i\mathbf{W}\in \mathbb{R}^K$ . Now the probability $p_{i,k}$ that sample $x_{i}$ belongs to class $k$ is computed using the softmax function, denoted as $p_{i,k} = \frac{\exp(l_{i,k})}{\sum_{j = 1}^{K}\exp(l_{i,j})}$ . The predicted label and its associated confidence are defined as $\hat{y}_i = \arg \max_k p_{i,k}$ and $\hat{p}_i = \max_k p_{i,k}$ .
|
| 64 |
+
|
| 65 |
+
The parameters $\{\theta, \mathbf{W}\}$ are usually trained on $D$ using standard cross-entropy loss, which tends to be overconfident [11]. Therefore, it results in a discrepancy between
|
| 66 |
+
|
| 67 |
+
predicted confidence and actual accuracy, referred to as calibration error. Additionally, [41] observes that intensive interpolation in mixup training can lead to underconfidence, also leading to its calibration error. Calibration methods aim to align predicted confidence with actual accuracy, ensuring that $\hat{p}_i = P(\hat{y}_i = y_i\mid \hat{p}_i)$ , where $\hat{p}_i$ reflects the true probability of a correct prediction.
|
| 68 |
+
|
| 69 |
+
# 3.2. Neural collapse
|
| 70 |
+
|
| 71 |
+
The phenomenon of neural collapse, described by [31], occurs at the final stage of training when both the class means and the linear classifier vectors converge to the vertices of a Simplex ETF, as defined below.
|
| 72 |
+
|
| 73 |
+
Definition 1 (The general Simplex ETF): Considering the $K$ -classification problem, a general Simplex ETF is defined as a set of vectors in $\mathbb{R}^K$ given by the columns of the matrix $\mathbf{M} \in \mathbb{R}^{d \times K}$ :
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\mathbf {M} = \beta \sqrt {\frac {K}{K - 1}} \mathbf {U} \left(\mathbf {I} - \frac {1}{K} \mathbf {1} _ {K} \mathbf {1} _ {K} ^ {\mathrm {T}}\right), \tag {1}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\beta \in \mathbb{R}^{+}$ is a scaling factor, $\mathbf{U} \in \mathbb{R}^{d \times K}$ is a partial orthogonal matrix (i.e., $\mathbf{U}^T\mathbf{U} = I$ ) with $d \geq K$ , $\mathbf{I} \in \mathbb{R}^{K \times K}$ is the identity matrix, and $\mathbf{1}_K \in \mathbb{R}^K$ is an all-ones vector. Each vector in a Simplex ETF shares an identical L2 norm and maintains the same angle between any pair of vectors.
|
| 80 |
+
|
| 81 |
+
Statistics For a given classification task, the class mean $\boldsymbol{z}_k$ is defined as $\boldsymbol{z}_k = \frac{1}{n_k} \sum_{i=1}^{n_k} z_{i,k}$ , where $z_{i,k}$ denotes the feature vector of the $i$ -th sample from the $k$ -th class. The global mean $\boldsymbol{z}_G$ is given by $\boldsymbol{z}_G = \frac{1}{K} \sum_{k=1}^{K} \boldsymbol{z}_k$ . The within-class covariance matrix $\Sigma_{\mathbf{W}}$ quantifies the variance of feature vectors within each class, measured as the dispersion around their mean. It is expressed as $\Sigma_{\mathbf{W}} = \frac{1}{K} \sum_{k=1}^{K} \sum_{i=1}^{n_k} \frac{1}{n_k} (z_{i,k} - z_k)(z_{i,k} - z_k)^\top$ . The class mean is first centered by subtracting the global mean and then normalized by its L2 norm, resulting in $\tilde{\boldsymbol{z}}_k = \frac{\boldsymbol{z}_k - \boldsymbol{z}_G}{\|\boldsymbol{z}_k - \boldsymbol{z}_G\|_2}$ . The matrix $\tilde{\mathbf{M}} = [\tilde{\boldsymbol{z}}_k] \in \mathbb{R}^{d \times K}$ is formed by stacking the normalized class means as columns. The symbol $\rightarrow$ indicates the convergence of the model as training progresses. During the final phase of training, there are four interdependent characteristics associated with the following conditions:
|
| 82 |
+
|
| 83 |
+
- (NC1) Variability Collapse: The within-class variability diminishes, with $\Sigma_{\mathbf{W}} \to 0$ .
|
| 84 |
+
- (NC2) Convergence to Simplex ETF: Class mean vectors converge to a Simplex ETF, with uniform $L2$ norms and pairwise angles, so that $\| \boldsymbol{z}_k - \boldsymbol{z}_G\| - \| \boldsymbol{z}_{k'} - \boldsymbol{z}_G\| \to 0$ and $\langle \tilde{\boldsymbol{z}}_k,\tilde{\boldsymbol{z}}_{k'}\rangle \rightarrow -\frac{1}{K - 1}$ for $k\neq k'$ .
|
| 85 |
+
- (NC3) Self-Duality: The classifier's weights align with the class means, expressed as $\frac{\mathbf{W}^{\top}}{\|\mathbf{W}\|_{F}} - \frac{\tilde{\mathbf{M}}}{\|\tilde{\mathbf{M}}\|_{F}} \to 0$ .
|
| 86 |
+
- (NC4) Nearest Class-Center (NCC): The classifier effectively predicts by assigning features to the nearest class mean, $\underset{k}{\operatorname{argmax}}\langle \boldsymbol{w}_k, f(x) \rangle \to \underset{k}{\operatorname{argmin}}\|f(x) - \boldsymbol{z}_k\|_2$ .
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 2. An illustration of the BalCAL. (a) The left side is an overview of ours, where the image is input into a shared encoder. The encoded feature is fed into the learnable classifier and the confidence-tunable module, respectively, where the latter aims to adjust its confidence to complement that of the former. A dynamic adjustment mechanism is proposed to balance the confidence between the two components. (b) The right side depicts the confidence-tunable module, consisting of an adapter and a fixed ETF classifier, which works in tandem with the learnable classifier to refine the overall model's confidence.
|
| 90 |
+
|
| 91 |
+
# 4. Methods
|
| 92 |
+
|
| 93 |
+
This work proposes BalCAL, a method with a confidence-tunable module to improve model calibration. This confidence-tunable module, based on a fixed Simplex ETF classifier, is detailed in Section 4.2, and a dynamic adjustment mechanism is described in Section 4.3. Besides, we also provide a detailed analysis of why the ETF classifier can help improve the model calibration in Section 4.1.
|
| 94 |
+
|
| 95 |
+
# 4.1. Why the Simplex ETF classifier can help model calibration?
|
| 96 |
+
|
| 97 |
+
The neural collapse phenomenon, observed during the later stages of training, reveals that the features of the final layer and the classifier weights often converge to a Simplex Equiangular Tight Frame (ETF) structure. This structure presents a compelling opportunity to improve model calibration. In this section, we provide a detailed analysis of the relationship between a Simplex ETF classifier and model calibration by presenting the following theorem.
|
| 98 |
+
|
| 99 |
+
Theorem 1 In the context of a Simplex ETF initialized as a fixed classifier, the output confidence $\hat{p}_i$ is related to both the scaling factor $\beta$ and the number of classes $K$ . Specifically, we have the following relationship:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\hat {p} _ {i} \propto \exp \left(\beta \sqrt {\frac {K}{K - 1}} \sigma_ {i}\right), \tag {2}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $\sigma_{i} = z\hat{m}_{i}$ denotes the score of sample about the $i$ -th class and $\hat{m}_i$ is the $i$ -th columns of the matrix $\mathbf{U}\left(\mathbf{I} - \frac{1}{K}\mathbf{1}_K\mathbf{1}_K^\top\right)$ . The difference between $\hat{p}_i$ and $p_j$ follows an exponential relationship, which is adjusted by the factor $\beta \sqrt{\frac{K}{K-1}}$ . This can be expressed as:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\frac {\hat {p} _ {i}}{p _ {j}} = \exp \left(\beta \sqrt {\frac {K}{K - 1}} \left(\sigma_ {i} - \sigma_ {j}\right)\right). \tag {3}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3. Impact of different $\beta$ on the output confidence of ETF classifiers on CIFAR-10.
|
| 113 |
+
|
| 114 |
+
This equation indicates that the probability ratio between classes $i$ and $j$ are governed by the difference in $(\sigma_{i} - \sigma_{j})$ , which is further scaled by the factor $\beta \sqrt{\frac{K}{K - 1}}$ . It is important to note that while the absolute values of $\hat{p}_i$ and $p_j$ may not be directly affected by this transformation, the relative relationship between these probabilities is indeed adjusted. This highlights the central role of the differences $\sigma_{i} - \sigma_{j}$ in determining the final output, while the scaling factor ensures that this relationship is calibrated appropriately according to the class structure.
|
| 115 |
+
|
| 116 |
+
We provide the complete proof of Theorem 1 in Appendix Appendix A. Theorem 1 shows that if the scaling factor $\beta$ increases, the model confidence also increases. This shows that $\beta$ is a parameter that controls the model confidence of ETF classifiers. Besides, we empirically show the impact of $\beta$ on the model confidence of an ETF classifier on CIFAR-10 in Fig. 3, which is in line with Theorem 1. Importantly, it can be observed that increasing $\beta$ leads to higher model confidence but has little impact on the model accuracy.
|
| 117 |
+
|
| 118 |
+
# 4.2. A confidence-tunable module
|
| 119 |
+
|
| 120 |
+
Based on previous analysis, we propose a confidence-tunable module built upon a fixed Simplex ETF classifier. This module complements the standard learnable classifier, aiming to regulate prediction confidence dynamically. The pipeline of our proposed approach is illustrated in Figure 2.
|
| 121 |
+
|
| 122 |
+
Specifically, an image $x$ can be fed in a shared encoder
|
| 123 |
+
|
| 124 |
+
to generate the feature vector $\mathbf{z} = f(x; \boldsymbol{\theta}) \in \mathbb{R}^d$ . Given the standard learnable classifier $\mathbf{W} \in \mathbb{R}^{d \times K}$ , we have the $K$ -dimensional probability vector, denoted as $p^{Sta} = \text{softmax}(z\mathbf{W})$ . While the standard classifier predictions often suffer from overconfidence or underconfidence, the fixed ETF classifier introduces a mechanism to balance this behavior. However, directly appending the fixed ETF classifier to the feature extractor could create conflicts due to discrepancies in feature distributions. Therefore, we design the confidence-tunable module by consisting of an adapter $A(\cdot) \in \mathbb{R}^d \rightarrow \mathbb{R}^d$ parameterized with $\phi$ and the fixed ETF classifier $\mathbf{M}$ defined in (1). This configuration ensures smooth integration of the two classifiers.
|
| 125 |
+
|
| 126 |
+
Taking the feature vector $z$ as the input, the confidence-tunable module produces the $K$ -dimensional probability vector $\pmb{p}^{ETF} = \mathrm{softmax}(\pmb{z}'\mathbf{M})$ where $\pmb{z}' = A(\pmb{z};\phi)$ . Therefore, for the same input, we have two probability vectors. Respectively, the two classification losses for all samples can be represented as follows:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\mathcal {L} _ {\mathrm {S t a}} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {k = 1} ^ {K} y _ {i} ^ {k} \log \left(p _ {i, k} ^ {S t a}\right), \tag {4}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\mathcal {L} _ {\mathrm {E T F}} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {k = 1} ^ {K} y _ {i} ^ {k} \log \left(p _ {i, k} ^ {E T F}\right). \tag {5}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
Now the parameters $\{\pmb {\theta},\mathbf{W},\phi \}$ can be optimized by minimizing the two losses combined with parameter $\gamma$ ..
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\min _ {\boldsymbol {\theta}, \mathbf {W}, \phi} \mathcal {L} _ {\text {t o t a l}} = \gamma \min _ {\boldsymbol {\theta}, \mathbf {W}} \mathcal {L} _ {\mathrm {S t a}} + (1 - \gamma) \min _ {\boldsymbol {\theta}, \phi} \mathcal {L} _ {\mathrm {E T F}}. \tag {6}
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
In our method, $\beta$ controls the confidence of the ETF classifier while $\gamma$ controls the calibration intensity of the ETF classifier. Empirically, we find that $\gamma$ has a more significant impact on the confidence of the combined classifier than $\beta$ . Moreover, we find that the calibration intensity needs to vary during the training process of the model as in the early stage of training, the model should focus more on improving its accuracy with less regularization on confidence while in the late stage, more calibration intensity may be needed. To dynamically control calibration intensity during training, we propose an adaptive mechanism detailed in Section 4.3. In terms of $\beta$ , we set $\beta = 1$ to the ETF classifier relatively underconfident for models prone to overconfidence (e.g., typical DNNs) and $\beta = K$ to enhance the ETF classifier's confidence for underconfident models (e.g., those trained with Mixup).
|
| 143 |
+
|
| 144 |
+
# 4.3. Dynamic adjustment mechanism
|
| 145 |
+
|
| 146 |
+
Once we introduce the confidence-tunable module, we need to solve one key problem during the training process, where the parameter $\gamma$ plays a key role, which can balance the
|
| 147 |
+
|
| 148 |
+
classification loss from the ETF classifier and loss from the standard classifier. Therefore, how to design the balanced factor $\gamma$ is our focus in this section. Considering that the model calibration methods aim to match predicted confidence with actual accuracy, we utilize the training dataset to evaluate the model confidence $\mathrm{conf}_t(D,\gamma)$ and accuracy $\mathrm{acc}_t(D,\gamma)$ at the $t$ -th training epoch, whose details are described below. By the relationship between model confidence and accuracy at the $t$ -th training epoch, we can determine the calibration error and design the balanced factor $\gamma^{t+1}$ at the $t+1$ -th training epoch as follows:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\gamma_ {t + 1} = \min _ {\gamma} | \operatorname {c o n f} _ {t} (D, \gamma) - \delta \cdot \operatorname {a c c} _ {t} (D, \gamma) |, \tag {7}
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
where we use binary search for $\gamma_{t + 1}$ . The hyperparameter $\delta$ is introduced to mitigate the overestimation of training-set accuracy caused by overfitting, by scaling accuracy to mimic unseen-data behavior. This design prevents model overconfidence and helps identify calibration errors between predicted confidence and actual accuracy. Through dynamic $\gamma_{t}$ adjustment, BalCAL automatically detects calibration errors and balances classifiers, achieving improved calibration with minimal manual intervention.
|
| 155 |
+
|
| 156 |
+
To compute the confidence and accuracy at the $t$ -th training epoch, we only need to fuse the probability vectors produced by two classifiers for each training sample in the mini-batch as follows:
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\boldsymbol {p} ^ {\text {f u s e d}} = \gamma \boldsymbol {p} ^ {\text {S t a}} + (1 - \gamma) \boldsymbol {p} ^ {\text {E T F}}. \tag {8}
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
Then we can compute the accuracy $\mathrm{acc}_t(D,\gamma)$ and confidence $\mathrm{conf}_t(D,\gamma)$ on the training dataset by averaging all mini-batches at the $t$ -th training epoch. Notably, during the test stage, we utilize the $\gamma$ accompanied by the best saved model to fuse the probability vectors. The mixing strategy ensures that the predicted confidence accurately aligns with the actual accuracy for improving model reliability and stability in real-world applications. We summarize our proposed method in Algorithm 1.
|
| 163 |
+
|
| 164 |
+
# 5. Experiments
|
| 165 |
+
|
| 166 |
+
Datasets and Baselines. We evaluate model calibration on CIFAR-10/100 [19], SVHN [28], and Tiny-ImageNet [21], along with distribution-shifted datasets CIFAR-10-C/100-C [16]. ImageNet results and additional experiments are in Appendix C. We compare BalCAL with various calibration methods: (1) Vanilla model trained with CE loss; (2) Implicit methods: ACLS [32], LS [37], Mixup [41], MIT [45], FL/FLSD [26]; (3) Explicit methods: CPC [3], PLP [44], MMCE [20], and TST/VTST [17]. When available, we reproduce results using official code and hyperparameters. Details are in Appendix B.
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">CIFAR-10</td><td colspan="3">CIFAR-100</td><td colspan="3">SVHN</td><td rowspan="2">ECE Avg</td></tr><tr><td>ACC↑</td><td>ECE↓</td><td>AECE↓</td><td>ACC↑</td><td>ECE↓</td><td>AECE↓</td><td>ACC↑</td><td>ECE↓</td><td>AECE↓</td></tr><tr><td>Vanilla</td><td>91.34</td><td>6.38</td><td>6.38</td><td>70.79</td><td>21.63</td><td>21.63</td><td>95.12</td><td>3.32</td><td>3.31</td><td>10.44</td></tr><tr><td>ACLS[32]</td><td>93.12</td><td>5.26</td><td>5.26</td><td>72.36</td><td>13.08</td><td>13.08</td><td>95.33</td><td>3.20</td><td>3.19</td><td>7.18</td></tr><tr><td>LS[37]</td><td>92.12</td><td>2.79</td><td>4.26</td><td>73.58</td><td>6.03</td><td>6.03</td><td>95.50</td><td>3.77</td><td>3.93</td><td>4.20</td></tr><tr><td>Mixup[41]</td><td>94.71</td><td>2.56</td><td>3.08</td><td>77.05</td><td>4.51</td><td>4.58</td><td>94.82</td><td>3.75</td><td>3.57</td><td>3.61</td></tr><tr><td>MIT[45]</td><td>94.27</td><td>2.18</td><td>2.12</td><td>73.38</td><td>12.31</td><td>12.31</td><td>93.69</td><td>0.78</td><td>0.68</td><td>5.09</td></tr><tr><td>FL[26]</td><td>92.11</td><td>1.99</td><td>1.97</td><td>71.54</td><td>14.26</td><td>14.25</td><td>94.79</td><td>1.24</td><td>1.26</td><td>5.83</td></tr><tr><td>FLSD[26]</td><td>92.42</td><td>1.72</td><td>1.68</td><td>71.19</td><td>14.20</td><td>14.20</td><td>94.60</td><td>1.03</td><td>0.92</td><td>5.65</td></tr><tr><td>CPC[3]</td><td>91.56</td><td>6.28</td><td>6.25</td><td>73.33</td><td>12.53</td><td>12.64</td><td>94.73</td><td>1.61</td><td>1.45</td><td>6.81</td></tr><tr><td>PLP[44]</td><td>92.69</td><td>4.89</td><td>4.85</td><td>72.55</td><td>13.74</td><td>13.73</td><td>95.07</td><td>3.49</td><td>3.49</td><td>7.37</td></tr><tr><td>MMCE[20]</td><td>90.04</td><td>3.60</td><td>3.43</td><td>68.77</td><td>17.18</td><td>17.18</td><td>93.99</td><td>2.30</td><td>2.31</td><td>7.69</td></tr><tr><td>TST*[17]</td><td>92.59±0.02</td><td>2.18±0.353</td><td>-</td><td>71.26±0.06</td><td>7.07±0.084</td><td>-</td><td>95.1±0.01</td><td>0.43±0.016</td><td>-</td><td>3.23</td></tr><tr><td>VTST*[17]</td><td>91.09±0.06</td><td>1.52±0.144</td><td>-</td><td>69.18±0.09</td><td>7.34±0.291</td><td>-</td><td>94.73±0.02</td><td>0.48±0.067</td><td>-</td><td>3.11</td></tr><tr><td>Ours</td><td>92.23±0.28</td><td>0.76±0.26</td><td>0.82±0.26</td><td>73.21±0.28</td><td>4.21±0.14</td><td>4.13±0.24</td><td>95.47±0.23</td><td>0.24±0.11</td><td>0.33±0.12</td><td>1.77</td></tr></table>
|
| 169 |
+
|
| 170 |
+
# Algorithm 1 Overall Algorithm
|
| 171 |
+
|
| 172 |
+
Input: Training dataset $D$ , feature extractor $f$ with parameter $\theta$ , learnable classifier $\mathbf{W}$ , Adapter $A$ with parameter $\epsilon$ , fixed ETF classifier $\mathbf{M}$ , hyper-parameters $\delta$ ;
|
| 173 |
+
Output: Trained model parameters and balanced factor $\gamma$ ; 1: Initialize model parameters randomly, and set $\gamma_{1} = 0.5$
|
| 174 |
+
2: for $t = 1, 2, \ldots, T$ do
|
| 175 |
+
3: for each mini-batch $\{x,y\} \in D$ do
|
| 176 |
+
4: Calculate and save probabilities $\pmb{p}^{Sta}$ and $\pmb{p}^{ETF}$ ;
|
| 177 |
+
5: Compute two classification losses $\mathcal{L}_{\mathrm{Sta}}$ with Eq. (4) and $\mathcal{L}_{\mathrm{ETF}}$ with Eq. (5);
|
| 178 |
+
6: Update $\{\pmb {\theta},\mathbf{W},\epsilon \}$ by minimizing $\gamma_{t}\mathcal{L}_{\mathrm{Sta}} + (1 - \gamma_{t})\mathcal{L}_{\mathrm{ETF}}$ with Eq. (6);
|
| 179 |
+
7: end for
|
| 180 |
+
8: Use binary search to determine the optimal $\gamma_{t + 1}$ by minimizing $|conf_t(D) - \delta \cdot acc_t(D)|$ with Eq. (7);
|
| 181 |
+
9: end for
|
| 182 |
+
|
| 183 |
+
Table 1. Comparison results of our proposed method against state-of-the-art methods for model calibration on CIFAR-10, CIFAR-100, and SVHN. * denotes the results are from original papers, while the remaining results correspond to the baselines that we reproduced.
|
| 184 |
+
|
| 185 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">Resnet-50</td><td colspan="3">Resnet-101</td></tr><tr><td>ACC↑</td><td>ECE↓</td><td>AECE↓</td><td>ACC↑</td><td>ECE↓</td><td>AECE↓</td></tr><tr><td>Vanilla</td><td>60.53</td><td>4.38</td><td>4.37</td><td>62.05</td><td>2.50</td><td>2.44</td></tr><tr><td>LS</td><td>63.10</td><td>1.59</td><td>1.71</td><td>63.12</td><td>1.93</td><td>6.25</td></tr><tr><td>mixup</td><td>65.88</td><td>3.85</td><td>3.84</td><td>66.56</td><td>3.98</td><td>3.86</td></tr><tr><td>MIT</td><td>64.27</td><td>1.45</td><td>1.32</td><td>66.81</td><td>1.58</td><td>1.64</td></tr><tr><td>FL</td><td>62.82</td><td>2.07</td><td>2.05</td><td>62.37</td><td>2.57</td><td>7.76</td></tr><tr><td>FLSD</td><td>63.09</td><td>1.84</td><td>1.84</td><td>63.09</td><td>1.39</td><td>1.65</td></tr><tr><td>TST</td><td>59.96</td><td>6.18</td><td>6.18</td><td>61.49</td><td>6.01</td><td>6.01</td></tr><tr><td>VTST</td><td>59.46</td><td>5.75</td><td>5.75</td><td>60.85</td><td>2.91</td><td>2.88</td></tr><tr><td>Ours</td><td>65.22</td><td>1.40</td><td>1.47</td><td>66.90</td><td>1.35</td><td>1.48</td></tr></table>
|
| 186 |
+
|
| 187 |
+
Table 2. Calibration performance on Tiny-ImageNet with Resnet-50 and Resnet-101.
|
| 188 |
+
|
| 189 |
+
Training Details and Metrics. Following [17], we use WRN-28-10 [51] for CIFAR-10/100 and SVHN, and ResNet50/101 [13] for Tiny-ImageNet. Additional architectures (e.g., ViT, DenseNet) are in Appendix C. Calibra
|
| 190 |
+
|
| 191 |
+
tion is evaluated using accuracy, expected calibration error (ECE) [11], and adaptive ECE (AECE) [29]. OOD detection is assessed via AUROC [2] and FPR95. For further details, see Appendix B.
|
| 192 |
+
|
| 193 |
+
# 5.1. Results
|
| 194 |
+
|
| 195 |
+
Comparison with other methods. We present comparison results of our proposed method against state-of-the-art methods for model calibration on three standard datasets, as illustrated in Table 1. We can find that our method significantly enhances calibration performance across all datasets, achieving superior results on both ECE and AECE, especially on the average of ECE. Compared with competed TST, our method achieves $1.42\%$ and $2.86\%$ ECE improvement on CIFAR-10 and CIFAR-100, respectively. While some methods achieve higher accuracy, their calibration performance is often suboptimal, without addressing the balance between predicted confidence and accuracy very well, which however is the focus in model calibration. Different from them, our proposed BalCAL not only achieves the desired calibration performance but also produces the accepted classification accuracy, which surpasses that of the vanilla model always, for example. This demonstrates the effectiveness of ours for introducing a fixed ETF classifier to correct the output of learnable classifier.
|
| 196 |
+
|
| 197 |
+
Following [24], we further conduct additional experiments on Tiny-ImageNet, which presents serious challenges compared with CIFAR-10/100 and SVHN. We adopt ResNet-50 and ResNet-101 as the backbones. Table 2 shows that ours performs consistently well on TinyImageNet with two backbones. These experiments indicate the ability of ours to handle challenging datasets with different architectures.
|
| 198 |
+
|
| 199 |
+
Underconfident problem. As discussed above, Mixup improves model calibration but is sensitive to interpolation
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 4. Calibration performance under distribution shifts of various methods on CIFAR-10 (left) and CIFAR-100 (right). Here, x-axis denotes the shift levels (the larger the number, the greater the shift degree) and y-axis is the ECE (smaller is better).
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 5. Calibration sensitivity of Mixup, MIT, and Mixup+Ours with combination ratios $\alpha$ on CIFAR-10.
|
| 208 |
+
|
| 209 |
+
levels, which sometimes can even lead to underconfidence. Specifically, the combination ratio on Mixup is sampled from Beta distribution, denoted as $\mathrm{Beta}(\alpha ,\alpha)$ ; see mode details about Mixup in Appendix C. Recent work [45] observed that a larger $\alpha$ used in Mixup may cause underconfidence issue, which makes the selection of $\alpha$ a difficulty. They thus proposed a specialized strategy named mixup inference in training (MIT). To explore whether ours can address the underconfident problem by Mixup, we compare the ECE of vanilla, Mixup, MIT, and Mixup+ours with varying hyperparameter $\alpha$ in Fig. 5. We can find that Mixup is sensitive to $\alpha$ , where the model gradually suffers from underconfidence when $\alpha >0.1$ and we thus set $\beta = K$ for $\alpha >0.1$ in ETF classifier; please see the specific accuracy and confidence values in Appendix C. Both MIT and ours can mitigate the pitfall of mixup for calibration. Without specialized design, ours can even perform better ECE than MIT, proving the effectiveness of ours.
|
| 210 |
+
|
| 211 |
+
Robustness analytical. To evaluate the robustness of our proposed BalCAL under corruptions and perturbations for model calibration, we further report the comparison experiments with several robustness datasets. We train on CIFAR-10/100 and test on CIFAR-10-C and CIFAR-100-C [16], respectively. Fig. 4 shows the ECE performance of BalCAL against various model calibration methods with different shift levels. We find that ours achieves more desired ECE values than our baselines when facing higher shift levels. Especially on the classification task of CIFAR-100, the
|
| 212 |
+
|
| 213 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td><td colspan="2">SVHN</td></tr><tr><td>AUROC↑</td><td>FPR95↓</td><td>AUROC↑</td><td>FPR95↓</td><td>AUROC↑</td><td>FPR95↓</td></tr><tr><td>Vanilla</td><td>88.56</td><td>70.98</td><td>67.05</td><td>89.26</td><td>93.46</td><td>45.92</td></tr><tr><td>PLP[44]</td><td>86.80</td><td>73.62</td><td>71.90</td><td>83.12</td><td>93.64</td><td>44.78</td></tr><tr><td>TST[17]</td><td>88.47</td><td>67.28</td><td>71.27</td><td>85.60</td><td>93.73</td><td>42.15</td></tr><tr><td>VTST[17]</td><td>83.47</td><td>72.40</td><td>73.47</td><td>84.93</td><td>83.50</td><td>60.91</td></tr><tr><td>Ours</td><td>89.89</td><td>64.15</td><td>81.26</td><td>76.03</td><td>94.98</td><td>34.59</td></tr></table>
|
| 214 |
+
|
| 215 |
+
Table 3. Performance comparison of OOD detection. Dataset name denotes the training dataset, where we evaluate the model on two datasets other than the training set and report the averaged performance.
|
| 216 |
+
|
| 217 |
+
ECE of our method is much lower than the other methods when the shift level is high. These indicate the stability and robustness of our proposed confidence-tunable module for model calibration in difficult scenarios. Besides, we also provide experiments about the OOD detection, where we train a model on one dataset (e.g., CIFAR-10) and test it on other datasets (e.g., CIFAR-100 and SVHN). As shown in Section 5.1, our related baseline TST and VTST perform generally worse than the vanilla model but ours achieves best AUROC and FPR95. It proves that, instead of harming performance on OOD tasks like some model calibration methods, ours can surprisingly improve the generalization ability. The possible reason might be that we introduce two classifiers, which can not only correct the model confidence but also improve the generalization ability.
|
| 218 |
+
|
| 219 |
+
# 5.2. Ablation study
|
| 220 |
+
|
| 221 |
+
Effect of our components. Here, we evaluate several variants to validate the effect of our proposed adapter, the fixed ETF classifier, and the dynamic adjustment mechanism. As shown in Table 4, replacing the learnable classifier with a fixed ETF classifier, i.e., using only a classifier, we consider two settings: $\beta = 1$ and $\beta = K$ . We can see that, if we utilize the fixed ETF classifier with a fixed $\beta$ and only train the encoder, it performs worse or is similar to the vanilla method. It indicates that only a fixed ETF classifier can not be used to solve the model calibration problem and the
|
| 222 |
+
|
| 223 |
+
<table><tr><td rowspan="2">Learnable Classifier</td><td rowspan="2">ETF Classifier</td><td rowspan="2">Adapter</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td><td colspan="2">SVHN</td></tr><tr><td>ACC↑</td><td>ECE↓</td><td>ACC↑</td><td>ECE↓</td><td>ACC↑</td><td>ECE↓</td></tr><tr><td>✓</td><td></td><td></td><td>91.33</td><td>6.38(1.12)</td><td>70.78</td><td>21.63(3.10)</td><td>95.12</td><td>3.32(0.72)</td></tr><tr><td></td><td>β=1</td><td></td><td>91.99</td><td>66.91(0.77)</td><td>72.22</td><td>68.96(6.31)</td><td>95.89</td><td>70.76(1.27)</td></tr><tr><td></td><td>β=K</td><td></td><td>92.15</td><td>7.85(1.81)</td><td>71.98</td><td>28.15(5.32)</td><td>95.32</td><td>3.86(1.00)</td></tr><tr><td></td><td>dynamic β</td><td></td><td>91.9</td><td>0.87(0.87)</td><td>71.53</td><td>5.78(5.78)</td><td>95.80</td><td>0.80(0.92)</td></tr><tr><td>✓</td><td>β=1</td><td></td><td>92.14</td><td>1.72(1.03)</td><td>72.86</td><td>9.34(8.79)</td><td>95.45</td><td>0.90(0.83)</td></tr><tr><td>✓</td><td>β=1, dynamic γ</td><td>✓</td><td>92.23</td><td>0.76(0.69)</td><td>73.21</td><td>4.21(3.97)</td><td>95.47</td><td>0.24(0.59)</td></tr></table>
|
| 224 |
+
|
| 225 |
+
Table 4. Our method and its variants. Numbers in parentheses represent the results obtained using a TS post-hoc method [11].
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Figure 6. Above: impact of different $\delta$ values on the calibration performance of BalCAL on CIFAR-100. Below: dynamic variation of $\gamma$ across epochs in WRN-28-10 under $\delta$ .
|
| 229 |
+
|
| 230 |
+
performance is sensitive to $\beta$ , where we provide its additional results with more different $\beta$ values in Appendix C. Besides, considering that we introduce a dynamic adjustment mechanism to search the balance factor $\gamma$ , we can also use the mechanism to build a dynamic $\beta$ during the training process, which can be implemented by replacing $\gamma$ with $\beta$ in (7). We can find that when tuning the scaling factor $\beta$ with our proposed mechanism, only a fixed ETF classifier can produce the second-best ECE values, proving the effectiveness of our proposed dynamic adjustment mechanism. However, it is still inferior to ours where we combine the learnable classifier and ETF classifier, proving the importance of their combination. Besides, removing the adapter in ours can result in a decline in performance, which is reasonable since an adapter can reduce the conflicts between the fixed ETF classifier and the encoder.
|
| 231 |
+
|
| 232 |
+
Cautious parameter $\delta$ . The cautious hyperparameter $\delta$ in BalCAI encourages the model to maintain suitable uncertainty, which helps identify the calibration error between predicted confidence and accuracy, and adaptively determine the balanced factor $\gamma$ . We recommend setting $\delta$ within the range of [0.91, 0.99] based on empirical results. As shown in the upper part of Fig. 6, $\delta$ within this range consistently leads to significant calibration improvements. As shown in the lower part of Fig. 6, we illustrate the dynamic variation of the balanced factor $\gamma$ across epochs under the influence of $\delta$ . We can see that, at the beginning of training, the standard classifier plays a more important role since the attention of the model is mainly on the learning of the standard classifier. At the early training stage, the importance of ETF classifier gradually increases; then the change about $\gamma$ gradually becomes smaller.
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
Figure 7. t-SNE visualizations of representations on CIFAR-10.
|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
Figure 8. Class activation maps of two classifiers on our method.
|
| 239 |
+
|
| 240 |
+
# 5.3. Visualization Results and Analysis
|
| 241 |
+
|
| 242 |
+
t-SNE visualization. We present t-SNE visualizations of the last-layer representations from Vanilla, MIT, and our proposed method on CIFAR-10 in Fig. 7. We observe that ours exhibits more clustered intra-class and discriminative inter-class distances, demonstrating its effectiveness in enhancing representation learning and potentially balancing confidence and accuracy to address overconfidence or underconfidence issues in model calibration.
|
| 243 |
+
|
| 244 |
+
CAMs visualization. We visualize Class Activation Maps for learnable and ETF classifiers in Fig. 8, where the learnable classifier captures broader regions, while the ETF classifier focuses on localized details. This underscores the ETF classifier's role in refining predictions, making its combination with the learnable classifier beneficial for enhancing perceptual vision and reducing confidence errors.
|
| 245 |
+
|
| 246 |
+
# 6. Conclusion
|
| 247 |
+
|
| 248 |
+
In this paper, we propose a novel method, denoted as Bal-CAL, which balances two classifiers to address the overconfidence and also underconfidence issues in model calibration. By integrating a fixed Simplex ETF classifier inspired by the NC phenomenon, with a standard learnable classifier, we introduce a dynamic adjustment method to adaptively regulate output confidence without sacrificing model accuracy. Extensive experiments show that our method not only improves model calibration but also enhances robustness under corruptions across various settings.
|
| 249 |
+
|
| 250 |
+
Acknowledgements. This work of Dandan Guo was supported by the National Natural Science Foundation of China (NSFC) under Grant 62306125.
|
| 251 |
+
|
| 252 |
+
# References
|
| 253 |
+
|
| 254 |
+
[1] Md Manjurul Ahsan, Shahana Akter Luna, and Zahed Siddique. Machine-learning-based disease diagnosis: A comprehensive review. In Healthcare, page 541. MDPI, 2022. 1
|
| 255 |
+
[2] Andrew P. Bradley. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern Recognition, 30(7):1145-1159, 1997. 6
|
| 256 |
+
[3] Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. In Advances in Neural Information Processing Systems (NeurIPS). Curran Associates, Inc., 2019. 5, 6
|
| 257 |
+
[4] Zhilu Chen and Xinming Huang. End-to-end learning for lane keeping of self-driving cars. In 2017 IEEE intelligent vehicles symposium (IV), pages 1856-1860. IEEE, 2017. 1
|
| 258 |
+
[5] Jiacheng Cheng and Nuno Vasconcelos. Calibrating deep neural networks by pairwise constraints. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2
|
| 259 |
+
[6] Jillian M Clements, Di Xu, Nooshin Yousefi, and Dmitry Efimov. Sequential deep learning for credit risk monitoring with tabular financial data. arXiv preprint arXiv:2012.15330, 2020. 1
|
| 260 |
+
[7] Jacob Devlin. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 1
|
| 261 |
+
[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In Proceedings of the International Conference on Learning Representations (ICLR), 2021. 1
|
| 262 |
+
[9] Jintong Gao, He Zhao, Dandan Guo, and Hongyuan Zha. Distribution alignment optimization through neural collapse for long-tailed classification. In Proceedings of the International Conference on Machine Learning (ICML), 2024. 3
|
| 263 |
+
[10] Arindam Ghosh, Thomas Schaaf, and Matthew R Gormley. Adafocal: Calibration-aware adaptive focal loss. In Proceedings of the 36th Conference on Neural Information Processing Systems (NeurIPS), 2022. 2
|
| 264 |
+
[11] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017. 1, 2, 3, 6, 8
|
| 265 |
+
[12] Abhishek Gupta, Alagan Anpalagan, Ling Guan, and Ahmed Shaharyar Khwaja. Deep learning for object detection and scene perception in self-driving cars: Survey, challenges, and open issues. *Array*, 10:100057, 2021. 1
|
| 266 |
+
[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 6
|
| 267 |
+
[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceed-
|
| 268 |
+
|
| 269 |
+
ings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. 1
|
| 270 |
+
[15] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 1
|
| 271 |
+
[16] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. 5, 7
|
| 272 |
+
[17] Mikkel Jordahn and Pablo M. Olmos. Decoupling feature extraction and classification layers for calibrated neural networks. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024. 1, 2, 5, 6, 7
|
| 273 |
+
[18] Vignesh Kothapalli, Tom Tirer, and Joan Bruna. A neural collapse perspective on feature evolution in graph neural networks. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), 2023. 3
|
| 274 |
+
[19] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. 5
|
| 275 |
+
[20] Aviral Kumar, Sunita Sarawagi, and Ujjwal Jain. Trainable calibration measures for neural networks from kernel mean embeddings. In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018. 5, 6
|
| 276 |
+
[21] Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N, 7(7):3, 2015. 5
|
| 277 |
+
[22] Xiao Li, Sheng Liu, Jinxin Zhou, Xinyu Lu, Carlos Fernandez-Granda, Zhihui Zhu, and Qing Qu. Understanding and improving transfer learning of deep models via neural collapse. Transactions on Machine Learning Research (TMLR), 2023. 3
|
| 278 |
+
[23] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017. 1, 2
|
| 279 |
+
[24] Bingyuan Liu, Ismail Ben Ayed, Adrian Galdran, and Jose Dolz. The devil is in the margin: Margin-based label smoothing for network calibration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2, 6
|
| 280 |
+
[25] W. Liu, L. Yu, A. Weller, and B. Scholkopf. Generalizing and decoupling neural collapse via hyperspherical uniformity gap. In Proceedings of the International Conference on Learning Representations (ICLR), 2023. 3
|
| 281 |
+
[26] Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz, Philip Torr, and Puneet Dokania. Calibrating deep neural networks using focal loss. In Proceedings of the 34th Conference on Neural Information Processing Systems (NeurIPS), 2020. 5, 6
|
| 282 |
+
[27] Rafael Müller, Simon Kornblith, and Geoffrey E Hinton. When does label smoothing help? In Proceedings of the 33rd Conference on Neural Information Processing Systems (NeurIPS), 2019. 2
|
| 283 |
+
[28] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In Proceedings of the 2011 International Conference on Machine Learning (ICML), 2011. 5
|
| 284 |
+
|
| 285 |
+
[29] Khanh Nguyen and Brendan O'Connor. Posterior calibration and exploratory analysis for natural language processing models. arXiv preprint arXiv:1508.05154, 2015. 6
|
| 286 |
+
[30] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. In Advances in neural information processing systems, 2019. 2
|
| 287 |
+
[31] Vardan Papyan, X. Y. Han, and David L. Donoho. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences, 117:24652-24663, 2020. 1, 3
|
| 288 |
+
[32] H. Park, J. Noh, Y. Oh, D. Baek, and B. Ham. Acls: Adaptive and conditional label smoothing for network calibration. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023. 5, 6
|
| 289 |
+
[33] G. Peifeng, Q. Xu, P. Wen, Z. Yang, H. Shao, and Q. Huang. Feature directions matters: Long-tailed learning via rotated balanced representation. In Proceedings of the International Conference on Machine Learning (ICML), 2023. 1
|
| 290 |
+
[34] Francesco Pinto, Harry Yang, Ser-Nam Lim, Philip Torr, and Puneet K Dokania. Using mixup as a regularizer can surprisingly improve accuracy & out-of-distribution robustness. In Proceedings of the 36th Conference on Neural Information Processing Systems (NeurIPS), 2022. 2
|
| 291 |
+
[35] Joseph Redmon. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 1
|
| 292 |
+
[36] Li Shen, Laurie R Margolies, Joseph H Rothstein, Eugene Fluder, Russell McBride, and Weiva Sieh. Deep learning to improve breast cancer detection on screening mammography. Scientific reports, 9(1):12495, 2019. 1
|
| 293 |
+
[37] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1, 2, 5, 6
|
| 294 |
+
[38] Linwei Tao, Minjing Dong, Daochang Liu, Changming Sun, and Chang Xu. Calibrating a deep neural network with its predecessors. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), 2023. 2
|
| 295 |
+
[39] Linwei Tao, Minjing Dong, and Chang Xu. Dual focal loss for calibration. In Proceedings of the 40th International Conference on Machine Learning (ICML), pages 33833-33849, 2023. 2
|
| 296 |
+
[40] Christos Thrampoulidis, Ganesh R Kini, Vala Vakilian, and Tina Behnia. Imbalance trouble: Revisiting neural-collapse geometry. In Advances in Neural Information Processing Systems (NeurIPS), pages 27225-27238, 2022. 3
|
| 297 |
+
[41] Sunil Thulasidasan, Gopinath Chennupati, Jeff A Bilmes, Tanmoy Bhattacharya, and Sarah Michalak. On mixup training: Improved calibration and predictive uncertainty for deep neural networks. In Proceedings of the 33rd Conference on Neural Information Processing Systems (NeurIPS), 2019. 2, 3, 5, 6
|
| 298 |
+
[42] Tom Tirer and Joan Bruna. Extended unconstrained features model for exploring deep neural collapse. In Proceedings
|
| 299 |
+
|
| 300 |
+
of the 39th International Conference on Machine Learning (ICML), 2022. 3
|
| 301 |
+
[43] A Vaswani. Attention is all you need. Advances in Neural Information Processing Systems, 2017. 1
|
| 302 |
+
[44] Deng-Bao Wang and Min-Ling Zhang. Calibration bottleneck: Over-compressed representations are less calibratable. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024. 1, 2, 5, 6, 7
|
| 303 |
+
[45] Deng-Bao Wang, Lanqing Li, Peilin Zhao, Pheng-Ann Heng, and Min-Ling Zhang. On the pitfall of mixup for uncertainty calibration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7609–7618, 2023. 1, 3, 5, 6, 7
|
| 304 |
+
[46] Liang Xie, Yibo Yang, Deng Cai, and Xiaofei He. Neural collapse inspired attraction-repulsion-balanced loss for imbalanced learning. Neurocomputing, 527:60-70, 2023. 3
|
| 305 |
+
[47] J. Xu and H. Liu. Quantifying the variability collapse of neural networks. In Proceedings of the International Conference on Machine Learning (ICML), 2023. 3
|
| 306 |
+
[48] Yibo Yang, Shixiang Chen, Xiangtai Li, Liang Xie, Zhouchen Lin, and Dacheng Tao. Inducing neural collapse in imbalanced learning: Do we really need a learnable classifier at the end of deep neural network? In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), 2022. 1, 3
|
| 307 |
+
[49] Y. Yang, J. Steinhardt, and W. Hu. Are neurons actually collapsed? on the fine-grained structure in neural representations. In Proceedings of the International Conference on Machine Learning (ICML), 2023. 3
|
| 308 |
+
[50] Yibo Yang, Haobo Yuan, Xiangtai Li, Zhouchen Lin, Philip Torr, and Dacheng Tao. Neural collapse inspired feature-classifier alignment for few-shot class-incremental learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2023. 3
|
| 309 |
+
[51] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In Proceedings of the British Machine Vision Conference (BMVC), page 87, York, UK, 2016. BMVA Press. 1, 6
|
| 310 |
+
[52] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. Mixup: Beyond empirical risk minimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2018. 1, 2
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0eb20b6746236ea0ce7ece770a8271e6ee33f3903c0b6bb9405eff4d55a88582
|
| 3 |
+
size 480823
|
CVPR/2025/Balancing Two Classifiers via A Simplex ETF Structure for Model Calibration/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fdfc826536facebc153ac76b17f1581a065b5be9b24bdeba5d334789b659b87
|
| 3 |
+
size 469102
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a96e0e2357027dd7ae3e3357a97ea92223d302f3108ef215f933e738e8c70401
|
| 3 |
+
size 83860
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37d3badcfa4b113fa3b1c26ab4ea3be2168f5ac545a0161b2d2ca4947b16e6de
|
| 3 |
+
size 102070
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/b958079c-6eb4-4a8f-b125-b9c958f9bb8d_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b22243f34423663aac635fb516af14f06adff187124c530bfa96fa83f6dd1ce1
|
| 3 |
+
size 2118037
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/full.md
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection
|
| 2 |
+
|
| 3 |
+
Zhen $\mathrm{Qu}^{1,2}$ Xian Tao $^{1,2,4\boxtimes}$ Xinyi Gong $^{3}$ ShiChen $\mathrm{Qu}^{1,2}$ Qiyu Chen $^{1,2}$
|
| 4 |
+
|
| 5 |
+
Zhengtao Zhang $^{1,2,4}$ Xingang Wang $^{1,2,5}$ Guiguang Ding $^{6}$
|
| 6 |
+
|
| 7 |
+
$^{1}$ Institute of Automation, Chinese Academy of Sciences
|
| 8 |
+
|
| 9 |
+
$^{2}$ School of Artificial Intelligence, University of Chinese Academy of Sciences $^{3}$ HDU
|
| 10 |
+
|
| 11 |
+
$^{4}$ Casivision $^{5}$ Luoyang Institute for Robot and Intelligent Equipment $^{6}$ Tsinghua University
|
| 12 |
+
|
| 13 |
+
{quzhen2022, xiantao2013, qushichen2023, chenqiyu2021, xingang.wang, zhengtao.zhang}@ia.ac.cn
|
| 14 |
+
|
| 15 |
+
gongxinyi@hdu.edu.cn dinggg@tsinghua.edu.cn
|
| 16 |
+
|
| 17 |
+
# Abstract
|
| 18 |
+
|
| 19 |
+
Recently, vision-language models (e.g. CLIP) have demonstrated remarkable performance in zero-shot anomaly detection (ZSAD). By leveraging auxiliary data during training, these models can directly perform cross-category anomaly detection on target datasets, such as detecting defects on industrial product surfaces or identifying tumors in organ tissues. Existing approaches typically construct text prompts through either manual design or the optimization of learnable prompt vectors. However, these methods face several challenges: 1) handcrafted prompts require extensive expert knowledge and trial-and-error; 2) single-form learnable prompts struggle to capture complex anomaly semantics; and 3) an unconstrained prompt space limits generalization to unseen categories. To address these issues, we propose Bayesian Prompt Flow Learning (Bayes-PFL), which models the prompt space as a learnable probability distribution from a Bayesian perspective. Specifically, a prompt flow module is designed to learn both image-specific and image-agnostic distributions, which are jointly utilized to regularize the text prompt space and improve the model's generalization on unseen categories. These learned distributions are then sampled to generate diverse text prompts, effectively covering the prompt space. Additionally, a residual cross-model attention (RCA) module is introduced to better align dynamic text embeddings with fine-grained image features. Extensive experiments on 15 industrial and medical datasets demonstrate our method's superior performance. The code is available at https://github.com/xiaozhen228/Bayes-PFL.
|
| 20 |
+
|
| 21 |
+
# 1. Introduction
|
| 22 |
+
|
| 23 |
+
In the fields of industrial defect detection [18, 32, 41, 42] and medical image analysis [2, 8, 11, 29], the cold-start
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
(a) Existing CLIP-based method
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
(b) Our Bayes-PFL
|
| 30 |
+
Figure 1. Comparison of existing CLIP-based method and our Bayes-PFL. Our Bayes-PFL learns the distributions of context and state words within textual prompts. The proposed RCA module is further to enhance the alignment between dynamic text embeddings and patch-level features through cross-modal interaction.
|
| 31 |
+
|
| 32 |
+
problem is a major challenge, characterized by an insufficient amount of labeled data for supervised training on new object categories. An effective solution is zero-shot anomaly detection (ZSAD), which directly detects anomalies on new object surface after being trained on auxiliary data. However, significant variations in background features, anomaly types, and visual appearances across different products and organs make it difficult to achieve robust generalization.
|
| 33 |
+
|
| 34 |
+
Vision-language models (VLMs), such as CLIP [34] and ALIGN [20], which are trained on large-scale image-text pairs through contrastive representation learning, have shown significant potential for ZSAD. As a representative
|
| 35 |
+
|
| 36 |
+
tive VLM, CLIP [34] has been widely adopted in previous works [8, 18, 49]. A key challenge for CLIP-based ZSAD methods is the effective design of text prompts. As illustrated in Figure 1(a), a typical textual prompt consists of three components: context words, state words, and class. They respectively represent a general description of the object (e.g. background), the attributes indicating whether it is normal or anomalous (e.g. good / damaged), and the object category (e.g. wood). Existing text prompt design methods can be broadly categorized into two types: prompt ensemble-based and prompt optimization-based. Prompt ensemble-based methods, such as WinCLIP [18], APRIL-GAN [9], and CLIP-AD [10], create handcrafted prompt templates and embed various context and state words into these templates to generate a large number of textual prompts. However, the number of context and state words is limited and the design relies on expert knowledge. In contrast, prompt optimization-based methods, such as AnomalyCLIP [49] and AdaCLIP [8], replace the context words in the prompts with learnable vectors or directly insert them into the encoder. However, two critical issues are often overlooked: 1) The design of learnable prompts is overly simplistic, which makes it difficult to capture complex context semantics; 2) The learnable prompt space is not properly constrained, hindering the generalization of learnable text prompts to unseen categories.
|
| 37 |
+
|
| 38 |
+
To address these challenges, we propose a Bayesian Prompt Flow Learning (Bayes-PFL) strategy based on CLIP for the ZSAD task. As depicted in Figure 1(b), our approach learns a probability distribution over textual prompts from a Bayesian inference perspective, aiming to improve the ZSAD performance through two key aspects: 1) regularizing the context and state text spaces separately through the design of image-specific distribution (ISD) and image-agnostic distribution (IAD), ensuring that the learned prompts generalize effectively to novel categories, and 2) enhancing the coverage of the prompt space by sampling prompts from the learned probability distribution.
|
| 39 |
+
|
| 40 |
+
First, we construct two-class prompt banks to store learnable textual prompts for normal and abnormal cases. Then, a prompt flow module is designed to learn the distribution of context and state words within the text prompts. Specifically, to introduce rich visual semantics into the text prompts, ISD is learned through prompt flow to model the context words, dynamically adapting based on the input image. To encode unified normal and abnormal semantics, IAD is established for the state words, remaining static and conditioned on a learnable free vector. Finally, multiple textual prompts sampled from the learned distribution are fused with the prompt banks to generate enriched text prompts. Moreover, to align the sampled text embeddings with fine-grained image features, we introduce a residual cross-modal attention (RCA) module to enhance the inter
|
| 41 |
+
|
| 42 |
+
action between modalities. Unlike existing methods [8-10] that directly align text with patch-level features as shown in Figure 1(a), our RCA module updates dynamic text embeddings using fine-grained image information to improve the ZSAD performance. The results generated from alignment of multiple updated text embeddings and patch-level feature are integrated to produce the final anomaly map.
|
| 43 |
+
|
| 44 |
+
The contributions of this work are summarized as follows: 1) We propose a novel Bayesian Prompt Flow Learning method, Bayes-PFL, built on CLIP to address the ZSAD problem. By distribution sampling and distribution regularization of the text prompt space, Bayes-PFL enhances the ZSAD performance on novel categories; 2) The prompt flow module is designed to learn ISD and IAD, which model the context and state semantics in text prompts, respectively. Additionally, the RCA module is introduced to improve the alignment between fine-grained features and dynamic text prompts through cross-modal interactions; 3) After training on auxiliary datasets, our method can directly detect defects / lesions on novel products / organs without requiring target training data. Extensive experiments across 15 industrial and medical datasets demonstrate that Bayes-PFL achieves state-of-the-art (SOTA) performance in ZSAD.
|
| 45 |
+
|
| 46 |
+
# 2. Related Works
|
| 47 |
+
|
| 48 |
+
# 2.1. Zero-shot Anomaly Detection
|
| 49 |
+
|
| 50 |
+
The earliest work, WinCLIP [18], proposes a window-based strategy to aggregate classification results obtained from aligning text with sub-images at multiple scales. APRILGAN [9] and CLIP-AD [10] use trainable adapter layers to map fine-grained patch features into a joint embedding space. The latter further employs feature surgery to mitigate opposite predictions. Additionally, several existing studies have integrated multiple foundation models, such as SAM [25] and GroundingDINO [28], to collectively enhance ZSAD performance, as demonstrated in SAA/SAA+ [7] and ClipSAM [27]. Recently, an increasing number of prompt optimization-based methods have been proposed. AnomalyCLIP [49] and Filo [13] insert learnable vectors into the input text or CLIP encoder layers to avoid extensive engineering on hand-crafted prompt design. AdaCLIP [8] and VCP-CLIP [33] further utilize textual and visual hybrid prompts to enhance CLIP's anomaly perception capability. Different from these methods, our Bayes-PFL learns the distribution of textual prompts and leverages sampling to cover the prompt space to improve the ZSAD performance.
|
| 51 |
+
|
| 52 |
+
# 2.2. Prompt Design
|
| 53 |
+
|
| 54 |
+
The design of textual prompts plays a pivotal role in applying VLMs to downstream tasks. Manually crafted textual prompts [15, 26, 34, 43, 45] and data-driven approaches to obtain learnable prompts [14, 35, 44, 47, 48] in the natural
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 2. The framework of Bayes-PFL. First, a prompt bank with $B$ sets of learnable prompts is constructed (Section 3.2). Next, the prompt flow module converts the learnable prompts into a probabilistic distribution and generates $B \times R$ text embeddings through $R$ rounds of sampling (Sections 3.3 and 3.4), which are then aligned with image and patch features (Section 3.5).
|
| 58 |
+
|
| 59 |
+
scenario have both demonstrated effectiveness in zero-shot learning. In the ZSAD task, Compositional Prompt Ensemble [9, 10, 18] and Prompt Optimization [8, 33, 49] are two mainstream methods for text prompt design.
|
| 60 |
+
|
| 61 |
+
Compositional Prompt Ensemble generates diverse text prompts through the combination of state words and textual templates. In the representative work APRIL-GAN [9], approximately 35 templates and 5 state words are designed for abnormal descriptions, resulting in a total of $35 \times 5$ text prompts. The text embeddings from these prompts are averaged to produce the final result, and a similar approach is applied to normal descriptions.
|
| 62 |
+
|
| 63 |
+
Prompt Optimization replaces the context words in text prompts with learnable vectors or directly inserts these vectors into the encoder layers. As depicted in Figure 1(a), the representative method AnomalyCLIP [49] designs text prompts in the form of $[\mathbf{V}_1][\mathbf{V}_2]\dots [\mathbf{V}_z][\mathbf{state}][\mathbf{object}]$ where $\mathbf{V}_i,i = 1,2,\dots ,z$ are learnable vectors. However, the single-form prompt design and the lack of effective constraints on the prompt space limit its generalization capability to unseen categories.
|
| 64 |
+
|
| 65 |
+
# 3. Method
|
| 66 |
+
|
| 67 |
+
Our approach follows the recent ZSAD task setting, where the model is trained in a supervised manner on seen categories $C^s$ from an industrial dataset and then directly tested on unseen categories $C^u$ from other industrial or medical datasets. Notably, $C^u \cap C^s = \emptyset$ , and the object categories used for auxiliary training and testing come from different
|
| 68 |
+
|
| 69 |
+
datasets with large domain gaps.
|
| 70 |
+
|
| 71 |
+
# 3.1. Overview
|
| 72 |
+
|
| 73 |
+
Figure 2 illustrates the main framework of Bayes-PFL, which consists of three key designs: 1) Two-class prompt banks for normal and abnormal textual descriptions, 2) A prompt flow module for distribution learning, and 3) A RCA module for feature alignment. Given an input image $\mathbf{X} \in \mathbb{R}^{h \times w \times 3}$ , the model first maps the patch-level image features to the joint embedding space through a single linear layer, producing $\mathbf{F}^I \in \mathbb{R}^{HW \times C}$ , where $H = h/patchsize$ , $W = w/patchsize$ and $C$ represents the dimensionality of the joint embedding space. Subsequently, the prompt flow module learns the image-specific distribution $q_K(\varphi^e)$ for context words, and the image-agnostic distributions $q_K(\varphi^n)$ , $q_K(\varphi^a)$ for normal and abnormal state words. Monte Carlo sampling [1] is applied to these distributions, and the sampled results $\varphi_r^e$ , $\varphi_r^n$ , $\varphi_r^a$ are fused with the prompt banks to generate diverse textual prompts. The text embeddings $\mathbf{Z}_{b,r}^t$ are aligned with $\mathbf{F}^I$ to obtain multiple anomaly segmentation results, which are averaged to derive the final anomaly map $\mathbf{M}$ . Note that when aligning with $\mathbf{F}^I$ , we additionally employ the proposed RCA module to refine the text embeddings to $\mathbf{F}_{b,r}^t$ .
|
| 74 |
+
|
| 75 |
+
# 3.2. Two-class Prompt Banks
|
| 76 |
+
|
| 77 |
+
We decompose the text prompt into three components: context words, state words, and class words. Unlike previous prompt optimization strategies [49], which manually design state words and only optimize context words, we argue that
|
| 78 |
+
|
| 79 |
+
state words (e.g., good / damaged) still reside within an opti- mizable prompt space. Thus, in the word embedding space, the manually designed context and state words are replaced with learnable vectors. Inspired by Compositional Prompt Ensemble, normal and abnormal prompt banks are further constructed to expand the prompt space, with each containing $B$ distinct trainable prompts:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
g _ {b} ^ {n} = \left[ \mathbf {E} _ {b, 1} \right] \left[ \mathbf {E} _ {b, 2} \right] \dots \left[ \mathbf {E} _ {b, P} \right] \left[ \mathbf {S} _ {b, 1} ^ {n} \right] \dots \left[ \mathbf {S} _ {b, Q} ^ {n} \right] [ \text {c l a s s} ] \tag {1}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
g _ {b} ^ {a} = \left[ \mathbf {E} _ {b, 1} \right] \left[ \mathbf {E} _ {b, 2} \right] \dots \left[ \mathbf {E} _ {b, P} \right] \left[ \mathbf {S} _ {b, 1} ^ {a} \right] \dots \left[ \mathbf {S} _ {b, Q} ^ {a} \right] [ \text {c l a s s} ] \tag {2}
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $b = 1,2,\dots ,B$ $\mathbf{E}_{b,i}\in \mathbb{R}^C,i = 1,2,\dots ,P$ are learnable vectors designed to encode contextual information in the text. $\mathbf{S}_{b,j}^{n},\mathbf{S}_{b,j}^{a}\in \mathbb{R}^{C},j = 1,2,\dots ,Q$ are learnable normal and abnormal state vectors, respectively. Note that we enforce orthogonality among the text embeddings generated from the same prompt bank, promoting diversity in the normal or anomalous semantics captured by different prompts. This constraint is implemented through the orthogonal loss $\mathcal{L}_{ort}$ introduced in Section 3.6.
|
| 90 |
+
|
| 91 |
+
# 3.3. Prompt Distributionalization
|
| 92 |
+
|
| 93 |
+
Prompt distributionalization expresses a process of modeling and generating rich textual prompts by utilizing the prompt flow module, and fusing the sampled results from the distribution with the prompt banks. This process not only enhances the model's generalization to unseen categories by constraining the prompt space to ISD and IAD (distribution regularization), but also comprehensively covers the prompt space through distribution sampling.
|
| 94 |
+
|
| 95 |
+
Bayesian inference. Assume the auxiliary training dataset is $D = \{\mathbf{X}, Y_c, \mathbf{Y}_s\}$ , where $\mathbf{X} \in \mathbb{R}^{h \times w \times 3}$ represents the input image, and $Y_c \in \{0,1\}$ , $\mathbf{Y}_s \in \mathbb{R}^{h \times w}$ denote the image-level labels and pixel-level ground truth, respectively. To construct the text prompt distribution, the context, normal state, and abnormal state word embeddings are represented as $C$ -dimensional random vectors $\Phi_e, \Phi_s^n$ and $\Phi_s^a$ , respectively. For convenience, we denote $\Phi = \{\Phi_e, \Phi_s^n, \Phi_s^a\}$ . The posterior probabilities are then computed as:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
p (\Phi | D) = \frac {p (D | \Phi) p (\Phi)}{p (D)} \tag {3}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Since computing the marginal likelihood $p(D)$ is intractable, variational inference [21] with distribution $q_{\gamma}(\Phi)$ , parameterized by $\gamma$ , is employed to approximate the posterior probability. Note that our method operates under the mean-field assumption, where all variables are mutually independent: $q_{\gamma}(\Phi) = q_{\gamma}(\varphi^{e})q_{\gamma}(\varphi^{n})q_{\gamma}(\varphi^{a})$ . By applying Jensen's inequality, an upper bound is driven for the log marginal likelihood of the training data:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\begin{array}{l} \log p (D) = \log \int p (D | \Phi) p (\Phi) d \Phi (4) \\ \geq E _ {q _ {\gamma} (\Phi | D)} \left[ \log p (D, \Phi) - \log q _ {\gamma} (\Phi | D) \right] = - \mathcal {L} _ {e} (D) (5) \\ \end{array}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
Thus, the variational distribution $q_{\gamma}(\Phi)$ can be obtained by minimizing the evidence lower bound (ELBO) loss $\mathcal{L}_e(D)$ .
|
| 108 |
+
|
| 109 |
+
Prompt flow module. Richer posterior approximations enable us to better estimate the prompt distribution [36]. Hence, a prompt flow module is designed to transform a simple probability distribution $q_{0}(\Phi_{0})$ into a more complex one $q_{K}(\Phi_{K})$ through a series of invertible mappings $h_k, k = 1,2,\dots K$ . Specifically, this transformation follows $\Phi_K = h_K(h_{K - 1}(\dots h_1(\Phi_0)))$ , as illustrated in the bottom right corner of Figure 2. For the model efficiency, we use a linear-time transformation $h(\Phi) = \Phi + \mathbf{u}g(\mathbf{w}^{\mathrm{T}}\Phi + \mathbf{b})$ , where $\mathbf{w}$ , $\mathbf{u} \in \mathbb{R}^{C}$ , $\mathbf{b} \in \mathbb{R}$ are trainable parameters and $g(\cdot)$ is the Tanh activation function [38]. After $K$ transformations, the final distribution is given by:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\log q _ {K} \left(\Phi_ {K}\right) = \log q _ {0} \left(\Phi_ {0}\right) - \sum_ {k = 1} ^ {K} \log \left| 1 + \mathbf {u} _ {k} ^ {\mathrm {T}} \phi \left(\Phi_ {k}\right) \right| \tag {6}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\phi (\Phi) = g^{\prime}(\mathbf{w}^{T}\Phi +\mathbf{b})\mathbf{w}$ . By replacing $q_{\gamma}(\Phi |D)$ in Equation (5) with $q_{K}(\Phi_{K})$ , the objective function for optimizing the prompt flow module is computed as:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\begin{array}{l} \mathcal {L} _ {p} (D) = E _ {q _ {\gamma} (\Phi | D)} \left[ \log q _ {\gamma} (\Phi | D) - \log p (D, \Phi) \right] \\ = E _ {q _ {0} \left(\Phi_ {0}\right)} \left[ \log q _ {0} \left(\Phi_ {0}\right) - \sum_ {k = 1} ^ {K} \log | 1 + \mathbf {u} _ {k} ^ {\mathrm {T}} \phi \left(\Phi_ {k}\right) | \right] \\ - E _ {q _ {0} \left(\Phi_ {0}\right)} \left[ \log p \left(\Phi_ {K}\right) \right] - E _ {q _ {0} \left(\Phi_ {0}\right)} \left[ \log p (D \mid \Phi_ {K}) \right] \tag {7} \\ \end{array}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
where the prior distribution follows $p = \mathcal{N}(0,\mathbf{I})$ . The initial density $q_{0}$ is defined as a standard normal distribution: $q_{0} = \mathcal{N}(\boldsymbol {\mu}(\boldsymbol {\xi}),\boldsymbol {\Sigma}(\boldsymbol {\xi}))$ , where $\boldsymbol {\mu}\in \mathbb{R}^{C}$ and $\operatorname {diag}(\boldsymbol {\Sigma}) = \boldsymbol {\sigma}\in \mathbb{R}^{C}$ are conditioned on the vector $\pmb {\xi}\in \mathbb{R}^{C}$ and parameterized by three linear layers, with a Softplus activation function [38] applied between consecutive layers.
|
| 122 |
+
|
| 123 |
+
Depending on the different inputs $\xi$ to the prompt flow module, two types of distributions are obtained: an image-specific distribution (ISD) and an image-agnostic distribution (IAD). For ISD, $\xi$ is set as global image feature $\mathbf{x}$ to acquire a dynamic distribution, which models the context distribution and enhances generalization in unseen domains. For IAD, we set $\xi$ as the learnable free vectors $\mathbf{x}_f^n$ and $\mathbf{x}_f^a$ , respectively, while sharing the same network weights. This static distribution is used to learn a unified state semantics for both normal and abnormal conditions.
|
| 124 |
+
|
| 125 |
+
Prompt sampling and fusion. Monte Carlo sampling is used to sample $R$ iterations from the initial densities $q_0^e, q_0^n, q_0^a$ . The sampled results are processed through the prompt flow module to obtain $\varphi_r^e, \varphi_r^n, \varphi_r^a, r = 1, 2, \dots, R$ , which represent sampled context vector, normal sampled state vector and abnormal sampled state vector, respectively. The fusion process is formulated as:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array}{l} g _ {b, r} ^ {n} = \left[ \mathbf {E} _ {b, 1} + \varphi_ {r} ^ {e} \right] \left[ \mathbf {E} _ {b, 2} + \varphi_ {r} ^ {e} \right] \dots \left[ \mathbf {E} _ {b, P} + \varphi_ {r} ^ {e} \right] \tag {8} \\ [ \mathbf {S} _ {b, 1} ^ {n} + \varphi_ {r} ^ {n} ] \dots [ \mathbf {S} _ {b, Q} ^ {n} + \varphi_ {r} ^ {n} ] [ \text {c l a s s} ] \\ \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array}{l} g _ {b, r} ^ {a} = \left[ \mathbf {E} _ {b, 1} + \varphi_ {r} ^ {e} \right] \left[ \mathbf {E} _ {b, 2} + \varphi_ {r} ^ {e} \right] \dots \left[ \mathbf {E} _ {b, P} + \varphi_ {r} ^ {e} \right] \tag {9} \\ [ \mathbf {S} _ {b, 1} ^ {a} + \varphi_ {r} ^ {a} ] \dots [ \mathbf {S} _ {b, Q} ^ {a} + \varphi_ {r} ^ {a} ] [ \text {c l a s s} ] \\ \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
where $g_{b,r}^{n}, g_{b,r}^{a}$ represent the text prompt obtained from the $r$ -th sampling of the $b$ -th prompt in the prompt banks, respectively. After sampling and fusion, the number of prompts in each bank increases to $B \times R$ at a very low cost. Note that to ensure proper gradient backpropagation after discrete sampling, the reparameterization method [23] is employed during the optimization process.
|
| 136 |
+
|
| 137 |
+
# 3.4. Residual Cross-modal Attention Module
|
| 138 |
+
|
| 139 |
+
The normal and abnormal text embeddings, derived from the text prompts in Equations (8) and (9) through the text encoder, are represented as $\mathbf{t}_{b,r}^n$ and $\mathbf{t}_{b,r}^a$ , respectively. Due to the design of image-specific distribution and Monte Carlo sampling, the generated text embeddings are dynamic during both training and inference. This presents challenges in aligning text embeddings $\mathbf{Z}_{b,r}^t \in \mathbb{R}^{2 \times C}$ with fine-grained patch embeddings $\mathbf{F}^I \in \mathbb{R}^{HW \times C}$ in anomaly segmentation task, where $\mathbf{Z}_{b,r}^t$ is the concatenation of $\mathbf{t}_{b,r}^n$ and $\mathbf{t}_{b,r}^a$ along the sequence dimension. Therefore, the RCA module is designed to promote cross-modal interaction between textual and fine-grained image features, which can be formulated as follows:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\mathbf {F} _ {b, r} ^ {t} = \mathbf {Z} _ {b, r} ^ {t} + \operatorname {s o f t m a x} \left(\mathbf {Q} _ {b, r} \left(\mathbf {F} ^ {I}\right) ^ {\mathrm {T}} / \sqrt {C}\right) \mathbf {F} ^ {I} \tag {10}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $\mathbf{F}_{b,r}^{t}\in \mathbb{R}^{2\times C}$ is the refined text embeddings. The query embedding $\mathbf{Q}_{b,r} = \mathbf{Z}_{b,r}^{t}\mathbf{W}$ , where $\mathbf{W}\in \mathbb{R}^{C\times C}$ is the weight matrix of a linear mapping layer. The RCA module introduces residuals to: 1) fuse original textual features with cross-modal features for better zero-shot performance and 2) facilitate gradient backpropagation to the prompt bank, improving the optimization of learnable prompts.
|
| 146 |
+
|
| 147 |
+
# 3.5. Anomaly Map and Anomaly Score
|
| 148 |
+
|
| 149 |
+
Pixel-level anomaly map. We extract $L$ -layer patch-level features $\mathbf{F}_l^I$ and align them with the refined text embeddings $\mathbf{F}_{l,b,r}^{t}, l = 1,2,\dots ,L$ . The anomaly map from the $l$ -th layer is computed as:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
\mathbf {M} _ {l, b, r} = \operatorname {s o f t m a x} \left(U p \left(\widetilde {\mathbf {F}} _ {l} ^ {I} \widetilde {\mathbf {F}} _ {l, b, r} ^ {t \mathrm {T}}\right)\right) \tag {11}
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
where $(\cdot)$ denotes the $L_{2}$ -normalization operation along the embedding dimension and $Up(\cdot)$ is the unsampling operation. The final result $\mathbf{M} \in \mathbb{R}^{h \times w}$ is obtained by averaging the anomaly maps derived from aligning the $L$ -layer patch features with $B \times R$ refined text embeddings:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\mathbf {M} = \frac {1}{L B R} \sum_ {l = 1} ^ {L} \sum_ {b = 1} ^ {B} \sum_ {r = 1} ^ {R} \mathbf {M} _ {l, b, r} \tag {12}
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
Image-level anomaly score. For anomaly classification, the anomaly values come from both the text and image branches. The anomaly score in the text branch is computed as: $s_{text} = \left(\frac{1}{BR}\right)\sum_{b}^{B}\sum_{r}^{R}$ softmax( $\widetilde{\mathbf{x}}\widetilde{\mathbf{Z}}_{b,r}^{t\mathrm{T}}$ ), where $\mathbf{x} = \mathbf{x}_{cls} + \mathbf{x}_{patch}$ is the global image embedding. Note that $\mathbf{x}_{cls}$ refers to the global image features obtained from the class token of the vanilla image encoder, while $\mathbf{x}_{patch}$ comes from the fusion of fine-grained patch features. Specifically, the patch features $\mathbf{F}_l^I \in \mathbb{R}^{H\times W\times C}, l = 1,2,\dots ,L$ from different layers are first concatenated along the channel dimension. Then, global average pooling is applied along the spatial dimensions, followed by a linear layer that maps the results to $\mathbf{x}_{patch}$ . The anomaly score from the image branch is derived from the maximum value of the anomaly map: $s_{img} = \max (\mathbf{M})$ . The final image-level anomaly score is then expressed as: $s = s_{text} + s_{img}$ .
|
| 162 |
+
|
| 163 |
+
# 3.6. Loss Function
|
| 164 |
+
|
| 165 |
+
During the training stage, a single Monte Carlo sampling is performed to enhance efficiency. Let the text prompts from $B$ samples be denoted as $[g_{b,1}^n, g_{b,1}^a]$ , $b \in \{1, 2, \dots, B\}$ , and their corresponding text embeddings as $[\mathbf{t}_{b,1}^n, \mathbf{t}_{b,1}^a]$ , $b \in \{1, 2, \dots, B\}$ . To enhance the diversity of learnable prompts in prompt banks, an orthogonal loss is designed on the text embeddings as follows:
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
\mathcal {L} _ {\text {o r t}} = \sum_ {i = 1} ^ {B} \sum_ {j = 1, j \neq i} ^ {B} \left\{\left(\left\langle \mathbf {t} _ {i, 1} ^ {n}, \mathbf {t} _ {j, 1} ^ {n} \right\rangle\right) ^ {2} + \left(\left\langle \mathbf {t} _ {i, 1} ^ {a}, \mathbf {t} _ {j, 1} ^ {a} \right\rangle\right) ^ {2} \right\} \tag {13}
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
in which $\langle \cdot ,\cdot \rangle$ denotes the cosine similarity. The final loss function can be expressed as:
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
\mathcal {L} = \mathcal {L} _ {o r t} + \mathcal {L} _ {p} \tag {14}
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
where the prompt flow loss $\mathcal{L}_p$ is computed using Equation (7). The first two terms of $\mathcal{L}_p$ are distribution regularization terms that refine the initial distribution $q_0(\Phi_0)$ into a simple prior $p(\Phi_K)$ , effectively controlling the distribution of latent variables. This regularization ensures that the prompt flow module can learn an effective prompt distribution, mitigating overfitting while enhancing the generalization of the prompts. The third term, $E_{q_0(\Phi_0)}[\log p(D|\Phi_K)]$ , maximizes the log-likelihood of the data, which is approximated by the sum of classification loss (for text-image alignment) and segmentation loss (for text-patch alignment). Specifically, our Bayes-PFL employs a cross-entropy loss for classification, along with the sum of Focal loss [37] and Dice loss [30] for segmentation. More details about the loss function can be found in Appendix A.1.
|
| 178 |
+
|
| 179 |
+
# 4. Experiments
|
| 180 |
+
|
| 181 |
+
# 4.1. Experimental Setup
|
| 182 |
+
|
| 183 |
+
Datasets. To evaluate the ZSAD performance of the model, experiments on 15 real-world datasets from the industrial
|
| 184 |
+
|
| 185 |
+
Table 1. Comparison with existing state-of-the-art methods. The best results are marked in red, while the second-best are indicated in blue.
|
| 186 |
+
|
| 187 |
+
<table><tr><td>Domain</td><td>Metric</td><td>Dataset</td><td>WinCLIP [18]</td><td>APRIL-GAN [9]</td><td>CLIP-AD [10]</td><td>AnomalyCLIP [49]</td><td>AdaCLIP [8]</td><td>Bayes-PFL</td></tr><tr><td rowspan="12">Industrial</td><td rowspan="6">Image-level (AUROC, F1-Max, AP)</td><td>MVTec-AD VisA</td><td>(91.8, 92.9, 95.1) (78.1, 79.0, 77.5)</td><td>(86.1, 90.4, 93.5) (78.0, 78.7, 81.4)</td><td>(89.8, 91.1, 95.3) (79.8, 79.2, 84.3)</td><td>(91.5, 92.8, 96.2) (82.1, 80.4, 85.4)</td><td>(92.0, 92.7, 96.4) (83.0, 81.6, 84.9)</td><td>(92.3, 93.1, 96.7) (87.0, 84.1, 89.2)</td></tr><tr><td>BTAD</td><td>(83.3, 81.0, 84.1)</td><td>(74.2, 70.0, 71.7)</td><td>(85.8, 81.7, 85.2)</td><td>(89.1, 86.0, 91.1)</td><td>(91.6, 88.9, 92.4)</td><td>(93.2, 91.9, 96.5)</td></tr><tr><td>KSDD2</td><td>(93.5, 71.4, 77.9)</td><td>(90.3, 70.0, 74.4)</td><td>(95.2, 84.4, 88.2)</td><td>(92.1, 71.0, 77.8)</td><td>(95.9, 84.5, 95.9)</td><td>(97.3, 92.3, 97.9)</td></tr><tr><td>RSDD</td><td>(85.3, 73.5, 65.3)</td><td>(73.1, 59.7, 50.5)</td><td>(88.3, 74.1, 73.9)</td><td>(73.5, 59.0, 55.0)</td><td>(89.1, 75.0, 70.8)</td><td>(94.1, 89.6, 92.3)</td></tr><tr><td>DAGM</td><td>(89.6, 86.4, 90.4)</td><td>(90.4, 86.9, 90.1)</td><td>(90.8, 88.4, 90.5)</td><td>(95.6, 93.2, 94.6)</td><td>(96.5, 94.1, 95.7)</td><td>(97.7, 95.7, 97.0)</td></tr><tr><td>DTD-Synthetic</td><td>(95.0, 94.3, 97.9)</td><td>(83.9, 89.4, 93.6)</td><td>(91.5, 91.8, 96.8)</td><td>(94.5, 94.5, 97.7)</td><td>(92.8, 92.2, 97.0)</td><td>(95.1, 95.1, 98.4)</td></tr><tr><td rowspan="6">Pixel-level (AUROC, PRO, AP)</td><td>MVTec-AD VisA</td><td>(85.1, 64.6, 18.0)</td><td>(87.6, 44.0, 40.8)</td><td>(89.8, 70.6, 40.0)</td><td>(91.1, 81.4, 34.5)</td><td>(86.8, 33.8, 38.1)</td><td>(91.8, 87.4, 48.3)</td></tr><tr><td>BTAD</td><td>(71.4, 32.8, 11.2)</td><td>(91.3, 23.0, 32.9)</td><td>(93.1, 59.8, 46.7)</td><td>(93.3, 69.3, 42.0)</td><td>(87.7, 17.1, 36.6)</td><td>(93.9, 76.6, 47.1)</td></tr><tr><td>KSDD2</td><td>(97.9, 91.2, 17.1)</td><td>(97.9, 51.1, 61.6)</td><td>(99.3, 85.4, 58.9)</td><td>(99.4, 92.7, 41.8)</td><td>(96.1, 70.8, 56.4)</td><td>(99.6, 97.6, 73.7)</td></tr><tr><td>RSDD</td><td>(95.1, 75.4, 2.1)</td><td>(99.4, 64.9, 30.6)</td><td>(99.2, 90.1, 31.9)</td><td>(99.1, 92.0, 19.1)</td><td>(99.5, 50.5, 38.2)</td><td>(99.6, 98.0, 39.1)</td></tr><tr><td>DAGM</td><td>(83.2, 55.4, 3.1)</td><td>(99.2, 44.7, 42.6)</td><td>(99.0, 83.1, 40.7)</td><td>(99.1, 93.6, 29.5)</td><td>(97.0, 40.9, 44.2)</td><td>(99.3, 98.0, 43.1)</td></tr><tr><td>DTD-Synthetic</td><td>(82.5, 55.4, 11.6)</td><td>(96.6, 41.6, 67.3)</td><td>(97.1, 68.7, 62.3)</td><td>(97.6, 88.3, 52.4)</td><td>(94.1, 24.9, 52.8)</td><td>(97.8, 94.3, 69.9)</td></tr><tr><td rowspan="8">Medical</td><td rowspan="3">Image-level (AUROC, F1-Max, AP)</td><td>HeadCT</td><td>(83.7, 78.8, 81.6)</td><td>(89.3, 82.0, 89.6)</td><td>(93.8, 90.5, 92.2)</td><td>(95.3, 89.7, 95.2)</td><td>(93.4, 86.5, 92.2)</td><td>(96.5, 92.9, 95.5)</td></tr><tr><td>BrainMRI</td><td>(92.0, 84.2, 90.7)</td><td>(89.6, 85.3, 84.5)</td><td>(92.8, 88.7, 85.5)</td><td>(96.1, 92.3, 92.3)</td><td>(94.9, 90.4, 94.2)</td><td>(96.2, 92.8, 92.4)</td></tr><tr><td>Br35H</td><td>(80.5, 74.1, 82.2)</td><td>(93.1, 85.4, 92.9)</td><td>(96.0, 90.8, 95.5)</td><td>(97.3, 92.4, 96.1)</td><td>(95.7, 89.1, 95.7)</td><td>(97.8, 93.6, 96.2)</td></tr><tr><td rowspan="5">Pixel-level (AUROC, PRO, AP)</td><td>ISIC</td><td>(83.3, 55.1, 62.4)</td><td>(85.8, 13.7, 69.8)</td><td>(81.6, 29.0, 65.5)</td><td>(88.4, 78.1, 74.4)</td><td>(85.4, 5.3, 70.6)</td><td>(92.2, 87.6, 84.6)</td></tr><tr><td>CVC-ColonDB</td><td>(64.8, 28.4, 14.3)</td><td>(78.4, 28.0, 23.2)</td><td>(80.3, 58.8, 23.7)</td><td>(81.9, 71.4, 31.3)</td><td>(79.3, 6.5, 26.2)</td><td>(82.1, 76.1, 31.9)</td></tr><tr><td>CVC-ClinicDB</td><td>(70.7, 32.5, 19.4)</td><td>(86.0, 41.2, 38.8)</td><td>(85.8, 69.7, 39.0)</td><td>(85.9, 69.6, 42.2)</td><td>(84.3, 14.6, 36.0)</td><td>(89.6, 78.4, 53.2)</td></tr><tr><td>Endo</td><td>(68.2, 28.3, 23.8)</td><td>(84.1, 32.3, 47.9)</td><td>(85.6, 57.0, 51.7)</td><td>(86.3, 67.3, 50.4)</td><td>(84.0, 10.5, 44.8)</td><td>(89.2, 74.8, 58.6)</td></tr><tr><td>Kvasir</td><td>(69.8, 31.0, 27.5)</td><td>(80.2, 27.1, 42.4)</td><td>(82.5, 48.1, 46.2)</td><td>(81.8, 53.8, 42.5)</td><td>(79.4, 12.3, 43.8)</td><td>(85.4, 63.9, 54.2)</td></tr></table>
|
| 188 |
+
|
| 189 |
+
and medical domains are conducted. Specifically, we utilize seven commonly used industrial anomaly detection datasets, including MVTec-AD [4], VisA [50], BTAD [31], KSDD2 [6], RSDD [46], DAGM [12] and DTD-Synthetic [3]. Eight different datasets in the medical domain are used, including HeadCT [39], BrainMRI [22], and Br35H [16] for brain tumor classification, CVC-ColonDB [40], CVCClinicDB [5], Endo [17], and Kvasir [19] for colon polyp segmentation and ISIC [11] for skin cancer detection. Following [10, 33], we perform auxiliary training on one industrial dataset and directly infer on other industrial and medical datasets. Since the categories in VisA do not overlap with those in the other datasets, we use VisA as the auxiliary training set. To assess VisA itself, we fine-tune our model on the MVTec-AD dataset. More details about the datasets can be found in Appendix C.
|
| 190 |
+
|
| 191 |
+
Evaluation Metrics. For classification, we report image-level metrics: Area Under the Receiver Operating Characteristic (AUROC), the maximum F1 score at the optimal threshold (F1-Max) and the average precision (AP). For segmentation, pixel-level AUROC, AP and Per-Region Overlap (PRO) are employed to evaluate the model's ability.
|
| 192 |
+
|
| 193 |
+
Implementation Details. The publicly available CLIP (ViT-L-14-336) pretrained by OpenAI [34] is adopted in this study. Following previous works [8, 9, 49], we standardize the resolution of input images to $518 \times 518$ and select the 6th, 12th, 18th, 24th layers from the 24-layer image encoder to extract patch embeddings. The number of prompts $B$ in the prompt banks is set to 3 and flow length $K$ is set to 10 by default. The length of learnable context vectors $P$ and learnable state vectors $Q$ are both set to 5. During the auxiliary training and inference stages, the number of Monte Carlo sampling interations $R$ is set to 1 and 10, respectively. We use the Adam [24] optimizer to train our Bayes-PFL for
|
| 194 |
+
|
| 195 |
+
a total of 20 epochs, with an initial learning rate of 0.0001 and a batch size of 32. All experiments are conducted on a single NVIDIA 3090 GPU, with 5 random seeds selected. The experimental results are the averages of different object categories from the target dataset. More implementation details can be found in Appendix A.1.
|
| 196 |
+
|
| 197 |
+
# 4.2. Comparison with State-of-the-art methods
|
| 198 |
+
|
| 199 |
+
In this study, five SOTA methods are employed for comparison with our Bayes-PFL, including WinCLIP [18], APRILGAN [9], CLIP-AD [10], AnomalyCLIP [49], and Ada-CLIP [8]. To ensure a fair comparison, we use the same backbone, input image resolution, and experimental settings (training on VisA and testing on other datasets) for all methods. More details regarding the comparison of these methods are shown in Appendix A.2.
|
| 200 |
+
|
| 201 |
+
Quantitative Comparison. Table 1 presents the quantitative results of ZSAD across different datasets in both industrial and medical domains. Our Bayes-PFL achieves state-of-the-art performance on image-level and pixel-level metrics across nearly all datasets in comparison with other methods. For example, on the medical dataset ISIC, our Bayes-PFL outperforms the second-best approach by $3.8\%$ , $9.5\%$ , and $10.2\%$ in pixel-level AUROC, PRO, and AP, respectively. The poor PRO performance of AdaCLIP is attributed to the high variance in its predicted anomaly scores and its limited ability to effectively detect large anomalous regions. In contrast, Bayes-PFL explores a broader prompt space by sampling from the distribution, enhancing the detection of large anomalous regions. Note that the anomaly detection results on the medical dataset are directly derived from the fine-tuned weights of the industrial dataset VisA, indicating that the feature spaces for anomalies in these two domains overlap to some extent.
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 4. Pixel-level AP during the test stage at different epochs on the MVTec-AD dataset.
|
| 205 |
+
|
| 206 |
+
Qualitative Comparison. Figure 3 visualizes anomaly maps from both industrial and medical datasets. It can be observed that our Bayes-PFL achieves more accurate segmentation results and more complete anomaly region localization compared to other methods. Especially in categories from the medical domain (e.g., colon, skin), our method demonstrates a significant advantage. These results indicate that the learned prompt distribution can cover a more comprehensive prompt space and capture the anomaly semantics in images from different novel categories.
|
| 207 |
+
|
| 208 |
+
Performance comparison at different training epochs. In Figure 4, we compare APRIL-GAN [9] and AnomalyCLIP [49], which employ two different text prompt design strategies, with our Bayes-PFL across various training epochs. The pixel-level AP during testing is reported to evaluate ZSAD performance. For a fair comparison, we modify these methods by replacing only their text prompt designs while keeping all other components identical to Bayes-PFL. These modified versions are referred to as APRIL-GAN+ and AnomalyCLIP+, respectively. Our Bayes-PFL achieves stable and consistently improving AP throughout training, surpassing the other two methods and highlighting the advantages of our prompt flow learning approach. In contrast, APRIL-GAN+ and AnomalyCLIP+ exhibit performance declines after reaching their peak AP values, with the latter showing a more significant degradation. In Appendix B.4, we further explore this phenomenon and analyze the reasons behind it.
|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 3. Qualitative comparison of anomaly segmentation results across different ZSAD methods. The images in the first four columns are from the industrial datasets MVTec-AD [4], VisA [50], whereas those in the last four columns are from the medical datasets ISIC [11], Kvasir [19], and CVC-ClinicDB [5].
|
| 214 |
+
Figure 5. Absolute AP improvement of using our ISD-IAD compared to ISD-ISD and IAD-IAD.
|
| 215 |
+
|
| 216 |
+
Remark. Our Bayes-PFL outperforms other SOTA approaches for three main reasons: 1) The prompt flow module effectively regularizes the prompt space with ISD and IAD, thereby enhancing the model's generalization performance on unseen categories; 2) The distribution sampling adaptively generates diverse text prompts to cover the prompt space. The ensemble of results from rich prompts enables better ZSAD performance in Bayes-PFL; 3) The RCA module facilitates cross-modal intersection and enhances the alignment capability of different modalities.
|
| 217 |
+
|
| 218 |
+
# 4.3. Image-specific vs. Image-agnostic distribution
|
| 219 |
+
|
| 220 |
+
In Bayes-PFL, ISD and IAD are modeled in the context and state word embedding spaces, respectively, referred to collectively as ISD-IAD. A natural question arises: why not use ISD-ISD or IAD-IAD instead? In Figure 5, we compare the absolute AP improvement achieved by using ISD-IAD over ISD-ISD and IAD-IAD across six industrial datasets. Higher values indicate a more pronounced advantage of our approach. It can be observed that all metrics are positive, indicating that ISD-IAD outperforms the other two distribution design strategies. This is because the text prompts need to learn unified normal and abnormal semantics across different categories, making the static IAD more suitable for capturing category-invariant state representations. The dynamic ISD incorporates visual features, aiding in the acquisition of rich contextual information (e.g., object background) in the context word embeddings.
|
| 221 |
+
|
| 222 |
+
Table 2. Ablation on different components.
|
| 223 |
+
|
| 224 |
+
<table><tr><td rowspan="2" colspan="2"></td><td colspan="2">Image-level</td><td colspan="2">Pixel- level</td></tr><tr><td>AUROC</td><td>AP</td><td>AUROC</td><td>AP</td></tr><tr><td rowspan="4">Module Ablation</td><td>w/o ISD</td><td>89.1</td><td>94.5</td><td>88.3</td><td>46.5</td></tr><tr><td>w/o IAD</td><td>90.3</td><td>95.2</td><td>89.5</td><td>47.2</td></tr><tr><td>w/o ISD, IAD</td><td>88.6</td><td>93.3</td><td>87.1</td><td>45.6</td></tr><tr><td>w/o RCA</td><td>91.8</td><td>95.9</td><td>89.7</td><td>46.1</td></tr><tr><td>Loss Ablation</td><td>w/o Lort</td><td>91.2</td><td>96.0</td><td>90.2</td><td>47.3</td></tr><tr><td rowspan="4">Classification Ablation</td><td>w/o xcls</td><td>89.3</td><td>94.4</td><td>—</td><td>—</td></tr><tr><td>w/o xpatch</td><td>90.9</td><td>95.8</td><td>—</td><td>—</td></tr><tr><td>w/o stext</td><td>89.0</td><td>95.1</td><td>—</td><td>—</td></tr><tr><td>w/o simg</td><td>90.9</td><td>95.3</td><td>—</td><td>—</td></tr><tr><td></td><td>Bayes-PFL</td><td>92.3</td><td>96.7</td><td>91.8</td><td>48.3</td></tr></table>
|
| 225 |
+
|
| 226 |
+
Table 3. Ablation on the number of Monte Carlo sampling iterations during inference. (mean±std)
|
| 227 |
+
|
| 228 |
+
<table><tr><td rowspan="2">R</td><td colspan="2">Image-level</td><td colspan="2">Pixel-level</td><td rowspan="2">Time (ms)</td></tr><tr><td>AUROC</td><td>AP</td><td>AUROC</td><td>AP</td></tr><tr><td>1</td><td>89.5±1.1</td><td>94.1±1.2</td><td>87.1±1.3</td><td>45.4±0.6</td><td>132.2±1.6</td></tr><tr><td>3</td><td>90.0±1.0</td><td>94.8±0.9</td><td>88.2±1.2</td><td>46.1±0.6</td><td>200.3±1.4</td></tr><tr><td>5</td><td>91.1±0.8</td><td>95.4±0.9</td><td>89.5±1.0</td><td>46.8±0.5</td><td>254.2±1.4</td></tr><tr><td>7</td><td>92.0±0.7</td><td>96.3±0.8</td><td>90.9±0.8</td><td>47.5±0.5</td><td>297.4±1.7</td></tr><tr><td>10</td><td>92.7±0.4</td><td>96.8±0.5</td><td>91.8±0.6</td><td>48.3±0.4</td><td>388.5±1.5</td></tr><tr><td>13</td><td>92.7±0.4</td><td>96.9±0.5</td><td>91.9±0.5</td><td>48.4±0.4</td><td>467.5±1.5</td></tr><tr><td>16</td><td>92.8±0.3</td><td>96.9±0.4</td><td>92.0±0.4</td><td>48.6±0.3</td><td>621.6±1.6</td></tr><tr><td>20</td><td>92.9±0.2</td><td>97.0±0.2</td><td>92.1±0.2</td><td>48.9±0.1</td><td>726.1±1.7</td></tr></table>
|
| 229 |
+
|
| 230 |
+
# 4.4. Ablation
|
| 231 |
+
|
| 232 |
+
In this subsection, ablation experiments on the MVtec-AD dataset are conducted to further investigate the impact of different settings on the proposed Bayes-PFL.
|
| 233 |
+
|
| 234 |
+
Influence of different components. Ablation studies on modules, loss functions, and classifications are conducted separately, as summarized in Table 2. The module ablation study shows that ZSAD performance declines when the RCA module or any distribution type in the prompt flow module is removed. Notably, omitting ISD results in a greater performance drop than omitting IAD in all metrics, indicating that context distribution modeling conditioned on the image has a greater impact on generalization ability. Not using the orthogonal loss $\mathcal{L}_{\text{ort}}$ also leads to a decrease of approximately $1\%$ in both image-level and pixel-level metrics. In the classification ablation study, the best performance is achieved when all components are included. This suggests that the results from the text and image branches complement each other, and integrating fine-grained patch features into the global image features $\mathbf{x}_{\text{cls}}$ from the vanilla CLIP model helps enhance classification performance.
|
| 235 |
+
|
| 236 |
+
Influence of the number of sampling iterations. The ZSAD performance on novel categories under different sampling iterations $R$ is presented in Table 3. Additionally, the standard deviation and average inference time per image (calculated from 50 images) are reported to assess the stability of the results and inference efficiency. As the number
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
Figure 6. Visualization of different ensemble modes.
|
| 240 |
+
|
| 241 |
+
Table 4. Ablation on different ensemble mode
|
| 242 |
+
|
| 243 |
+
<table><tr><td rowspan="2">Ensemble Mode</td><td colspan="2">Image-level</td><td colspan="2">Pixel-level</td><td rowspan="2">Time (ms)</td></tr><tr><td>AUROC</td><td>AP</td><td>AUROC</td><td>AP</td></tr><tr><td>Text Ensemble</td><td>92.0</td><td>96.3</td><td>91.1</td><td>47.6</td><td>436.6</td></tr><tr><td>Image Ensemble</td><td>92.3</td><td>96.7</td><td>91.8</td><td>48.3</td><td>443.4</td></tr></table>
|
| 244 |
+
|
| 245 |
+
of sampling iterations increases, our method demonstrates improved zero-shot generalization performance and stability, but at the cost of longer inference times. Consequently, we identified a trade-off at $R = 10$ , which is set as the default value in our experiments. More ablation studies on the hyperparameters can be found in Appendix B.
|
| 246 |
+
|
| 247 |
+
Influence of the ensemble mode. Given the text embeddings $\mathbf{t}_{b,r}^n$ and $\mathbf{t}_{b,r}^a$ , we consider two ensemble modes: 1) Text ensemble, where text embeddings are averaged first and then aligned with image features; and 2) Image ensemble, where image features are aligned separately first, followed by averaging the anomaly scores or maps. Table 4 compares the ZSAD performance of these modes along with the average inference time per image. The results show that image ensemble outperforms text ensemble while maintaining comparable inference efficiency. As illustrated in Figure 6, image ensemble produces more complete detection results with higher confidence in anomalous regions. Therefore, we adopt image ensemble as the default approach for generating the final ZSAD results.
|
| 248 |
+
|
| 249 |
+
# 5. Conclusion
|
| 250 |
+
|
| 251 |
+
This paper presents a novel ZSAD method, Bayes-PFL, which models text prompt spaces as a probabilistic distribution. A prompt flow module generates ISD and IAD to model context and state prompt spaces, capturing prompt uncertainty and enhancing generalization to new categories by regularizing the prompt space. Rich text prompts are generated by combining distribution sampling with prompt banks, improving ZSAD performance through an ensemble approach. Additionally, an RCA module aligns dynamic text embeddings with fine-grained image features. These designs enable Bayes-PFL to achieve state-of-the-art ZSAD performance on 15 publicly available industrial and medical datasets.
|
| 252 |
+
|
| 253 |
+
# Acknowledgement
|
| 254 |
+
|
| 255 |
+
This work is supported in part by the National Science and Technology Major Project of China under Grant 2022ZD0119402; in part by the National Natural Science Foundation of China under Grant No 62373350 and 62371179; in part by the Youth Innovation Promotion Association CAS (2023145); in part by the Beijing Nova Program 20240484687.
|
| 256 |
+
|
| 257 |
+
# References
|
| 258 |
+
|
| 259 |
+
[1] Christophe Andrieu, Nando De Freitas, Arnaud Doucet, and Michael I Jordan. An introduction to mcmc for machine learning. Machine learning, 50:5-43, 2003. 3
|
| 260 |
+
[2] Syed Muhammad Anwar, Muhammad Majid, Adnan Qayyum, Muhammad Awais, Majdi Alnowami, and Muhammad Khurram Khan. Medical image analysis using convolutional neural networks: a review. Journal of medical systems, 42:1-13, 2018. 1
|
| 261 |
+
[3] Toshimichi Aota, Lloyd Teh Tzer Tong, and Takayuki Okatani. Zero-shot versus many-shot: Unsupervised texture anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 5564-5572, 2023. 6
|
| 262 |
+
[4] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Mvtec ad-a comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9592-9600, 2019. 6, 7
|
| 263 |
+
[5] Jorge Bernal, F Javier Sánchez, Gloria Fernández-Esparrach, Debora Gil, Cristina Rodríguez, and Fernando Vilarino. Wm-dova maps for accurate polyp highlighting in colonoscopy: Validation vs. saliency maps from physicians. Computerized medical imaging and graphics, 43:99-111, 2015. 6, 7
|
| 264 |
+
[6] Jakob Božić, Domen Tabernik, and Danijel Skočaj. Mixed supervision for surface-defect detection: From weakly to fully supervised learning. Computers in Industry, 129: 103459, 2021. 6
|
| 265 |
+
[7] Yunkang Cao, Xiaohao Xu, Chen Sun, Yuqi Cheng, Zongwei Du, Liang Gao, and Weiming Shen. Segment any anomaly without training via hybrid prompt regularization. arXiv preprint arXiv:2305.10724, 2023. 2
|
| 266 |
+
[8] Yunkang Cao, Jiangning Zhang, Luca Frittoli, Yuqi Cheng, Weiming Shen, and Giacomo Boracchi. Adaclip: Adapting clip with hybrid learnable prompts for zero-shot anomaly detection. In European Conference on Computer Vision, pages 55-72. Springer, 2025. 1, 2, 3, 6
|
| 267 |
+
[9] Xuhai Chen, Yue Han, and Jiangning Zhang. A zero-/few-shot anomaly classification and segmentation method for cvpr 2023 vand workshop challenge tracks 1&2: 1st place on zero-shot ad and 4th place on few-shot ad. arXiv preprint arXiv:2305.17382, 2023. 2, 3, 6, 7
|
| 268 |
+
[10] Xuhai Chen, Jiangning Zhang, Guanzhong Tian, Haoyang He, Wuhao Zhang, Yabiao Wang, Chengjie Wang, Yunsheng
|
| 269 |
+
|
| 270 |
+
Wu, and Yong Liu. Clip-ad: A language-guided staged dualpath model for zero-shot anomaly detection. arXiv preprint arXiv:2311.00453, 2023. 2, 3, 6
|
| 271 |
+
[11] Noel CF Codella, David Gutman, M Emre Celebi, Brian Helba, Michael A Marchetti, Stephen W Dusza, Aadi Kalloo, Konstantinos Liopyris, Nabin Mishra, Harald Kittler, et al. Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (isbi), hosted by the international skin imaging collaboration (isic). In 2018 IEEE 15th international symposium on biomedical imaging (ISBI 2018), pages 168-172. IEEE, 2018. 1, 6, 7
|
| 272 |
+
[12] Deutsche Arbeitsgemeinschaft für Mustererkennung. Weakly supervised learning for industrial optical inspection, 2007. 6
|
| 273 |
+
[13] Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Hao Li, Ming Tang, and Jinqiao Wang. Filo: Zero-shot anomaly detection by fine-grained description and high-quality localization. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 2041-2049, 2024. 2
|
| 274 |
+
[14] Zixian Guo, Bowen Dong, Zhilong Ji, Jinfeng Bai, Yiwen Guo, and Wangmeng Zuo. Texts as images in prompt tuning for multi-label image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2808-2817, 2023. 2
|
| 275 |
+
[15] Ziyu Guo, Renrui Zhang, Longtian Qiu, Xianzheng Ma, Xu-peng Miao, Xuming He, and Bin Cui. Calip: Zero-shot enhancement of clip with parameter-free attention. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 746-754, 2023. 2
|
| 276 |
+
[16] A. Hamada. Br35h: Brain tumor detection 2020. Online. Available: https://www.kaggle.com/datasets/ahmedhamada0/brain-tumor-detection, 2020. 6
|
| 277 |
+
[17] Steven A Hicks, Debesh Jha, Vajira Thambawita, Pål Halvorsen, Hugo L Hammer, and Michael A Riegler. The endotect 2020 challenge: evaluation and comparison of classification, segmentation and inference time for endoscopy. In Pattern Recognition. ICPR International Workshops and Challenges: Virtual Event, January 10-15, 2021, Proceedings, Part VIII, pages 263-274. Springer, 2021. 6
|
| 278 |
+
[18] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran, and Onkar Dabeer. Winclip: Zero/few-shot anomaly classification and segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 19606-19616, 2023. 1, 2, 3, 6
|
| 279 |
+
[19] Debesh Jha, Pia H Smedsrud, Michael A Riegler, Pål Halvorsen, Thomas De Lange, Dag Johansen, and Håvard D Johansen. Kvasir-seg: A segmented polyp dataset. In MultiMedia modeling: 26th international conference, MMM 2020, Daejeon, South Korea, January 5–8, 2020, proceedings, part II 26, pages 451–462. Springer, 2020. 6, 7
|
| 280 |
+
[20] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In International
|
| 281 |
+
|
| 282 |
+
conference on machine learning, pages 4904-4916. PMLR, 2021. 1
|
| 283 |
+
[21] Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine learning, 37:183-233, 1999. 4
|
| 284 |
+
[22] Pranita Balaji Kanade and PP Gumaste. Brain tumor detection using mri images. *Brain*, 3(2):146–150, 2015. 6
|
| 285 |
+
[23] Diederik P Kingma. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 5
|
| 286 |
+
[24] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6
|
| 287 |
+
[25] Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4015-4026, 2023. 2
|
| 288 |
+
[26] Boyi Li, Kilian Q Weinberger, Serge Belongie, Vladlen Koltun, and Rene Ranftl. Language-driven semantic segmentation. In International Conference on Learning Representations, 2022. 2
|
| 289 |
+
[27] Shengze Li, Jianjian Cao, Peng Ye, Yuhan Ding, Chongjun Tu, and Tao Chen. Clipsam: Clip and sam collaboration for zero-shot anomaly segmentation. arXiv preprint arXiv:2401.12665, 2024. 2
|
| 290 |
+
[28] Shilong Liu, Zhaoyang Zeng, Tianhe Ren, Feng Li, Hao Zhang, Jie Yang, Qing Jiang, Chunyuan Li, Jianwei Yang, Hang Su, et al. Grounding dino: Marrying dino with grounded pre-training for open-set object detection. arXiv preprint arXiv:2303.05499, 2023. 2
|
| 291 |
+
[29] Dwarikanath Mahapatra, Behzad Bozorgtabar, and Zongyuan Ge. Medical image classification using generalized zero shot learning. In Proceedings of the IEEE/CVF international conference on computer vision, pages 3344-3353, 2021. 1
|
| 292 |
+
[30] Fausto Milletari, Nassir Navab, and Seyed-Ahmad Ahmadi. V-net: Fully convolutional neural networks for volumetric medical image segmentation. In 2016 fourth international conference on 3D vision (3DV), pages 565-571. IEEE, 2016. 5
|
| 293 |
+
[31] Pankaj Mishra, Riccardo Verk, Daniele Fornasier, Claudio Piciarelli, and Gian Luca Foresti. Vt-adl: A vision transformer network for image anomaly detection and localization. In 2021 IEEE 30th International Symposium on Industrial Electronics (ISIE), pages 01-06. IEEE, 2021. 6
|
| 294 |
+
[32] Zhen Qu, Xian Tao, Fei Shen, Zhengtao Zhang, and Tao Li. Investigating shift equivalence of convolutional neural networks in industrial defect segmentation. IEEE Transactions on Instrumentation and Measurement, 72:1-17, 2023. 1
|
| 295 |
+
[33] Zhen Qu, Xian Tao, Mukesh Prasad, Fei Shen, Zhengtao Zhang, Xinyi Gong, and Guiguang Ding. Vcp-clip: A visual context prompting model for zero-shot anomaly segmentation. In European Conference on Computer Vision, pages 301–317. Springer, 2024. 2, 3, 6
|
| 296 |
+
[34] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,
|
| 297 |
+
|
| 298 |
+
Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748-8763. PMLR, 2021. 1, 2, 6
|
| 299 |
+
[35] Yongming Rao, Wenliang Zhao, Guangyi Chen, Yansong Tang, Zheng Zhu, Guan Huang, Jie Zhou, and Jiwen Lu. Denseclip: Language-guided dense prediction with context-aware prompting. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 18082-18091, 2022. 2
|
| 300 |
+
[36] Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning, pages 1530-1538. PMLR, 2015. 4
|
| 301 |
+
[37] T-YLPG Ross and GKHP Dólár. Focal loss for dense object detection. In proceedings of the IEEE conference on computer vision and pattern recognition, pages 2980-2988, 2017. 5
|
| 302 |
+
[38] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by back-propagating errors. nature, 323(6088):533-536, 1986. 4
|
| 303 |
+
[39] Mohammadreza Salehi, Niousha Sadjadi, Soroosh Baselizadeh, Mohammad H Rohban, and Hamid R Rabiee. Multiresolution knowledge distillation for anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14902-14912, 2021. 6
|
| 304 |
+
[40] Nima Tajbakhsh, Suryakanth R Gurudu, and Jianming Liang. Automated polyp detection in colonoscopy videos using shape and context information. IEEE transactions on medical imaging, 35(2):630-644, 2015. 6
|
| 305 |
+
[41] Xian Tao, Xinyi Gong, Xin Zhang, Shaohua Yan, and Chandranath Adak. Deep learning for unsupervised anomaly localization in industrial images: A survey. IEEE Transactions on Instrumentation and Measurement, 71:1-21, 2022. 1
|
| 306 |
+
[42] Ao Wang, Hui Chen, Lihao Liu, Kai CHEN, Zijia Lin, Jungong Han, and Guiguang Ding. YOLOv10: Real-time end-to-end object detection. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. 1
|
| 307 |
+
[43] Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, and Xiaolong Wang. Groupvit: Semantic segmentation emerges from text supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18134-18144, 2022. 2
|
| 308 |
+
[44] Hantao Yao, Rui Zhang, and Changsheng Xu. Visual-language prompt tuning with knowledge-guided context optimization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 6757-6767, 2023. 2
|
| 309 |
+
[45] Gunwoo Yong, Kahiyun Jeon, Daeyoung Gil, and Ghang Lee. Prompt engineering for zero-shot and few-shot defect detection and classification using a visual-language pretrained model. Computer-Aided Civil and Infrastructure Engineering, 38(11):1536-1554, 2023. 2
|
| 310 |
+
[46] Haomin Yu, Qingyong Li, Yunqiang Tan, Jinrui Gan, Jianzhu Wang, Yangli-ao Geng, and Lei Jia. A coarse-to-fine model for rail surface defect detection. IEEE Transactions on Instrumentation and Measurement, 68(3):656-666, 2018. 6
|
| 311 |
+
|
| 312 |
+
[47] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16816-16825, 2022. 2
|
| 313 |
+
[48] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9):2337-2348, 2022. 2
|
| 314 |
+
[49] Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, and Jiming Chen. Anomalyclip: Object-agnostic prompt learning for zero-shot anomaly detection. In The Twelfth International Conference on Learning Representations, 2023. 2, 3, 6, 7
|
| 315 |
+
[50] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. Spot-the-difference self-supervised pretraining for anomaly detection and segmentation. In European Conference on Computer Vision, pages 392-408. Springer, 2022. 6, 7
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:485540215b84e3458fd35985d69f8ab77eb5663b80e2e771fdbd9d12d483bb55
|
| 3 |
+
size 730517
|
CVPR/2025/Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22786b862a0f146fefaaaa399d25d5d88a2c342cae89dd66265e8605677c5296
|
| 3 |
+
size 424750
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fa9a1e81d79d8bab63d991a7458cc87d8740acc1dd5511efea156c2a3900ccc
|
| 3 |
+
size 83609
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77619f9d03f5824c7dccd04bf27b27154284f1337ee826aaedd15d750b88a95d
|
| 3 |
+
size 105275
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/9baebd5d-b536-4152-82cb-58b5dd6689d1_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ea8db7b1d4c8f4f34a27b2f5fe565f9874f876f3390af68f00d04a74f6ab17b
|
| 3 |
+
size 539998
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/full.md
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Bayesian Test-Time Adaptation for Vision-Language Models
|
| 2 |
+
|
| 3 |
+
Lihua Zhou $^{1}$ , Mao Ye $^{2}$ , Shuaifeng Li $^{2}$ , Nianxin Li $^{2}$ , Xiatian Zhu $^{3}$ , Lei Deng $^{4}$ , Hongbin Liu $^{1,5}$ , Zhen Lei $^{1,5,6,7*}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ CAIR, HKSIS, CAS, $^{2}$ UESTC, $^{3}$ University of Surrey, $^{4}$ Shenzhen University,
|
| 6 |
+
|
| 7 |
+
$^{5}$ MAIS, Institute of Automation, CAS, $^{6}$ SAI, UCAS, $^{7}$ M.U.S.T
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Test-time adaptation with pre-trained vision-language models, such as CLIP, aims to adapt the model to new, potentially out-of-distribution test data. Existing methods calculate the similarity between visual embedding and learnable class embeddings, which are initialized by text embeddings, for zero-shot image classification. In this work, we first analyze this process based on Bayes theorem, and observe that the core factors influencing the final prediction are the likelihood and the prior. However, existing methods essentially focus on adapting class embeddings to adapt likelihood, but they often ignore the importance of prior. To address this gap, we propose a novel approach, Bayesian Class Adaptation (BCA), which in addition to continuously updating class embeddings to adapt likelihood, also uses the posterior of incoming samples to continuously update the prior for each class embedding. This dual updating mechanism allows the model to better adapt to distribution shifts and achieve higher prediction accuracy. Our method not only surpasses existing approaches in terms of performance metrics but also maintains superior inference rates and memory usage, making it highly efficient and practical for real-world applications.
|
| 12 |
+
|
| 13 |
+
# 1. Introduction
|
| 14 |
+
|
| 15 |
+
Recent advances in visual tasks have seen a growing preference for using pre-trained vision-language models like CLIP [18, 22, 33, 46], which leverage large-scale paired image-text data enables it to learn rich, multi-modal representations that generalize well to a variety of downstream tasks [24]. However, when deploying CLIP in real-world environments, the distribution discrepancy between the pretrained data and the environment data can lead to performance degradation [23, 25, 45, 56, 57]. To address this issue in real-time, test-time adaptation (TTA), which aims adapt the pre-trained model to new, potentially out-of-distribution
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
(a) Fixed prior
|
| 21 |
+
(b) Adaptive prior
|
| 22 |
+
Figure 1. Fixed Prior vs. Adaptive Prior: Comparison of Diagnosis Outcomes. In the fixed prior scenario, patients with fever are consistently diagnosed with the common cold, regardless of whether it is a normal period or a COVID-19 period. In contrast, the adaptive prior scenario adjusts the diagnosis based on the current context. During normal periods, patients with fever are diagnosed with the common cold, while during the COVID-19 period, they are more likely to be diagnosed with COVID-19. This demonstrates the importance of performing prior adaptation in different environments.
|
| 23 |
+
|
| 24 |
+
test data during the inference phase, have been applied to the CLIP [9, 11, 19, 38].
|
| 25 |
+
|
| 26 |
+
Existing TTA methods based on CLIP can be roughly divided into two categories. Early methods [9, 38] fine-tune the text prompts by minimizing the entropy of prediction to generate new class embeddings, which requires backpropagation and can be time-consuming, and then calculate the similarity between visual embedding and these new class embeddings for zero-shot classification. In fact, this approach is not in line with the TTA problem setting, which emphasizes real-time adaptation. Therefore, recent methods [11, 19] have begun to use memory to continuously store visual embeddings to increase the number of class embeddings or employ statistical methods to update class embeddings with incoming visual embedding, and then per
|
| 27 |
+
|
| 28 |
+
form classification with these updated class embeddings. These approaches can perform real-time test-time adaptation, aligning more closely with the TTA problem setting.
|
| 29 |
+
|
| 30 |
+
Essentially, current test-time adaptation methods based on CLIP generate initial class embeddings $\mathbf{U} = \{\pmb{\mu}_m\}_{m=1}^M$ by encoding text prompts and dynamically update these class embeddings $\mathbf{U}$ to update the logits (or probability) $P(\mathbf{x}|\mathbf{U})$ , which is also known as the likelihood, to better adapt to the test environment distribution during the test phase, thereby making a better prediction $P(Y|\mathbf{x})$ , which is also called the posterior. In this work, we leverage the Bayes theorem to analyze and observe that the posterior $P(Y|\mathbf{x})$ is influenced not only by the likelihood $P(\mathbf{x}|\mathbf{U})$ but also by the prior $P(Y|\mathbf{U})$ , which reflects initial belief about the categories $Y$ given the class embeddings $\mathbf{U}$ . However, existing methods [9, 11, 19, 38] all ignore this point and use the fixed prior from pre-trained CLIP, which inevitably leads to suboptimal solutions when the test data distribution significantly deviates from the pre-trained data distribution. We also give a related example in Figure 1. Please note that we focus on the conditional prior $P(Y|\mathbf{U})$ rather than $P(Y)$ . Unless otherwise specified, the prior we refer to in this work is $P(Y|\mathbf{U})$ .
|
| 31 |
+
|
| 32 |
+
In this work, we propose Bayesian Class Adaptation (BCA), which not only considers only consider the likelihood adaptation as in previous methods, but also incorporate the prior adaptation. When a test image arrives, its visual embedding is computed using the visual encoder of CLIP, and the probability of belonging to each class embedding is calculated based on the current likelihood. For likelihood adaptation, the most similar class embedding is selected and updated using a statistical method by recalculating the mean of the selected class embedding with the current visual embedding. For prior adaptation, the probability of belonging to each class embedding are combined with the current prior to compute the posterior for each category. The category with the highest posterior probability is selected as the most likely category for the image. The prior of the selected class embedding is updated by recalculating the mean with the posterior. This dynamic update mechanism helps the model adapt to the test distribution, thereby enhancing the robustness and accuracy of zero-shot image classification in real-world applications. Despite its simplicity, the method ensures high inference rates and low memory usage, making it highly suitable for TTA scenarios. Our contributions are as follows:
|
| 33 |
+
|
| 34 |
+
1. Comprehensive Analysis: We leverage the Bayes theorem to analyze the process of CLIP performing zero-shot image classification, observing that the key of making better prediction lies in considering both the likelihood adaptation and the prior adaptation. We find that existing methods often ignore the prior adaptation. By addressing this issue, we propose a more general method.
|
| 35 |
+
|
| 36 |
+
2. Effective and Fast Method: We propose a efficient method that not only achieves good performance on Out-of-Distribution (OOD) and Cross Domain benchmarks, but also maintains high inference speed and low memory usage, making it highly suitable for TTA scenarios.
|
| 37 |
+
|
| 38 |
+
# 2. Related Work
|
| 39 |
+
|
| 40 |
+
Vision-language models. Most visual recognition studies rely on training a separate deep neural network for each task, which is laborious [12]. Recently, Vision-Language Models (VLMs) have emerged, learning rich vision-language correlations from web-scale image-text pairs and enabling zero-shot predictions on various visual recognition tasks with a single model [3, 18, 33, 47]. CLIP [33] is the pioneering work that uses contrastive learning to align image and text embeddings. ALIGN [18] scales up the training of vision-language models by leveraging a dataset of over one billion noisy image alt-text pairs. FILIP [47] models the fine-grained semantic alignment through a novel cross-modal late interaction mechanism in the contrastive loss. PaLI [3] performs joint scaling on both the language and vision components for a wide range of parameters.
|
| 41 |
+
|
| 42 |
+
Transfer learning with vision-language models. Since pre-trained VLMs are generally trained to learn task-agnostic concepts, their performance can degrade when applied to downstream tasks due to the task-specific styles of images and text. To address this issue, transfer learning has been introduced to further adapt them to downstream tasks. From a methodological perspective, these methods can be roughly divided into two categories: prompt tuning [1, 35, 37, 50, 54, 55] and feature adapter [10, 31, 52].
|
| 43 |
+
|
| 44 |
+
For prompt tuning, it fits the downstream tasks by finding the optimal prompts. CoOp [55] propose Context Optimization to learn a specific set of context tokens for each class, while CoCoOp [54] further propose conditional Context Optimization to generate a specific prompt for each image. Unlike these two methods perform text prompt tuning, VP [1] uses a learnable perturbations on images to perform visual prompt tuning. RePrompt [35] proposes retrieval-enhanced visual prompt learning to cache the knowledge of downstream tasks. Further, UPT [50] tunes both the visual and text prompt under the few-shot learning and domain generalization settings. MVLPT [37] incorporates cross-task knowledge to enable information sharing for visual and text prompt tuning. For feature adapter, it fine-tunes VLMs to align both text embedding and visual embedding with a light-weight adapter. CLIP-Adapter [10] adopts an additional bottleneck layer to learn new features and performs residual-style feature blending with the original pretrained features. Tip-Adapter [52] creates the weights by a key-value cache model constructed from the few-shot training set. SVL-Adapter [31] introduces a new encoder which is trained using self-supervision on the target dataset to com
|
| 45 |
+
|
| 46 |
+
bine the strengths of both vision-language pretraining and self-supervised learning.
|
| 47 |
+
|
| 48 |
+
Test-time adaptation with vision-language models. Test-time adaptation aims to adapt pre-trained model to test data, which may have the distribution discrepancy with the training data, during the test time. Early TTA methods often applied entropy minimization [27, 53], batch normalization calibration [29, 41], pseudo-labeling [16, 17] and consistency regularization [30, 43] to improve the performance.
|
| 49 |
+
|
| 50 |
+
Recently, with the increasing popularity of VLMs, many TTA works have also been applied to CLIP. TPT [38] optimizes the text prompt to encourage consistent predictions across augmented views by minimizing the marginal entropy. DiffTPT [9] leverages pre-trained diffusion models to generate diverse and informative augmented data to improve TPT. C-TPT [48] jointly optimizes the prompt to achieve better calibration by maximizing average text feature dispersion during test time. Unlike these methods that require backpropagation during the test time, TDA [19] adapts to test data gradually via progressive pseudo label refinement with a lightweight key-value cache. DOTA [11] continually estimates the distribution of test samples to adapt the model work well in test environment. MTA [49] manages augmented views by optimizing inlierness variables to generate final visual embeddings in a training-free manner. PromptAlign [36] explicitly aligns the test sample statistics with that of the source data distribution through token distribution alignment to optimizes the text prompt. HisTPT [51] introduces three types of knowledge banks to build up comprehensive memorization, mitigating the knowledge forgetting. Zero [7] sets the Softmax temperature to zero to converting probability distributions into one-hot encodings for test-time adaptation.
|
| 51 |
+
|
| 52 |
+
# 3. Method
|
| 53 |
+
|
| 54 |
+
Problem Setting. In this work, we address the challenge of test-time adaptation for a pre-trained visual-language model, CLIP [33]. Given a sequence of images $\{\pmb{x}_i\}_{i=1}^n$ that arrive sequentially, the model needs to predict the label for each single image $\pmb{x}_i$ immediately in an online manner. The goal is to improve the classification accuracy of the model on test data $\{\pmb{x}_i\}_{i=1}^n$ while preserving inference efficiency.
|
| 55 |
+
|
| 56 |
+
For a $K$ -class classification problem at test time, the CLIP model typically prepares $K$ hand-crafted prompts, such as $\{\text{a photo of [Class } k\}\}_{k=1}^{K}$ , and sends them to the text encoder $E_t$ to obtain their normalized text embeddings $\mathbf{F}^t = \{\mathbf{f}_{k|k=1}^t K\}$ . The visual encoder $E_v$ is then used to encode the test images $\mathbf{x}_i$ to obtain their normalized visual embeddings $\mathbf{f}_i^v$ . Finally, the model computes the cosine similarity between $\mathbf{f}_i^v$ and $\mathbf{F}^t$ to determine the prediction as follows:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
P (Y | \boldsymbol {x} _ {i}) = \frac {\exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {F} ^ {t}\right)\right)}{\sum_ {j = 1} ^ {K} \exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {f} _ {j} ^ {t}\right)\right)}, \tag {1}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\exp (\cdot)$ denotes the exponential function and $\cos (\cdot ,\cdot)$ represents the cosine similarity function.
|
| 63 |
+
|
| 64 |
+
# 3.1. Analysis
|
| 65 |
+
|
| 66 |
+
In this section, we use Bayes theorem to analyze the process of how the model generates predictions when a sample $\boldsymbol{x}_i$ arrives. We consider a more generalized scenario where we have $M$ class embeddings $\{\pmb{\mu}_m\}_{m=1}^M$ to perform $K$ category zero-shot classification on the sample $\boldsymbol{x}_i$ . Here, $M$ can be greater than or equal to $K$ . Specifically, $M \geq K$ because some methods [19] try to store visual embeddings during the test phase to increase class embeddings. In contrast, many other methods [9, 38] maintain $M = K$ , updating each class embedding directly. The posterior can be formulated as follows:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array}{l} P (Y | \boldsymbol {x} _ {i}) = \sum_ {m = 1} ^ {M} P (Y, \boldsymbol {\mu} _ {m} | \boldsymbol {x} _ {i}) \\ = \sum_ {m = 1} ^ {M} P \left(\boldsymbol {\mu} _ {m} \mid \boldsymbol {x} _ {i}\right) * P \left(Y \mid \boldsymbol {x} _ {i}, \boldsymbol {\mu} _ {m}\right) \tag {2} \\ = \sum_ {m = 1} ^ {M} P (\boldsymbol {\mu} _ {m} | \boldsymbol {x} _ {i}) * P (Y | \boldsymbol {\mu} _ {m}). \\ \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
The first line is based on the law of total probability. The second line uses the definition of conditional probability. The key assumption in the third line is that once we know the class embeddings $\pmb{\mu}_{m}$ , the information of $\pmb{x}_i$ does not further change the probability of $Y$ [21]. From the Eq. (2), we can divide the steps of predicting the label of $\pmb{x}_i$ into two parts. First, we calculate the probability of $\pmb{x}_i$ belonging to each class embedding $\pmb{\mu}_{m}$ and then multiply it with the prior $P(Y|\pmb{\mu}_{m})$ . Based on Bayes theorem, $P(\pmb{\mu}_{m}|\pmb{x}_{i})$ can be further written as:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array}{l} P (\boldsymbol {\mu} _ {m} | \boldsymbol {x} _ {i}) = \frac {P (\boldsymbol {x} _ {i} | \boldsymbol {\mu} _ {m}) * P (\boldsymbol {\mu} _ {m})}{P (\boldsymbol {x} _ {i})} \\ = \frac {P \left(\boldsymbol {x} _ {i} \mid \boldsymbol {\mu} _ {m}\right) * P \left(\boldsymbol {\mu} _ {m}\right)}{\sum_ {j = 1} ^ {M} P \left(\boldsymbol {x} _ {i} , \boldsymbol {\mu} _ {j}\right)} \tag {3} \\ = \frac {P (\boldsymbol {x} _ {i} | \boldsymbol {\mu} _ {m}) * P (\boldsymbol {\mu} _ {m})}{\sum_ {j = 1} ^ {M} P (\boldsymbol {x} _ {i} | \boldsymbol {\mu} _ {j}) * P (\boldsymbol {\mu} _ {j})} \\ \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $P(\pmb{x}_i|\pmb{\mu}_m)$ represents likelihood, and $P(\pmb{\mu}_m)$ is the probability of each class embedding. Generally, it is assumed that the probability of all class embeddings $P(\pmb{\mu}_m)$ is the same, that is, assuming $P(\pmb{\mu}_m) = \frac{1}{M}$ . By substituting Eq. (3) and $P(\pmb{\mu}_m) = \frac{1}{M}$ back into Eq. (2), we can obtain:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
P (Y | \boldsymbol {x} _ {i}) = \sum_ {m = 1} ^ {M} \frac {P (\boldsymbol {x} _ {i} | \boldsymbol {\mu} _ {m})}{\sum_ {j = 1} ^ {M} P (\boldsymbol {x} _ {i} | \boldsymbol {\mu} _ {j})} * P (Y | \boldsymbol {\mu} _ {m}). \tag {4}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
Remark: 1): Example: For the original CLIP model, the number of class embeddings $M = K$ , the class embeddings are set as $\pmb{\mu}_k = \pmb{f}_k^t$ , and the likelihood is defined as
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2. Overview of the proposed Bayesian Class Adaptation (BCA) method. When deploying CLIP to a test environment, $M$ class embeddings are initialized based on hand-crafted prompts, and the prior for each class embedding is initialized as a one-hot vector with the corresponding class set to 1. (a) Embedding: when $i$ -th image arrives, it is encoded into a visual embedding $\pmb{f}_i^v$ using visual encoder. (b) Likelihood adaptation: the probability $P(\pmb{U}|\pmb{x}_i)$ is calculated based on current likelihood to find class embedding $\pmb{\mu}_s$ with the highest probability. This $\pmb{\mu}_s$ is then updated using statistical method with $\pmb{f}_i^v$ to adapt the likelihood. (c) Prior adaptation: the posterior $P(Y|\pmb{x}_i)$ is calculated by multiplying $P(\pmb{U}|\pmb{x}_i)$ by the current prior. And the prior of $s$ -th class embedding $P(Y|\pmb{\mu}_s)$ is adapted with this posterior.
|
| 88 |
+
|
| 89 |
+
$P(\pmb{x}_i|\pmb{\mu}_k) \propto \exp(\cos(E_v(\pmb{x}_i), \pmb{\mu}_k)) = \exp(\cos(\pmb{f}_i^v, \pmb{\mu}_k))$ . It is important to note that the prior of pre-trained CLIP $P(Y|\pmb{\mu}_k) \in R^K$ is a one-hot vector, where the $k$ -th element is 1 and all other are 0. This means that when a sample belongs to the $k$ -th class embedding, its probability of being in $k$ -th category is 1. By substituting these into Eq. (4), we can obtain Eq. (1). 2): Core factors: From the above derivation, it is evident that the core factors affecting posterior are the likelihood $P(\pmb{x}|\pmb{\mu})$ and prior $P(Y|\pmb{\mu})$ . Existing methods focus on adapting the likelihood while keeping the prior fixed. In the following sections, we aim to adapt both the likelihood and the prior to improve the model's performance in new environments.
|
| 90 |
+
|
| 91 |
+
# 3.2. Likelihood Adaptation
|
| 92 |
+
|
| 93 |
+
Here, we consider a setting where $M \geq K$ , which is more general. From Eq. (4), it is clear that the accuracy of the final posterior is directly influenced by the likelihood $P(\pmb{x}_i|\pmb{\mu}_m)$ . Recently, various methods have focused on updating this term to make class embedding more suitable for test distribution. For example, TPT [38], DiffTPT [9] and C-TPT [48] apply prompt tuning to update text embeddings to update $\pmb{\mu}_m$ , TDA [19] applies feature adapter to add the visual embedding as the new class embeddings, DOTA [11] uses Gaussian distribution $P(\pmb{x}_i|\pmb{\mu}_m,\pmb{\Sigma}_m) = N(\pmb{x}_i|\pmb{\mu}_m,\pmb{\Sigma}_m)$ , and continuously up-
|
| 94 |
+
|
| 95 |
+
date $\pmb{\mu}_{m}$ and $\pmb{\Sigma}_{m}$ based on statistical method. In this work, we follows original CLIP that assume the likelihood $P(\pmb{x}_i|\pmb{\mu}_m)\propto \exp (\cos (E_v(\pmb{x}_i),\pmb{\mu}_m))$ , which only requires updating $\pmb{\mu}_{m}$ using statistical method.
|
| 96 |
+
|
| 97 |
+
Specifically, the text encoder is used to encode $M$ handcrafted prompts to obtain $M$ text embeddings as the initial class embeddings $\{\pmb{\mu}_m\}_{m=1}^M$ , where the $m$ -th text embedding is obtained by encoding the hand-crafted prompt of the $m\% K$ -th category. And as the test image $\pmb{x}_i$ continues to arrive, the $\pmb{\mu}_m$ is constantly updated based on $\pmb{x}_i$ . Specifically, the visual encoder is used to map the image $\pmb{x}_i$ to a visual embedding $\pmb{f}_i^v$ . Then the probability that it belongs to each class embedding $\pmb{\mu}_m$ is calculated based on Eq. (3):
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
P \left(\boldsymbol {\mu} _ {m} \mid \boldsymbol {x} _ {i}\right) = \frac {P \left(\boldsymbol {x} _ {i} \mid \boldsymbol {\mu} _ {m}\right)}{\sum_ {j = 1} ^ {M} P \left(\boldsymbol {x} _ {i} \mid \boldsymbol {\mu} _ {j}\right)} = \frac {\exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {\mu} _ {m}\right)\right)}{\sum_ {j = 1} ^ {M} \exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {\mu} _ {j}\right)\right)} \tag {5}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
Then the class embedding $\pmb{\mu}_{s}$ with highest probability is selected. If the probability $P(\pmb{\mu}_s|\pmb{x}_i)$ exceeds the threshold $\tau$ , $\pmb{\mu}_{s}$ is updated as follows:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\boldsymbol {\mu} _ {s} = \operatorname {N o r m} \left(\frac {\boldsymbol {C} _ {1} [ s ] * \boldsymbol {\mu} _ {s} + \boldsymbol {f} _ {i} ^ {v}}{\boldsymbol {C} _ {1} [ s ] + 1}\right), \tag {6}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\boldsymbol {C} _ {1} [ s ] = \boldsymbol {C} _ {1} [ s ] + 1,
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $\text{Norm}(\cdot)$ denotes vector normalization, and $C_1[s]$ is a counter initialized as $n_1$ to count samples for the $\mu_s$ .
|
| 114 |
+
|
| 115 |
+
# 3.3. Prior Adaptation
|
| 116 |
+
|
| 117 |
+
As mentioned earlier, the prior $P(Y|\mu_m)$ in pre-trained CLIP model is a one-hot vector, where the $m\% K$ -th element is 1. However, the prior should be different in different environments. For example, consider a person who has a fever. During the COVID-19 period, we naturally think that he is more likely to have COVID-19, whereas in normal period, we might assume he is more likely to have common cold. This illustrates that the prior $P(disease|fever)$ can vary significantly depending on the environment. Therefore, it is crucial to develop a more flexible and adaptive prior that can handle distribution shifts and improve the robustness of the model in real-world applications.
|
| 118 |
+
|
| 119 |
+
In our method, the prior $P(Y|\pmb{\mu}_m)$ is initialized as a $K$ -dimensional one-hot vector, in which its $m\% K$ -th element is 1 from original CLIP. And the prior will be continuously updated as the samples arrive. When the $i$ -th image $\pmb{x}_i$ arrives, the posterior $P(Y|\pmb{x}_i)$ is calculated based on the current prior $P(Y|\pmb{\mu}_m)$ and the probability $P(\pmb{x}_i|\pmb{\mu}_m)$ , which is calculated in the likelihood adaptation, according to Eq. (2) as follows:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
P (Y | \boldsymbol {x} _ {i}) = \sum_ {m = 1} ^ {M} \frac {\exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {\mu} _ {m}\right)\right)}{\sum_ {j = 1} ^ {M} \exp \left(\cos \left(\boldsymbol {f} _ {i} ^ {v} , \boldsymbol {\mu} _ {j}\right)\right)} * P (Y | \boldsymbol {\mu} _ {m}). \tag {7}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
where the posterior $P(Y|\pmb{x}_i)$ is also the prediction for $\pmb{x}_i$ . Then this posterior is also used to update the prior of $s$ -th class embedding $P(Y|\pmb{\mu}_s)$ , where $\pmb{\mu}_s$ is the one selected in the likelihood adaptation, as follows:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array}{l} P (Y \mid \boldsymbol {\mu} _ {s}) = \frac {\boldsymbol {C} _ {2} [ s ] * P (Y \mid \boldsymbol {\mu} _ {s}) + P (Y \mid \boldsymbol {x} _ {i})}{\boldsymbol {C} _ {2} [ s ] + 1}, \tag {8} \\ \boldsymbol {C} _ {2} [ s ] = \boldsymbol {C} _ {2} [ s ] + 1, \\ \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $C_2[s]$ is a counter initialized as $n_2$ to count samples for the $s$ -th class embedding. It is worth noting that there are two different counters $C_1$ and $C_2$ in our method. The most intuitive understanding is that the learning rates used to update the prior $P(Y|\boldsymbol{\mu}_s)$ and class embedding $\boldsymbol{\mu}_s$ are different. By using the $P(Y|\boldsymbol{x}_i)$ to update $P(Y|\boldsymbol{\mu}_s)$ , the model can continuously adapt to the evolving test distribution, leading to more accurate and robust predictions.
|
| 132 |
+
|
| 133 |
+
# 3.4. Our method
|
| 134 |
+
|
| 135 |
+
By integrating the above two points, we first initialize $M$ class embeddings based on hand-crafted prompts, and initialize the prior of each class embedding as a one-hot vector, where the corresponding category is set to 1, that is defining $\pmb{U} = [\pmb{\mu}_1^T; \pmb{\mu}_2^T; \dots; \pmb{\mu}_M^T] \in R^{d*M}$ , where $d$ is the dimension of the embedding and $T$ represents transpose, and $\pmb{V} = [P(Y|\pmb{\mu}_1), P(Y|\pmb{\mu}_2), \dots, P(Y|\pmb{\mu}_M)] \in R^{M*K}$ . In addition, $\pmb{C}_1$ and $\pmb{C}_2$ are initialized to an $M$ -dimensional vector with the values $\pmb{n}_1$ and $\pmb{n}_2$ respectively to update the
|
| 136 |
+
|
| 137 |
+
Algorithm 1 Bayesian Class Adaptation
|
| 138 |
+
|
| 139 |
+
Input: A pre-trained CLIP model, unlabeled test data $\{(\pmb{x}_i)\}_{i=1}^n$ , $M$ hand-crafted prompts, hyperparameters $\tau$ , $\pmb{n}_1$ and $\pmb{n}_2$
|
| 140 |
+
|
| 141 |
+
# Procedure:
|
| 142 |
+
|
| 143 |
+
1: Initialize the $M$ class embeddings $\mathbf{U} = [\pmb{\mu}_1^T; \dots; \pmb{\mu}_M^T]$ by encoding $M$ hand-crafted prompts with text encoder of pre-trained CLIP;
|
| 144 |
+
2: Initialize the prior $\mathbf{V} = [P(Y|\pmb{\mu}_1),\dots ,P(Y|\pmb{\mu}_M)]$ where the $m$ -th row is a one-hot vector with the $m\% K$ -th element being 1;
|
| 145 |
+
3: Initialize $C_1$ and $C_2$ as an $M$ -dimensional vector with the values $n_1$ and $n_2$ respectively;
|
| 146 |
+
4: for $i = 1:n$ do
|
| 147 |
+
5: Map test image $\pmb{x}_i$ to visual embedding $\pmb{f}_i^v$ ;
|
| 148 |
+
6: Calculate the probability $P(\boldsymbol{U}|\boldsymbol{x}_i)$ of belonging to each class embedding and posterior $P(Y|\boldsymbol{x}_i)$ with current $\boldsymbol{U}$ and $\boldsymbol{V}$ based on Eq. (9);
|
| 149 |
+
7: Select the most likely class embedding index $s$ based on $P(\pmb{U}|\pmb{x}_i)$ ;
|
| 150 |
+
8: if $P(\pmb{U}[s]|\pmb{x}_i) > \tau$ then
|
| 151 |
+
9: Adapt $\pmb{U}[s]$ with $\pmb{f}_i^v$ , and $C_1[s]$ based on Eq. (6);
|
| 152 |
+
10: Adapt $V[s]$ with $P(Y|\pmb{x}_i)$ , and $C_2[s]$ based on Eq. (8);
|
| 153 |
+
11: end if
|
| 154 |
+
12: return posterior $P(Y|\pmb{x}_i)$ .
|
| 155 |
+
13: end for
|
| 156 |
+
|
| 157 |
+
class embedding and its prior. As the test data $\boldsymbol{x}_i$ continues to arrive, we first calculate the probability belongs to each class embedding based on Eq. (5) and posterior based on Eq. (4), which can be rewritten in matrix form as follows:
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\begin{array}{l} P (\boldsymbol {U} | \boldsymbol {x} _ {i}) = \operatorname {S o f t m a x} \left(\boldsymbol {f} _ {i} ^ {v} * \boldsymbol {U}\right), \\ P (Y | \boldsymbol {x} _ {i}) = \operatorname {S o f t m a x} \left(\boldsymbol {f} _ {i} ^ {v} * \boldsymbol {U}\right) * \boldsymbol {V}, \tag {9} \\ \end{array}
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
where $\operatorname{Softmax}(\cdot)$ represents the softmax function.
|
| 164 |
+
|
| 165 |
+
Then the most likely class embedding $\pmb{\mu}_s$ is selected based on $P(\pmb{U}|\pmb{x}_i)$ , where $s = \arg\max_m P(\pmb{U}[m]|\pmb{x}_i)$ . If $P(\pmb{U}[s]|\pmb{x}_i) > \tau$ , $\pmb{U}[s]$ and $\pmb{V}[s]$ are updated by the visual embedding $\pmb{f}_i^v$ and the posterior $P(Y|\pmb{x}_i)$ , which affect the likelihood and prior. These updates are performed using statistical method as shown in Eq. (6) and Eq. (8) respectively. Our method is summarized in Algorithm 1.
|
| 166 |
+
|
| 167 |
+
# 4. Experiments
|
| 168 |
+
|
| 169 |
+
# 4.1. Experimental Setup
|
| 170 |
+
|
| 171 |
+
**Benchmarks.** In our experiments, we evaluated the effectiveness and robustness of our proposed method using two benchmarks: the Cross Domain benchmark and the Out-of-Distribution (OOD) benchmark. These benchmarks have been previously utilized in related research [38] to test the
|
| 172 |
+
|
| 173 |
+
Table 1. Comparison with the state-of-the-art methods on OOD benchmark. Metric: classification accuracy (%); Bp-free: backpropagation-free at test time; Average: mean accuracy across all datasets; OOD Average: mean accuracy across four OOD datasets excluding ImageNet.
|
| 174 |
+
Visual Backbone: ResNet-50
|
| 175 |
+
|
| 176 |
+
<table><tr><td>Method</td><td>Venue</td><td>Bp-free</td><td>ImageNet</td><td>ImageNet-A</td><td>ImageNet-V2</td><td>ImageNet-R</td><td>ImageNet-S</td><td>Average</td><td>OOD Average</td></tr><tr><td>TPT [38]</td><td>NIPS22</td><td>✘</td><td>60.74</td><td>26.67</td><td>54.70</td><td>59.11</td><td>35.09</td><td>47.26</td><td>43.89</td></tr><tr><td>DiffTPT [9]</td><td>ICCV23</td><td>✘</td><td>60.80</td><td>31.06</td><td>55.80</td><td>58.80</td><td>37.10</td><td>48.71</td><td>45.69</td></tr><tr><td>C-TPT [48]</td><td>ICLR24</td><td>✘</td><td>61.2</td><td>25.6</td><td>54.8</td><td>59.7</td><td>35.7</td><td>47.4</td><td>44.0</td></tr><tr><td>TDA [19]</td><td>CVPR24</td><td>✓</td><td>61.35</td><td>30.29</td><td>55.54</td><td>62.58</td><td>38.12</td><td>49.58</td><td>46.63</td></tr><tr><td>CLIP [33]</td><td>ICML21</td><td>✓</td><td>59.81</td><td>23.24</td><td>52.91</td><td>60.72</td><td>35.48</td><td>46.43</td><td>43.09</td></tr><tr><td>CLIP with LA</td><td>Ours</td><td>✓</td><td>60.95</td><td>28.53</td><td>55.59</td><td>61.88</td><td>37.21</td><td>48.83</td><td>45.80</td></tr><tr><td>CLIP with PA</td><td>Ours</td><td>✓</td><td>61.15</td><td>28.66</td><td>55.41</td><td>61.97</td><td>37.41</td><td>48.92</td><td>45.86</td></tr><tr><td>BCA</td><td>Ours</td><td>✓</td><td>61.81</td><td>30.35</td><td>56.58</td><td>62.89</td><td>38.08</td><td>49.94</td><td>46.98</td></tr></table>
|
| 177 |
+
|
| 178 |
+
Visual Backbone: ViT-B/16
|
| 179 |
+
|
| 180 |
+
<table><tr><td>TPT [38]</td><td>NIPS22</td><td>✘</td><td>68.98</td><td>54.77</td><td>63.45</td><td>77.06</td><td>47.94</td><td>62.44</td><td>60.81</td></tr><tr><td>DiffTPT [9]</td><td>ICCV23</td><td>✘</td><td>70.30</td><td>55.68</td><td>65.10</td><td>75.00</td><td>46.80</td><td>62.28</td><td>60.52</td></tr><tr><td>C-TPT [48]</td><td>ICLR24</td><td>✘</td><td>69.3</td><td>52.9</td><td>63.4</td><td>78.0</td><td>48.5</td><td>62.4</td><td>60.7</td></tr><tr><td>TDA [19]</td><td>CVPR24</td><td>✓</td><td>69.51</td><td>60.11</td><td>64.67</td><td>80.24</td><td>50.54</td><td>65.01</td><td>63.89</td></tr><tr><td>MTA [49]</td><td>CVPR24</td><td>✓</td><td>70.08</td><td>58.06</td><td>64.24</td><td>78.33</td><td>49.61</td><td>64.06</td><td>62.56</td></tr><tr><td>PromptAlign [36]</td><td>NIPS24</td><td>✘</td><td>-</td><td>59.37</td><td>65.29</td><td>79.33</td><td>50.23</td><td>-</td><td>63.55</td></tr><tr><td>CLIP [33]</td><td>ICML21</td><td>✓</td><td>68.34</td><td>49.89</td><td>61.88</td><td>77.65</td><td>48.24</td><td>61.20</td><td>59.42</td></tr><tr><td>CLIP with LA</td><td>Ours</td><td>✓</td><td>68.99</td><td>58.62</td><td>63.64</td><td>79.71</td><td>49.58</td><td>64.11</td><td>62.89</td></tr><tr><td>CLIP with PA</td><td>Ours</td><td>✓</td><td>69.16</td><td>59.39</td><td>64.21</td><td>79.68</td><td>49.88</td><td>64.46</td><td>63.29</td></tr><tr><td>BCA</td><td>Ours</td><td>✓</td><td>70.22</td><td>61.14</td><td>64.90</td><td>80.72</td><td>50.87</td><td>65.37</td><td>64.16</td></tr></table>
|
| 181 |
+
|
| 182 |
+
adaptability of vision-language models during the inference phase. The Cross Domain benchmark, on the other hand, evaluates the model's performance across a wide range of image classification tasks from different domains, consisting of ten datasets: Aircraft [26], Caltech101 [8], Cars [20], DTD [4], EuroSAT [13], Flower102 [28], Food101 [2], Pets [32], SUN397 [44], and UCF101 [39]. Each dataset represents a unique domain with its own set of classes, allowing us to assess the model's adaptability and generalization capabilities in real-world scenarios where the class spaces may vary significantly. The OOD benchmark focuses on assessing the model's ability to handle data that differs significantly from the training set, using four specific datasets derived from ImageNet [5]: ImageNet-A [15], ImageNet-V2 [34], ImageNet-R [14], and ImageNet-S [42]. These datasets are designed to challenge the model's generalization to novel and unseen scenarios, providing insights into its robustness and reliability. The OOD benchmark focuses on assessing the model's ability to handle data that differs significantly from the training set, using four specific datasets derived from ImageNet [5]: ImageNet-A [15], ImageNet-V2 [34], ImageNet-R [14], and ImageNet-S [42]. These datasets are designed to challenge the model's generalization to novel and unseen scenarios, providing insights into its robustness and reliability.
|
| 183 |
+
|
| 184 |
+
Implementation details. Our experiment is conducted on the Pytorch platform. Following [9, 38], we adopt pretrained CLIP models with ResNet-50 [12] and ViT-B/16 [6] backbones as the visual encoder and a Transformer [40] as
|
| 185 |
+
|
| 186 |
+
the text encoder in our experiments. The batch size is set to 1 to suit the application scenario of test time adaptation. For hyperparameters $\tau / n_1 / n_2$ , these set as $0.3 / 30000 / 10$ in OOD benchmark, and set as $0.35 / 50000 / 10$ in Cross Domain benchmark. The top-1 accuracy is used as evaluation metric. All the experiments are conducted on RTX 4070 Ti SUPER GPU.
|
| 187 |
+
|
| 188 |
+
# 4.2. Comparisons with State-of-the-art
|
| 189 |
+
|
| 190 |
+
For fair comparisons with other methods, we set $M = K$ in this section, and follow [19] to use multiple context prompt templates for prompt ensembling and generate $K$ initialized class embeddings for image classification. And we compare our method with the following two major categories of methods: (1) Backpropagation-based methods: these methods require backpropagation during the test time, such as TPT [38], DiffTPT [9], C-TPT [48], PromptAlign [36] and HisTPT[51]. (2) Backpropagation-free methods: these methods do not require backpropagation and are designed to be computationally efficient, such as TDA [19], MTA [49] and Zero [7]. In addition, we also report our method in detail, where CLIP [33] represents our baseline method; CLIP with LA represents the addition of Likelihood adaptation on the basis of CLIP; CLIP with PA represents the addition of prior adaptation on the basis of CLIP; BCA represents the complete algorithm.
|
| 191 |
+
|
| 192 |
+
Results on the OOD benchmark. We first compare BCA with state-of-the-art methods over the OOD benchmark. Table 1 presents the experimental results, highlighting the superior performance of the proposed BCA compared to other
|
| 193 |
+
|
| 194 |
+
Table 2. Comparison with the state-of-the-art methods on Cross Domain benchmark. Metric: classification accuracy $(\%)$
|
| 195 |
+
|
| 196 |
+
<table><tr><td colspan="12">Visual Backbone: ResNet-50</td></tr><tr><td>Method</td><td>Aircraft</td><td>Caltech101</td><td>Cars</td><td>DTD</td><td>EuroSAT</td><td>Flower102</td><td>Food101</td><td>Pets</td><td>SUN397</td><td>UCF101</td><td>Average</td></tr><tr><td>TPT [38]</td><td>17.58</td><td>87.02</td><td>58.46</td><td>40.84</td><td>28.33</td><td>62.69</td><td>74.88</td><td>84.49</td><td>61.46</td><td>60.82</td><td>57.66</td></tr><tr><td>DiffTPT [9]</td><td>17.60</td><td>86.89</td><td>60.71</td><td>40.72</td><td>41.04</td><td>63.53</td><td>79.21</td><td>83.40</td><td>62.72</td><td>62.67</td><td>59.85</td></tr><tr><td>C-TPT [48]</td><td>17.5</td><td>87.4</td><td>57.3</td><td>43.1</td><td>29.4</td><td>65.3</td><td>76.0</td><td>84.0</td><td>62.1</td><td>60.7</td><td>58.3</td></tr><tr><td>TDA [19]</td><td>17.61</td><td>89.70</td><td>57.78</td><td>43.74</td><td>42.11</td><td>68.74</td><td>77.75</td><td>86.18</td><td>62.53</td><td>64.18</td><td>61.03</td></tr><tr><td>HisTPT[51]</td><td>18.1</td><td>87.2</td><td>61.3</td><td>41.3</td><td>42.5</td><td>67.6</td><td>81.3</td><td>84.9</td><td>63.5</td><td>64.1</td><td>61.2</td></tr><tr><td>CLIP [33]</td><td>16.11</td><td>87.26</td><td>55.89</td><td>40.37</td><td>25.79</td><td>62.77</td><td>74.82</td><td>82.97</td><td>60.85</td><td>59.48</td><td>56.63</td></tr><tr><td>CLIP with LA</td><td>17.85</td><td>88.96</td><td>57.11</td><td>43.55</td><td>35.50</td><td>65.57</td><td>76.94</td><td>84.24</td><td>62.54</td><td>60.71</td><td>59.30</td></tr><tr><td>CLIP with PA</td><td>18.10</td><td>89.08</td><td>57.56</td><td>46.06</td><td>38.53</td><td>65.02</td><td>76.92</td><td>85.28</td><td>62.20</td><td>60.45</td><td>59.92</td></tr><tr><td>BCA</td><td>19.89</td><td>89.70</td><td>58.13</td><td>48.58</td><td>42.12</td><td>66.30</td><td>77.19</td><td>85.58</td><td>63.38</td><td>63.51</td><td>61.44</td></tr><tr><td colspan="12">Visual Backbone: ViT-B/16</td></tr><tr><td>TPT [38]</td><td>24.78</td><td>94.16</td><td>66.87</td><td>47.75</td><td>42.44</td><td>68.98</td><td>84.67</td><td>87.79</td><td>65.50</td><td>68.04</td><td>65.10</td></tr><tr><td>DiffTPT [9]</td><td>25.60</td><td>92.49</td><td>67.01</td><td>47.00</td><td>43.13</td><td>70.10</td><td>87.23</td><td>88.22</td><td>65.74</td><td>62.67</td><td>65.47</td></tr><tr><td>C-TPT [48]</td><td>23.9</td><td>94.1</td><td>66.7</td><td>46.8</td><td>48.7</td><td>69.9</td><td>84.5</td><td>87.4</td><td>66.0</td><td>66.7</td><td>65.5</td></tr><tr><td>TDA [19]</td><td>23.91</td><td>94.24</td><td>67.28</td><td>47.40</td><td>58.00</td><td>71.42</td><td>86.14</td><td>88.63</td><td>67.62</td><td>70.66</td><td>67.53</td></tr><tr><td>MTA [49]</td><td>25.20</td><td>94.21</td><td>68.47</td><td>45.90</td><td>45.36</td><td>68.06</td><td>85.00</td><td>88.24</td><td>66.67</td><td>68.69</td><td>65.58</td></tr><tr><td>PromptAlign [36]</td><td>24.80</td><td>94.01</td><td>68.50</td><td>47.24</td><td>47.86</td><td>72.39</td><td>86.65</td><td>90.76</td><td>67.54</td><td>69.47</td><td>66.92</td></tr><tr><td>HisTPT[51] (NIPS24)</td><td>26.9</td><td>94.5</td><td>69.2</td><td>48.9</td><td>49.7</td><td>71.2</td><td>89.3</td><td>89.1</td><td>67.2</td><td>70.1</td><td>67.6</td></tr><tr><td>Zero [7] (NIPS24)</td><td>24.42</td><td>94.14</td><td>68.48</td><td>45.86</td><td>43.77</td><td>66.82</td><td>84.58</td><td>87.20</td><td>66.90</td><td>68.57</td><td>65.07</td></tr><tr><td>CLIP [33]</td><td>23.22</td><td>93.55</td><td>66.11</td><td>45.04</td><td>50.42</td><td>66.99</td><td>82.86</td><td>86.92</td><td>65.63</td><td>65.16</td><td>64.59</td></tr><tr><td>CLIP with LA</td><td>26.85</td><td>93.50</td><td>65.34</td><td>51.89</td><td>50.82</td><td>71.41</td><td>85.60</td><td>89.99</td><td>67.09</td><td>66.87</td><td>66.94</td></tr><tr><td>CLIP with PA</td><td>26.70</td><td>94.19</td><td>65.63</td><td>52.60</td><td>55.17</td><td>72.71</td><td>85.75</td><td>90.30</td><td>68.04</td><td>67.01</td><td>67.81</td></tr><tr><td>BCA</td><td>28.59</td><td>94.69</td><td>66.86</td><td>53.49</td><td>56.63</td><td>73.12</td><td>85.97</td><td>90.43</td><td>68.41</td><td>67.59</td><td>68.59</td></tr></table>
|
| 197 |
+
|
| 198 |
+
methods across various OOD datasets derived from ImageNet. Specifically, for the ResNet-50 backbone, BCA outperforms TDA by an average of 0.36 in overall accuracy and 0.35 in OOD accuracy. For instance, BCA achieves 61.81 accuracy on the ImageNet dataset, a 0.46 improvement over TDA's 61.35 and a 0.61 improvement over C-TPT's 61.2. On the ImageNet-V2 dataset, BCA reaches 56.58 accuracy, a 1.04 improvement over TDA's 55.54 and a 0.78 improvement over DiffTPT's 55.80. On the ImageNet-R dataset, BCA attains 62.89 accuracy, a 0.31 improvement over TDA's 62.58 and a 3.19 improvement over C-TPT's 59.7. For the ViT-B/16 backbone, BCA continues to exhibit strong performance. On the ImageNet-R dataset, BCA achieves 80.72 accuracy, a 0.48 improvement over TDA's 80.24 and a 1.39 improvement over PromptAlign's 79.33. On the ImageNet-S dataset, BCA reaches 50.87 accuracy, a 0.33 improvement over TDA's 50.54 and a 0.64 improvement over PromptAlign's 50.23. Overall, BCA achieves an average accuracy of 65.37 and an OOD average accuracy of 64.16, representing improvements of 0.36 and 0.27 over TDA's 65.01 and 63.89, respectively.
|
| 199 |
+
|
| 200 |
+
Results on the Cross Domain benchmark. We also compare BCA with state-of-the-art methods over the cross-domain benchmark. Table 2 presents the experimental results, highlighting the superior performance of the proposed BCA across various cross-domain datasets. Specifically, for the ResNet-50 backbone, BCA achieves 19.89 accuracy on the Aircraft dataset, a 2.28 improvement over TDA's 17.61 and a 1.79 improvement over HisTPT's 18.1. On the DTD dataset, BCA attains 48.58 accuracy, a 4.84 improvement over TDA's 43.74 and a 5.48 improvement over C-TPT's
|
| 201 |
+
|
| 202 |
+
43.1. Overall, BCA achieves an average accuracy of 61.44, representing a 0.41 improvement over TDA's 61.03 and a 0.24 improvement over HisTPT's 61.2. For the ViT-B/16 backbone, BCA continues to exhibit strong performance. On the Aircraft dataset, BCA achieves 28.59 accuracy, a 4.68 improvement over TDA's 23.91 and a 1.69 improvement over HisTPT's 26.9. On the DTD dataset, BCA attains 53.49 accuracy, a 6.09 improvement over TDA's 47.40 and a 4.59 improvement over HisTPT's 48.9. On the Flower102 dataset, BCA reaches 73.12 accuracy, a 1.70 improvement over TDA's 71.42 and a 0.72 improvement over HisTPT's 72.4. Overall, BCA achieves an average accuracy of 68.59, representing a 1.06 improvement over TDA's 67.53 and a 0.99 improvement over HisTPT's 67.6.
|
| 203 |
+
|
| 204 |
+
# 4.3. Ablation Studies
|
| 205 |
+
|
| 206 |
+
Component analysis. In this experiment, we validated the effectiveness of each component of the proposed method on two benchmarks as shown in Table 1 and Table 2. Based on the experimental results, we have summarized the following patterns: 1) Adapting likelihood and prior can both enable the CLIP model to better adapt to the test environment: By comparing the original CLIP model with the CLIP models that incorporate LA and PA, we found that CLIP with LA and CLIP with PA achieved significant improvements in classification accuracy across all datasets. This demonstrates that adapting the pre-trained CLIP model to the test environment can effectively improve the model's accuracy, thereby validating the correctness of Analysis in Section 3.1. 2) Adapting likelihood and prior can work synergistically: By comparing BCA with CLIP with LA and BCA
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
Figure 3. Sensitivity analysis with respect to $\tau / n_1 / n_2$ on ImageNet for OOD benchmark and Aircraft for Cross Domain benchmark using ViT-B/16 as the visual backbone.
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+
with CLIP with PA, it is evident that BCA achieved even further performance enhancements, indicating that there is a complementary effect between LA and PA, allowing them to combine to enhance the model's generalization ability. 3) Prior adaptation is equally crucial: By comparing CLIP with PA to the original CLIP and BCA to CLIP with LA, we found that adding prior adaptation could significantly boost the model's accuracy, which is often ignored in previous model designs, highlighting the importance of domain-specific prior knowledge in improving the model's cross-domain adaptability.
|
| 216 |
+
|
| 217 |
+
Table 3. Comparison with the state-of-the-art methods on ImageNet in terms of efficiency (Testing Time, Memory usage) and effectiveness (Accuracy). Visual Backbone: ResNet-50; GPU: RTX 4070 Ti SUPER GPU.
|
| 218 |
+
|
| 219 |
+
<table><tr><td>Method</td><td>Testing time</td><td>Memory usage</td><td>Accuracy</td><td>Gain</td></tr><tr><td>CLIP</td><td>2.23min</td><td>753M</td><td>59.81</td><td>0</td></tr><tr><td>TPT</td><td>572.13min</td><td>21396M</td><td>60.74</td><td>+0.93</td></tr><tr><td>TDA</td><td>11.93min</td><td>1174M</td><td>61.35</td><td>+1.54</td></tr><tr><td>BCA</td><td>2.42min</td><td>757M</td><td>61.81</td><td>+2.00</td></tr></table>
|
| 220 |
+
|
| 221 |
+
Inference time comparison. In this experiment, we evaluated the efficiency and effectiveness of the proposed BCA method on the ImageNet dataset using ResNet-50 as the visual backbone on RTX 4070 Ti SUPER GPU. We compared our BCA with TPT and TDA, the experimental results are shown in Table 3. From the table, we can see that the BCA method outperforms other methods in several aspects: 1) Inference Time: The inference time of the BCA method is significantly reduced compared to both methods that require gradient backpropagation and those that do not. For example, TPT takes 572.13 minutes, while BCA only takes 2.42 minutes. Even compared to TDA, which does not require gradient backpropagation, BCA is still much faster, taking only 2.42 minutes compared to TDA's 11.93 minutes. 2) Memory Usage: The memory usage of the BCA method is also significantly lower than that of other methods, especially those that require gradient backpropagation. For example, TPT uses 21396M of memory, while BCA uses only 757M. Compared to TDA, which uses 1174M, BCA
|
| 222 |
+
|
| 223 |
+
still uses less memory, which is on par with the baseline CLIP. 3) Classification Accuracy: Despite its excellent performance in memory usage and inference time, BCA also achieves higher classification accuracy. For example, BCA achieves an accuracy of 61.81, which is a 2.00 improvement over the baseline CLIP. This is slightly better than TDA, which achieves an accuracy of 61.35.
|
| 224 |
+
|
| 225 |
+
Parameter sensitivity analysis. In this experiment, we investigated the settings of hyperparameters $\tau / n_1 / n_2$ to analyze the sensitivity of our method. We conducted experiments on the ImageNet for OOD benchmark and Aircraft for Cross Domain benchmark using ViT-B/16 as the visual backbone. The experimental results are shown in Figure 3. It can be found that the accuracy first increases and then decreases with the increase of the three hyperparameter values. And our method is also robust to the hyperparameters $\tau / n_1 / n_2$ . This suggests that our method maintains good performance under various hyperparameter settings, making it suitable for different tasks and datasets.
|
| 226 |
+
|
| 227 |
+
# 5. Conclusion
|
| 228 |
+
|
| 229 |
+
In this work, we propose Bayesian Class Adaptation (BCA). Unlike previous methods that focus solely on likelihood estimation, BCA incorporates the continuous updating of the prior distribution, which is crucial for handling distribution shifts in real-world applications. By employing a statistical approach to update both the likelihood and the prior, BCA enhances the robustness and accuracy of zero-shot image classification, particularly when the test data distribution differs significantly from the pre-trained data. Our experiments demonstrate that BCA not only outperforms existing methods on Out-of-Distribution (OOD) and Cross Domain tasks but also maintains high inference speed and efficiency, making it a effective solution for real-world scenarios.
|
| 230 |
+
|
| 231 |
+
# Acknowledgement
|
| 232 |
+
|
| 233 |
+
This work was supported in part by Chinese National Natural Science Foundation Projects U23B2054, 62276254, 62306313, the Beijing Science and Technology Plan Project Z231100005923033, Beijing Natural Science Foundation L221013, and InnoHK program.
|
| 234 |
+
|
| 235 |
+
# References
|
| 236 |
+
|
| 237 |
+
[1] Hyojin Bahng, Ali Jahanian, Swami Sankaranarayanan, and Phillip Isola. Exploring visual prompts for adapting large-scale models. arXiv preprint arXiv:2203.17274, 2022. 2
|
| 238 |
+
[2] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101-mining discriminative components with random forests. In Computer vision-ECCV 2014: 13th European conference, zurich, Switzerland, September 6-12, 2014, proceedings, part VI 13, pages 446-461. Springer, 2014. 6
|
| 239 |
+
[3] Xi Chen, Xiao Wang, Soravit Changpinyo, AJ Piergiovanni, Piotr Padlewski, Daniel Salz, Sebastian Goodman, Adam Grycner, Basil Mustafa, Lucas Beyer, et al. Pali: A jointly-scaled multilingual language-image model. In The Eleventh International Conference on Learning Representations. 2
|
| 240 |
+
[4] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3606-3613, 2014. 6
|
| 241 |
+
[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. IEEE, 2009. 6
|
| 242 |
+
[6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2020. 6
|
| 243 |
+
[7] Matteo Farina, Gianni Franchi, Giovanni Iacca, Massimiliano Mancini, and Elisa Ricci. Frustratingly easy test-time adaptation of vision-language models. In Advances in Neural Information Processing Systems, 2024. 3, 6, 7
|
| 244 |
+
[8] Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. In 2004 conference on computer vision and pattern recognition workshop, pages 178-178. IEEE, 2004. 6
|
| 245 |
+
[9] Chun-Mei Feng, Kai Yu, Yong Liu, Salman Khan, and Wangmeng Zuo. Diverse data augmentation with diffusions for effective test-time prompt tuning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2704-2714, 2023. 1, 2, 3, 4, 6, 7
|
| 246 |
+
[10] Peng Gao, Shijie Geng, Renrui Zhang, Teli Ma, Rongyao Fang, Yongfeng Zhang, Hongsheng Li, and Yu Qiao. Clip-adapter: Better vision-language models with feature adapters. International Journal of Computer Vision, 132(2): 581-595, 2024. 2
|
| 247 |
+
[11] Zongbo Han, Jialong Yang, Junfan Li, Qinghua Hu, Qianli Xu, Mike Zheng Shou, and Changqing Zhang. Dota: Distributional test-time adaptation of vision-language models. arXiv preprint arXiv:2409.19375, 2024. 1, 2, 3, 4
|
| 248 |
+
[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 2, 6
|
| 249 |
+
[13] Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning
|
| 250 |
+
|
| 251 |
+
benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217-2226, 2019. 6
|
| 252 |
+
[14] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF international conference on computer vision, pages 8340-8349, 2021. 6
|
| 253 |
+
[15] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 15262-15271, 2021. 6
|
| 254 |
+
[16] Yusuke Iwasawa and Yutaka Matsuo. Test-time classifier adjustment module for model-agnostic domain generalization. Advances in Neural Information Processing Systems, 34:2427-2440, 2021. 3
|
| 255 |
+
[17] Minguk Jang, Sae-Young Chung, and Hye Won Chung. Test-time adaptation via self-training with nearest neighbor information. In The Eleventh International Conference on Learning Representations. 3
|
| 256 |
+
[18] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In International conference on machine learning, pages 4904-4916. PMLR, 2021. 1, 2
|
| 257 |
+
[19] Adilbek Karmanov, Dayan Guan, Shijian Lu, Abdulmotaleb El Saddik, and Eric Xing. Efficient test-time adaptation of vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14162-14171, 2024. 1, 2, 3, 4, 6, 7
|
| 258 |
+
[20] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In Proceedings of the IEEE international conference on computer vision workshops, pages 554–561, 2013. 6
|
| 259 |
+
[21] John K Kruschke. Bayesian data analysis. Wiley Interdisciplinary Reviews: Cognitive Science, 1(5):658-676, 2010. 3
|
| 260 |
+
[22] Samuel Lavoie, Polina Kirichenko, Mark Ibrahim, Mido Assran, Andrew Gordon Wilson, Aaron Courville, and Nicolas Ballas. Modeling caption diversity in contrastive vision-language pretraining. In *Forty-first International Conference on Machine Learning*. 1
|
| 261 |
+
[23] Shuaifeng Li, Mao Ye, Xiatian Zhu, Lihua Zhou, and Lin Xiong. Source-free object detection by learning to overlook domain style. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8014-8023, 2022. 1
|
| 262 |
+
[24] Shuaifeng Li, Mao Ye, Lihua Zhou, Nianxin Li, Siying Xiao, Song Tang, and Xiatian Zhu. Cloud object detector adaptation by integrating different source knowledge. In Advances in Neural Information Processing Systems, pages 25251-25283, 2024. 1
|
| 263 |
+
[25] Jian Liang, Ran He, and Tieniu Tan. A comprehensive survey on test-time adaptation under distribution shifts. International Journal of Computer Vision, pages 1-34, 2024. 1
|
| 264 |
+
|
| 265 |
+
[26] Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013. 6
|
| 266 |
+
[27] M Jehanzeb Mirza, Jakub Micorek, Horst Possegger, and Horst Bischof. The norm must go on: Dynamic unsupervised domain adaptation by normalization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14765-14775, 2022. 3
|
| 267 |
+
[28] Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian conference on computer vision, graphics & image processing, pages 722-729. IEEE, 2008. 6
|
| 268 |
+
[29] Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Zhiquan Wen, Yaofo Chen, Peilin Zhao, and Mingkui Tan. Towards stable test-time adaptation in dynamic wild world. In The Eleventh International Conference on Learning Representations. 3
|
| 269 |
+
[30] Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In International conference on machine learning, pages 16888-16905. PMLR, 2022. 3
|
| 270 |
+
[31] Omiros Pantazis, Gabriel Brostow, Katherine Jones, and Oisin Mac Aodha. Svl-adapter: Self-supervised adapter for vision-language pretrained models. In Proceedings of The 33rd British Machine Vision Conference. The British Machine Vision Association (BMVA), 2022. 2
|
| 271 |
+
[32] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pages 3498-3505. IEEE, 2012. 6
|
| 272 |
+
[33] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748-8763. PMLR, 2021. 1, 2, 3, 6, 7
|
| 273 |
+
[34] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International conference on machine learning, pages 5389-5400. PMLR, 2019. 6
|
| 274 |
+
[35] Jintao Rong, Hao Chen, Tianxiao Chen, Linlin Ou, Xinyi Yu, and Yifan Liu. Retrieval-enhanced visual prompt learning for few-shot classification. arXiv preprint arXiv:2306.02243, 2023. 2
|
| 275 |
+
[36] Jameel Hassan Abdul Samadh, Hanan Gani, Noor Hazim Hussein, Muhammad Uzair Khattak, Muzammal Naseer, Fahad Khan, and Salman Khan. Align your prompts: Test-time prompting with distribution alignment for zero-shot generalization. In Advances in Neural Information Processing Systems, 2024. 3, 6, 7
|
| 276 |
+
[37] Sheng Shen, Shijia Yang, Tianjun Zhang, Bohan Zhai, Joseph E Gonzalez, Kurt Keutzer, and Trevor Darrell. Multitask vision-language prompt tuning. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 5656-5667, 2024. 2
|
| 277 |
+
[38] Manli Shu, Weili Nie, De-An Huang, Zhiding Yu, Tom Goldstein, Anima Anandkumar, and Chaowei Xiao. Test
|
| 278 |
+
|
| 279 |
+
time prompt tuning for zero-shot generalization in vision-language models. In Advances in Neural Information Processing Systems, 2022. 1, 2, 3, 4, 5, 6, 7
|
| 280 |
+
[39] K Soomro. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.6
|
| 281 |
+
[40] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 6000-6010, 2017. 6
|
| 282 |
+
[41] Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations. 3
|
| 283 |
+
[42] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. Advances in Neural Information Processing Systems, 32, 2019. 6
|
| 284 |
+
[43] Qin Wang, Olga Fink, Luc Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7201-7211, 2022. 3
|
| 285 |
+
[44] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In 2010 IEEE computer society conference on computer vision and pattern recognition, pages 3485-3492. IEEE, 2010. 6
|
| 286 |
+
[45] Yizhe Xiong, Hui Chen, Zijia Lin, Sicheng Zhao, and Guiguang Ding. Confidence-based visual dispersal for few-shot unsupervised domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 11621-11631, 2023. 1
|
| 287 |
+
[46] Jinyu Yang, Jiali Duan, Son Tran, Yi Xu, Sampath Chanda, Liquun Chen, Belinda Zeng, Trishul Chilimbi, and Junzhou Huang. Vision-language pre-training with triple contrastive learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15671-15680, 2022. 1
|
| 288 |
+
[47] Lewei Yao, Runhui Huang, Lu Hou, Guansong Lu, Minzhe Niu, Hang Xu, Xiaodan Liang, Zhenguo Li, Xin Jiang, and Chunjing Xu. Filip: Fine-grained interactive language-image pre-training. In International Conference on Learning Representations. 2
|
| 289 |
+
[48] Hee Suk Yoon, Eunseop Yoon, Joshua Tian Jin Tee, Mark A Hasegawa-Johnson, Yingzhen Li, and Chang D Yoo. C-tpt: Calibrated test-time prompt tuning for vision-language models via text feature dispersion. In The Twelfth International Conference on Learning Representations. 3, 4, 6, 7
|
| 290 |
+
[49] Maxime Zanella and Ismail Ben Ayed. On the test-time zero-shot generalization of vision-language models: Do we really need prompt learning? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 23783-23793, 2024. 3, 6, 7
|
| 291 |
+
[50] Yuhang Zang, Wei Li, Kaiyang Zhou, Chen Huang, and Chen Change Loy. Unified vision and language prompt learning. arXiv preprint arXiv:2210.07225, 2022. 2
|
| 292 |
+
|
| 293 |
+
[51] Jingyi Zhang, Jiaxing Huang, Xiaoqin Zhang, Ling Shao, and Shijian Lu. Historical test-time prompt tuning for vision foundation models. In Advances in Neural Information Processing Systems, 2024. 3, 6, 7
|
| 294 |
+
[52] Renrui Zhang, Rongyao Fang, Wei Zhang, Peng Gao, Kunchang Li, Jifeng Dai, Yu Qiao, and Hongsheng Li. Tip-adapter: Training-free clip-adapter for better vision-language modeling. arXiv preprint arXiv:2111.03930, 2021. 2
|
| 295 |
+
[53] Bowen Zhao, Chen Chen, and Shu-Tao Xia. Delta: Degradation-free fully test-time adaptation. In The Eleventh International Conference on Learning Representations. 3
|
| 296 |
+
[54] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16816-16825, 2022. 2
|
| 297 |
+
[55] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9):2337-2348, 2022. 2
|
| 298 |
+
[56] Lihua Zhou, Siying Xiao, Mao Ye, Xiatian Zhu, and Shuaifeng Li. Adaptive mutual learning for unsupervised domain adaptation. IEEE Transactions on Circuits and Systems for Video Technology, 33(11):6622-6634, 2023. 1
|
| 299 |
+
[57] Lihua Zhou, Mao Ye, Xiatian Zhu, Siying Xiao, Xu-Qian Fan, and Ferrante Neri. Homeomorphism alignment for unsupervised domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 18699-18710, 2023. 1
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fec2e6ecdd22ce7d573083ee3aa92abb9f0a88ad0a4022d39921fe0fff1b431
|
| 3 |
+
size 593510
|
CVPR/2025/Bayesian Test-Time Adaptation for Vision-Language Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e972a1daf1007a7f7588029572f4d28e4dafde28f717e9786b65f51895180688
|
| 3 |
+
size 486570
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d05dfb933ea32787e942c14ed8fc5de468bea03bb23130791451d4e220f80477
|
| 3 |
+
size 68197
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:977289e5a57609b50ec58c57a13d8ff113c1441517b94423bf5281fb4c0ec158
|
| 3 |
+
size 83965
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/ef2a8afc-f330-4de9-abc2-1a6d9e97dc88_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa7bd66feead62e78d6cb04be1c7b2d1895a5141d5fe07bc7a9e10935854e8e6
|
| 3 |
+
size 9779258
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/full.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Be More Specific: Evaluating Object-centric Realism in Synthetic Images
|
| 2 |
+
|
| 3 |
+
Anqi Liang Ciprian Corneanu Qianli Feng Giorgio Giannone Alex Martinez
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Evaluation of synthetic images is important for both model development and selection. An ideal evaluation should be specific, accurate and aligned with human perception. This paper addresses the problem of evaluating realism of objects in synthetic images. Although methods have been proposed to evaluate holistic realism, there are no methods tailored towards object-centric realism evaluation. In this work, we define a new standard for assessing object-centric realism that follows a shape-texture breakdown and proposes the first object-centric realism evaluation dataset for synthetic images. The dataset contains images generated from state-of-the-art image generative models and is richly annotated at object level across a diverse set of object categories. We then design and train the OLIP model, an architecture that considerably outperforms any existing baseline on object-centric realism evaluation.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
Generative models have become excellent at synthesizing high-quality diverse images from text [28-31]. Diffusion models, a particularly effective type, can create impressive images that closely follow complex prompts [17].
|
| 12 |
+
|
| 13 |
+
Evaluating these models is critical, not only for further improvement but also for selecting best models for specific applications. To this end, several model-level evaluation metrics have been introduced, including FID [10], $\mathrm{FID}_{\infty}$ [7], and CMMD [13]. These metrics primarily measure the distribution divergence of generated vs. reference images, offering a general perspective on model quality. However, they do not align well with human perception and they lack the granularity necessary to detect specific quality errors essential for subsequent improvement.
|
| 14 |
+
|
| 15 |
+
To address these limitations, new evaluation methods and benchmarks increasingly focus on alignment with human perception and a finer taxonomy of image defects. The field has evolved from broad metrics like Aesthetic Score [1], PickScore [16], and CLIPScore [9], towards more nuanced assessments, such as dividing overall image quality into realism (fidelity) and text-image alignment [37]. More
|
| 16 |
+
|
| 17 |
+
recently, even finer-grained text-image alignment evaluation systems like TIFA [12], VQAScore [22] and RichHF [21] have been introduced.
|
| 18 |
+
|
| 19 |
+
Despite this trend there remains surprisingly limited focus on decomposing the fidelity/realism aspect of generated images (Tab. 1). Unlike text-image alignment, which can anchor evaluation around each semantic concept in the text prompt [12, 22], image realism does not benefit from such straightforward anchoring. This makes guiding annotators to assess specific aspects of realism challenging.
|
| 20 |
+
|
| 21 |
+
We propose an evaluation framework, a dataset and an algorithm to be more specific on image evaluation. Inspired by anchoring text-image alignment evaluation to prompts, we ground our realism evaluation on individual objects, introducing what we term object-centric realism, or OcR.
|
| 22 |
+
|
| 23 |
+
For each image, OcR is assessed at the object level, with each evaluation comprising a shape score and a texture score. This separation aligns with human perception and reflects the image generation process itself, where shape (mesh) and texture (material) are typically defined independently. We developed an annotation framework that facilitates efficient and consistent collection of OcR data from human annotators, resulting in an object-centric evaluation dataset. Sec. 3 provides further details.
|
| 24 |
+
|
| 25 |
+
Additionally, we develop a set of algorithms to assess OcR, ranging from low-effort prompt engineering and zero-shot/few-shot learning approaches to our own OLIP model, which is specifically designed and trained for this task. Results demonstrate that existing image realism algorithms are largely ineffective in this context—some performing almost randomly—yet we identify promising directions for adaptation, with our model achieving state-of-the-art performance. This work is detailed in Sec. 4.
|
| 26 |
+
|
| 27 |
+
Our contributions are: 1. Introducing an object-level image realism evaluation framework with a systematic assessment method. 2. Compiling the first dataset dedicated to object realism assessment in synthetic images. 3. Proposing a suite of automated evaluation methods and present extensive experimental results for estimating object realism in synthetic images.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1. Overview of our method. (a) In this work, we are focusing on image realism evaluation task. (b) Existing methods, like TIFA, VQAScore, ImageReward, etc., give realism evaluation on the image-level, without interpretable details on their realism score. (c) Our method, Object-centric Realism evaluation, not only provide detailed scoring per object, but also evaluating in both shape and texture.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
|
| 36 |
+
<table><tr><td>Realism Eval</td><td>FID</td><td>CLIP Score</td><td>Img. Rwd</td><td>TIFA</td><td>VQA Score</td><td>Rich-HF</td><td>Ours</td></tr><tr><td>Generic</td><td>✓</td><td>X</td><td>✓</td><td>X</td><td>X</td><td>✓</td><td>✓</td></tr><tr><td>Obj-level</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>✓</td></tr></table>
|
| 37 |
+
|
| 38 |
+
Table 1. Comparing image realism granularity across methods.
|
| 39 |
+
|
| 40 |
+
# 2. Related Work
|
| 41 |
+
|
| 42 |
+
The two most commonly evaluated synthetic image attributes are: a. image realism, a.k.a. fidelity, which measures the overall quality and realism of generated images and b. text-image alignment which assesses how well the image aligns with the text prompt. Other metrics like model bias (e.g., race, gender), aesthetics, reasoning capacity, toxicity, and multilingualism [4, 18] have been also studied but not yet commonly applied.
|
| 43 |
+
|
| 44 |
+
Model-level image realism metrics like Fréchet Inception Distance (FID) [11], CMMD [13] and Learned Perceptual Image Patch Similarity (LPIPS) [34] use pre-trained neural networks to assess the quality of generated imagery. Although useful for model selection, these metrics rely on a reference dataset, operate at the model level rather than image level, and lack generalization to text-image alignment.
|
| 45 |
+
|
| 46 |
+
To address these limitations, CLIPScore [27] was proposed. It measures the cosine similarity between the embedded image and text prompt. Although impactful, it struggles on complex prompt and evaluate compositionality [35, 38].
|
| 47 |
+
|
| 48 |
+
To further enhance alignment with human perception, approaches like ImageReward [37] and PickScore [16] fine-tune vision-language models on large-scale human ratings. To get more granularity and specificity, Divide-and-conquer approaches [25, 33] use large language models (LLMs) to decompose prompts into simpler components for analysis. A notable technique within this framework is Question Generation and Answering (QG/A), exemplified by TIFA [12],
|
| 49 |
+
|
| 50 |
+
DSG [6] and more recently VQA [22] where questions are extracted from prompts, and the alignment score is computed based on the accuracy of the answers by a visual question-answering (VQA) model. These works significantly pushed the field forward, but they primarily focus on granular text-image alignment. When focusing on image realism axes, these algorithms produce a holistic, generic score instead of being more specific, which we want to solve in this study by object-level realism.
|
| 51 |
+
|
| 52 |
+
The closest work to ours is RichHF-18K [21] published recently. It collects a dataset of human feedback for T2I generation including plausibility, alignment, aesthetics, and overall quality, each with a scalar rating. They also collect a heatmap annotations of regions that are implausible and misaligned to text prompt. This work is close to ours as both trying to collect more granular ratings for image realism, us with object-level realism and RichHF with artifacts heatmaps. However, the two are significantly different as we focus explicitly on object-level shape and texture quality for every single object in the image, rather than localizing artifacts in the image.
|
| 53 |
+
|
| 54 |
+
# 3. Object-centric Realism Dataset
|
| 55 |
+
|
| 56 |
+
# 3.1. Data Preparation
|
| 57 |
+
|
| 58 |
+
We illustrate the data preparation and annotation pipeline in Fig. 2. We start from a set of 2500 images of 17 fashion and home product categories sold online. Each image is captioned using LLaVA-1.6-7b with 1000 tokens [23]. Captions are passed to recent T2I models to synthesize semantically similar images. We apply four state-of-the-art models representing a variety of model architectures and training strategies, i.e. FLUX-dev [17], FLUX-schnell [17], StableDiffusion-XL (SDXL [2]) and Segmind [32]. We generate 3500 images per model and add $10\%$ real im
|
| 59 |
+
|
| 60 |
+
1 Initial Image
|
| 61 |
+
2 Image Caption
|
| 62 |
+

|
| 63 |
+
a modern, interior design style. A green potted plant with broad leaves, placed on a wooden floor. The plant is in a woven basket-like pot, which adds a touch of rustic charm to the setting. There is around, beige-colored vase with a smooth finish. The cabinet has a simple, clean design with a flat top surface.
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
3 Synthetic Image
|
| 67 |
+
5 Annotation
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Grounding
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 2. Data preparation and annotation pipeline. We collect a set of real images of products sold online $\bullet$ . Each real image is captioned $\bullet$ . Resulting text is used to generate synthetic images $\bullet$ on which we ground target objects $\bullet$ . Objects are shown to humans for annotation $\bullet$ . In the annotation pipeline, objects are assessed individually for shape and texture realism. Here we illustrate the hypothetical annotation of a PLANT $\mathbf{A}$ , VASE $\mathbf{B}$ and CABINET $\bullet$ . Additionally, we collect holistic realism labels on a small subset $\mathbf{D}$ .
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
|
| 81 |
+

|
| 82 |
+
|
| 83 |
+
ages. We use a fine-tuned DETR model [5] to detect object bounding boxes. This results in $16K$ bounding boxes. We filter small objects ( $< 1\%$ of the image size) and objects with low detection confidence ( $mAP^1 < 0.5$ ). We further conduct a manual cleanup to remove boxes where an object is not presented regardless of the predicted object category. This removes $646 (4\%)$ wrong boxes.
|
| 84 |
+
|
| 85 |
+
# 3.2. Collecting Human Assessment
|
| 86 |
+
|
| 87 |
+
Our annotation pipeline involves assessing OcR of synthetic objects from two aspects, i.e. object shape and object texture. Annotators are asked to evaluate shape and texture photo-realism of the objects independently. This two-aspect assessment follows the shape-surface mental model in 3D graphic rendering [24] and the practice of measuring the perception of visual realism in images [26]. For each object, we present its global visual context, i.e full image, and the reference category predicted by the grounding model to the annotators. Annotators are asked to judge OcR on a 1 to 5 point Likert scale [14]. We recruit nine annotators with experience in evaluating synthetic images. Each object is first evaluated by two annotators. If the two annotations diverge largely, i.e. difference $\geq 3$ for any of the 5-scale questions, the object is included in a re-evaluation task to collect a third annotation. We use the Cohen's Kappa score [8] and the rate for re-evaluation requirements to keep track of the annotators' performance.
|
| 88 |
+
|
| 89 |
+
We collected valid annotations for $15K$ objects from $14K$ images across 17 object categories. We obtain two
|
| 90 |
+
|
| 91 |
+
photo-realism scores, i.e. shape realism and texture realism, for each object by averaging annotators' annotation. We further derive an average OcR score by averaging its shape and texture scores. Additionally, we collect dense object-level realism and holistic image-level realism on a subset of $1.5K$ objects from 210 images with 83 object categories being grounded<sup>2</sup>. The dataset is balanced across models and object categories We randomly split the dataset into train (95%) and test (5%).
|
| 92 |
+
|
| 93 |
+
The annotation alignment (Cohen's Kappa score) between two annotators is 0.4 for shape realism assessment and 0.34 for texture realism assessment, and the re-evaluation rate $10\%$ . During the process, we observe a gradual improvement in annotation quality. This emphasizes the importance of conducting pilot tasks at the beginning of the annotation task. The interested reader should refer to Appendix A for further details of the data collection and annotation quality.
|
| 94 |
+
|
| 95 |
+
# 3.3. Dataset Analysis
|
| 96 |
+
|
| 97 |
+
In this section, we detail general data attributes, discuss the relationship between shape and texture photo-realism, and investigate how OcR contributes to holistic image realism.
|
| 98 |
+
|
| 99 |
+
# 3.3.1. Data Overview
|
| 100 |
+
|
| 101 |
+
Fig. 3 shows the distribution of the object shape and texture realism scores. Both scores are skewed to the left with relative fewer counts in the lower score range.
|
| 102 |
+
|
| 103 |
+
OcR breakdowns by generative model are shown in Fig. 4. A few observations can be made. First, the score
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 3. Overall OcR distribution.
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 4. Shape and texture realism by model.
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 6. Shape and texture realism by object category.
|
| 115 |
+
ART FRM: ART FRAME, DEC PIL: DECORATIVE PILLOW, TOY FIG: TOY FIGURE.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 5. Shape-texture score discrepancy by model. $\square$ : 0, $\square$ : 1 $\square$ : 2, $\square$ $\geq$ 3.
|
| 119 |
+
|
| 120 |
+
ranks stay consistently across models for shape and texture. Besides overall expected differences coming from training protocols, data and model architecture<sup>3</sup>, one can also observe: (i) FLUX-dev ranks higher than real images, which while surprising might also show capability of the model to synthesize not only artifact-free images but also images that have standard lighting, contrast and composition which humans tend to prefer. (ii) Time-step distillation barely hurts performance (FLUX-schnell vs FLUX-dev) contrary to model distillation (SDXL vs. Segmind) that considerably degrades performance.
|
| 121 |
+
|
| 122 |
+
We split the object categories into four groups, i.e. APPAREL, DECOR, FURNITURE and TEXTILES (Fig. 6). APPAREL categories have higher shape realism than texture realism whereas FURNITURE categories follow the opposite trend. This suggests that synthetic models have more challenges generating realistic shapes than texture for rigid objects (SOFA, BED) and vice versa for non-rigid objects (SHIRT, PANTS). Such discrepancy does not exist in real objects. For example, the average texture realism score of FURNITURE categories is 0.14 greater than their shape score for synthetic objects, but for real objects, such difference is only 0.05. TEXTILES categories also have consis
|
| 123 |
+
|
| 124 |
+
tently higher shape realism than texture realism mainly due to their relatively simple and unified structure. Additionally, decoration-related categories (DECOR, TEXTILES) have high OcR in general. This is likely because decoration objects, e.g. WALL ART and CURTAIN, usually have simple geometry, and they are typically highly stylized which makes minor distortions negligible. However, categories like TABLE and BOOTS follow specific real-world standards for structure, material and functionality. In Fig. 7 we show representative samples from assessment buckets.
|
| 125 |
+
|
| 126 |
+
# 3.3.2. Shape vs. Texture Realism
|
| 127 |
+
|
| 128 |
+
The correlation between shape and texture realism of an object is $0.52^4$ . This indicates that while moderately correlated, the two factors preserve independent information. There are $8\%$ objects with high shape-texture realism discrepancy. Model ranking for overall OcR (Fig. 4) are the same as their ranking for shape-texture realism alignment (Fig. 5). This suggests that models which synthesize less realistic objects also synthesize objects with higher misalignment in terms of shape and texture realism. As for more extreme cases where shape and texture difference $\geq 3$ , real
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 7. Dataset examples ordered by Shape and Texture realism. Off diagonal images present discrepancy between the two aspects labelled. Realism increases towards the bottom-right corner.
|
| 132 |
+
|
| 133 |
+
objects have the least prevalence in this bucket than any of the synthetic models. For object category breakdowns, we observe the same trend that categories with higher OcR have lower misalignment in shape and texture realism. Specifically, APPAREL and FURNITURE have higher shape and texture discrepancy than DECOR and TEXTILES. For example, SOFA, BED have the largest shape-texture realism discrepancy whereas DECORATIVE PILLOW and ART FRAME have the least. (Refer to Fig. 14(b) in Appendix A.2).
|
| 134 |
+
|
| 135 |
+
# 3.3.3. Object vs. Image Realism
|
| 136 |
+
|
| 137 |
+
We ask ourselves: "What does object realism tell us about image realism?" Tab. 2 shows that image realism has a moderately positive correlation with object shape and texture realism (see "All Objects"). We were further interested if this relationship depends on object relative size. It seems that, when evaluating image realism, annotators tend to focus more on larger objects. This is shown by larger correlation between scores of the largest-sized object and image scores (see "Largest" vs "Smallest").
|
| 138 |
+
|
| 139 |
+
Most practitioners would still be interested in evaluating images not objects in images. In the same table (see row "Average") we show that by averaging over all object scores in an image, one obtains a very good predictor (corre
|
| 140 |
+
|
| 141 |
+
<table><tr><td>Type</td><td>Shape</td><td>Texture</td><td>Joint</td></tr><tr><td>All</td><td>0.57</td><td>0.56</td><td>0.59</td></tr><tr><td>Largest</td><td>0.63</td><td>0.56</td><td>0.63</td></tr><tr><td>Smallest</td><td>0.57</td><td>0.53</td><td>0.58</td></tr><tr><td>Average</td><td>0.78</td><td>0.77</td><td>0.79</td></tr></table>
|
| 142 |
+
|
| 143 |
+
Table 2. Spearman correlation between object and image realism. All: all objects; Largest: object with largest relative size (pixels from total); Smallest: object with smallest relative size; Average; correlation between average score of all objects and holistic score.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 8. Feature selection for holistic and object realism score regression. Here features represent objects in the image. Most salient 5 are most informative for overall image quality.
|
| 147 |
+
|
| 148 |
+
lation 0.79) of the image holistic realism. This strengthens the point that image realism is mostly perceived in terms of object realism.
|
| 149 |
+
|
| 150 |
+
Does one need to estimate realism over all objects in an image for a good prediction of image realism? It appears that most salient five objects are enough. We perform a linear regression analysis between holistic image realism and object realism. We remove 13 (6%) images with too few (< 5) or many (> 10) objects from the analysis. We perform a 5-fold cross-validation for conducting a Recursive Feature Elimination (RFE) by iterative removing of the least important object realism scores. Feature selection results are shown in Fig. 8. The conclusion is clear. Object realism scores of the largest five objects of the image predict most of the holistic image realism (MSE = 0.45, $\mathbb{R}^2 = 0.62$ ).
|
| 151 |
+
|
| 152 |
+
# 4. Estimating Object Realism
|
| 153 |
+
|
| 154 |
+
In this section we explore several automatic methods for estimating OcR in synthetic images. The approaches considered roughly fall in three main categories. First, we explore how well do existing methods estimate realism. We consider existing methods from four main categories: a. methods that estimate human preference, b. methods that perform image quality assessment, c. methods that compute imaged-to-text alignment and d. generic vision-language models tested in a zero-shot fashion. Second, we discuss and analyse strategies for adapting vision-language models for realism estimation through few-shot in-context learning. Finally, we design and train OLIP, our own architecture for object realism estimation. For all the experiments we keep $5\%$ of the entire data for testing and use the rest for training. Out of the 17 object categories in the dataset, only 10 are part of the test dataset<sup>6</sup>.
|
| 155 |
+
|
| 156 |
+
# 4.1. Existing Scoring Methods
|
| 157 |
+
|
| 158 |
+
We consider the following methods: (a) ImageReward (IR) [37] and AestheticScore (AS) [1] estimate human preference of synthetic images, (b) QualifiedLIP (QC) [3] performs image quality assessment, (c) VQAScore (VS) [22] computes text-to-image alignment and (d) LLaVA-OV [19] a generalist Vision-Language Model (VLM) and LLaVA-Critic [36], a variant fine-tuned for scoring and ranking.
|
| 159 |
+
|
| 160 |
+
For IR, AS, VS and QC we pass a square crop of the target object. Both IR and VS compute alignment to a text prompt. The text prompts follow the questions asked to human annotators (see also Sec. 3). The Mean Absolute Error (MAE) is computed against the average normalized OcR score among all annotators while Accuracy (ACC) is computed over a 5-class classification problem (each 1-5 Likert
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 9. OLIP, the proposed model architecture. (a) The overall architecture of OLIP. (b) Detailed architecture inside each branch.
|
| 166 |
+
|
| 167 |
+
assessment is a class). When multiple labels available the score is averaged and then rounded to closest integer.
|
| 168 |
+
|
| 169 |
+
In the case of the LLaVA VLMs, we test several inference strategies. More specifically, when passing the image we: (i) use the entire image with an overlaid bounding box (img) and (ii) crop the image to only include the bounding box content (crop). When prompting we use: (i) same questions posed to human annotators (base) and (ii) employ a rephrased version that allows more flexibility for the model (s5). The combination of these input and prompting variations results in four inference strategies.
|
| 170 |
+
|
| 171 |
+
# 4.2. Adapting VLMs for OcR Estimation
|
| 172 |
+
|
| 173 |
+
To address the limitations of zero-shot approaches with general-purpose VLMs, we introduce curated few-shot in-context samples through carefully selecting diverse examples from the training set for each object category to ensure a range of shape and texture scores are presented to the models. This diversity is crucial, as random example selection tends to bias towards average values, potentially hindering the model's ability to learn scaling mechanisms for varying image and object qualities. We limit our few-shot approach to five samples and apply the same four variants (img, crop, base, s5) used in our zero-shot experiment. Best results of zero-shot and few-shot VLMs are shown in Tab. 3(a) and the complete ablation results are in Tab. 6 in Appendix C. By combining these approaches, we aim to harness the strengths of both zero-shot and few-shot learning while overcoming their individual weaknesses, potentially enhancing performance across specialized tasks. $^{8}$
|
| 174 |
+
|
| 175 |
+
# 4.3. OLIP: Object-centric Scoring Model
|
| 176 |
+
|
| 177 |
+
We propose OLIP, an architecture specifically designed for realism estimation. It contains three major components: (1)
|
| 178 |
+
|
| 179 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">Shape</td><td colspan="2">Texture</td><td colspan="2">Average</td><td colspan="2">Joint</td></tr><tr><td colspan="2">MAE ↓ACC ↑</td><td colspan="2">MAE ↓ACC ↑</td><td colspan="2">MAE ↓ACC ↑</td><td colspan="2">MAE ↓ACC ↑</td></tr><tr><td>Random</td><td>0.345</td><td>0.223</td><td>0.337</td><td>0.232</td><td>0.341</td><td>0.227</td><td>0.342</td><td>0.211</td></tr><tr><td>ImageReward [37]</td><td>0.287</td><td>0.229</td><td>0.268</td><td>0.297</td><td>0.277</td><td>0.263</td><td>0.263</td><td>0.316</td></tr><tr><td>AestheticScore [1]</td><td>0.247</td><td>0.298</td><td>0.228</td><td>0.356</td><td>0.237</td><td>0.327</td><td>0.228</td><td>0.321</td></tr><tr><td>QualiCLIP [3]</td><td>0.218</td><td>0.267</td><td>0.191</td><td>0.307</td><td>0.204</td><td>0.287</td><td>0.199</td><td>0.349</td></tr><tr><td>LLaVA-OV (ZS) [19]</td><td>0.165</td><td>0.273</td><td>0.172</td><td>0.317</td><td>0.168</td><td>0.295</td><td>0.174</td><td>0.375</td></tr><tr><td>VQAScore [22]</td><td>0.192</td><td>0.302</td><td>0.159</td><td>0.382</td><td>0.175</td><td>0.342</td><td>0.164</td><td>0.407</td></tr><tr><td>LLaVA-Critic (FS) [36]</td><td>0.204</td><td>0.343</td><td>0.168</td><td>0.454</td><td>0.186</td><td>0.398</td><td>0.178</td><td>0.414</td></tr><tr><td>OLIP (Ours)</td><td>0.136</td><td>0.439</td><td>0.123</td><td>0.489</td><td>0.130</td><td>0.464</td><td>0.118</td><td>0.539</td></tr></table>
|
| 180 |
+
|
| 181 |
+
((a)) Object realism prediction performance.
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Model Design</td><td>MAE ↓</td><td>ACC ↑</td></tr><tr><td>Full OLIP</td><td>0.118</td><td>0.539</td></tr><tr><td>- Full image</td><td>0.132</td><td>0.479</td></tr><tr><td>- Multi-head</td><td>0.130</td><td>0.486</td></tr><tr><td>- Deep proj.</td><td>0.136</td><td>0.446</td></tr><tr><td>- All</td><td>0.148</td><td>0.387</td></tr></table>
|
| 184 |
+
|
| 185 |
+
((b)) Ablation study of OLIP model variations.
|
| 186 |
+
Table 3. (a) Object realism prediction performance. (b) OLIP ablation study. (a) MAE: Mean. Absolute Error, ACC: Accuracy. Shape: '[OBJ] with realistic shape and structure.' Texture: '[OBJ] with realistic texture, color and shade.'; ZS: Zero-shot; FS: Few-shot; Average: average of Shape and Texture; Joint '[OBJ] with realistic shape, structure, texture, color and shade'. [OBJ] is one of the target object categories. (b) - Full image: no full image to attend. - Multi-head: a single head for all tasks. - Deep proj.: a linear instead of a deeper projection head. - All:: no full image, no multi-head, no deep proj.
|
| 187 |
+
|
| 188 |
+
a global-local multi-modal encoder, (2) a multi-head attention and (3) a MLP regression projector. The three components combine into a data-efficient regression model for object-level shape, texture realism evaluation. An illustration of the architecture is shown in Fig. 9.
|
| 189 |
+
|
| 190 |
+
We use pre-trained BLIP [20] as the backbone on extracting the multi-modal embedding. It remains frozen throughout training. The frozen BLIP ensures that the foundational language-image representations remain consistent throughout training. Inspired by human perception on object quality which considers global context and local attention, we extract embedding for both full image and object crop, using object category name as prompt. This practice is different from previous image holistic evaluation method where prompts like "A good image" and "A bad image" are used. This gives us two 512 dimensional embedding vectors, for full image and object crop respectively.
|
| 191 |
+
|
| 192 |
+
To assess quality dimensions independently, the model applies three quality attention heads: Shape Head, Texture Head, and Joint Head. Each attention head employs multi-head attention with 8 heads and a dropout rate of 0.1. Each attention head takes the full image embedding as query and crop image embedding as key and value and is connected to a dedicated prediction head, which processes attention-enhanced embeddings through a 4-layer MLP with ReLU non-linearity. The MLP gradually reduces its hidden layer dimensions $\{1024\to 768\to 384\to 1\}$ with layer normalization and dropout at rate of 0.2. At the output layer, the 1-dimension scalar is mapped to their corresponding range with a scaled and translated Sigmoid function. We use MSE loss for all regression heads. AdamW optimizer [15] is used with learning rate $= 1e^{-4}$ with cosine annealing scheduler
|
| 193 |
+
|
| 194 |
+
and with weight decay $= 0.01$ . See Appendix B for additional implementation details.
|
| 195 |
+
|
| 196 |
+
OLIP addresses Object-centric Realism through several design features: (1) usage of the full image as query in attention to provide more quality context, (2) separated attention/projection heads for texture, shape, and joint realism, as each requires different visual aspects (e.g., boundaries for shape vs appearance for texture) and (3) deeper projection head instead of linear projection to accommodate complex quality definition. We perform ablations on these designs in Tab. 3(b). Independently, each ablation causes $6 - 10\%$ drop in accuracy and over $15\%$ when ablated together.
|
| 197 |
+
|
| 198 |
+
# 4.4. Discussion
|
| 199 |
+
|
| 200 |
+
All results are documented in Tab. 3. Qualitative examples are shown in Fig. 10. VLM ablations are in Appendix C. We discuss them in the following.
|
| 201 |
+
|
| 202 |
+
Existing methods are approximate at best and sometimes only slightly better than random in $OcR$ . This is true regardless of their type, i.e. Human Preference, IQA or VLM, and is particularly true for ImageReward, QualiCLIP and zero-shot LLaVA-OV. Interestingly, VQAScore and few-shot LLaVA seem to be best among this set of methods tested in the wild.
|
| 203 |
+
|
| 204 |
+
Existing methods are especially bad with unrealistic objects. One can see a few examples in Fig. 10. Most often than not, these methods fail badly with heavily distorted objects which can be problematic in practical scenarios.
|
| 205 |
+
|
| 206 |
+
All methods perform better in evaluating texture realism. This holds regardless of having been trained or not and remains true for the proposed architecture.
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
Figure 10. Object realism for a selected set of images from ground-truth (Human), selected baselines and OLIP. Color coding reflects discrepancy to ground-truth from low (green) to high (red).
|
| 210 |
+
|
| 211 |
+
Methods that need prompting<sup>9</sup> benefit from aligning to both shape and texture jointly<sup>10</sup>. This shows that OcR benefits from explicitly specifying both realism aspects in a single comprehensive prompt than using separate prompts.
|
| 212 |
+
|
| 213 |
+
Specialized in-context learning enhances VLM capabilities. Adapting VLMs using few-shot in-context learning effectively improves OcR compared to the zero-shot setting $^{11}$ . Specialist VLMs further outperform the generic VLMs in few-shot learning (Tab. 6 in Appendix C). These indicate that specialized vision-language models with few-shot learning represent a promising direction for developing complex multimodal scoring mechanisms.
|
| 214 |
+
|
| 215 |
+
Designing and training a dedicated architecture shows considerable improvements over baselines. Particularly effective is the combination between strong pretraining (BLIP backbone) and dedicated design (object and holistic attention). This is confirmed by best results across the board and considerable improvements on unrealistic objects.
|
| 216 |
+
|
| 217 |
+
# 5. Conclusion and Limitations
|
| 218 |
+
|
| 219 |
+
In this paper, we have introduced an object-level realism evaluation framework. Based on it, we have compiled the first dataset devoted to object realism assessment in syn
|
| 220 |
+
|
| 221 |
+
thetic images. Finally, we have discussed a suite of existing evaluation methods and proposed a model dedicated to OcR. In additional to OcR evaluation, the proposed pipeline has application opportunities in (1) localized editing for quality enhancement and (2) model improvement via finetuning or human preference alignment. These do not come without limitations. First, we base our study on a diverse but limited number of image types and object categories. Future work would be needed for real-world scale generalization. Then, additional information that object-level specificity brings comes with added computational cost. Several models passes, one per object, would be required for dense realism evaluation with a prerequisite of object grounding. This cost can be significant for certain applications. In addition, adapting to new artifacts and models is persistently unclear and difficult, which remains an on-going complexity until a powerful system that resembles human perception is established. In this work, we propose careful artifacts definition, meticulous data collection, and robust model development, with the hope that it can help our community tackle this problem. Finally, realism estimation remains a challenging problem. While we address the issue of subjectivity in annotation by focusing on objects with broad consensus in general understanding, and we show promising results in modelling, considerably more improvement has to be made until automatic realism assessment closes the gap with human perception of realism.
|
| 222 |
+
|
| 223 |
+
# References
|
| 224 |
+
|
| 225 |
+
[1] https://github.com/christophschuhmann/improved-aesthetic-predictor. 1, 6, 7
|
| 226 |
+
[2] https://huggingface.co/stabilityai/stable-diffusion-2-1. Accessed: 2023-11-15. 2
|
| 227 |
+
[3] Lorenzo Agnolucci, Leonardo Galteri, and Marco Bertini. Quality-aware image-text alignment for real-world image quality assessment, 2024. 6, 7, 10
|
| 228 |
+
[4] Eslam Mohamed Bakr, Pengzhan Sun, Xiaogian Shen, Faizan Farooq Khan, Li Erran Li, and Mohamed Elhoseiny. Hrs-bench: Holistic, reliable and scalable benchmark for text-to-image models, 2023. 2
|
| 229 |
+
[5] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European conference on computer vision, pages 213-229. Springer, 2020. 3
|
| 230 |
+
[6] Jaemin Cho, Yushi Hu, Roopal Garg, Peter Anderson, Ranjay Krishna, Jason Baldridge, Mohit Bansal, Jordi Pont-Tuset, and Su Wang. Davidsonian scene graph: Improving reliability in fine-grained evaluation for text-image generation. arXiv preprint arXiv:2310.18235, 2023. 2
|
| 231 |
+
[7] Min Jin Chong and David Forsyth. Effectively unbiased fid and inception score and where to find them. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1
|
| 232 |
+
[8] Jacob Cohen. A coefficient of agreement for nominal scales. Educational and psychological measurement, 20(1):37-46, 1960. 3
|
| 233 |
+
[9] Jack Hessel, Ari Holtzman, Maxwell Forbes, Ronan Le Bras, and Yejin Choi. CLIPScore: a reference-free evaluation metric for image captioning. In EMNLP, 2021. 1
|
| 234 |
+
[10] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems. Curran Associates, Inc., 2017. 1
|
| 235 |
+
[11] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017. 2
|
| 236 |
+
[12] Yushi Hu, Benlin Liu, Jungo Kasai, Yizhong Wang, Mari Ostendorf, Ranjay Krishna, and Noah A Smith. Tifa: Accurate and interpretable text-to-image faithfulness evaluation with question answering. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 20406-20417, 2023. 1, 2
|
| 237 |
+
[13] Sadeep Jayasumana, Srikumar Ramalingam, Andreas Veit, Daniel Glasner, Ayan Chakrabarti, and Sanjiv Kumar. Rethinking fid: Towards a better evaluation metric for image generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9307-9315, 2024. 1, 2
|
| 238 |
+
[14] Ankur Joshi, Saket Kale, Satish Chandel, and D Kumar Pal. Likert scale: Explored and explained. British journal of applied science & technology, 7(4):396-403, 2015. 3
|
| 239 |
+
|
| 240 |
+
[15] Diederik P Kingma. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 7
|
| 241 |
+
[16] Yuval Kirstain, Adam Polyak, Uriel Singer, Shahbuland Martiana, Joe Penna, and Omer Levy. Pick-a-pic: An open dataset of user preferences for text-to-image generation. Advances in Neural Information Processing Systems, 36: 36652-36663, 2023. 1, 2
|
| 242 |
+
[17] Black Forest Labs. Flux. https://github.com/black-forest-labs/flux, 2024.1,2
|
| 243 |
+
[18] Tony Lee, Michihiro Yasunaga, Chenlin Meng, Yifan Mai, Joon Sung Park, Agrim Gupta, Yunzhi Zhang, Deepak Narayanan, Hannah Teufel, Marco Bellagente, Minguk Kang, Taesung Park, Jure Leskovec, Jun-Yan Zhu, Fei-Fei Li, Jiajun Wu, Stefano Ermon, and Percy S Liang. Holistic evaluation of text-to-image models. In Advances in Neural Information Processing Systems, pages 69981-70011. Curran Associates, Inc., 2023. 2
|
| 244 |
+
[19] Bo Li, Yuanhan Zhang, Dong Guo, Renrui Zhang, Feng Li, Hao Zhang, Kaichen Zhang, Yanwei Li, Ziwei Liu, and Chunyuan Li. Llava-onevision: Easy visual task transfer. arXiv preprint arXiv:2408.03326, 2024. 6, 7
|
| 245 |
+
[20] Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation. In International conference on machine learning, pages 12888-12900. PMLR, 2022. 7
|
| 246 |
+
[21] Youwei Liang, Junfeng He, Gang Li, Peizhao Li, Arseniy Klimovskiy, Nicholas Carolan, Jiao Sun, Jordi Pont-Tuset, Sarah Young, Feng Yang, Junjie Ke, Krishnamurthy Dj Dvi-jotham, Katie Collins, Yiwen Luo, Yang Li, Kai J Kohlhoff, Deepak Ramachandran, and Vidhya Navalpakkam. Rich human feedback for text-to-image generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 1, 2
|
| 247 |
+
[22] Zhiqiu Lin, Deepak Pathak, Baiqi Li, Jiayao Li, Xide Xia, Graham Neubig, Pengchuan Zhang, and Deva Ramanan. Evaluating text-to-visual generation with image-to-text generation. arXiv preprint arXiv:2404.01291, 2024. 1, 2, 6, 7, 10
|
| 248 |
+
[23] Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. Advances in neural information processing systems, 36, 2024. 2
|
| 249 |
+
[24] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. In Semin al graphics: pioneering efforts that shaped the field, pages 347-353. 1998. 3
|
| 250 |
+
[25] Yujie Lu, Xianjun Yang, Xiujun Li, Xin Eric Wang, and William Yang Wang. Llmscore: Unveiling the power of large language models in text-to-image synthesis evaluation. Advances in Neural Information Processing Systems, 36, 2024. 2
|
| 251 |
+
[26] Paul Rademacher, Jed Lengyel, Edward Cutrell, and Turner Whitted. Measuring the perception of visual realism in images. In Rendering Techniques 2001: Proceedings of the Eurographics Workshop in London, United Kingdom, June 25-27, 2001 12, pages 235-247. Springer, 2001. 3
|
| 252 |
+
[27] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,
|
| 253 |
+
|
| 254 |
+
Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748-8763. PMLR, 2021. 2
|
| 255 |
+
[28] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. In International Conference on Machine Learning, pages 8821-8831. PMLR, 2021. 1
|
| 256 |
+
[29] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1 (2):3, 2022.
|
| 257 |
+
[30] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10684-10695, 2022.
|
| 258 |
+
[31] Chitwan Sahara, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479-36494, 2022. 1
|
| 259 |
+
[32] Segmind. Ssd-1b. https://huggingface.co/segmind/SSD-1B, 2023. Accessed: [11/11/2024]. 2
|
| 260 |
+
[33] Jaskirat Singh and Liang Zheng. Divide, evaluate, and refine: Evaluating and improving text-to-image alignment with iterative vqa feedback. Advances in Neural Information Processing Systems, 36:70799-70811, 2023. 2
|
| 261 |
+
[34] Jake Snell, Karl Ridgeway, Renjie Liao, Brett D Roads, Michael C Mozer, and Richard S Zemel. Learning to generate images with perceptual similarity metrics. In 2017 IEEE International Conference on Image Processing (ICIP), pages 4277-4281. IEEE, 2017. 2
|
| 262 |
+
[35] Tristan Thrush, Ryan Jiang, Max Bartolo, Amanpreet Singh, Adina Williams, Douwe Kiela, and Candace Ross. Winoground: Probing vision and language models for visio-linguistic compositionality. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5238–5248, 2022. 2
|
| 263 |
+
[36] Tianyi Xiong, Xiyao Wang, Dong Guo, Qinghao Ye, Haoqi Fan, Quanquan Gu, Heng Huang, and Chunyuan Li. Llavacritic: Learning to evaluate multimodal models. arXiv preprint arXiv:2410.02712, 2024. 6, 7
|
| 264 |
+
[37] Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. Imagereward: Learning and evaluating human preferences for text-to-image generation. arXiv preprint arXiv:2304.05977, 2023.1,2,6,7,10
|
| 265 |
+
[38] Mert Yuksekgonul, Federico Bianchi, Pratyusha Kalluri, Dan Jurafsky, and James Zou. When and why vision-language models behave like bags-of-words, and what to do about it? In The Eleventh International Conference on Learning Representations, 2023. 2
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a876112a0c62e02dfb3e01523c06e9ece438ddd4db150c1e20e460b5e3f79b1b
|
| 3 |
+
size 818302
|
CVPR/2025/Be More Specific_ Evaluating Object-centric Realism in Synthetic Images/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8de1991a49e06ffd1aa96584e1801e4ded7bb644209afd54d687b49499f796a2
|
| 3 |
+
size 319721
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc7368c8a275c998bc332f331dda03cf0d9106daf9c70777aa7d83f4882cc992
|
| 3 |
+
size 90462
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:01b26e1162a5e532b169390cab32090c6b2a07980f7fe388451cd7a65b46c252
|
| 3 |
+
size 117237
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/d2fc6493-b964-4d8a-8029-42d28c745ab3_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba6c1f8da26f6f9479452221b4c2728bbd974408c68da3e66f46b1515755cbf1
|
| 3 |
+
size 1052690
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/full.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Believing is Seeing: Unobserved Object Detection using Generative Models
|
| 2 |
+
|
| 3 |
+
Subhransu S. Bhattacharjee, Dylan Campbell, Rahul Shome
|
| 4 |
+
School of Computing, The Australian National University
|
| 5 |
+
|
| 6 |
+
{subhransu.bhattacharjee, dylan.campbell, rahul.shome}@anu.edu.au
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Can objects that are not visible in an image—but are in the vicinity of the camera—be detected? This study introduces the novel tasks of 2D, 2.5D and 3D unobserved object detection for predicting the location of nearby objects that are occluded or lie outside the image frame. We adapt several state-of-the-art pre-trained generative models to address this task, including 2D and 3D diffusion models and vision-language models, and show that they can be used to infer the presence of objects that are not directly observed. To benchmark this task, we propose a suite of metrics that capture different aspects of performance. Our empirical evaluation on indoor scenes from the RealEstate10k and NYU Depth V2 datasets demonstrate results that motivate the use of generative models for the unobserved object detection task.
|
| 11 |
+
|
| 12 |
+
# 1. Introduction
|
| 13 |
+
|
| 14 |
+
Object detection [90] is a fundamental building block of autonomous systems that are capable of making sense of their surroundings. However, it is limited to visible surfaces within the camera's field-of-view. While amodal object detection and segmentation [35, 89] relaxes this requirement to permit partially visible objects, we propose to go further and detect those objects that are near the camera but were not observed at all.
|
| 15 |
+
|
| 16 |
+
In this paper, we propose the novel task of unobserved object detection in 2D, 2.5D and 3D for inferring the presence of objects not seen in an image within a domain that extends beyond the camera frustum and behind the visible surfaces. We are particularly motivated by perceptual and planning tasks such as visual search [84, 88], where a robot might be expected to use its understanding of a scene beyond what it can directly observe. For example, consider the setup in Fig. 1. A robot tasked with locating someone who is seated might find it useful to look to the right, where it is likely that additional chairs would be found, or to move to view a potentially occluded chair. Predicted spatial likelihoods of objects in a scene that was only partially
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1. Unobserved object detection aims to infer the location of objects that were not directly observed in an image. Consider this toy example of a dining table and chairs. Here we visualize a top-down view (slice) of the predicted discrete distributions $\mathcal{D}_{\mathcal{I}o}^{2D}$ and $\mathcal{D}_{\mathcal{I}o}^{3D}$ for the object label $o$ of "chair," conditioned on the image $\mathcal{I}$ , where darker is more probable. The presence of an occluded chair (A) is predicted as relatively likely, as is the presence of an out-of-frame chair (B). Crucially, the domain $\mathbb{V}$ of the predicted 3D distribution exceeds the camera frustum (drawn in black), and the domain $\mathbb{I}$ of the 2D distribution extends beyond the image plane $\mathcal{I}$ .
|
| 20 |
+
|
| 21 |
+
observed can inform probabilistic models [28, 31, 45] for planning under uncertainty. In this work we recover such spatio-semantic distributions over observed and unobserved parts of the scene. We expect progress on this task to benefit downstream applications in which decisions are made in the presence of uncertainty arising from partial observations, such as active vision, navigation, visual search, adaptive planning and scene exploration [1, 5, 18, 24, 27, 63, 84].
|
| 22 |
+
|
| 23 |
+
While explicitly learning spatio-semantic distributions of scenes and objects is challenging [78], they can be variationally inferred using generative models trained on 2D image datasets [2, 30]. Novel view synthesis and semantic scene completion [7, 11, 17, 33, 55, 60, 73, 77] can offer useful spatio-semantic priors that can be used to render full 3D volumes given partial observations. However, occlusions and incomplete or sparse data still pose significant challenges to 3D scene generation methods. Image diffusion
|
| 24 |
+
|
| 25 |
+
models [22, 70] have been shown to be useful at expanding beyond the visible frame, known as outpainting [51, 57], and some 3D diffusion models [73] can generate 3D representations consistent with an input image. These approaches typically aim for photorealism, of the completed scene, which may not be necessary or desirable for unobserved object detection, where we want to infer the spatio-semantic distribution of an object situated within possible scenes. Despite this weakness, the generative capability of such models is still highly useful.
|
| 26 |
+
|
| 27 |
+
In this work, we investigate the ability of three categories of generative models (2D and 3D diffusion models and vision-language models) to predict spatio-semantic distributions via a sampling procedure. We develop the associated detection pipelines, metrics, and evaluation protocol for the unobserved object detection task. Our contributions are
|
| 28 |
+
|
| 29 |
+
1. defining the novel task of unobserved object detection;
|
| 30 |
+
2. extending three major classes of generative models (2D and 3D diffusion models and vision-language models) to address unobserved object detection; and
|
| 31 |
+
3. benchmarking these approaches under a standardized evaluation protocol with respect to the accuracy and diversity of the predictions.
|
| 32 |
+
|
| 33 |
+
We evaluate performance under 2D, 2.5D, and 3D settings, on the RealEstate10k [87] and NYU Depth V2 [65] datasets using MS-COCO object categories [34]. The results from these pre-trained models is promising, but also reveals several challenges, motivating further research on the unobserved object detection task.
|
| 34 |
+
|
| 35 |
+
# 2. Related Work
|
| 36 |
+
|
| 37 |
+
Object detection [90] focuses on identifying and localizing objects within images, with recent deep learning models such as Faster R-CNN [54],YOLO [53], and transformer-based approaches like DETR [9] significantly enhancing both accuracy and efficiency. However, occlusions in real-world scenarios, such as autonomous driving and robotics, remains a critical challenge for traditional models. Amodal object detection and segmentation [35, 89] extends traditional approaches by predicting the full projected geometry of partially occluded objects. Li and Malik [32] introduced amodal bounding box regression including unseen parts. Recent improvements [6, 71] leverage Bayesian or hierarchical occlusion modeling. However, these methods cannot reason about fully occluded or out-of-frame objects.
|
| 38 |
+
|
| 39 |
+
2D diffusion models [22, 68, 70] generate high-quality, plausible images via an iterative denoising process, which can be guided by conditioning inputs such as text or images [29, 58]. Classifier-free guidance [21], capable of learning the conditional and unconditional models simultaneously, has been applied to scene completion and conditional synthesis [59, 72]. Stable Diffusion [51, 57] is used for extending high-resolution image boundaries, conditioned on text, in
|
| 40 |
+
|
| 41 |
+
image outpainting, generating high-resolution images, conditioned on text [21]. We explore spatio-semantic relationships learned by such models in the context of our task.
|
| 42 |
+
|
| 43 |
+
Novel View Synthesis (NVS) [20, 67] is the task of generating new views of a scene from a set of posed input images. Neural Radiance Fields (NeRF) [41] parameterize scenes as continuous volumetric radiance fields, enabling high-fidelity rendering. However, NeRF typically requires many input images and known camera poses. Several related methods [56, 79, 82] leverage pre-trained scene priors to improve generalization in the sparse input setting, but the reconstruction is typically blurry in the unobserved regions. More recent approaches [2, 60, 83] integrate a diffusion model into the NVS pipeline to overcome these averaging issues. Diffusion with Forward Models (DFM) [73] combines a transformer encoder with PixelNeRF [49, 82] and uses a Denoising Diffusion Implicit Model (DDIM) [69] to generate diverse 3D representations conditioned on a single RGB image. GeNVS [11] follows a similar approach to sample novel views instead of full 3D scenes. Newer models like Multi-Diff [44], using depth-warped priors, show improvements in quality and speed, but code has not yet been publicly released. Despite its computational demands and challenges with out-of-distribution data, DFM remains a strong benchmark for generating 3D-consistent views of a scene from a single image. We investigate whether DFM-generated scenes capture plausible spatio-semantic relationships for our task.
|
| 44 |
+
|
| 45 |
+
Vision-Language Models (VLMs) [85] are effective for spatio-semantic reasoning, excelling at one-shot and zero-shot tasks, but struggle with context-based reasoning. Models like CLIP [52] or ALIGN [25] which align visual and textual data for object recognition and segmentation, encounter difficulties in contexts with incomplete or sparse information [12]. These limitations are evident in tasks requiring spatial and compositional reasoning [86] and benchmarks [40, 74] which highlight difficulties in ambiguous scenes. While models like ChatGPT and LLaVA [12, 37, 38, 46] have improved multi-modal reasoning, they have limitations in understanding 3D spatial relationships [8]. Cirik et al. [14] leveraged contextual semantic co-occurrences, learned by language models, from the unobserved parts of a scene and relied on semantic affinities for active prediction. In contrast, our work evaluates whether modern VLMs [3, 4, 38, 46] can perform this passive inference, implicitly from a single observation.
|
| 46 |
+
|
| 47 |
+
# 3. Unobserved Object Detection
|
| 48 |
+
|
| 49 |
+
The task of unobserved object detection, as shown in Fig. 1, is to detect objects that are in the scene, but are not captured within the camera frustum. The approaches considered in this paper address this task by predicting a conditional distribution $\mathcal{D}_{\mathcal{I}}$ over a bounded space and set of semantic labels given a single RGB image $\mathcal{I}$ , referred to as a spatio
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 2. The 3D diffusion-based pipeline.
|
| 53 |
+
|
| 54 |
+
semantic distribution (SSD). This facilitates the inference of the probable locations of unobserved objects outside the visible region captured by the image and its associated camera frustum, using contextual cues from the image. The spatial domain $\mathcal{X}$ defines the support of this distribution. The SSD is an estimate of the ground-truth conditional distribution $\Gamma_{\mathcal{I}}$ . While this distribution is not observable, we have access to additional posed images from a realization of this conditional distribution for the purpose of evaluation. For each object label $o$ , we denote the associated SSD as $\mathcal{D}_{\mathcal{I}o}$ . This maps each $x \in \mathcal{X}$ to a likelihood in $[0,1]$ . That is, the likelihood of detecting object $o$ at location $x$ . For example, it assigns a likelihood to the presence of a chair one meter in front of and two meters to the right of the camera, which may not be visible in the input image. Note that we consider all distributions to be normalized. We consider distributions over two discretized spatial domains $\mathcal{X}$ : (1) a 2D domain $\mathbb{I}$ , discretized as a pixel grid, corresponding to an expansion of the input image; and (2) a 3D domain $\mathbb{V}$ , discretized as a voxel grid, extending beyond the input camera's frustum. The 2D domain $\mathbb{I}$ symmetrically extends the $H \times W$ pixel grid of the input image to $H \times W'$ , where $W' > W$ . The 3D domain $\mathbb{V}$ expands the frustum to an expanded voxel grid aligned with the input camera pose.
|
| 55 |
+
|
| 56 |
+
# 4. Generative Model-based Detection Pipelines
|
| 57 |
+
|
| 58 |
+
This section details how three pipelines based on generative models—(1) a 3D diffusion model (Fig. 2), a 2D diffusion model (Fig. 3), and (3) vision-language models (Fig. 4), which can be used to estimate the 2D or 3D SSD $\mathcal{D}_{\mathcal{I}_o}$ from an RGB image $\mathcal{I}$ , for object $o$ .
|
| 59 |
+
|
| 60 |
+
3D Diffusion-based Model. We utilize Diffusion with Forward Models (DFM) [73] to estimate both the 2D and 3D $\mathcal{D}_{\mathcal{I}_o}$ . This approach generates a 3D representation conditioned on a single RGB image, from which an RGBD image can be rendered from any camera pose. We select a set of $k = 4$ target camera poses, including the input image's camera pose, as visualized in Fig. 2, render the corresponding RGBD images, and combine the results into a single point cloud. An off-the-shelf object detector, YOLOv8x [26, 53], is run on these frames. For 3D detection, the 2D bounding boxes for each object $o$ are back-projected onto the point
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 3. The 2D diffusion-based pipeline.
|
| 64 |
+
|
| 65 |
+
cloud alongside detection confidences. We take multiple samples from the conditional distribution by repeating the generation process a total of $n_s$ times over additional camera poses, conditioned on the same input image $\mathcal{I}$ , and the results are aggregated into the estimated distribution. We combine all the 3D samples into a common frame of reference, voxelize the resulting 3D confidence map into grid cells $\mathbb{V}$ , average the non-zero confidences of the points across each voxel, and then apply softmax normalization to obtain the 3D distribution $\mathcal{D}_{\mathcal{I}o}^{3D}$ . The DFM pipeline can expand the detection volume beyond the initial visible frame and recover occlusions in 3D using the novel camera views. More details on the sampling process is in Appendix C.
|
| 66 |
+
|
| 67 |
+
2D Diffusion-based Model. To evaluate the capacity of a 2D diffusion model at estimating the conditional distribution, we utilize a 2D diffusion model, SDXL [51, 75], which expands the image canvas of $\mathcal{I}$ using outpainting to perform conditional generation to fill the unobserved regions to the left and right of the input image ( $360 \times 360$ input to a $360 \times 640$ output). The process is repeated for $n_s$ generated samples (shown in Fig. 3) We then run an object detector, YOLOv8x [26, 53] to assign confidence scores for object $o$ to each pixel, followed by softmax normalization, resulting in a 2D SSD $\mathcal{D}_{\mathcal{I}_o}^{2D}$ . To obtain the 3D distribution $\mathcal{D}_{\mathcal{I}}^{3D}$ , we re-projected 2D bounding boxes into 3D using metric depth values from DepthAnythingv2 [80, 81] and camera parameters from the RealEstate10k dataset, with additional parameters from COLMAP reconstructions [61, 62] for the NYU Depth V2 dataset, then voxelized the 3D point map, averaging confidence scores within each voxel.
|
| 68 |
+
|
| 69 |
+
VLM-based Models. We adapt several VLMs to the task of predicting the (coarsely-discretized) 2D conditional distribution: ChatGPT-4o [46], Claude-3.5 Sonnet [4], Gemini 1.5 Ultra [3] and LLaVa-34B-v1.6 [37, 38]. To do so, each model was provided with the $360 \times 360$ input image,
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 4. The VLM-based pipeline.
|
| 73 |
+
|
| 74 |
+
padded with 140 black pixels to the left and right, forming a $640 \times 360$ image. For each object $o$ , the model was queried for a constrained binary “Yes”/“No” response whether the object was within the original frame or the extended region to the left or to the right. A fraction of “Yes” responses out of $n_s$ queries was produces a prediction confidence for the left/center/right regions, further normalized to generate $\mathcal{D}_{\mathcal{I}o}^{2D}$ (Fig. 4) for region-wise estimates. Prompt and experiment design details are provided in Sec. 5.2 and Appendix D.
|
| 75 |
+
|
| 76 |
+
# 5. Experiments
|
| 77 |
+
|
| 78 |
+
We evaluate model performance on three distinct tasks—2D, 2.5D, and 3D—for indoor scenes [65, 87] with MS-COCO objects [34]. Each experiment generates SSDs, aligned with the input image's camera pose. The 2D task involves estimating $\mathcal{D}_{\mathcal{I}o}^{2\mathrm{D}}$ within the expanded image domain $\mathbb{I}$ from the viewpoint of the input camera. The 2.5D task focuses on estimating the portion of $\mathcal{D}_{\mathcal{I}o}^{3\mathrm{D}}$ visible in the expanded image $\mathbb{I}$ , centered at the input camera location. Finally, the 3D task extends this estimation for $\mathcal{D}_{\mathcal{I}o}^{3\mathrm{D}}$ over an expanded 3D region that accounts for out-of-frame detections and occlusions.
|
| 79 |
+
|
| 80 |
+
# 5.1. Metrics for Unobserved Object Detection
|
| 81 |
+
|
| 82 |
+
To evaluate the unobserved object detection task, we propose metrics to quantify how well the predicted conditional distribution $\mathcal{D}_{\mathcal{I}_o}$ for an object $o$ over a discrete domain $\mathcal{X}$ aligns with the true conditional distribution. However, we only have access to a single realization of this distribution, denoted by $\mathcal{G}_{\mathcal{I}_o}$ . Significantly, the true conditional distribution $\Gamma_{\mathcal{I}_o}$ is likely to have more modes than the realization $\mathcal{G}_{\mathcal{I}_o}$ . For example, given an image $\mathcal{I}$ of a dining table, the ground-truth scene (the realization) happened to have several chairs clustered to the right of the camera. However, the exact same image could equally well have corresponded to a scene with a chair to the left of the camera (another, unrealized, scene conditioned on the same image). We expect the models to predict all plausible modes, and our metrics are informed by this asymmetry between the ground-truth and the prediction.
|
| 83 |
+
|
| 84 |
+
Normalized Entropy $(\mathcal{H})$ and Cross-Entropy $(\mathcal{H}^{\times})$ . The normalized entropy $\mathcal{H}$ [64] of the predicted distribution $\mathcal{D}_{\mathcal{I}_o}$ and the normalized cross-entropy $\mathcal{H}^{\times}$ [15] between the ground-truth distribution $\mathcal{G}_{\mathcal{I}_o}$ and $\mathcal{D}_{\mathcal{I}_o}$ are given by
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathcal {H} _ {\mathcal {I} _ {o}} := \frac {- 1}{\log | \mathcal {X} |} \sum_ {x \in \mathcal {X}} \mathcal {D} _ {\mathcal {I} _ {o}} (x) \log \mathcal {D} _ {\mathcal {I} _ {o}} (x), \tag {1}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathcal {H} _ {\mathcal {I o}} ^ {\times} := \frac {- 1}{\log | \mathcal {X} |} \sum_ {x \in \mathcal {X}} \mathcal {G} _ {\mathcal {I o}} (x) \log \mathcal {D} _ {\mathcal {I o}} (x), \tag {2}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
for input image $\mathcal{I}$ and object $o$ . The normalization factor $\log |\mathcal{X}|$ makes the metric independent of the grid resolution and ensures that a uniform distribution evaluates to unit entropy. This asymmetric measure penalizes the prediction
|
| 95 |
+
|
| 96 |
+
of low object likelihood where the ground-truth indicates the presence of an object. However, as required, it does not penalize the prediction of high object likelihoods where the ground-truth has not seen an object. For the remaining metrics, we consider high-likelihood detections above a threshold $\tau$ . The thresholded ground truth is denoted by $\mathcal{G}_{\mathcal{I}_o}^\tau$ for all $x \in \mathcal{X}$ where $\mathcal{G}_{\mathcal{I}_o}(x) > \tau$ . Let the detection label $y_{\mathcal{I}_o}$ be 1 if $\mathcal{G}_{\mathcal{I}_o}^\tau$ is non-empty and 0 otherwise. The thresholded prediction $\mathcal{D}_{\mathcal{I}_o}^\tau$ and label $\hat{y}_{\mathcal{I}_o}$ are defined over $\mathcal{D}_{\mathcal{I}_o}$ .
|
| 97 |
+
|
| 98 |
+
Normalized Nearest Neighbor Distance $(\Delta)$ . This asymmetric metric quantifies the spatial distance between the peaks (local maxima) in the thresholded ground truth $\mathcal{P}_{\mathcal{G}_{\mathcal{I}_o}^{\tau}}$ to the nearest peaks in the thresholded predictions $\mathcal{P}_{\mathcal{D}_{\mathcal{I}_o}^{\tau}}$ . For a single input image $\mathcal{I}$ and object $o$ , this is given by
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\Delta_ {\mathcal {I} _ {o}} := \frac {1}{| \mathcal {P} _ {\mathcal {G} _ {\mathcal {I} _ {o}} ^ {\tau}} |} \sum_ {x \in \mathcal {P} _ {\mathcal {G} _ {\mathcal {I} _ {o}} ^ {\tau}}} \min _ {x ^ {\prime} \in \mathcal {P} _ {\mathcal {D} _ {\mathcal {I} _ {o}} ^ {\tau}}} \frac {\left\| x - x ^ {\prime} \right\|}{\operatorname {d i a m} (\mathcal {X})}, \tag {3}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\mathrm{diam}(\mathcal{X})$ is the maximum distance within $\mathcal{X}$ (i.e., the diagonal in the 2D or 3D grid) that normalizes the measure with respect to the domain size. If predicted peaks $\mathcal{P}_{\mathcal{D}_{\mathcal{I}_o}^{\tau}}$ is empty, $\Delta_{\mathcal{I}_o} \coloneqq \infty$ . Large distances indicate that the object was not predicted near where it is located in the ground truth.
|
| 105 |
+
|
| 106 |
+
False Negative Rate (FNR). Measured over the entire set of evaluations (scenes $S$ and objects $\mathcal{O}$ ), the thresholded ground-truth and predicted labels are used in this metric to compute the false negative rate of classification, given as.
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathrm {F N R} := \frac {\sum_ {\mathcal {I} \in \mathcal {S}} \sum_ {o \in \mathcal {O}} y _ {\mathcal {I} o} \left(1 - \hat {y} _ {\mathcal {I} o}\right)}{\sum_ {\mathcal {I} \in \mathcal {S}} \sum_ {o \in \mathcal {O}} y _ {\mathcal {I} o}}. \tag {4}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
2D Region-wise Accuracy $(\mathcal{A})$ . This metric evaluates the coarse-grained classification accuracy of the predictor in 2D. Specifically, we decompose the domain $\mathcal{X}$ into $\ell$ subdomains $\mathcal{X}^i$ and define corresponding ground-truth and prediction labels for thresholded detections over the regions as $y_{\mathcal{I}_o}^i$ and $\hat{y}_{\mathcal{I}_o}^i$ respectively. For image $\mathcal{I}$ and object $o$ , this is given by
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathcal {A} _ {\mathcal {I} o} := \frac {1}{\ell} \sum_ {i = 1} ^ {\ell} y _ {\mathcal {I} o} ^ {i} \hat {y} _ {\mathcal {I} o} ^ {i} + (1 - y _ {\mathcal {I} o} ^ {i}) (1 - \hat {y} _ {\mathcal {I} o} ^ {i}). \qquad (5)
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
# 5.2. Experiment Setup
|
| 119 |
+
|
| 120 |
+
In this section we provide details pertaining to the datasets, baselines, implementation, and evaluation protocol.
|
| 121 |
+
|
| 122 |
+
Datasets. All models were evaluated on 10 indoor scenes from the RealEstate10k test set [87] and the NYU Depth V2 dataset [65], automatically selected based on object detection frequency. After filtering, each scene has an average of 190 images in RealEstate10k ( $720 \times 1280$ , resized to $360 \times 640$ for $\mathbb{I}$ , and center-cropped to $360 \times 360$ for $\mathcal{L}$ ) and
|
| 123 |
+
|
| 124 |
+
1359 images in NYU Depth V2 (480 × 640, center-cropped to 360 × 640 for I and center-cropped to 360 × 360 for I). One randomly selected frame per scene was used as the input image I for evaluation. COLMAP [61] and GLOMAP [48] were used for camera pose estimation (for NYU Depth V2) and for reconstruction to obtain depth maps. Object annotations for each expanded 360 × 640 image I were generated using YOLOv8x [26, 53], pre-trained on the MS-COCO dataset [34], retaining those with confidence greater than $\tau_{\mathrm{conf}}$ . The 2D ground-truth spatial distributions $\mathcal{G}_{Io}^{2\mathrm{D}}$ were computed by a softmax normalization of the detected object confidence logits. The 3D ground-truth spatial distributions $\mathcal{G}_{Io}^{3\mathrm{D}}$ were computed by back-projecting the object confidence logits using the 3D reconstructions, voxelizing with average pooling, then applying softmax normalization. The voxel grid has resolution $20 \times 20 \times 20$ with grid size 1.0. The 2.5D ground truth spatial distributions $\mathcal{G}_{Io}^{2.5\mathrm{D}}$ were computed similarly, by back-projecting the confidence logits within the input camera frustum and using a voxel grid of resolution $10 \times 10 \times 10$ , with a grid size of 1.0. Note that we only retain non-empty ground-truth distributions in the dataset: if a scene $s$ does not contain an object $o$ , $(s,o)$ is not part of the dataset. See Appendices A and B for details on automatic scene pre-processing, filtering, selection, and reconstruction.
|
| 125 |
+
|
| 126 |
+
Baselines. To provide context for the benchmark, we report results for a uniform baseline, whereby equal probabilities are assigned across the grid. We also report results for an oracle, which has access to the ground truth. For the 2D task, the oracle uses the 2D ground-truth distribution corresponding to the expanded image $\mathbb{I}$ . For the 2.5D task, the oracle uses the unprojected 2D ground-truth distribution. For the 3D task, the oracle uses the 3D ground-truth distribution.
|
| 127 |
+
|
| 128 |
+
Implementation Details. The hyperparameters are set as follows: the classification threshold $\tau = 1.4 / |\mathcal{X}|$ , the minimum detection confidence $\tau_{\mathrm{conf}} = 0.1$ , and the number of subdomains $\mathcal{X}^i$ for region-wise accuracy $\ell = 3$ , corresponding to the $360 \times 360$ input image $\mathcal{I}$ , the $360 \times 140$ domain to the left of the image and the $360 \times 140$ domain to the right of the image. For DFM [73] inference, we use autoregressive sampling with 3 timesteps per frame, generating 50 intermediate frames with default settings: a temperature of 0.85 and a guidance scale of 2.0. Generating each sample took 25 minutes per target pose per sample on average; that is, 48 days to generate all samples for each dataset.
|
| 129 |
+
|
| 130 |
+
For Stable Diffusion sampling [51], the Diffusers library SDXL inpainting model was employed. Input images were padded by 140 pixels on the left and right sides for masked inpainting. The temperature was set to 0.25, the prompt guidance scales were drawn from $\{0.25, 0.5, 0.75, 1.0\}$ , the seeds from $\{0, 42, 123, 999, 2021\}$ , and the prompts from a set of 10, yielding $4 \times 5 \times 10 = 200$ samples per scene. For the VLMs, we used ChatGPT-4o [46], Claude-Sonnet
|
| 131 |
+
|
| 132 |
+
3.5 [4], and Gemini 1.5 Ultra [3] via their official APIs, and LLaVa-v1.6-34b [37, 38] via the Replicate API. The temperature was set to 0.25, the top-p value was set to 1.0 where applicable, and the order of the image-question pairs was randomly shuffled. The VLMs were queried 100 times per object, region, and scene, resulting in 6000 calls each (20 images $\times$ 30 questions $\times$ 10 shuffles). Data acquisition and post-processing through these APIs took $\sim$ 8h. Details are in Appendices C and D. Future updates or access restrictions to APIs used in this study could affect reproducibility. All experiments were run on one NVIDIA RTX A6000 GPU. Our code and evaluation protocols are on the project page<sup>1</sup>.
|
| 133 |
+
|
| 134 |
+
# 5.3. Results
|
| 135 |
+
|
| 136 |
+
In Tabs. 1 and 2, we report the performance of the generative models at the 2D, 2.5D and 3D unobserved object detection tasks. The metrics are reported as averages and standard deviations over scene-object combinations. The distance average excludes $\Delta = \infty$ entries; these are captured by the false negative rate. Methods were only evaluated on tasks for which they are applicable: we lift the VLM outputs from their binary labels to a 2D distribution, and lift the 2D diffusion outputs to a 2.5D distribution, but cannot obtain the 3D distribution from either. For the 2D task (Tab. 1), the 2D diffusion model shows the best performance, while the 3D diffusion model remains competitive. The coarse-grained VLMs struggle in most metrics with large spatial errors, $\Delta$ , as expected. For the 2.5D task (Tab. 2, left), the 3D diffusion model consistently outperforms the 2D diffusion model (SDXL) [51, 57], augmented with monocular depth estimates [81], with the exception of cross-entropy and the false negative rate when the outpainting model is prompted with the target object. Finally, for the 3D task (Tab. 2, right), we see that the 3D diffusion model remains competitive. Lower values of $\mathcal{H}^{\times}$ and $\Delta$ indicate better agreement with $\mathcal{G}_{\mathcal{I}_o}$ . For example, a low $\Delta$ indicates that the predicted modes that overlap with those in $\mathcal{G}_{\mathcal{I}_o}$ .
|
| 137 |
+
|
| 138 |
+
Qualitative results are shown in Fig. 5, with the $360 \times 360$ center-cropped input image $\mathcal{I}$ shown within the dashed lines in the first column, a top-down view of the DFM-predicted 3D distribution in the second column, the SDXL-predicted 2D distribution in the third column, and the ChatGPT-predicted 2D distribution in the last column. In particular, the DFM-based model usually predicts high likelihoods near the ground-truth object's 3D location, including when the object is occluded or out-of-frame, which is a significantly harder task than the 2D prediction task; see, for example, the final row. More qualitative results can be found in Appendix E. Failure cases are shown in Fig. 6, where all models perform poorly and an object category (door) that elicits many false negatives in the object detector. We also observe that the diffusion-based outpainting approach has its own modes of
|
| 139 |
+
|
| 140 |
+
Table 1. Performance of all models at the 2D unobserved object detection task on the RealEstate10k [87] and NYU Depth V2 [65] datasets. We report the cross-entropy $\mathcal{H}^{\times}$ , the prediction entropy $\mathcal{H}$ , the nearest neighbor distance $\Delta$ , the false negative rate (FNR), and the region-wise classification accuracy $\mathcal{A}$ . The best non-oracle result is indicated in bold.
|
| 141 |
+
|
| 142 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">RealEstate10k [87]</td><td colspan="5">NYU Depth V2 [65]</td></tr><tr><td>H×↓</td><td>H↓</td><td>Δ%↓</td><td>FNR↓</td><td>A↑</td><td>H×↓</td><td>H↓</td><td>Δ%↓</td><td>FNR↓</td><td>A↑</td></tr><tr><td rowspan="2">Uniform</td><td>1.000</td><td>1.000</td><td>∞</td><td>1.000</td><td>0.553</td><td>1.000</td><td>1.000</td><td>∞</td><td>1.000</td><td>0.558</td></tr><tr><td>±0.000</td><td>±0.000</td><td></td><td></td><td>±0.220</td><td>±0.000</td><td>±0.000</td><td></td><td></td><td>±0.214</td></tr><tr><td rowspan="2">Oracle</td><td>0.690</td><td>0.690</td><td>0.000</td><td>0.000</td><td>1.000</td><td>0.714</td><td>0.714</td><td>0.000</td><td>0.000</td><td>1.000</td></tr><tr><td>±0.123</td><td>±0.123</td><td>±0.000</td><td></td><td>±0.000</td><td>±0.143</td><td>±0.143</td><td>±0.000</td><td></td><td>±0.000</td></tr><tr><td rowspan="2">DFM</td><td>1.555</td><td>0.774</td><td>5.990</td><td>0.032</td><td>0.747</td><td>1.661</td><td>0.696</td><td>6.217</td><td>0.055</td><td>0.765</td></tr><tr><td>±1.460</td><td>±0.119</td><td>±39.470</td><td></td><td>±0.139</td><td>±1.336</td><td>±0.128</td><td>±36.112</td><td></td><td>±0.236</td></tr><tr><td rowspan="2">SDXL</td><td>1.257</td><td>0.848</td><td>0.446</td><td>0.000</td><td>0.918</td><td>1.223</td><td>0.778</td><td>0.510</td><td>0.000</td><td>0.944</td></tr><tr><td>±2.033</td><td>±0.171</td><td>±25.490</td><td></td><td>±0.147</td><td>±2.107</td><td>±0.212</td><td>±26.929</td><td></td><td>±0.142</td></tr><tr><td rowspan="2">ChatGPT-4o</td><td>1.332</td><td>0.968</td><td>25.448</td><td>0.024</td><td>0.816</td><td>1.415</td><td>0.981</td><td>18.118</td><td>0.000</td><td>0.810</td></tr><tr><td>±0.265</td><td>±0.056</td><td>±13.504</td><td></td><td>±0.251</td><td>±0.935</td><td>±0.043</td><td>±26.556</td><td></td><td>±0.427</td></tr><tr><td rowspan="2">Claude-3.5-Sonnet</td><td>1.880</td><td>0.935</td><td>22.107</td><td>0.076</td><td>0.772</td><td>1.575</td><td>0.976</td><td>19.091</td><td>0.024</td><td>0.750</td></tr><tr><td>±1.240</td><td>±0.053</td><td>±23.443</td><td></td><td>±0.148</td><td>±1.553</td><td>±0.040</td><td>±22.609</td><td></td><td>±0.280</td></tr><tr><td rowspan="2">Gemini-1.5-Ultra</td><td>1.968</td><td>0.968</td><td>24.389</td><td>0.124</td><td>0.733</td><td>1.896</td><td>0.957</td><td>16.911</td><td>0.039</td><td>0.705</td></tr><tr><td>±0.541</td><td>±0.044</td><td>±12.981</td><td></td><td>±0.286</td><td>±0.909</td><td>±0.040</td><td>±15.458</td><td></td><td>±0.277</td></tr><tr><td rowspan="2">LLaVa-v1.6-34b</td><td>1.232</td><td>0.945</td><td>25.321</td><td>0.262</td><td>0.770</td><td>1.455</td><td>0.970</td><td>24.369</td><td>0.142</td><td>0.743</td></tr><tr><td>±0.602</td><td>±0.050</td><td>±15.532</td><td></td><td>±0.276</td><td>±0.594</td><td>±0.043</td><td>±17.803</td><td></td><td>±0.283</td></tr></table>
|
| 143 |
+
|
| 144 |
+
Table 2. Performance of all models on the 2.5D and 3D unobserved object detection tasks. We report the cross-entropy $\mathcal{H}^{\times}$ , prediction entropy $\mathcal{H}$ , nearest neighbor distance $\Delta$ , and false negative rate FNR. The best non-oracle result is in bold.
|
| 145 |
+
|
| 146 |
+
<table><tr><td rowspan="3">Method</td><td colspan="8">2.5D Task</td><td colspan="8">3D Task</td></tr><tr><td colspan="4">RealEstate10k [87]</td><td colspan="4">NYU Depth V2 [65]</td><td colspan="4">RealEstate10k [87]</td><td colspan="4">NYU Depth V2 [65]</td></tr><tr><td>\( \mathcal{H}^{\times}\downarrow \)</td><td>\( \mathcal{H}\downarrow \)</td><td>\( \Delta (\%) \)↓</td><td>FNR↓</td><td>\( \mathcal{H}^{\times}\downarrow \)</td><td>\( \mathcal{H}\downarrow \)</td><td>\( \Delta (\%) \)↓</td><td>FNR↓</td><td>\( \mathcal{H}^{\times}\downarrow \)</td><td>\( \mathcal{H}\downarrow \)</td><td>\( \Delta (\%) \)↓</td><td>FNR↓</td><td>\( \mathcal{H}^{\times}\downarrow \)</td><td>\(\mathcal{H}\downarrow\)</td><td>\( \Delta (\%) \)↓</td><td>FNR↓</td></tr><tr><td>Uniform</td><td>1.000±0.000</td><td>1.000±0.000</td><td>∞</td><td>1.000</td><td>1.000±0.000</td><td>1.000±0.000</td><td>0.000±0.000</td><td>1.000</td><td>1.000±0.000</td><td>1.000±0.000</td><td>∞</td><td>1.000</td><td>1.000±0.000</td><td>1.000±0.000</td><td>∞</td><td>1.000</td></tr><tr><td>Oracle</td><td>0.238±0.014</td><td>0.238±0.014</td><td>0.000±0.000</td><td>0.000</td><td>0.297±0.006</td><td>0.297±0.006</td><td>0.000±0.000</td><td>0.000</td><td>0.288±0.136</td><td>0.288±0.136</td><td>0.000±0.000</td><td>0.000</td><td>0.168±0.176</td><td>0.168±0.176</td><td>0.000±0.000</td><td>0.000</td></tr><tr><td>DFM</td><td>1.955±2.033</td><td>0.530±0.441</td><td>5.128±3.042</td><td>0.032</td><td>1.785±2.101</td><td>0.610±2.077</td><td>4.214±2.803</td><td>0.055</td><td>2.471±4.415</td><td>0.303±0.202</td><td>9.190±6.223</td><td>0.017</td><td>2.062±3.915</td><td>0.541±0.374</td><td>3.948±5.801</td><td>0.000</td></tr><tr><td>SDXL</td><td>1.752±2.043</td><td>0.617±0.305</td><td>6.277±2.229</td><td>0.000</td><td>1.533±2.916</td><td>0.655±0.323</td><td>5.245±2.351</td><td>0.000</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr></table>
|
| 147 |
+
|
| 148 |
+
Table 3. Ablation and analysis on the combined RealEstate10k and NYU Depth V2 dataset. The best variant of each method is in bold.
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">2D Task</td><td colspan="4">2.5D Task</td><td colspan="4">3D Task</td></tr><tr><td>H×↓</td><td>H↓</td><td>Δ(%)↓</td><td>FNR↓</td><td>A↑</td><td>H×↓</td><td>H↓</td><td>Δ(%)↓</td><td>FNR↓</td><td>H×↓</td><td>H↓</td><td>Δ(%)↓</td><td>FNR↓</td></tr><tr><td>DFM (25 samples, 4 poses)</td><td>1.595</td><td>0.744</td><td>6.076</td><td>0.04</td><td>0.754</td><td>1.890</td><td>0.560</td><td>4.781</td><td>0.04</td><td>2.303</td><td>0.401</td><td>7.041</td><td>0.01</td></tr><tr><td>DFM (25 samples, 3 poses)</td><td>1.944</td><td>0.860</td><td>19.019</td><td>0.14</td><td>0.612</td><td>2.037</td><td>0.808</td><td>12.339</td><td>0.13</td><td>3.226</td><td>0.558</td><td>8.797</td><td>0.08</td></tr><tr><td>DFM (25 samples, 2 poses)</td><td>2.466</td><td>0.931</td><td>14.734</td><td>0.88</td><td>0.567</td><td>2.562</td><td>0.994</td><td>13.205</td><td>0.86</td><td>4.931</td><td>0.703</td><td>11.105</td><td>0.38</td></tr><tr><td>DFM (15 samples, 4 poses)</td><td>1.804</td><td>0.925</td><td>16.059</td><td>0.58</td><td>0.592</td><td>2.140</td><td>0.873</td><td>8.759</td><td>0.67</td><td>4.047</td><td>0.858</td><td>9.980</td><td>0.07</td></tr><tr><td>DFM (10 samples, 4 poses)</td><td>2.342</td><td>0.952</td><td>14.787</td><td>0.72</td><td>0.574</td><td>2.480</td><td>0.996</td><td>17.678</td><td>0.75</td><td>4.695</td><td>0.965</td><td>12.481</td><td>0.22</td></tr><tr><td>SDXL (w/ object cues)</td><td>1.244</td><td>0.870</td><td>0.470</td><td>0.00</td><td>0.928</td><td>1.668</td><td>0.631</td><td>5.884</td><td>0.00</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SDXL (w/o object cues)</td><td>1.977</td><td>0.885</td><td>6.037</td><td>0.49</td><td>0.716</td><td>2.129</td><td>0.860</td><td>16.051</td><td>0.48</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SDXL (w/o prompts)</td><td>2.963</td><td>0.926</td><td>6.482</td><td>0.51</td><td>0.767</td><td>2.229</td><td>0.952</td><td>17.949</td><td>0.51</td><td>-</td><td>-</td><td>-</td><td>-</td></tr></table>
|
| 151 |
+
|
| 152 |
+
failure, also shown in Fig. 6, where the results are not informative in a scene if the model is not prompted with the label of the object to be detected.
|
| 153 |
+
|
| 154 |
+
# 5.4. Ablation Studies & Analysis
|
| 155 |
+
|
| 156 |
+
In Tab. 3, we report the ablation study and analysis for the 2D and 3D diffusion-based detectors. First, we analyze the effect of reducing the number of camera poses $k$ at which the DFM model is queried, from 4 to 2, which affects the cov
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 5. Qualitative results. Each row shows the predicted 2D and top-down 3D spatial distributions generated by each method for various object categories: TV (first row), refrigerator (second row), sink (third row), laptop (fourth row), and sink (fifth row). Notably, in the bottom row, the DFM-based model infers the likely presence of a sink, occluded by the refrigerator, albeit not with a high likelihood. A white triangle marks the camera position, while dashed and dot-dashed lines depict the camera frustums for $\mathcal{I}$ and $\mathbb{I}$ . The white star indicates the ground-truth position of the object, when visible in 2D. Heatmap colors indicate object likelihood, with warmer tones representing higher probabilities. Since these are spatially-normalized distributions, we use a log-scale for visualization.
|
| 160 |
+
|
| 161 |
+
erage of the scene. To do so, we randomly drop one or two camera poses and report the performance. We find that the performance decreases considerably as the number of camera poses decreases, across all tasks. Second, we analyze the effect of reducing the number of conditionally-independent samples per additional camera pose from 25 to 10, which reduces the diversity of the predicted conditional distribution which negatively affects performance. We also ablate the 2D diffusion-based approach, investigating the effect of object cues in the text prompts on the results, evaluating
|
| 162 |
+
|
| 163 |
+
the pipeline (a) without prompts; (b) without object cues, where the model is provided with text guidance but without referring to objects (e.g., "extend this indoor scene naturally to the left and right of the given frame"); and (c) with object cues in the prompts (e.g., "extend this scene naturally on both sides, with objects like [OBJECT]"). Prompts with object cues appear to significantly impact performance of the SDXL-based method in the task, indicating that these methods make heavy use of textual guidance in the generative process, as demonstrated in the 2D and 2.5D ablation study.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
(a) $\mathcal{I}$ (center) and $\mathbb{I}$ (full)
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
(b) DFM-based $\mathcal{D}_{\mathcal{I}_0}^{3\mathrm{D}}$
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
(c) SDXL-based $\mathcal{D}_{\mathcal{I}_0}^{2\mathrm{D}}$
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
(d) ChatGPT-based $\mathcal{D}_{\mathcal{I}_0}^{2\mathrm{D}}$
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
(e) SDXL w/o object cue prompt failure
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
(f) SDXL w/o object cue prompt failure
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
(g) Failure with object cues
|
| 193 |
+
Figure 6. Failure cases. In the first row, the DFM-based model misses plausible locations where a refrigerator might be and the ChatGPT-4o-based model fails to report any detections. In the second row, the presence of the door on the left is not inferred by the DFM or SDXL-based models, primarily due to the object detector's false negatives on synthetic images for that class. The last row shows outpainting failure cases. The SDXL outpainting model, when prompted without object cues, often extends images with textures (e) or unrelated imagery (f). Even when object cues (here, "refrigerator") are provided (g), results may ignore the prompt and generate unnaturally extended images.
|
| 194 |
+
|
| 195 |
+
Details of the complete analysis and ablation study can be found in the Appendix E. We used default hyperparameters without any dataset-specific changes for all our experiments in the generation process (details in Appendices A, C and D).
|
| 196 |
+
|
| 197 |
+
# 6. Conclusion
|
| 198 |
+
|
| 199 |
+
This work has introduced the unobserved object detection task in 2D, 2.5D and 3D, has presented three detection pipelines using state-of-the-art generative models, and has evaluated their performance on a proposed set of metrics in a dataset of indoor scenes and common objects. We find that unobserved object detection presents different characteristics in 2D and 3D. Expanding the camera frame can be used in both 2D and 3D, with detection pipelines showing the ability to predict objects that may be fully outside the visible frustum. In contrast, predicting objects within 3D regions beyond the camera frustum suggests that 3D pipelines have the capability to detect fully occluded objects. While the 2D SDXL-based pipeline and VLMs cannot detect occluded objects, the 3D pipeline leveraging DFM achieves this.
|
| 200 |
+
|
| 201 |
+
This work has several significant limitations. In particular, the inference time of 3D diffusion models, is currently very large and are costly to re-train. Since our approaches
|
| 202 |
+
|
| 203 |
+
require many samples to approximate the conditional distribution, this is a significant bottleneck and stymies their use in real-time applications like in robotics. Another limitation is the need for object prompts in outpainting-based methods, since this is likely to bias the obtained empirical conditional distribution. Also, VLM-based evaluations may not be fully reliable, since it is possible these models could have seen and memorized the test images during training. Since the task requires that the model not over-fit to the ground truth realization—which is an instance of the true conditional distribution—there are inherent challenges in measuring performance that reflects accurate modeling of the underlying true distribution that is unavailable in real-world settings.
|
| 204 |
+
|
| 205 |
+
Future applications will apply the proposed pipeline to outdoor and large-scale scenes [36]. Synthetic datasets [13] can let us access known conditional distributions in simulation [16]. Beyond object detection, different spatio-semantic features like occupancy or affordances [23] are promising next steps. Improvements in solving this task could pave the way for robotics applications in reactive control [47], visual search [5], planning [27], navigation [18], and exploration [24]. This motivates the current work as a significant step toward improving machine vision capabilities for unobserved object detection.
|
| 206 |
+
|
| 207 |
+
# Acknowledgments
|
| 208 |
+
|
| 209 |
+
Subhransu is supported by the University Research Scholarship at the Australian National University. This research was partially funded by the U.S. Government under DARPA TIAMAT HR00112490421. The views and conclusions expressed in this document are solely those of the authors and do not represent the official policies or endorsements, either expressed or implied, of the U.S. Government. This research was also funded by the Australian Research Council under ITRH IH210100030.
|
| 210 |
+
|
| 211 |
+
# References
|
| 212 |
+
|
| 213 |
+
[1] Michal Adamkiewicz, Timothy Chen, Adam Caccavale, Rachel Gardner, Preston Culbertson, Jeannette Bohg, and Mac Schwager. Vision-only robot navigation in a neural radiance world. IEEE Robotics and Automation Letters, 7(2), 2022. 1
|
| 214 |
+
[2] Titas Anciukevicius, Zexiang Xu, Matthew Fisher, Paul Henderson, Hakan Bilen, Niloy J. Mitra, and Paul Guerrero. RenderDiffusion: Image diffusion for 3D reconstruction, inpainting and generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023. 1, 2
|
| 215 |
+
[3] Rohan Anil, Sebastian Borgeaud, Yonghui Wu, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M. Dai, Anja Hauth, Katie Millican, David Silver, Slav Petrov, Melvin Johnson, Ioannis Antonoglou, Julian Schrittwieser, Amelia Glaese, Jilin Chen, Emily Pittler, Timothy P. Lillicrap, Angeliki Lazaridou, Orhan First, James Molloy, Michael Isard, Paul Ronald Barham, Tom Hennigan, Benjamin Lee, Fabio Viola, Malcolm Reynolds, Yuanzhong Xu, Ryan Doherty, Eli Collins, Clemens Meyer, Eliza Rutherford, Erica Moreira, Kareem Ayoub, Megha Goel, George Tucker, Enrique Piqueras, Maxim Krikun, Iain Barr, Nikolay Savinov, Ivo Danihelka, Becca Roelofs, Anaïs White, Anders Andreassen, Tamara von Glehn, Lakshman Yagati, Mehran Kazemi, Lucas Gonzalez, Misha Khalman, Jakub Sygnowski, and et al. Gemini: A family of highly capable multimodal models. CoRR, abs/2312.11805, 2023. 2, 3, 5, 18
|
| 216 |
+
[4] Anthropic. Claude 3.5 Sonnet. https://www.anthropic.com/news/claude-3-5-sonnet, 2024. 2, 3, 5, 18
|
| 217 |
+
[5] Alper Aydemir, Andrzej Pronobis, Moritz Göbelbecker, and Patric Jensfelt. Active visual object search in unknown environments using uncertain semantics. IEEE Transactions on Robotics, 29(4), 2013. 1, 8
|
| 218 |
+
[6] Seunghyeok Back, Joosoon Lee, Taewon Kim, Sangjun Noh, Raeyoung Kang, Seongho Bak, and Kyoobin Lee. Unseen object amodal instance segmentation via hierarchical occlusion modeling. In Proceedings of the International Conference on Robotics and Automation, 2022. 2
|
| 219 |
+
[7] Miguel Ángel Bautista, Pengsheng Guo, Samira Abnar, Walter Talbott, Alexander T Toshev, Zhuoyuan Chen, Laurent Dinh, Shuangfei Zhai, Hanlin Goh, Daniel Ulbricht, Afshin Dehghan, and Joshua M. Susskind. GAUDI: A neural architec tect for immersive 3D scene generation. In Proceedings of
|
| 220 |
+
|
| 221 |
+
the Conference on Neural Information Processing Systems, 2022.1
|
| 222 |
+
[8] Florian Bordes, Shashank Shekhar, Mark Ibrahim, Diane Bouchacourt, Pascal Vincent, and Ari Morcos. PUG: Photorealistic and semantically controllable synthetic data for representation learning. In Proceedings of the Conference on Neural Information Processing Systems, 2023. 2
|
| 223 |
+
[9] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, 2020. 2
|
| 224 |
+
[10] Luca Carlone, Roberto Tron, Kostas Daniilidis, and Frank Dellaert. Initialization techniques for 3D SLAM: A survey on rotation estimation and its use in pose graph optimization. In Proceedings of the IEEE International Conference on Robotics and Automation, 2015. 13
|
| 225 |
+
[11] Eric R. Chan, Koki Nagano, Matthew A. Chan, Alexander W. Bergman, Jeong Joon Park, Axel Levy, Miika Aittala, Shalini De Mello, Tero Karras, and Gordon Wetzstein. Generative novel view synthesis with 3D-aware diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2023. 1, 2
|
| 226 |
+
[12] Boyuan Chen, Zhuo Xu, Sean Kirmani, Brian Ichter, Danny Driess, Pete Florence, Dorsa Sadigh, Leonidas Guibas, and Fei Xia. SpatialVLM: Endowing vision-language models with spatial reasoning capabilities. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 2, 16
|
| 227 |
+
[13] Maxime Chevalier-Boisvert, Bolun Dai, Mark Towers, Rodrigo Perez-Vicente, Lucas Willems, Salem Lahlou, Suman Pal, Pablo Samuel Castro, and Jordan Terry. Minigrid & Miniworld: Modular & customizable reinforcement learning environments for goal-oriented tasks. In Proceedings of the Conference on Neural Information Processing Systems, 2023. 8
|
| 228 |
+
[14] Volkan Cirik, Louis-Philippe Morency, and Taylor Berg-Kirkpatrick. HOLM: Hallucinating objects with language models for referring expression recognition in partially-observed scenes. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2022. 2
|
| 229 |
+
[15] Thomas M. Cover and Joy A. Thomas. Differential entropy. In *Elements of Information Theory*. Wiley-Interscience, 2nd edition, 2006. 4
|
| 230 |
+
[16] Matt Deitke, Winson Han, Alvaro Herrasti, Aniruddha Kembhavi, Eric Kolve, Roozbeh Mottaghi, Jordi Salvador, Dustin Schwenk, Eli VanderBilt, Matthew Wallingford, Luca Weihs, Mark Yatskar, and Ali Farhadi. RoboTHOR: An open simulation-to-real embodied AI platform. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020. 8
|
| 231 |
+
[17] S. M. Ali Eslami, Danilo Jimenez Rezende, Frederic Besse, Fabio Viola, Ari S. Morcos, Marta Garnelo, Avraham Ruderman, Andrei A. Rusu, Ivo Danihelka, Karol Gregor, et al. Neural scene representation and rendering. Science, 360 (6394), 2018. 1
|
| 232 |
+
[18] Theophile Gervet, Soumith Chintala, Dhruv Batra, Jitendra Malik, and Devendra Singh Chaplot. Navigating to objects in the real world. Science Robotics, 8(79), 2023. 1, 8
|
| 233 |
+
|
| 234 |
+
[19] Rafael C. Gonzalez and Richard E. Woods. Intensity transformations and spatial filtering. In Digital Image Processing, chapter 3. Pearson Education, 3rd edition, 2008. 15
|
| 235 |
+
[20] Richard Hartley and Andrew Zisserman. N-view computational methods. In Multiple View Geometry in Computer Vision. Cambridge University Press, 2004. 2, 15
|
| 236 |
+
[21] Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. In NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications, 2021. 2
|
| 237 |
+
[22] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In Proceedings of the Conference on Neural Information Processing Systems, 2020. 2
|
| 238 |
+
[23] Brian Ichter, Anthony Brohan, Yevgen Chebotar, Chelsea Finn, Karol Hausman, Alexander Herzog, Daniel Ho, Julian Ibarz, Alex Irpan, Eric Jang, Ryan Julian, Dmitry Kalashnikov, Sergey Levine, Yao Lu, Carolina Parada, Kanishka Rao, Pierre Sermanet, Alexander T Toshev, Vincent Vanhoucke, Fei Xia, Ted Xiao, Peng Xu, Mengyuan Yan, Noah Brown, Michael Ahn, Omar Cortes, Nicolas Sievers, Clayton Tan, Sichun Xu, Diego Reyes, Jarek Rettinghouse, Jornell Quiambao, Peter Pastor, Linda Luu, Kuang-Huei Lee, Yuheng Kuang, Sally Jesmonth, Kyle Jeffrey, Rosario Jauregui Ruano, Jasmine Hsu, Keerthana Gopalakrishnan, Byron David, Andy Zeng, and Chuyuan Kelly Fu. Do As I Can, Not As I Say: Grounding language in robotic affordances. In Proceedings of the Annual Conference on Robot Learning, 2022. 8
|
| 239 |
+
[24] Dinesh Jayaraman and Kristen Grauman. Learning to look around: Intelligently exploring unseen environments for unknown tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018. 1, 8
|
| 240 |
+
[25] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In Proceedings of the 38th International Conference on Machine Learning, 2021. 2
|
| 241 |
+
[26] Glenn Jocher, Jing Qiu, and Ayush Chaurasia. *Ultralytics* YOLO. https://ultralytics.com, 2023. 3, 5, 13, 14
|
| 242 |
+
[27] Pascal Jutras-Dubé, Ruqi Zhang, and Aniket Bera. Adaptive planning with generative models under uncertainty. In Proceedings of the International Conference on Intelligent Robots and Systems, 2024. 1, 8
|
| 243 |
+
[28] Kapil Katyal, Katie Popek, Chris Paxton, Phil Burlina, and Gregory D. Hager. Uncertainty-aware occupancy map prediction using generative networks for robot navigation. In Proceedings of the International Conference on Robotics and Automation, 2019. 1
|
| 244 |
+
[29] Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. Diffusionclip: Text-guided diffusion models for robust image manipulation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 2
|
| 245 |
+
[30] Diederik P. Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. In Proceedings of the Conference on Neural Information Processing Systems, 2021. 1
|
| 246 |
+
[31] Hanna Kurniawati. Partially observable markov decision processes and robotics. Annual Review of Control, Robotics, and Autonomous Systems, 5(1), 2022. 1
|
| 247 |
+
|
| 248 |
+
[32] Ke Li and Jitendra Malik. Amodal instance segmentation. In Proceedings of the European Conference on Computer Vision, 2016. 2
|
| 249 |
+
[33] Zhengqi Li, Qianqian Wang, Noah Snavely, and Angjoo Kanazawa. InfiniteNature-Zero: Learning perpetual view generation of natural scenes from single images. In Proceedings of the European Conference on Computer Vision. Springer, 2022. 1
|
| 250 |
+
[34] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In Proceedings of the European Conference on Computer Vision, 2014. 2, 4, 5, 13
|
| 251 |
+
[35] Huan Ling, David Acuna, Karsten Kreis, Seung Wook Kim, and Sanja Fidler. Variational amodal object completion. In Proceedings of the Conference on Neural Information Processing Systems, 2020. 1, 2
|
| 252 |
+
[36] Lu Ling, Yichen Sheng, Zhi Tu, Wentian Zhao, Cheng Xin, Kun Wan, Lantao Yu, Qianyu Guo, Zixun Yu, Yawen Lu, et al. Dl3DV-10k: A large-scale scene dataset for deep learning-based 3D vision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 8
|
| 253 |
+
[37] Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In Proceedings of the Conference on Neural Information Processing Systems, 2023. 2, 3, 5, 18
|
| 254 |
+
[38] Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 2, 3, 5, 18
|
| 255 |
+
[39] David G Lowe. Object recognition from local scale-invariant features. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 1999. 14
|
| 256 |
+
[40] Zixian Ma, Jerry Hong, Mustafa Omer Gul, Mona Gandhi, Irena Gao, and Ranjay Krishna. @ CREPE: Can vision-language foundation models reason compositionally? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023. 2
|
| 257 |
+
[41] Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In Proceedings of the European Conference on Computer Vision, 2020. 2
|
| 258 |
+
[42] Raul Mur-Artal and Juan D Tardós. ORB-SLAM2: An opensource SLAM system for monocular, stereo, and RGB-D cameras. In IEEE Transactions on Robotics. IEEE, 2017. 13
|
| 259 |
+
[43] Raul Mur-Artal, Jose Maria Martinez Montiel, and Juan D Tardós. ORB-SLAM: A versatile and accurate monocular SLAM system. IEEE Transactions on Robotics, 31(5), 2015. 13
|
| 260 |
+
[44] Norman Müller, Katja Schwarz, Barbara Roessle, Lorenzo Porzi, Samuel Rota Bulò, Matthias Nießner, and Peter Kontschieder. MultiDiff: Consistent novel view synthesis from a single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 2
|
| 261 |
+
[45] Keiko Nagami and Mac Schwager. State estimation and belief space planning under epistemic uncertainty for learning-based
|
| 262 |
+
|
| 263 |
+
perception systems. IEEE Robotics and Automation Letters, 9(6), 2024. 1
|
| 264 |
+
[46] OpenAI. GPT-4 technical report. CoRR, abs/2303.08774, 2023. 2, 3, 5, 13, 18
|
| 265 |
+
[47] Kei Ota, Devesh Jha, Tadashi Onishi, Asako Kanezaki, Yusuke Yoshiyasu, Yoko Sasaki, Toshisada Mariyama, and Daniel Nikovski. Deep reactive planning in dynamic environments. In Proceedings of the Conference on Robot Learning, 2021. 8
|
| 266 |
+
[48] Linfei Pan, Daniel Barath, Marc Pollefeys, and Johannes Lutz Schonberger. Global structure-from-motion revisited. In Proceedings of the European Conference on Computer Vision, 2024. 5, 15
|
| 267 |
+
[49] William Peebles and Saining Xie. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2023. 2
|
| 268 |
+
[50] Said Pertuz, Domenec Puig, and Miguel Angel Garcia. Analysis of focus measure operators for shape-from-focus. Pattern Recognition, 46(5):1415-1432, 2013. 15
|
| 269 |
+
[51] Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. SDXL: Improving latent diffusion models for high-resolution image synthesis. In Proceedings of the International Conference on Learning Representations, 2024. 2, 3, 5
|
| 270 |
+
[52] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the International Conference on Machine Learning, pages 8748-8763. PMLR, 2021. 2
|
| 271 |
+
[53] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You Only Look Once: Unified, real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2016. 2, 3, 5, 13
|
| 272 |
+
[54] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(6), 2016. 2
|
| 273 |
+
[55] Xuanchi Ren and Xiaolong Wang. Look outside the room: Synthesizing a consistent long-term 3D scene video from a single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 1
|
| 274 |
+
[56] Chris Rockwell, David F Fouhey, and Justin Johnson. Pixel-synth: Generating a 3D-consistent experience from a single image. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. 2
|
| 275 |
+
[57] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 2, 5
|
| 276 |
+
[58] Chitwan Sahara, William Chan, Huiwen Chang, Chris Lee, Jonathan Ho, Tim Salimans, David Fleet, and Mohammad Norouzi. Palette: Image-to-image diffusion models. ACM Transactions on Graphics, 2022. 2
|
| 277 |
+
[59] Chitwan Sahara, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily Denton, Seyed Kamyar Seyed Ghasemipour,
|
| 278 |
+
|
| 279 |
+
Raphael Gontijo-Lopes, Burcu Karagol Ayan, Tim Salimans, Jonathan Ho, David J. Fleet, and Mohammad Norouzi. Photorealistic text-to-image diffusion models with deep language understanding. In Proceedings of the Conference on Neural Information Processing Systems, 2022. 2
|
| 280 |
+
[60] Kyle Sargent, Zizhang Li, Tanmay Shah, Charles Herrmann, Hong-Xing Yu, Yunzhi Zhang, Eric Ryan Chan, Dmitry Lagun, Li Fei-Fei, Deqing Sun, and Jiajun Wu. ZeroNVS: Zero-shot 360-degree view synthesis from a single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 1, 2
|
| 281 |
+
[61] Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In Proceedings of the European Conference on Computer Vision, 2016. 3, 5, 15
|
| 282 |
+
[62] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2016. 3, 15
|
| 283 |
+
[63] Dhruv Shah, Ajay Sridhar, Nitish Dashora, Kyle Stachowicz, Kevin Black, Noriaki Hirose, and Sergey Levine. ViNT: A foundation model for visual navigation. In Proceedings of the Annual Conference on Robot Learning, 2023. 1
|
| 284 |
+
[64] Claude E. Shannon. A mathematical theory of communication. Bell System Technical Journal, 27(3), 1948. 4
|
| 285 |
+
[65] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and support inference from RGB-D images. In Proceedings of the European Conference on Computer Vision. Springer, 2012. 2, 4, 6, 13, 14, 18
|
| 286 |
+
[66] Josef Sivic, Michael Isard, Andrew Zisserman, James Philbin, and Ondrej Chum. Object retrieval with large vocabularies and fast spatial matching. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2007. 15
|
| 287 |
+
[67] Noah Snavely, Steven M Seitz, and Richard Szeliski. Photo tourism: Exploring photo collections in 3D. In ACM Transactions on Graphics, 2006. 2
|
| 288 |
+
[68] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In Proceedings of the International Conference on Machine Learning, 2015. 2
|
| 289 |
+
[69] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In Proceedings of the International Conference on Learning Representations, 2021. 2
|
| 290 |
+
[70] Yang Song and Stefan Ermon. Score-based generative modeling through stochastic differential equations. In Proceedings of the International Conference on Learning Representations, 2021. 2
|
| 291 |
+
[71] Yihong Sun, Adam Kortylewski, and Alan Yuille. A modal segmentation through out-of-task and out-of-distribution generalization with a Bayesian model. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 2
|
| 292 |
+
[72] Jiapeng Tang, Yinyu Nie, Lev Markhasin, Angela Dai, Justus Thies, and Matthias Niessner. DiffuScene: Denoising diffusion models for generative indoor scene synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 2
|
| 293 |
+
|
| 294 |
+
[73] Ayush Tewari, Tianwei Yin, George Cazenavette, Semon Rezchikov, Joshua B. Tenenbaum, Fredo Durand, William T. Freeman, and Vincent Sitzmann. Diffusion with forward models: Solving stochastic inverse problems without direct supervision. In Proceedings of the Conference on Neural Information Processing Systems, 2023. 1, 2, 3, 5, 15, 16, 18
|
| 295 |
+
[74] Tristan Thrush, Ryan Jiang, Max Bartolo, Amanpreet Singh, Adina Williams, Douwe Kiela, and Candace Ross. Winoground: Probing vision and language models for visio-linguistic compositionality. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. 2
|
| 296 |
+
[75] Patrick von Platen, Suraj Patil, Anton Lozhkov, Pedro Cuenca, Nathan Lambert, Kashif Rasul, Mishig Davaadorj, Dhruv Nair, Sayak Paul, William Berman, Yiyi Xu, Steven Liu, and Thomas Wolf. Diffusers: State-of-the-art diffusion models. https://github.com/huggingface/diffusers, 2022.3,17
|
| 297 |
+
[76] Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4), 2004. 15
|
| 298 |
+
[77] Daniel Watson, William Chan, Ricardo Martin-Brualla, Jonathan Ho, Andrea Tagliasacchi, and Mohammad Norouzi. Novel view synthesis with diffusion models. In Proceedings of the International Conference on Learning Representations, 2023. 1
|
| 299 |
+
[78] Chuan Wen, Dinesh Jayaraman, and Yang Gao. Can transformers capture spatial relations between objects? In Proceedings of the International Conference on Learning Representations, 2023. 1
|
| 300 |
+
[79] Dejia Xu, Yifan Jiang, Peihao Wang, Zhiwen Fan, Humphrey Shi, and Zhangyang Wang. SinNeRF: Training neural radiance fields on complex scenes from a single image. In Proceedings of the European Conference on Computer Vision, 2022. 2
|
| 301 |
+
[80] Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng, and Hengshuang Zhao. Depth Anything: Unleashing the power of large-scale unlabeled data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024. 3, 16
|
| 302 |
+
[81] Lihe Yang, Bingyi Kang, Zilong Huang, Zhen Zhao, Xiaogang Xu, Jiashi Feng, and Hengshuang Zhao. Depth Anything V2. In Proceedings of the Conference on Neural Information Processing Systems, 2024. 3, 5, 16
|
| 303 |
+
[82] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelNeRF: Neural radiance fields from one or few images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021. 2
|
| 304 |
+
[83] Jason J. Yu, Fereshteh Forghani, Konstantinos G. Derpanis, and Marcus A. Brubaker. Long-term photometric consistent novel view synthesis with diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2023. 2
|
| 305 |
+
[84] Zhen Zeng, Adrian Röfer, and Odest Chadwicke Jenkins. Semantic linking maps for active visual object search. In Proceedings of the International Joint Conference on Artificial Intelligence, 2021. 1
|
| 306 |
+
|
| 307 |
+
[85] Jingyi Zhang, Jiaxing Huang, Sheng Jin, and Shijian Lu. Vision-language models for vision tasks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. 2
|
| 308 |
+
[86] Haoyu Zhen, Xiaowen Qiu, Peihao Chen, Jincheng Yang, Xin Yan, Yilun Du, Yining Hong, and Chuang Gan. 3D-VLA: A 3D vision-language-action generative world model. In Proceedings of the International Conference on Machine Learning, 2024. 2
|
| 309 |
+
[87] Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo magnification: Learning view synthesis using multiplane images. In Proceedings of ACM SIGGRAPH, 2018. 2, 4, 6, 13, 14, 15, 18
|
| 310 |
+
[88] Yuke Zhu, Roozbeh Mottaghi, Eric Kolve, Joseph J Lim, Abhinav Gupta, Li Fei-Fei, and Ali Farhadi. Target-driven visual navigation in indoor scenes using deep reinforcement learning. In Proceedings of the IEEE International Conference on Robotics and Automation, 2017. 1
|
| 311 |
+
[89] Yan Zhu, Yuandong Tian, Dimitris Metaxas, and Piotr Dollár. Semantic amodal segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2017. 1, 2
|
| 312 |
+
[90] Zhengxia Zou, Keyan Chen, Zhenwei Shi, Yuhong Guo, and Jieping Ye. Object detection in 20 years: A survey. Proceedings of the IEEE, 2023. 1, 2
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ddb7ee54a81e50cbd80aa3456e467b2f48bd88b3d57c11e3d24310bb78be1661
|
| 3 |
+
size 630580
|
CVPR/2025/Believing is Seeing_ Unobserved Object Detection using Generative Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c702881a233f8e103351981b82aca085e5a2e8f387e8314e848821428be53d55
|
| 3 |
+
size 491882
|
CVPR/2025/Benchmarking Large Vision-Language Models via Directed Scene Graph for Comprehensive Image Captioning/b7584ffc-b264-4c11-8aa1-d670d278e02c_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7b57b911a75e7c071b8a7ed860b259fbfab24bb21bdcfff6d3855b7acfbd86a
|
| 3 |
+
size 91983
|
CVPR/2025/Benchmarking Large Vision-Language Models via Directed Scene Graph for Comprehensive Image Captioning/b7584ffc-b264-4c11-8aa1-d670d278e02c_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8fc64268232700798eb92547ca8df938fd4e36549ee468705169578c273bf9b
|
| 3 |
+
size 116219
|