Add Batch 2ce4edd4-56cf-49a3-a328-5717484cd360
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_content_list.json +3 -0
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_model.json +3 -0
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_origin.pdf +3 -0
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/full.md +390 -0
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/images.zip +3 -0
- ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/layout.json +3 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_content_list.json +3 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_model.json +3 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_origin.pdf +3 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/full.md +433 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/images.zip +3 -0
- ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/layout.json +3 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_content_list.json +3 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_model.json +3 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_origin.pdf +3 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/full.md +461 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/images.zip +3 -0
- ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/layout.json +3 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_content_list.json +3 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_model.json +3 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_origin.pdf +3 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/full.md +332 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/images.zip +3 -0
- ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/layout.json +3 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_content_list.json +3 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_model.json +3 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_origin.pdf +3 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/full.md +488 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/images.zip +3 -0
- ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/layout.json +3 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_content_list.json +3 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_model.json +3 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_origin.pdf +3 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/full.md +686 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/images.zip +3 -0
- ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/layout.json +3 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_content_list.json +3 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_model.json +3 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_origin.pdf +3 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/full.md +343 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/images.zip +3 -0
- ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/layout.json +3 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_content_list.json +3 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_model.json +3 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_origin.pdf +3 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/full.md +345 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/images.zip +3 -0
- ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/layout.json +3 -0
- ICLR/2025/Influence-Guided Diffusion for Dataset Distillation/829150ac-5224-4464-847c-4e03bc3285ae_content_list.json +3 -0
- ICLR/2025/Influence-Guided Diffusion for Dataset Distillation/829150ac-5224-4464-847c-4e03bc3285ae_model.json +3 -0
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d4b5c0235245cc70e2dae208b963bbec80cb984e58eea85e7f0121aa5d388ab
|
| 3 |
+
size 111583
|
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5515f3474dec843498af960752adf89531832917a2bb3264e48dc46bb5e954b9
|
| 3 |
+
size 138527
|
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/773615ab-1fcd-4337-967c-bd78d09abf44_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ceffd78d47bb3059ef5056a47b4a65ed947b5f563751e6b635e99578debb362a
|
| 3 |
+
size 7928508
|
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/full.md
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INCORPORATING VISUAL CORRESPONDENCE INTO DIFFUSION MODEL FOR VIRTUAL TRY-ON
|
| 2 |
+
|
| 3 |
+
Siqi Wan $^{1,*}$ Jingwen Chen $^{2}$ , Yingwei Pan $^{2}$ , Ting Yao $^{2}$ , Tao Mei $^{2}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> University of Science and Technology of China, <sup>2</sup> HiDream.ai
|
| 6 |
+
|
| 7 |
+
wansiqi4789@mail.ustc.edu.cn,{chenjingwen,pandy,tiyao,tmei}@hidream.ai
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Diffusion models have shown preliminary success in virtual try-on (VTON) task. The typical dual-branch architecture comprises two UNets for implicit garment deformation and synthesized image generation respectively, and has emerged as the recipe for VTON task. Nevertheless, the problem remains challenging to preserve the shape and every detail of the given garment due to the intrinsic stochasticity of diffusion model. To alleviate this issue, we novelly propose to explicitly capitalize on visual correspondence as the prior to tame diffusion process instead of simply feeding the whole garment into UNet as the appearance reference. Specifically, we interpret the fine-grained appearance and texture details as a set of structured semantic points, and match the semantic points rooted in garment to the ones over target person through local flow warping. Such 2D points are then augmented into 3D-aware cues with depth/normal map of target person. The correspondence mimics the way of putting clothing on human body and the 3D-aware cues act as semantic point matching to supervise diffusion model training. A point-focused diffusion loss is further devised to fully take the advantage of semantic point matching. Extensive experiments demonstrate strong garment detail preservation of our approach, evidenced by state-of-the-art VTON performances on both VITON-HD and DressCode datasets. Code is publicly available at: https://github.com/HiDreamai/SPM-Diff.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Virtual Try-ON (VTON) is an increasingly appealing direction in computer vision field, that aims to virtually drape the provided garment items onto target human models. The task empowers the end users to experience the visual affects of wearing various clothings without the need of physical store try-ons. That has a great potential impact for revolutionizing the shopping experience within E-commerce industry. VTON can be regarded as one kind of conditional image synthesis Song et al. (2023); Yu et al. (2023); Chen & Kae (2019); Cong et al. (2020); Li et al. (2023a); Chen et al. (2024a;b; 2023a) with two constraints (i.e., the given in-shop garment and the target person image). However, the typical conditional image synthesis commonly tackles spatially aligned conditions like human pose or sketch/edges Zhang et al. (2023b); Mou et al. (2024). In contrast, VTON signifies a flexible change in shape of in-shop garment in real world, thereby being more challenging due to the complexities associated with the preservation of intrinsic clothing geometry and appearance (i.e., global garment shape and local texture details).
|
| 16 |
+
|
| 17 |
+
When generative networks become immensely popular, the early VTON techniques Choi et al. (2021); Lee et al. (2022); Xie et al. (2023); Chopra et al. (2021); Dong et al. (2019b); Ge et al. (2021) consider capitalizing on explicit warping to deform in-shop garment according to the pose of the target person, leading to spatially-aligned condition of warped garment. These aligned conditions are further fed into Generative Adversarial Networks (GAN) Goodfellow et al. (2014); Karras et al. (2021; 2019; 2020b;a) for person image generation. Nevertheless, it is found that such GAN-based methods (e.g., GP-VTON Xie et al. (2023)) show unrealistic artifacts especially when the garment texture is complex and the human pose is challenging as in Figure 1 (b). This can be attributed to the warping errors of complex textures in garment and the limited generative capacity of GAN for synthesizing real-world
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Target Person In-shop Garment
|
| 21 |
+
(a)
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
(c)
|
| 25 |
+
#
|
| 26 |
+
Figure 1: Illustration of given target person and (a) in-shape garment with semantic points. Existing GAN-based methods (e.g., (b) GP-VTON) and diffusion-based approaches (e.g., (c) Stable-VTON and (d) OOTDiffusion) often struggle with complex garment texture details and challenging human poses, resulting in a range of artifacts and the lack of necessary texture details. In contrast, (e) our SPM-Diff effectively alleviates these limitations and leads to higher-quality results with better-aligned semantic points, leading to strong visual correspondence and thereby preserving garment detail/shape.
|
| 27 |
+
|
| 28 |
+
person images. To tackle this issue, recent advances Gou et al. (2023); Morelli et al. (2023); Xu et al. (2024a); Kim et al. (2024) take the inspiration from Diffusion models Avrahami et al. (2022); Hertz et al. (2023); Kawar et al. (2023); Ruiz et al. (2023); Rombach et al. (2022) with enhanced training stability and scalability in content creation, and present a new diffusion-based direction for VTON task. In general, the whole garment image as appearance reference is encoded via VAE encoder and UNet Kingma & Welling (2014); Ronneberger et al. (2015), which is further integrated into diffusion model for conditional image generation. Despite improving the quality of synthesized person image with few artifacts, such VTON results still fail to preserve sufficient garment details (Figure 1 (c-d)) due to the stochastic denoising process in diffusion model.
|
| 29 |
+
|
| 30 |
+
Unlike previous efforts that rely on the whole garment to trigger diffusion process, we view VTON problem from a new perspective of visual correspondence in the paradigm of diffusion model. Intuitively, each in-shop garment image contains interest points, i.e., 2D locations in an image which are stable and repeatable from different viewpoints. In analogy to the traditional interest points in geometric computer vision field Sun et al. (2021); Hedlin et al. (2023); Tang et al. (2023); Wang et al. (2023), we name such kind of interest point in VTON task as "semantic point." As shown in Figure 1 (a), when viewed individually, each semantic point refers to the unique regional fine-grained texture detail; when viewed as a whole, all semantic points reflect the holistic garment shape. Both regional fine-grained texture detail and holistic garment shape derived from semantic points are supposed to be nicely preserved for VTON tasks. In other words, these semantic points should be aligned with the visually corresponding ones in the synthesized person image. That motivates us to introduce the explicit correspondences of semantic points between in-shop garment and output synthetic person image to diffusion model. With this semantic point matching, we can temper the stochasticity of diffusion model, leading to higher-quality VTON results with better-aligned garment shape and texture details (Figure 1 (e)).
|
| 31 |
+
|
| 32 |
+
By consolidating the idea of capitalizing on visual correspondence prior for virtual try-on, we present a novel diffusion model with Semantic Point Matching (SPM-Diff). Specifically, SPM-Diff first samples a set of semantic points rooted in the given garment image, and matches them to points on target human body according to garment-to-person correspondence via local flow warping. Furthermore, these 2D appearance cues of semantic points are augmented into 3D-aware cues with depth/normal map of target person, mimicking the way of putting clothing on human body. Such 3D-aware cues are later injected into a dual-branch diffusion framework to facilitate virtual try-on. In an effort to amplify the semantic point matching along the whole diffusion process, we exquisitely
|
| 33 |
+
|
| 34 |
+
devise a point-focused diffusion loss that puts more focus on the reconstruction of semantic points over target persons. Empirical results on two VTON benchmarks demonstrate the evident superiority of our SPM-Diff on garment detail and shape preservation against the state-of-the-art methods.
|
| 35 |
+
|
| 36 |
+
# 2 RELATED WORK
|
| 37 |
+
|
| 38 |
+
GAN-based Virtual Try-on. To tackle virtual try-on (VTON) task, prior works Wang et al. (2018); Li et al. (2021); Fele et al. (2022); Morelli et al. (2022); Dong et al. (2019b); He et al. (2022); Choi et al. (2021); Lee et al. (2022); Xie et al. (2023) typically adopt a two-stage strategy, first deforming the garment to fit the target body shape and then integrating the transformed garment onto the human model using a GAN-based image generator to synthesize the final person image capitalizing on conditions like the warped garment and human pose. One key point for these works is to accurately warp the garment to the clothing region. As one of the pioneer works, VITON Han et al. (2018) estimates thin-plate spline transformation (TPS) Bookstein (1989) based on hand-craft shape context to achieve realistic garment deformation. Later, CP-VTON Wang et al. (2018) introduces an upgraded learnable TPS transformation to boost the performances. However, the results remain far from satisfactory due to artifacts in the misaligned areas between the suboptimally deformed garment and the desired clothing region, particularly as image resolution increases for online shopping. To tackle this problem, VITON-HD Choi et al. (2021) predicts a segmentation map of the desired clothing regions to guide VTON synthesis, which is utilized to alleviate the impact from the misaligned regions. Recently, HR-VTON Lee et al. (2022) novelly introduces a try-on condition generator that combines garment warping and segmentation modules to resolve visual misalignment and occlusion. Moreover, an innovative Local-Flow Global-Parsing warping module is proposed in GP-VTON Xie et al. (2023), which warps garments parts individually and assembles locally warped results based on the global garment parsing. Despite the promising results, these methods fail to handle complex poses and maintain fine-grained garment details due to the limited generative capability of GANs.
|
| 39 |
+
|
| 40 |
+
Diffusion-based Virtual Try-on. Diffusion models Ho et al. (2020); Rombach et al. (2022); Chen et al. (2023b); Zhang et al. (2024); Zhu et al. (2024); Qian et al. (2024); Yang et al. (2024) have drawn widespread attention due to their superior capability in visual generation compared to GANs Goodfellow et al. (2014); Pan et al. (2017). Therefore, some works Gou et al. (2023); Morelli et al. (2023); Zhu et al. (2023); Kim et al. (2024); Xu et al. (2024a) have attempted to incorporate diffusion models into the pipeline for VTON tasks, striving to generate a photo-realistic image that preserves appearance patterns. For example, DCI-VTON Gou et al. (2023) directly overlays the deformed garment over the target person with the desired clothing regions masked out to steer the diffusion models. Furthermore, LaDI-VTON Morelli et al. (2023) additionally learns token embeddings of the given garment and refines the garment detials with an upgraded decoder. GarDiff Wan et al. (2024) simultaneously employs CLIP Radford et al. (2021) and Variational Auto-encoder (VAE) Kingma & Welling (2014) to encode the reference garment into appearance priors, which are regarded as additional conditions to guide the diffusion process. However, solely capitalizing on the deformed garment could introduce notable artifacts due to the suboptimal warping results. Therefore, StableVTON Kim et al. (2024) novelly improves controlnet Zhang et al. (2023b) with zero cross-attention blocks to implicitly deform the input garment and further injects the intermediate features extracted by the proposed module into the UNet of diffusion models to boost VTON. Most recently, a dual-branch framework with two UNets is presented Xu et al. (2024a); Choi et al. (2024) to fully leverage the pre-trained image prior in the diffusion models for garment feature learning. In this framework, a reference-UNet is initialized from the pre-trained one (dubbed Main-UNet) and employed to learn multi-scale features of the input garment, while the Main-UNet refers to these features for high-fidelity image generation. Although appealing results are achieved by these methods, it remains challenging to preserve every detail of the garment due to weak visual correspondence between the garment and synthesized person using implicit warping mechanism.
|
| 41 |
+
|
| 42 |
+
# 3 METHOD
|
| 43 |
+
|
| 44 |
+
In this section, we first briefly review the fundamental concepts of Latent Diffusion Model in Sec. 3.1. Next, we elaborate technical details of the overall framework of our proposed SPM-Diff and the novel semantic point matching (SPM) in Sec. 3.2.1 and 3.2.2, respectively. Finally, an upgraded training objective to facilitate semantic point matching is demonstrated in Sec. 3.3.
|
| 45 |
+
|
| 46 |
+
# 3.1 PRELIMINARY
|
| 47 |
+
|
| 48 |
+
The prevalent Latent Diffusion Model (LDM) Rombach et al. (2022) is adopted as our foundational model in this work. Specifically, LDM first exploits a pre-trained Variational Autoencoder Kingma & Welling (2014) $\mathcal{E}(\cdot)$ to map an input image $I_0$ from the high-dimensional pixel space to the latent space: $\mathbf{x}_0 = \mathcal{E}(I_0)$ . In the forward diffusion process at timestep $t\sim \mathcal{U}(0,T)$ , noises are added to the latent code $\mathbf{x}_0$ according to a pre-defined variance schedule $\{\beta_s\}_{1}^T$ as follows:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathbf {x} _ {t} = \sqrt {\bar {\alpha} _ {t}} \mathbf {x} _ {0} + \sqrt {1 - \bar {\alpha} _ {t}} \epsilon , \tag {1}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\epsilon \sim \mathcal{N}(0,1)$ , $\bar{\alpha}_t = \prod_{s=1}^t (1 - \beta_s)$ , and $\beta_t \in \{\beta_s\}_1^T$ . In the reverse denoising process, LDM learns to predict the added noise $\epsilon$ and removes it. The typical training objective of LDM (generally implemented as a UNet Ronneberger et al. (2015)) parameterized by $\theta$ can be simply formulated as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathcal {L} (\theta , \mathbf {x} _ {0}, \mathbf {c}) = \mathbb {E} _ {\epsilon , t} [ | | \epsilon_ {\theta} (\mathbf {x} _ {t}, \mathbf {c}, t) - \epsilon | | _ {2} ^ {2} ], \tag {2}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $\mathbf{c}$ denotes the conditioning text prompt. During inference, LDM starts from a random noisy latent code and iteratively denoises it given the text prompt step by step for image generation.
|
| 61 |
+
|
| 62 |
+
# 3.2 OUR SPM-DIFF
|
| 63 |
+
|
| 64 |
+
In virtual try-on (VTON) task, given a target person image $I_{p} \in \mathbb{R}^{H \times W \times 3}$ and an in-shop garment $I_{g} \in \mathbb{R}^{H' \times W' \times 3}$ , the model is required to synthesize a high-quality image $I \in \mathbb{R}^{H \times W \times 3}$ , where the person $I_{p}$ wears the in-shop garment $I_{g}$ . The main challenge lies in preserving the intricate details and shape of the in-shop garment, due to the high diversity of synthetic contents (e.g., varied human body) within the intricate sampling space of diffusion models.
|
| 65 |
+
|
| 66 |
+
# 3.2.1 OVERALL FRAMEWORK
|
| 67 |
+
|
| 68 |
+
Recently, the utilization of Reference-Net has demonstrated remarkable efficacy in retaining the fine-grained details of reference images across diverse fields Cao et al. (2023); Hu et al. (2024); Nam et al. (2024); Xu et al. (2024b), shedding new light on VTON. Drawing inspirations from these studies, we frame our SPM-Diff within a basic dual-branch architecture comprising two UNets: Main-UNet and Garm-UNet, where the Main-UNet refers to the features of the implicitly deformed garment from the Garm-UNet for image generation. However, suboptimal outcomes are observed in our experiments with this trivial dual-branch network. We argue that the reason is Main-UNet fails to establish precise visual correspondence between the given garment in $I_{g}$ and the synthesized person in the output image $I$ by simply using the appearance features from Garm-UNet. Consequently, the synthesized garment is prone to inconsistent fine-grained details with the input garment. Therefore, we propose to explicitly incorporate visual correspondence prior into the diffusion model to boost VTON. Specifically, a novel semantic point matching (SPM) is additionally introduced to our SPM-Diff. In SPM, we interpret the fine-grained appearance and texture details as a set of local semantic points, which denote the locations on the garment that are stable and repeatable from different view points. These semantic points are matched to the corresponding ones on the target person through local flow warping. These 2D cues are then converted into 3D-aware cues by depth/normal map augmentation, which act as visual correspondence prior to enhance Main-UNet for detail preservation.
|
| 69 |
+
|
| 70 |
+
Specifically, the semantic point set $P_G$ on the given garment is first sampled and mapped into the corresponding one $P_H$ on the target person via local flow warping. Then, the multi-scale point features of $P_G / P_H$ are extracted by a pre-trained garment/geometry feature encoder, which are further augmented and injected into the Main-UNet through the proposed SPM module. Formally, given the latent code $\mathbf{x}_t$ , the denoised $\mathbf{x}_{t - 1}$ predicted by our SPM-Diff can be computed as
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathbf {x} _ {t - 1} = \frac {1}{\sqrt {\alpha_ {t}}} \left(\mathbf {x} _ {t} - \frac {1 - \alpha_ {t}}{\sqrt {1 - \bar {\alpha} _ {t}}} \hat {\epsilon}\right) + \sigma_ {t} \epsilon , \tag {3}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\hat {\epsilon} = \epsilon_ {\theta} (\mathbf {x} _ {t}, \mathbf {x} _ {a}, \mathbf {x} _ {d}, \mathbf {x} _ {n}, \mathbf {x} _ {I _ {g}}, \mathbf {c} _ {I _ {g}}, P _ {G}, P _ {H}, t),
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $\alpha_{t} = 1 - \beta_{t}$ , $\sigma_t^2 = \beta_t$ . $\theta$ are the parameters of our SPM-Diff. $\mathbf{x}_n$ and $\mathbf{x}_d$ are the latent codes of normal map $I_{n}$ and depth map $I_{d}$ of the target person, respectively. $\mathbf{x}_{I_g}$ and $\mathbf{c}_{I_g}$ denote the latent code and CLIP image embedding of the in-shop garment $I_{g}$ , respectively. $\mathbf{x}_a$ is the latent code of a garment-agnostic image $I_{a}$ that is derived by applying a mask over the potential regions in $I_{p}$ to be filled with the input garment. Fig. 2(b) illustrates the overview of our SPM-Diff.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: The overall framework of our SPM-Diff. (a) Illustration of our semantic point matching (SPM). In SPM, a set of semantic points on the garment are first sampled and matched to the corresponding points on the target person via local flow warping. Then, these 2D cues are augmented into 3D-aware cues with depth/normal map, which act as semantic point matching to supervise diffusion model. (b) Dual-branch framework includes Garm-UNet and Main-UNet for garment feature learning and image generation, respectively. Note that Main-UNet is upgraded with SPM for high-fidelity synthesis in our SPM-Diff. (c) Visualization of garment-to-person point correspondence.
|
| 88 |
+
|
| 89 |
+
# 3.2.2 SEMANTIC POINT MATCHING
|
| 90 |
+
|
| 91 |
+
As shown in Fig. 2(a), a set of local semantic points $P_{G}$ (e.g., red, green, blue points) on the in-shop garment are first sampled and projected to the corresponding points $P_{H}$ on the depth/normal map $I_{d} / I_{n}$ of the target person via local flow warping. Note that the garment-agnostic depth/normal map is derived by rendering from an estimated SMPL model of the target person Lin et al. (2023). The descriptive point features $\hat{\mathbf{F}}_{G} / \hat{\mathbf{F}}_{H}$ of the points in $P_{G} / P_{H}$ are extracted by a pre-trained garment/geometry feature encoder. Then, the 2D representations $\hat{\mathbf{F}}_{G}$ are further augmented into 3D-aware ones $\hat{\mathbf{F}}_{GA}$ that perceive the body shape of the target person by fusing with $\hat{\mathbf{F}}_{H}$ . Finally, the derived features $\hat{\mathbf{F}}_{G}$ and $\hat{\mathbf{F}}_{GA}$ are integrated into the Main-UNet to boost VTON.
|
| 92 |
+
|
| 93 |
+
Point Sampling. In order to faithfully retain the local fine-grained details (e.g., texture, shape) of the in-shop garment, sparse semantic points of interest are sampled for affordable computation overhead. Specifically, Superpoint DeTone et al. (2018) is employed to sample a set of $N$ pixel-level interest points $P^{N}$ on the garment image $I_{g}$ . Then, the farthest point sampling strategy is adopted to select a subset of $K$ semantic points from $P^{N}$ , denoted as $P_{G} = \{(x^{k},y^{k})\in \mathbb{R}^{2}|x^{k}\in [1,H^{\prime}],y^{k}\in [1,W^{\prime}],k = 1\dots K\}$ , that approximates $P^{N}$ with fewer points while preserving the important characteristics of the garment. Note that $(x^{k},y^{k})$ is the 2D coordinate on the image $I_{g}$ .
|
| 94 |
+
|
| 95 |
+
Then, we associate the semantic points $P_{G}$ on the garment $I_{g}$ with the corresponding ones $P_{H}$ on the target person $I_{p}$ through a dense displacement field $\mathbf{M}_{G\to H}\in \mathbb{R}^{H\times W\times 2}$ . Each element $\mathbf{M}_{G\to H}^{(i,j)}$ represents the relative displacement (i.e., 2D offset vector) for each point at coordinate $(i,j)$ on in-shop garment $I_{g}$ relative to the person image $I_{p}$ . Here we employ flow warping module like GP-VTON Xie et al. (2023) to estimate the dense displacement field in between. More details of our flow warping module will be depicted in the Appendix A.4. Then we can retrieve the corresponding semantic points $P_{H}$ on the target person $I_{p}$ by applying $\mathbf{M}_{G\to H}$ to the point set $P_{G}$ as follows:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
P _ {H} \left(x ^ {k}, y ^ {k}\right) = P _ {G} \left(x ^ {k}, y ^ {k}\right) + \mathbf {M} _ {G \rightarrow H} ^ {\left(x ^ {k}, y ^ {k}\right)}. \tag {4}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
We visualize some 2D garment-to-person semantic point pairs from $(P_G, P_H)$ in Fig. 2 (c).
|
| 102 |
+
|
| 103 |
+
Feature Augmentation. The features $\hat{\mathbf{F}}_G / \hat{\mathbf{F}}_H$ of the point sets $P_G / P_H$ are first extracted from a pre-trained garment/geometry feature encoder. The garment feature encoder and geometry feature encoder share the similar architecture of Garm-UNet and Main-UNet, respectively. Next, $\hat{\mathbf{F}}_G$ is
|
| 104 |
+
|
| 105 |
+
further augmented by the $\hat{\mathbf{F}}_H$ into $\hat{\mathbf{F}}_{GA}$
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\hat {\mathbf {F}} _ {G A} \left(x _ {k}, y _ {k}\right) = \hat {\mathbf {F}} _ {G} \left(x _ {k}, y _ {k}\right) + \hat {\mathbf {F}} _ {H} \left(x _ {k}, y _ {k}\right). \tag {5}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
As such, the 2D cues of the semantic points are transformed into 3D-aware ones, mimicking the way garment changes shape with human body and enabling better visual correspondence between the garment and the target person.
|
| 112 |
+
|
| 113 |
+
Feature Injection. To effectively facilitate semantic point matching for high-fidelity VTON, we inject the derived features $\hat{\mathbf{F}}_{GA}$ and $\hat{\mathbf{F}}_G$ into the self-attention layers of Main-UNet in a multi-scale manner. Specifically, a series of MLPs $\phi_{GA} = \{\phi_{GA}^{l}\}_{l = 1}^{L}$ and $\phi_{G} = \{\phi_{G}^{l}\}_{l = 1}^{L}$ are exploited to project $\hat{\mathbf{F}}_{GA}$ and $\hat{\mathbf{F}}_G$ , respectively, into the multi-scale features $\mathbf{F}_{GA}$ and $\mathbf{F}_G$ that match the feature dimensions of $L$ self-attention layers in the Main-UNet as follows:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\mathbf {F} _ {G A} ^ {l} (x _ {k}, y _ {k}) = \phi_ {G A} ^ {l} (\hat {\mathbf {F}} _ {G A} (x _ {k}, y _ {k})), \quad \mathbf {F} _ {G} ^ {l} (x _ {k}, y _ {k}) = \phi_ {G} ^ {l} (\hat {\mathbf {F}} _ {G} (x _ {k}, y _ {k})). \tag {6}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
Given the geometry features $\mathbf{F}_{GA}^{l}$ and garment features $\mathbf{F}_G^l$ of semantic points, we first augment intermediate hidden states of Main-UNet/Garm-UNet (i.e., $\mathbf{K}^l / \mathbf{K}_g^l$ ) with $\mathbf{F}_{GA}^{l} / \mathbf{F}_{G}^{l}$ . Then the augmented intermediate features of Main-UNet/Garm-UNet are concatenated, followed with $l$ -th self-attention layer in Main-UNet (Please refer to Fig. 16 in Appendix for more details of the feature injection process):
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array}{l} A t t n \left(\mathbf {Q} ^ {l}, \mathbf {K} _ {*} ^ {l}, \mathbf {V} ^ {l}, \mathbf {F} _ {G A} ^ {l}, \mathbf {F} _ {G} ^ {l}\right) = S o f t m a x \left(\frac {\left(\mathbf {Q} ^ {l} + \mathbf {F} _ {G A} ^ {l}\right) \cdot \left[ \mathbf {K} ^ {l} + \mathbf {F} _ {G A} ^ {l} , \mathbf {K} _ {g} ^ {l} + \mathbf {F} _ {G} ^ {l} \right] ^ {T}}{d} \mathbf {V} ^ {l}\right), \tag {7} \\ \mathbf {Q} ^ {l} = W _ {m} ^ {Q, l} \mathbf {h} _ {t} ^ {l}, \mathbf {K} ^ {l} = W _ {m} ^ {K, l} \mathbf {h} _ {t} ^ {l}, \mathbf {K} _ {g} ^ {l} = W _ {g} ^ {K, l} \mathbf {h} _ {g} ^ {l}, \mathbf {V} ^ {l} = [ W _ {m} ^ {V, l} \mathbf {h} _ {t} ^ {l}, W _ {g} ^ {V, l} \mathbf {h} _ {g} ^ {l} ], \\ \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
where $\mathbf{h}_t^l$ and $\mathbf{h}_g^l$ are the intermediate hidden states from the Main-UNet and Garm-UNet, respectively. $W_{m}^{Q,l}$ , $W_{m}^{K,l}$ and $W_{m}^{V,l}$ are the projection matrices in the $l$ -th self-attention layer of the Main-UNet. $W_{g}^{K,l}$ and $W_{g}^{V,l}$ are the projection matrices in the $l$ -th self-attention layer of the Garm-UNet. $[\cdot]$ is the concatenation operation over the token sequence. In practice, the point features $\mathbf{F}_G^l / \mathbf{F}_{GA}^l$ are repositioned onto an empty spatial feature map according to the interpolated coordinates of $P_G / P_H$ for efficient feature addition as shown in leftmost part of Fig. 2 (a). Since the middle layers in Main-UNet perceive high-level visual concepts instead of the fine-grained garment details, only the first two and last two self-attention layers are considered in point feature injection.
|
| 126 |
+
|
| 127 |
+
By explicitly incorporating the visual correspondence between the garment and the target person and further augmenting the 2D cues with 3D geometric conditions via the proposed semantic point matching, our SPM-Diff can better preserve the local garment details and shape more accurately.
|
| 128 |
+
|
| 129 |
+
# 3.3 TRAINING OBJECTIVE
|
| 130 |
+
|
| 131 |
+
To amplify the semantic point matching along the whole diffusion process, we devise a point-focused diffusion loss that emphasizes on the reconstruction of semantic points over target persons by increasing the loss weight of each semantic point. Thus, the final training objective is
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\mathcal {L} _ {\text {p o i n t \_ f o c u s e d}} = | | \epsilon - \hat {\epsilon} | | _ {2} ^ {2} + \lambda | | (\epsilon - \hat {\epsilon}) \odot M (P _ {H}) | | _ {2} ^ {2}, \tag {8}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where $\hat{\epsilon}$ is defined as in Eq. 3, and $M(P_H)$ denotes a binary mask that only triggers on the semantic points $P_H$ and $\lambda$ is the trade-off coefficient.
|
| 138 |
+
|
| 139 |
+
# 4 EXPERIMENTS
|
| 140 |
+
|
| 141 |
+
# 4.1 EXPERIMENTAL SETUPS
|
| 142 |
+
|
| 143 |
+
Datasets. We train our model on two virtual try-on benchmarks, VITON-HD Choi et al. (2021) and DressCode Morelli et al. (2022). VITON-HD dataset contains 13,679 frontal-view woman and upper garment image pairs. Following the general practices of previous works Gou et al. (2023); Morelli et al. (2023), the dataset is divided into two disjoint subsets: a training set with 11,647 pairs and a testing set with 2,032 pairs. DressCode dataset consists of 53,795 image pairs, which are categorized into three macro-categories: 15,366 for upper-body clothes, 8,951 pairs lower-body clothes, and
|
| 144 |
+
|
| 145 |
+
Table 1: Quantitative results in single dataset evaluation on VITON-HD and DressCode upper-body (D.C.Upper). The subscript $*_{sdxl}$ indicates the use of superior base model (stable diffusion xl).
|
| 146 |
+
|
| 147 |
+
<table><tr><td>Train/Test</td><td colspan="4">VITON-HD/VITON-HD</td><td colspan="4">D.C.Upper/D.C.Upper</td></tr><tr><td>Method</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td></tr><tr><td>PF-AFN Ge et al. (2021)</td><td>0.888</td><td>0.087</td><td>9.654</td><td>1.04</td><td>0.910</td><td>0.049</td><td>17.653</td><td>5.43</td></tr><tr><td>HR-VTON Lee et al. (2022)</td><td>0.878</td><td>0.105</td><td>12.265</td><td>2.73</td><td>0.936</td><td>0.065</td><td>13.820</td><td>2.71</td></tr><tr><td>SDAFN Bai et al. (2022)</td><td>0.880</td><td>0.082</td><td>9.782</td><td>1.11</td><td>0.907</td><td>0.053</td><td>12.894</td><td>1.09</td></tr><tr><td>FS-VTON He et al. (2022)</td><td>0.886</td><td>0.074</td><td>9.908</td><td>1.10</td><td>0.911</td><td>0.050</td><td>16.470</td><td>4.22</td></tr><tr><td>GP-VTON Xie et al. (2023)</td><td>0.884</td><td>0.081</td><td>9.072</td><td>0.88</td><td>0.769</td><td>0.268</td><td>20.110</td><td>8.17</td></tr><tr><td>LaDI-VTON Morelli et al. (2023)</td><td>0.864</td><td>0.096</td><td>9.480</td><td>1.99</td><td>0.915</td><td>0.063</td><td>14.262</td><td>3.33</td></tr><tr><td>Stable-VTON Kim et al. (2024)</td><td>0.852</td><td>0.084</td><td>8.698</td><td>0.88</td><td>0.911</td><td>0.050</td><td>11.266</td><td>0.72</td></tr><tr><td>DCI-VTON Gou et al. (2023)</td><td>0.880</td><td>0.080</td><td>8.754</td><td>1.10</td><td>0.937</td><td>0.042</td><td>11.920</td><td>1.89</td></tr><tr><td>OOTDiffusion Xu et al. (2024a)</td><td>0.881</td><td>0.071</td><td>8.721</td><td>0.82</td><td>0.906</td><td>0.053</td><td>11.030</td><td>0.29</td></tr><tr><td>IDM-VTON Choi et al. (2024)</td><td>0.877</td><td>0.082</td><td>9.079</td><td>0.79</td><td>0.891</td><td>0.065</td><td>10.860</td><td>0.32</td></tr><tr><td>IDM-VTONsdxl Choi et al. (2024)</td><td>0.916</td><td>0.061</td><td>7.033</td><td>0.53</td><td>0.926</td><td>0.040</td><td>9.561</td><td>0.16</td></tr><tr><td>SPM-Diff</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.67</td><td>0.927</td><td>0.042</td><td>10.560</td><td>0.19</td></tr><tr><td>SPM-Diffsdxl</td><td>0.917</td><td>0.055</td><td>6.871</td><td>0.52</td><td>0.933</td><td>0.038</td><td>9.622</td><td>0.14</td></tr></table>
|
| 148 |
+
|
| 149 |
+
29,478 for dresses. As in the original splits, 1,800 image pairs from each category are used for testing, and the remaining pairs are used as training data.
|
| 150 |
+
|
| 151 |
+
Additionally, we leverage a human image dataset (SSHQ-1.0 Fu et al. (2022)) to evaluate our method beyond standard virtual try-on datasets. Note that we follow Stable-VTON Kim et al. (2024) and adopt the first 2,032 images for evaluation in SHHQ-1.0.
|
| 152 |
+
|
| 153 |
+
Evaluation. We evaluate the performances in two testing settings, i.e., paired setting and unpaired setting. The paired setting uses a pair of a person and the original clothes for reconstruction, whereas the unpaired setting involves changing the clothing of a person image with different clothing item. Meanwhile, we adopt single dataset evaluation that performs training and evaluation within a single dataset, and cross-dataset evaluation implies extending our evaluation over different datasets. The experiments on all settings are conducted at the resolution of $512 \times 384$ .
|
| 154 |
+
|
| 155 |
+
In the paired setting, the input garment is highly correlated to the one depicted in primary person image. Hence we directly follow the standard evaluation setup to leverage Structural Similarity (SSIM) Wang et al. (2004) and Learned Perceptual Image Patch Similarity (LPIPS) Simonyan & Zisserman (2015) for measuring the visual similarity between the generated image and the ground-truth one. In the unpaired setting, since the given target person originally wears a different garment from the input in-shop garment and the ground-truth try-on results are unavailable, only the Fréchet Inception Distance (FID) Heusel et al. (2017) and Kernel Inception Distance (KID) Binkowski et al. (2018) can be used to evaluate the quality of outputs.
|
| 156 |
+
|
| 157 |
+
Implementation Details. In our SPM-Diff, Garm-UNet and Main-UNet are initialized from the pretrained Stable Diffusion 1.5, which are further finetuned over VTON datasets. The garment/geometry feature encoder shares similar model structure as Garment/Main-UNet. We jointly pre-train these two encoders in a basic dual-branch network with additional depth/normal map as inputs but without our proposed SPM mechanism, i.e., the ablated run Base+Geo map in Table 4. Then, the pre-trained garment/geometry feature encoder is utilized to extract garment/geometry point features, which are further injected into the self-attention layers of Main-UNet in our SPM-Diff. We employ AdamW Loshchilov & Hutter (2019) $(\beta_{1} = 0.9, \beta_{2} = 0.999)$ to optimize the model. The learning rate is set to 0.00005 with linear warmup of 500 iterations. The hyper-parameter $\lambda$ in Equation (8) is set to 0.5. OpenCLIP ViT-H/14 Ilharco et al. (2021) is utilized to extract the CLIP visual embeddings of the input garment. To enable classifier-free guidance Ho & Salimans (2022), the embeddings of the garment and depth/normal map are randomly dropped with a probability of 0.1. We train SPM-Diff on a single Nvidia A100 GPU with 45,000 iterations (batch size: 16). At inference, the output person image is progressively generated via 20 steps with a UniPC Zhao et al. (2023) sampler, and the scale of classifier-free guidance is set as 2.0. Compared with a trivial dual-branch model, the computation overhead is slightly increased with SPM-Diff: 1.97 secs (SPM-Diff) vs 1.50 secs (OOTDiffusion).
|
| 158 |
+
|
| 159 |
+
# 4.2 BENCHMARK RESULTS
|
| 160 |
+
|
| 161 |
+
Quantitative Results in Single Dataset Evaluation. We first present the VTON results on VITON-HD and DressCode (three macro-categories) in Table 1 and 2 under in-distribution setup, where both training and testing data are derived from the same dataset/category. Note that for fair comparison with IDM-VTON $_{sdxl}$ that adopts superior base model (Stable Diffusion xl), we include additional
|
| 162 |
+
|
| 163 |
+
Table 2: Quantitative results in single dataset evaluation on DressCode lower-body (D.C.Lower) and DressCode dresses (D.C.Dresses) datasets. The subscript $*_{sdxl}$ indicates the use of superior base model (stable diffusion xl).
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Train/Test</td><td colspan="4">D.C.Lower/D.C.Lower</td><td colspan="4">D.C.Dress/D.C.Dress</td></tr><tr><td>Method</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td></tr><tr><td>PF-AFN Ge et al. (2021)</td><td>0.903</td><td>0.056</td><td>19.683</td><td>6.89</td><td>0.875</td><td>0.074</td><td>19.257</td><td>7.66</td></tr><tr><td>HR-VTON Lee et al. (2022)</td><td>0.912</td><td>0.045</td><td>16.345</td><td>4.02</td><td>0.865</td><td>0.113</td><td>18.724</td><td>4.98</td></tr><tr><td>SDAFN Bai et al. (2022)</td><td>0.913</td><td>0.049</td><td>16.008</td><td>2.97</td><td>0.879</td><td>0.082</td><td>12.362</td><td>1.28</td></tr><tr><td>FS-VTON He et al. (2022)</td><td>0.909</td><td>0.054</td><td>22.031</td><td>7.46</td><td>0.888</td><td>0.073</td><td>20.821</td><td>8.02</td></tr><tr><td>GP-VTON Xie et al. (2023)</td><td>0.923</td><td>0.042</td><td>16.65</td><td>2.86</td><td>0.886</td><td>0.072</td><td>12.65</td><td>1.84</td></tr><tr><td>LaDI-VTON Morelli et al. (2023)</td><td>0.911</td><td>0.051</td><td>13.38</td><td>1.98</td><td>0.868</td><td>0.089</td><td>13.12</td><td>1.85</td></tr><tr><td>OOTDiffusion Xu et al. (2024a)</td><td>0.892</td><td>0.049</td><td>9.72</td><td>0.64</td><td>0.879</td><td>0.075</td><td>10.65</td><td>0.54</td></tr><tr><td>DCI-VTON Gou et al. (2023)</td><td>0.924</td><td>0.035</td><td>12.34</td><td>0.91</td><td>0.887</td><td>0.068</td><td>12.25</td><td>1.08</td></tr><tr><td>IDM-VTON Choi et al. (2024)</td><td>0.919</td><td>0.041</td><td>12.05</td><td>0.93</td><td>0.881</td><td>0.074</td><td>12.33</td><td>1.41</td></tr><tr><td>IDM-VTONsdxl Choi et al. (2024)</td><td>0.934</td><td>0.032</td><td>8.77</td><td>0.44</td><td>0.904</td><td>0.060</td><td>9.87</td><td>0.47</td></tr><tr><td>SPM-Diff</td><td>0.932</td><td>0.034</td><td>9.02</td><td>0.48</td><td>0.899</td><td>0.063</td><td>10.17</td><td>0.50</td></tr><tr><td>SPM-Diffsdxl</td><td>0.934</td><td>0.030</td><td>8.68</td><td>0.42</td><td>0.909</td><td>0.060</td><td>9.62</td><td>0.44</td></tr></table>
|
| 166 |
+
|
| 167 |
+
Table 3: Quantitative results in cross dataset evaluation. We train VTON models on one of VITON-HD and DressCode upper-body (D.C.Upper), and then evaluate them on different datasets. The subscript $*_{sdxl}$ indicates the use of superior base model (stable diffusion xl).
|
| 168 |
+
|
| 169 |
+
<table><tr><td>Train/Test</td><td colspan="4">VITON-HD/D.C.Upper</td><td colspan="4">D.C.Upper/VITON-HD</td><td colspan="2">VITON-HD/SSHQ-1.0</td></tr><tr><td>Method</td><td>SSIM↑</td><td>LPIPS↓</td><td>FID↓</td><td>KID↓</td><td>SSIM↑</td><td>LPIPS↓</td><td>FID↓</td><td>KID↓</td><td>FID↓</td><td>KID↓</td></tr><tr><td>HR-VTON Lee et al. (2022)</td><td>0.862</td><td>0.108</td><td>24.170</td><td>7.35</td><td>0.811</td><td>0.228</td><td>45.923</td><td>36.69</td><td>52.732</td><td>31.22</td></tr><tr><td>GP-VTON Xie et al. (2023)</td><td>0.897</td><td>0.385</td><td>12.451</td><td>6.67</td><td>0.804</td><td>0.262</td><td>22.431</td><td>27.90</td><td>20.99</td><td>8.76</td></tr><tr><td>LaDI-VTON Morelli et al. (2023)</td><td>0.901</td><td>0.101</td><td>16.336</td><td>5.36</td><td>0.801</td><td>0.243</td><td>31.790</td><td>23.02</td><td>24.904</td><td>6.07</td></tr><tr><td>DCI-VTON Gou et al. (2023)</td><td>0.905</td><td>0.142</td><td>17.3426</td><td>12.03</td><td>0.825</td><td>0.179</td><td>16.670</td><td>6.40</td><td>24.850</td><td>6.68</td></tr><tr><td>Stable-VTON Kim et al. (2024)</td><td>0.914</td><td>0.065</td><td>13.182</td><td>2.26</td><td>0.855</td><td>0.118</td><td>10.104</td><td>1.70</td><td>21.077</td><td>5.10</td></tr><tr><td>OOTDiffusion Xu et al. (2024a)</td><td>0.915</td><td>0.061</td><td>11.965</td><td>1.20</td><td>0.839</td><td>0.123</td><td>10.220</td><td>2.72</td><td>19.62</td><td>5.45</td></tr><tr><td>IDM-VTON Choi et al. (2024)</td><td>0.909</td><td>0.066</td><td>12.398</td><td>1.18</td><td>0.821</td><td>0.145</td><td>10.091</td><td>2.88</td><td>18.78</td><td>4.88</td></tr><tr><td>IDM-VTONsdxl Choi et al. (2024)</td><td>0.925</td><td>0.052</td><td>10.003</td><td>0.89</td><td>0.879</td><td>0.086</td><td>8.203</td><td>1.98</td><td>14.32</td><td>2.67</td></tr><tr><td>SPM-Diff</td><td>0.922</td><td>0.055</td><td>10.057</td><td>1.01</td><td>0.844</td><td>0.101</td><td>9.990</td><td>2.70</td><td>16.78</td><td>3.99</td></tr><tr><td>SPM-Diffsdxl</td><td>0.929</td><td>0.050</td><td>9.235</td><td>0.65</td><td>0.882</td><td>0.059</td><td>8.196</td><td>1.62</td><td>13.68</td><td>2.60</td></tr></table>
|
| 170 |
+
|
| 171 |
+
variant of our SPM-Diff (i.e., SPM-Diff $_{sdxl}$ ) that uses the same base model of Stable Diffusion xl. Overall, for VITON-HD and each category in DressCode, our SPM-Diff consistently achieves better results against existing VTON approaches across most metrics, including both GAN-based models (HR-VTON, SDAFN, GP-VTON, etc) and diffusion-based models (e.g., LaDI-VTON, Stable-VTON, OOTDiffusion, etc). In particular, on VITON-HD dataset, the SSIM score in paired setting and the FID score in unpaired setting of our SPM-Diff can reach 0.911 and 8.202, which leads to the absolute gain of 0.030 and 0.519 against the strong competitor OOTDiffusion. The results basically demonstrate the key merit of taming diffusion model with semantic point matching mechanism to facilitate virtual try-on task. More specifically, diffusion-based methods commonly exhibit better unpaired scores than GAN-based models. This observation is not surprising, since diffusion model reflects more powerful generative capacity than GAN in image synthesis. In between, instead of simply encoding in-shop garment via CLIP as additional condition in DCI-VTON, Stable-VTON and OOTDiffusion capitalize on VAE encoder and UNet to achieve more fine-grained appearance representations for triggering diffusion process, thereby leading to better VTON results. Nevertheless, the performances of them are still inferior to our SPM-Diff, since the visual correspondence between in-shop garment and output synthetic person image is under-explored in existing diffusion-based approaches. Instead, by novelly formulating VTON task as semantic pointing matching problem, SPM-Diff tempers the stochasticity of diffusion model with explicit visual correspondence prior, and achieves competitive VTON results.
|
| 172 |
+
|
| 173 |
+
Quantitative Results in Cross Dataset Evaluation. Proceeding further, we evaluate all VTON models under out-of-distribution setup in Table 3, where training and testing data are derived from different datasets. Similar to the observations in single dataset evaluation, our SPM-Diff still exhibits better performances than other baselines across most metrics. The results again demonstrate the advantage of modeling semantic point matching for virtual try-on.
|
| 174 |
+
|
| 175 |
+
Qualitative Results. Next, we perform a qualitative evaluation of different methods through case study. Fig. 3 shows some examples of VITON-HD dataset. Overall, our SPM-Diff can better preserve fine-grained garment details and the contour of the synthesized garment across varied human body shapes compared with other baselines. This verifies the merit of incorporating semantic matching prior and garment feature augmentation with 3D geometric conditions into diffusion model. For example, both GAN-based models (GP-VTON) and diffusion-based models (e.g., Stable-VTON,
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 3: Qualitative results on the VITON-HD dataset.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 4: User study on 100 garment-person pairs randomly sampled from VITON-HD dataset. OOTDiffusion, etc) fail to retain accurate garment details on 1st row, while our SPM-Diff successfully restores the appearance of the garment. Please refer to Appendix A.1 for more qualitative results.
|
| 182 |
+
|
| 183 |
+

|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
|
| 187 |
+
User Study. A comprehensive user study is conducted to examine whether the synthesized images conform to human preferences. We randomly sample 100 unpaired garment-person from VITON-HD dataset for evaluation. 10 participants from diverse education backgrounds (i.e., fashion design (4), journalism (2), psychology (2), business (2)) are invited and asked to choose the winner between our SPM-Diff and the competing approaches based on three criteria: 1) preservation of the fine-grained appearance details, 2) preservation of the garment contour across diverse human body shapes, 3) the perceived image realism. Fig. 4 summarizes the averaged results by all the participants of different methods over 100 garment-person pairs. As shown in Fig. 4, our SPM-Diff significantly outperforms the rival models by a large margin regarding garment detail, shape preservation and image realism.
|
| 188 |
+
|
| 189 |
+
# 4.3 DISCUSSIONS
|
| 190 |
+
|
| 191 |
+
Effect of Pivotal Components in SPM-Diff. Here, we investigate the effect of each pivotal component in our SPM-Diff. We consider one more design at each run and the overall performances on VITON-HD dataset are listed in Table. 4. Base is implemented as the trivial dual-branch framework with two UNets described in Sec. 3.2.1, which takes $(\mathbf{x}_t,\mathbf{x}_a,\mathbf{x}_{I_g},\mathbf{c}_{I_g})$ as input. By incorporating the depth and normal maps (denoted as Geo map in Table. 4) as additional conditions, Base + Geo map better controls the body pose and shape of the synthesized person, yielding marginal improvements over Base. Base + Geo map + SPM significantly boosts the performances by enforcing the alignment of semantic points between the garment and target person and further augmenting the 2D features of these points with 3D geometric conditions. Particularly, Base + Geo map + SPM makes the relative gains of $16.9\%$ and $27.7\%$ on LPIPS and KID against Base + Geo map, respectively. This again demonstrates the effectiveness of capturing better visual correspondence for high-fidelity VTON synthesis. Moreover, the point-focused diffusion loss (P-loss) is devised to emphasize the reconstruction of semantic points over target persons, and best results are attained by Base + Geo map + SPM + P-loss. Some examples generated by each run are illustrated in the Appendix A.2.
|
| 192 |
+
|
| 193 |
+
Effect of Semantic Point Count in SPM. We then analyze the effect of semantic point count $\mathbf{K}$ . Table. 5 summarizes the performances of our SPM-Diff with varying $\mathbf{K} \in [10, 25, 50, 75]$ on VITON-HD dataset. When fewer semantic points $(\mathbf{K} = 10)$ are sampled, the fine-grained garment details may be not fully captured, which hinders the preservation of all the garment details in the synthesized images. Increasing $\mathbf{K}$ from 10 to 25 alleviates this aforementioned issue and improves the results. However, employing more semantic points $(\mathbf{K} = 50$ or 75) yields worse results. Specifically, more
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 5: Accuracy of visual correspondence between in-shop garment and synthesized person image.
|
| 197 |
+
|
| 198 |
+
Table 4: Ablation study of our proposed SPM-Diff on the VITON-HD dataset.
|
| 199 |
+
|
| 200 |
+
<table><tr><td>Model</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td></tr><tr><td>(1) Base</td><td>0.876</td><td>0.088</td><td>8.830</td><td>1.01</td></tr><tr><td>(2) Base + Geo map</td><td>0.881</td><td>0.083</td><td>8.621</td><td>0.94</td></tr><tr><td>(3) Base + Geo map + SPM</td><td>0.904</td><td>0.069</td><td>8.320</td><td>0.68</td></tr><tr><td>(4) Base + Geo map + SPM + P-loss</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.67</td></tr></table>
|
| 201 |
+
|
| 202 |
+
Table 5: Ablation study of semantic point count $\mathbf{K}$ on the VITON-HD dataset.
|
| 203 |
+
|
| 204 |
+
<table><tr><td>Point Count K</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td></tr><tr><td>K = 10</td><td>0.890</td><td>0.083</td><td>8.689</td><td>0.85</td></tr><tr><td>K = 25</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.67</td></tr><tr><td>K = 50</td><td>0.901</td><td>0.070</td><td>8.503</td><td>0.73</td></tr><tr><td>K = 75</td><td>0.893</td><td>0.081</td><td>8.599</td><td>0.78</td></tr></table>
|
| 205 |
+
|
| 206 |
+
semantic points are inevitably clustered in local neighborhoods in pixel space with large $\mathbf{K}$ , which will be interpolated to same locations in the low-dimensional feature map. However, their corresponding points projected onto the target person may be different due to the significant offsets from imprecise local flow map $\mathbf{M}_{G\to H}$ , leading to one-to-many point misalignment and compromising the holistic coherence of the synthesized images. Some examples are visualized in the Appendix A.2.
|
| 207 |
+
|
| 208 |
+
Effect of SPM in Visual Correspondence. In addition, we evaluate the visual correspondence accuracy between in-shop garment and synthesized person image, which can be generally regarded as one kind of detail-preserving capability. We follow the typical point mapping method in SuperPoint DeTone et al. (2018) to perform HPatches homography estimation. Specifically, we perform nearest neighbor matching between all interest points and their descriptors detected in the in-shop garment image and those in the synthesized person image. Then we employ OpenCV's implementation of findHomography() with RANSAC to compute the correctly matched points in the image pairs, which are further marked in green (Fig. 5). In this way, the denser the green point mappings covered over two images, the better the perservation of interest points (i.e., garment details) for synthesized person image. It can be easily observed that our SPM-Diff manages to align more semantic points and therefore preserve more fine-grained garment details than the other competing baselines, which validates our proposal of semantic point matching.
|
| 209 |
+
|
| 210 |
+
# 5 CONCLUSION
|
| 211 |
+
|
| 212 |
+
We have presented SPM-Diff, a new diffusion-based model for virtual try-on task. Different from holistically encoding in-shop garment as appearance reference, SPM-Diff uniquely excavates visual correspondence between the garment and synthesized person through semantic points of interest rooted in the given garment. Such structured prior is fed into diffusion model to facilitate garment detail preservation along diffusion process. Extensive experiments validate the superiority of our SPM-Diff when compared to state-of-the-art VTON approaches in terms of both single dataset evaluation and cross dataset evaluation.
|
| 213 |
+
|
| 214 |
+
Acknowledgement. This work was supported in part by the Beijing Municipal Science and Technology Project No. Z241100001324002 and Beijing Nova Program No. 20240484681.
|
| 215 |
+
|
| 216 |
+
# REFERENCES
|
| 217 |
+
|
| 218 |
+
Omri Avrahami, Dani Lischinski, and Ohad Fried. Blended diffusion for text-driven editing of natural images. In CVPR, 2022.
|
| 219 |
+
Shuai Bai, Huiling Zhou, Zhikang Li, Chang Zhou, and Hongxia Yang. Single stage virtual try-on via deformable attention flows. In ECCV, 2022.
|
| 220 |
+
Mikołaj Binkowski, Danica J Sutherland, Michael Arbel, and Arthur Gretton. Demystifying mmd gans. In ICLR, 2018.
|
| 221 |
+
Fred L. Bookstein. Principal warps: Thin-plate splines and the decomposition of deformations. IEEE TPAMI, 11(6):567-585, 1989.
|
| 222 |
+
Mingdeng Cao, Xintao Wang, Zhongang Qi, Ying Shan, Xiaohu Qie, and Yinqiang Zheng. Masactrl: Tuning-free mutual self-attention control for consistent image synthesis and editing. In CVPR, 2023.
|
| 223 |
+
Bor-Chun Chen and Andrew Mae. Toward realistic image compositing with adversarial learning. In CVPR, 2019.
|
| 224 |
+
Jingwen Chen, Yingwei Pan, Ting Yao, and Tao Mei. Controlstyle: Text-driven stylized image generation using diffusion priors. In ACM MM, 2023a.
|
| 225 |
+
Xi Chen, Lianghua Huang, Yu Liu, Yujun Shen, Deli Zhao, and Hengshuang Zhao. Anydoor: Zero-shot object-level image customization. In CVPR, 2024a.
|
| 226 |
+
Yang Chen, Yingwei Pan, Yehao Li, Ting Yao, and Tao Mei. Control3d: Towards controllable text-to-3d generation. In ACM MM, 2023b.
|
| 227 |
+
Yifu Chen, Jingwen Chen, Yingwei Pan, Yehao Li, Ting Yao, Zhineng Chen, and Tao Mei. Improving text-guided object inpainting with semantic pre-inpainting. In ECCV, 2024b.
|
| 228 |
+
Seunghwan Choi, Sunghyun Park, Minsoo Lee, and Jaegul Choo. Viton-hd: High-resolution virtual try-on via misalignment-aware normalization. In CVPR, 2021.
|
| 229 |
+
Yisol Choi, Sangkyung Kwak, Kyungmin Lee, Hyungwon Choi, and Jinwoo Shin. Improving diffusion models for authentic virtual try-on in the wild. In ECCV, 2024.
|
| 230 |
+
Ayush Chopra, Rishabh Jain, Mayur Hemani, and Balaji Krishnamurthy. Zflow: Gated appearance flow-based virtual try-on with 3d priors. In ICCV, 2021.
|
| 231 |
+
Wenyan Cong, Jianfu Zhang, Li Niu, Liu Liu, Zhixin Ling, Weiyuan Li, and Liqing Zhang. Dovenet: Deep image harmonization via domain verification. In CVPR, 2020.
|
| 232 |
+
Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superpoint: Self-supervised interest point detection and description. In CVPRW, 2018.
|
| 233 |
+
Haoye Dong, Xiaodan Liang, Xiaohui Shen, Bochao Wang, Hanjiang Lai, Jia Zhu, Zhiting Hu, and Jian Yin. Towards multi-pose guided virtual try-on network. In CVPR, 2019a.
|
| 234 |
+
Haoye Dong, Xiaodan Liang, Xiaohui Shen, Bowen Wu, Bing-Cheng Chen, and Jian Yin. Fw-gan: Flow-navigated warping gan for video virtual try-on. In ICCV, 2019b.
|
| 235 |
+
Benjamin Fele, Ajda Lampe, Peter Peer, and Vitomir Struc. C-vton: Context-driven image-based virtual try-on network. In WACV, 2022.
|
| 236 |
+
Jianglin Fu, Shikai Li, Yuming Jiang, Kwan-Yee Lin, Chen Qian, Chen Change Loy, Wayne Wu, and Ziwei Liu. Stylegan-human: A data-centric odyssey of human generation. In ECCV, 2022.
|
| 237 |
+
Yuying Ge, Yibing Song, Ruimao Zhang, Chongjian Ge, Wei Liu, and Ping Luo. Parser-free virtual try-on via distilling appearance flows. In CVPR, 2021.
|
| 238 |
+
Shubham Goel, Georgios Pavlakos, Jathushan Rajasegaran, Angjoo Kanazawa, and Jitendra Malik. Humans in 4d: Reconstructing and tracking humans with transformers. In ICCV, 2023.
|
| 239 |
+
|
| 240 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
|
| 241 |
+
Junhong Gou, Siyu Sun, Jianfu Zhang, Jianlou Si, Chen Qian, and Liqing Zhang. Taming the power of diffusion models for high-quality virtual try-on with appearance flow. In ACM MM, 2023.
|
| 242 |
+
Xintong Han, Zuxuan Wu, Zhe Wu, Ruichi Yu, and Larry S Davis. Viton: An image-based virtual try-on network. In CVPR, 2018.
|
| 243 |
+
Xintong Han, Xiaojun Hu, Weilin Huang, and Matthew R Scott. Clothflow: A flow-based model for clothed person generation. In ICCV, 2019.
|
| 244 |
+
Sen He, Yi-Zhe Song, and Tao Xiang. Style-based global appearance flow for virtual try-on. In CVPR, 2022.
|
| 245 |
+
Eric Hedlin, Gopal Sharma, Shweta Mahajan, Hossam Isack, Abhishek Kar, Andrea Tagliasacchi, and Kwang Moo Yi. Unsupervised semantic correspondence using stable diffusion. In NeurIPS, 2023.
|
| 246 |
+
Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt-to-prompt image editing with cross attention control. In ICLR, 2023.
|
| 247 |
+
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 NeurIPS, 2017.
|
| 248 |
+
Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022.
|
| 249 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020.
|
| 250 |
+
Li Hu, Xin Gao, Peng Zhang, Ke Sun, Bang Zhang, and Liefeng Bo. Animate anyone: Consistent and controllable image-to-video synthesis for character animation. In CVPR, 2024.
|
| 251 |
+
Gabriel Ilharco, Mitchell Wortsman, Ross Wightman, Cade Gordon, Nicholas Carlini, Rohan Taori, Achal Dave, Vaishaal Shankar, Hongseok Namkoong, John Miller, Hannaneh Hajishirzi, Ali Farhadi, and Ludwig Schmidt. Openclip, July 2021. URL https://doi.org/10.5281/ zenodo.5143773.
|
| 252 |
+
Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019.
|
| 253 |
+
Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In NeurIPS, 2020a.
|
| 254 |
+
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In CVPR, 2020b.
|
| 255 |
+
Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. In NeurIPS, 2021.
|
| 256 |
+
Bahjat Kawar, Shiran Zada, Oran Lang, Omer Tov, Huiwen Chang, Tali Dekel, Inbar Mosseri, and Michal Irani. Imagic: Text-based real image editing with diffusion models. In CVPR, 2023.
|
| 257 |
+
Jeongho Kim, Guojung Gu, Minho Park, Sunghyun Park, and Jaegul Choo. Stableviton: Learning semantic correspondence with latent diffusion model for virtual try-on. In CVPR, 2024.
|
| 258 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2014.
|
| 259 |
+
Sangyun Lee, Gyojung Gu, Sunghyun Park, Seunghwan Choi, and Jaegul Choo. High-resolution virtual try-on with misalignment and occlusion-handled conditions. In ECCV, 2022.
|
| 260 |
+
Dongxu Li, Junnan Li, and Steven Hoi. Blip-diffusion: Pre-trained subject representation for controllable text-to-image generation and editing. In NeurIPS, 2023a.
|
| 261 |
+
|
| 262 |
+
Kedan Li, Min Jin Chong, Jeffrey Zhang, and Jingen Liu. Toward accurate and realistic outfits visualization with attention to details. In CVPR, 2021.
|
| 263 |
+
Xiu Li, Michael Kampffmeyer, Xin Dong, Zhenyu Xie, Feida Zhu, Haoye Dong, Xiaodan Liang, et al. Warpdiffusion: Efficient diffusion model for high-fidelity virtual try-on. arXiv preprint arXiv:2312.03667, 2023b.
|
| 264 |
+
Jing Lin, Ailing Zeng, Haoqian Wang, Lei Zhang, and Yu Li. One-stage 3d whole-body mesh recovery with component aware transformer. In CVPR, 2023.
|
| 265 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019.
|
| 266 |
+
Davide Morelli, Matteo Fincato, Marcella Cornia, Federico Landi, Fabio Cesari, and Rita Cucchiara. Dress code: High-resolution multi-category virtual try-on. In CVPR, 2022.
|
| 267 |
+
Davide Morelli, Alberto Baldrati, Giuseppe Cartella, Marcella Cornia, Marco Bertini, and Rita Cucchiara. Ladi-vton: Latent diffusion textual-inversion enhanced virtual try-on. In ACM MM, 2023.
|
| 268 |
+
Chong Mou, Xintao Wang, Liangbin Xie, Yanze Wu, Jian Zhang, Zhongang Qi, and Ying Shan. T2i-adapter: Learning adapters to dig out more controllable ability for text-to-image diffusion models. In AAAI, 2024.
|
| 269 |
+
Jisu Nam, Heesu Kim, DongJae Lee, Siyoon Jin, Seungryong Kim, and Seunggyu Chang. Dream-matcher: Appearance matching self-attention for semantically-consistent text-to-image personalization. In CVPR, 2024.
|
| 270 |
+
Yingwei Pan, Zhaofan Qiu, Ting Yao, Houqiang Li, and Tao Mei. To create what you tell: Generating videos from captions. In ACM MM, 2017.
|
| 271 |
+
Yurui Qian, Qi Cai, Yingwei Pan, Yehao Li, Ting Yao, Qibin Sun, and Tao Mei. Boosting diffusion models with moving average sampling in frequency domain. In CVPR, 2024.
|
| 272 |
+
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 ICML, 2021.
|
| 273 |
+
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In CVPR, 2022.
|
| 274 |
+
Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015.
|
| 275 |
+
Nataniel Ruiz, Yuzhen Li, Varun Jampani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. In CVPR, 2023.
|
| 276 |
+
K Simonyan and A Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 277 |
+
Yizhi Song, Zhifei Zhang, Zhe Lin, Scott Cohen, Brian Price, Jianming Zhang, Soo Ye Kim, and Daniel Aliaga. Objectstitch: Object compositing with diffusion model. In CVPR, 2023.
|
| 278 |
+
Jiaming Sun, Zehong Shen, Yuang Wang, Hujun Bao, and Xiaowei Zhou. Loftr: Detector-free local feature matching with transformers. In CVPR, 2021.
|
| 279 |
+
Luming Tang, Menglin Jia, Qianqian Wang, Cheng Perng Phoo, and Bharath Hariharan. Emergent correspondence from image diffusion. In NeurIPS, 2023.
|
| 280 |
+
Siqi Wan, Yehao Li, Jingwen Chen, Yingwei Pan, Ting Yao, Yang Cao, and Tao Mei. Improving virtual try-on with garment-focused diffusion models. In ECCV, 2024.
|
| 281 |
+
Bochao Wang, Huabin Zheng, Xiaodan Liang, Yimin Chen, Liang Lin, and Meng Yang. Toward characteristic-preserving image-based virtual try-on network. In ECCV, 2018.
|
| 282 |
+
|
| 283 |
+
Qianqian Wang, Yen-Yu Chang, Ruojin Cai, Zhengqi Li, Bharath Hariharan, Aleksander Holynski, and Noah Snavely. Tracking everything everywhere all at once. In ICCV, 2023.
|
| 284 |
+
Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE TIP, 2004.
|
| 285 |
+
Zhenyu Xie, Zaiyu Huang, Xin Dong, Fuwei Zhao, Haoye Dong, Xijin Zhang, Feida Zhu, and Xiaodan Liang. Gp-vton: Towards general purpose virtual try-on via collaborative local-flow global-parsing learning. In CVPR, 2023.
|
| 286 |
+
Yuhao Xu, Tao Gu, Weifeng Chen, and Chengcai Chen. Ootdiffusion: Outfitting fusion based latent diffusion for controllable virtual try-on. arXiv preprint arXiv:2403.01779, 2024a.
|
| 287 |
+
Zhongcong Xu, Jianfeng Zhang, Jun Hao Liew, Hanshu Yan, Jia-Wei Liu, Chenxu Zhang, Jiashi Feng, and Mike Zheng Shou. Magicanate: Temporally consistent human image animation using diffusion model. In CVPR, 2024b.
|
| 288 |
+
Haibo Yang, Yang Chen, Yingwei Pan, Ting Yao, Zhineng Chen, Chong-Wah Ngo, and Tao Mei. Hi3d: Pursuing high-resolution image-to-3d generation with video diffusion models. In ACM MM, 2024.
|
| 289 |
+
Tao Yu, Runseng Feng, Ruoyu Feng, Jinming Liu, Xin Jin, Wenjun Zeng, and Zhibo Chen. Inpaint anything: Segment anything meets image inpainting. arXiv preprint arXiv:2304.06790, 2023.
|
| 290 |
+
Hongwen Zhang, Yating Tian, Yuxiang Zhang, Mengcheng Li, Liang An, Zhenan Sun, and Yebin Liu. Pymaf-x: Towards well-aligned full-body model regression from monocular images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(10):12287-12303, 2023a.
|
| 291 |
+
Lvmin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. In ICCV, 2023b.
|
| 292 |
+
Zhongwei Zhang, Fuchen Long, Yingwei Pan, Zhaofan Qiu, Ting Yao, Yang Cao, and Tao Mei. Trip: Temporal residual learning with image noise prior for image-to-video diffusion models. In CVPR, 2024.
|
| 293 |
+
Wenliang Zhao, Lujia Bai, Yongming Rao, Jie Zhou, and Jiwen Lu. Unipc: A unified predictor-corrector framework for fast sampling of diffusion models. In NeurIPS, 2023.
|
| 294 |
+
Luyang Zhu, Dawei Yang, Tyler Zhu, Fitsum Reda, William Chan, Chitwan Sahara, Mohammad Norouzi, and Ira Kemelmacher-Shlizerman. Tryondiffusion: A tale of two unets. In CVPR, 2023.
|
| 295 |
+
Rui Zhu, Yingwei Pan, Yehao Li, Ting Yao, Zhenglong Sun, Tao Mei, and Chang Wen Chen. Sd-dit: Unleashing the power of self-supervised discrimination in diffusion transformer. In CVPR, 2024.
|
| 296 |
+
|
| 297 |
+
# A APPENDIX
|
| 298 |
+
|
| 299 |
+
# A.1 MORE QUALITATIVE RESULTS
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Fig. 6 showcases more examples generated by different methods on the VITON-HD dataset, while the visual results of other clothing categories (i.e., lower-body clothes and dresses) on the DressCode dataset are summarized in Fig. 7.
|
| 303 |
+
Figure 6: More qualitative results on the VITON-HD dataset.
|
| 304 |
+
|
| 305 |
+

|
| 306 |
+
Figure 7: Qualitative results on the DressCode dataset.
|
| 307 |
+
|
| 308 |
+
# A.2 DISCUSSIONS
|
| 309 |
+
|
| 310 |
+
Effect of Pivotal Components in SPM-Diff. Fig. 8 illustrates some examples generated by the different runs in Table. 4.
|
| 311 |
+
|
| 312 |
+
Effect of Semantic Point Count in SPM. Fig. 9 takes an example to demonstrate the effect of semantic point count $\mathbf{K}$ . Similar to the observation in Table 5, the most visually pleasing result is achieved when $\mathbf{K} = 25$ . We agree that significantly increasing semantic point count (e.g., from $K = 25$ to $K = 50$ or 75) will result in redundancy and interpolation/projection error, leading to degraded results as discussed in the main paper. However, when taking an in-depth look at the sensitivity of semantic point count around the optimal value $K = 25$ , the semantic point count is not sensitive. To validate this, we experimented by varying semantic point count $K$ in the range of [20, 40] within an interval of 5 on VITON-HD dataset. As shown in Table 7, the performance under each metric only fluctuates within the range of 0.1, which basically validates that the performance is not sensitive to the change of semantic point count within this range.
|
| 313 |
+
|
| 314 |
+
Effect of Hyper-parameter $\lambda$ in Eq.(8). Table 6 summarizes the results of our SPM-Diff with different hyper-parameter $\lambda$ on VITON-HD dataset, and $\lambda = 0.5$ achieves the best performances across all the metrics.
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
Figure 8: Ablation study of the pivotal components in SPM-Diff on VITON-HD dataset.
|
| 318 |
+
|
| 319 |
+

|
| 320 |
+
Figure 9: Ablation study of semantic point count $\mathbf{K}$ on VITON-HD dataset.
|
| 321 |
+
|
| 322 |
+
Evaluation of 3D Conditions Learned by Various Methods. The 3D cues (i.e., depth/normal map) adopted in our training and inference are the estimated results by using pre-trained 3D human reconstruction model (OSX Lin et al. (2023)), rather than manually annotated accurate 3D conditions. We conducted experiments by evaluating SPM-Diff with varied estimated 3D cues achieved from different 3D human reconstruction models (e.g., PyMAF-X Zhang et al. (2023a), OSX Lin et al. (2023), 4DHumans Goel et al. (2023)) on VITON-HD dataset. The results are summarized in Table 8, and similar performances are attained across different pre-trained 3D human reconstruction models.
|
| 323 |
+
|
| 324 |
+
Generalization to In-the-Wild VTON. Moreover, to further evaluate the generalization of our SPM-Diff under challenging scenario, we take in-the-wild person images with complex backgrounds as inputs (in contrast to the clean backgrounds in VITON-HD dataset). As shown in Fig. 10, our SPM-Diff manages to achieve promising results.
|
| 325 |
+
|
| 326 |
+
Table 6: Effect of hyper-parameter $\lambda$ in Eq.(8). Table 7: Ablation study of semantic point count $\lambda$ SSIM ↑ LPIPS ↓ FID ↓ KID ↓ K on the VITON-HD dataset.
|
| 327 |
+
|
| 328 |
+
<table><tr><td>1.0</td><td>0.899</td><td>0.071</td><td>8.318</td><td>0.689</td></tr><tr><td>0.5</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.670</td></tr><tr><td>0.1</td><td>0.910</td><td>0.066</td><td>8.287</td><td>0.687</td></tr><tr><td>0.05</td><td>0.906</td><td>0.067</td><td>9.309</td><td>0.682</td></tr><tr><td>0.01</td><td>0.905</td><td>0.067</td><td>8.320</td><td>0.680</td></tr><tr><td colspan="5">Point Count K SSIM ↑ LPIPS ↓ FID ↓ KID ↓</td></tr><tr><td>K = 20</td><td>0.903</td><td>0.061</td><td>8.201</td><td>0.66</td></tr><tr><td>K = 25</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.67</td></tr><tr><td>K = 30</td><td>0.908</td><td>0.060</td><td>8.210</td><td>0.65</td></tr><tr><td>K = 35</td><td>0.905</td><td>0.062</td><td>8.228</td><td>0.63</td></tr><tr><td>K = 40</td><td>0.889</td><td>0.066</td><td>8.215</td><td>0.64</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Table 8: Quantitative results with varied estimated 3D cues achieved from different 3D human reconstruction models on VITON-HD dataset.
|
| 331 |
+
|
| 332 |
+
<table><tr><td>3D human reconstruction model</td><td>SSIM ↑</td><td>LPIPS ↓</td><td>FID ↓</td><td>KID ↓</td></tr><tr><td>PyMAF-X Zhang et al. (2023a)</td><td>0.901</td><td>0.064</td><td>8.265</td><td>0.63</td></tr><tr><td>OSX Lin et al. (2023)</td><td>0.911</td><td>0.063</td><td>8.202</td><td>0.67</td></tr><tr><td>4DHumans Goel et al. (2023)</td><td>0.908</td><td>0.060</td><td>8.211</td><td>0.68</td></tr></table>
|
| 333 |
+
|
| 334 |
+
Discussion with Warp-based Methods. In particular, existing warp-based methods Dong et al. (2019a); Han et al. (2019); Xie et al. (2023); Li et al. (2023b) commonly adopt warping model to warp the input garment according to the input person image, and then directly leverage the warped garment image as hard/strong condition to generate VTON results. This way heavily relies on the accuracy of garment warping, thereby easily resulting in unsatisfactory VTON results given the inaccurate warped garments under challenging human poses (see the results of GP-VTON in Fig. 11). On the contrary, our proposed SPM-Diff adopts a soft way to exploit the visual correspondence prior learnt via the warping model as a soft condition to boost VTON. Technically, our SPM-Diff injects the local semantic point features of the input garment into the corresponding positions on the human body according to a flow map estimated by the warping model. This way nicely sidesteps the inputs of holistic warped garment image with amplified pixel-level projection errors, and only emphasizes the visual correspondence of the most informative semantic points between in-shop garment and output synthetic person image. Note that such visual correspondence of local semantic points are exploited in latent space (corresponding to each local region), instead of precise pixel-level location. Thus when encountering mismatched points with slight displacements within local region, SPM-Diff still leads to similar geometry/garment features as matched points, making the visual correspondence more noise-resistant (i.e., more robust to warping results). As shown in Fig. 11, given warping results with severe distortion, our SPM-Diff still manages to achieve promising results, which basically validate the effectiveness of our proposal.
|
| 335 |
+
|
| 336 |
+
Evaluation of Point-matching Capability. We examine the point-matching capability of the pretrained warping module adopted in our SPM-Diff, in comparison with a vanilla stable diffusion model. Note that here we use a training-free approach (DIFT Tang et al. (2023)) as baseline that exploits the stable diffusion model to match the corresponding points between two images. Specifically, we construct the point-matching test set by manually annotating semantic points on a subset of garment images and their corresponding points on the person image. Next, given the target semantic points on the garment image, our adopted warping module and DIFT perform point matching on the person image. Finally, we report the mean square error (MSE) between the matched points via each run and the annotated ground truth. As shown in the Table 9, our adopted warping module demonstrates stronger point-matching capability than the vanilla stable diffusion model. In addition, we visualize the point-matching results of each run in Fig. 12, and our adopted warping module yields more accurate point-matching results than vanilla stable diffusion model.
|
| 337 |
+
|
| 338 |
+
Table 9: Evaluation of the point-matching method.
|
| 339 |
+
|
| 340 |
+
<table><tr><td>Model</td><td>DIFT</td><td>Tang et al. (2023)</td><td>Our Warping Model</td></tr><tr><td>MSE(↓)</td><td colspan="2">39.46</td><td>29.84</td></tr></table>
|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
Figure 10: Tryon results on in-the-wild person images with complex backgrounds.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Figure 11: Comparisons with warp-based methods on the VITON-HD dataset.
|
| 347 |
+
|
| 348 |
+
Discussion on Semantic Point Matching for Loose Garments. For the cases of loose garments like dresses or skirts, some semantic points of the garment may fail to exactly fall on the human body. However, these points still convey certain local details of the garment (garment features), and
|
| 349 |
+
|
| 350 |
+

|
| 351 |
+
Figure 12: The visualization results of the point matching.
|
| 352 |
+
|
| 353 |
+
the visual correspondence prior in latent space is also robust to warping results (see discussion in Discussion with warp-based methods). This facilitates VTON of loose garments in local detail preservation. Both Figure 7 and Figure 13 demonstrate the effectiveness of our SPM-Diff for loose clothes like dresses or skirts.
|
| 354 |
+
|
| 355 |
+
# A.3 FULL-BODY VIRTUAL TRY-ON
|
| 356 |
+
|
| 357 |
+
Our SPM-Diff can naturally support full-body outfits by successively performing VTON of upper and lower garments one by one, and Fig. 14 shows some VTON results for full-body outfits.
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
Figure 13: Tryon result for loose clothes like dresses or skirts.
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
Figure 14: Tryon result of full-body outfits generated by our SPM-Diff.
|
| 364 |
+
|
| 365 |
+
# A.4 MORE DETAILS OF SPM-DIFF.
|
| 366 |
+
|
| 367 |
+
Flow Warping Process. As shown in Fig. 15, given in-shop garment $I_{g}$ and the condition triplet $C$ of target human, we leverage two feature pyramid networks, garment feature extraction $E_{g}(\cdot)$ and person feature extraction $E_{c}(\cdot)$ to extract multi-scale features, denoted as $E_{g}(I_{g}) = \{g_{1}, g_{2}, \dots, g_{N}\}$ and $E_{c}(C) = \{c_{1}, c_{2}, \dots, c_{N}\}$ . These pyramid features are then fed into $N$ fusion blocks to perform local flow warping. Note that these fusion blocks exploit local-flow global-parsing blocks to estimate $N$ multi-scale local flows $f_{i}$ , yielding the final estimated displacement field $\mathbf{M}_{G \to H}$ .
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 15: Overview of the flow warping module.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
|
| 374 |
+

|
| 375 |
+
Figure 16: Details of the feature injection process.
|
| 376 |
+
|
| 377 |
+
Feature Injection Process. As shown in Fig. 16, the projected geometry features $\mathbf{F}_{GA}$ and garment features $\mathbf{F}_G$ of semantic points are added to the intermediate hidden states of Main-UNet (i.e., $\mathbf{K}$ ) and Garm-UNet (i.e., $\mathbf{K}_g$ ), respectively, which are further concatenated together. Finally, the derived features are further fed into the self-attention layer in Main-UNet.
|
| 378 |
+
|
| 379 |
+
# A.5 LIMITATIONS
|
| 380 |
+
|
| 381 |
+
Although our SPM-Diff nicely preserves most texture details of in-shop garments, this approach still suffers from artifacts in human hands and fails to exactly preserve other decorative items of target person, when garment overlaps with decorative items. Taking Fig. 17 as an example, the primary handbag of target person becomes larger with extra parts in the output synthesized person image. Meanwhile, some artifacts are observed on human hands. We speculate that these artifacts might be caused by the stochasticity in diffusion model, and VTON techniques only focus on the preservation of in-shop garment, while leaving the decorative items of target persons unexploited. One possible solution is to inject more conditions of human hands (e.g., hand pose) and decorative items (e.g., the canny edge information), and we leave it as one of future works.
|
| 382 |
+
|
| 383 |
+
# A.6 ETHICS STATEMENT.
|
| 384 |
+
|
| 385 |
+
We have thoroughly read the ICLR 2025 Code of Ethics and Conduct, and confirm our adherence to it. Our proposed SPM-Diff is originally devised to achieve state-of-the-art VTON performances with a novel semantic point matching and thereby enhance the online shopping experience in E-commerce industry, which poses no threat to human beings or the natural environment. However, these synthesized person images risk exacerbating misinformation and deepfake. To alleviate the misuse of our model, we will require that users adhere to usage guidelines, and meanwhile integrate
|
| 386 |
+
|
| 387 |
+

|
| 388 |
+
Figure 17: SPM-Diff suffers from artifacts in human hands and fails to fully preserve decorative items where they overlap with garment.
|
| 389 |
+
|
| 390 |
+
our model with an additional pipeline to automatically add digital watermark into the synthesized images. The limitations of SPM-Diff are included in Appendix A.5. All references involved in this work have been properly cited to the best of our ability. Datasets and pre-trained models are used in ways consistent with their licences in this work. The user study is conducted under appropriate ethical approvals.
|
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08265c8a25961814bd6790db89782e751d98cf853bfac5588006e770fc7e0c4a
|
| 3 |
+
size 1709275
|
ICLR/2025/Incorporating Visual Correspondence into Diffusion Model for Virtual Try-On/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0408eb6868c4637fa94636b06156bf5deb23b38244ea7fd3756281afb5315d1
|
| 3 |
+
size 580695
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d7ef400124471450ca007f864ea106bff118992967b4cae2e7f344611120c34
|
| 3 |
+
size 99109
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d4f6af86fed252d3d19771b01d7d403cd7bd79894de512e0ecf62e39ae2dc6a
|
| 3 |
+
size 118353
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/e8ad2b78-0d97-444c-b7df-d196147159b5_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8cb977221a77d78d88b00cb1d35b01e7ae4ea5b46b1a8ea1aa211786decd0f0
|
| 3 |
+
size 1479890
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/full.md
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INIncrementAL CAUSAL EFFECT FOR TIME TO TREATMENT INITIALIZATION
|
| 2 |
+
|
| 3 |
+
Andrew Ying
|
| 4 |
+
|
| 5 |
+
Irvine, CA 92606, USA
|
| 6 |
+
|
| 7 |
+
aying9339@gmail.com
|
| 8 |
+
|
| 9 |
+
Zhichen Zhao
|
| 10 |
+
|
| 11 |
+
Department of Mathematics
|
| 12 |
+
|
| 13 |
+
University of California, San Diego
|
| 14 |
+
|
| 15 |
+
La Jolla, CA 92093, USA
|
| 16 |
+
|
| 17 |
+
zhz147@ucsd.edu
|
| 18 |
+
|
| 19 |
+
# Ronghui Xu
|
| 20 |
+
|
| 21 |
+
Herbert Wertheim School of Public Health & Human Longevity Science,
|
| 22 |
+
|
| 23 |
+
Department of Mathematics and Halcioglu Data Science Institute
|
| 24 |
+
|
| 25 |
+
University of California, San Diego
|
| 26 |
+
|
| 27 |
+
La Jolla, CA 92093, USA
|
| 28 |
+
|
| 29 |
+
rxu@ucsd.edu
|
| 30 |
+
|
| 31 |
+
# ABSTRACT
|
| 32 |
+
|
| 33 |
+
We consider time to treatment initialization. This can commonly occur in preventive medicine, such as disease screening and vaccination; it can also occur with non-fatal health conditions such as HIV infection without the onset of AIDS. While traditional causal inference focused on 'when to treat' and its effects, including their possible dependence on subject characteristics, we consider the incremental causal effect when the intensity of time to treatment initialization is intervened upon. We provide identification of the incremental causal effect without the commonly required positivity assumption, as well as an estimation framework using inverse probability weighting. We illustrate our approach via simulation, and apply it to a rheumatoid arthritis study to evaluate the incremental effect of time to start methotrexate on joint pain.
|
| 34 |
+
|
| 35 |
+
# 1 INTRODUCTION
|
| 36 |
+
|
| 37 |
+
As a motivating example we borrow one from Bonvini et al. (2023) on behavioral health services for probationers, in order to reduce their chances of re-arrest. The question of interest, to be elaborated below, is about shifting the odds of receiving such a treatment. This can be achieved via affecting probationers' likelihood of attending services by, for example, providing transportation stipends. In public health, guidelines can be provided in order to affect people's likelihood of getting disease screening or vaccination.
|
| 38 |
+
|
| 39 |
+
An intervention such as in the above examples on the treatment distribution, is referred to as incremental intervention. The resulting causal effect of an incremental intervention is called the incremental causal effect (Kennedy, 2019; Naimi et al., 2021; Kim et al., 2021; Sarvet et al., 2023; Bonvini et al., 2023). In general the incremental causal effect has the interpretation of a policy effect on the population.
|
| 40 |
+
|
| 41 |
+
To better understand incremental intervention we provide a brief overview of the types of interventions in causal inference, which centers around answering "what happens if a particular treatment assignment changes ..." type of questions. An intervention on the treatment can change the value of a treatment, like from control to treated, or it can change its distribution, which is the case for incremental intervention. Causal inference literature started with investigating static deterministic interventions (Rubin, 1974; Hernán & Robins, 2020). Here 'static' is in contrast with 'dynamic', where the (possibly time-varying) treatment assignment may depend on covariates (and prior treatments and outcomes) (Robins, 1986; Murphy, 2003; Robins, 2004; Moodie et al., 2007; Young et al., 2011; Haneuse & Rotnitzky, 2013; Rytgaard et al., 2022; Ying, 2024b). In contrast, under a static
|
| 42 |
+
|
| 43 |
+
intervention the subjects are either all treated or all untreated; this is typically the case when considering an average treatment effect (ATE). A second aspect about intervention is 'deterministic' versus 'stochastic'. Deterministic interventions assign a particular value of treatment to each individual, which may depend on the covariates, in the case of a deterministic dynamic intervention. On the other hand, stochastic interventions do not assign a particular value of the treatment, but rather a probability of receiving a particular treatment value (Cain et al., 2010; Diaz & van der Laan, 2012; Diaz & Hejazi, 2020; van der Laan et al., 2018). More specifically, a stochastic intervention assigns treatment randomly based on a probability distribution. Bonvini et al. (2023) describes the example of a Bernoulli distribution for a binary point treatment, where a single parameter $p \in [0,1]$ indices such an intervention. Finally, an intervention can be 'pre-specified' versus 'otherwise'. For example, Young et al. (2011) described a pre-specified intervention as: "start combined antiretroviral therapy (cART) within 6 months of CD4 cell count first dropping below x or diagnosis of an AIDS-defining illness, whichever happens first". This is a pre-specified dynamic treatment regime as whether an individual starts treatment depends on their own health related history captured by the covariates.
|
| 44 |
+
|
| 45 |
+
An incremental intervention (Kennedy, 2019) is a special stochastic dynamic intervention. It is not pre-specified, and it intervenes on the observed treatment distribution. Here by observed treatment distribution we mean the default, or baseline, or 'natural', treatment distribution, without the incremental intervention. In addition to the causal interpretation as policy effects above, incremental causal effects have the notable advantage of not requiring the positivity assumption typically required of the more traditional causal estimands.
|
| 46 |
+
|
| 47 |
+
The literature referenced above has studied incremental causal effect in the setting of a binary treatment. For discrete time longitudinal studies, the incremental intervention leads to modifying the odds of receiving the binary treatment at each time point Kennedy (2019); Naimi et al. (2021); Kim et al. (2021); Sarvet et al. (2023). To our best knowledge, however, there is currently no investigation in the literature on incremental causal effects by modifying the distribution of time to treatment. The examples described at the start of this paper fall under time to treatment; that is, given a well defined time zero, how long a subject has to or choose to wait before receiving the treatment.
|
| 48 |
+
|
| 49 |
+
In this paper, we generalize existing work on incremental causal effects to the time to (initializing) treatment and prove that one can avoid the positivity assumption in this case as well. We first define incremental causal effects by shifting hazard function via hazard ratio. We show that they can be identified by the observed data with only sequential randomization assumption and consistency assumption, without the often needed positivity assumption in causal inference. We construct a generic inverse probability weighted estimator accommodating numerous estimators for the hazard function, coupled with root- $n$ inference results via random weighting bootstrap. Our estimation tools can leverage off-the-shell software from survival analysis. We examine the finite-sample performance of these estimators via extensive Monte-Carlo simulations. We apply our estimator onto a rheumatoid arthritis study to evaluate the effect of methotrexate.
|
| 50 |
+
|
| 51 |
+
The remainder of the article is organized as follows. In Section 1.1 we review the positivity assumption, and we review related work in Section 2. We introduce notation, the causal estimand, and key assumptions for identification in Section 3.1, where we construct an inverse probability weighting identification approach. In Section 3.2, we propose an inverse probability weighted estimator, together with inferential results yielding confidence intervals. In Section 4.1, we conduct extensive simulations examining finite-performance of our estimator and inference results. In Section 4.2, we apply our framework to answer what happens if we change the probability of receiving methotrexate on rheumatoid arthritis. We end the paper with a discussion in Section 5.
|
| 52 |
+
|
| 53 |
+
# 1.1 POSITIVITY ASSUMPTION
|
| 54 |
+
|
| 55 |
+
To identify estimands such as the average treatment effect from the observed data distribution, we typically need at least three common assumptions: consistency, positivity, and no unmeasured confounding or exchangeability (Hernán & Robins, 2020). Consistency is needed in order to bridge the observed data with the potential outcomes, as well as to exclude the possibility of interference where one subject's treatment affects another subject's outcome. No unmeasured confounding has been studied extensively in the literature, including instrumental variables (Angrist et al., 1996; Ying et al., 2019; Ying & Tchetgen Tchetgen, 2023) and proximal approaches (Miao et al., 2018; Tchetgen Tchetgen et al., 2024; Ying et al., 2023), as well as sensitivity analysis towards the violation of
|
| 56 |
+
|
| 57 |
+
this assumption (Rosenbaum, 2002). Here we focus on the positivity assumption; that is, each subject in the population must have a positive probability of receiving each treatment level. In addition, for estimation approaches such as inverse probability weighting (IPW) or doubly robust approaches to have valid asymptotic inference, the stronger strict positivity or overlap assumption is needed; that is, the probability of receiving each treatment level needs to be bounded away from zero. These assumptions, while testable using observed data, can be violated in practice. Bonvini et al. (2023) provided a recidivism example where some probationers might be required to obtain the treatment under study by attending behavioral health services, therefore their probability of receiving treatment is one and not receiving treatment is zero. Similar cases can be found for vaccination where some people may not be suitable for receiving the vaccine. D'Amour et al. (2021) showed mathematically that overlap is hard to satisfy when many covariates included in order to meet the unconfoundedness assumption that is also required in many causal inference approaches. For studies involving time-varying treatment, covariates, and outcomes, the positivity assumption is even more of a challenge to meet.
|
| 58 |
+
|
| 59 |
+
Therefore, many traditional causal quantities of interest might be vetoed by absence of positivity alone after checking the data. On the other hand, incremental causal effects bridge this gap, by not requiring positivity. This is because for subjects with degenerate probabilities (of zero or one) of receiving treatments, perturbing the odds does not change their degenerate probabilities, therefore the positivity can be seen as always satisfied (Kennedy, 2019). More generally speaking, to nonparametrically identify the effect of intervention on the treatment value, such as 0 or 1, requires data on subjects receiving both treatments 0 and 1 over the population of interest. On the other hand, to identify the effect of intervention on the treatment distribution, and not specific values, as will be seen below, does not require data on subjects receiving all treatment values over the population of interest.
|
| 60 |
+
|
| 61 |
+
# 2 RELATED WORK
|
| 62 |
+
|
| 63 |
+
As mentioned above Kennedy (2019) proposed for binary treatment incremental intervention which fully resolved the positivity issue mentioned above. A disadvantage of the incremental causal effect, quoting Kennedy (2019), is: "First, we expect incremental causal effects to play a more descriptive than prescriptive role compared to other approaches. Specifically, they give an interpretable picture of what would happen if exposure were increased or decreased in a natural way, but will likely be less useful for informing specific treatment decisions." As will be seen, contrary to what is said here, the incremental causal effect in our setting can yield useful policy-making decisions.
|
| 64 |
+
|
| 65 |
+
Díaz & van der Laan (2012), Haneuse & Rotnitzky (2013), Díaz & van der Laan (2013), Young et al. (2014), Díaz et al. (2023a), and Díaz et al. (2023b) considered general interventions that depend on the observed treatment process, and are referred to as modified treatment policies or interventions that depend on the natural value of treatment, the latter referring to a treatment that a subject would 'naturally' receive in the absence of it being assigned by an intervention. An example from Haneuse & Rotnitzky (2013) concerns the surgery time for a patient, and asks the question of what if every patient's operating time is reduced by say 5 minutes. Note that each patient's (observed) operating time depends potentially on their individual covariates as well as additional unobserved attributes. In this sense the observed operating time contains more information than what is captured by the measured covariates. In a similar vein, the natural value of treatment also emphasizes the belief that it contains more information than what is captured by the measured covariates (Stensrud et al., 2024). Because these interventions involve more information than the measured covariates, they are different from the pre-specified dynamic intervention introduced in the previous section (Haneuse & Rotnitzky, 2013). Our work here also involves the observed treatment distribution, and considers the continuous time to treatment initialization that has not been previously studied in the literature.
|
| 66 |
+
|
| 67 |
+
Time to treatment or treatment initialization, or to a large extent similarly, time to treatment termination, has been considered in the dynamic treatment setting (Johnson & Tsiatis, 2005; Yang et al., 2018; Nie et al., 2021). In particular, the first two references (Johnson & Tsiatis, 2005; Yang et al., 2018) considered continuous time to treatment termination, while (Nie et al., 2021) considered discrete time. All of the above are for deterministic interventions.
|
| 68 |
+
|
| 69 |
+
Continuous time causal inference in longitudinal studies for stochastic interventions, a broader setting than time to treatment initialization studies, is general challenging, and limited work has been
|
| 70 |
+
|
| 71 |
+
done in the field (Rytgaard et al., 2022; Ying, 2022a; 2024a;b; Sun & Crawford, 2022). Among these, Ying (2022a; 2024a) and Sun & Crawford (2022) only considered static intervention, Ying (2024b) obtained only identification results without any estimation procedure, and none of them (Rytgaard et al., 2022) considered incremental causal effects.
|
| 72 |
+
|
| 73 |
+
Finally, the literature on causal inference until recently have paid less attention to the positivity assumption than, for example, unmeasured confounding. Petersen et al. (2012), Zhu et al. (2021), and Leger et al. (2022) have recently investigated the importance and implications of this often-overlooked assumption. Hwang et al. (2024) and Matsouaka & Zhou (2024) aimed at relaxing the positivity assumption. Our paper here aims at a new class of estimands which completely avoid positivity, and this in turn opens up more causal questions that one can answer in a study.
|
| 74 |
+
|
| 75 |
+
# 3 PROPOSED APPROACH
|
| 76 |
+
|
| 77 |
+
# 3.1 ESTIMAND AND INVERSE PROBABILITY WEIGHTED IDENTIFICATION
|
| 78 |
+
|
| 79 |
+
Suppose we observe $\{Y, T \wedge \tau, \Delta = \mathbb{1}(T < \tau), L\}$ , where $Y$ is an outcome of interest measured at time $\tau$ , $T$ is time to (initializing) a certain treatment, and $L$ are baseline covariates. We use $\mathbb{P}$ and $\mathbb{E}$ to represent the distribution of $\{Y, T \wedge \tau, \Delta = \mathbb{1}(T < \tau), L\}$ and expectation with respect to $\mathbb{P}$ . We assume $T$ to be absolutely continuous, and write $\lambda(t|l) = \lim_{h \to 0} \mathbb{P}(T < t + h | T \geq t, L) / h$ and $\Lambda(t|l) = \int_0^t \lambda(s | L) ds$ as its hazard function and cumulative hazard function at time $t$ given $L = l$ , respectively. As reviewed in the literature above, the hazard function is a natural quantity used to describe the intensity of time to treatment (Yang et al., 2018; 2020). Nonetheless we also write $f(l)$ , $f(t|l)$ , and $f(y|t, l)$ as the (conditional) densities or probability functions.
|
| 80 |
+
|
| 81 |
+
We may define the potential outcome $Y_{t}$ (Neyman, 1923; Rubin, 1974; Holland, 1986) if the treatment were initialized at time $t$ . Since $Y$ is measured at time $\tau$ , whenever $t \geq \tau$ we denote $Y_{t} = Y_{\tau} = Y_{\infty}$ for someone who is never treated.
|
| 82 |
+
|
| 83 |
+
Unlike the previous literature, we are interested in answering the question like, "what would be the expected outcome $Y$ if the hazard function $\lambda(t|l)$ were to be doubled?" In general, we may consider shifting the hazard by a positive quantity $\theta(t,l) > 0$ . We consider this to be a natural 'hazard preserving' stochastic intervention; that is, to multiply the hazard function for time to treatment by a positive quantity. We note that when $\theta$ is a constant, we have a proportional hazards intervention, which has the obvious advantage of simple interpretation. The fact that it coincides with the familiar Cox model is another added advantage. More generally, we might consider recommendation of intensified disease screening for certain high risk groups described via $l$ , or after a certain age $t$ .
|
| 84 |
+
|
| 85 |
+
For the rest of the paper we denote $T(\theta)$ as the random draw following the hazard function $\theta(t, l) \cdot \lambda(t|l)$ . For example, suppose the time to a certain treatment initialization, $T$ , follows the Cox proportional hazards model including a single continuous covariate $L$ , with the baseline hazard corresponding to the hazard of a Weibull random variable. Specifically, the hazard function of the time to the treatment initialization at time $t$ given $L = l$ is $\lambda(t|l) = \lambda_0(t)\exp(0.2l)$ , where the baseline hazard is $\lambda_0(t) = 0.9t^{0.5}$ . Figure 1 shows the effects of shifting the hazard $\lambda(t|l)$ by a constant positive quantity $\theta$ , where we plotted the resulting hazard functions and density functions of the time to the treatment initialization $T(\theta)$ under interventions with various constant $\theta$ values.
|
| 86 |
+
|
| 87 |
+
The corresponding potential outcome under $T(\theta)$ is then by plugging in $T(\theta)$ into $Y_{t}$ as $Y_{T(\theta)}$ . The incremental causal effect is defined as
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\psi (\theta) = \mathbb {E} \left(Y _ {T (\theta)}\right). \tag {1}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
In particular when $\theta \equiv 1$ , $\psi(1) = \mathbb{E}(Y_{T(1)}) = \mathbb{E}(Y)$ corresponds to the factual distribution of $T$ that we have observed.
|
| 94 |
+
|
| 95 |
+
Assumption 1 (Consistency).
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
Y _ {T \wedge \tau} = Y.
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
This assumption links the observed outcome and the potential outcome via the treatment regime. It says that if an individual receives the treatment at time $T$ , then his/her observed outcome $Y$ matches $Y_{T}$ . The second assumption is typically referred to as the "sequential randomization" assumption (SRA), "sequential exchangeability", or "no unmeasured confounders" assumption.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 1: Hazard and density functions of the time to treatment initialization $T(\theta)$ under interventions with various constant $\theta$ values.
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
|
| 108 |
+
Assumption 2 (No Unmeasured Confounding). The time to decide treatment and treatment decision is independent of the potential outcomes given the covariate,
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
T \perp Y _ {t} \mid L, \forall t \in [ 0, \tau ].
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
It requires that time to treatment initialization is determined solely by the collected baseline information $L$ .
|
| 115 |
+
|
| 116 |
+
We prove that Equation (1) can be identified:
|
| 117 |
+
|
| 118 |
+
Theorem 1 (IPW Identification). Under Assumptions 1 and 2, the incremental causal effect $\psi (\theta)$ can be identified by the observed data distribution via
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\psi (\theta) = \mathbb {E} (Y _ {T (\theta)}) = \mathbb {E} \left\{\theta (T, L) ^ {\Delta} e ^ {- \int_ {0} ^ {T \wedge \tau} (\theta (t, L) - 1) d \Lambda (t | L)} Y \right\}.
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
This identification generalizes the classical IPW identification because the weights $\theta (T,L)^{\Delta}e^{-\int_0^T\wedge \tau (\theta (t,L) - 1)d\Lambda (t|L)}$ are the Radon-Nikodym derivatives (or known as likelihood ratio) between the targeted incremental intervention distribution and observed data distribution (both can be found in the appendix), as the classical inverse probability weights.
|
| 125 |
+
|
| 126 |
+
As noted in the Introduction, while positivity is a fundamental assumption in causal inference for common estimands such as the ATE, here we do not need positivity for identification of the incremental causal effect from the observed data distribution. More specifically, compared with the proof of identification here, traditional pre-specified stochastic dynamic interventions (including deterministic static interventions as special cases) operationalize by replacing $\lambda (T|L)e^{-\int_0^T\lambda (t|L)dt}$ by some pre-specified conditional distribution of $T$ . This necessitates to impose an additional positivity assumption. Or in other words, if any person with medical history $L$ can never receive vaccine at time $t$ , then we certainly cannot investigate questions like what happens if they do.
|
| 127 |
+
|
| 128 |
+
# 3.2 INVERSE PROBABILITY WEIGHTED ESTIMATION AND INFERENCE
|
| 129 |
+
|
| 130 |
+
Suppose we observe a random sample of size $n$ denoted as $\{Y_i, T_i \wedge \tau, \Delta_i = \mathbb{1}(T_i < \tau), L_i\}_{i=1}^n$ . Inspired by Theorem 1, if we were to know the truth $\Lambda(t|L)$ , then one may plug it in and obtain an estimate of $\psi(\theta)$ by $\frac{1}{n} \sum_{i=1}^{n} \theta(T_i, L_i)^{\Delta_i} e^{-\int_0^{T_i \wedge \tau} \{\theta(t, L_i) - 1\} d\Lambda(t|L_i)} Y_i$ . However in practice, $\Lambda(t|L)$ is hardly known to an analyst and must be estimated. Write the estimate as $\hat{\Lambda}(t|L)$ , we may define
|
| 131 |
+
|
| 132 |
+
the plug-in IPW estimator as
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\hat {\psi} (\theta) = \frac {1}{n} \sum_ {i = 1} ^ {n} \theta (T _ {i}, L _ {i}) ^ {\Delta_ {i}} e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} \{\theta (t, L _ {i}) - 1 \} d \hat {\Lambda} (t | L _ {i})} Y _ {i}.
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
With some regularity conditions on the nuisance estimate $\hat{\Lambda}(t|L)$ given in the appendix, we may derive the following asymptotic results on $\hat{\psi}(\theta)$ .
|
| 139 |
+
|
| 140 |
+
Theorem 2 (Consistency). Under Assumptions 1, 2, and the regularity condition that $\hat{\Lambda}(t|L)$ is uniformly consistent for $\Lambda(t|L)$ , that is,
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\mathbb {P} (\sup _ {t} | \hat {\Lambda} (t | L) - \Lambda (t | L) | > \varepsilon) \to 0
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
as $n\to \infty$ , we have that $\hat{\psi} (\theta)$ converges to $\psi (\theta)$ in probability, that is, for any constant $\varepsilon >0$
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathbb {P} \left(\left| \hat {\psi} (\theta) - \psi (\theta) \right| > \varepsilon\right)\rightarrow 0,
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
when $n\to \infty$
|
| 153 |
+
|
| 154 |
+
Theorem 3 (Asymptotic Normality). Under Assumptions 1, 2, and the regularity conditions that $\hat{\Lambda}(t|L)$ is uniformly consistent and asymptotically linear for $\Lambda(t|L)$ , that is,
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\mathbb {P} (\sup _ {t} | \hat {\Lambda} (t | L) - \Lambda (t | L) | > \varepsilon) \to 0
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
and
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\hat {\Lambda} (t | L) - \Lambda (t | L) = \frac {1}{n} \sum_ {i = 1} ^ {n} \xi_ {i} (t, L) + o _ {P} (1)
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
for some random process $\xi_{i}(t,L)$ , where $o_P(1)$ converges to zero as $n\to \infty$ uniformly over $t$ , then the root- $n$ scaled centered difference $\sqrt{n}\{\hat{\psi} (\theta) - \psi (\theta)\}$ is asymptotically linear and thus converges to a normal variable weakly, that is,
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\sqrt {n} \{\hat {\psi} (\theta) - \psi (\theta) \} = \frac {1}{\sqrt {n}} \sum_ {i = 1} ^ {n} \Xi_ {i} + o _ {P} (1) \rightarrow \mathcal {N} (0, \operatorname {V a r} (\Xi_ {1})),
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
for some random variable $\Xi$ , in distribution.
|
| 173 |
+
|
| 174 |
+
We use bootstrap to construct variance estimator of $\hat{\psi} (\theta)$ and build Wald-type confidence intervals.
|
| 175 |
+
|
| 176 |
+
# 4 EXPERIMENT RESULT
|
| 177 |
+
|
| 178 |
+
# 4.1 SIMULATION
|
| 179 |
+
|
| 180 |
+
In this section, we investigate the finite-sample performance of our estimator. We set $\tau = 2$ and generate $n$ i.i.d. copies of $(L_i, T_i, Y_i)$ as follows:
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
L _ {i} \sim \operatorname {U n i f} (0, 1),
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\mathbb {P} \left(T _ {i} > t \mid L _ {i}\right) = \exp \{- \exp (0. 2 5 L _ {i}) t \},
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
$$
|
| 191 |
+
Y _ {i} \sim \mathcal {N} (\exp (1 - 1. 5 L _ {i} - (2 - T _ {i} \wedge 2)), 0. 5 ^ {2}),
|
| 192 |
+
$$
|
| 193 |
+
|
| 194 |
+
where we observe $\{L_i,T_i\wedge 2,\Delta_i = \mathbb{1}(T_i < 2),Y_i\}_{1\leq i\leq n}$
|
| 195 |
+
|
| 196 |
+
We fit a Cox proportional hazard model Cox (1972) to get an estimate $\hat{\Lambda}(t|l)$ because the proportional hazard assumption holds for distribution of $T_{i}$ given $L_{i}$ . We examine the performance of the IPW estimator $\hat{\psi}(\theta)$ and its variance estimate when $\theta(t,l) \equiv 1/3, 1/2.5, 1/2, 1/1.5, 1.5, 2, 2.5, 3$ by reporting biases, percent biases (%Bias), empirical standard errors (SEE), average estimated standard errors (SD) based on $B = 200$ multiplier bootstrap (van der Vaart & Wellner, 1996; Kosorok, 2008), and coverage probabilities (95% CP) of Wald type 95% confidence intervals using $R = 1000$ simulated data sets of size $n = 200, 1000, 5000$ . The results are given in Table 1.
|
| 197 |
+
|
| 198 |
+
As the simulation results illustrate, $\hat{\psi}(\theta)$ performs well with small biases, across different constant functions $\theta(t,l)$ , thus confirming our theoretical results. As expected from theory, variance estimates approach the Monte Carlo variance as sample sizes increase. Similarly, Wald type confidence intervals of $\psi(\theta)$ attain their nominal levels as sample sizes become larger. In the appendix, we consider a more complicated simulation setting.
|
| 199 |
+
|
| 200 |
+
Table 1: Simulation results of the IPW estimator. We report bias $(\times 10^{-2})$ , percent bias (%Bias), empirical standard error (SEE) $(\times 10^{-2})$ , average estimated standard errors (SD) $(\times 10^{-2})$ and coverage probability of Wald type $95\%$ confidence intervals (95% CP) of $\hat{\psi}(\theta)$ by $B = 200$ multiplier bootstrap, for $n = 200, 1000, 5000$ sample sizes and $R = 1000$ Monte Carlo samples.
|
| 201 |
+
|
| 202 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">θ(t|l) ≈ ψ(θ)</td><td>1/3</td><td>1/2.5</td><td>1/2</td><td>1/1.5</td><td>1.5</td><td>2</td><td>2.5</td><td>3</td></tr><tr><td>0.957</td><td>0.893</td><td>0.808</td><td>0.694</td><td>0.404</td><td>0.336</td><td>0.297</td><td>0.273</td></tr><tr><td rowspan="5">n = 200</td><td>Bias</td><td>-1.373</td><td>-1.191</td><td>-0.845</td><td>-0.486</td><td>0.027</td><td>0.025</td><td>-0.018</td><td>-0.086</td></tr><tr><td>%Bias</td><td>-1.435</td><td>-1.333</td><td>-1.046</td><td>-0.7</td><td>0.067</td><td>0.074</td><td>-0.061</td><td>-0.315</td></tr><tr><td>SEE</td><td>7.216</td><td>6.716</td><td>6.171</td><td>5.602</td><td>4.63</td><td>4.555</td><td>4.657</td><td>4.848</td></tr><tr><td>SD</td><td>6.929</td><td>6.475</td><td>5.994</td><td>5.499</td><td>4.588</td><td>4.505</td><td>4.597</td><td>4.77</td></tr><tr><td>95% CP</td><td>93</td><td>93.1</td><td>93.4</td><td>94</td><td>94.4</td><td>95.2</td><td>95</td><td>94.5</td></tr><tr><td rowspan="5">n = 1000</td><td>Bias</td><td>-0.396</td><td>-0.388</td><td>-0.253</td><td>-0.139</td><td>0.031</td><td>0.043</td><td>0.039</td><td>0.013</td></tr><tr><td>%Bias</td><td>-0.414</td><td>-0.434</td><td>-0.313</td><td>-0.201</td><td>0.077</td><td>0.128</td><td>0.132</td><td>0.046</td></tr><tr><td>SEE</td><td>3.268</td><td>3.035</td><td>2.778</td><td>2.508</td><td>2.055</td><td>2.033</td><td>2.096</td><td>2.195</td></tr><tr><td>SD</td><td>3.198</td><td>2.982</td><td>2.745</td><td>2.495</td><td>2.059</td><td>2.032</td><td>2.088</td><td>2.184</td></tr><tr><td>95% CP</td><td>94</td><td>93.9</td><td>93.7</td><td>94</td><td>94.5</td><td>95</td><td>95.2</td><td>94.5</td></tr><tr><td rowspan="5">n = 5000</td><td>Bias</td><td>-0.069</td><td>-0.109</td><td>-0.035</td><td>0.001</td><td>0.022</td><td>0.021</td><td>0.021</td><td>0.001</td></tr><tr><td>%Bias</td><td>-0.072</td><td>-0.122</td><td>-0.043</td><td>0.001</td><td>0.053</td><td>0.063</td><td>0.069</td><td>0.004</td></tr><tr><td>SEE</td><td>1.399</td><td>1.3</td><td>1.194</td><td>1.088</td><td>0.93</td><td>0.931</td><td>0.968</td><td>1.02</td></tr><tr><td>SD</td><td>1.446</td><td>1.347</td><td>1.239</td><td>1.124</td><td>0.926</td><td>0.914</td><td>0.94</td><td>0.985</td></tr><tr><td>95% CP</td><td>95.4</td><td>95.7</td><td>95.5</td><td>95.3</td><td>94.6</td><td>94.7</td><td>94.5</td><td>94.3</td></tr></table>
|
| 203 |
+
|
| 204 |
+
# 4.2 EVALUATING INIncrementAL CAUSAL EFFECT OF METHOTREXATE ON RHEUMATOID ARTHRITIS
|
| 205 |
+
|
| 206 |
+
We illustrate our framework by estimating incremental causal effects of the anti-rheumatic therapy Methotrexate (MTX) among patients with rheumatoid arthritis, using data from Choi et al. (2002). As a disease-modifying antirheumatic drug, MTX can slow joint damage and the progress of the disease. It is one of the most effective medications for treating inflammatory types of arthritis. This, as well as its long track record and inexpensive price tag, explains why it's usually the first drug prescribed for rheumatoid arthritis. Here we consider the average of reported number of tender joints at one year of follow-up $Y$ as the outcome, an important measure of disease progression.
|
| 207 |
+
|
| 208 |
+
Methotrexate use was recorded at each monthly clinic visit. At each visit, we classified methotrexate exposure status as ever-treated or never-treated, i.e., once a patient starts methotrexate therapy, he or she was considered on therapy for the rest of the follow-up. Our analysis includes individuals who survived and were followed up more than 12 months, with 1010 patients meeting our inclusion criteria. Figure 2 shows the probability of receiving Methotrexate treatment since patients' first visit to the center, estimated by the Kaplan-Meier estimator $\hat{\mathbb{P}}(T \leq t)$ , with its pointwise $95\%$ confidence intervals. As the Figure illustrates, nearly $12\%$ of the patients initiated MTX usage at the first visit and around $25\%$ of the patients were treated at the 12 month visit.
|
| 209 |
+
|
| 210 |
+
We used a Cox proportional hazards model (Cox, 1972) to estimate the conditional cumulative hazard function of the time to initialize Methotrexate $\Lambda(t|L = l)$ , given the following variables $L$ : age, sex, past smoking status, education level, rheumatoid arthritis duration, rheumatoid factor positive, health assessment questionnaire, patient's global assessment, erythrocyte sedimentation rate, prednisone use, and number of tender joints (measured at baseline). The proportional hazards assumption was rigorously assessed in the appendix and determined to be valid.
|
| 211 |
+
|
| 212 |
+
We consider estimands $\psi(\theta)$ by letting $\theta$ being constant functions and varying $\theta \in [0.2, 5]$ . These are the incremental causal effects when the hazard rate for initiating MTX at any given time is scaled by $\theta$ across all patients. Such an analysis can illustrate how varying levels of aggressiveness or conservatism in prescribing MTX might influence average disease progression.
|
| 213 |
+
|
| 214 |
+
Plugging the estimated conditional cumulative hazards $\hat{\Lambda}(t|L)$ into our IPW estimator, we estimated the incremental treatment effect curve with $\hat{\psi}(\theta)$ , where we also computed the pointwise $95\%$ confidence intervals (with $B = 200$ multiplier bootstraps). The results are shown in Figure 3. If the hazards function of the time to Methotrexate treatment initialization were increased proportionally for all individuals, the average number of tender joints at one year of follow-up would drop. More
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 2: Estimated probability of receiving Methotrexate treatment since patients' first visit to the center $\hat{\mathbb{P}}(T \leq t)$ , with pointwise $95\%$ confidence intervals.
|
| 218 |
+
|
| 219 |
+
specifically, the average number of tender joints at one year of follow-up would decrease by $1.23\%$ from 1.90 if the hazards doubled $(\hat{\psi}(2)=1.87, 95\% \text{ CI: } 1.81-1.93)$ , and by $5.42\%$ if the hazards were multiplied five-fold $(\hat{\psi}(5)=1.79, 95\% \text{ CI: } 1.71-1.88)$ . Conversely, the average number of tender joints would increase by $0.83\%$ if the hazards were halved $(\hat{\psi}(0.5)=1.91, 95\% \text{ CI: } 1.86-1.97)$ , and by $1.51\%$ if the hazards were reduced five-fold $(\hat{\psi}(0.2)=1.92, 95\% \text{ CI: } 1.86-1.98)$ . The decline in the average number of tender joints as the hazards ratio increases from 0.2 to 5 is consistent with the protective effect of Methotrexate found in Tchetgen Tchetgen et al. (2024), where the joint effects of Methotrexate use at baseline and month six on average of tender joints at month 12 of follow-up were evaluated under a marginal structural linear model and both IPW least squares and proximal recursive least-squares yielded results suggesting a protective effect of Methotrexate on disease progression.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 3: Estimated incremental causal effects $\hat{\psi} (\theta)$ , if the hazards were multiplied by factor $\theta$ , with pointwise $95\%$ confidence intervals.
|
| 223 |
+
|
| 224 |
+
# 5 CONCLUSION
|
| 225 |
+
|
| 226 |
+
In this paper, we extended the concept of incremental causal effects to continuous-time treatment initiation. By defining these effects through shifting the hazard function via the hazard ratio, we demonstrated that they can be identified using only sequential randomization and consistency, without requiring the positivity assumption. We developed a flexible inverse probability weighted estimator, accommodating various hazard function estimators, and provided root- $n$ inference. The finite-sample performance of our framework and its potential real data value were assessed.
|
| 227 |
+
|
| 228 |
+
There are many open questions. First, one can consider augmenting the inverse probability weighted estimator through semiparametric theory to attain efficiency, using nonparametric estimation for nuisance parameters. This is currently under our investigation. Second, the idea can also be extended to complex longitudinal studies, including time-varying confounders and survival outcomes, or more generally, marked point processes (Rytgaard et al., 2022), càdlàg processes (Ying, 2022a). Third, one might consider when Assumption 2 fails but either instrumental variable assumption (Ying et al., 2019; Ying & Tchetgen Tchetgen, 2023; Ying, 2022b) or proxy variable assumption (Miao et al., 2018; Tchetgen Tchetgen et al., 2024; Ying et al., 2022; 2023) holds. Last, conditional incremental effect (McClean et al., 2024) can also be of interest.
|
| 229 |
+
|
| 230 |
+
# REFERENCES
|
| 231 |
+
|
| 232 |
+
Joshua D. Angrist, Guido W. Imbens, and Donald B. Rubin. Identification of causal effects using instrumental variables. Journal of the American Statistical Association, 91(434):444-455, 1996.
|
| 233 |
+
Matteo Bonvini, Alec McClean, Zach Branson, and Edward H. Kennedy. Incremental causal effects: An introduction and review. In Handbook of Matching and Weighting Adjustments for Causal Inference, pp. 349-372. Chapman & Hall/CRC, 2023.
|
| 234 |
+
Lauren E Cain, James M Robins, Emilie Lanoy, Roger Logan, Dominique Costagliola, and Miguel A Hernán. When to start treatment? A systematic approach to the comparison of dynamic regimes using observational data. The international journal of biostatistics, 6(2):1-26, 2010.
|
| 235 |
+
Hyon K Choi, Miguel A Hernan, John D Seeger, James M Robins, and Frederick Wolfe. Methotrexate and mortality in patients with rheumatoid arthritis: a prospective study. The Lancet, 359 (9313):1173-1177, 2002.
|
| 236 |
+
David R Cox. Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological), 34(2):187-202, 1972.
|
| 237 |
+
Iván Díaz and Nima S Hejazi. Causal mediation analysis for stochastic interventions. Journal of the Royal Statistical Society Series B: Statistical Methodology, 82(3):661-683, 2020.
|
| 238 |
+
Iván Díaz and Mark J van der Laan. Population intervention causal effects based on stochastic interventions. Biometrics, 68(2):541-549, 2012.
|
| 239 |
+
Iván Díaz and Mark J van der Laan. Assessing the causal effect of policies: an example using stochastic interventions. The international journal of biostatistics, 9(2):161-174, 2013.
|
| 240 |
+
Iván Díaz, Katherine L Hoffman, and Nima S Hejazi. Causal survival analysis under competing risks using longitudinal modified treatment policies. *Lifetime Data Analysis*, pp. 1-24, 2023a.
|
| 241 |
+
Iván Díaz, Nicholas Williams, Katherine L Hoffman, and Edward J Schenck. Nonparametric causal effects based on longitudinal modified treatment policies. Journal of the American Statistical Association, 118(542):846-857, 2023b.
|
| 242 |
+
Alexander D'Amour, Peng Ding, Avi Feller, Lihua Lei, and Jasjeet Sekhon. Overlap in observational studies with high-dimensional covariates. Journal of Econometrics, 221(2):644-654, 2021.
|
| 243 |
+
Sebastian Haneuse and Andrea Rotnitzky. Estimation of the effect of interventions that modify the received treatment. Statistics in medicine, 32(30):5260-5277, 2013.
|
| 244 |
+
Miguel A Hernán and James M Robins. Causal Inference: What If. Boca Raton: Chapman & Hall/CRC, 2020.
|
| 245 |
+
|
| 246 |
+
Paul W Holland. Statistics and causal inference. Journal of the American Statistical Association, 81 (396):945-960, 1986.
|
| 247 |
+
Inwoo Hwang, Yesong Choe, Yeahoon Kwon, and Sanghack Lee. On positivity condition for causal inference. In *Forty-first International Conference on Machine Learning*, 2024.
|
| 248 |
+
Brent A Johnson and Anastasios A Tsiatis. Semiparametric inference in observational duration-response studies, with duration possibly right-censored. Biometrika, 92(3):605-618, 2005.
|
| 249 |
+
Edward H Kennedy. Nonparametric causal effects based on incremental propensity score interventions. Journal of the American Statistical Association, 114(526):645-656, 2019.
|
| 250 |
+
Kwangho Kim, Edward H Kennedy, and Ashley I Naimi. Incremental intervention effects in studies with dropout and many timepoints#. Journal of Causal Inference, 9(1):302-344, 2021.
|
| 251 |
+
Michael R Kosorok. Introduction to Empirical Processes and Semiparametric Inference, volume 61. Springer, 2008.
|
| 252 |
+
Maxime Léger, Arthur Chatton, Florent Le Borgne, Romain Pirracchio, Sigismond Lasocki, and Yohann Foucher. Causal inference in case of near-violation of positivity: comparison of methods. Biometrical Journal, 64(8):1389-1403, 2022.
|
| 253 |
+
Roland A Matsouaka and Yunji Zhou. Causal inference in the absence of positivity: The role of overlap weights. Biometrical Journal, 66(4):2300156, 2024.
|
| 254 |
+
Alec McClean, Zach Branson, and Edward H. Kennedy. Nonparametric estimation of conditional incremental effects. Journal of Causal Inference, 12(1), 2024.
|
| 255 |
+
Wang Miao, Zhi Geng, and Eric J Tchetgen Tchetgen. Identifying causal effects with proxy variables of an unmeasured confounder. Biometrika, 105(4):987-993, 2018.
|
| 256 |
+
Erica E. M. Moodie, Thomas S. Richardson, and David A. Stephens. Demystifying optimal dynamic treatment regimes. Biometrics, 63(2):447-455, 2007.
|
| 257 |
+
S. A. Murphy. Optimal dynamic treatment regimes. Journal of the Royal Statistical Society Series B: Statistical Methodology, 65(2):331-366, 2003.
|
| 258 |
+
Ashley I Naimi, Jacqueline E Rudolph, Edward H Kennedy, Abigail Cartus, Sharon I Kirkpatrick, David M Haas, Hyagriv Simhan, and Lisa M Bodnar. Incremental propensity score effects for time-fixed exposures. Epidemiology (Cambridge, Mass.), 32(2):202, 2021.
|
| 259 |
+
Jersey Neyman. Sur les applications de la théorie des probabilités aux experiences agricoles: Essai des principes. Roczniki Nauk Rolniczych, 10(1):1-51, 1923.
|
| 260 |
+
Xinkun Nie, Emma Brunskill, and Stefan Wager. Learning when-to-treat policies. Journal of the American Statistical Association, 116(533):392-409, 2021.
|
| 261 |
+
Maya L Petersen, Kristin E Porter, Susan Gruber, Yue Wang, and Mark J Van Der Laan. Diagnosing and responding to violations in the positivity assumption. Statistical methods in medical research, 21(1):31-54, 2012.
|
| 262 |
+
James M Robins. A new approach to causal inference in mortality studies with a sustained exposure period—application to control of the healthy worker survivor effect. *Mathematical Modelling*, 7 (9-12):1393-1512, 1986.
|
| 263 |
+
James M. Robins. Optimal structural nested models for optimal sequential decisions. In Proceedings of the Second Seattle Symposium in Biostatistics, pp. 189-326. Springer, 2004.
|
| 264 |
+
Paul R. Rosenbaum. Observational Studies. Springer, 2002.
|
| 265 |
+
Donald B Rubin. Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66(5):688-701, 1974.
|
| 266 |
+
|
| 267 |
+
Helene C Rytggaard, Thomas A Gerds, and Mark J van der Laan. Continuous-time targeted minimum loss-based estimation of intervention-specific mean outcomes. The Annals of Statistics, 50(5): 2469-2491, 2022.
|
| 268 |
+
Aaron L Sarvet, Kerollos N Wanis, Jessica G Young, Roberto Hernandez-Alejandro, and Mats J Stensrud. Longitudinal incremental propensity score interventions for limited resource settings. Biometrics, 2023.
|
| 269 |
+
M. J. Stensrud, J. D. Laurendeau, and A. L. Sarvet. Optimal regimes for algorithm-assisted human decision-making. Biometrika, 00(0):1-20, 2024.
|
| 270 |
+
Jinghao Sun and Forrest W Crawford. Causal identification for continuous-time stochastic processes. arXiv preprint arXiv:2211.15934, 2022.
|
| 271 |
+
Eric J Tchetgen Tchetgen, Andrew Ying, Yifan Cui, Xu Shi, and Wang Miao. An introduction to proximal causal inference. Statistical Science, 39(3):375-390, 2024.
|
| 272 |
+
Mark J van der Laan, Sherri Rose, Ivan Diaz, and Mark J van der Laan. Stochastic treatment regimes. Targeted learning in data science: Causal inference for complex longitudinal studies, pp. 219-232, 2018.
|
| 273 |
+
Aad W. van der Vaart and Jon A. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics. Springer Series in Statistics. Springer, 1996. ISBN 978-0-387-94640-6.
|
| 274 |
+
S Yang, K Pieper, and F Cools. Semiparametric estimation of structural failure time models in continuous-time processes. Biometrika, 107(1):123-136, 2020.
|
| 275 |
+
Shu Yang, Anastasios A Tsiatis, and Michael Blazing. Modeling survival distribution as a function of time to treatment discontinuation: A dynamic treatment regime approach. Biometrics, 74(3): 900-909, 2018.
|
| 276 |
+
Andrew Ying. Causal inference for complex continuous-time longitudinal studies. arXiv preprint arXiv:2206.12525, 2022a.
|
| 277 |
+
Andrew Ying. Structural cumulative survival models for robust estimation of treatment effects accounting for treatment switching in randomized experiments. arXiv preprint arXiv:2204.13219, 2022b.
|
| 278 |
+
Andrew Ying. Causality for functional longitudinal data. In Causal Learning and Reasoning, pp. 665-687. PMLR, 2024a.
|
| 279 |
+
Andrew Ying. Causality for complex continuous-time functional longitudinal studies with dynamic treatment regimes. arXiv preprint arXiv:2406.06868, 2024b.
|
| 280 |
+
Andrew Ying and Eric J Tchetgen Tchetgen. Structural cumulative survival models for estimation of treatment effects accounting for treatment switching in randomized experiments. Biometrics, 79(3):1597-1609, 2023.
|
| 281 |
+
Andrew Ying, Ronghui Xu, and James Murphy. Two-stage residual inclusion for survival data and competing risks—an instrumental variable approach with application to seer-medicare linked data. Statistics in Medicine, 38(10):1775-1801, 2019.
|
| 282 |
+
Andrew Ying, Yifan Cui, and Eric J. Tchetgen Tchetgen. Proximal causal inference for marginal counterfactual survival curves. arXiv preprint arXiv:2204.13144, 2022.
|
| 283 |
+
Andrew Ying, Wang Miao, Xu Shi, and Eric J Tchetgen Tchetgen. Proximal causal inference for complex longitudinal studies. Journal of the Royal Statistical Society Series B: Statistical Methodology, 85(3):684-704, 2023.
|
| 284 |
+
Jessica G Young, Lauren E Cain, James M Robins, Elis J O'Reilly, and Miguel A Hernán. Comparative effectiveness of dynamic treatment regimes: an application of the parametric g-formula. Statistics in Biosciences, 3(1):119-143, 2011.
|
| 285 |
+
|
| 286 |
+
Jessica G Young, Miguel A Hernán, and James M Robins. Identification, estimation and approximation of risk under interventions that depend on the natural value of treatment using observational data. Epidemiologic methods, 3(1):1-19, 2014.
|
| 287 |
+
Yaqian Zhu, Rebecca A Hubbard, Jessica Chubak, Jason Roy, and Nandita Mitra. Core concepts in pharmacoepidemiology: Violations of the positivity assumption in the causal analysis of observational data: Consequences and statistical approaches. *Pharmacoepidemiology and drug safety*, 30(11):1471-1485, 2021.
|
| 288 |
+
|
| 289 |
+
# A PROOFS
|
| 290 |
+
|
| 291 |
+
# A.1 PROOF OF THEOREM 1
|
| 292 |
+
|
| 293 |
+
We have
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
\begin{array}{l} \psi (\theta) = \mathbb {E} (Y _ {T (\theta)}) \\ = \mathbb {E} [ \mathbb {E} \{\mathbb {E} (Y _ {T (\theta)} | T (\theta), L) | L \} ] \\ = \int \mathbb {E} (Y _ {t} | T (\theta) = t, L = l) f (l) \left\{\theta (t | l) \lambda (t | l) e ^ {- \int_ {0} ^ {t} \theta (s | l) \lambda (s | l) d s} \right\} ^ {\delta} \\ \{\mathbb {E} (Y _ {\tau} | T (\theta) \geq \tau , L = l) e ^ {- \int_ {0} ^ {\tau} \theta (t | l) \lambda (t | l) d t} \} ^ {1 - \delta} d t d l d \delta \\ = \int \mathbb {E} (Y _ {t} | L = l) f (l) \left\{\theta (t | l) \lambda (t | l) e ^ {- \int_ {0} ^ {t} \theta (s | l) \lambda (s | l) d s} \right\} ^ {\delta} \\ \{\mathbb {E} (Y _ {\tau} | L = l) e ^ {- \int_ {0} ^ {\tau} \theta (t | l) \lambda (t | l) d t} \} ^ {1 - \delta} d t d l d \delta \\ = \int \mathbb {E} (Y _ {t} | T = t, L = l) f (l) \left\{\theta (t | l) \lambda (t | l) e ^ {- \int_ {0} ^ {t} \theta (s | l) \lambda (s | l) d s} \right\} ^ {\delta} \\ \{\mathbb {E} (Y _ {\tau} | T \geq \tau , L = l) e ^ {- \int_ {0} ^ {\tau} \theta (t | l) \lambda (t | l) d t} \} ^ {1 - \delta} d t d l d \delta \\ = \int \mathbb {E} (Y | T = t, L = l) f (l) \left\{\theta (t | l) \lambda (t | l) e ^ {- \int_ {0} ^ {t} \theta (s | l) \lambda (s | l) d s} \right\} ^ {\delta} \\ \{\mathbb {E} (Y | T \geq \tau , L = l) e ^ {- \int_ {0} ^ {\tau} \theta (t | l) \lambda (t | l) d t} \} ^ {1 - \delta} d t d l d \delta \\ = \mathbb {E} \left\{\theta (T, L) ^ {\Delta} e ^ {- \int_ {0} ^ {T \wedge \tau} (\theta (t, L) - 1) d \Lambda (t | L)} Y \right\}. \\ \end{array}
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
where the first equation follows by definition, the second by iteration of expectation, the third by definition of expectation, the fourth by the definition of $T(\theta)$ , the fifth by Assumption 2, the sixth by Assumption 1, and the last by the Radon-Nikodym Theorem.
|
| 300 |
+
|
| 301 |
+
Another intuition of checking this is through densities: The observed data density is
|
| 302 |
+
|
| 303 |
+
$$
|
| 304 |
+
f (Y, T, L) = f (L) \{\lambda (T | L) e ^ {- \int_ {0} ^ {T} \lambda (t | L) d t} f (Y | T, L) \} ^ {\Delta} \{e ^ {- \int_ {0} ^ {\tau} \lambda (t | L) d t} f (Y | T > \tau , L) \} ^ {1 - \Delta}.
|
| 305 |
+
$$
|
| 306 |
+
|
| 307 |
+
The target incremental intervention density is
|
| 308 |
+
|
| 309 |
+
$$
|
| 310 |
+
f (Y, T, L) = f (L) \{\theta (T | L) \lambda (T | L) e ^ {- \int_ {0} ^ {T} \theta (t | L) \lambda (t | L) d t} f (Y | T, L) \} ^ {\Delta} \{e ^ {- \int_ {0} ^ {\tau} \theta (t | L) \lambda (t | L) d t} f (Y | T \geq \tau , L) \} ^ {1 - \Delta}.
|
| 311 |
+
$$
|
| 312 |
+
|
| 313 |
+
The density for the potential outcomes is
|
| 314 |
+
|
| 315 |
+
$$
|
| 316 |
+
f \left(Y _ {T (\theta)}, T, L\right) = f (L) \left\{\theta (T | L) \lambda (T | L) e ^ {- \int_ {0} ^ {T} \theta (t | L) \lambda (t | L) d t} f \left(Y _ {T} | L\right) \right\} ^ {\Delta} \left\{e ^ {- \int_ {0} ^ {\tau} \theta (t | L) \lambda (t | L) d t} f \left(Y _ {\tau} | L\right) \right\} ^ {1 - \Delta}.
|
| 317 |
+
$$
|
| 318 |
+
|
| 319 |
+
Integrating $Y_{T(\theta)}$ yields the parameter of interest (1). By Assumptions 1 and 2, the density for the potential outcomes is equal to the target incremental intervention density. Therefore, to identify (1) through the observed data density, one can use Radon-Nikodym weights to reweight $Y$ .
|
| 320 |
+
|
| 321 |
+
# A.2 PROOF OF THEOREM 2
|
| 322 |
+
|
| 323 |
+
We have
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
\begin{array}{l} \left| \hat {\psi} (\theta) - \psi (\theta) \right| \\ = \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \theta \left(T _ {i}, L _ {i}\right) ^ {\Delta_ {i}} e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} \left(\theta (t, L _ {i}) - 1\right) d \hat {\Lambda} (t | L _ {i})} Y _ {i} - \psi (\theta) \right| \\ \leq \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \theta \left(T _ {i}, L _ {i}\right) ^ {\Delta_ {i}} \left\{e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} (\theta (t, L) - 1) d \hat {\Lambda} (t | L _ {i})} - e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} (\theta (t, L _ {i}) - 1) d \Lambda (t | L _ {i})} \right\} Y _ {i} \right| \\ + \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \theta \left(T _ {i}, L _ {i}\right) ^ {\Delta_ {i}} e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} \left(\theta (t, L _ {i}) - 1\right) d \Lambda (t | L _ {i})} Y _ {i} - \psi (\theta) \right| \\ \leq \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \theta \left(T _ {i}, L _ {i}\right) ^ {\Delta_ {i}} \left\{e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} \left(\theta (t, L _ {i}) - 1\right) d \hat {\Lambda} (t \mid L _ {i})} - e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} \left(\theta (t, L _ {i}) - 1\right) d \Lambda (t \mid L _ {i})} \right\} Y _ {i} \right| + o _ {P} (1). \\ \end{array}
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
Note that
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
\begin{array}{l} \left| e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} (\theta (t, L _ {i}) - 1) d \hat {\Lambda} (t | L _ {i})} - e ^ {- \int_ {0} ^ {T _ {i} \wedge \tau} (\theta (t, L _ {i}) - 1) d \Lambda (t | L _ {i})} \right| \\ = \left| e ^ {- (\theta (T _ {i} \wedge \tau , L _ {i}) - 1) \hat {\Lambda} (T _ {i} \wedge \tau | L _ {i}) + \int_ {0} ^ {T _ {i} \wedge \tau} \hat {\Lambda} (t | L _ {i}) d \theta (t, L _ {i})} - e ^ {- (\theta (T _ {i} \wedge \tau , L _ {i}) - 1) \Lambda (T _ {i} \wedge \tau | L _ {i}) + \int_ {0} ^ {T _ {i} \wedge \tau} \Lambda (t | L _ {i}) d \theta (t, L _ {i})} \right| \\ \leq \left| \left\{e ^ {- (\theta (T _ {i} \wedge \tau , L _ {i}) - 1) \Lambda (T _ {i} \wedge \tau | L _ {i}) + \int_ {0} ^ {T _ {i} \wedge \tau} \Lambda (t | L _ {i}) d \theta (t, L _ {i})} + o _ {P} (1) \right\} \right. \\ \left. \left\{\left| \theta \left(T _ {i} \wedge \tau , L _ {i}\right) - 1 \right| \cdot \left| \hat {\Lambda} \left(T _ {i} \wedge \tau \mid L _ {i}\right) - \Lambda \left(T _ {i} \wedge \tau \mid L _ {i}\right) \right| + \int_ {0} ^ {T _ {i} \wedge \tau} \left| \hat {\Lambda} (t \mid L _ {i}) - \Lambda (t \mid L _ {i}) \right| d \theta (t, L _ {i}) \right\} \right| \\ \leq C \sup _ {t} \sup _ {L _ {i}} \left| \hat {\Lambda} (t | L _ {i}) - \Lambda (t | L _ {i}) \right|. \\ \end{array}
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
# A.3 PROOF OF THEOREM 3
|
| 336 |
+
|
| 337 |
+
By a simple Taylor expansion, we have
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\hat {\psi} (\theta) - \psi (\theta) = \frac {1}{n} \sum_ {i = 1} ^ {n} \Xi_ {i} (\delta) = \frac {1}{n} \sum_ {i = 1} ^ {n} \theta^ {\Delta_ {i}} \hat {\mathbb {P}} (T _ {i} > t | L _ {i} \} ^ {\theta - 1} | _ {t = X _ {i}} Y _ {i} + \frac {\partial \psi (\theta)}{\partial \Lambda (t)} \xi_ {i} (t, L) | _ {t = X _ {i}} - \psi (\theta),
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
and therefore by central limit theorem we have reached the conclusion.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
|
| 347 |
+
# B METHOTREXATE DATA PROCESSING
|
| 348 |
+
|
| 349 |
+
The raw dataset included the information of 1240 patients. For all the patients, we extracted 11 baseline covariates described in Section 4.2, as well as $T$ , the time to receive Methotrexate (MTX) treatment, and the number of tender joints at month $\tau = 12$ , which is the outcome $Y$ of interest. Some patients exited the study before reaching month $\tau = 12$ , i.e., one year of follow-up, resulting in no recorded $Y$ for these individuals. After excluding them, 1010 patients met our inclusion criteria.
|
| 350 |
+
|
| 351 |
+
Denote $L_{1,i}$ to $L_{11,i}$ as the baseline covariates, $T_{i}$ as the time to receive MTX, and $Y_{i}$ as the number of tender joints at one year of follow-up for each patient $(i = 1,2,\dots ,1010)$ . Define $\Delta_i = \mathbb{1}(T_i < \tau)$ . For the $i$ th patient, the individual data consists of $\{Y_{i},T_{i}\wedge \tau ,\Delta_{i},L_{1,i},\ldots ,L_{11,i}\}$ .
|
| 352 |
+
|
| 353 |
+
For constructing the Cox proportional hazards model, we tested the proportional hazards assumption by examining the Schoenfeld residuals and cumulative martingale residuals. For simplicity, we used age_0, sex, smoke_0, edu_0, duration_0, rasos, haqc_0, gsc_0, esrc_0, onprd2_0, and jc_0 as the abbreviations for the covariates age, sex, past smoking status, education level, rheumatoid arthritis duration, rheumatoid factor positive, health assessment questionnaire, patient's global assessment, erythrocyte sedimentation rate, prednisone use, and number of tender joints (measured at baseline), respectively. Figure 4 gives the Schoenfeld residuals plots of time-dependent Cox regression and the results of Schoenfeld individual tests and global Schoenfeld test. Table 2 shows the results of the test of proportionality for fitting an Cox-Aalen model. Figure 5 gives the cumulative martingale residuals plots for each covariate. The results show that the Cox proportional hazards model we constructed is appropriate.
|
| 354 |
+
|
| 355 |
+

|
| 356 |
+
Figure 4: Results of Schoenfeld residuals examination.
|
| 357 |
+
|
| 358 |
+
Table 2: Results of the test of proportionality for fitting an Cox-Aalen model.
|
| 359 |
+
|
| 360 |
+
<table><tr><td></td><td>sup |U(t)</td><td>p-value</td></tr><tr><td>age_0</td><td>16.80</td><td>0.158</td></tr><tr><td>sex</td><td>6.30</td><td>0.248</td></tr><tr><td>smoke_0</td><td>10.30</td><td>0.406</td></tr><tr><td>edu_0</td><td>5.52</td><td>0.932</td></tr><tr><td>duration_0</td><td>10.60</td><td>0.306</td></tr><tr><td>rapos</td><td>4.68</td><td>0.294</td></tr><tr><td>haqc_0</td><td>9.52</td><td>0.320</td></tr><tr><td>gsc_0</td><td>6.28</td><td>0.774</td></tr><tr><td>esrc_0</td><td>8.40</td><td>0.078</td></tr><tr><td>onprd2_0</td><td>7.98</td><td>0.140</td></tr><tr><td>jc_0</td><td>14.00</td><td>0.094</td></tr></table>
|
| 361 |
+
|
| 362 |
+
# C ADDITIONAL SIMULATION
|
| 363 |
+
|
| 364 |
+
In this section, we investigate the finite-sample performance of our estimator under a more complicated scenario than that in Section 4.1, including more covariates $L$ and a complex function $\theta(t,l)$ . We set $\tau = 2$ and generate $n$ i.i.d. copies of $(L_i = (L_{1i}, L_{2i}, L_{3i}), T_i, Y_i)$ as follows:
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
L _ {1 i} \sim \operatorname {U n i f} (0, 1),
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
L _ {2 i} \sim N (0. 5, 0. 2 5 ^ {2}),
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
L _ {3 i} \sim \text {B e r n o u l l i} (0. 5),
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\mathbb {P} \left(T _ {i} > t \mid L _ {i}\right) = \exp \{- \exp \left(0. 1 L _ {1 i} + 0. 0 5 L _ {2 i} + 0. 1 L _ {3 i}\right) t \},
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
$$
|
| 383 |
+
Y _ {i} \sim \mathcal {N} \left(\exp \left\{1 - \left(0. 6 L _ {1 i} + 0. 3 L _ {2 i} + 0. 6 L _ {3 i}\right) - (2 - T _ {i} \wedge 2) \right\}, 0. 5 ^ {2}\right),
|
| 384 |
+
$$
|
| 385 |
+
|
| 386 |
+
where we observe $\{L_i, T_i \wedge 2, \Delta_i = \mathbb{1}(T_i < 2), Y_i\}_{1 \leq i \leq n}$ . The covariates we consider include a bounded uniform distribution, an unbounded normal distribution and a discrete Bernoulli distribution.
|
| 387 |
+
|
| 388 |
+
We fit a Cox proportional hazard model Cox (1972) to get an estimate $\hat{\Lambda} (t|l)$ because the proportional hazard assumption holds for distribution of $T_{i}$ given $L_{i}$ . We examine the performance of the
|
| 389 |
+
|
| 390 |
+

|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
|
| 394 |
+

|
| 395 |
+
|
| 396 |
+

|
| 397 |
+
|
| 398 |
+

|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
|
| 402 |
+

|
| 403 |
+
|
| 404 |
+

|
| 405 |
+
|
| 406 |
+

|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
Figure 5: Cumulative martingale residuals plots for each covariate.
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
|
| 413 |
+
IPW estimator $\hat{\psi} (\theta)$ and its variance estimate when $\theta (t,l) = \exp (\beta^{\prime}l)$ for $\beta \in$
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\{\beta_ {1} = (0. 1, 0. 1, 0. 1), \beta_ {2} = (0. 2, 0. 2, 0. 2), \beta_ {3} = (0. 5, 0. 5, 0. 5),
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
$$
|
| 420 |
+
\beta_ {4} = (0. 1, 0. 2, 0. 5), \beta_ {5} = (0. 1, 0. 5, 0. 2), \beta_ {6} = (0. 2, 0. 1, 0. 5),
|
| 421 |
+
$$
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\beta_ {7} = (0. 2, 0. 5, 0. 1), \beta_ {8} = (0. 5, 0. 1, 0. 2), \beta_ {9} = (0. 5, 0. 2, 0. 1) \},
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
a much more complicated form. We report biases, percent biases (%Bias), empirical standard errors (SEE), average estimated standard errors (SD) based on $B = 50$ multiplier bootstrap (van der Vaart & Wellner, 1996; Kosorok, 2008), and coverage probabilities (95% CP) of Wald type 95% confidence intervals using $R = 5000$ simulated data sets of size $n = 200, 1000, 5000$ . The results are given in Table 3.
|
| 428 |
+
|
| 429 |
+
As the simulation results illustrate, $\hat{\psi} (\theta)$ perform well with small biases, across different functions $\theta (t,l)$ , thus confirming our theoretical results. As expected from theory, variance estimates approach the Monte Carlo variance as sample sizes increase. Similarly, Wald type confidence intervals of $\psi (\theta)$ attain their nominal levels as sample sizes become larger.
|
| 430 |
+
|
| 431 |
+
Table 3: Simulation results of the IPW estimator. We report bias $(\times 10^{-2})$ , percent bias (%Bias), empirical standard error (SEE) $(\times 10^{-2})$ , average estimated standard errors (SD) $(\times 10^{-2})$ and coverage probability of Wald type $95\%$ confidence intervals $(95\%$ CP) of $\hat{\psi}(\theta)$ by $B = 50$ multiplier bootstrap, for $n = 200, 1000, 5000$ sample sizes and $R = 5000$ Monte Carlo samples.
|
| 432 |
+
|
| 433 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">θ(t,l)=ψ(θ)</td><td>β1'l</td><td>β2'l</td><td>β3'l</td><td>β4'l</td><td>β5'l</td><td>β6'l</td><td>β7'l</td><td>β8'l</td><td>β9'l</td></tr><tr><td>0.474</td><td>0.436</td><td>0.348</td><td>0.424</td><td>0.408</td><td>0.426</td><td>0.405</td><td>0.413</td><td>0.408</td></tr><tr><td rowspan="5">n=200</td><td>Bias</td><td>0.172</td><td>0.196</td><td>0.287</td><td>0.216</td><td>0.236</td><td>0.201</td><td>0.233</td><td>0.225</td><td>0.219</td></tr><tr><td>%Bias</td><td>0.364</td><td>0.449</td><td>0.823</td><td>0.509</td><td>0.579</td><td>0.473</td><td>0.576</td><td>0.545</td><td>0.537</td></tr><tr><td>SEE</td><td>4.707</td><td>4.686</td><td>4.897</td><td>4.822</td><td>4.658</td><td>4.831</td><td>4.617</td><td>4.697</td><td>4.647</td></tr><tr><td>SD</td><td>4.686</td><td>4.67</td><td>4.837</td><td>4.791</td><td>4.631</td><td>4.805</td><td>4.595</td><td>4.686</td><td>4.637</td></tr><tr><td>95% CP</td><td>94.48</td><td>94.46</td><td>94.26</td><td>94.54</td><td>94.36</td><td>94.54</td><td>94.42</td><td>94.5</td><td>94.32</td></tr><tr><td rowspan="5">n=1000</td><td>Bias</td><td>0.084</td><td>0.052</td><td>0.106</td><td>0.075</td><td>0.074</td><td>0.058</td><td>0.065</td><td>0.054</td><td>0.046</td></tr><tr><td>%Bias</td><td>0.178</td><td>0.12</td><td>0.304</td><td>0.177</td><td>0.181</td><td>0.137</td><td>0.161</td><td>0.131</td><td>0.112</td></tr><tr><td>SEE</td><td>2.121</td><td>2.115</td><td>2.212</td><td>2.183</td><td>2.099</td><td>2.189</td><td>2.078</td><td>2.122</td><td>2.095</td></tr><tr><td>SD</td><td>2.103</td><td>2.097</td><td>2.193</td><td>2.156</td><td>2.081</td><td>2.163</td><td>2.064</td><td>2.106</td><td>2.083</td></tr><tr><td>95% CP</td><td>94.14</td><td>94.1</td><td>94.32</td><td>93.8</td><td>93.94</td><td>93.92</td><td>94.12</td><td>94.06</td><td>94.04</td></tr><tr><td rowspan="5">n=5000</td><td>Bias</td><td>0.036</td><td>-0.003</td><td>0.04</td><td>0.016</td><td>0.016</td><td>-0.001</td><td>0.008</td><td>-0.002</td><td>-0.009</td></tr><tr><td>%Bias</td><td>0.077</td><td>-0.007</td><td>0.114</td><td>0.038</td><td>0.038</td><td>-0.002</td><td>0.021</td><td>-0.005</td><td>-0.023</td></tr><tr><td>SEE</td><td>0.948</td><td>0.947</td><td>0.996</td><td>0.975</td><td>0.941</td><td>0.977</td><td>0.934</td><td>0.952</td><td>0.942</td></tr><tr><td>SD</td><td>0.94</td><td>0.938</td><td>0.983</td><td>0.965</td><td>0.931</td><td>0.968</td><td>0.923</td><td>0.942</td><td>0.932</td></tr><tr><td>95% CP</td><td>93.92</td><td>94</td><td>94.18</td><td>94.14</td><td>94</td><td>94.1</td><td>94</td><td>93.94</td><td>93.96</td></tr></table>
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9011d303e73a0f6c0ac30c4d02b35c766761ab472bd2733256b48d22672c0da
|
| 3 |
+
size 800889
|
ICLR/2025/Incremental Causal Effect for Time to Treatment Initialization/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1be1baf9191743e07309d70471821e28ccd227dfd1ab4f5e3f5de99f282f643
|
| 3 |
+
size 543728
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6300b7e367ce69f2fba9ede90474a703c7657ee1d6845747762038e0b613da98
|
| 3 |
+
size 140357
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72114d8c8abe0c42fd7a927775c518fb9c846af8ff19970eccd0b73977c9b14e
|
| 3 |
+
size 165346
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/ef880a81-2d3d-443e-aac0-3864596a8030_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:182898384ac405d1583587f6d1b5f520760c232d39c4bcd5d4502d0e3972abae
|
| 3 |
+
size 1013508
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/full.md
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INDIRECT GRADIENT MATCHING FOR ADVERSARIAL ROBUST DISTILLATION
|
| 2 |
+
|
| 3 |
+
Hongsin Lee*, Seungju Cho*, Changick Kim
|
| 4 |
+
|
| 5 |
+
Korea Advanced Institute of Science and Technology (KAIST)
|
| 6 |
+
|
| 7 |
+
{hongsin04,joyga,changick}@kaist.ac.kr
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Adversarial training significantly improves adversarial robustness, but superior performance is primarily attained with large models. This substantial performance gap for smaller models has spurred active research into adversarial distillation (AD) to mitigate the difference. Existing AD methods leverage the teacher's logits as a guide. In contrast to these approaches, we aim to transfer another piece of knowledge from the teacher, the input gradient. In this paper, we propose a distillation module termed Indirect Gradient Distillation Module (IGDM) that indirectly matches the student's input gradient with that of the teacher. Experimental results show that IGDM seamlessly integrates with existing AD methods, significantly enhancing their performance. Particularly, utilizing IGDM on the CIFAR-100 dataset improves the AutoAttack accuracy from $28.06\%$ to $30.32\%$ with the ResNet-18 architecture and from $26.18\%$ to $29.32\%$ with the MobileNetV2 architecture when integrated into the SOTA method without additional data augmentation.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Recently, adversarial attacks have revealed the vulnerabilities of deep learning-based models (Goodfellow et al., 2014; Carlini & Wagner, 2017; Madry et al., 2017), raising critical concerns in safety-important applications (Grigorescu et al., 2020; Ma et al., 2021; Wang et al., 2023a). Thus, much research has been done on defense technologies to make deep learning more reliable (Das et al., 2017; Carmon et al., 2019; Cohen et al., 2019; Xie et al., 2019; Zhang et al., 2022; Jin et al., 2023). Among adversarial defense mechanisms, adversarial training is one of the most effective methods to enhance adversarial robustness (Pang et al., 2020; Bai et al., 2021a; Wei et al., 2023). However, there is a significant performance gap between large and small models in adversarial training. Since light models with less computational complexity are preferred in practical applications, increasing the robustness of light models is necessary. To address this, adversarial training incorporates distillation methodologies which are commonly employed to boost the performance of light or small models (Goldblum et al., 2020; Zhu et al., 2021; Zi et al., 2021; Huang et al., 2023).
|
| 16 |
+
|
| 17 |
+
In the teacher-student architecture of knowledge distillation, prevailing methods leverage the teacher's features or logits (Hinton et al., 2015; Ji et al., 2021; Kim et al., 2021; Yang et al., 2022). Adversarial distillation (AD) approaches extend this paradigm by incorporating the teacher's logits as a guide within their adversarial training framework (Goldblum et al., 2020; Zhu et al., 2021; Maroto et al., 2022). Recent studies have specifically focused on tailoring the inner maximization problem of adversarial training, particularly by involving the teacher model in the generation of adversarial examples (Zi et al., 2021; Huang et al., 2023). We leverage input gradients, which have been studied in relation to robustness in adversially trained models (Tsipras et al., 2018; Engstrom et al., 2019; Srinivas et al., 2023).
|
| 18 |
+
|
| 19 |
+
We additionally demonstrate that matching the input gradients between teacher and student contributes to point-wise alignment, which has been studied in state-of-the-art AD methods (Huang et al., 2023). In the top right of Figure 1a, if the input gradients between the teacher and the student match as depicted in the red line, then the output of the points located on the red line, denoted as
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
(a) Conceptual diagram of IGDM
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
(b) Performance of IGDM
|
| 26 |
+
Figure 1: (a) We match the gradient in the input space with knowledge distillation. Since adversarial robust models are locally linear, matching the gradient has the effect of matching the output points of the surrounding input marked with 'stars', as illustrated in the top right figure. Consequently, gradient matching involves matching the teacher and student point by point in the output space, as depicted in the bottom right. (b) Clean and Autoattack accuracy on ResNet-18 with BDM-AT teacher on CIFAR-100 dataset. IGDM demonstrates significantly improved AutoAttack accuracy compared with other adversarial distillation methods.
|
| 27 |
+
|
| 28 |
+
stars, will also match. We show that the output of random points around $x$ also becomes similar to the teacher as illustrated in the bottom right of Figure 1a. This alignment causes the student to mimic the teacher and reduces the capacity gap between teacher and student.
|
| 29 |
+
|
| 30 |
+
In this paper, we propose Indirect Gradient Distillation Module (IGDM), which indirectly aligns the student's gradient with that of the teacher. We can easily match input gradients through Taylor expansion, leveraging the locally-linear property of adversarial training. Since existing AD methods are mainly designed to match logits, IGDM can be used in conjunction with them. Through extensive experimental results, we verify that our method successfully complements the robustness of existing AD methods. We significantly improve existing AD methods as depicted in Figure 1b. Our contributions are as follows:
|
| 31 |
+
|
| 32 |
+
- We propose a methodology to transfer the gradient information from the teacher to the student through the exploitation of the local linearity inherent in adversarial training. This stands in contrast to prevailing AD methods, which primarily concentrate on the distillation of logits.
|
| 33 |
+
- Based on the analysis, we propose the Indirect Gradient Distillation Module (IGDM), which indirectly distills the gradient information. Its modular design allows easy integration into existing AD methods.
|
| 34 |
+
- We empirically demonstrate that IGDM significantly improves robustness against various attack scenarios, datasets, student models, and teacher models.
|
| 35 |
+
|
| 36 |
+
# 2 RELATED WORK
|
| 37 |
+
|
| 38 |
+
# 2.1 ADVERSARIAL TRAINING
|
| 39 |
+
|
| 40 |
+
Adversarial training (AT) involves generating adversarial examples during the training process to improve model robustness. The adversarial training is a minimization-maximization problem as follows:
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\underset {\theta} {\arg \min } \mathbb {E} _ {(\mathbf {x}, y) \sim D} \left[ L _ {\min } \left(f _ {\theta} (\mathbf {x} + \boldsymbol {\delta}), y\right) \right], \text {w h e r e} \boldsymbol {\delta} = \underset {\| \boldsymbol {\delta} ^ {\prime} \| _ {p} \leq \epsilon} {\arg \max } L _ {\max } \left(f _ {\theta} (\mathbf {x} + \boldsymbol {\delta} ^ {\prime}), y\right). \tag {1}
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
Here, $\theta$ is parameters of model $f$ , $D$ is a data distribution of $\mathbf{x}$ and corresponding labels $y$ , $\delta$ is perturbation causing the largest loss within $l_{p}$ norm of $\epsilon$ , $L_{max}$ is an inner maximization loss, and $L_{min}$ is an outer minimization loss. Multi-step PGD attack (Madry et al., 2017) is commonly utilized to
|
| 47 |
+
|
| 48 |
+
solve the inner maximization loss, and various regularization loss functions have been introduced for the outer minimization loss. TRADES (Zhang et al., 2019) incorporates the Kullback-Leibler (KL) divergence loss between the predictions of clean and adversarial images. MART(Wang et al., 2020) introduces per-sample weights based on the confidence of each sample. Due to their simplicity and effectiveness, TRADES and MART are commonly used as baseline methods in adversarial training (Wu et al., 2020; Bai et al., 2021b; Jin et al., 2022; Tack et al., 2022; Jin et al., 2023; Wei et al., 2023; Qin et al., 2019). Moreover, several strategies such as data augmentation (Rebuffi et al., 2021; Li & Spratling, 2023), and diverse loss functions (Wu et al., 2020), have been introduced.
|
| 49 |
+
|
| 50 |
+
Although defending against strong adversarial attack strategies (Croce & Hein, 2020a;b; Andriushchenko et al., 2020) is challenging, highly robust models have also been developed. Low Temperature Distillation (LTD) (Chen & Lee, 2021) points out the shortcomings of one-hot labels in adversarial training and advocates the use of soft labels as an alternative approach. Better Diffusion Models for Adversarial Training (BDM-AT) (Wang et al., 2023b) explores methods for the more efficient utilization of diffusion models within the context of adversarial training. Improved Kullback-Leibler Adversarial Training (IKL-AT) (Cui et al., 2023) inspects the mechanism of KL divergence loss and proposes the Decoupled Kullback-Leibler divergence loss. However, given the use of large architectures in these models, there is a necessity to enhance adversarial robustness in smaller models.
|
| 51 |
+
|
| 52 |
+
# 2.2 ADVERSARIAL ROBUST DISTILLATION
|
| 53 |
+
|
| 54 |
+
Adversarial distillation (AD) is an effective technique to distill the robustness from large teacher model to small student model (Goldblum et al., 2020; Zhu et al., 2021; Maroto et al., 2022; Zi et al., 2021; Huang et al., 2023; Kuang et al., 2023; Jung et al., 2024; Yin et al., 2024; Dong et al., 2025). Adversarial Robustness Distillation (ARD) (Goldblum et al., 2020) reveals that students can more effectively acquire robustness when guided by a robust teacher within an adversarial training framework. RSLAD (Zi et al., 2021) emphasizes the importance of smooth teacher logits in robust distillation, integrating the teacher's guidance directly into the adversarial image generation process. Introspective Adversarial Distillation (IAD) (Zhu et al., 2021) concentrates on assessing the reliability of the teacher and introduces a confidence score of the information provided by the teacher. AdaAD (Huang et al., 2023) generates more sophisticated adversarial images through the integration of the teacher during the inner maximization process. Previous AD methods utilize the teacher's logits as a guide, but our approach also incorporates the distillation of gradient information.
|
| 55 |
+
|
| 56 |
+
# 2.3 GRADIENT DISTILLATION AND INPUT GRADIENT
|
| 57 |
+
|
| 58 |
+
In knowledge distillation, gradient information has been used in various ways (Czarnecki et al., 2017; Du et al., 2020; Zhu & Wang, 2021; Lan & Tian, 2023; Wang et al., 2022), computed in either input space or weight space. For example, an exploration of the diversity among teacher models in the weight gradient space aids in identifying an optimal direction for training the student network (Du et al., 2020). Another study examines the capacity gap between teachers and students, focusing on the perspective of weight gradients similarity (Zhu & Wang, 2021). Conversely, input space gradients find applications in knowledge distillation for tasks such as classification (Czarnecki et al., 2017), object detection (Lan & Tian, 2023), or language model (Wang et al., 2022). These methods all compute the gradient directly, which is different from our approach.
|
| 59 |
+
|
| 60 |
+
Additionally, input gradients of adversarially trained models contain semantically meaningful information, aligning with human perception, where image modifications for a specific class resemble human-recognized features (Tsipras et al., 2018; Engstrom et al., 2019; Srinivas et al., 2023). This suggests that robust models capture more human-aligned features, underlining the potential of distilling such valuable insights from robust teacher models to enhance student model performance in adversarial settings.
|
| 61 |
+
|
| 62 |
+
# 3 METHOD
|
| 63 |
+
|
| 64 |
+
In this section, we elaborate on how to distill the input gradients from the robust teacher models. In the analysis of Appendix A.4, direct gradient matching is shown to be ineffective. Therefore, we propose a novel approach for gradient matching that avoids direct gradient computation.
|
| 65 |
+
|
| 66 |
+
# 3.1 LOCAL LINEARITY OF ADVERSARIAL TRAINING
|
| 67 |
+
|
| 68 |
+
First, we show that adversarially trained models are capable of first-order Taylor expansion on the input unlike natural training. For small noise $\epsilon$ , the output of $\mathbf{x} + \epsilon$ can be expressed as follows.
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
f (\mathbf {x} + \epsilon) = \underbrace {f (\mathbf {x}) + \left(\frac {\partial f (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \epsilon} _ {\text {f i r s t - o r d e r a p p r o x i m a t i o n}} + \underbrace {O \left(\| \epsilon \| ^ {2}\right)} _ {\text {r e m a i n d e r}}. \tag {2}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
Here, $f$ denotes the model, where we use $f$ for brevity instead of $f_{\theta}$ , and $\epsilon$ is sufficiently small noise with the same dimension as the $\mathbf{x}$ . To explore the influence of the remainder, we calculate the proportion occupied by the remainder in Equation (2) by introducing uniform noise with a magnitude of 8/255 as the perturbation $\epsilon$ . We calculate the remainder proportion as the ratio of the remainder to the total value, i.e., $\frac{\|f(\mathbf{x} + \epsilon) - f(\mathbf{x}) - \left(\frac{\partial f(\mathbf{x})}{\partial\mathbf{x}}\right)^T\epsilon\|}{\|f(\mathbf{x} + \epsilon)\|}$ . We first examine the remainder proportion in an adversarially well-trained model: LTD (Chen & Lee,
|
| 75 |
+
|
| 76 |
+
2021), BDM-AT (Wang et al., 2023b), and IKL-AT (Cui et al., 2023) where we summarized the performance in Table 1. In Figure 2a, the remainder proportions are computed to be very small, with values of 0.012, 0.012, and 0.016 for three adversarially-trained models LTD, BDM-AT, and IKL-AT, respectively. In other words, $f(\mathbf{x} + \epsilon)$ can be approximated to the first-order Taylor expansion since the remainder proportion is negligible. Thus, we utilize this local linearity of the adversarially well-trained models to match input gradients.
|
| 77 |
+
|
| 78 |
+
Next, we investigate whether the model retains the local linearity in adversarial training, not in the case of a fully-trained model. We test three training strategies: natural training, adversarial training via ten steps of PGD (Madry et al., 2017), and adversarial distillation (Goldblum et al., 2020) using the BDM-AT teacher. In Figure 2b, the remainder proportion continuously increases in natural training, while it consistently remains small in both adversarial training and adversarial distillation. Therefore, employing first-order Taylor expansion is feasible during adversarial training. In the following section, we demonstrate how the locally linear property enables the matching of input gradients between the teacher and the student.
|
| 79 |
+
|
| 80 |
+
# 3.2 GRADIENT MATCHING VIA OUTPUT DIFFERENCES
|
| 81 |
+
|
| 82 |
+
For an input $\mathbf{x}$ , we define $\mathbf{x}_{\epsilon_1}$ and $\mathbf{x}_{\epsilon_2}$ as follows:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\mathbf {x} _ {\epsilon_ {1}} = \mathbf {x} + \epsilon_ {1}, \quad \mathbf {x} _ {\epsilon_ {2}} = \mathbf {x} + \epsilon_ {2}, \tag {3}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\epsilon_{1}$ and $\epsilon_{2}$ represent small random perturbations of the same dimension as the input $\mathbf{x}$ . For adversarially trained or training model $f$ , the output of $\mathbf{x}_{\epsilon_1}$ and $\mathbf{x}_{\epsilon_2}$ can be approximated using first-order Taylor expansion through the input space:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
f \left(\mathbf {x} _ {\epsilon_ {1}}\right) \approx f (\mathbf {x}) + \left(\frac {\partial f (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \epsilon_ {1}, f \left(\mathbf {x} _ {\epsilon_ {2}}\right) \approx f (\mathbf {x}) + \left(\frac {\partial f (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \epsilon_ {2}, \tag {4}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where we neglect the remainder term based on the observations in Section 3.1. To extract and align the gradients between the student and the teacher models, we utilize the output differences as follows:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
L = D \left(f _ {S} \left(\mathbf {x} _ {\epsilon_ {1}}\right) - f _ {S} \left(\mathbf {x} _ {\epsilon_ {2}}\right), f _ {T} \left(\mathbf {x} _ {\epsilon_ {1}}\right) - f _ {T} \left(\mathbf {x} _ {\epsilon_ {2}}\right)\right), \tag {5}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $f_{S}$ and $f_{T}$ represent the student and teacher models, while $D$ denotes a discrepancy metric like L2 or KL divergence loss. This loss can be reformulated using Equation (4) as follows:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
L = D \left(\left(\frac {\partial f _ {S} (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \left(\boldsymbol {\epsilon} _ {1} - \boldsymbol {\epsilon} _ {2}\right), \left(\frac {\partial f _ {T} (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \left(\boldsymbol {\epsilon} _ {1} - \boldsymbol {\epsilon} _ {2}\right)\right). \tag {6}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
If we consider $\epsilon_{1} - \epsilon_{2}$ is an arbitrary perturbation vector, varying through the optimization process, minimizing this loss encourages the alignment of the gradients between the student and the teacher models, meaning
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\frac {\partial f _ {S} (\mathbf {x})}{\partial \mathbf {x}} \approx \frac {\partial f _ {T} (\mathbf {x})}{\partial \mathbf {x}}. \tag {7}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
# 3.3 INDIRECT GRADIENT DISTRIBUTION MODULE (IGDM)
|
| 113 |
+
|
| 114 |
+
To effectively integrate the gradient matching through output differences into AD methods, we select the $\epsilon_{1}$ and $\epsilon_{2}$ as constant multiples of the adversary perturbation $\delta$ from the AD methods, i.e., $\epsilon_{1} - \epsilon_{2} \propto \delta$ . Since the adversarial perturbations obtained during the training process continuously change, the gradients can be aligned. Specifically, as the adversarial perturbation $\delta$ employs gradient information, the inner product of gradient and $\epsilon_{1} - \epsilon_{2}$ in Equation (6) can be effectively increased with the adversarial perturbation. In other words, $(\frac{\partial f_S(\mathbf{x})}{\partial\mathbf{x}})^T (\epsilon_1 - \epsilon_2) \propto (\frac{\partial f_S(\mathbf{x})}{\partial\mathbf{x}})^T\delta$ remains large, facilitating the enhanced alignment of gradients using loss function in Equation (6) during training.
|
| 115 |
+
|
| 116 |
+
Finally, Indirect Gradient Distillation Module (IGDM) loss is formulated as:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
L _ {I G D M} = D \left(f _ {S} (\mathbf {x} + \boldsymbol {\delta}) - f _ {S} (\mathbf {x} - \boldsymbol {\delta}), f _ {T} (\mathbf {x} + \boldsymbol {\delta}) - f _ {T} (\mathbf {x} - \boldsymbol {\delta})\right). \tag {8}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Since IGDM complements the loss function by matching the gradients between the teacher and student models, the integration of IGDM with other AD methods becomes feasible in the following manner:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
L _ {\min } = L _ {A D} + \alpha \cdot L _ {I G D M}, \tag {9}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where $\alpha$ is a hyperparameter and $L_{AD}$ stands for the outer minimization loss of other AD methods such as ARD (Goldblum et al., 2020), RSLAD (Zi et al., 2021), AdaAD (Huang et al., 2023), etc.
|
| 129 |
+
|
| 130 |
+
# 4 EXPERIMENTS
|
| 131 |
+
|
| 132 |
+
We explain the experimental setup, followed by comparative performance evaluations of the proposed IGDM method against various AT and AD methods.
|
| 133 |
+
|
| 134 |
+
# 4.1 SETTINGS
|
| 135 |
+
|
| 136 |
+
Teacher and Student Models We selected three teacher models including LTD (Chen & Lee, 2021), BDM-AT (Wang et al., 2023b), and IKL-AT (Cui et al., 2023) for CIFAR-10/100. The LTD model is widely adopted in prior AD research, while the others have achieved high-ranking performance in RobustBench (Croce et al., 2021), demonstrating superior robustness against AutoAttack (Croce & Hein, 2020a). For Tiny-ImageNet, we employed a pre-trained RiFT model (Zhu et al., 2023), and for SVHN, we trained a WideResNet-34-10 (Zagoruyko & Komodakis, 2016) with PGD-AT. For student models, we employed the ResNet-18 (He et al., 2016a) and MobileNetV2 (Sandler et al., 2018) for CIFAR-10/100, ResNet-18 for SVHN, and PreActResNet-18 (He et al., 2016b) for Tiny-ImageNet.
|
| 137 |
+
|
| 138 |
+
Table 1: Performance (%) of the teacher models. Experiments with teacher models in italics are provided in the supplementary material.
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Dataset</td><td>Teacher name</td><td>Architecture</td><td>Clean</td><td>PGD</td><td>AA</td></tr><tr><td rowspan="3">CIFAR-100</td><td>BDM-AT (Wang et al., 2023b)</td><td>WideResNet-28-10</td><td>72.58</td><td>44.24</td><td>38.83</td></tr><tr><td>LTD (Chen & Lee, 2021)</td><td>WideResNet-34-10</td><td>64.07</td><td>36.61</td><td>30.57</td></tr><tr><td>IKL-AT (Cui et al., 2023)</td><td>WideResNet-28-10</td><td>73.80</td><td>44.14</td><td>39.18</td></tr><tr><td rowspan="3">CIFAR-10</td><td>LTD (Chen & Lee, 2021)</td><td>WideResNet-34-10</td><td>85.21</td><td>60.89</td><td>56.94</td></tr><tr><td>BDM-AT (Wang et al., 2023b)</td><td>WideResNet-28-10</td><td>92.44</td><td>70.63</td><td>67.31</td></tr><tr><td>IKL-AT (Cui et al., 2023)</td><td>WideResNet-28-10</td><td>92.16</td><td>71.09</td><td>67.73</td></tr><tr><td>SVHN</td><td>PGD-AT (Madry et al., 2017)</td><td>WideResNet-34-10</td><td>93.90</td><td>61.78</td><td>54.28</td></tr><tr><td>Tiny-ImageNet</td><td>RiFT (Zhu et al., 2023)</td><td>WideResNet-34-10</td><td>52.54</td><td>25.52</td><td>21.78</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 2: Adversarial distillation result on ResNet-18 with two teacher models on CIFAR-100. The Clean, PGD, FGSM, C&W, and AA each indicate performance (\%). Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points.
|
| 143 |
+
|
| 144 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-100 with BDM-AT teacher</td><td colspan="5">CIFAR-100 with LTD teacher</td></tr><tr><td>Clean</td><td>FGSM</td><td>PGD</td><td>C&W</td><td>AA</td><td>Clean</td><td>FGSM</td><td>PGD</td><td>C&W</td><td>AA</td></tr><tr><td>PGD-AT</td><td>55.80</td><td>23.51</td><td>19.88</td><td>20.46</td><td>18.86</td><td>55.80</td><td>23.51</td><td>19.88</td><td>20.46</td><td>18.86</td></tr><tr><td>+IGDM</td><td>60.83</td><td>38.11</td><td>35.09</td><td>30.21</td><td>29.16</td><td>60.49</td><td>37.22</td><td>33.72</td><td>29.61</td><td>28.02</td></tr><tr><td>TRADES</td><td>53.56</td><td>29.85</td><td>25.85</td><td>23.32</td><td>22.02</td><td>53.56</td><td>29.85</td><td>25.85</td><td>23.92</td><td>22.02</td></tr><tr><td>+IGDM</td><td>60.88</td><td>36.26</td><td>32.26</td><td>26.50</td><td>25.50</td><td>59.29</td><td>36.08</td><td>32.08</td><td>26.10</td><td>26.10</td></tr><tr><td>ARD</td><td>61.51</td><td>34.23</td><td>30.23</td><td>26.97</td><td>24.77</td><td>61.34</td><td>35.19</td><td>31.19</td><td>27.74</td><td>25.74</td></tr><tr><td>+IGDM</td><td>61.62</td><td>39.75</td><td>35.75</td><td>30.99</td><td>28.79</td><td>61.58</td><td>37.45</td><td>33.45</td><td>29.94</td><td>27.84</td></tr><tr><td>IAD</td><td>59.92</td><td>35.47</td><td>31.47</td><td>26.91</td><td>25.15</td><td>60.12</td><td>36.91</td><td>32.91</td><td>28.29</td><td>26.29</td></tr><tr><td>+IGDM</td><td>62.99</td><td>37.32</td><td>34.76</td><td>29.55</td><td>27.76</td><td>62.73</td><td>37.69</td><td>33.69</td><td>29.65</td><td>27.49</td></tr><tr><td>AKD</td><td>60.27</td><td>35.38</td><td>31.38</td><td>26.29</td><td>25.09</td><td>60.46</td><td>35.53</td><td>31.53</td><td>27.29</td><td>25.37</td></tr><tr><td>+IGDM</td><td>60.42</td><td>37.63</td><td>33.62</td><td>29.27</td><td>28.86</td><td>60.31</td><td>38.15</td><td>34.15</td><td>29.44</td><td>28.44</td></tr><tr><td>RSLAD</td><td>60.22</td><td>36.16</td><td>32.16</td><td>27.96</td><td>26.76</td><td>60.01</td><td>36.39</td><td>32.39</td><td>28.94</td><td>26.94</td></tr><tr><td>+IGDM</td><td>62.06</td><td>39.67</td><td>35.67</td><td>30.98</td><td>29.78</td><td>60.43</td><td>38.02</td><td>34.02</td><td>29.94</td><td>28.51</td></tr><tr><td>AdaAD</td><td>64.43</td><td>37.33</td><td>33.21</td><td>29.53</td><td>28.06</td><td>63.34</td><td>37.39</td><td>33.39</td><td>29.73</td><td>27.81</td></tr><tr><td>AdaIAD</td><td>64.13</td><td>37.33</td><td>33.33</td><td>29.02</td><td>27.82</td><td>63.24</td><td>37.45</td><td>33.45</td><td>29.04</td><td>27.83</td></tr><tr><td>+IGDM</td><td>64.44</td><td>39.31</td><td>36.19</td><td>31.75</td><td>30.32</td><td>63.44</td><td>38.23</td><td>34.23</td><td>31.09</td><td>28.87</td></tr></table>
|
| 145 |
+
|
| 146 |
+
Table 3: Adversarial distillation result on ResNet-18 on CIFAR-10 and SVHN. The Clean, PGD, FGSM, C&W, and AA each indicate performance (\%). Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points.
|
| 147 |
+
|
| 148 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-10 with LTD teacher</td><td colspan="5">SVHN with PGD-AT teacher</td></tr><tr><td>Clean</td><td>FGSM</td><td>PGD</td><td>C&W</td><td>AA</td><td>Clean</td><td>FGSM</td><td>PGD</td><td>C&W</td><td>AA</td></tr><tr><td>PGD-AT</td><td>84.52</td><td>52.42</td><td>42.80</td><td>42.98</td><td>41.12</td><td>91.62</td><td>65.93</td><td>48.07</td><td>48.34</td><td>42.46</td></tr><tr><td>+IGDM</td><td>84.15</td><td>59.21</td><td>53.70</td><td>51.19</td><td>49.63</td><td>92.57</td><td>72.19</td><td>60.55</td><td>56.10</td><td>52.12</td></tr><tr><td>TRADES</td><td>82.46</td><td>56.97</td><td>49.13</td><td>47.98</td><td>47.09</td><td>89.91</td><td>69.81</td><td>57.52</td><td>51.32</td><td>50.74</td></tr><tr><td>+IGDM</td><td>83.50</td><td>60.84</td><td>54.64</td><td>49.34</td><td>48.83</td><td>91.98</td><td>71.85</td><td>60.09</td><td>56.68</td><td>54.15</td></tr><tr><td>ARD</td><td>85.04</td><td>60.31</td><td>53.27</td><td>50.27</td><td>49.49</td><td>92.32</td><td>70.46</td><td>55.62</td><td>53.07</td><td>48.24</td></tr><tr><td>+IGDM</td><td>85.18</td><td>61.24</td><td>54.75</td><td>51.31</td><td>50.20</td><td>92.19</td><td>72.01</td><td>60.07</td><td>56.56</td><td>52.95</td></tr><tr><td>IAD</td><td>84.33</td><td>61.21</td><td>54.24</td><td>50.97</td><td>50.09</td><td>91.62</td><td>70.82</td><td>56.42</td><td>53.01</td><td>47.76</td></tr><tr><td>+IGDM</td><td>84.49</td><td>62.45</td><td>56.55</td><td>53.01</td><td>51.09</td><td>93.03</td><td>71.85</td><td>58.86</td><td>54.66</td><td>51.45</td></tr><tr><td>AKD</td><td>85.10</td><td>59.07</td><td>51.53</td><td>49.13</td><td>48.04</td><td>92.49</td><td>70.44</td><td>56.49</td><td>53.91</td><td>50.17</td></tr><tr><td>+IGDM</td><td>84.94</td><td>61.36</td><td>54.89</td><td>51.55</td><td>50.87</td><td>92.50</td><td>71.15</td><td>59.38</td><td>55.97</td><td>52.51</td></tr><tr><td>RSLAD</td><td>83.59</td><td>60.97</td><td>55.98</td><td>53.15</td><td>52.13</td><td>90.52</td><td>62.74</td><td>53.80</td><td>50.01</td><td>48.41</td></tr><tr><td>+IGDM</td><td>83.67</td><td>62.41</td><td>57.34</td><td>54.00</td><td>53.10</td><td>90.71</td><td>64.71</td><td>56.14</td><td>53.98</td><td>50.69</td></tr><tr><td>AdaAD</td><td>84.74</td><td>61.87</td><td>56.78</td><td>53.51</td><td>52.79</td><td>93.27</td><td>67.14</td><td>57.43</td><td>54.88</td><td>52.93</td></tr><tr><td>AdaIAD</td><td>84.75</td><td>61.98</td><td>57.04</td><td>53.57</td><td>52.88</td><td>93.39</td><td>67.10</td><td>57.26</td><td>54.76</td><td>52.74</td></tr><tr><td>+IGDM</td><td>84.83</td><td>62.54</td><td>57.61</td><td>55.09</td><td>54.02</td><td>93.48</td><td>68.34</td><td>58.74</td><td>56.03</td><td>53.89</td></tr></table>
|
| 149 |
+
|
| 150 |
+
Evaluation Metrics After training, we evaluate performance using five metrics: Clean, FGSM, PGD, C&W, and AutoAttack (AA) accuracy. Clean refers to the accuracy on the test dataset. We measure FGSM and PGD accuracy against fast gradient sign method (FGSM) (Goodfellow et al., 2014) and 20-step projected gradient descent (PGD) attacks (Madry et al., 2017), respectively. The C&W attack measures accuracy against Carlini & Wagner (2017), while AA evaluates accuracy against the AutoAttack method (Croce & Hein, 2020a). All attacks were conducted within an $l_{\infty}$ -norm bound of 8/255.
|
| 151 |
+
|
| 152 |
+
Implementation We utilized the CIFAR-10/100 (Krizhevsky et al., 2009), SVHN (Netzer et al., 2011), and Tiny-ImageNet (Le & Yang, 2015) datasets for our experiments. Random crop and random horizontal flip were applied, while other augmentations were not utilized. Our training methods encompassed conventional adversarial training methods, PGD-AT (Madry et al., 2017) and TRADES (Zhang et al., 2019), as well as adversarial distillation techniques including ARD (Goldblum et al., 2020), IAD (Zhu et al., 2021), AKD (Maroto et al., 2022), RSLAD (Zi et al., 2021), and AdaAD (Huang et al., 2023). In our comparative analysis, we integrated IGDM into all of these methods, and we used shortened notations to represent the methods with IGDM. For example, when IGDM is combined with ARD, we denote it as $\mathrm{ARD} + \mathrm{IGDM}$ or $\mathrm{IGDM}_{\mathrm{ARD}}$ . We employed the recommended inner loss functions for generating adversarial examples as outlined in each baseline as specified in Appendix B. We fixed the hyperparameters of all given methods used in the experiment as original paper. Then, we adjusted the hyperparameter $\alpha$ of IGDM. For the surrogate loss of IGDM, we employed KL divergence loss, but using alternative surrogate losses, such as L1 and L2 loss, yields nearly indistinguishable results. The detailed experimental setting can be found in Appendix B.
|
| 153 |
+
|
| 154 |
+
# 4.2 RESULTS
|
| 155 |
+
|
| 156 |
+
Main Results We present the comprehensive results of integrating IGDM into other baseline methods and their original versions in Table 2, Table 3. More experimental results are in the appendix: distillation results on MobileNetV2 student (Appendix A.1), distillation with IKL-AT teacher (Appendix A.2), and experiments on the Tiny-ImagNet dataset (Appendix A.3). IGDM significantly improves robustness against various attacks with consistent clean accuracy, regardless of the original methods, datasets, student models, or teacher models. IGDM demonstrates notably enhanced AA robustness on the CIFAR-100 dataset, achieving $30.32\%$ on ResNet-18 with a BDM-AT teacher.
|
| 157 |
+
|
| 158 |
+
Gradient Alignment We justify that IGDM can align the student's input gradient with the teacher's input gradient. To quantify this alignment between the two input gradients, we introduce two metrics: mean Gradient Distance (GD) and mean Gradient Cosine similarity (GC). GD quantifies the average L2 distance between the input gradients of the teacher and student models for all test samples, with smaller values indicating closer alignment. GC measures the cosine similarity between these gradients, where a value closer to one signifies better alignment. In Table 4, IGDM improves gradient alignment with the teacher model, with improved robustness. As shown in Figure 3, the robustness of the student model increases as GD decreases and GC rises, confirming the positive correlation be
|
| 159 |
+
|
| 160 |
+
Table 4: Gradient alignment on CIFAR-100, using the ResNet-18 student model. The numbers in bold indicate enhanced gradient alignment.
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">BDM-AT</td><td colspan="3">LTD</td></tr><tr><td>AA</td><td>GD↓</td><td>GC↑</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>ARD</td><td>24.77</td><td>0.142</td><td>0.439</td><td>25.74</td><td>0.108</td><td>0.592</td></tr><tr><td>+IGDM</td><td>28.79</td><td>0.101</td><td>0.571</td><td>27.84</td><td>0.082</td><td>0.688</td></tr><tr><td>IAD</td><td>25.15</td><td>0.135</td><td>0.443</td><td>26.29</td><td>0.102</td><td>0.596</td></tr><tr><td>+IGDM</td><td>27.76</td><td>0.104</td><td>0.549</td><td>27.49</td><td>0.086</td><td>0.674</td></tr><tr><td>AKD</td><td>25.09</td><td>0.127</td><td>0.438</td><td>25.37</td><td>0.113</td><td>0.584</td></tr><tr><td>+IGDM</td><td>28.86</td><td>0.114</td><td>0.513</td><td>28.44</td><td>0.078</td><td>0.693</td></tr><tr><td>RSLAD</td><td>26.76</td><td>0.118</td><td>0.492</td><td>26.94</td><td>0.089</td><td>0.658</td></tr><tr><td>+IGDM</td><td>29.78</td><td>0.096</td><td>0.582</td><td>28.51</td><td>0.077</td><td>0.709</td></tr><tr><td>AdaAD</td><td>28.06</td><td>0.107</td><td>0.567</td><td>27.81</td><td>0.077</td><td>0.736</td></tr><tr><td>AdaIAD</td><td>27.82</td><td>0.107</td><td>0.568</td><td>27.83</td><td>0.077</td><td>0.733</td></tr><tr><td>+IGDM</td><td>30.32</td><td>0.086</td><td>0.643</td><td>28.87</td><td>0.070</td><td>0.769</td></tr></table>
|
| 163 |
+
|
| 164 |
+
tween gradient alignment and student model performance.
|
| 165 |
+
|
| 166 |
+
Point-wise Alignment Existing adversarial distillation methods have largely overlooked the importance of input gradients, instead focusing on point-wise alignment. For example, RSLAD (Zi et al., 2021) and AdaAD (Huang et al., 2023) explicitly aim to align clean and adversarial outputs with the teacher's clean output. Thus, we reinterpret point-wise alignment in terms of input gradient matching, where IGDM demonstrates superior performance compared to existing AD methods in achieving this alignment. We define point-wise distance $D(\mathbf{x}, \delta) = \| f_T(\mathbf{x} + \delta) - f_S(\mathbf{x} + \delta) \|$ . Then given $\mathbf{x}$ , the upper bound of $D(\mathbf{x}, \delta)$ for sufficiently small $\delta$ is as follows.
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
D (\mathbf {x}, \boldsymbol {\delta}) \leq \| (f _ {T} (\mathbf {x}) - f _ {S} (\mathbf {x}) \| + \left\| \left(\frac {\partial f _ {T} (\mathbf {x})}{\partial \mathbf {x}} - \frac {\partial f _ {S} (\mathbf {x})}{\partial \mathbf {x}}\right) ^ {T} \boldsymbol {\delta} \right\|. \tag {10}
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 3: Correlation between GC and AA (left) and between GD and AA (right). All results were obtained using ResNet-18 and a BDM-AT teacher on CIFAR-100. The values for IGDM and AD methods match those in Table 2, while 'Others' represent results from additional experiments under the same configuration. $\rho$ denotes the correlation coefficient.
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
|
| 177 |
+
Hence, the better the gradient matching, the smaller the upper bound of $D(\mathbf{x}, \delta)$ becomes, aligning the teacher and student in a point-wise manner.
|
| 178 |
+
|
| 179 |
+
To empirically substantiate this assertion, we compared the distances between the teacher and the student models. We calculated $D(f_{S}(\mathbf{x} + \delta), f_{T}(\mathbf{x} + \delta))$ with L2 distance for random noise from the uniform distribution and adversarial perturbation in Table 5. For the adversarial noise, we conducted an adversarial attack using the inner maximization loss corresponding to each method, with a fixed number of steps set to 20. In all cases, we observed an improvement in alignment when using IGDM. In particular, IGDM enhanced alignment against not only adversarial noise but also random noise. This outcome demonstrates that our module contributes to point-wise alignment, improving overall robustness by significantly reducing local invariance during training, as asserted in Huang et al. (2023).
|
| 180 |
+
|
| 181 |
+
Table 5: Point-wise alignment with IGDM on CIFAR-100, using the ResNet-18 student model and two teacher models. The $\delta \sim U$ indicates uniformly selected $\delta$ from $U[-8/255, 8/255]$ . The numbers in bold indicate enhanced point alignment.
|
| 182 |
+
|
| 183 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">BDM-AT Teacher</td><td colspan="2">LTD teacher</td><td colspan="2">IKL-AT teacher</td></tr><tr><td>δ ~ U</td><td>δ = adv</td><td>δ ~ U</td><td>δ = adv</td><td>δ ~ U</td><td>δ = adv</td></tr><tr><td>ARD</td><td>0.2392</td><td>0.2848</td><td>0.1822</td><td>0.2176</td><td>0.4030</td><td>0.4734</td></tr><tr><td>+IGDM</td><td>0.1312</td><td>0.1533</td><td>0.1301</td><td>0.1501</td><td>0.1504</td><td>0.1690</td></tr><tr><td>IAD</td><td>0.2374</td><td>0.2811</td><td>0.1905</td><td>0.2190</td><td>0.3939</td><td>0.4568</td></tr><tr><td>+IGDM</td><td>0.1342</td><td>0.1684</td><td>0.1194</td><td>0.1395</td><td>0.1524</td><td>0.1971</td></tr><tr><td>AKD</td><td>0.3184</td><td>0.3622</td><td>0.2017</td><td>0.2323</td><td>0.4325</td><td>0.4810</td></tr><tr><td>+IGDM</td><td>0.1704</td><td>0.2081</td><td>0.1156</td><td>0.1312</td><td>0.1521</td><td>0.1698</td></tr><tr><td>RSLAD</td><td>0.1903</td><td>0.2375</td><td>0.1686</td><td>0.2019</td><td>0.2227</td><td>0.2856</td></tr><tr><td>+IGDM</td><td>0.1233</td><td>0.1516</td><td>0.1219</td><td>0.1424</td><td>0.1361</td><td>0.1681</td></tr><tr><td>AdaAD</td><td>0.1794</td><td>0.2529</td><td>0.1348</td><td>0.2028</td><td>0.2499</td><td>0.3400</td></tr><tr><td>AdaIAD</td><td>0.1803</td><td>0.2518</td><td>0.1331</td><td>0.2010</td><td>0.2504</td><td>0.3479</td></tr><tr><td>+IGDM</td><td>0.1294</td><td>0.1857</td><td>0.1253</td><td>0.1833</td><td>0.1338</td><td>0.2002</td></tr></table>
|
| 184 |
+
|
| 185 |
+
# 4.3 COMPARISON WITH THE STATE-OF-THE-ART METHOD: ADAAD
|
| 186 |
+
|
| 187 |
+
Simple Inner Maximization with IGDM AdaAD (Huang et al., 2023) employs a teacher model for inner maximization to enhance student model robustness. However, this approach significantly increases computational overhead due to the teacher model's large architecture. In contrast, IGDM achieves competitive robustness without a teacher model in inner maximization, simplifying the overall training process and reducing training time. In Table 6, we compare performance with and without the teacher model for inner maximization. When AdaAD's inner maximization is replaced with a PGD attack on the student model alone, robustness drops significantly. However, $\mathrm{IGDM}_{\mathrm{AdaAD}}$ achieves superior robustness more than the original AdaAD method, with reduced training time by
|
| 188 |
+
|
| 189 |
+
a factor of three. This highlights the efficiency of IGDM, offering both robustness and flexibility by eliminating the need for a teacher model on inner maximization.
|
| 190 |
+
|
| 191 |
+
Table 6: AutoAttack accuracy (%) and computational overhead of AdaAD and IGDM $_{\text{AdaAD}}$ with different inner loss on CIFAR-100 with the ResNet-18 student. 'T/E' and 'Mem' refer to time per epoch (in minutes) and memory usage. The 'w/o $T_{in}$ ' indicates that the inner loss is computed using a PGD attack solely on the student model, without the teacher's involvement.
|
| 192 |
+
|
| 193 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">BDM-AT teacher</td><td colspan="3">LTD teacher</td><td colspan="3">IKL-AT teacher</td></tr><tr><td>AA</td><td>T/E↓</td><td>Mem↓</td><td>AA</td><td>T/E↓</td><td>Mem↓</td><td>AA</td><td>T/E↓</td><td>Mem↓</td></tr><tr><td>AdaAD</td><td>28.06</td><td>10.62</td><td>4711M</td><td>27.81</td><td>12.12</td><td>4900M</td><td>26.89</td><td>10.91</td><td>4711M</td></tr><tr><td>AdaAD w/o Tin</td><td>25.62</td><td>2.26</td><td>2063M</td><td>26.57</td><td>2.42</td><td>2634M</td><td>23.37</td><td>2.27</td><td>2063M</td></tr><tr><td>IGDMAdaAD</td><td>30.32</td><td>11.21</td><td>4711M</td><td>28.87</td><td>13.27</td><td>4900M</td><td>29.22</td><td>11.30</td><td>4711M</td></tr><tr><td>IGDMAdaAD w/o Tin</td><td>29.34</td><td>3.36</td><td>2611M</td><td>28.12</td><td>3.64</td><td>3187M</td><td>28.94</td><td>3.38</td><td>2611M</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Comparison of IGDM and AdaAD under Same Experimental Conditions We replicated AdaAD's experimental setup using the same teacher-student model configuration for a fair comparison. Specifically, we used the CIFAR-100 dataset with the LTD teacher and the CIFAR-10 dataset with the $\mathrm{LTD}_2$ teacher. (In the AdaAD paper, the LTD teacher was trained on WideResNet-34-20 for CIFAR-10, so we refer to it as $\mathrm{LTD}_2$ to reflect this difference.) Both setups were evaluated with a ResNet-18 student, as shown in Table 7. While the AdaAD paper proposed two methods, AdaAD and AdaIAD, and noted a performance gap of about 1 percentage point, our experiments showed a smaller difference. As a result, we focused on applying the module specifically to AdaAD in our implementation. Notably, $\mathrm{IGDM}_{\mathrm{AdaAD}}$ consistently demonstrated a significant improvement in robustness accuracy. This demonstrates that even in a fair comparison, the IGDM module consistently enhances adversarial robustness, underscoring its effectiveness.
|
| 196 |
+
|
| 197 |
+
Table 7: Comparison between AdaAD paper results and our implementation results with identical experimental settings.
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">Result from</td><td colspan="2">CIFAR-100 with LTD</td><td colspan="2">CIFAR-10 with \( \mathrm{LTD}_2 \)</td></tr><tr><td>Huang et al. (2023)</td><td>Ours</td><td>Clean</td><td>AA</td><td>Clean</td><td>AA</td></tr><tr><td>AdaAD</td><td>✓</td><td></td><td>62.19</td><td>26.74</td><td>85.58</td><td>51.37</td></tr><tr><td>AdaIAD</td><td>✓</td><td></td><td>62.49</td><td>27.98</td><td>85.04</td><td>52.96</td></tr><tr><td>AdaAD</td><td></td><td>✓</td><td>63.34</td><td>27.81</td><td>85.47</td><td>52.47</td></tr><tr><td>AdaIAD</td><td></td><td>✓</td><td>63.24</td><td>27.83</td><td>85.34</td><td>52.30</td></tr><tr><td>\( IGDM_{AdaAD} \)</td><td></td><td>✓</td><td>63.44</td><td>28.87</td><td>85.50</td><td>53.45</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Limitations of Hyperparameter Tuning in AdaAD for Gradient Alignment AdaAD utilizes a single hyperparameter, $\lambda$ , to control the balance between the distillation of adversarial and clean inputs, as $\lambda \cdot \mathrm{KL}(f_S(\mathbf{x} + \boldsymbol{\delta}) \| f_T(\mathbf{x} + \boldsymbol{\delta})) + (1 - \lambda) \cdot \mathrm{KL}(f_S(\mathbf{x}) \| f_T(\mathbf{x}))$ . However, in their implementation, $\lambda$ is always set to one. Initially, we hypothesized that adjusting $\lambda$ could facilitate the distillation of both adversarial and clean inputs, potentially aligning the gradients. Yet, as shown in Table 8,
|
| 202 |
+
|
| 203 |
+
modifying $\lambda$ degraded both robustness and gradient matching. This suggests that while pointwise matching is achieved in AdaAD, simply distilling two points is insufficient for capturing the teacher's gradients. In contrast, our approach enables effective gradient alignment and better distillation of the teacher model's robustness.
|
| 204 |
+
|
| 205 |
+
Table 8: Comparison between AdaAD with various hyperparameter.
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Method</td><td>Clean</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>AdaAD(λ = 0.25)</td><td>66.48</td><td>25.51</td><td>0.118</td><td>0.526</td></tr><tr><td>AdaAD(λ = 0.50)</td><td>65.44</td><td>27.24</td><td>0.108</td><td>0.564</td></tr><tr><td>AdaAD(λ = 0.75)</td><td>64.98</td><td>27.42</td><td>0.109</td><td>0.560</td></tr><tr><td>AdaAD(λ = 1.0)</td><td>64.43</td><td>27.82</td><td>0.107</td><td>0.568</td></tr><tr><td>IGDMAdaAD</td><td>64.44</td><td>30.32</td><td>0.086</td><td>0.643</td></tr></table>
|
| 208 |
+
|
| 209 |
+
# 4.4 ABLATION STUDIES
|
| 210 |
+
|
| 211 |
+
In this section, we conduct more extensive experiments, including robustness against unseen attacks and distillation results with various teacher models. Here, we chose the CIFAR-100 dataset with ResNet-18 architecture of student model.
|
| 212 |
+
|
| 213 |
+
Robustness against Unseen Attacks In Table 9, we measured performance against the different attack scenarios in out-of-distribution (OOD) to demonstrate that we effectively distill the robustness of a teacher model. OODRobustBench (Li et al., 2023) is designed to simulate real-world distribution shifts and evaluate adversarial robustness. It focuses on two types of shifts: dataset shifts $(\mathrm{OD}_{d})$ and threat shifts $(\mathrm{OD}_{t})$ , offering a more comprehensive assessment compared to relying solely on AutoAttack accuracy. The term $\mathrm{OD}_{d}$ encompasses natural and corruption shifts, which consist of variant datasets of CIFAR-100 and common corruptions such as noise and blur. Meanwhile, $\mathrm{OD}_{t}$ considers six unforeseen attacks, such as the Recolor (Laidlaw & Feizi, 2019) and StAdv (Xiao et al., 2018), etc. Overall, our module improves the performance of existing adversarial distillation methods against various noise and unseen attacks.
|
| 214 |
+
|
| 215 |
+
Table 9: The CIFAR-100 performance, evaluated with OODRobustBench.
|
| 216 |
+
|
| 217 |
+
<table><tr><td rowspan="2">Method</td><td>Clean Acc (%)</td><td colspan="2">Robust Acc (%)</td></tr><tr><td>OODd</td><td>OODd</td><td>OODt</td></tr><tr><td>ARD</td><td>49.92</td><td>15.70</td><td>14.91</td></tr><tr><td>+ IGDM</td><td>50.65</td><td>16.98</td><td>17.36</td></tr><tr><td>IAD</td><td>48.75</td><td>16.21</td><td>15.03</td></tr><tr><td>+ IGDM</td><td>51.43</td><td>18.20</td><td>17.35</td></tr><tr><td>AKD</td><td>49.74</td><td>15.95</td><td>14.96</td></tr><tr><td>+ IGDM</td><td>49.83</td><td>18.52</td><td>17.07</td></tr><tr><td>RSLAD</td><td>48.96</td><td>17.41</td><td>16.46</td></tr><tr><td>+ IGDM</td><td>50.45</td><td>19.66</td><td>18.53</td></tr><tr><td>AdaAD</td><td>51.53</td><td>17.77</td><td>17.32</td></tr><tr><td>AdaIAD</td><td>51.18</td><td>17.75</td><td>17.26</td></tr><tr><td>+ IGDM</td><td>51.52</td><td>19.66</td><td>18.65</td></tr></table>
|
| 218 |
+
|
| 219 |
+
Adversarial Distillation with Various Teacher Model We conducted adversarial distillation using several teacher models to further validate the effectiveness of our approach. We utilized multiple teacher models that were adversarially trained on the CIFAR-100 dataset. All these models are publicly available in RobustBench (Croce et al., 2021), and we selected them based on varying levels of robustness against AutoAttack (Croce & Hein, 2020a). As shown in the Figure 4, IGDM consistently outperforms other distillation methods across different teacher setups. Notably, even when using less robust teachers, there is a substantial performance gap. In contrast, while AdaAD demonstrates significant improvements with strong teachers com
|
| 220 |
+
|
| 221 |
+
pared to other baselines, it shows minimal differences when employing weaker teachers. This highlights that our approach maintains meaningful performance advantages across all teacher models.
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Figure 4: Performance comparison of different adversarial distillation methods across various teacher models.
|
| 225 |
+
|
| 226 |
+
# 5 CONCLUSION
|
| 227 |
+
|
| 228 |
+
We have proposed a novel method Indirect Gradient Distillation Module (IGDM) for adversarial distillation. In contrast to conventional adversarial distillation methods that primarily focus on distilling the logits of the teacher model, we concentrate on distilling the gradient information of the teacher model. We obtain these gradients indirectly by leveraging the locally linear property, a characteristic of adversarily trained models. Notably, IGDM can be seamlessly applied to existing adversarial distillation methods. Extensive experimental results demonstrate that the student model with IGDM successfully follows the gradients of the teacher model, resulting in significantly enhanced robustness.
|
| 229 |
+
|
| 230 |
+
# REFERENCES
|
| 231 |
+
|
| 232 |
+
Maksym Andriushchenko, Francesco Croce, Nicolas Flammarion, and Matthias Hein. Square attack: a query-efficient black-box adversarial attack via random search. In European conference on computer vision, pp. 484-501. Springer, 2020.
|
| 233 |
+
Tao Bai, Jinqi Luo, Jun Zhao, Bihan Wen, and Qian Wang. Recent advances in adversarial training for adversarial robustness. arXiv preprint arXiv:2102.01356, 2021a.
|
| 234 |
+
Yang Bai, Yuyuan Zeng, Yong Jiang, Shu-Tao Xia, Xingjun Ma, and Yisen Wang. Improving adversarial robustness via channel-wise activation suppressing. arXiv preprint arXiv:2103.08307, 2021b.
|
| 235 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017, IEEE symposium on security and privacy (sp), pp. 39-57. IEEE, 2017.
|
| 236 |
+
Yair Carmon, Aditi Raghunathan, Ludwig Schmidt, John C Duchi, and Percy S Liang. Unlabeled data improves adversarial robustness. Advances in neural information processing systems, 32, 2019.
|
| 237 |
+
Alvin Chan, Yi Tay, and Yew-Soon Ong. What it thinks is important is important: Robustness transfers through input gradients. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 332-341, 2020.
|
| 238 |
+
Erh-Chung Chen and Che-Rung Lee. LTD: low temperature distillation for robust adversarial training. CoRR, abs/2111.02331, 2021. URL https://arxiv.org/abs/2111.02331.
|
| 239 |
+
Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via randomized smoothing. In international conference on machine learning, pp. 1310-1320. PMLR, 2019.
|
| 240 |
+
Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In International conference on machine learning, pp. 2206-2216. PMLR, 2020a.
|
| 241 |
+
Francesco Croce and Matthias Hein. Minimally distorted adversarial examples with a fast adaptive boundary attack. In International Conference on Machine Learning, pp. 2196-2205. PMLR, 2020b.
|
| 242 |
+
Francesco Croce, Maksym Andriushchenko, Vikash Sehwag, Edoardo Debenedetti, Nicolas Flammarion, Mung Chiang, Prateek Mittal, and Matthias Hein. Robustbench: a standardized adversarial robustness benchmark. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2021. URL https://openreview.net/forum?id=SSKZPJCT7B.
|
| 243 |
+
Jiequan Cui, Zhuotao Tian, Zhisheng Zhong, Xiaojuan Qi, Bei Yu, and Hanwang Zhang. Decoupled kullback-leibler divergence loss. arXiv preprint arXiv:2305.13948, 2023.
|
| 244 |
+
Wojciech M Czarnecki, Simon Osindero, Max Jaderberg, Grzegorz Swirszcz, and Razvan Pascanu. Sobolev training for neural networks. Advances in neural information processing systems, 30, 2017.
|
| 245 |
+
Nilaksh Das, Madhuri Shanbhogue, Shang-Tse Chen, Fred Hohman, Li Chen, Michael E Kounavis, and Duen Horng Chau. Keeping the bad guys out: Protecting and vaccinating deep learning withJPEG compression. arXiv preprint arXiv:1705.02900, 2017.
|
| 246 |
+
Junhao Dong, Piotr Koniusz, Junxi Chen, and Yew-Soon Ong. Adversarily robust distillation by reducing the student-teacher variance gap. In European Conference on Computer Vision, pp. 92-111. Springer, 2025.
|
| 247 |
+
Shangchen Du, Shan You, Xiaojie Li, Jianlong Wu, Fei Wang, Chen Qian, and Changshui Zhang. Agree to disagree: Adaptive ensemble knowledge distillation in gradient space. advances in neural information processing systems, 33:12345-12355, 2020.
|
| 248 |
+
|
| 249 |
+
Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Brandon Tran, and Aleksander Madry. Adversarial robustness as a prior for learned representations. arXiv preprint arXiv:1906.00945, 2019.
|
| 250 |
+
Micah Goldblum, Liam Fowl, Soheil Feizi, and Tom Goldstein. Adversarily robust distillation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 3996-4003, 2020.
|
| 251 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
|
| 252 |
+
Sorin Grigorescu, Bogdan Trasnea, Tiberiu Cocias, and Gigel Macesanu. A survey of deep learning techniques for autonomous driving. Journal of Field Robotics, 37(3):362-386, 2020.
|
| 253 |
+
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, pp. 770-778, 2016a.
|
| 254 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV 14, pp. 630-645. Springer, 2016b.
|
| 255 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 256 |
+
Bo Huang, Mingyang Chen, Yi Wang, Junda Lu, Minhao Cheng, and Wei Wang. Boosting accuracy and robustness of student models via adaptive adversarial distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24668-24677, 2023.
|
| 257 |
+
Mingi Ji, Byeongho Heo, and Sungrae Park. Show, attend and distill: Knowledge distillation via attention-based feature matching. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 7945-7952, 2021.
|
| 258 |
+
Gaojie Jin, Xinping Yi, Wei Huang, Sven Schewe, and Xiaowei Huang. Enhancing adversarial training with second-order statistics of weights. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15273-15283, 2022.
|
| 259 |
+
Gaojie Jin, Xinping Yi, Dengyu Wu, Ronghui Mu, and Xiaowei Huang. Randomized adversarial training via taylor expansion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16447-16457, 2023.
|
| 260 |
+
Jaewon Jung, Hongsun Jang, Jaeyong Song, and Jinho Lee. Peeraid: Improving adversarial distillation from a specialized peer tutor. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24482-24491, 2024.
|
| 261 |
+
Jangho Kim, Minsung Hyun, Inseop Chung, and Nojun Kwak. Feature fusion for online mutual knowledge distillation. In 2020 25th International Conference on Pattern Recognition (ICPR), pp. 4619-4625. IEEE, 2021.
|
| 262 |
+
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 263 |
+
Huafeng Kuang, Hong Liu, Yongjian Wu, Shin'ichi Satoh, and Rongrong Ji. Improving adversarial robustness via information bottleneck distillation. Advances in Neural Information Processing Systems, 36:10796-10813, 2023.
|
| 264 |
+
Cassidy Laidlaw and Soheil Feizi. Functional Adversarial Attacks. In Neural Information Processing Systems (NeurIPS), 2019.
|
| 265 |
+
Qizhen Lan and Qing Tian. Gradient-guided knowledge distillation for object detectors. arXiv preprint arXiv:2303.04240, 2023.
|
| 266 |
+
Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N, 7(7):3, 2015.
|
| 267 |
+
Lin Li and Michael Spratling. Data augmentation alone can improve adversarial training. arXiv preprint arXiv:2301.09879, 2023.
|
| 268 |
+
|
| 269 |
+
Lin Li, Yifei Wang, Chawin Sitawarin, and Michael Spratling. Oodrobustbench: benchmarking and analyzing adversarial robustness under distribution shift. arXiv preprint arXiv:2310.12793, 2023.
|
| 270 |
+
Xingjun Ma, Yuhao Niu, Lin Gu, Yisen Wang, Yitian Zhao, James Bailey, and Feng Lu. Understanding adversarial attacks on deep learning based medical image analysis systems. Pattern Recognition, 110:107332, 2021.
|
| 271 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 272 |
+
Javier Maroto, Guillermo Ortiz-Jiménez, and Pascal Frossard. On the benefits of knowledge distillation for adversarial robustness. CoRR, abs/2203.07159, 2022. doi: 10.48550/ARXIV.2203.07159. URL https://doi.org/10.48550/arXiv.2203.07159.
|
| 273 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Baolin Wu, Andrew Y Ng, et al. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 4. Granada, 2011.
|
| 274 |
+
Tianyu Pang, Xiao Yang, Yinpeng Dong, Hang Su, and Jun Zhu. Bag of tricks for adversarial training. arXiv preprint arXiv:2010.00467, 2020.
|
| 275 |
+
Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Krishnamurthy Dvijotham, Alhussein Fawzi, Soham De, Robert Stanforth, and Pushmeet Kohli. Adversarial robustness through local linearization. Advances in Neural Information Processing Systems, 32, 2019.
|
| 276 |
+
Sylvestre-Alvise Rebuffi, Sven Gowal, Dan A Calian, Florian Stimberg, Olivia Wiles, and Timothy Mann. Fixing data augmentation to improve adversarial robustness. arXiv preprint arXiv:2103.01946, 2021.
|
| 277 |
+
Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. *Mobilenetv2: Inverted residuals and linear bottlenecks*. In *Proceedings of the IEEE conference on computer vision and pattern recognition*, pp. 4510-4520, 2018.
|
| 278 |
+
Suraj Srinivas, Sebastian Bordt, and Himabindu Lakkaraju. Which models have perceptually-aligned gradients? an explanation via off-manifold robustness. Advances in neural information processing systems, 36:21172-21195, 2023.
|
| 279 |
+
Jihoon Tack, Sihyun Yu, Jongheon Jeong, Minseon Kim, Sung Ju Hwang, and Jinwoo Shin. Consistency regularization for adversarial robustness. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 8414-8422, 2022.
|
| 280 |
+
Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018.
|
| 281 |
+
Lean Wang, Lei Li, and Xu Sun. Gradient knowledge distillation for pre-trained language models. arXiv preprint arXiv:2211.01071, 2022.
|
| 282 |
+
Ningfei Wang, Yunpeng Luo, Takami Sato, Kaidi Xu, and Qi Alfred Chen. Does physical adversarial example really matter to autonomous driving? towards system-level effect of adversarial object evasion attack. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4412-4423, 2023a.
|
| 283 |
+
Yisen Wang, Difan Zou, Jinfeng Yi, James Bailey, Xingjun Ma, and Quanquan Gu. Improving adversarial robustness requires revisiting misclassified examples. In International Conference on Learning Representations, 2020.
|
| 284 |
+
Zekai Wang, Tianyu Pang, Chao Du, Min Lin, Weiwei Liu, and Shuicheng Yan. Better diffusion models further improve adversarial training. In International Conference on Machine Learning (ICML), 2023b.
|
| 285 |
+
Zeming Wei, Yifei Wang, Yiwen Guo, and Yisen Wang. Cfa: Class-wise calibrated fair adversarial training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8193-8201, 2023.
|
| 286 |
+
|
| 287 |
+
Dongxian Wu, Shu-Tao Xia, and Yisen Wang. Adversarial weight perturbation helps robust generalization. Advances in Neural Information Processing Systems, 33:2958-2969, 2020.
|
| 288 |
+
Chaowei Xiao, Jun-Yan Zhu, Bo Li, Warren He, Mingyan Liu, and Dawn Song. Spatially Transformed Adversarial Examples. In International Conference on Learning Representations (ICLR), 2018.
|
| 289 |
+
Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 501-509, 2019.
|
| 290 |
+
Zhendong Yang, Zhe Li, Xiaohu Jiang, Yuan Gong, Zehuan Yuan, Danpei Zhao, and Chun Yuan. Focal and global knowledge distillation for detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4643-4652, 2022.
|
| 291 |
+
Shenglin Yin, Zhen Xiao, Mingxuan Song, and Jieyi Long. Adversarial distillation based on slack matching and attribution region alignment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24605-24614, 2024.
|
| 292 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In Edwin R. Hancock Richard C. Wilson and William A. P. Smith (eds.), Proceedings of the British Machine Vision Conference (BMVC), pp. 87.1-87.12. BMVA Press, September 2016. ISBN 1-901725-59-6. doi: 10.5244/C.30.87. URL https://dx.doi.org/10.5244/C.30.87.
|
| 293 |
+
Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric Xing, Laurent El Ghaoui, and Michael Jordan. Theoretically principled trade-off between robustness and accuracy. In International conference on machine learning, pp. 7472-7482. PMLR, 2019.
|
| 294 |
+
Qingzhao Zhang, Shengtuo Hu, Jiachen Sun, Qi Alfred Chen, and Z Morley Mao. On adversarial robustness of trajectory prediction for autonomous vehicles. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15159-15168, 2022.
|
| 295 |
+
Jianing Zhu, Jiangchao Yao, Bo Han, Jingfeng Zhang, Tongliang Liu, Gang Niu, Jingren Zhou, Jianliang Xu, and Hongxia Yang. Reliable adversarial distillation with unreliable teachers. arXiv preprint arXiv:2106.04928, 2021.
|
| 296 |
+
Kajie Zhu, Xixu Hu, Jindong Wang, Xing Xie, and Ge Yang. Improving generalization of adversarial training via robust critical fine-tuning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4424-4434, 2023.
|
| 297 |
+
Yichen Zhu and Yi Wang. Student customized knowledge distillation: Bridging the gap between student and teacher. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5057-5066, 2021.
|
| 298 |
+
Bojia Zi, Shihao Zhao, Xingjun Ma, and Yu-Gang Jiang. Revisiting adversarial robustness distillation: Robust soft labels make student better. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 16443-16452, 2021.
|
| 299 |
+
|
| 300 |
+
# A FURTHER EXPERIMENTS
|
| 301 |
+
|
| 302 |
+
We conduct further experiments to corroborate our main contribution. These include distillation results on MobileNetV2 student (Appendix A.1), distillation with IKL-AT teacher (Appendix A.2), and experiments on the Tiny-ImagNet dataset (Appendix A.3). We also analyze the drawbacks of direct gradient matching (Appendix A.4) and the role of logit difference (Appendix A.5). Finally, hyperparameter tuning experiments are detailed in Appendix A.6.
|
| 303 |
+
|
| 304 |
+
# A.1 ADVERSARIAL DISTILLATION ON MOBILENETV2 ARCHITECTURE
|
| 305 |
+
|
| 306 |
+
Table 10: Adversarial distillation results on MobileNetV2 with BDM-AT and LTD teacher models on CIFAR-100. Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points or better gradient matching.
|
| 307 |
+
|
| 308 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-100 with BDM-AT teacher</td><td colspan="5">CIFAR-100 with LTD teacher</td></tr><tr><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT</td><td>59.23</td><td>24.04</td><td>21.58</td><td>0.204</td><td>0.408</td><td>59.23</td><td>24.04</td><td>21.58</td><td>0.194</td><td>0.486</td></tr><tr><td>+IGDM</td><td>59.52</td><td>32.88</td><td>27.28</td><td>0.109</td><td>0.528</td><td>59.70</td><td>32.59</td><td>27.14</td><td>0.091</td><td>0.636</td></tr><tr><td>TRADES</td><td>51.05</td><td>24.83</td><td>20.62</td><td>0.132</td><td>0.377</td><td>51.05</td><td>24.83</td><td>20.62</td><td>0.119</td><td>0.460</td></tr><tr><td>+IGDM</td><td>57.80</td><td>29.47</td><td>22.05</td><td>0.097</td><td>0.469</td><td>56.81</td><td>29.87</td><td>23.38</td><td>0.081</td><td>0.640</td></tr><tr><td>ARD</td><td>60.74</td><td>29.92</td><td>24.33</td><td>0.137</td><td>0.445</td><td>60.55</td><td>30.82</td><td>25.28</td><td>0.111</td><td>0.569</td></tr><tr><td>+IGDM</td><td>60.83</td><td>33.55</td><td>27.50</td><td>0.107</td><td>0.534</td><td>60.44</td><td>33.36</td><td>27.59</td><td>0.082</td><td>0.681</td></tr><tr><td>IAD</td><td>56.35</td><td>28.96</td><td>23.43</td><td>0.129</td><td>0.430</td><td>56.11</td><td>29.55</td><td>24.22</td><td>0.106</td><td>0.547</td></tr><tr><td>+IGDM</td><td>57.65</td><td>31.97</td><td>25.60</td><td>0.106</td><td>0.506</td><td>58.60</td><td>31.36</td><td>25.64</td><td>0.090</td><td>0.617</td></tr><tr><td>AKD</td><td>60.84</td><td>29.37</td><td>24.22</td><td>0.135</td><td>0.428</td><td>60.65</td><td>29.84</td><td>24.85</td><td>0.112</td><td>0.564</td></tr><tr><td>+IGDM</td><td>60.39</td><td>33.62</td><td>28.04</td><td>0.104</td><td>0.538</td><td>59.94</td><td>33.70</td><td>28.12</td><td>0.077</td><td>0.715</td></tr><tr><td>RSLAD</td><td>61.29</td><td>31.74</td><td>26.18</td><td>0.121</td><td>0.490</td><td>60.43</td><td>32.37</td><td>26.85</td><td>0.092</td><td>0.632</td></tr><tr><td>+IGDM</td><td>61.48</td><td>35.22</td><td>29.32</td><td>0.101</td><td>0.560</td><td>60.36</td><td>33.99</td><td>28.00</td><td>0.079</td><td>0.696</td></tr><tr><td>AdaAD</td><td>61.89</td><td>29.54</td><td>23.80</td><td>0.118</td><td>0.497</td><td>61.43</td><td>30.58</td><td>25.03</td><td>0.091</td><td>0.649</td></tr><tr><td>AdaIAD</td><td>60.83</td><td>29.94</td><td>23.83</td><td>0.116</td><td>0.499</td><td>61.22</td><td>30.78</td><td>25.22</td><td>0.088</td><td>0.652</td></tr><tr><td>+IGDM</td><td>61.43</td><td>33.51</td><td>27.43</td><td>0.097</td><td>0.583</td><td>61.57</td><td>33.14</td><td>27.65</td><td>0.076</td><td>0.721</td></tr></table>
|
| 309 |
+
|
| 310 |
+
Table 11: Adversarial distillation results on MobileNetV2 with BDM-AT and LTD teacher models on CIFAR-10. Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points or better gradient matching.
|
| 311 |
+
|
| 312 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-10 with BDM-AT teacher</td><td colspan="5">CIFAR-10 with LTD teacher</td></tr><tr><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT</td><td>83.52</td><td>44.47</td><td>41.19</td><td>0.175</td><td>0.406</td><td>83.52</td><td>44.47</td><td>41.19</td><td>0.171</td><td>0.505</td></tr><tr><td>+IGDM</td><td>82.78</td><td>51.54</td><td>47.13</td><td>0.074</td><td>0.501</td><td>81.73</td><td>52.63</td><td>48.51</td><td>0.048</td><td>0.671</td></tr><tr><td>TRADES</td><td>81.57</td><td>50.49</td><td>46.88</td><td>0.074</td><td>0.492</td><td>81.57</td><td>50.49</td><td>46.88</td><td>0.062</td><td>0.605</td></tr><tr><td>+IGDM</td><td>82.33</td><td>52.94</td><td>47.70</td><td>0.050</td><td>0.502</td><td>81.82</td><td>52.96</td><td>47.47</td><td>0.039</td><td>0.645</td></tr><tr><td>ARD</td><td>84.38</td><td>48.26</td><td>44.02</td><td>0.091</td><td>0.371</td><td>84.18</td><td>52.16</td><td>48.11</td><td>0.054</td><td>0.578</td></tr><tr><td>+IGDM</td><td>84.53</td><td>52.45</td><td>45.06</td><td>0.071</td><td>0.467</td><td>84.25</td><td>54.03</td><td>49.53</td><td>0.042</td><td>0.684</td></tr><tr><td>IAD</td><td>83.79</td><td>48.36</td><td>44.02</td><td>0.088</td><td>0.385</td><td>83.38</td><td>52.71</td><td>48.45</td><td>0.051</td><td>0.592</td></tr><tr><td>+IGDM</td><td>84.27</td><td>52.42</td><td>45.08</td><td>0.063</td><td>0.497</td><td>83.65</td><td>54.57</td><td>50.14</td><td>0.038</td><td>0.704</td></tr><tr><td>AKD</td><td>83.75</td><td>47.15</td><td>43.43</td><td>0.093</td><td>0.368</td><td>84.46</td><td>50.84</td><td>46.96</td><td>0.057</td><td>0.566</td></tr><tr><td>+IGDM</td><td>83.29</td><td>53.29</td><td>48.41</td><td>0.064</td><td>0.527</td><td>83.98</td><td>54.40</td><td>49.99</td><td>0.040</td><td>0.691</td></tr><tr><td>RSLAD</td><td>84.69</td><td>50.94</td><td>47.38</td><td>0.074</td><td>0.491</td><td>82.60</td><td>54.55</td><td>50.44</td><td>0.040</td><td>0.706</td></tr><tr><td>+IGDM</td><td>84.64</td><td>52.33</td><td>49.27</td><td>0.068</td><td>0.515</td><td>82.61</td><td>55.02</td><td>51.01</td><td>0.039</td><td>0.706</td></tr><tr><td>AdaAD</td><td>84.51</td><td>50.67</td><td>46.56</td><td>0.069</td><td>0.516</td><td>84.24</td><td>55.47</td><td>51.36</td><td>0.034</td><td>0.777</td></tr><tr><td>AdaIAD</td><td>85.04</td><td>51.33</td><td>47.62</td><td>0.068</td><td>0.519</td><td>84.14</td><td>55.58</td><td>51.48</td><td>0.034</td><td>0.778</td></tr><tr><td>+IGDM</td><td>84.75</td><td>52.35</td><td>48.34</td><td>0.065</td><td>0.526</td><td>84.27</td><td>56.15</td><td>52.15</td><td>0.033</td><td>0.790</td></tr></table>
|
| 313 |
+
|
| 314 |
+
In Table 10 and Table 11, we present additional experiments on the CIFAR-10 and CIFAR-100 datasets using MobileNetV2 (Sandler et al., 2018) as the student model, with two distinct teacher models: LTD and BDM-AT. Across both datasets, applying IGDM consistently improved robustness under PGD and AutoAttack, compared to the baseline adversarial training methods. Notably, IGDM enhanced the model's performance on both CIFAR-10 and CIFAR-100, particularly in reducing the Gradient Distance (GD) and improving Gradient Cosine similarity (GC). These results underscore the effectiveness of IGDM in improving adversarial robustness and gradient alignment across different datasets and architectures.
|
| 315 |
+
|
| 316 |
+
# A.2 ADVERSARIAL DISTILLATION WITH IKL-AT TEACHER MODEL.
|
| 317 |
+
|
| 318 |
+
Table 12: Adversarial distillation results on ResNet-18 and MobileNetV2 with a IKL-AT teacher model on CIFAR-100. Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points or better gradient matching.
|
| 319 |
+
|
| 320 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-100 with ResNet-18 student</td><td colspan="5">CIFAR-100 with MobileNetV2 student</td></tr><tr><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT</td><td>55.80</td><td>19.88</td><td>18.86</td><td>0.460</td><td>0.306</td><td>59.23</td><td>24.04</td><td>21.58</td><td>0.211</td><td>0.392</td></tr><tr><td>+IGDM</td><td>62.91</td><td>35.25</td><td>28.89</td><td>0.122</td><td>0.534</td><td>59.75</td><td>33.59</td><td>27.02</td><td>0.120</td><td>0.517</td></tr><tr><td>TRADES</td><td>53.56</td><td>25.85</td><td>22.02</td><td>0.199</td><td>0.354</td><td>51.05</td><td>24.83</td><td>20.62</td><td>0.148</td><td>0.351</td></tr><tr><td>+IGDM</td><td>62.41</td><td>31.79</td><td>24.02</td><td>0.116</td><td>0.467</td><td>59.34</td><td>29.36</td><td>22.40</td><td>0.120</td><td>0.444</td></tr><tr><td>ARD</td><td>61.38</td><td>27.59</td><td>23.18</td><td>0.178</td><td>0.400</td><td>61.52</td><td>28.00</td><td>23.40</td><td>0.164</td><td>0.420</td></tr><tr><td>+IGDM</td><td>61.55</td><td>35.24</td><td>28.87</td><td>0.117</td><td>0.546</td><td>61.95</td><td>32.26</td><td>26.48</td><td>0.132</td><td>0.498</td></tr><tr><td>IAD</td><td>61.09</td><td>29.25</td><td>23.61</td><td>0.173</td><td>0.403</td><td>58.39</td><td>28.40</td><td>23.06</td><td>0.147</td><td>0.418</td></tr><tr><td>+IGDM</td><td>64.20</td><td>33.71</td><td>27.03</td><td>0.132</td><td>0.506</td><td>59.58</td><td>30.96</td><td>25.42</td><td>0.128</td><td>0.478</td></tr><tr><td>AKD</td><td>61.90</td><td>29.23</td><td>23.96</td><td>0.171</td><td>0.412</td><td>61.69</td><td>27.87</td><td>23.60</td><td>0.159</td><td>0.431</td></tr><tr><td>+IGDM</td><td>61.94</td><td>33.16</td><td>27.82</td><td>0.131</td><td>0.511</td><td>61.56</td><td>33.62</td><td>27.32</td><td>0.117</td><td>0.519</td></tr><tr><td>RSLAD</td><td>61.18</td><td>30.54</td><td>25.27</td><td>0.147</td><td>0.444</td><td>61.95</td><td>30.16</td><td>25.09</td><td>0.157</td><td>0.441</td></tr><tr><td>+IGDM</td><td>63.55</td><td>35.26</td><td>29.10</td><td>0.119</td><td>0.541</td><td>62.48</td><td>35.25</td><td>28.82</td><td>0.118</td><td>0.547</td></tr><tr><td>AdaAD</td><td>65.36</td><td>32.29</td><td>26.89</td><td>0.133</td><td>0.525</td><td>62.35</td><td>28.51</td><td>23.01</td><td>0.140</td><td>0.470</td></tr><tr><td>AdaIAD</td><td>65.29</td><td>32.47</td><td>26.80</td><td>0.133</td><td>0.527</td><td>62.17</td><td>28.48</td><td>23.39</td><td>0.139</td><td>0.473</td></tr><tr><td>+IGDM</td><td>66.00</td><td>34.47</td><td>29.22</td><td>0.119</td><td>0.582</td><td>62.02</td><td>32.85</td><td>26.11</td><td>0.119</td><td>0.533</td></tr></table>
|
| 321 |
+
|
| 322 |
+
Table 13: Adversarial distillation results on ResNet-18 and MobileNetV2 with a IKL-AT teacher model on CIFAR-10. Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points or better gradient matching.
|
| 323 |
+
|
| 324 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">CIFAR-10 with ResNet-18 student</td><td colspan="5">CIFAR-10 with MobileNetV2 student</td></tr><tr><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT</td><td>84.52</td><td>42.80</td><td>41.12</td><td>0.409</td><td>0.286</td><td>83.52</td><td>44.47</td><td>41.19</td><td>0.175</td><td>0.401</td></tr><tr><td>+IGDM</td><td>83.66</td><td>54.38</td><td>49.85</td><td>0.072</td><td>0.541</td><td>82.11</td><td>51.13</td><td>47.00</td><td>0.063</td><td>0.507</td></tr><tr><td>TRADES</td><td>82.46</td><td>49.13</td><td>47.09</td><td>0.131</td><td>0.425</td><td>81.57</td><td>50.49</td><td>46.88</td><td>0.073</td><td>0.489</td></tr><tr><td>+IGDM</td><td>83.14</td><td>54.91</td><td>48.76</td><td>0.098</td><td>0.455</td><td>81.67</td><td>52.32</td><td>47.40</td><td>0.057</td><td>0.492</td></tr><tr><td>ARD</td><td>85.41</td><td>49.36</td><td>45.32</td><td>0.087</td><td>0.389</td><td>84.68</td><td>48.03</td><td>44.11</td><td>0.087</td><td>0.376</td></tr><tr><td>+IGDM</td><td>85.78</td><td>54.37</td><td>46.52</td><td>0.072</td><td>0.467</td><td>84.72</td><td>50.89</td><td>46.13</td><td>0.070</td><td>0.473</td></tr><tr><td>IAD</td><td>85.22</td><td>49.70</td><td>45.96</td><td>0.083</td><td>0.393</td><td>84.25</td><td>48.58</td><td>44.15</td><td>0.082</td><td>0.390</td></tr><tr><td>+IGDM</td><td>83.78</td><td>54.77</td><td>50.24</td><td>0.061</td><td>0.521</td><td>83.89</td><td>51.46</td><td>46.48</td><td>0.069</td><td>0.458</td></tr><tr><td>AKD</td><td>83.62</td><td>51.81</td><td>46.01</td><td>0.080</td><td>0.395</td><td>84.52</td><td>47.56</td><td>43.27</td><td>0.154</td><td>0.421</td></tr><tr><td>+IGDM</td><td>83.70</td><td>53.69</td><td>49.45</td><td>0.067</td><td>0.539</td><td>84.33</td><td>50.36</td><td>45.37</td><td>0.089</td><td>0.438</td></tr><tr><td>RSLAD</td><td>85.55</td><td>52.13</td><td>48.83</td><td>0.069</td><td>0.531</td><td>84.62</td><td>51.43</td><td>47.69</td><td>0.072</td><td>0.503</td></tr><tr><td>+IGDM</td><td>85.67</td><td>53.30</td><td>49.58</td><td>0.065</td><td>0.541</td><td>84.30</td><td>53.14</td><td>48.91</td><td>0.066</td><td>0.523</td></tr><tr><td>AdaAD</td><td>86.59</td><td>54.25</td><td>50.86</td><td>0.062</td><td>0.570</td><td>85.31</td><td>52.10</td><td>48.03</td><td>0.066</td><td>0.524</td></tr><tr><td>AdaIAD</td><td>86.57</td><td>54.59</td><td>50.61</td><td>0.062</td><td>0.572</td><td>85.47</td><td>52.05</td><td>47.96</td><td>0.066</td><td>0.523</td></tr><tr><td>+IGDM</td><td>86.10</td><td>55.41</td><td>51.29</td><td>0.060</td><td>0.587</td><td>85.11</td><td>53.07</td><td>49.08</td><td>0.061</td><td>0.541</td></tr></table>
|
| 325 |
+
|
| 326 |
+
In Table 12 and Table 13, we conduct additional experiments on the CIFAR-100 and CIFAR-10 datasets with the IKL-AT (Cui et al., 2023) teacher model. Similar to the outcomes observed with the LTD (Chen & Lee, 2021) and BDM-AT (Wang et al., 2023b) teachers on those datasets, IGDM demonstrates substantial enhancements in robustness with the IKL-AT teacher, regardless of the original methods, datasets, or student models, while maintaining consistent clean accuracy. Furthermore, consistent results are observed across all experiments, with a decrease in GD and an increase in GC upon applying IGDM.
|
| 327 |
+
|
| 328 |
+
# A.3 ADVERSARIAL DISTILLATION ON TINY-IMAGENET
|
| 329 |
+
|
| 330 |
+
Table 14: Adversarial distillation result on PreActResNet-18 with a WideResNet-34-10 teacher model on Tiny/ImageNet. Bold indicates cases where IGDM improved accuracy by more than 0.5 percentage points or better gradient matching.
|
| 331 |
+
|
| 332 |
+
<table><tr><td>Method</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT (Madry et al., 2017)</td><td>50.13</td><td>17.10</td><td>14.58</td><td>0.126</td><td>0.490</td></tr><tr><td>+IGDM</td><td>51.46</td><td>25.04</td><td>20.10</td><td>0.071</td><td>0.672</td></tr><tr><td>TRADES (Zhang et al., 2019)</td><td>46.51</td><td>19.51</td><td>14.89</td><td>0.094</td><td>0.447</td></tr><tr><td>+IGDM</td><td>51.31</td><td>24.10</td><td>18.92</td><td>0.073</td><td>0.649</td></tr><tr><td>ARD (Goldblum et al., 2020)</td><td>50.81</td><td>23.37</td><td>19.48</td><td>0.081</td><td>0.613</td></tr><tr><td>+IGDM</td><td>50.86</td><td>25.39</td><td>20.57</td><td>0.069</td><td>0.683</td></tr><tr><td>IAD (Zhu et al., 2021)</td><td>49.89</td><td>23.89</td><td>19.10</td><td>0.079</td><td>0.614</td></tr><tr><td>+IGDM</td><td>50.02</td><td>25.57</td><td>20.69</td><td>0.066</td><td>0.704</td></tr><tr><td>AKD (Maroto et al., 2022)</td><td>51.70</td><td>23.86</td><td>19.69</td><td>0.082</td><td>0.612</td></tr><tr><td>+IGDM</td><td>51.38</td><td>25.25</td><td>20.99</td><td>0.063</td><td>0.720</td></tr><tr><td>RSLAD (Zi et al., 2021)</td><td>47.12</td><td>22.14</td><td>17.65</td><td>0.081</td><td>0.567</td></tr><tr><td>+IGDM</td><td>47.54</td><td>23.95</td><td>18.35</td><td>0.074</td><td>0.620</td></tr><tr><td>AdaAD (Huang et al., 2023)</td><td>51.54</td><td>24.65</td><td>20.60</td><td>0.064</td><td>0.738</td></tr><tr><td>+IGDM</td><td>51.21</td><td>25.73</td><td>21.17</td><td>0.060</td><td>0.764</td></tr></table>
|
| 333 |
+
|
| 334 |
+
The results in Table 14 confirm the effectiveness of IGDM in enhancing adversarial robustness, especially on the challenging Tiny-ImageNet dataset Le & Yang (2015). Consistent with findings on other datasets, IGDM improves robustness metrics such as PGD and AA accuracy, while maintaining comparable clean accuracy. This improvement is particularly significant given the complexity of Tiny-ImageNet, where achieving high robustness is often challenging. Moreover, IGDM facilitates better alignment between teacher and student models, evidenced by a reduction in mean Gradient Distance (GD) and an increase in mean Gradient Cosine similarity (GC), further underscoring the impact of gradient matching of our method.
|
| 335 |
+
|
| 336 |
+
# A.4 DRAWBACKS OF DIRECT GRADIENT MATCHING IN CONTRAST TO IGDM
|
| 337 |
+
|
| 338 |
+
IGDM achieves gradient matching indirectly by leveraging the differences in logits. One might assume that distilling directly calculated gradients could achieve gradient matching more intuitively, as expressed by the following equation:
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
L _ {D i r e c t} = T (\alpha) \cdot D \left(\frac {\partial f _ {S} (\mathbf {x})}{\partial \mathbf {x}}, \frac {\partial f _ {T} (\mathbf {x})}{\partial \mathbf {x}}\right). \tag {11}
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
In Table 15, we conduct experiment on $\mathrm{IGDM}_{\mathrm{ARD}}$ and direct gradient matching (Direct<sub>ARD</sub>). To ensure a fair comparison between the two methods, we kept all other factors the same, varying only the gradient calculation method (logits differences vs. direct calculation). The results reveal that direct gradient distillation fails to meaningfully enhance robustness compared to the original ARD method. Although it shows a slight enhancement in gradient matching, its performance significantly lags behind IGDM.
|
| 345 |
+
|
| 346 |
+
To provide a comprehensive interpretation, we analyze GD and training loss over training time, epoch, and step in Figure 5. The limitations of direct gradient matching are evident due to optimization challenges; a small $\alpha$ fails to match the gradient, while a large $\alpha$ results in poor convergence of
|
| 347 |
+
|
| 348 |
+
Table 15: Adversarial distillation result of ARD variant methods on ResNet-18 with BDM-AT teacher on CIFAR-100. $\text{Direct}_{\text{ARD}}$ represents the direct distillation of gradients, and the $\alpha$ is the hyperparameter of the gradient distillation loss.
|
| 349 |
+
|
| 350 |
+
<table><tr><td>Method</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=1)\)</td><td>60.92</td><td>30.56</td><td>25.23</td><td>0.136</td><td>0.447</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=3)\)</td><td>60.98</td><td>30.29</td><td>24.88</td><td>0.137</td><td>0.444</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=6)\)</td><td>61.13</td><td>30.34</td><td>25.27</td><td>0.135</td><td>0.448</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=10)\)</td><td>61.05</td><td>30.80</td><td>25.33</td><td>0.132</td><td>0.453</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=30)\)</td><td>61.43</td><td>30.45</td><td>25.29</td><td>0.127</td><td>0.455</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=60)\)</td><td>61.14</td><td>30.17</td><td>24.73</td><td>0.124</td><td>0.450</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=100)\)</td><td>60.36</td><td>30.48</td><td>24.62</td><td>0.121</td><td>0.445</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=300)\)</td><td>59.63</td><td>29.72</td><td>23.99</td><td>0.116</td><td>0.440</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=600)\)</td><td>58.79</td><td>29.76</td><td>24.06</td><td>0.111</td><td>0.441</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=1000)\)</td><td>57.08</td><td>29.89</td><td>24.14</td><td>0.108</td><td>0.445</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=3000)\)</td><td>51.30</td><td>29.13</td><td>22.85</td><td>0.104</td><td>0.441</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=6000)\)</td><td>46.95</td><td>27.33</td><td>20.70</td><td>0.105</td><td>0.424</td></tr><tr><td>\(Direct_{\text{ARD}}(\alpha=10000)\)</td><td>43.22</td><td>25.67</td><td>19.18</td><td>0.105</td><td>0.404</td></tr><tr><td>ARD (Goldblum et al., 2020)</td><td>61.51</td><td>30.23</td><td>24.77</td><td>0.142</td><td>0.439</td></tr><tr><td>+IGDM</td><td>61.62</td><td>35.75</td><td>28.79</td><td>0.101</td><td>0.571</td></tr></table>
|
| 351 |
+
|
| 352 |
+
the training loss. More interestingly, even with a large $\alpha$ , direct matching results in GD values higher than those achieved by IGDM. We interpret these optimization issues as arising from the low-level features of the input gradient, similar to the input itself. In other words, directly matching low-level feature gradients is comparable to matching pixel-wise image differences. This leads to the model's inability to effectively capture the training objective, failing to match the gradient and, consequently, diminished robustness. One potential solution to address these optimization challenges is to employ an additional discriminator model, as proposed in (Chan et al., 2020). However, this approach requires training an additional discriminator model, whereas IGDM does not necessitate any other model or training procedure. In summary, IGDM significantly enhances robustness by indirectly matching the gradient using high-level feature logits, thereby achieving superior robustness.
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Figure 5: Comparison between IGDM and direct gradient matching. GD and training loss are measured at the training epoch and step, respectively.
|
| 356 |
+
|
| 357 |
+
# A.5 IMPORTANT ROLE OF LOGIT DIFFERENCE IN IGDM
|
| 358 |
+
|
| 359 |
+
Adversarial training aims to make the network output almost constant within a ball around the input point. Therefore, one might assume that the distilling logit difference of the adversarially trained teacher model in IGDM loss is close to distilling 0. In other words, IGDM can be simplified as expressed by the following equation:
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array}{l} L _ {\mathrm {I G D M} _ {\mathrm {T R A D E S - l i k e}}} = T (\alpha) \cdot D \left(f _ {S} (\mathbf {x} + \boldsymbol {\delta}) - f _ {S} (\mathbf {x} - \boldsymbol {\delta}), \mathbf {0}\right) \\ = T (\alpha) \cdot D \left(f _ {S} (\mathbf {x} + \boldsymbol {\delta}), f _ {S} (\mathbf {x} - \boldsymbol {\delta})\right). \tag {12} \\ \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
We refer to this method as IGDM $_{\text{TRADES-like}}$ because it resembles a TRADES (Zhang et al., 2019) regularization loss ( $\text{TRADES}_{\text{reg}}$ ), and empirically, its performance closely aligns with the addition of the TRADES regularization loss:
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
L _ {\mathrm {T R A D E S} _ {\mathrm {r e g}}} = T (\alpha) \cdot D \left(f _ {S} (\mathbf {x} + \boldsymbol {\delta}) f _ {S} (\mathbf {x})\right). \tag {13}
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
Table 16: Adversarial distillation result of ARD variant methods on ResNet-18 with BDM-AT teacher on CIFAR-100. $\text{TRADES}_{\text{reg}}$ represents the regularization loss of TRADES. and the $\alpha$ is the hyperparameter of the gradient distillation loss.
|
| 372 |
+
|
| 373 |
+
<table><tr><td>Method</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>ARD + TRADESreg(α = 1)</td><td>57.86</td><td>31.44</td><td>25.95</td><td>0.125</td><td>0.459</td></tr><tr><td>ARD + TRADESreg(α = 5)</td><td>58.07</td><td>32.13</td><td>26.06</td><td>0.117</td><td>0.466</td></tr><tr><td>ARD + TRADESreg(α = 10)</td><td>53.58</td><td>32.01</td><td>26.27</td><td>0.116</td><td>0.463</td></tr><tr><td>ARD + TRADESreg(α = 15)</td><td>52.05</td><td>31.53</td><td>26.23</td><td>0.115</td><td>0.464</td></tr><tr><td>ARD + TRADESreg(α = 20)</td><td>50.87</td><td>31.92</td><td>26.30</td><td>0.115</td><td>0.462</td></tr><tr><td>ARD + TRADESreg(α = 25)</td><td>50.28</td><td>31.92</td><td>26.15</td><td>0.115</td><td>0.458</td></tr><tr><td>ARD + TRADESreg(α = 30)</td><td>49.20</td><td>31.93</td><td>25.87</td><td>0.115</td><td>0.456</td></tr><tr><td>ARD + IGDMTRADES-like(α = 1)</td><td>57.73</td><td>31.72</td><td>25.64</td><td>0.119</td><td>0.461</td></tr><tr><td>ARD + IGDMTRADES-like(α = 5)</td><td>54.18</td><td>31.71</td><td>25.79</td><td>0.117</td><td>0.466</td></tr><tr><td>ARD + IGDMTRADES-like(α = 10)</td><td>52.21</td><td>32.08</td><td>25.98</td><td>0.118</td><td>0.464</td></tr><tr><td>ARD + IGDMTRADES-like(α = 15)</td><td>50.50</td><td>31.85</td><td>25.91</td><td>0.118</td><td>0.457</td></tr><tr><td>ARD + IGDMTRADES-like(α = 20)</td><td>49.67</td><td>31.76</td><td>25.78</td><td>0.118</td><td>0.452</td></tr><tr><td>ARD + IGDMTRADES-like(α = 25)</td><td>48.21</td><td>31.33</td><td>25.38</td><td>0.119</td><td>0.445</td></tr><tr><td>ARD + IGDMTRADES-like(α = 30)</td><td>47.61</td><td>31.04</td><td>25.05</td><td>0.119</td><td>0.439</td></tr><tr><td>ARD (Goldblum et al., 2020)</td><td>61.51</td><td>30.23</td><td>24.77</td><td>0.142</td><td>0.439</td></tr><tr><td>+IGDM</td><td>61.62</td><td>35.75</td><td>28.79</td><td>0.101</td><td>0.571</td></tr></table>
|
| 374 |
+
|
| 375 |
+
In Table 16, we conduct experiments on these two methods in conjunction with the ARD (Goldblum et al., 2020) method. For $\mathrm{TRADES}_{\mathrm{reg}}$ , as the regularization term strengthens, the robustness slightly increases; however, it lags far behind IGDM in terms of robustness. $\mathrm{IGDM}_{\mathrm{TRADES - like}}$ follows a similar trend to the $\mathrm{TRADES}_{\mathrm{reg}}$ method with the increase in hyperparameter. These results indicate that the logit difference of the teacher model provides valuable information for teaching the student model to achieve robustness through gradient matching, resulting in superior robustness. This finding corroborates our main contribution in the main paper.
|
| 376 |
+
|
| 377 |
+
# A.6 ANALYSIS ON HYPERPARAMETER SENSITIVITY OF IGDM
|
| 378 |
+
|
| 379 |
+
The proposed IGDM loss is defined as follows:
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
L _ {I G D M} = T (\alpha) \cdot D \left(f _ {S} (\mathbf {x} + \boldsymbol {\delta}) - f _ {S} (\mathbf {x} - \boldsymbol {\delta}), f _ {T} (\mathbf {x} + \boldsymbol {\delta}) - f _ {T} (\mathbf {x} - \boldsymbol {\delta})\right).
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
In Table 17 and Table 18, we analyze the sensitivity of hyperparameters $\alpha$ using IGDMPGD-AT and IGDMARD. In these tables, a value of 0 for $\alpha$ represents the original methods, PGD-AT and ARD, respectively. As $\alpha$ increases, gradient matching becomes more prominent, leading to enhanced robustness for both methods. However, excessively large values of $\alpha$ do not provide additional enhancements and may even reduce robustness. Based on the insights from the hyperparameter sensitivity analysis, we employed grid search to adapt the IGDM module for all experiments.
|
| 386 |
+
|
| 387 |
+
Table 17: Analysis of hyperparameter of IGDM using PGD-AT variant methods on ResNet-18 with BDM-AT teacher on CIFAR-100. $\alpha$ is the hyperparameter of IGDM loss. The gray row indicates the reported values.
|
| 388 |
+
|
| 389 |
+
<table><tr><td>Method</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>PGD-AT (Madry et al., 2017)</td><td>55.80</td><td>19.88</td><td>18.86</td><td>0.452</td><td>0.389</td></tr><tr><td>IGDMPGD-AT(α = 20)</td><td>56.95</td><td>28.10</td><td>24.02</td><td>0.157</td><td>0.427</td></tr><tr><td>IGDMPGD-AT(α = 40)</td><td>58.23</td><td>30.36</td><td>25.71</td><td>0.139</td><td>0.457</td></tr><tr><td>IGDMPGD-AT(α = 60)</td><td>58.74</td><td>31.69</td><td>26.57</td><td>0.131</td><td>0.483</td></tr><tr><td>IGDMPGD-AT(α = 80)</td><td>59.01</td><td>32.02</td><td>27.08</td><td>0.123</td><td>0.504</td></tr><tr><td>IGDMPGD-AT(α = 100)</td><td>59.20</td><td>33.09</td><td>27.48</td><td>0.118</td><td>0.519</td></tr><tr><td>IGDMPGD-AT(α = 120)</td><td>59.42</td><td>33.60</td><td>27.95</td><td>0.114</td><td>0.531</td></tr><tr><td>IGDMPGD-AT(α = 140)</td><td>59.32</td><td>34.18</td><td>28.26</td><td>0.111</td><td>0.542</td></tr><tr><td>IGDMPGD-AT(α = 160)</td><td>60.06</td><td>34.38</td><td>28.47</td><td>0.108</td><td>0.550</td></tr><tr><td>IGDMPGD-AT(α = 180)</td><td>60.53</td><td>34.47</td><td>28.51</td><td>0.105</td><td>0.556</td></tr><tr><td>IGDMPGD-AT(α = 200)</td><td>60.83</td><td>34.90</td><td>28.84</td><td>0.104</td><td>0.562</td></tr><tr><td>IGDMPGD-AT(α = 220)</td><td>60.68</td><td>35.09</td><td>29.16</td><td>0.102</td><td>0.569</td></tr><tr><td>IGDMPGD-AT(α = 240)</td><td>59.65</td><td>35.34</td><td>29.10</td><td>0.101</td><td>0.572</td></tr><tr><td>IGDMPGD-AT(α = 260)</td><td>59.71</td><td>35.37</td><td>29.09</td><td>0.100</td><td>0.573</td></tr><tr><td>IGDMPGD-AT(α = 280)</td><td>59.83</td><td>35.23</td><td>28.84</td><td>0.099</td><td>0.576</td></tr><tr><td>IGDMPGD-AT(α = 300)</td><td>59.95</td><td>35.39</td><td>29.13</td><td>0.098</td><td>0.579</td></tr></table>
|
| 390 |
+
|
| 391 |
+
Table 18: Analysis of hyperparameter of IGDM using ARD variant methods on ResNet-18 with BDM-AT teacher on CIFAR-100. $\alpha$ is the hyperparameter of IGDM loss. The gray row indicates the reported values.
|
| 392 |
+
|
| 393 |
+
<table><tr><td>Method</td><td>Clean</td><td>PGD</td><td>AA</td><td>GD↓</td><td>GC↑</td></tr><tr><td>ARD (Goldblum et al., 2020)</td><td>61.51</td><td>30.23</td><td>24.77</td><td>0.1422</td><td>0.439</td></tr><tr><td>IGDMARD(α = 20)</td><td>59.74</td><td>33.97</td><td>27.85</td><td>0.112</td><td>0.523</td></tr><tr><td>IGDMARD(α = 40)</td><td>60.13</td><td>34.21</td><td>28.56</td><td>0.106</td><td>0.546</td></tr><tr><td>IGDMARD(α = 60)</td><td>61.08</td><td>34.54</td><td>28.42</td><td>0.104</td><td>0.557</td></tr><tr><td>IGDMARD(α = 80)</td><td>60.78</td><td>35.21</td><td>28.73</td><td>0.102</td><td>0.568</td></tr><tr><td>IGDMARD(α = 100)</td><td>61.18</td><td>35.75</td><td>28.79</td><td>0.101</td><td>0.571</td></tr><tr><td>IGDMARD(α = 120)</td><td>61.15</td><td>35.17</td><td>28.67</td><td>0.099</td><td>0.578</td></tr><tr><td>IGDMARD(α = 140)</td><td>61.24</td><td>35.32</td><td>28.75</td><td>0.098</td><td>0.583</td></tr><tr><td>IGDMARD(α = 160)</td><td>60.76</td><td>35.81</td><td>28.71</td><td>0.096</td><td>0.584</td></tr><tr><td>IGDMARD(α = 180)</td><td>60.19</td><td>35.67</td><td>28.78</td><td>0.095</td><td>0.585</td></tr><tr><td>IGDMARD(α = 200)</td><td>59.95</td><td>35.19</td><td>28.67</td><td>0.095</td><td>0.585</td></tr><tr><td>IGDMARD(α = 220)</td><td>59.42</td><td>35.24</td><td>28.76</td><td>0.096</td><td>0.588</td></tr><tr><td>IGDMARD(α = 240)</td><td>59.76</td><td>34.78</td><td>28.74</td><td>0.095</td><td>0.587</td></tr><tr><td>IGDMARD(α = 260)</td><td>59.04</td><td>35.01</td><td>28.36</td><td>0.095</td><td>0.586</td></tr><tr><td>IGDMARD(α = 280)</td><td>59.56</td><td>35.21</td><td>28.59</td><td>0.095</td><td>0.589</td></tr><tr><td>IGDMARD(α = 300)</td><td>58.91</td><td>34.78</td><td>28.58</td><td>0.095</td><td>0.582</td></tr></table>
|
| 394 |
+
|
| 395 |
+
# B TRAINING DETAILS
|
| 396 |
+
|
| 397 |
+
# B.1 SETTINGS
|
| 398 |
+
|
| 399 |
+
We utilized the CIFAR-10, CIFAR-100 (Krizhevsky et al., 2009), SVHN Netzer et al. (2011), and Tiny-ImageNet (Le & Yang, 2015) datasets with random crop and random horizontal flips, excluding other augmentations. We trained all AT, AD, and IGDM incorporated methods using an SGD momentum optimizer with the same initial learning rate of 0.1, momentum of 0.9, and weight decay of 5e-4.
|
| 400 |
+
|
| 401 |
+
For CIFAR-10 and CIFAR-100, we adhered to the training settings of other adversarial distillation methods, training for 200 epochs, except for RSLAD and IGDM $_{\text{RSLAD}}$ , which were trained for 300 epochs. RSLAD suggested that increasing the number of training epochs could enhance model
|
| 402 |
+
|
| 403 |
+
robustness; thus, we followed their recommendation to train for 300 epochs. The learning rate scheduler reduced the learning rate by a factor of 10 at the 100th and 150th epochs. However, for RSLAD and IGDM $_{\text{RSLAD}}$ , the learning rate decreased by 10 at the 215th, 260th, and 285th epochs, as suggested in the original paper. For SVHN, we trained for 50 epochs with the learning rate decayed by a factor of 10 at the 40th and 45th epochs for all methods. For Tiny-ImageNet, we trained for 100 epochs with the learning rate decayed by a factor of 10 at the 50th and 80th epochs for all methods.
|
| 404 |
+
|
| 405 |
+
The adversarial perturbation settings were as follows: the number of iterations for inner maximization was set to 10, with a step size of $2/255$ , and a total perturbation bound of $L_{\infty} = 8/255$ . Specifically, we employed the recommended inner loss functions as outlined in the original paper: PGD attack on student model for PGD-AT, ARD, and IAD; TRADES attack on student model for TRADES; RSLAD inner loss for RSLAD; and AdaAD inner loss for AdaAD. Moreover, the IGDM-incorporated method followed the inner maximization method of the original AT or AD method. For formulaic representation as follows,
|
| 406 |
+
|
| 407 |
+
$$
|
| 408 |
+
\text {P G D} \delta = \underset {\| \delta^ {\prime} \| _ {p} \leq \epsilon} {\arg \max } \operatorname {C E} \left(f _ {S} \left(\mathbf {x} + \delta^ {\prime}\right), y\right), \tag {14}
|
| 409 |
+
$$
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\text {T R A D E S} \delta = \underset {\| \delta^ {\prime} \| _ {p} \leq \epsilon} {\arg \max } \mathrm {K L} \left(f _ {S} (\mathbf {x} + \delta^ {\prime}), f _ {S} (\mathbf {x})\right), \tag {15}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\text {R S L A D} \quad \delta = \underset {\| \delta^ {\prime} \| _ {p} \leq \epsilon} {\arg \max } \mathrm {K L} \left(f _ {S} \left(\mathbf {x} + \delta^ {\prime}\right), f _ {T} (\mathbf {x})\right), \tag {16}
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
$$
|
| 420 |
+
\text {A d a A D} \quad \delta = \underset {\| \delta^ {\prime} \| _ {p} \leq \epsilon} {\arg \max } \mathrm {K L} \left(f _ {S} \left(\mathbf {x} + \boldsymbol {\delta} ^ {\prime}\right), f _ {T} \left(\mathbf {x} + \boldsymbol {\delta} ^ {\prime}\right)\right). \tag {17}
|
| 421 |
+
$$
|
| 422 |
+
|
| 423 |
+
Here, CE represents cross-entropy loss, KL represents KL-divergence loss.
|
| 424 |
+
|
| 425 |
+
# B.2 HYPERPARAMETER
|
| 426 |
+
|
| 427 |
+
The parameters of AT, AD, and the AD component in IGDM-incorporated methods were strictly set to the value suggested in the original paper. On the other hand, a parameter of IGDM varied depending on the original AT or AD method, dataset, teacher model, and student model. We experimentally employed an increasing hyperparameter function, defined as $T(\alpha) = \frac{\text{Current Epoch}}{\text{Total Epochs}} \cdot \alpha$ , and the $\alpha$ value varied in each training scenario. The following paragraphs provide detailed information on the $\alpha$ in each experimental setting, determined through grid search results. IGDM<sub>AdaAD</sub> and IGDM<sub>AdaIAD</sub> have same value of hyperparameter in all cases.
|
| 428 |
+
|
| 429 |
+
# B.2.1 RESNET-18 MODEL TRAINED ON CIFAR-100 DATASET
|
| 430 |
+
|
| 431 |
+
For $\mathrm{IGDM}_{\mathrm{PGD - AT}}$ to 100 for LTD and IKL-AT, 220 for BDM-AT. For $\mathrm{IGDM}_{\mathrm{TRADES}}$ , 5 for all teachers. For $\mathrm{IGDM}_{\mathrm{ARD}}$ , 50 for LTD and 100 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{IAD}}$ , 20 for LTD and 50 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{AKD}}$ , 50 for LTD, 25 for BDM-AT, and 40 for IKL-AT. For $\mathrm{IGDM}_{\mathrm{RSLAD}}$ , 3 for LTD and 10 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{AdaAD}}$ , 15 for LTD, 70 for BDM-AT, and 50 for IKL-AT.
|
| 432 |
+
|
| 433 |
+
# B.2.2 RESNET-18 MODEL TRAINED ON THE CIFAR-10 DATASET
|
| 434 |
+
|
| 435 |
+
For $\mathrm{IGDM}_{\mathrm{PGD - AT}}$ 60 for LTD and 70 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{TRADES}}$ 20 for all teachers. For $\mathrm{IGDM}_{\mathrm{ARD}}$ 5 for LTD and 10 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{IAD}}$ 50 for LTD and 30 for BDM-AT and IKL-AT. For $\mathrm{IGDM}_{\mathrm{AKD}}$ 7 for LTD, 10 for BDM-AT, and 15 for IKL-AT. For $\mathrm{IGDM}_{\mathrm{RSLAD}}$ 0.9 for LTD and BDM-AT, and 1 for IKL-AT. For $\mathrm{IGDM}_{\mathrm{AdaAD}}$ 5 for LTD and IKL-AT, and 10 for BDM-AT.
|
| 436 |
+
|
| 437 |
+
# B.2.3 MOBILENETV2 MODEL TRAINED ON CIFAR-100 DATASET
|
| 438 |
+
|
| 439 |
+
For IGDMPGD-AT, 150 for LTD, 160 for BDM-AT, and IKL-AT. For IGDMTRADES, 10 for LTD and BDM-AT, and 3 for IKL-AT. For IGDMARD, 70 for all teachers. For IGDMIAD, 20 for LTD and 50 for BDM-AT and IKL-AT. For IGDMKD, 30 for all teachers. For IGDMRSLAD, 3 for LTD, 4 for BDM-AT, and 10 for IKL-AT. For IGDMAdaAD, 20 for LTD, 50 for BDM-AT, and 40 for IKL-AT.
|
| 440 |
+
|
| 441 |
+
# B.2.4 MOBILENETV2 MODEL TRAINED ON CIFAR-10 DATASET
|
| 442 |
+
|
| 443 |
+
For IGDMPGD-AT, 70 for LTD, 40 for BDM-AT, and 50 for IKL-AT. For IGDMTRADES, 1 for LTD, 0.5 for BDM-AT, and 0.2 for IKL-AT. For IGDMARD, 10 for LTD, 8 for BDM-AT, and 9 for IKL-AT. For IGDMIAD, 50 for all teachers. For IGDMAKD, 15 for all teachers. For IGDMRSLAD, 0.5 for LTD and 0.7 for BDM-AT and IKL-AT. For IGDMAdaAD, 10 for all teachers.
|
| 444 |
+
|
| 445 |
+
# B.2.5 RESNET-18 MODEL TRAINED ON THE SVHN DATASET
|
| 446 |
+
|
| 447 |
+
We set 60 for IGDMPGD-AT, 30 for IGDMTRADES, 50 for IGDMARD, 40 for IGDMIAD, 10 for IGDMAKD, 3 for IGDMRSLAD, and 9 for IGDMAdaAD.
|
| 448 |
+
|
| 449 |
+
# B.2.6 PREACTRESNET-18 MODEL TRAINED ON TINY-IMAGENET DATASET
|
| 450 |
+
|
| 451 |
+
We set 30 for IGDMPGD-AT, 20 for IGDMTRADES, 10 for IGDMARD, 20 for IGDMIAD, 10 for IGDMAKD, 1 for IGDMRSLAD, and 10 for IGDMAdaAD.
|
| 452 |
+
|
| 453 |
+
# C MAIN ALGORITHM
|
| 454 |
+
|
| 455 |
+
Algorithm 1 Main Algorithm
|
| 456 |
+
Input: Robust teacher model $f_{T}$ inner loss $(L_{max})$ and outer loss $(L_{AD})$ of base AT or AD method, and batched training dataset $\{(x,y)\}$ with $n$ batch size.
|
| 457 |
+
Output: Robust stduent model $f_{S}$
|
| 458 |
+
Randomly initialize $\theta$ , the weights of $f_{S}$
|
| 459 |
+
repeat
|
| 460 |
+
$\delta = \arg \max_{\| \delta^{\prime}\|_{\infty}\leq \epsilon}(L_{max}(\mathbf{x} + \boldsymbol {\delta}^{\prime},y))$ $L_{IGDM}(\mathbf{x},\pmb {\delta}) = T(\alpha)\cdot D(f_S(\mathbf{x} + \pmb {\delta}) - f_S(\mathbf{x} - \pmb {\delta}),f_T(\mathbf{x} + \pmb {\delta}) - f_T(\mathbf{x} - \pmb {\delta}))$ $L_{min}(\mathbf{x},y) = L_{AD}(\mathbf{x},y) + L_{IGDM}(\mathbf{x},\pmb {\delta})$ $\theta \gets -\eta \frac{1}{n}\sum_{i = 1}^{n}\nabla_{\theta}L_{min}(\mathbf{x}_i,y_i)$
|
| 461 |
+
until training converged
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2de8895de74c79173dd68951205d9f443e5c365ddf2ab7d8794c8ede3eef1bd5
|
| 3 |
+
size 2066101
|
ICLR/2025/Indirect Gradient Matching for Adversarial Robust Distillation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b08defce421ae826491fc41b64c706cc0de0380ba38870b4abbe742d4520fadb
|
| 3 |
+
size 591712
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c19a202e3ace6e6a909633aff84b750e103503166f5b9133a4efff61973ec9b1
|
| 3 |
+
size 102077
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ecdc5c754f18a76ebc2b7b8a82ab98f33a73a1871ed108527e67b2d84a07e73
|
| 3 |
+
size 123865
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/f9b5acdc-406f-4ca5-9a9a-472d93c84042_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:881b92a48bb7272e4c90c2b8604629727af57ba30288c4adc177a08b283a04da
|
| 3 |
+
size 779988
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/full.md
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFERENCE OPTIMAL VLMS NEED FEWER VISUAL TAXENS AND MORE PARAMETERS
|
| 2 |
+
|
| 3 |
+
Kevin Y. Li*1 Sachin Goyal*1 João D. Semedo2 J. Zico Kolter
|
| 4 |
+
|
| 5 |
+
$^{1}$ Carnegie Mellon University, $^{2}$ Bosch Center for Artificial Intelligence
|
| 6 |
+
|
| 7 |
+
{kyl2, sachingo, zkolter}@cs.cmu.edu joao.semedo@us.bosch.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Vision Language Models (VLMs) have demonstrated strong capabilities across various visual understanding and reasoning tasks, driven by incorporating image representations into the token inputs of Large Language Models (LLMs). However, their real-world deployment is often constrained by high latency during inference due to the substantial compute required by the LLM to process the large number of input tokens, predominantly arising from the image. To reduce inference costs, one can either downsize the LLM or reduce the number of input tokens needed to represent the image, the latter of which has been the focus of many recent efforts around token compression. However, it is unclear what the optimal trade-off is given a fixed inference budget. We first characterize this optimal tradeoff between the number of visual tokens and LLM parameters by establishing scaling laws that capture variations in performance with these two factors. Our results reveal a surprising trend: for visual reasoning tasks, the inference-optimal behavior in VLMs is achieved by using the largest LLM that fits within the inference budget while minimizing visual token count — often to a single token. While the token reduction literature has mainly focused on maintaining base model performance by modestly reducing the token count (e.g., $5 - 10 \times$ ), our results indicate that the compute-optimal inference regime requires operating under even higher token compression ratios. Based on these insights, we take the first steps toward designing token compression algorithms tailored for high-compression settings, utilizing prompt-based compression of tokens. Our work underscores the performance and efficiency benefits of operating in low visual token regimes and the importance of developing tailored token reduction algorithms for such conditions.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Recent advancements in Large Language Models (LLMs) have enabled Vision Language Models (VLMs) to perceive, reason, and respond through both text and image inputs (Liu et al., 2023; Alayrac et al., 2022; Dai et al., 2023). Many VLMs are built on top of pretrained vision encoders, such as CLIP, and pass the patch-based tokens from the visual encoder into the pretrained LLM backbone at a one-to-one ratio for visual context. This results in the LLM processing hundreds of tokens per image, overshadowing those from the user prompt and accounting for most of inference time compute. Consequently, deploying VLMs in real-world applications, particularly on consumer-sided edge devices, e.g., monitoring systems, driving assistants, etc., is often limited by the significant inference cost and resulting latency.
|
| 16 |
+
|
| 17 |
+
To reduce the inference cost of VLMs, many recent works have focused on decreasing, via merging or pruning, the number of visual tokens passed to the LLM without significant performance degradation (Li et al., 2024c; Shang et al., 2024). Alternatively, inference FLOPs, proportional to the number of parameters and number of tokens processed, can be reduced by using a smaller LLM. Since both the LLM size and number of visual input tokens directly affect the VLM's performance, it becomes unclear what the optimal trade-off between the two is. For example, a 4B LLM processing all visual input tokens results in similar inference costs to a 8B LLM processing half the number of original visual tokens — currently, the ideal choice is unknown.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Inference optimal scaling laws for VLMs. The number of visual tokens $(V)$ passed to the LLM (after token compression, § 2.2), along with the LLM parameter count $(N)$ , directly determine the inference cost of VLMs $(\mathcal{O}(N(Q + V)))$ , where $Q$ is the text input tokens. Since the downstream performance of VLMs is directly affected by both these factors, it makes it unclear what the optimal trade-off is for a fixed inference compute. In this work, we try to answer this question with our scaling laws. Left: We plot the fitted scaling curves, assuming cached text input tokens $(Q = 0)$ . We observe a surprising trend: for visual reasoning tasks, the compute optimal behavior (dotted black curve) requires using a single visual token with the largest possible language model that can fit under the inference budget. Right: Inference optimal behavior under $Q = 50$ requires slightly higher number of visual tokens as the LLM already incurs a fixed cost due to the text tokens.
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
This observation raises an important question: given a fixed inference budget, what is the optimal trade-off between LLM size and the number of visual tokens processed for downstream performance? In this work, we answer this question by building the first inference-time compute-optimal scaling laws for VLMs, modeling performance as a function of both key factors affecting inference cost: LLM size and the number of visual tokens processed. Our scaling laws reveal a striking observation: for visual reasoning tasks, the compute-optimal inference regime entails using the largest feasible LLM with a very small number of visual input tokens — usually less than $3\%$ the original number of visual tokens. However, for certain use cases that require detailed image analysis, like Optical Character Recognition (OCR) or document understanding tasks, the optimal approach is quite the opposite, requiring as many visual tokens as possible, as token compression proves ineffective for capturing the dense and diverse information present in such tasks.
|
| 25 |
+
|
| 26 |
+
Most existing work on token compression has focused on reducing visual tokens by a modest factor (e.g., from 576 to 144 tokens or 64 tokens). In contrast, our results underscore the critical importance of pursuing much higher compression rates (e.g., reducing tokens to 1 or 4) for visual reasoning tasks where such compression is not only feasible, but also compute-optimal. Our work identifies the compute-optimal inference regime for VLMs, emphasizing the importance of high token compression for visual reasoning tasks. We hope these findings will serve as a motivation and foundation for shifting token reduction techniques towards more effective and higher compression ratios.
|
| 27 |
+
|
| 28 |
+
We first introduce some preliminaries around inference costs and visual token compression for VLMs in Section 2. In Section 3, we formulate and analyze our inference-compute scaling laws, including its generalization across compression techniques and trends across different tasks. Section 4 covers the related work, and we conclude with Section 5.
|
| 29 |
+
|
| 30 |
+
# 2 PRELIMINARIES
|
| 31 |
+
|
| 32 |
+
# 2.1 ESTIMATING INFERENCE COST FOR VLMS
|
| 33 |
+
|
| 34 |
+
The language model in VLMs processes the visual input tokens along with the user text query tokens. As language models become larger, the FLOPs (Floating Point Operations) required to process each input token scales accordingly. We follow the standard practice for estimating the inference time
|
| 35 |
+
|
| 36 |
+
FLOPs as (Kaplan et al., 2020; Sardana et al., 2024; Snell et al., 2024):
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
F L O P s _ {\inf } = \mathcal {O} (N \times T), \tag {1}
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $N$ denotes the parameter count of LLM and $T$ denotes the total inference time tokens. We ignore the inference cost stemming from the visual encoder, as we use the same vision encoder with the same input image resolution across all experiments. In addition, many current open-source VLMs currently utilize the same CLIP-L vision encoder (Radford et al., 2021).
|
| 43 |
+
|
| 44 |
+
We highlight that the inference cost of VLMs scales proportionally with both the parameters and the number of input tokens processed by the LLM.
|
| 45 |
+
|
| 46 |
+
In the context of VLMs, the total inference tokens, $T$ , can be further decomposed as $T = Q + V + G$ where $Q$ represents the text input tokens, i.e., the question/prompt, $V$ represents the number of visual tokens from the vision encoder (after token compression), and $G$ accounts for the generated tokens. In many real world applications, such as driving assistance systems, the text input remains constant (e.g., "Alert the driver if the scene ahead has a hazard"). In these scenarios, the text input can be cached, effectively making $Q = 0$ by bypassing self-attention projections and feed-forward calculations. However, in other interactive applications, $Q$ may vary based on dynamic input. We will study the behavior of the downstream error with $FLOPs_{\mathrm{inf}}$ under both the $Q = 0$ and varying $Q$ regimes. In our work, we ignore the $G$ term due to our analyzed tasks' short form responses; however, the analysis with varying $Q$ transfers to $Q + G$ as well.
|
| 47 |
+
|
| 48 |
+
# 2.2 FIELD COMPRESSION IN VLMS
|
| 49 |
+
|
| 50 |
+
As discussed in the previous section, inference FLOPs for VLMs increase proportionally with the number of visual input tokens (e.g., 576 with CLIP-ViT-L visual encoder). Often, the number of visual tokens dominates the total tokens processed by the language model, especially in applications where the text input can be cached or is on the shorter side. Thus, there has been a growing interest in developing approaches to compress the visual information into a fewer number of tokens.
|
| 51 |
+
|
| 52 |
+
More formally, let the visual encoder be defined as a function $f(\mathbf{I}) = \mathbf{X}$ , where $\mathbf{X} \in \mathbb{R}^{n \times d}$ represents a sequence of $n$ vision embedding tokens produced by the encoder from the input image $\mathbf{I}$ . Token compression then learns a vision projector $g_{\theta}(\mathbf{X}) = \mathbf{Y}$ that maps these embeddings $\mathbf{X}$ to $\mathbf{Y} \in \mathbb{R}^{m \times d}$ , a compressed sequence of $m < n$ tokens to be processed by the language model ( $n = m$ for standard VLMs without any token compression). We refer the reader to Section 4.1 for a detailed discussion on some of the recent token compression algorithms.
|
| 53 |
+
|
| 54 |
+
Note that token compression doesn't refer to using a smaller visual encoder or using smaller image resolutions as inputs to the encoder. These approaches usually either do not decrease the visual token count much (beyond around 224) or lead to a large drops in performance (Li et al., 2024a).
|
| 55 |
+
|
| 56 |
+
# 3 TOKENS VS PARAMETERS: INFERENCE TIME SCALING LAWS FOR VLMS
|
| 57 |
+
|
| 58 |
+
The deployment of vision language models in real-world applications comes with significant challenges, particularly surrounding inference latency and frames per second (FPS). For instance, in real-time systems, such as automotive driver assistance or hazard monitoring, maintaining high FPS and quick response times is crucial for safe and effective deployment. Consequently, reducing inference FLOPs while minimizing downstream performance degradation is of critical, practical importance, especially on consumer-grade edge devices, which are often severely compute constrained.
|
| 59 |
+
|
| 60 |
+
This has led to a growing interest in visual token compression for VLMs (§ 2.2). Alternatively, one could also use a smaller LLM to reduce inference cost. However, both of the above factors directly influence the downstream performance (§ 2.1). This raises a key question: Given a fixed inference compute budget for VLMs, what is the optimal trade-off between the language model size and the number of visual tokens processed? In our work, we answer this question by developing scaling laws for VLMs that account for the varying parameter count of the language model component and the number of visual input tokens processed by the language model. As mentioned in Section 2.1, we assume the inference cost from the visual encoder to be fixed and ignore it from here on out.
|
| 61 |
+
|
| 62 |
+
# 3.1 TOKENS VS PARAMETERS: SCALING LAW FORMULATION
|
| 63 |
+
|
| 64 |
+
Recall that the performance of a VLM is primarily governed by the parameter count of the language model and the number of visual tokens processed by the LLM, assuming a fixed visual encoder. Accordingly, we model the scaling behavior of VLM performance as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
Y (N, T) = \frac {A}{N ^ {\alpha}} * \frac {B}{T ^ {\beta}} + D, \tag {2}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $N$ denotes the LLM parameters, $T$ denotes the total inference tokens, $\{A,B,D,\alpha ,\beta \}$ are learnable parameters, and $Y(N,T)$ is a measure of model quality. Although traditional scaling laws have been studied in the context of training loss Kaplan et al. (2020), practitioners often use the direct downstream performance to assess model quality (Gadre et al., 2024; Goyal et al., 2024b; Liu et al., 2022). We use average performance error on a suite of nine commonly used visual reasoning benchmarks ( $\S$ 3.2) as a measure of model quality $Y(N,T)$ .
|
| 71 |
+
|
| 72 |
+
Below, we summarize the role of each of these learnable parameter in the scaling law (Eq. 2).
|
| 73 |
+
|
| 74 |
+
LLM Quality Parameter $(\alpha)$ : This parameter dictates how the downstream error changes with the complexity of the LLM, i.e., its parameter count. A higher $\alpha$ indicates a better language model, such as Llama3-7B outperforming Llama2-7B, often due to superior pretraining.
|
| 75 |
+
|
| 76 |
+
Visual Token Quality Parameter $(\beta)$ : $\beta$ captures the quality of the visual input tokens fed into the LLM, reflecting the quality of the compression technique. A better token compression algorithm would yield a higher $\beta$ , allowing for more reductions of $T$ visual tokens than less effective methods while maintaining the same downstream performance.
|
| 77 |
+
|
| 78 |
+
Constants $A, B, D$ : $A$ and $B$ are normalizing constants and $D$ refers to irreducible loss, which cannot be reduced even with the largest $N$ -sized language model or all $T$ visual tokens (capped at 576 for our choice of vision encoder).
|
| 79 |
+
|
| 80 |
+
# 3.2 EXPERIMENTAL SETUP
|
| 81 |
+
|
| 82 |
+
VLM Training and Evaluation: We use the LLaVA-Next framework (Liu et al., 2024b) to train VLMs with the Qwen-1.5 family of language models as the backbone. Specifically, we utilize the $\{0.5, 1.8, 4, 7, 14\}$ B-chat models (Bai et al., 2023). The pretraining and finetuning dataset and hyperparameters follow Liu et al. (2024a), except we doubled the effective batch size for finetuning.
|
| 83 |
+
|
| 84 |
+
To estimate the downstream error $Y(N, C)$ , we test our trained VLMs on a suite of nine commonly used benchmarks for evaluating visual reasoning: MME (Fu et al., 2024), GQA (Hudson & Manning, 2019), AI2D (Kembhavi et al., 2016), MMBench (Liu et al., 2024c), MMMU (Yue et al., 2023), ScienceQA (Lu et al., 2022), MathVista (Lu et al., 2024), POPE (Li et al., 2023c), and ChartQA (Masry et al., 2022). We average the normalized evaluation metric errors to compute $P(N, C)$ . For MME, the Cognition and Perception scores were added and normalized, while the F1 score was used for POPE (Liu et al., 2024a). As previously mentioned in Section 2.1, this set of datasets was selected due to their similar prompt and generation length and overall comprehensiveness.
|
| 85 |
+
|
| 86 |
+
Visual Token Compression: CLIP ViT-L/14 (Radford et al., 2021) is used as the vision encoder for all experiments, and we compress the original 576 tokens to $\{144, 64, 36, 16, 4, 1\}$ using one of our variants of TokenPacker (Li et al., 2024c) which replaces interpolation with a convolution for downsampling (no adding query embedding, refer to App. B for more details).
|
| 87 |
+
|
| 88 |
+
Fitting Scaling Laws: We fit the proposed scaling law (Eq. 2) on $\{Y(N,T),N,T\}$ pairs, with $N\in \{0.5,1.8,4,7\} B$ and $T\in \{1,4,16,36,64,144,576\}$ . We use grid-search, for its stability (Goyal et al., 2024b), to estimate the scaling parameters $\alpha ,\beta ,A,B$ and $D$ . The final scaling law is evaluated on a $N = 14B$ VLM model at various $T$ visual tokens. Further details about the grid-search fit can be found in Appendix A.2.
|
| 89 |
+
|
| 90 |
+
# 3.3 RESULTS: ESTIMATED SCALING CURVES
|
| 91 |
+
|
| 92 |
+
Figure 1 presents the fitted scaling curves, illustrating the variation in average downstream error as a function of inference FLOPs. The scatter sizes represent the number of visual input tokens
|
| 93 |
+
|
| 94 |
+
processed by the language model, while the color scale indicates the varying number of language model parameters. We make some key observations below.
|
| 95 |
+
|
| 96 |
+
Log-Linear Relation between Error and Number of Visual Input Tokens: Consider the change in performance for the 7B model as the number of visual input tokens varies (maroon curve in Figure 1.) Recent works on visual token compression (Li et al., 2024c; Shang et al., 2024) claim little to no performance degradation with token compression. For example, they report similar performance to the base model's 576 tokens even when visual token count is reduced to 36 or 144 on certain tasks. However, our scaling curves in Figure 1 reveal a different trend, showing a log-linear decrease in visual reasoning performance as the number of visual input tokens is reduced. We believe this discrepancy arises because of the limited downstream benchmarks evaluated in previous works which may not fully capture the VLM's overall capabilities.
|
| 97 |
+
|
| 98 |
+
Error Varies $5 \times$ Faster with LLM Parameters than with Tokens: Recall from the scaling law (Eq. 2) that $\alpha$ represents the LLM quality parameter and $\beta$ represents the visual token quality parameter, both denoting the rate at which they influence the downstream error respectively. From Figure 1, we observe that for our selection of language model family (Qwen-1.5) and token compression algorithm, $\alpha = 0.077$ is more than five times larger than $\beta = 0.015$ , signifying that VLM error increases significantly faster when reducing the LLM parameters compared to reducing the number of visual tokens. Therefore, when minimizing inference FLOPs, it is more effective to prioritize reducing visual tokens $(V)$ first as the impact on performance is less pronounced than reducing the LLM parameters $(N)$ .
|
| 99 |
+
|
| 100 |
+
Scaling Laws Hold for Increases in LLM Scale: We evaluate the accuracy of our scaling laws (fitted on VLMs of 0.5B-7B range) for predicting the performance for larger models. We estimate the performance of Qwen-1.5 14B using our fitted scaling laws. Our scaling laws estimate the performance with an error margin of less than $2\%$ , as visualized in Figure 2 and Figure 6b. The log-linear relationship between the error and number of visual tokens persists, and the greater influence of the LLM's size compared to visual tokens on performance continues to hold. Thus, for VLMs using 7B language model backbones, it is still optimal to increase LLM size to 14B while reducing visual token count for fixed inference costs.
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 2: Our scaling laws (fitted on 0.5-7B VLMs), estimate the performance of 14B VLM with an error margin of less than $2\%$ .
|
| 104 |
+
|
| 105 |
+
# 3.3.1 COMPUTE-OPTIMAL VISUAL REASONING INFERENCE FAVORS MORE LLM PARAMETERS
|
| 106 |
+
|
| 107 |
+
Observe the pareto optimal curve (black dotted curve) in Figure 1. Our results reveal a striking insight: under a fixed inference budget, visual reasoning tasks heavily favor increasing LLM parameter count. At any given inference FLOPs (denoted by any potential vertical line in Figure 1), the compute-optimal strategy is to allocate FLOPs towards a larger LLM by reducing the number of visual tokens (even to one if the prompt can be pre-computed and cached, $Q = 0$ ).
|
| 108 |
+
|
| 109 |
+
A similar trend holds in the $Q = 50$ regime, where the optimal number of visual tokens is around 16, a $97\%$ reduction from the original number of tokens. This can be intuitively explained by the fact that since the language model is already dedicating a fixed amount of compute to process text input tokens, the initial increase in the number of visual tokens represents only a minor amount of the fraction of compute already being spent. Thus, the optimal tokens increases to 16, compared to just 1 in the cached regime.
|
| 110 |
+
|
| 111 |
+
In Figure 4, we compare VLMs with varying combinations of LLM size and visual token counts under a fixed inference budget. We observe that for many visual reasoning tasks, increasing the size of
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
(a) Performance trend changes based on LLM sizes when varying number of input text token $Q$
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
(b) Scaling law for VLM token compression and LLM model size on OCR-like tasks.
|
| 118 |
+
Figure 3: Performance trends when shifting input text token count and benchmark family. Left: For visual reasoning tasks, as the number of text tokens increases, the impact of increasing the number of visual tokens $V$ , i.e., reducing compression, becomes more apparent. Intuitively, at a large enough amount of text tokens, initial increases in visual tokens are only a minor fraction of the overall compute. Right: When the family of tasks shifts from visual reasoning to OCR/text-understanding, the trends shift: visual token count should be the prioritized instead of LLM size.
|
| 119 |
+
|
| 120 |
+
the language model while reducing visual tokens can lead to significant relative gains. This may be in part due to the scaling properties of the LLMs themselves, leading to models with stronger world views that can better extrapolate with less visual information than their smaller counterparts (Radford et al., 2021; Wei et al., 2022). We note that this trade-off, while effective for visual reasoning, does not extend to certain tasks, e.g., document comprehension, text identification, etc., where a limited number of tokens may fail to capture the high density of information. We discuss this further in Section 3.4.
|
| 121 |
+
|
| 122 |
+
Scaling Inference Compute by Simply Repeating Tokens: Many recent works around scaling test-time compute by introducing special tokens (Goyal et al., 2024a) or multiple parallel generations (Zelikman et al., 2024) have shown promising gains in reasoning tasks for language models. We test this notion with VLMs by repeating the visual input tokens (compressed to 4) multiple times. However, we do not observe any performance gains. This is most likely due to the downstream tasks for VLMs being not as reasoning-intensive, thus highlighting the importance of developing better token compression algorithms and potentially introducing more challenging benchmarks.
|
| 123 |
+
|
| 124 |
+
# 3.3.2 VARIATION IN OPTIMAL TAXENS WITH TEXT QUERY LENGTH
|
| 125 |
+
|
| 126 |
+
In the previous section, we observed that when the text input can be cached ( $Q = 0$ ), compute optimal inference requires the use of a single visual token paired with the largest possible LLM that fits under the inference budget. This scenario covers many practical applications, such as monitoring systems or scenarios where text input remains static. However, in interactive systems where the text input can be dynamic and long, i.e., high $Q$ , the situation changes.
|
| 127 |
+
|
| 128 |
+
In Figure 3a, we plot the average downstream error against FLOPs across different lengths of text input tokens $(Q)$ , with the color of the lines representing the variations in $Q$ . When comparing the performance of the 7B model (solid curves) with the 4B model (dashed curves) at a high $Q$ (indicated by the green curves for each model), we observe that there is a sharp increase in error as inference FLOPs are reduced for the 7B model, particularly when visual tokens are reduced significantly. At a certain point (marked by the red dot in Fig. 3a), it becomes more advantageous to use the 4B model with a higher number of visual tokens rather than the 7B model with fewer tokens.
|
| 129 |
+
|
| 130 |
+
This phenomenon can be understood intuitively: as the LLM processes longer text sequences, the computational cost incurred by text tokens is already considerable. Consequently, increasing the number of visual tokens has a comparatively smaller impact on the overall inference FLOPs. There-
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 4: Performances of various LLM size and visual token count combinations with similar inference compute on two families of tasks. For many visual reasoning tasks, increasing the LLM size by decreasing the number of visual tokens improves performance. However, for text recognition tasks, decreasing the number of visual tokens is detrimental to performance.
|
| 134 |
+
|
| 135 |
+
fore, for higher text token lengths $(Q)$ , increasing the number of visual tokens leads to better performance without significantly increasing the computational burden. Thus, the optimal number of visual input tokens rises with an increase in $Q$ . This case demonstrates the need for careful balancing of visual token count and LLM size, especially in scenarios where text inputs are long, to achieve compute-optimal performance without sacrificing accuracy.
|
| 136 |
+
|
| 137 |
+
# 3.4 SCALING LAWS FOR OCR TASKS
|
| 138 |
+
|
| 139 |
+
Until now, we have focused on scaling behavior for visual reasoning tasks, highlighting the key finding that using a single visual token with the maximum possible LLM parameters is the inference-optimal configuration. However, is the same valid for all tasks? VLMs have recently been applied to document reading and OCR-style tasks where a single visual token may be insufficient due to the high density of information. Unlike visual reasoning tasks, these tasks lack visual structure in the image and intuitively need more tokens to record the (generally textual) details in the image. We verify the same by fitting our scaling laws (Eq. 2) on DocVQA (Mathew et al., 2021) and TextVQA (Singh et al., 2019) benchmarks, where the tasks require mainly OCR capabilities.
|
| 140 |
+
|
| 141 |
+
Figure 3b presents the fitted scaling law for OCR tasks. Notably, there are no significant gains in average downstream performance from increasing LLM parameters; instead, the number of visual tokens predominantly dictates the performance. This observation is reflected in the scaling law parameters, where the LLM-quality parameter $\alpha = 0.029$ is nearly twice as smaller than the token quality parameter $\beta = 0.048$ . This trend is in stark contrast to the scaling parameters observed for visual reasoning tasks where the LLM-quality parameter $(\alpha)$ was more than five times larger than the token parameter (§3.3). This notion of visual tokens playing the significant role in text-in-image recognition and understanding is further echoed in Figure 4, which shows token compression weakens VLM performance despite increasing the capabilities of the LLM component to compensate.
|
| 142 |
+
|
| 143 |
+
We find that our scaling laws generalize with other visual token compression algorithms. We share additional scaling law results on LLaVA-PruMerge (Shang et al., 2024) in Appendix 3.5.
|
| 144 |
+
|
| 145 |
+
# 3.5 GENERALIZING SCALING LAWS TO OTHERTOKEN COMPRESSION ALGORITHMS
|
| 146 |
+
|
| 147 |
+
We find that the takeways for our proposed scaling laws generalize across visual token compression algorithms. We fit scaling laws with VLMs utilizing LLaVa-PruMerge (Shang et al., 2024), one of the first visual token compression projectors, on $N \in \{0.5,1.8,4\} B$ , and $T \in \{36,64,144,192,228,576\}$ following Section 3.2. Unlike many current projectors (Cai et al., 2024; Hu et al., 2024; Li et al., 2024c), LLaVA-Prumerge suffers massive performance drops in extreme token compression regimes, resulting from its training-free methodology. Therefore, we do not consider these conditions in its scaling laws.
|
| 148 |
+
|
| 149 |
+
When using the same $A, B, D$ values fit in Section 3.3, we find comparable $\alpha = 0.069$ , $\beta = 0.008$ compared to before ( $\alpha = 0.077$ , $\beta = 0.015$ , § 3.3). Similar values for $\alpha$ show that our scaling law is capable of capturing the quality of the LLM across VLM architectures and the decrease in $\beta$ shows that the PruMerge compression algorithm "weaker" than TokenPacker, which was also empirically shown in our Table 1. Fitting the scaling laws from scratch results in $\alpha = 0.077$ , $\beta = 0.041$ where performance error only varies around $2\times$ faster with LLM parameters than with tokens. Thus, even across different VLM architectures, compute-optimal inference for visual reasoning and understanding tasks continues to strongly favor the LLM parameter count, as shown in Figure 5.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 5: Inference optimal scaling laws for PruMerge: When replacing the token compression algorithm, the main findings still hold: inference-optimal behavior is still to increase the LLM parameter count by reducing visual tokens in fixed compute scenarios.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
|
| 156 |
+
# 3.6 ENHANCING EXTREMETOKEN COMPRESSION ALGORITHMS WITH USER QUERY
|
| 157 |
+
|
| 158 |
+
For visual reasoning tasks, our scaling laws empirically show that only very few tokens are required for visual reasoning tasks. This need for extreme compression — down to 1, 4, or 16 tokens — to operate compute-optimally represents a paradigm shift compared to existing compression work which focus on moderate compression (e.g., reduction by $75\%$ ). We find that utilizing the user's query prompt during the token compression process can be critical for retaining relevant information and minimizing performance reductions when tokens are reduced to as few as 1 or 4.
|
| 159 |
+
|
| 160 |
+
We build over existing token compression algorithms (Li et al., 2024c), to incorporate query-based token compression. A full summary of the updated algorithm can be found in Appendix B. Following the training regime of LLaVA-1.5 (Liu et al., 2024a), we use the pretrained Vicuna 7B model as the LLM component (Zheng et al., 2023). Based on the importance of high token compression underscored by our scaling laws ( $\S$ 3.3), we focus on visual token budgets of $\{1, 4, 16, 36, 64\}$ , resulting in compression rates of $88.9\%$ to $99.8\%$ . We benchmark our method on a diverse, comprehensive set of datasets consisting of visual reasoning and OCR/text-understanding tasks: GQA (Hudson & Manning, 2019), MMBench (MMB) (Liu et al., 2024c), MME (Fu et al., 2024), POPE (Li et al., 2023c), ScienceQA (SQA) (Lu et al., 2022), TextVQA (Singh et al., 2019) VizWiz (Gurari et al., 2018), and VQAv2 (Goyal et al., 2017).
|
| 161 |
+
|
| 162 |
+
We find that incorporating the user's query allows the model to perform better than the baseline and alternative compression algorithms on multiple different datasets. At the one-token level, our variant improves upon the existing algorithm on all benchmarks and can mitigate the original TokenPacker's performance gap compared to vanilla LLaVA-1.5 by $34\%$ on VizWiz and $\sim 12\%$ on both POPE and MMBench. The trend continues at the four-token level. Table 1 displays the full results.
|
| 163 |
+
|
| 164 |
+
# 4 RELATED WORK
|
| 165 |
+
|
| 166 |
+
# 4.1TOKEN REDUCTION IN VISION-LANGUAGE MODELS (VLMS)
|
| 167 |
+
|
| 168 |
+
VLMs are composed of three key components: (a) a visual encoder that encodes the input images, (b) a language model (LM) that processes the visual tokens from the encoder along with the user
|
| 169 |
+
|
| 170 |
+
text query, and (c) a projector that maps the visual tokens to the input embedding space of the LM. Section A.1 contains additional details exploring various projector designs. Often, the number of visual tokens (576 tokens per image for CLIP-ViT-L, for instance) significantly exceeds the number of text tokens, leading to high inference costs. This disproportionate scaling of visual tokens also hinders multi-frame integration due to the limited context length of the model. Inference cost is a critical factor in many real world applications of computer vision systems. Thus, reducing the number of visual tokens processed by the language model has become an active area of research.
|
| 171 |
+
|
| 172 |
+
LLaVA-PruMerge (Shang et al., 2024) and Yu et al. (2024) propose training-free methods that filter out visual tokens (from CLIP) that have a low similarity with the CLS token. TokenPacker (Li et al., 2024c), on the other hand, learns a compact token compression module using cross-attention over visual tokens, allowing for reduced number of tokens while preserving salient information. While the above approaches focus on token reduction without directly changing the visual encoder (CLIP) output, recent works based on Matryoshka Representation (Cai et al., 2024; Hu et al., 2024) modify the CLIP output directly to generate nested CLIP embeddings for a flexible token count. Zhang et al. (2024) investigate methods that emphasize task-relevant pixels during image processing.
|
| 173 |
+
|
| 174 |
+
Another approach to reducing inference cost is adaptive token processing, where the compute dedicated to certain tokens at inference is varied Jain et al. (2024). Many methods prune visual tokens within the LLM due to their lower attention scores compared to the prompt, system, etc., tokens (Chen et al., 2024; Wan et al., 2024), a heuristic commonly found in regular text-only LLM KV cache reduction techniques (Zhang et al., 2023; Oren et al., 2024). Finally, while we focus our paper on image-based VLMs, a host of works (Xu et al., 2024; Shen et al., 2024) discuss token compression for video processing using VLMs. We defer a discussion of these to Section A.1.
|
| 175 |
+
|
| 176 |
+
# 4.2 SCALING LAWS
|
| 177 |
+
|
| 178 |
+
Understanding how the performance of modern deep networks shifts as key design factors, such as the number of parameters or training tokens, are scaled has become a focal point of research, particularly as these models continue to grow in size and complexity. Scaling laws offer crucial guidance for optimizing the architecture of such models. Notably, Kaplan et al. (2020); Hernandez et al. (2021); Hoffmann et al. (2022) do a thorough investigation into training compute-optimal language models, highlighting the need to scale pretraining tokens and parameters at the same rate. Cherti et al. (2023); Gadre et al. (2023) perform a similar study on scaling laws for CLIP (Radford et al., 2021), corroborating that performance improvements arise from increasing both parameter counts and pretraining image-caption pairs.
|
| 179 |
+
|
| 180 |
+
Closest to our work, Li et al. (2024a) investigate what factors improve the performance of LLaVA (Liu et al., 2023). They observe performance gains with increasing language model size, visual encoder size, and input resolution. They investigate each of these factors when scaled independently. In contrast, in this work we focus on understanding the optimal trade-off between language model size and the number of visual input tokens, given a fixed inference budget to fit in. Note that in our work, visual input token count is varied (decreased) using token compression algorithms ( $\S$ 4.1) and not by varying the input image resolution or using a different CLIP model.
|
| 181 |
+
|
| 182 |
+
While scaling the pretraining of LLMs has led to emergent capabilities, there has recently been a growing interest in improving their reasoning capabilities by scaling inference time compute. Brown et al. (2024) show impressive performance boosts if the language model is allowed multiple attempts on a problem. In fact, Snell et al. (2024) show that scaling test time compute by parallel multiple generations at inference gives performance comparable to a $14 \times$ larger model on math tasks. Goyal et al. (2024a) show performance gains by appending special tokens at the end of input to scale test time compute. In contrast, we characterize the optimal trade-off between tokens and parameters, for getting the best performance at a given fixed test time (inference) compute.
|
| 183 |
+
|
| 184 |
+
# 5 DISCUSSION AND CONCLUSION
|
| 185 |
+
|
| 186 |
+
In our work, we demonstrate that the optimal trade-off for VLMs inference is to use very few visual input tokens along with the largest possible LLM that fits within the budget. This result has quite important consequences. Existing works aim towards moderate reduction in token count (e.g., from 576 to 144), while trying to match the performance of the base model (no token reduction). However,
|
| 187 |
+
|
| 188 |
+
our results show that the community needs to focus towards extreme token reduction (e.g., down to 1, 4 or 16 tokens), as the inference optimal regime requires very few visual input tokens. Note that although extreme token reduction can lead to a drop in performance compared to the base model, it is still better than using more tokens with a smaller LLM. The performance with very few visual tokens is poised to only improve further as we develop token reduction algorithms tailored for extreme reduction. While our findings are focused on visual token compression at the projector level prior to passing into the LLM, we leave the compute-optimal scaling properties of adaptive token processing algorithms that operate within the LLM component for subsequent work. We hope that these critical insights from our paper will guide future research towards developing better token reduction techniques and thus inference optimal VLMs.
|
| 189 |
+
|
| 190 |
+
# 6 ACKNOWLEDGEMENTS
|
| 191 |
+
|
| 192 |
+
We thank Leslie Berberian, Devin Willmott, Qiu Chen, and Vijay Sadashivaiah at the Bosch Center for AI for useful discussions and help with running some of the experiments on Bosch's compute. We also thank Albert Gu for his feedback on the draft. KL and SG are supported by funding from the Bosch Center for Artificial Intelligence.
|
| 193 |
+
|
| 194 |
+
# REFERENCES
|
| 195 |
+
|
| 196 |
+
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andrew Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. Flamingo: a visual language model for few-shot learning, 2022. URL https://arxiv.org/abs/2204.14198.
|
| 197 |
+
Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, Binyuan Hui, Luo Ji, Mei Li, Junyang Lin, Runji Lin, Dayiheng Liu, Gao Liu, Chengqiang Lu, Keming Lu, Jianxin Ma, Rui Men, Xingzhang Ren, Xuancheng Ren, Chuanqi Tan, Sinan Tan, Jianhong Tu, Peng Wang, Shijie Wang, Wei Wang, Shengguang Wu, Benfeng Xu, Jin Xu, An Yang, Hao Yang, Jian Yang, Shusheng Yang, Yang Yao, Bowen Yu, Hongyi Yuan, Zheng Yuan, Jianwei Zhang, Xingxuan Zhang, Yichang Zhang, Zhenru Zhang, Chang Zhou, Jingren Zhou, Xiaohuan Zhou, and Tianhang Zhu. Qwen technical report, 2023. URL https://arxiv.org/abs/2309.16609.
|
| 198 |
+
Bradley Brown, Jordan Juravsky, Ryan Ehrlich, Ronald Clark, Quoc V. Le, Christopher Ré, and Azalia Mirhoseini. Large language monkeys: Scaling inference compute with repeated sampling, 2024. URL https://arxiv.org/abs/2407.21787.
|
| 199 |
+
Mu Cai, Jianwei Yang, Jianfeng Gao, and Yong Jae Lee. Matryoshka multimodal models, 2024. URL https://arxiv.org/abs/2405.17430.
|
| 200 |
+
Liang Chen, Haozhe Zhao, Tianyu Liu, Shuai Bai, Junyang Lin, Chang Zhou, and Baobao Chang. An image is worth 1/2 tokens after layer 2: Plug-and-play inference acceleration for large vision-language models, 2024. URL https://arxiv.org/abs/2403.06764.
|
| 201 |
+
Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. Reproducible scaling laws for contrastive language-image learning. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, June 2023. doi: 10.1109/cvpr52729.2023.00276. URL http://dx.doi.org/10.1109/cvpr52729.2023.00276.
|
| 202 |
+
Xiangxiang Chu, Limeng Qiao, Xinyang Lin, Shuang Xu, Yang Yang, Yiming Hu, Fei Wei, Xinyu Zhang, Bo Zhang, Xiaolin Wei, and Chunhua Shen. Mobilevlm: A fast, strong and open vision language assistant for mobile devices, 2023. URL https://arxiv.org/abs/2312.16886.
|
| 203 |
+
Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, and Steven Hoi. Instructclip: Towards general-purpose vision-language models with instruction tuning, 2023. URL https://arxiv.org/abs/2305.06500.
|
| 204 |
+
|
| 205 |
+
Chaoyou Fu, Peixian Chen, Yunhang Shen, Yulei Qin, Mengdan Zhang, Xu Lin, Jinrui Yang, Xiawu Zheng, Ke Li, Xing Sun, Yunsheng Wu, and Rongrong Ji. Mme: A comprehensive evaluation benchmark for multimodal large language models, 2024. URL https://arxiv.org/abs/2306.13394.
|
| 206 |
+
Samir Yitzhak Gadre, Gabriel Ilharco, Alex Fang, Jonathan Hayase, Georgios Smyrnis, Thao Nguyen, Ryan Marten, Mitchell Wortsman, Dhruba Ghosh, Jieyu Zhang, Eyal Orgad, Rahim Entezari, Giannis Daras, Sarah Pratt, Vivek Ramanujan, Yonatan Bitton, Kalyani Marathe, Stephen Mussmann, Richard Vencu, Mehdi Cherti, Ranjay Krishna, Pang Wei Koh, Olga Saukh, Alexander Ratner, Shuran Song, Hannaneh Hajishirzi, Ali Farhadi, Romain Beaumont, Sewoong Oh, Alex Dimakis, Jenia Jitsev, Yair Carmon, Vaishaal Shankar, and Ludwig Schmidt. Datacomp: In search of the next generation of multimodal datasets, 2023. URL https://arxiv.org/abs/2304.14108.
|
| 207 |
+
Samir Yitzhak Gadre, Georgios Smyrnis, Vaishaal Shankar, Suchin Gururangan, Mitchell Wortsman, Rulin Shao, Jean Mercat, Alex Fang, Jeffrey Li, Sedrick Keh, Rui Xin, Marianna Nezhurina, Igor Vasiljevic, Jenia Jitsev, Luca Soldaini, Alexandros G. Dimakis, Gabriel Ilharco, Pang Wei Koh, Shuran Song, Thomas Kollar, Yair Carmon, Achal Dave, Reinhard Heckel, Niklas Muennighoff, and Ludwig Schmidt. Language models scale reliably with over-training and on downstream tasks, 2024. URL https://arxiv.org/abs/2403.08540.
|
| 208 |
+
Sachin Goyal, Ziwei Ji, Ankit Singh Rawat, Aditya Krishna Menon, Sanjiv Kumar, and Vaishnavh Nagarajan. Think before you speak: Training language models with pause tokens, 2024a. URL https://arxiv.org/abs/2310.02226.
|
| 209 |
+
Sachin Goyal, Pratyush Maini, Zachary C. Lipton, Aditi Raghunathan, and J. Zico Kolter. Scaling laws for data filtering - data curation cannot be compute agnostic, 2024b. URL https:// arxiv.org/abs/2404.07177.
|
| 210 |
+
Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering, 2017. URL https://arxiv.org/abs/1612.00837.
|
| 211 |
+
Danna Gurari, Qing Li, Abigale J. Stangl, Anhong Guo, Chi Lin, Kristen Grauman, Jiebo Luo, and Jeffrey P. Bigham. Vizwiz grand challenge: Answering visual questions from blind people, 2018. URL https://arxiv.org/abs/1802.08218.
|
| 212 |
+
Danny Hernandez, Jared Kaplan, Tom Henighan, and Sam McCandlish. Scaling laws for transfer, 2021. URL https://arxiv.org/abs/2102.01293.
|
| 213 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. Training compute-optimal large language models, 2022. URL https://arxiv.org/abs/2203.15556.
|
| 214 |
+
Wenbo Hu, Zi-Yi Dou, Liunian Harold Li, Amita Kamath, Nanyun Peng, and Kai-Wei Chang. Matryoshka query transformer for large vision-language models, 2024. URL https://arxiv.org/abs/2405.19315.
|
| 215 |
+
Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6700-6709, 2019.
|
| 216 |
+
Gagan Jain, Nidhi Hegde, Aditya Kusupati, Arsha Nagrani, Shyamal Buch, Prateek Jain, Anurag Arnab, and Sujoy Paul. Mixture of nested experts: Adaptive processing of visual tokens, 2024. URL https://arxiv.org/abs/2407.19985.
|
| 217 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020.
|
| 218 |
+
|
| 219 |
+
Aniruddha Kembhavi, Mike Salvato, Eric Kolve, Minjoon Seo, Hannaneh Hajishirzi, and Ali Farhadi. A diagram is worth a dozen images, 2016.
|
| 220 |
+
Bo Li, Hao Zhang, Kaichen Zhang, Dong Guo, Yuanhan Zhang, Renrui Zhang, Feng Li, Ziwei Liu, and Chunyuan Li. Llava-last: What else influences visual instruction tuning beyond data?, May 2024a. URL https://llava-v1.github.io/blog/2024-05-25-llava-last-ablations/.
|
| 221 |
+
Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models, 2023a. URL https:// arxiv.org/abs/2301.12597.
|
| 222 |
+
KunChang Li, Yinan He, Yi Wang, Yizhuo Li, Wenhai Wang, Ping Luo, Yali Wang, Limin Wang, and Yu Qiao. Videochat: Chat-centric video understanding, 2024b. URL https://arxiv.org/abs/2305.06355.
|
| 223 |
+
Wentong Li, Yuqian Yuan, Jian Liu, Dongqi Tang, Song Wang, Jie Qin, Jianke Zhu, and Lei Zhang. Tokenpacker: Efficient visual projector for multimodal llm, 2024c. URL https://arxiv.org/abs/2407.02392.
|
| 224 |
+
Yanwei Li, Chengyao Wang, and Jiaya Jia. Llama-vid: An image is worth 2 tokens in large language models, 2023b. URL https://arxiv.org/abs/2311.17043.
|
| 225 |
+
Yanwei Li, Yuechen Zhang, Chengyao Wang, Zhisheng Zhong, Yixin Chen, Ruihang Chu, Shaoteng Liu, and Jiaya Jia. Mini-gemini: Mining the potential of multi-modality vision language models, 2024d. URL https://arxiv.org/abs/2403.18814.
|
| 226 |
+
Yifan Li, Yifan Du, Kun Zhou, Jinpeng Wang, Wayne Xin Zhao, and Ji-Rong Wen. Evaluating object hallucination in large vision-language models, 2023c. URL https://arxiv.org/abs/2305.10355.
|
| 227 |
+
Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In NeurIPS, 2023.
|
| 228 |
+
Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning, 2024a. URL https://arxiv.org/abs/2310.03744.
|
| 229 |
+
Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. Llava-last: Improved reasoning,OCR, and world knowledge, January 2024b. URL https:// lllava-v1.github.io/blog/2024-01-30-llava-last/.
|
| 230 |
+
Hong Liu, Sang Michael Xie, Zhiyuan Li, and Tengyu Ma. Same pre-training loss, better downstream: Implicit bias matters for language models, 2022. URL https://arxiv.org/abs/2210.14199.
|
| 231 |
+
Yuan Liu, Haodong Duan, Yuanhan Zhang, Bo Li, Songyang Zhang, Wangbo Zhao, Yike Yuan, Jiaqi Wang, Conghui He, Ziwei Liu, Kai Chen, and Dahua Lin. Mmbench: Is your multi-modal model an all-around player?, 2024c. URL https://arxiv.org/abs/2307.06281.
|
| 232 |
+
Pan Lu, Swaroop Mishra, Tony Xia, Liang Qiu, Kai-Wei Chang, Song-Chun Zhu, Oyvind Tafjord, Peter Clark, and Ashwin Kalyan. Learn to explain: Multimodal reasoning via thought chains for science question answering. In The 36th Conference on Neural Information Processing Systems (NeurIPS), 2022.
|
| 233 |
+
Pan Lu, Hritik Bansal, Tony Xia, Jiacheng Liu, Chunyuan Li, Hannaneh Hajishirzi, Hao Cheng, Kai-Wei Chang, Michel Galley, and Jianfeng Gao. Mathvista: Evaluating mathematical reasoning of foundation models in visual contexts. In International Conference on Learning Representations (ICLR), 2024.
|
| 234 |
+
Ahmed Masry, Do Xuan Long, Jia Qing Tan, Shafiq Joty, and Enamul Hoque. Chartqa: A benchmark for question answering about charts with visual and logical reasoning, 2022. URL https://arxiv.org/abs/2203.10244.
|
| 235 |
+
|
| 236 |
+
Minesh Mathew, Dimosthenis Karatzas, and C. V. Jawahar. Docvqa: A dataset for vqa on document images, 2021. URL https://arxiv.org/abs/2007.00398.
|
| 237 |
+
Matanel Oren, Michael Hassid, Nir Yarden, Yossi Adi, and Roy Schwartz. Transformers are multi-state rnns, 2024. URL https://arxiv.org/abs/2401.06104.
|
| 238 |
+
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, 2021. URL https://arxiv.org/abs/2103.00020.
|
| 239 |
+
Nikhil Sardana, Jacob Portes, Sasha Doubov, and Jonathan Frankle. Beyond chinchilla-optimal: Accounting for inference in language model scaling laws, 2024. URL https://arxiv.org/abs/2401.00448.
|
| 240 |
+
Yuzhang Shang, Mu Cai, Bingxin Xu, Yong Jae Lee, and Yan Yan. Llava-prumerge: Adaptive token reduction for efficient large multimodal models, 2024. URL https://arxiv.org/abs/2403.15388.
|
| 241 |
+
Leqi Shen, Tianxiang Hao, Sicheng Zhao, Yifeng Zhang, Pengzhang Liu, Yongjun Bao, and Guiguang Ding. Tempme: Video temporal token merging for efficient text-video retrieval, 2024. URL https://arxiv.org/abs/2409.01156.
|
| 242 |
+
Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. Towards vqa models that can read, 2019. URL https://arxiv.org/abs/1904.08920.
|
| 243 |
+
Charlie Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. Scaling llm test-time compute optimally can be more effective than scaling model parameters, 2024. URL https://arxiv.org/abs/2408.03314.
|
| 244 |
+
Yixuan Su, Tian Lan, Huayang Li, Jialu Xu, Yan Wang, and Deng Cai. Pandagpt: One model to instruction-follow them all, 2023. URL https://arxiv.org/abs/2305.16355.
|
| 245 |
+
Zhongwei Wan, Ziang Wu, Che Liu, Jina Huang, Zhihong Zhu, Peng Jin, Longyue Wang, and Li Yuan. Look-m: Look-once optimization in kv cache for efficient multimodal long-context inference, 2024. URL https://arxiv.org/abs/2406.18139.
|
| 246 |
+
Weihan Wang, Qingsong Lv, Wenmeng Yu, Wenyi Hong, Ji Qi, Yan Wang, Junhui Ji, Zhuoyi Yang, Lei Zhao, Xixuan Song, Jiazheng Xu, Bin Xu, Juanzi Li, Yuxiao Dong, Ming Ding, and Jie Tang. Cogvlm: Visual expert for pretrained language models, 2024a. URL https://arxiv.org/abs/2311.03079.
|
| 247 |
+
Xidong Wang, Dingjie Song, Shunian Chen, Chen Zhang, and Benyou Wang. Longllava: Scaling multi-modal llms to 1000 images efficiently via hybrid architecture, 2024b. URL https:// arxiv.org/abs/2409.02889.
|
| 248 |
+
Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, Ed H. Chi, Tatsunori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus. Emergent abilities of large language models, 2022. URL https://arxiv.org/abs/2206.07682.
|
| 249 |
+
Yuetian Weng, Mingfei Han, Haoyu He, Xiaojun Chang, and Bohan Zhuang. Longvlm: Efficient long video understanding via large language models, 2024. URL https://arxiv.org/abs/2404.03384.
|
| 250 |
+
Jiaqi Xu, Cuiling Lan, Wenxuan Xie, Xuejin Chen, and Yan Lu. Slot-vlm: Slowfast slots for videolanguage modeling, 2024. URL https://arxiv.org/abs/2402.13088.
|
| 251 |
+
Yuan Yao, Tianyu Yu, Ao Zhang, Chongyi Wang, Junbo Cui, Hongji Zhu, Tianchi Cai, Haoyu Li, Weilin Zhao, Zhihui He, Qianyu Chen, Huarong Zhou, Zhensheng Zou, Haoye Zhang, Shengding Hu, Zhi Zheng, Jie Zhou, Jie Cai, Xu Han, Guoyang Zeng, Dahai Li, Zhiyuan Liu, and Maosong Sun. Minicpm-v: A gpt-4v level mllm on your phone, 2024. URL https://arxiv.org/abs/2408.01800.
|
| 252 |
+
|
| 253 |
+
Gaotong Yu, Yi Chen, and Jian Xu. Balancing performance and efficiency: A multimodal large language model pruning method based image text interaction, 2024. URL https://arxiv.org/abs/2409.01162.
|
| 254 |
+
Xiang Yue, Yuansheng Ni, Kai Zhang, Tianyu Zheng, Ruoqi Liu, Ge Zhang, Samuel Stevens, Dongfu Jiang, Weiming Ren, Yuxuan Sun, et al. Mmmu: A massive multi-discipline multimodal understanding and reasoning benchmark for expert agi. arXiv preprint arXiv:2311.16502, 2023.
|
| 255 |
+
Eric Zelikman, Georges Harik, Yijia Shao, Varuna Jayasiri, Nick Haber, and Noah D. Goodman. Quiet-star: Language models can teach themselves to think before speaking, 2024. URL https://arxiv.org/abs/2403.09629.
|
| 256 |
+
Jiaxin Zhang, Wentao Yang, Songxuan Lai, Zecheng Xie, and Lianwen Jin. Dockylin: A large multimodal model for visual document understanding with efficient visual slimming, 2024. URL https://arxiv.org/abs/2406.19101.
|
| 257 |
+
Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, Zhangyang Wang, and Beidi Chen. $\mathrm{H}_2\mathrm{o}$ : Heavy-hitter oracle for efficient generative inference of large language models, 2023. URL https://arxiv.org/abs/2306.14048.
|
| 258 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena, 2023. URL https://arxiv.org/abs/2306.05685.
|
| 259 |
+
Baichuan Zhou, Ying Hu, Xi Weng, Junlong Jia, Jie Luo, Xien Liu, Ji Wu, and Lei Huang. Tinyllava: A framework of small-scale large multimodal models, 2024. URL https://arxiv.org/abs/2402.14289.
|
| 260 |
+
Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models, 2023. URL https:// arxiv.org/abs/2304.10592.
|
| 261 |
+
|
| 262 |
+
# A APPENDIX
|
| 263 |
+
|
| 264 |
+
# A.1 ADDITIONAL RELATED WORKS
|
| 265 |
+
|
| 266 |
+
# A.1.1 VISION PROJECTOR DESIGN
|
| 267 |
+
|
| 268 |
+
To bridge the gap between the separate image and text modalities presented by the vision encoder and language model respectively, vision projectors map the image tokens from the vision encoder into the language space. Many design choices for the projector exist. Numerous VLMs utilize query-based projectors, which combine the embeddings of visual tokens with that of query tokens via cross-attention or similar mechanisms, like the Q-Former projector introduced BLIP-2 (Li et al., 2023a) and used in following work (Dai et al., 2023; Zhu et al., 2023). Other VLMs use simple linear projectors or MLPs to connect the encoder and LLM (Liu et al., 2023; 2024a; Su et al., 2023). While most architectures use the projectors to create new tokens to feed into the LLM alongside text, some architectures like Flamingo (Alayrac et al., 2022) or CogVLM (Wang et al., 2024a) directly interweave the visual information into the language model. In our work, we will be focusing on projectors that fall in the former category.
|
| 269 |
+
|
| 270 |
+
# A.1.2 ADDITIONAL APPROACHES FOR EFFICIENT VLMS
|
| 271 |
+
|
| 272 |
+
Apart from reducing the number of visual input tokens to the language model, people have explored various other techniques, including a mix of quantization (Liu et al., 2024a) and smaller encoders or language models (Yao et al., 2024; Chu et al., 2023; Zhou et al., 2024) for improving inference.
|
| 273 |
+
|
| 274 |
+
VLMs utilized in video processing often combine decreases in vision encoder output size with token compression techniques to prevent excessive latency and memory constraints. Visual tokens are often merged temporally across frames (Xu et al., 2024; Shen et al., 2024) as well as spatially for individual frames (Xu et al., 2024). Vision encoders, such as Q-Former (Li et al., 2023a), are preferred over more traditional CLIP models due to their ability to extract a smaller fixed number of tokens per image (Weng et al., 2024; Li et al., 2024b). Although compression techniques used for video processing often can reduce token counts by large margins, they are rarely evaluated on image datasets, and when they are, compress visual tokens very little or not at all (Li et al., 2023b).
|
| 275 |
+
|
| 276 |
+
Adaptive token processing, where the compute dedicated to certain tokens during inference is varied Jain et al. (2024), is another approach to reducing the cost of inference. Many methods prune visual tokens within the LLM due to their lower attention scores compared to the prompt, system, etc., tokens (Chen et al., 2024; Wan et al., 2024), a heuristic commonly found in regular text-only LLM KV cache reduction techniques (Zhang et al., 2023; Oren et al., 2024). Finally, while we focus our paper on image-based VLMs, a host of works (Xu et al., 2024; Shen et al., 2024) discuss token compression for video processing using VLMs. We defer a discussion of these to Section A.1.
|
| 277 |
+
|
| 278 |
+
# A.2 GRID SEARCH DETAILS
|
| 279 |
+
|
| 280 |
+
While there are many choices of optimizer for fitting the scaling laws like curve-fitting in SciPy, gradient descent based solvers, etc. We observed that these are not stable and give varying solutions. We converged to using grid-search to fit the scaling laws, similar to the recent works like Goyal et al. (2024b). The grid-search range for each of the parameters were as follows: $\alpha, \beta \in \{0, 0.1\}$ , $A, B, D \in \{0, 1\}$ .
|
| 281 |
+
|
| 282 |
+
# A.3 ADDITIONAL RESULTS FOR SCALING LAWS
|
| 283 |
+
|
| 284 |
+
We find that our original scaling laws are able to generalize and predict the performance of VLMs at the 14B scale despite only being fitted up to the 7B scale. Our predictions result in less than $2\%$ error between the predicted and actual VLM performance on visual reasoning and understanding tasks at the 14B model parameter scale. Performance is measured as described in Section 3.2.
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
(a) Scaling law prediction for 14B LLM VLM at $Q = 0$ .
|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
(b) Scaling law prediction for 14B LLM VLM at $Q = 50$
|
| 291 |
+
|
| 292 |
+

|
| 293 |
+
Figure 6: Scaling law predictions at various $Q$ . The scaling laws fitted based on LLMs up to the 7B scale generalize well to the 14B scale, resulting in less than $2\%$ error between predicted and actual VLM performance.
|
| 294 |
+
Figure 7: Our query-based convolutional cross-attention compression technique. User input text tokens are first processed through the LLM backbone to generate text embeddings that are then combined with the visual tokens. Within the projector, the query-embedded visual tokens are downsampled via convolution. Next, local cross-attention is applied between the downsampled tokens and their respective visual tokens regions. The compressed tokens finally pass through an MLP into the LLM.
|
| 295 |
+
|
| 296 |
+
# B PROMPT-BASEDTOKEN COMPRESSION
|
| 297 |
+
|
| 298 |
+
Our scaling laws show that, for visual reasoning tasks, it is optimal to utilize the largest LLM backbone by reducing the number of visual tokens to remain within budget. Many current token compression algorithms focus on compression to 144, 64, or 36 tokens; however, the token count can be as low as 1 for many situations. Thus, improving the ability of extreme compression algorithms would enable the use of larger LLM-backbones for the same inference cost, achieving optimal inference compute usage.
|
| 299 |
+
|
| 300 |
+
The following section details our updates to the existing token compression algorithm (Li et al., 2024c) to incorporate query-based token compression. Figure 7 summarizes our query-based convolutional cross-attention compression technique.
|
| 301 |
+
|
| 302 |
+
User Query Information Injection: To make our projector prompt/query-dependent, we add the text embedding of the user's most recent prompt to the image embeddings from vision encoder. We do this by taking the last hidden states prior to the LM head of the user input from the language model as the representation of the user's overall query. The hidden state converted into the text embedding via a linear projection and added to the image visual token embeddings. These fused tokens are later used as the query component for cross-attention. The text-embedding can easily be cached for applications where the prompt is static or is part of a predetermined set. Even if
|
| 303 |
+
|
| 304 |
+
<table><tr><td>Method</td><td># Token</td><td>GQA</td><td>MMB</td><td>MME</td><td>POPE</td><td>SQA</td><td>TextVQA</td><td>VizWiz</td><td>VQAv2</td></tr><tr><td>LLaVA-1.5</td><td>576</td><td>62.0</td><td>64.3</td><td>1510.7</td><td>85.9</td><td>66.8</td><td>58.2</td><td>50.0</td><td>78.5</td></tr><tr><td>PruMerge</td><td>~32</td><td>57.2*</td><td>60.9</td><td>1350.3</td><td>76.3</td><td>68.5</td><td>56.0</td><td>45.2*</td><td>72.0</td></tr><tr><td>TokenPacker (TP)</td><td>36</td><td>59.6</td><td>62.8</td><td>1440.9*</td><td>83.3*</td><td>71.0*</td><td>53.2*</td><td>50.2</td><td>75.0</td></tr><tr><td>Matryoshka Multi.</td><td>36</td><td>60.3</td><td>64.8</td><td>-</td><td>85.5</td><td>-</td><td>-</td><td>52.8</td><td>-</td></tr><tr><td>Matryoshka Query</td><td>36</td><td>58.8</td><td>63.4</td><td>1416.3</td><td>81.9</td><td>66.8</td><td>-</td><td>51.0</td><td>73.7</td></tr><tr><td>Updated TP (Ours)</td><td>36</td><td>60.5</td><td>62.5</td><td>1442.0</td><td>84.5</td><td>70.6</td><td>53.3</td><td>50.1</td><td>75.8</td></tr><tr><td>TokenPacker</td><td>16</td><td>58.9*</td><td>62.7*</td><td>1378.8*</td><td>83.7*</td><td>68.1*</td><td>52.5*</td><td>50.5*</td><td>74.4*</td></tr><tr><td>Matryoshka Query</td><td>16</td><td>57.6</td><td>61.9</td><td>1408.5</td><td>80.8</td><td>67.5</td><td>-</td><td>49.8</td><td>71.1</td></tr><tr><td>Updated TP</td><td>16</td><td>59.0</td><td>62.2</td><td>1408.0</td><td>83.4</td><td>70.7</td><td>51.3</td><td>47.7</td><td>74.5</td></tr><tr><td>TokenPacker</td><td>4</td><td>56.2*</td><td>61.5*</td><td>1347.6*</td><td>81.7*</td><td>68.5*</td><td>49.2*</td><td>45.7*</td><td>70.5*</td></tr><tr><td>Matryoshka Query</td><td>4</td><td>53.0</td><td>56.5</td><td>1176.1</td><td>77.6</td><td>65.1</td><td>-</td><td>49.4</td><td>64.1</td></tr><tr><td>Updated TP</td><td>4</td><td>56.5</td><td>62.1</td><td>1390.3</td><td>81.8</td><td>68.6</td><td>48.7</td><td>45.0</td><td>70.6</td></tr><tr><td>TokenPacker</td><td>1</td><td>53.4*</td><td>58.7*</td><td>1262.4*</td><td>80.7*</td><td>69.4*</td><td>46.2*</td><td>41.1*</td><td>66.9*</td></tr><tr><td>Matryoshka Multi.</td><td>1</td><td>52.6</td><td>59.5</td><td>-</td><td>78.4</td><td>-</td><td>-</td><td>49.4</td><td>-</td></tr><tr><td>Matryoshka Query</td><td>2</td><td>50.8</td><td>54.4</td><td>1144.0</td><td>74.5</td><td>65.0</td><td>-</td><td>48.5</td><td>61.0</td></tr><tr><td>Updated TP</td><td>1</td><td>53.5</td><td>59.4</td><td>1269.1</td><td>81.3</td><td>69.9</td><td>46.8</td><td>44.1</td><td>67.3</td></tr><tr><td>No Visual Tokens</td><td>0</td><td>37.7</td><td>21.0</td><td>697.8</td><td>45.4</td><td>63.6</td><td>41.7</td><td>44.4</td><td>41.0</td></tr></table>
|
| 305 |
+
|
| 306 |
+
Table 1: Comparison of various token compression methods for VLMs at different compression rates. All models use the Vicuna-1.5 7B model as the language backbone. A * denotes benchmark results for other techniques we evaluated, while best scores are bolded, and second best underlined. Our updated method outperforms alternatives, including its predecessor, on almost all benchmarks at extremely high compression regions (visual tokens reduced to 1 or 4), highlighting the benefit of utilizing the user query in the compression algorithm for these situations.
|
| 307 |
+
|
| 308 |
+
the prompt varies, the text-embedding can be pre-calculated prior to processing the image and KV values cached and re-used when processing the visual and text tokens together for generation.
|
| 309 |
+
|
| 310 |
+
Token Downsampling with Cross-Attention and Learnable Convolutions: To compress the number of visual tokens passed into the LLM, we utilize a region-based, cross-attention mechanism that downsamples the vision encoder tokens, $\mathbf{X}$ , into a more information-dense form. The mechanism hinges on the property that the $\mathbf{X}$ can be viewed as a $\sqrt{n} \times \sqrt{n}$ grid due to the vision encoder's patchification of the image. Li et al. (2024c;d) passes the "2D" version of $\mathbf{X}$ through a downsampling function that compresses the input by a $s^2$ factor where each resulting token corresponds with a $s \times s$ region in the original input. After this, cross-attention is applied independently between each downsampled token and the corresponding tokens in its $s \times s$ region. We improve upon bilinear interpolation-based downsampling techniques (Li et al., 2024c; Wang et al., 2024b) by using a learnable depth-wise 2D convolution filter of kernel size and stride $s$ , providing better expressivity.
|
| 311 |
+
|
| 312 |
+
# B.1 QUERY-BASED CONVOLUTIONAL CROSS-ATTENTION RESULTS
|
| 313 |
+
|
| 314 |
+
Table 1 presents the results of our QueCC algorithm in comparison to previous methods, including TokenPacker (Li et al., 2024c), LLaVa-PruMerge (Shang et al., 2024), Matryoshka Multimodal Models (Cai et al., 2024), and Matryoshka Query Transformer (Hu et al., 2024), in low token regimes. We find that at our method performs better than alternatives at the highest levels of compression on multiple different datasets. At the one-token level, our method outperforms other methods on six of the eight datasets and is able to mitigate some of the shortcomings of the original TokenPacker by reducing its gap between vanilla LLaVA-1.5 on VizWiz by $34\%$ and $\sim 12\%$ on both POPE and MMBench. The trend continues at the four-token level. Our model also exhibits strong performance on GQA, MME, SQA, and VQAv2 across compression rates, signaling the prospects of using the user's query to identify key tokens.
|
| 315 |
+
|
| 316 |
+
# B.2 ABLATIONS OF PROMPT-BASEDTOKEN COMPRESSION
|
| 317 |
+
|
| 318 |
+
We ablate the importance of the query injection and convolutional downsampling components and report the results in Table 2. We find at extreme levels of compression that combining query and convolution can magnify the benefits of either adding only query or only convolution; e.g., TextVQA performance at token count one increased by 0.7 percentage points (pp) with both convolution and
|
| 319 |
+
|
| 320 |
+
<table><tr><td># Token</td><td>Model</td><td>GQA</td><td>MMB</td><td>MME</td><td>POPE</td><td>SQA</td><td>TextVQA</td><td>VizWiz</td><td>VQAv2</td></tr><tr><td rowspan="4">1</td><td>Conv and Query</td><td>53.5</td><td>59.4</td><td>1269.1</td><td>81.3</td><td>69.9</td><td>46.9</td><td>44.1</td><td>67.3</td></tr><tr><td>Query Only</td><td>53.3</td><td>59.2</td><td>1267.7</td><td>81.3</td><td>68.8</td><td>46.3</td><td>41.7</td><td>66.6</td></tr><tr><td>Conv Only</td><td>53.6</td><td>57.5</td><td>1215.5</td><td>80.6</td><td>69.1</td><td>46.4</td><td>45.6</td><td>66.7</td></tr><tr><td>No Conv, No Query</td><td>53.4</td><td>58.7</td><td>1262.4</td><td>80.7</td><td>69.4</td><td>46.2</td><td>41.1</td><td>66.9</td></tr><tr><td rowspan="4">4</td><td>Conv and Query</td><td>56.5</td><td>62.1</td><td>1390.3</td><td>81.8</td><td>68.6</td><td>48.7</td><td>45.0</td><td>70.6</td></tr><tr><td>Query Only</td><td>56.4</td><td>62.0</td><td>1345.9</td><td>82.3</td><td>70.7</td><td>48.8</td><td>46.5</td><td>70.6</td></tr><tr><td>Conv Only</td><td>56.7</td><td>60.6</td><td>1310.4</td><td>82.1</td><td>69.0</td><td>49.4</td><td>41.3</td><td>70.5</td></tr><tr><td>No Conv, No Query</td><td>56.2</td><td>61.5</td><td>1347.6</td><td>81.7</td><td>68.5</td><td>49.2</td><td>45.7</td><td>70.5</td></tr><tr><td rowspan="4">16</td><td>Conv and Query</td><td>59.0</td><td>62.2</td><td>1408.0</td><td>83.4</td><td>70.7</td><td>51.3</td><td>47.7</td><td>74.5</td></tr><tr><td>Query Only</td><td>56.6</td><td>61.4</td><td>1354.3</td><td>82.1</td><td>69.6</td><td>50.7</td><td>41.2</td><td>71.5</td></tr><tr><td>Conv Only</td><td>58.9</td><td>62.5</td><td>1402.3</td><td>82.5</td><td>69.6</td><td>52.6</td><td>45.7</td><td>74.1</td></tr><tr><td>No Conv, No Query</td><td>58.9</td><td>62.7</td><td>1378.8</td><td>83.7</td><td>68.1</td><td>52.5</td><td>50.5</td><td>74.4</td></tr></table>
|
| 321 |
+
|
| 322 |
+
query while using only one of the components led to at most $0.2\mathrm{pp}$ increase. In addition, combining the two can mitigate performance drops that are associated with utilizing only query or convolution, as seen in MMB at one token where using only convolution drops performance by more than 1 pp but performance can not only be restored but also improved when adding query, eventually outperforming the baseline by $0.7\mathrm{pp}$ ; a similar situation can be seen for MME.
|
| 323 |
+
|
| 324 |
+
Table 2: Comparison of model ablations across different token counts and configurations. Best scores are bolded, and second-best scores are underlined for clarity. Adding both query and convolutional components can help boost the baseline performance and can mitigate performance drops that are associated with each individual component.
|
| 325 |
+
|
| 326 |
+
<table><tr><td># Token</td><td>Model</td><td>GQA</td><td>POPE</td><td>SQA</td><td>TextVQA</td></tr><tr><td rowspan="2">16</td><td>LLaMA-VID</td><td>58.2</td><td>83.1</td><td>67.4</td><td>50.8</td></tr><tr><td>QueCC</td><td>59.0</td><td>83.4</td><td>70.7</td><td>51.3</td></tr><tr><td rowspan="2">4</td><td>LLaMA-VID</td><td>56.2</td><td>83.5</td><td>68.7</td><td>49.1</td></tr><tr><td>QueCC</td><td>56.5</td><td>81.8</td><td>68.6</td><td>48.7</td></tr></table>
|
| 327 |
+
|
| 328 |
+
Table 3: Comparison of LLaMA-VID and QueCC models across different visual/content token counts. LLaMA-VID results, obtained from (Li et al., 2023b), utilizes the context tokens, resulting in one addition overall token.
|
| 329 |
+
|
| 330 |
+
We also compare with LLaMAVID (Li et al., 2023b) which also has strong performance in extreme compression regimes. We compare the performance of our method to its reported performance at similar token compression levels and show that we are able to outperform it in certain tasks despite LLaMA-VID utilizing a stronger vision encoder (Li et al., 2023b). Our analysis shows that both our approach and theirs are competitive, which also validates the key
|
| 331 |
+
|
| 332 |
+
point we wanted to make that query-based compression is necessary under extreme compression. In addition, LLaMA-VID utilizes a separate text decoder model to process the user query, while our method utilizes the existing LLM within the VLM model.
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bc833ba32ada86614bf57d17472203b9b4b8a23eb4111e7ec6f52d00c988ac1
|
| 3 |
+
size 640221
|
ICLR/2025/Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:112f1cee3c305c58998856ac8b661e4e86a512e26641ba044a64b93c5c009980
|
| 3 |
+
size 482250
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d141dd20c43d8eb97b66d73d44d2d50922ab512800d83d4128b2a043c4363655
|
| 3 |
+
size 119239
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a0362d0d2440ce9313e0691bec6e8bc399f6f81c159839207e3b98303805f90
|
| 3 |
+
size 142156
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/acd4b66d-9b3a-46b6-9681-5d392aa681e6_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0b76b6277217c13bb970d29b2eec1a92b9bf747845991013226582c8d228bc1
|
| 3 |
+
size 1617559
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/full.md
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFERENCE SCALING LAWS: AN EMPIRICAL ANALYSIS OF COMPUTE-OPTIMAL INFERENCE FOR LLM PROBLEM-SOLVING
|
| 2 |
+
|
| 3 |
+
Yangzhen Wu<sup>1*</sup>, Zhiqing Sun<sup>2</sup>, Shanda Li<sup>2</sup>, Sean Welleck<sup>2</sup>, Yiming Yang<sup>2</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ Institute for Interdisciplinary Information Sciences, Tsinghua University
|
| 6 |
+
|
| 7 |
+
$^{2}$ School of Computer Science, Carnegie Mellon University
|
| 8 |
+
|
| 9 |
+
wuyangch21@mails.tsinghua.edu.cn
|
| 10 |
+
|
| 11 |
+
{zhiqings, shandal, swelleck, yiming}@cs.cmu.edu
|
| 12 |
+
|
| 13 |
+
https://thu-wyz.github.io/inference-scaling/
|
| 14 |
+
|
| 15 |
+
# ABSTRACT
|
| 16 |
+
|
| 17 |
+
While the scaling laws of large language models (LLMs) training have been extensively studied, optimal inference configurations of LLMs remain underexplored. We study inference scaling laws (aka test-time scaling laws) and compute-optimal inference, focusing on the trade-offs between model sizes and generating additional tokens with different inference strategies. As a first step towards understanding and designing compute-optimal inference methods, we studied cost-performance trade-offs for inference strategies such as greedy search, majority voting, best-of- $n$ , weighted voting, and two different tree search algorithms, using different model sizes and compute budgets. Our findings suggest that scaling inference compute with inference strategies can be more computationally efficient than scaling model parameters. Additionally, smaller models combined with advanced inference algorithms offer Pareto-optimal trade-offs in cost and performance. For example, the Llemma-7B model, when paired with our novel tree search algorithm, consistently outperforms the Llemma-34B model across all tested inference strategies on the MATH benchmark. We hope these insights contribute to a deeper understanding of inference scaling laws (test-time scaling laws) for LLMs.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Inference scaling laws exhibited for Pythia (Biderman et al., 2023) models and GSM8K test error. We evaluate the error rate (lower is better) of models using various sizes and numbers of sampled solutions for weighted majority voting. Left: the error rate for each model size decreases steadily as inference-compute increases, and converges at the end. Right: the optimal model size (shown as stars for $2^{41}$ , $2^{44}$ , and $2^{47}$ FLOPs) varies based on the inference-time compute budget. For instance, smaller models are compute-optimal at $2^{41}$ and $2^{44}$ FLOPs. Both axes are log scale.
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
# 1 INTRODUCTION
|
| 25 |
+
|
| 26 |
+
Scaling laws of neural networks (Hestness et al., 2017; Rosenfeld et al., 2020) have been established across a range of domains, including language modeling (Kaplan et al., 2020; Hoffmann et al., 2022; OpenAI, 2023), image modeling (Henighan et al., 2020; Yu et al., 2022; Peebles & Xie, 2023), video modeling (Brooks et al., 2024), reward modeling (Gao et al., 2023), and board games (Jones, 2021). These studies have demonstrated how model performance is influenced by both the size of the model and the amount of training compute. However, there is limited knowledge on how varying the compute during inference affects model performance after the model has been trained.
|
| 27 |
+
|
| 28 |
+
To improve the task performance of large language models (LLMs), inference techniques typically involve additional compute as a performance maximization step at inference time (Nye et al., 2021; Wei et al., 2022; Wang et al., 2023b; Yao et al., 2023; Chen et al., 2024b). The computational cost of these techniques must be taken into account for compute-optimal inference. For example, Monte Carlo Tree Search (MCTS) may improve task performance, but it potentially requires much more compute than simply sampling solutions multiple times (Jones, 2021). Generally speaking, we need a comprehensive understanding of how various inference-time methods (e.g., best-of- $n$ , majority voting (Wang et al., 2023a; Li et al., 2023)) trade off between performance and cost. To improve our understanding, this paper presents a thorough empirical evaluation with careful analysis over various configurations of representative LLMs and inference algorithms.
|
| 29 |
+
|
| 30 |
+
Specifically, we explore how to select an optimal size for the language model and an effective inference strategy (e.g., greedy search, majority voting, best-of- $n$ , weighted voting, and their tree-search variants) to maximize performance (i.e., accuracy) with a given compute budget. We control the inference compute (FLOPs) of a fixed model by generating more tokens through the language model<sup>1</sup>, sampling further candidate solutions, and ranking them with a reward model. We analyze the performance of fine-tuned models of various sizes given different inference FLOPs on mathematical reasoning benchmarks (e.g., GSM8K test set (Cobbe et al., 2021) and MATH500 test set (Hendrycks et al., 2021b; Lightman et al., 2024)). Our experiments cover several model families, including general-purpose LLMs (e.g., Pythia (Biderman et al., 2023) & Mistral (Jiang et al., 2023)) as well as math-specialized ones (e.g., Llemma (Azerbayev et al., 2024)).
|
| 31 |
+
|
| 32 |
+
Our results on Pythia (Fig. 1) illustrate how performance scales with increased inference compute across various model sizes. Typically, increasing the compute budget leads to higher accuracy until the accuracy reaches saturation. As the compute budget increases, smaller models initially perform better than larger ones, but once the accuracy of the smaller models saturates, the larger models have favorable performance. The right panel of Figure 1 demonstrates that the optimal model size for inference varies with different levels of computational budgets. However, in real-world deployment, the available compute is typically much lower than the point where the accuracy of relatively small models saturates and larger models begin to show their advantage (as shown in Fig. 4, where the 7B model outperforms the 34B model until 128 Llemma 7B solutions are sampled). This indicates that relatively smaller models could be more compute-optimal for inference.
|
| 33 |
+
|
| 34 |
+
We analyze the asymptotic behavior of sampling and voting-based inference strategies, showing their convergence upper bound and rate of convergence. Given a dataset, the accuracy of the language model will ultimately saturate to a fixed limit which is determined by the output probabilities assigned by the model, exhibiting exponential convergence speed through sampling and voting. This implies that, without an oracle verifier, simple strategies like sampling cannot achieve perfect accuracy even with an infinite number of samples, leading to diminishing returns. Therefore, this highlights the necessity for more sophisticated inference algorithms.
|
| 35 |
+
|
| 36 |
+
We have also found that the commonly-used MCTS method does not perform well with weighted voting, as it often yields many unfinished solutions, hence having less effective votes. To address this issue, we propose a novel tree search algorithm, REward BAlanced Search (REBASE), which pairs well with weighted voting and achieves a Pareto-optimal trade-off between accuracy and inference compute. The key idea of REBASE is to use a node-quality reward to control node expansion, which eliminates the need for explicit rollouts while ensuring enough candidate solutions for voting.
|
| 37 |
+
|
| 38 |
+
In our experiments, REBASE consistently outperforms sampling and MCTS methods across all settings, models, and tasks. Importantly, we find that REBASE with a smaller language model typically achieves a Pareto-optimal trade-off. For instance, we show that the Llemma-7B model can achieve competitive accuracy to a Llemma-34B model while using $2 \times$ less FLOPs when evaluating on MATH500 (Fig. 4) or GSM8K (Fig. 5). Moreover, Llemma-7B with REBASE outperforms Llemma-34B with standard majority voting across all compute budgets. Our results show the value of using smaller models with advanced inference-time algorithms, and the benefits of new algorithms for achieving better returns on inference-time compute.
|
| 39 |
+
|
| 40 |
+
Our contributions are summarized as follows:
|
| 41 |
+
|
| 42 |
+
- We explore new inference scaling laws and compute-optimal inference by evaluating the performance of various model sizes under a fixed inference strategy. We show that smaller models can outperform larger ones under the same compute budget by increasing the number of samples.
|
| 43 |
+
- We provide new theoretical analysis of the scaling behavior of voting methods, presenting convergence bounds and rates. Our analysis shows performance limits and diminishing returns from sampling, pointing to the need for more sophisticated inference algorithms.
|
| 44 |
+
- We formulate a new compute-optimal inference problem and propose a novel tree search algorithm, REBASE, which is compute-optimal compared to widely-used sampling and MCTS methods. Our results show benefits of using smaller models with advanced inference algorithms, and new algorithms for achieving better cost-performance tradeoffs.
|
| 45 |
+
|
| 46 |
+
# 2 RELATED WORKS
|
| 47 |
+
|
| 48 |
+
Scaling laws. Recent research on scaling laws has established that model performance follows predictable power-law relationships with respect to the number of parameters, the size of the training dataset, and the available compute (Hestness et al., 2017; Rosenfeld et al., 2020). The seminal work by Kaplan et al. (2020) demonstrates that the test loss of language models decays as a function of model size and data in a highly regular manner. Subsequent studies refine these initial observations and extend them into more diverse settings (Hoffmann et al., 2022; Alabdulmohsin et al., 2022; Muennighoff et al., 2023; Lin et al., 2024; Goyal et al., 2024b). However, most of these existing works are primarily focused on the training regime. Sardana et al. (2024) study scaling laws taking both training and inference into account, but only a fixed inference algorithm is considered. In comparison, our work systematically demonstrate inference scaling laws, i.e., LLM problem-solving performance improves with increased inference-time compute budget, and we propose and study compute-optimal inference.
|
| 49 |
+
|
| 50 |
+
Inference strategies and inference-time compute utilization in LLM problem-solving. A variety of inference strategies have been developed to generate sequences with a trained model (Welleck et al., 2024). Deterministic methods such as greedy decoding and beam search (Teller, 2000; Graves, 2012) find highly probable sequences which typically have decent quality but lacks diversity. Sampling algorithms (e.g., temperature sampling (Ackley et al., 1985)) can produce a diverse set of results which are then aggregated to achieve higher accuracy (e.g., via the self-consistency approach (Wang et al., 2023a)). Recent methods combine search algorithms with LLMs, including breadth-first or depth-first search (Yao et al., 2023), Monte-Carlo Tree Search (MCTS) (Zhang et al., 2023; Zhou et al., 2024; Liu et al., 2024; Choi et al., 2023), and guided beam search (Xie et al., 2023). Several prior studies also find that LLM problem-solving performance can be improved by outputting "dummy" tokens at inference time (Goyal et al., 2024a; Pfau et al., 2024). All of these methods show that using search at inference time can lead to performance gains at the cost of increased inference-time compute, but they do not characterize the cost-performance trade-off systematically. We are the first to formulate and study compute-optimal inference, analyzing the trade-off between compute budget and problem-solving performance and proposing the REBASE method that is empirically Pareto-optimal. Concurrently, Snell et al. (2025) also study how to scale inference-compute optimally and provide complementary insights, since we consider more model families and sizes while they study several different inference strategies.
|
| 51 |
+
|
| 52 |
+
Mathematical Reasoning with LLMs. Large language models have made significant progress in recent years, and have exhibited strong reasoning abilities (Brown et al., 2020; Hoffmann et al., 2022; Lewkowycz et al., 2022; Chowdhery et al., 2023). Mathematical problem solving is a key
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 2: Illustration of compute-optimal scaling laws in training and inference. The Chinchilla scaling law (Hoffmann et al., 2022) shows how to choose a model size and number of training tokens under a training-compute budget, while our work shows how to choose a model size and an inference strategy under an inference-compute budget.
|
| 56 |
+
|
| 57 |
+
task for measuring LLM reasoning abilities (Cobbe et al., 2021; Hendrycks et al., 2021b). Ling et al. (2017) first developed the method of producing step by step solutions that lead to the final answer. Later, Cobbe et al. (2021) extended the work by training a verifier for evaluating and ranking solutions. Subsequent research has shown the performance benefits of inference-time techniques such as majority voting and weighted majority voting (Lewkowycz et al., 2022; Li et al., 2023). We choose problem solving in mathematics as the task to study compute-optimal strategies since it allows us to accurately evaluate problem solving ability.
|
| 58 |
+
|
| 59 |
+
# 3 COMPUTE-OPTIMAL INFERENCE FOR PROBLEM-SOLVING
|
| 60 |
+
|
| 61 |
+
We explore the following question: Given a fixed FLOPs budget, how should one select an optimal model size for the policy model, and an effective inference strategy to maximize performance (i.e., accuracy)? We are the first to formulate this problem and study the associated inference-time scaling laws, setting our work apart from previous scaling law studies (Fig. 2).
|
| 62 |
+
|
| 63 |
+
To address this, we represent the problem-solving error rate $E(N,T;\mathcal{S})$ as a function of the number of model parameters $N$ , the number of generated tokens $T$ and the inference strategy $\mathcal{S}$ . The computational budget $C$ is a deterministic function FLOPs $(N,T;\mathcal{S})$ , based on $N$ and $T$ . Our goal is to minimize $E$ under the test-time compute constraint FLOPs $(N,T,\mathcal{S}) = C$ :
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
(N _ {\mathrm {o p t}} (C), T _ {\mathrm {o p t}} (C); \mathcal {S}) = \underset {(N, T, \mathcal {S}) \text {s . t .} \operatorname {F L O P s} (N, T, \mathcal {S}) = C} {\arg \min } E (N, T; \mathcal {S})
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $N_{\mathrm{opt}}(C)$ and $T_{\mathrm{opt}}(C)$ denote the optimal allocation of a computational budget $C$ .
|
| 70 |
+
|
| 71 |
+
Here, the inference compute (FLOPs) for a fixed model can be modulated by generating more tokens with the policy model and an inference strategy, e.g., sampling additional candidate solutions and subsequently ranking them using a reward model. As the inference strategies, we primarily consider sampling and tree-search approaches paired with re-ranking or majority voting. This includes greedy search, majority voting, best-of- $n$ , weighted voting, and their tree-search variants.
|
| 72 |
+
|
| 73 |
+
# 3.1 INFERENCE STRATEGIES
|
| 74 |
+
|
| 75 |
+
We consider the following inference strategies which are popularly used in practice:
|
| 76 |
+
|
| 77 |
+
- Greedy search. This strategy generates tokens one at a time by selecting the highest probability token at each step. It is computationally efficient but often suboptimal in terms of diversity.
|
| 78 |
+
- best-of- $n$ . This strategy, also known as rejection sampling, generates a set of candidates and chooses the one with the highest score given by the reward model.
|
| 79 |
+
|
| 80 |
+
- Majority voting. In this strategy, a set of candidates are generated, and the final answer to the problem is determined by the most frequently occurring answer in all the outputs.
|
| 81 |
+
- Weighted majority voting. This strategy is a variant of majority voting in which the candidates are weighted based on the scores given by the reward model.
|
| 82 |
+
|
| 83 |
+
We say a strategy is sampling-based if it uses a standard autoregressive sampling algorithm (e.g., temperature sampling) to generate the candidate set (greedy search is separate, in that it only has a single deterministic candidate). A tree-search variant uses a tree search to generate the candidate set. Before discussing tree-search methods, we analyze sampling-based voting below.
|
| 84 |
+
|
| 85 |
+
Theoretical analysis of sampling-based voting. We present theoretical results on the asymptotic behavior of voting-based strategies given infinite compute in Theorems 1 & 2. Informally, we show that the accuracy of standard/weighted majority voting converges with infinite samples, and the limit only depends on the distribution modeled by the language model (and the reward model). This theoretical finding is also aligned with our empirical findings shown in Sec. 4.2, which show saturation at high sampling budgets. The proofs are presented in Appendix A.
|
| 86 |
+
|
| 87 |
+
Notations and assumptions. Let $\mathcal{V}$ be a finite vocabulary and $\mathcal{V}^*$ its Kleene closure, i.e., the set of all strings. Given a problem $x$ , we say a language model answers $y$ to this problem if the model outputs re $y$ where $r \in \mathcal{V}^*$ can be any "reasoning path" and $\mathrm{e} \in \mathcal{V}$ denotes a special token that marks the end of reasoning. We further assume that the answer string is always shorter than $L$ tokens, i.e., $|y| \leq L$ for some fixed $L \in \mathbb{N}^*$ where $|y|$ denotes the length of $y$ . For a language model $\pi$ , denote by $\pi(v|w)$ the probability of generating $v$ given input (prompt) $w$ . For a reward model $\rho$ , denote by $\rho(v)$ the score it assigns to the string $v$ . We use $\mathbb{I}$ to denote the indicator function.
|
| 88 |
+
|
| 89 |
+
Theorem 1. Consider a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^m$ where $x_i$ and $y_i$ denotes input and true answer, respectively. For a language model $\pi$ , denote by $\mathrm{acc}_n^{\mathrm{MV}}(\mathcal{D}; \pi)$ the accuracy on $\mathcal{D}$ using majority voting with $n$ samples. Following the notations and assumptions defined above, we have:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\lim _ {n \rightarrow + \infty} \operatorname {a c c} _ {n} ^ {\mathrm {M V}} (\mathcal {D}; \pi) = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} \left[ y _ {i} = \underset {| y | \leq L} {\arg \max } \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x _ {i}) \right] (a l m o s t s u r e l y);
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
a n d \mathbb {E} \left[ \mathrm {a c c} _ {n} ^ {\mathrm {M V}} (\mathcal {D}; \pi) \right] = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} \left[ y _ {i} = \underset {| y | \leq L} {\arg \max } \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x _ {i}) \right] - \mathcal {O} (c ^ {- n})
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
for some constant $c > 1$ .
|
| 100 |
+
|
| 101 |
+
Theorem 2. Consider a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^m$ . For a language model $\pi$ and a reward model $\rho$ , denote by $\mathrm{acc}_n^{\mathrm{WV}}(\mathcal{D}; \pi, \rho)$ the accuracy on $\mathcal{D}$ using weighted majority voting with $n$ samples. Following the notations and assumptions defined above, we have:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\lim _ {n \rightarrow + \infty} \operatorname {a c c} _ {n} ^ {\mathrm {W V}} (\mathcal {D}; \pi , \rho) = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} \left[ y _ {i} = \underset {| y | \leq L} {\arg \max } \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x _ {i}) \rho (x _ {i} r e y) \right] (a l m o s t s u r e l y);
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
a n d \quad \mathbb {E} \left[ \operatorname {a c c} _ {n} ^ {\mathrm {W V}} (\mathcal {D}; \pi , \rho) \right] = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} \left[ y _ {i} = \underset {| y | \leq L} {\arg \max } \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x _ {i}) \rho (x _ {i} r e y) \right] - \mathcal {O} (c ^ {- n})
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
for some constant $c > 1$ .
|
| 112 |
+
|
| 113 |
+
Remarks. Theorems 1 & 2 state the convergence of the accuracy with increasing number of samples, indicating that the performance gains of using more samples will saturate for any fixed models. The limit is determined by the likelihood of generating the correct answers through all possible reasoning paths (and the likelihood should be viewed as a weighted sum for weighted majority voting). This motivates us to consider inference algorithms that search for "good" reasoning paths, such as the tree-search-based variants detailed in Sec. 3.1.1 & 3.1.2.
|
| 114 |
+
|
| 115 |
+
Theorem 1 & 2 also present insights to compare standard majority voting with weighted majority voting. Informally, as long as the reward model is "better than random", i.e., assigning higher rewards to correct solutions on average, the accuracy limit of weighted majority voting is higher than that of majority voting. In our experiments, we consistently find that weighted majority voting dominates majority voting. Thus, we focus on best-of- $n$ and weighted majority voting in the main paper and defer majority voting results to Appendix D.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 3: Illustration of one iteration of REward BALanced SEarch (REBASE).
|
| 119 |
+
|
| 120 |
+
# 3.1.1 MONTE CARLO TREE SEARCH (MCTS)
|
| 121 |
+
|
| 122 |
+
Monte Carlo Tree Search (MCTS) has proven effective in domains such as board games where strategic decision-making is required (Silver et al., 2016; 2017; Jones, 2021). Recent work has shown that adapting MCTS to the context of LLMs can enhance the text generation process (Zhang et al., 2023; Zhou et al., 2024; Liu et al., 2024; Choi et al., 2023; Chen et al., 2024a; Tian et al., 2024; Chen et al., 2024a). In this context, MCTS is paired with a value model to score and guide the exploration steps. For additional background, we provide a review of MCTS in Appendix B.
|
| 123 |
+
|
| 124 |
+
Recent work in MCTS or its variants mainly focus on improving the performance (e.g., accuracy) on the studied tasks. However, generic comparisons of MCTS with conventional methods like best-of- $n$ and majority voting in terms of computational budget, measured in generated tokens or processing time are scarce or indicate potentially unfavorable cost-performance tradeoffs. For example, MCTS consumes substantially more resources, often requiring dozens of times more generated tokens than simpler methods. Specifically, a significant portion of the paths in the search tree are used to estimate and select nodes, and these paths do not necessarily become a part of the final candidate solution, although MCTS ensures that the sampled solutions comprise high-quality intermediate steps. In contrast, sampling methods generate multiple solutions in parallel and independently, and all the generated sequences are included in the candidate solutions. However, the intermediate steps in these sequences are not guaranteed to be of high quality, as there is no mechanism for pruning poor steps or exploiting promising ones.
|
| 125 |
+
|
| 126 |
+
This highlights the need for a new tree search method that can achieve a comparable (or better) performance as MCTS, and that is computationally less costly, with a cost similar to weighted majority voting and best-of- $n$ . This motivates our new method, Reward Balanced SEarch (REBASE).
|
| 127 |
+
|
| 128 |
+
# 3.1.2 REWARD BALANCED SEARCH (REBASE)
|
| 129 |
+
|
| 130 |
+
The REBASE tree search method, illustrated in Fig. 3, inherits the exploitation and pruning properties of tree search, while using a reward model alone to estimate quality of intermediate nodes. This saves inference compute compared to methods such as MCTS, since it does not involve estimate node quality with explicit rollouts. In short, the underlying idea is to use a process reward model to determine how much each node should be expanded at each depth. Namely, REBASE expands nodes at a given depth according to their softmax-normalized reward scores, subject to a total expansion budget. We describe this procedure in more detail below.
|
| 131 |
+
|
| 132 |
+
Notations. We view the fine-tuned LLM as a policy $\pi_{\theta}$ which generates the solution step by step. Given a question $x$ and the first $k$ steps of a solution $r_1 \cdots r_k$ , the $(k + 1)$ -th step is sampled from $\pi_{\theta}(\cdot | x r_1 \cdots r_k)$ . REBASE generates a solution tree during inference, in which the root node is the question $x$ , and other nodes correspond to solution steps. When generating solution trees, we generate children of $r_k$ by sampling from $\pi_{\theta}(\cdot | x r_1 \cdots r_k)$ . We use the corresponding solution step to denote a node. The reward of a node $r_k$ is generated by the PRM: $R(r_k) := R(x r_1 \cdots r_k)$ .
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4: MATH inference scaling across inference strategies and model sizes (lower is better). Detailed MCTS configurations can be found in Appendix B. The left/right panel shows the error rate on MATH based on weighted majority/best-of- $n$ . REBASE is the compute-optimal strategy at all budgets, with 7B typically the optimal model size.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
|
| 139 |
+
Initialization. Given the question $x$ , a balance temperature $T_{b} > 0$ , and target number of generated solutions $N$ , we sample $N$ instances of the first step for the question, yielding all the nodes of depth 1 in the search tree. We let the sampling budget of depth 0, $B_{0}$ , to $N$ at initialization.
|
| 140 |
+
|
| 141 |
+
Reward assignment and update. In the $i$ -th iteration, the PRM assigns the rewards to all the nodes at depth $i$ . After that, the algorithm examines whether the solutions up to depth $i$ are complete. Supposing there are $C_i$ completed solutions, we update the sampling budget using $B_i \gets B_{i-1} - C_i$ . If $B_i = 0$ , the process ends, and we obtain $N$ solutions.
|
| 142 |
+
|
| 143 |
+
Exploration balancing and expansion. For all of the nodes $n_j$ with reward $R(n_j)$ in the depth $i$ of the tree, we calculate the expansion width of the $n_j$ as:
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
W _ {j} = \operatorname {R o u n d} \left(B _ {i} \frac {\exp \left(R \left(n _ {j}\right) / T _ {b}\right)}{\sum_ {k} \exp \left(R \left(n _ {k}\right) / T _ {b}\right)}\right). \tag {1}
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
Then we sample $W_{j}$ children for $n_j$ for all the nodes in depth $i$ , and start the next iteration.
|
| 150 |
+
|
| 151 |
+
# 4 EXPERIMENTS
|
| 152 |
+
|
| 153 |
+
Our experiments are centered around two main questions:
|
| 154 |
+
|
| 155 |
+
- Compute-optimal model size: How does performance scale as inference-time compute is increased with a fixed inference strategy, but with varying model size?
|
| 156 |
+
- Compute-optimal inference strategy: How does performance scale as inference-time compute is increased with various inference strategies (and various model sizes)?
|
| 157 |
+
|
| 158 |
+
We detail our experimental setup below.
|
| 159 |
+
|
| 160 |
+
# 4.1 SETUP
|
| 161 |
+
|
| 162 |
+
Datasets. We conduct experiments on two mathematical problem-solving datasets to investigate the effects of scaling inference compute for both challenging and simpler problems. Specifically, MATH (Hendrycks et al., 2021a) and GSM8K (Cobbe et al., 2021) are datasets containing high school mathematics competition-level problems and grade-school level mathematical reasoning problems, respectively. Following Lightman et al. (2024); Wang et al. (2024); Sun et al. (2024), we use the MATH500 subset as our test set.
|
| 163 |
+
|
| 164 |
+
Policy model (solution generator). To study the how performance scales as inference compute is increased using a fixed strategy, the primary axis of variation is model size. Therefore, we choose Pythia (Biderman et al., 2023) as our base models, since various model sizes are available in the Pythia family. To study inference scaling under different inference strategies (e.g., tree search, weighted majority voting), we use math-specialized Llemma models (Azerbayev et al., 2024). We finetune these models on the MetaMath dataset (Yu et al., 2024) using full parameter supervised
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 5: GSM8k inference scaling across inference strategies and model sizes (lower is better). The left/right panel shows the problem-solving error rate on GSM8K based on weighted majority/best-of- $n$ . MCTS is not included in the comparison because of its poor compute-accuracy trade-off. REBASE is the compute-optimal inference strategy, and the optimal model size varies.
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
|
| 171 |
+
fine-tuning (Full-SFT), The finetuning configuration is given in the Appendix. Additionally, we test the Mistral-7B (Jiang et al., 2023) to expand our findings across different models and architectures.
|
| 172 |
+
|
| 173 |
+
Reward model. All of the experiments use the same Llemma-34B reward model, which we finetuned on the synthetic process reward modeling dataset, Math-Shepherd (Wang et al., 2024). We added a reward head to the model, enabling it to output a scalar reward at the end of each step.
|
| 174 |
+
|
| 175 |
+
Inference configuration. We use sampling and tree search methods to generate multiple candidates, and select the answer through best-of- $n$ , majority voting, or weighted voting. Each configuration is run multiple times to calculate the mean and variance, which mitigates effects from randomness and thereby improves the reliability of our conclusions. Unless explicitly stated otherwise, each point in the figures in this section corresponds to $2^{i}$ samples, where $i$ is an integer starting from 0.
|
| 176 |
+
|
| 177 |
+
# 4.2 COMPUTE-OPTIMAL MODEL SIZE
|
| 178 |
+
|
| 179 |
+
To compare the inference compute budgets of different models, we plot the figures with the number of FLOPs used per question during inference. We compute the inference FLOPs based on the commonly-used formula proposed by Kaplan et al. (2020).
|
| 180 |
+
|
| 181 |
+
Scaling law of compute-optimal inference for model size. Fig. 1 shows the relationship between inference compute and error rate for different model sizes. The error rate first decreases steadily and then starts to saturate. Initially, sampling many times from smaller models is compute-optimal. At larger compute budgets the larger models are preferable, since the performance of small models has saturated. As highlighted in the right panel of Fig. 1, the optimal model size varies based on the inference budget. We performed a regression analysis on inference FLOPs $C$ and model sizes $N$ to establish a relationship between a given computational budget and its optimal model size. The resulting equation, $\log_{10}(C) = 1.19\log_{10}(N) + 2.03$ , lets us estimate the optimal inference model size for a specific compute budget.
|
| 182 |
+
|
| 183 |
+
Llemma-7B achieves competitive accuracy to Llemma-34B with less compute. Fig. 4 and Fig. 5 shows the relationship between error rate and inference FLOPs for Llemma 7B and Llemma 34B using different inference strategies. Llemma-7B requires around $2 \times$ less total FLOPs than Llemma-34B to achieve comparable accuracy. This held across inference strategies (sampling strategies, MCTS, REBASE) and tasks (MATH, GSM8K). This result suggests that, with the same training dataset and model family, generating more tokens with a suitable inference strategy using a smaller model can have more favorable cost-performance tradeoffs than using a larger model.
|
| 184 |
+
|
| 185 |
+
# 4.3 COMPUTE-OPTIMAL INFERENCE STRATEGY
|
| 186 |
+
|
| 187 |
+
REBASE is Pareto-optimal. REBASE consistently achieves the best cost-performance tradeoffs, outperforming the sampling-based methods in all settings when fixing the model and the evaluation task (Fig. 4, 5, 6, and 7). For example, in Fig. 4, REBASE is the compute-optimal strategy at all
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 6: MATH inference scaling across inference strategies and models (lower is better). The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, W.M. and BoN refer to weighted majority and best-of- $n$ , respectively.
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 7: GSM8K inference scaling across inference strategies and models (lower is better). The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, W.M. and BoN refer to weighted majority and best-of- $n$ , respectively.
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 8: Comparisons of sampling and REBASE using weighted majority voting on MATH-easy problems (levels 1-2) and MATH-hard problems (levels 3-5). The tested models are Llemma-7B and Llemma-34B.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
|
| 212 |
+
inference compute budgets, with 7B typically the optimal model size. On the other hand, MCTS underperforms the sampling-based methods at each compute budget, likely due to its costly rollouts (Fig. 4) compared to the efficient use of the reward model in REBASE.
|
| 213 |
+
|
| 214 |
+
Tab. 1 shows that REBASE achieves better accuracy with a lower compute budget compared to sampling-based weighted voting. With the 7B model, REBASE achieves higher accuracy with 7 times less compute. This finding is novel, and differs from previous tree search methods that typically improve the performance at the cost of higher computational expense compared to sampling-based voting (Chen et al., 2024a; Xie et al., 2023).
|
| 215 |
+
|
| 216 |
+
REBASE yields greater gains on hard problems. The MATH dataset assigns each problem a difficulty level from 1 to 5. This enables a finer-grained analysis of the relationship between problem
|
| 217 |
+
|
| 218 |
+
Table 1: REBASE with a lower compute budget achieves better accuracy compared to sampling with a higher compute budget. We use weighted voting to aggregate candidates for both sampling and REBASE.
|
| 219 |
+
|
| 220 |
+
<table><tr><td></td><td># Samples</td><td>FLOPs</td><td>MATH500 Accuracy (%)</td></tr><tr><td colspan="4">Mistral-7B</td></tr><tr><td>Sampling</td><td>256</td><td>8.70 × 1014</td><td>42.8</td></tr><tr><td>REBASE</td><td>32</td><td>1.36 × 1014</td><td>45.0</td></tr><tr><td colspan="4">Llemma-7B</td></tr><tr><td>Sampling</td><td>256</td><td>10.0 × 1014</td><td>45.5</td></tr><tr><td>REBASE</td><td>32</td><td>1.48 × 1014</td><td>46.8</td></tr><tr><td colspan="4">Llemma-34B</td></tr><tr><td>Sampling</td><td>64</td><td>12.1 × 1014</td><td>46.7</td></tr><tr><td>REBASE</td><td>32</td><td>7.08 × 1014</td><td>49.2</td></tr></table>
|
| 221 |
+
|
| 222 |
+
difficulty and inference strategy. We divide the MATH test set into MATH-easy (levels 1-2) and MATH-hard (levels 3-5) and compare REBASE to sampling on these two subsets. The results are shown in Fig. 8. The performance of sampling and REBASE on easy problems (levels 1-2) is comparable. However, REBASE demonstrates a significant advantage on harder problems (levels 3-5). This suggests that advanced inference strategies like tree search are especially effective for solving difficult problems.
|
| 223 |
+
|
| 224 |
+
REBASE saturates later than sampling with higher accuracy. From Fig. 6 and Fig. 7, we observe that both sampling and REBASE saturate early in GSM8K and relatively late in MATH. We attribute this to the difference of in difficulty levels between GSM8K and MATH. Specifically, the LLM may assign high probability only to correct solutions in easy problems, but spread probability mass across solutions in harder problems. Thus, harder problems may require aggregating over more solution paths to converge to the distribution over answers shown in Theorems 1 & 2. On MATH (Fig. 6), we see that REBASE finally saturates with a higher accuracy than sampling. We hypothesize the reason is that drawing samples from REBASE corresponds to sampling from a policy that assigns high probability to true answers compared to sampling from the underlying language model. If this was indeed the case, Theorems 1 & 2 indicate that the upper bound would become higher. We leave formally analyzing the behavior of tree search algorithms as interesting future work.
|
| 225 |
+
|
| 226 |
+
# 5 CONCLUSIONS
|
| 227 |
+
|
| 228 |
+
We study the relationship between task performance and the amount of compute expended during inference for various model sizes, model families, and inference strategies, to form empirical inference scaling laws. These relationships let us reason about compute-optimal inference: inference configurations that give the best performance at a given compute budget.
|
| 229 |
+
|
| 230 |
+
Our results lead to three main takeaways. First, we find that using a smaller model and generating more tokens in an inference strategy often outperforms using a larger model at a fixed compute budget. This has implications for models deployed in the real world, where inference compute is constrained in various ways. Specifically, it is potentially beneficial to deploy smaller models with more sophisticated inference strategies for better cost-performance trade-off. Second, we show that in the limit of infinite compute (allocated by drawing more samples), sampling-based majority voting strategies inevitably saturate to a distribution that depends on the underlying generation policy. Hence, it is of interest to alter the sampling distribution by designing an alternative inference strategy. Third, we design such an inference strategy—the novel REBASE tree search—and find it is Pareto optimal, in that it achieves the best performance across all tested compute budgets. Notably, it outperforms commonly used weighted majority voting and MCTS methods that have attracted much interest and widespread use. This finding not only shows the strength of REBASE, but also indicates that there is large headroom to improve language model performances via inference-time algorithms.
|
| 231 |
+
|
| 232 |
+
# ACKNOWLEDGMENT
|
| 233 |
+
|
| 234 |
+
Zhiqing Sun acknowledges the support of the Google Fellowship. Sean Welleck thanks NSF SCALE (NSF DMS 2134012) and Convergent Research.
|
| 235 |
+
|
| 236 |
+
# REFERENCES
|
| 237 |
+
|
| 238 |
+
David H Ackley, Geoffrey E Hinton, and Terrence J Sejnowski. A learning algorithm for boltzmann machines. Cognitive science, 9(1):147-169, 1985.
|
| 239 |
+
Ibrahim M Alabdulmohsin, Behnam Neyshabur, and Xiaohua Zhai. Revisiting neural scaling laws in language and vision. Advances in Neural Information Processing Systems, 35:22300-22312, 2022.
|
| 240 |
+
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models, 2021. URL https://arxiv.org/abs/2108.07732.
|
| 241 |
+
Zhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen Marcus McAleer, Albert Q. Jiang, Jia Deng, Stella Biderman, and Sean Welleck. Llemma: An open language model for mathematics. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=4WnqRR915j.
|
| 242 |
+
Stella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. Pythia: A suite for analyzing large language models across training and scaling. In International Conference on Machine Learning, pp. 2397-2430. PMLR, 2023.
|
| 243 |
+
Tim Brooks, Bill Peebles, Connor Holmes, Will DePue, Yufei Guo, Li Jing, David Schnurr, Joe Taylor, Troy Luhman, Eric Luhman, Clarence Ng, Ricky Wang, and Aditya Ramesh. Video generation models as world simulators, 2024. URL https://openai.com/research/video-generation-models-as-world-simulators.
|
| 244 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901, 2020.
|
| 245 |
+
Guoxin Chen, Minpeng Liao, Chengxi Li, and Kai Fan. Alphamath almost zero: Process supervision without process. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024a. URL https://openreview.net/forum?id=VaXnxQ3UKo.
|
| 246 |
+
Ziru Chen, Michael White, Ray Mooney, Ali Payani, Yu Su, and Huan Sun. When is tree search useful for llm planning? it depends on the discriminator. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 13659-13678, 2024b.
|
| 247 |
+
Sehyun Choi, Tianqing Fang, Zhaowei Wang, and Yangqiu Song. KCTS: Knowledge-constrained tree search decoding with token-level hallucination detection. In The 2023 Conference on Empirical Methods in Natural Language Processing, 2023. URL https://openreview.net/forum?id=7H45HfXsJb.
|
| 248 |
+
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240): 1-113, 2023.
|
| 249 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
|
| 250 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
|
| 251 |
+
|
| 252 |
+
Leo Gao, John Schulman, and Jacob Hilton. Scaling laws for reward model overoptimization. In International Conference on Machine Learning, pp. 10835-10866. PMLR, 2023.
|
| 253 |
+
Sachin Goyal, Ziwei Ji, Ankit Singh Rawat, Aditya Krishna Menon, Sanjiv Kumar, and Vaishnavh Nagarajan. Think before you speak: Training language models with pause tokens. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=ph04CRkPdC.
|
| 254 |
+
Sachin Goyal, Pratyush Maini, Zachary C Lipton, Aditi Raghunathan, and J Zico Kolter. Scaling laws for data filtering-data curation cannot be compute agnostic. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22702-22711, 2024b.
|
| 255 |
+
Alex Graves. Sequence transduction with recurrent neural networks. arXiv preprint arXiv:1211.3711, 2012.
|
| 256 |
+
Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. Measuring coding challenge competence with APPS. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2), 2021a. URL https://openreview.net/forum?id=sD93GOzH3i5.
|
| 257 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the MATH dataset. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2), 2021b. URL https://openreview.net/forum?id=7Bywt2mQsCe.
|
| 258 |
+
Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B. Brown, Prafulla Dhariwal, Scott Gray, et al. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020.
|
| 259 |
+
Joel Hestness, Sharan Narang, Newsha Ardalani, Gregory Diamos, Heewoo Jun, Hassan Kianinejad, Md Patwary, Mostofa Ali, Yang Yang, and Yanqi Zhou. Deep learning scaling is predictable, empirically. arXiv preprint arXiv:1712.00409, 2017.
|
| 260 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022.
|
| 261 |
+
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.
|
| 262 |
+
Andy L Jones. Scaling scaling laws with board games. arXiv preprint arXiv:2104.03113, 2021.
|
| 263 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 264 |
+
Aitor Lewkowycz, Anders Johan Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Venkatesh Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur, Guy Gur-Ari, and Vedant Misra. Solving quantitative reasoning problems with language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=IFXTZERXdM7.
|
| 265 |
+
Yifei Li, Zeqi Lin, Shizhuo Zhang, Qiang Fu, Bei Chen, Jian-Guang Lou, and Weizhu Chen. Making language models better reasoners with step-aware verifier. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5315-5333, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.291. URL https://aclanthology.org/2023.acl-long.291.
|
| 266 |
+
|
| 267 |
+
Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let's verify step by step. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=v8L0pN6EOi.
|
| 268 |
+
Haowei Lin, Baizhou Huang, Haotian Ye, Qinyu Chen, Zihao Wang, Sujian Li, Jianzhu Ma, Xiaojun Wan, James Zou, and Yitao Liang. Selecting large language model to fine-tune via rectified scaling law. In International Conference on Machine Learning, pp. 30080-30107. PMLR, 2024.
|
| 269 |
+
Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. Program induction by rationale generation: Learning to solve and explain algebraic word problems. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 158-167, 2017.
|
| 270 |
+
Jiacheng Liu, Andrew Cohen, Ramakanth Pasunuru, Yejin Choi, Hannaneh Hajishirzi, and Asli Celikyilmaz. Don't throw away your value model! generating more preferable text with value-guided monte-carlo tree search decoding. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=kh9Zt2Ldmn.
|
| 271 |
+
Niklas Muennighoff, Alexander Rush, Boaz Barak, Teven Le Scao, Nouamane Tazi, Aleksandra Piktus, Sampo Pyysalo, Thomas Wolf, and Colin A Raffel. Scaling data-constrained language models. Advances in Neural Information Processing Systems, 36:50358-50376, 2023.
|
| 272 |
+
Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021.
|
| 273 |
+
OpenAI. Gpt-4 technical report, 2023.
|
| 274 |
+
William Peebles and Saining Xie. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4195-4205, 2023.
|
| 275 |
+
Jacob Pfau, William Merrill, and Samuel R. Bowman. Let's think dot by dot: Hidden computation in transformer language models. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=NikbrdtYvG.
|
| 276 |
+
Jonathan S. Rosenfeld, Amir Rosenfeld, Yonatan Belinkov, and Nir Shavit. A constructive prediction of the generalization error across scales. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=ryenvpEKDr.
|
| 277 |
+
Nikhil Sardana, Jacob Portes, Sasha Doubov, and Jonathan Frankle. Beyond chinchilla-optimal: Accounting for inference in language model scaling laws. In International Conference on Machine Learning, pp. 43445-43460. PMLR, 2024.
|
| 278 |
+
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484-489, 2016.
|
| 279 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. nature, 550(7676):354-359, 2017.
|
| 280 |
+
Charlie Victor Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. Scaling test-time compute optimally can be more effective than scaling LLM parameters. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=4FWAwZtd2n.
|
| 281 |
+
Zhiqing Sun, Longhui Yu, Yikang Shen, Weiyang Liu, Yiming Yang, Sean Welleck, and Chuang Gan. Easy-to-hard generalization: Scalable alignment beyond human supervision. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=qwgfh2fTtN.
|
| 282 |
+
|
| 283 |
+
Virginia Teller. Speech and language processing: an introduction to natural language processing, computational linguistics, and speech recognition, 2000.
|
| 284 |
+
Ye Tian, Baolin Peng, Linfeng Song, Lifeng Jin, Dian Yu, Lei Han, Haitao Mi, and Dong Yu. Toward self-improvement of LLMs via imagination, searching, and criticizing. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=tPdJ2qHkOB.
|
| 285 |
+
Jonathan Uesato, Nate Kushman, Ramana Kumar, Francis Song, Noah Siegel, Lisa Wang, Antonia Creswell, Geoffrey Irving, and Irina Higgins. Solving math word problems with process- and outcome-based feedback. arXiv preprint arXiv:2211.14275, 2022.
|
| 286 |
+
Peiyi Wang, Lei Li, Zhihong Shao, Runxin Xu, Damai Dai, Yifei Li, Deli Chen, Yu Wu, and Zhifang Sui. Math-shepherd: Verify and reinforce LLMs step-by-step without human annotations. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 9426-9439, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.acl-long.510. URL https://aclanthology.org/2024.acl-long.510/.
|
| 287 |
+
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In The Eleventh International Conference on Learning Representations, 2023a. URL https://openreview.net/forum?id=1PL1NIMMrw.
|
| 288 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. Self-instruct: Aligning language models with self-generated instructions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 13484-13508, 2023b.
|
| 289 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian richter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=VjQlMeSB_J.
|
| 290 |
+
Sean Welleck, Amanda Bertsch, Matthew Finlayson, Hailey Schoelkopf, Alex Xie, Graham Neubig, Ilia Kulikov, and Zaid Harchaoui. From decoding to meta-generation: Inference-time algorithms for large language models. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id= eskQMcIbMS. Survey Certification.
|
| 291 |
+
Yuxi Xie, Kenji Kawaguchi, Yiran Zhao, Xu Zhao, Min-Yen Kan, Junxian He, and Qizhe Xie. Self-evaluation guided beam search for reasoning. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=Bw82hwg5Q3.
|
| 292 |
+
Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, and Karthik R Narasimhan. Tree of thoughts: Deliberate problem solving with large language models. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=5Xc1ecxO1h.
|
| 293 |
+
Jiahui Yu, Yuanzhong Xu, Jing Yu Koh, Thang Luong, Gunjan Baid, Zirui Wang, Vijay Vasudevan, Alexander Ku, Yinfei Yang, Burcu Karagol Ayan, Ben Hutchinson, Wei Han, Zarana Parekh, Xin Li, Han Zhang, Jason Baldridge, and Yonghui Wu. Scaling autoregressive models for content-rich text-to-image generation. Transactions on Machine Learning Research, 2022. ISSN 2835-8856. URL https://openreview.net/forum?id=AFDcYJKhND. Featured Certification.
|
| 294 |
+
Longhui Yu, Weisen Jiang, Han Shi, Jincheng YU, Zhengying Liu, Yu Zhang, James Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. Metamath: Bootstrap your own mathematical questions for large language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=N8N0hgNDRt.
|
| 295 |
+
Shun Zhang, Zhenfang Chen, Yikang Shen, Mingyu Ding, Joshua B. Tenenbaum, and Chuang Gan. Planning with large language models for code generation. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id= Lr8cOoTYbFL.
|
| 296 |
+
|
| 297 |
+
Andy Zhou, Kai Yan, Michal Shlapentokh-Rothman, Haohan Wang, and Yu-Xiong Wang. Language agent tree search unifies reasoning, acting, and planning in language models. In Proceedings of the 41st International Conference on Machine Learning, pp. 62138-62160, 2024.
|
| 298 |
+
|
| 299 |
+
# A OMITTED PROOFS
|
| 300 |
+
|
| 301 |
+
# A.1 PROOF OF THEOREM 1
|
| 302 |
+
|
| 303 |
+
Proof. Recall that we assume the answer must be shorter than $L$ tokens. Let $\mathcal{A} = \{v \mid |v| \leq L\}$ be the set of all possible answers. Let $\tilde{\pi}(y \mid x)$ be the probability of the language model $\pi$ outputting the answer $y$ to the question $x$ after marginalizing over the "reasoning paths", i.e.,
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\tilde {\pi} (y \mid x) = \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x).
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
Given an input $x$ , Assume that $y^{*} = \underset{y\in \mathcal{A}}{\arg \max}\tilde{\pi}(y|x)$ , $y' = \underset{y\in \mathcal{A}\setminus\{y^{*}\}}{\arg \max}\tilde{\pi}(y|x)$ , and denote
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\delta = \tilde {\pi} (y ^ {*} | x) - \tilde {\pi} (y ^ {\prime} | x).
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
For any $y$ , denote by $f_{n}(y)$ the number of times that the model answers $y$ in the first $n$ samples. Let $E_{n}$ be the event that majority voting with $n$ samples does not output $y^{*}$ . We note that $E_{n}$ happens only if there exists $y^{\prime \prime}$ such that $f_{n}(y^{\prime \prime}) \geq f_{n}(y^{*})$ . Therefore, by union bound,
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\begin{array}{l} \mathbb {P} \left(E _ {n}\right) \leq \mathbb {P} \left(\exists y ^ {\prime \prime} \in \mathcal {A} \backslash \left\{y ^ {*} \right\}, f _ {n} \left(y ^ {\prime \prime}\right) \geq f _ {n} \left(y ^ {*}\right)\right) \\ \leq \sum_ {y ^ {\prime \prime} \in \mathcal {A} \backslash \{y ^ {*} \}} \mathbb {P} \left(f _ {n} \left(y ^ {\prime \prime}\right) \geq f _ {n} \left(y ^ {*}\right)\right) \\ \leq \left| \mathcal {A} \right| \mathbb {P} \left(f _ {n} \left(y ^ {\prime}\right) \geq f _ {n} \left(y ^ {*}\right)\right) \\ \end{array}
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
Note that $f_{n}(y^{*}) - f_{n}(y^{\prime})$ can be viewed as a sum of $n$ i.i.d. random variables, which take value 1 with probability $\tilde{\pi} (y^{*}|x), - 1$ with probability $\tilde{\pi} (y^{\prime}|x)$ , and 0 otherwise. Thus, their expectations are all $\delta = \tilde{\pi} (y^{*}|x) - \tilde{\pi} (y^{\prime}|x)$ . By Hoeffding's inequality, we have
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\mathbb {P} \left(f _ {n} \left(y ^ {\prime}\right) \geq f _ {n} \left(y ^ {*}\right)\right) \leq \exp \left(- \frac {n \delta^ {2}}{2}\right).
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
Thus,
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\mathbb {P} (E _ {n}) \leq | \mathcal {A} | \exp \left(- \frac {n \delta^ {2}}{2}\right) \Rightarrow \sum_ {n = 1} ^ {+ \infty} \mathbb {P} (E _ {n}) < + \infty .
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
By Borel-Cantelli lemma, we have
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
\mathbb{P}\left(\limsup_{n\to +\infty}E_{n}\right) = 0,
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
which implies the following is true almost surely:
|
| 340 |
+
|
| 341 |
+
$$
|
| 342 |
+
\exists N \in \mathbb {N} ^ {*}, \text {s u c h t h a t f o r a n y} n \geq N, y ^ {*} = \underset {y \in \mathcal {A}} {\arg \max } f _ {n} (y)
|
| 343 |
+
$$
|
| 344 |
+
|
| 345 |
+
Hence
|
| 346 |
+
|
| 347 |
+
$$
|
| 348 |
+
\lim _ {n \rightarrow + \infty} \operatorname {a c c} _ {n} ^ {\mathrm {M V}} (\{(x, y) \}; \pi) = \mathbb {I} [ y = y ^ {*} ] \qquad (\text {a l m o s t s u r e l y}).
|
| 349 |
+
$$
|
| 350 |
+
|
| 351 |
+
Recall the definition of $y^*$ , the above shows the theorem is true for a dataset with a single example $\{(x, y)\}$ . For general datasets $\mathcal{D}$ with $m$ examples, one can apply the above argument to each example and combine the results to conclude the proof of the almost-sure convergence.
|
| 352 |
+
|
| 353 |
+
Next, we prove the asymptotic result on $\mathbb{E}\left[\mathrm{acc}_n^{\mathrm{MV}}(\{\mathcal{D}\} ;\pi)\right]$ . We slightly abuse notation for simplicity as follows: We let $y^{*}(x_{i}) = \arg \max \tilde{\pi} (y|x_{i})$ , $y^\prime = \arg \max \tilde{\pi} (y|x_i)$ , and let
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
y \in \mathcal {A} \quad y \in \mathcal {A} \backslash \{y ^ {*} (x _ {i}) \}
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
$$
|
| 360 |
+
\delta_ {\min } = \min _ {(x _ {i}, y _ {i}) \in \mathcal {D}} \tilde {\pi} (y ^ {*} (x _ {i}) | x _ {i}) - \tilde {\pi} (y ^ {\prime} (x _ {i}) | x _ {i}).
|
| 361 |
+
$$
|
| 362 |
+
|
| 363 |
+
We denote by $E_{n}(x_{i})$ the event that majority voting with $n$ samples does not output $y^{*}(x_{i})$ given input $x_{i}$ . Then it's easy to see that
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
\mathbb {P} (E _ {n} (x _ {i})) \leq | \mathcal {A} | \exp \left(- \frac {n \delta_ {\operatorname* {m i n}} ^ {2}}{2}\right) \Rightarrow \mathbb {P} (E _ {n} (x _ {i})) = \mathcal {O} (c ^ {- n})
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
where $c > 1$ is a constant (which does not depend on $i$ ).
|
| 370 |
+
|
| 371 |
+
Note that if $\mathrm{acc}_n^{\mathrm{MV}}(\{x_i,y_i\};\pi) = 1$ , we have $y_{i} = y^{*}(x_{i})$ unless $E_{n}(x_{i})$ happens. In other words,
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
\begin{array}{l} \operatorname {a c c} _ {n} ^ {\mathrm {M V}} \left(\left\{x _ {i}, y _ {i} \right\}; \pi\right) \leq \mathbb {I} \left[ y _ {i} = y ^ {*} \left(x _ {i}\right) \right] + \mathbb {I} \left[ E _ {n} \left(x _ {i}\right) \right] \\ \Rightarrow \left| \mathbb {E} \left[ \mathrm {a c c} _ {n} ^ {\mathrm {M V}} (\{x _ {i}, y _ {i} \}; \pi) \right] - \mathbb {I} \left[ y _ {i} = y ^ {*} (x _ {i}) \right] \right| \leq \mathbb {P} (E _ {n} (x _ {i})) = \mathcal {O} (c ^ {- n}). \\ \end{array}
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
Taking a summation over the entire dataset $\mathcal{D}$ yields
|
| 378 |
+
|
| 379 |
+
$$
|
| 380 |
+
\left| \operatorname {a c c} _ {n} ^ {\mathrm {M V}} (\mathcal {D}; \pi) - \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} [ y _ {i} = y ^ {*} (x _ {i}) ] \right| \leq \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {P} (E _ {n} (x _ {i})) = \mathcal {O} (c ^ {- n}),
|
| 381 |
+
$$
|
| 382 |
+
|
| 383 |
+
which concludes the proof.
|
| 384 |
+
|
| 385 |
+

|
| 386 |
+
|
| 387 |
+
# A.2 PROOF OF THEOREM 2
|
| 388 |
+
|
| 389 |
+
Proof. The proof is similar to the proof of Theorem 1. We only need to set
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\tilde {\pi} (y \mid x) = \sum_ {r \in \mathcal {V} ^ {*}} \pi (r e y | x _ {i}) \rho (x _ {i} r e y).
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
Then the technique in the proof of Theorem 1 immediately applies.
|
| 396 |
+
|
| 397 |
+

|
| 398 |
+
|
| 399 |
+
# B MCTS DETAILS
|
| 400 |
+
|
| 401 |
+
In this section, we present additional background on the Monte Carlo Tree Search (MCTS) algorithm. The MCTS process can be formulated as the following steps:
|
| 402 |
+
|
| 403 |
+
Selection. The process begins at the root node. Here, the algorithm recursively selects the child node that offers the highest Upper Confidence Bound applied to Trees (UCT) value, continuing until a node is reached that has not been expanded. The UCT is calculated using the formula
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
U C T (s) = Q (s) + C \sqrt {\frac {\ln {(N (\mathrm {P a r e n t} (s)))}}{N (s)}},
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
where $Q(s)$ denotes the quality score of node $s$ , $N(s)$ is the number of visits to node $s$ , $\mathrm{Parent}(s)$ denotes the parent node of $s$ , and $C$ is a constant determining the level of exploration.
|
| 410 |
+
|
| 411 |
+
Expansion and evaluation. Upon reaching a non-terminal node $s$ , the node is expanded by generating multiple child nodes. Each child node $c$ is then evaluated using a value function $V(c)$ , which predicts the potential quality of continuing the sequence from node $c$ .
|
| 412 |
+
|
| 413 |
+
Backpropagation. After evaluation, the algorithm updates the UCT values and the visit counts for all nodes along the path from the selected node back to the root. For any node $n$ in this path, the updates are made as follows:
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\begin{array}{l} N (n) \leftarrow N (n) + 1, \\ Q (n) \leftarrow \frac {(N (n) - 1) Q (n) + V (s)}{N (n)}. \\ \end{array}
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
# C HYPER-PARAMETERS
|
| 420 |
+
|
| 421 |
+
Finetuning. All the hyperparameters for model fine-tuning can be found in Tab. 2. We preprocess the MetaMath Dataset to make the solutions in a stepwise format.
|
| 422 |
+
|
| 423 |
+
Table 2: Fine-tuning Hyper-parameters: LR refers to the learning rate, BS refers to the batch size. Pythia, Llemma-7B and LLemma-34B are the generators we use in our experiments, RM is short for Reward Model. We only use problems from GSM8K to train the Pythia models.
|
| 424 |
+
|
| 425 |
+
<table><tr><td>Model</td><td># Epoch</td><td>Dataset</td><td>BS</td><td>LR</td><td>Max Seq Length</td><td>Dtype</td></tr><tr><td>Pythia-410M</td><td>1</td><td>MetaMath (GSM8K)</td><td>128</td><td>8E-5</td><td>768</td><td>FP32</td></tr><tr><td>Pythia-1.4B</td><td>1</td><td>MetaMath (GSM8K)</td><td>128</td><td>4E-5</td><td>768</td><td>FP32</td></tr><tr><td>Pythia-2.8B</td><td>1</td><td>MetaMath (GSM8K)</td><td>128</td><td>3E-5</td><td>768</td><td>FP32</td></tr><tr><td>Pythia-6.9B</td><td>1</td><td>MetaMath (GSM8K)</td><td>128</td><td>2E-5</td><td>768</td><td>FP32</td></tr><tr><td>Pythia-12B</td><td>1</td><td>MetaMath (GSM8K)</td><td>128</td><td>1E-5</td><td>768</td><td>FP32</td></tr><tr><td>Llemma-7B</td><td>1</td><td>MetaMath</td><td>128</td><td>8E-6</td><td>1024</td><td>FP32</td></tr><tr><td>Llemma-34B</td><td>1</td><td>MetaMath</td><td>128</td><td>8E-6</td><td>768</td><td>FP32</td></tr><tr><td>Llemma-34B RM</td><td>2</td><td>Math-Shepherd</td><td>128</td><td>1E-5</td><td>768</td><td>BF16</td></tr></table>
|
| 426 |
+
|
| 427 |
+
Inference. For all the inference strategies, the temperature for LLM token generation is set to 1.0. Max tokens for the output is 1024 and max tokens for one step is 256. For REBASE, we set the balance temperature (i.e., the parameter $T_{b}$ in Eq. (1)) to 0.1. For MCTS, we set $C$ in the UCT value to 1 and we expand 4, 8, 16 children for the root, 2 children for other selected nodes with total 32, 64, 128 expansions respectively. New expanded nodes will be assigned values by the PRM, and then backpropagate the $Q$ values through the process described in the last section.
|
| 428 |
+
|
| 429 |
+
# D ADDITIONAL EXPERIMENTAL RESULTS
|
| 430 |
+
|
| 431 |
+
# D.1 MAJORITY VOTING EXPERIMENT RESULTS
|
| 432 |
+
|
| 433 |
+
In this section, we additionally include experimental results on the majority voting method, along with its comparison with weighted majority voting (Fig. 9, 10, 11, 12). The experiments show that although the gap between majority voting and weighted majority voting on sampling is huge. This gap becomes much smaller if we apply REBASE. This phenomenon can be caused by the selection ability of tree search like REBASE. Once REBASE already samples solutions with high rewards, conducting weighted majority voting gains less since the sampled solutions may all have relatively high and stable rewards compared with those of sampling.
|
| 434 |
+
|
| 435 |
+
# D.2 ADDITIONAL EXPERIMENTS ON LLAMA3 MODELS
|
| 436 |
+
|
| 437 |
+
We conduct additional experiments with Llama3-8B-Instruct (Dubey et al., 2024) model on MATH and GSM8K datasets, as shown in Fig. 13. Results for code generation task MBPP are presented (Austin et al., 2021) in Tab. 3. These experiments demonstrate that our conclusions generalize to the Llama3 architecture and coding tasks, confirming that increased computational effort improves performance until saturation is reached, and REBASE reaches the optimal performance-compute trade-off.
|
| 438 |
+
|
| 439 |
+
In mathematical reasoning tasks, REBASE consistently outperforms the sampling approach across different answer selection strategies, including best-of- $n$ , majority voting, and weighted voting. The highest performance on each dataset is achieved using REBASE. Specifically, on GSM8K, REBASE combined with weighted majority voting using 128 samples achieves an accuracy of $90.2\%$ , surpassing the best accuracy of $89.7\%$ obtained by the sampling method with 256 samples using the best-of- $n$ strategy. Similarly, on MATH, REBASE with weighted majority voting using 128 samples
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
Figure 9: The inference scaling laws of different models for the problem-solving error rate on MATH test set. The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, M.V. refer to majority voting.
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
|
| 446 |
+

|
| 447 |
+
|
| 448 |
+

|
| 449 |
+
Figure 10: The inference scaling laws of different models for the problem-solving error rate on GSM8K test set. The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, M.V. refer to majority voting.
|
| 450 |
+
|
| 451 |
+

|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
|
| 455 |
+

|
| 456 |
+
Figure 11: The inference scaling laws of different models for the problem-solving error rate on MATH test set. The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, M.V. and W.M. refer to majority voting and weighted majority, respectively.
|
| 457 |
+
|
| 458 |
+

|
| 459 |
+
|
| 460 |
+

|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
Figure 12: The inference scaling laws of different models for the problem-solving error rate on GSM8K test set. The tested models are Llemma-7B (left), Llemma-34B (middle), & Mistral-7B (right). In the legend, M.V. and W.M. refer to majority voting and weighted majority, respectively.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
|
| 467 |
+

|
| 468 |
+
|
| 469 |
+
Table 3: Zero shot pass rates of Sampling and REBASE on MBPP code generation task.
|
| 470 |
+
|
| 471 |
+
<table><tr><td># Samples</td><td>Sampling FLOPs</td><td>Sampling Pass Rate</td><td>REBASE FLOPs</td><td>REBASE Pass Rate</td></tr><tr><td>8</td><td>8 × 1012</td><td>63</td><td>8.3 × 1012</td><td>69.6</td></tr><tr><td>16</td><td>16 × 1012</td><td>69.4</td><td>17.5 × 1012</td><td>72.4</td></tr><tr><td>32</td><td>32 × 1012</td><td>72.4</td><td>34.9 × 1012</td><td>75.8</td></tr><tr><td>64</td><td>64 × 1012</td><td>79</td><td>69.2 × 1012</td><td>81.4</td></tr></table>
|
| 472 |
+
|
| 473 |
+
achieves an accuracy of $47.4\%$ , significantly outperforming the sampling method's best accuracy of $41.9\%$ with 256 samples using best-of- $n$ .
|
| 474 |
+
|
| 475 |
+
For the code generation task MBPP, we analyze scaling behavior and compute-optimal inference through pass rate evaluation. The results confirm that REBASE is more compute-efficient than sampling. This advantage can be attributed to the use of a reward model that evaluates partial code solutions. By conducting one iteration of REBASE, our method prunes suboptimal partial solutions while encouraging exploration of promising ones, thereby enhancing computational efficiency and solution quality.
|
| 476 |
+
|
| 477 |
+
# D.3 COMPARISON OF DIFFERENT STRATEGIES ACROSS DIFFERENT MODELS
|
| 478 |
+
|
| 479 |
+
We show the accuracy of different strategies under a specific compute budget in Tab. 4.
|
| 480 |
+
|
| 481 |
+

|
| 482 |
+
Figure 13: GSM8K (left) and MATH (right) inference scaling across inference strategies and models (lower is better). The tested model is Llama3-instruct-8B. In the legend, M.V., W.M., and BoN refer to majority voting, weighted majority, and best-of- $n$ , respectively.
|
| 483 |
+
|
| 484 |
+

|
| 485 |
+
|
| 486 |
+
Table 4: Accuracy of different inference configurations under a specific compute budget. MV, BoN and WV denote Majority Voting, best-of- $n$ and Weighted Voting,respectively.
|
| 487 |
+
|
| 488 |
+
<table><tr><td></td><td># SAMPLES</td><td>MATH FLOPs</td><td>GSM8K FLOPs</td><td>MATH500</td><td>GSM8K</td></tr><tr><td colspan="6">MISTRAL-7B</td></tr><tr><td>GREEDY</td><td>1</td><td>3.4 × 1012</td><td>2.3 × 1012</td><td>28.6</td><td>77.9</td></tr><tr><td>SAMPLING + MV</td><td>32</td><td>109.2 × 1012</td><td>72.6 × 1012</td><td>36.1</td><td>85.7</td></tr><tr><td>SAMPLING + BON</td><td>32</td><td>109.2 × 1012</td><td>72.6 × 1012</td><td>40.3</td><td>89.4</td></tr><tr><td>SAMPLING + WV</td><td>32</td><td>109.2 × 1012</td><td>72.6 × 1012</td><td>39.7</td><td>89.1</td></tr><tr><td>REBASE + MV</td><td>32</td><td>136.2 × 1012</td><td>78.9 × 1012</td><td>44.1</td><td>88.8</td></tr><tr><td>REBASE + BON</td><td>32</td><td>136.2 × 1012</td><td>78.9 × 1012</td><td>45.4</td><td>89.4</td></tr><tr><td>REBASE + WV</td><td>32</td><td>136.2 × 1012</td><td>78.9 × 1012</td><td>45.0</td><td>89.8</td></tr><tr><td colspan="6">LLEMMA-7B</td></tr><tr><td>GREEDY</td><td>1</td><td>3.92 × 1012</td><td>2.3 × 1012</td><td>30.0</td><td>68.5</td></tr><tr><td>SAMPLING + MV</td><td>32</td><td>125.4 × 1012</td><td>73.9 × 1012</td><td>41.0</td><td>80.0</td></tr><tr><td>SAMPLING + BON</td><td>32</td><td>125.4 × 1012</td><td>73.9 × 1012</td><td>41.7</td><td>85.6</td></tr><tr><td>SAMPLING + WV</td><td>32</td><td>125.4 × 1012</td><td>73.9 × 1012</td><td>43.5</td><td>85.4</td></tr><tr><td>REBASE + MV</td><td>32</td><td>148.0 × 1012</td><td>82.6 × 1012</td><td>46.1</td><td>86.1</td></tr><tr><td>REBASE + BON</td><td>32</td><td>148.0 × 1012</td><td>82.6 × 1012</td><td>44.1</td><td>86.9</td></tr><tr><td>REBASE + WV</td><td>32</td><td>148.0 × 1012</td><td>82.6 × 1012</td><td>46.8</td><td>87.3</td></tr><tr><td colspan="6">LLAMA3-INSTRUCT-8B</td></tr><tr><td>GREEDY</td><td>1</td><td>3.84 × 1012</td><td>2.28 × 1012</td><td>29.6</td><td>79.0</td></tr><tr><td>SAMPLING + MV</td><td>32</td><td>122.9 × 1012</td><td>73.2 × 1012</td><td>35.4</td><td>84.6</td></tr><tr><td>SAMPLING + BON</td><td>32</td><td>122.9 × 1012</td><td>73.2 × 1012</td><td>39.7</td><td>88.5</td></tr><tr><td>SAMPLING + WV</td><td>32</td><td>122.9 × 1012</td><td>73.2 × 1012</td><td>39.5</td><td>88.6</td></tr><tr><td>REBASE + MV</td><td>32</td><td>172.8 × 1012</td><td>79.3 × 1012</td><td>45.2</td><td>88.3</td></tr><tr><td>REBASE + BON</td><td>32</td><td>172.8 × 1012</td><td>79.3 × 1012</td><td>45.5</td><td>88.7</td></tr><tr><td>REBASE + WV</td><td>32</td><td>172.8 × 1012</td><td>79.3 × 1012</td><td>43.7</td><td>89.1</td></tr><tr><td colspan="6">LLEMMA-34B</td></tr><tr><td>GREEDY</td><td>1</td><td>19.0 × 1012</td><td>11.2 × 1012</td><td>33.0</td><td>78.4</td></tr><tr><td>SAMPLING + MV</td><td>8</td><td>152.3 × 1012</td><td>89.7 × 1012</td><td>39.9</td><td>84.3</td></tr><tr><td>SAMPLING + BON</td><td>8</td><td>152.3 × 1012</td><td>89.7 × 1012</td><td>40.4</td><td>86.7</td></tr><tr><td>SAMPLING + WV</td><td>8</td><td>152.3 × 1012</td><td>89.7 × 1012</td><td>41.0</td><td>86.0</td></tr><tr><td>REBASE + MV</td><td>8</td><td>176.8 × 1012</td><td>98.7 × 1012</td><td>43.9</td><td>86.1</td></tr><tr><td>REBASE + BON</td><td>8</td><td>176.8 × 1012</td><td>98.7 × 1012</td><td>43.6</td><td>86.9</td></tr><tr><td>REBASE + WV</td><td>8</td><td>176.8 × 1012</td><td>98.7 × 1012</td><td>42.9</td><td>86.9</td></tr></table>
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:edbf43d7cd5fe34eeaa00dad01e16d2ac0558b31cb4f9f9a8d1f30c589307616
|
| 3 |
+
size 1387116
|
ICLR/2025/Inference Scaling Laws_ An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22e537aaaa9ce49b6b60f44bb0816f8e4eaf2602393c5f96851ed60da9ff4069
|
| 3 |
+
size 622377
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a3d7392fbf46f4bbd9763c7ebcc110f8389b1c1ca51d39c6fd24e5a632f8d4b
|
| 3 |
+
size 159277
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a37bf11728487e1cf5ea26ac0157de34ca09ded021d9d6342e7bba8c0017e033
|
| 3 |
+
size 193228
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/72ae10f4-b71a-4bd3-a82f-a4f20ee24e40_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7d95f55efbd8e789c025c73d7280d6f12593f2d189b3f213c8d36c360e2d750
|
| 3 |
+
size 1437726
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/full.md
ADDED
|
@@ -0,0 +1,686 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFERENCE-AWARE FINE-TUNING FOR BEST-OF-N SAMPLING IN LARGE LANGUAGE MODELS
|
| 2 |
+
|
| 3 |
+
Yinlam Chow $^{\dagger}$ , Guy Tennenholtz $^{\ddagger}$ , Izzeddin Gur $^{\dagger}$ , Vincent Zhuang $^{\dagger}$ , Bo Dai $^{\dagger}$ ,
|
| 4 |
+
|
| 5 |
+
Sridhar Thiagarajan†, Craig Boutilier‡, Rishabh Agarwal†, Aviral Kumar†, Aleksandra Faust†
|
| 6 |
+
|
| 7 |
+
† Google Deepmind, ‡ Google Research
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Recent studies have indicated that effectively utilizing inference-time compute is crucial for attaining better performance from large language models (LLMs). In this work, we propose a novel inference-aware fine-tuning paradigm, in which the model is fine-tuned in a manner that directly optimizes the performance of the inference-time strategy. We study this paradigm using the simple yet effective Best-of-N (BoN) inference strategy, in which a verifier selects the best out of a set of LLM-generated responses. We devise the first imitation learning and reinforcement learning (RL) methods for BoN-aware fine-tuning, overcoming the challenging, non-differentiable argmax operator within BoN. We empirically demonstrate that our BoN-aware models implicitly learn a meta-strategy that interleaves best responses with more diverse responses that might be better suited to a test-time input—a process reminiscent of the exploration-exploitation trade-off in RL. Our experiments demonstrate the effectiveness of BoN-aware fine-tuning in terms of improved performance and inference-time compute. In particular, we show that our methods improve the Bo32 performance of Gemma 2B on Hendrycks MATH from $26.8\%$ to $30.8\%$ , and pass@32 from $60.0\%$ to $67.0\%$ , as well as the pass@16 on HumanEval from $61.6\%$ to $67.1\%$ .
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
An effective method for improving the performance of large language models (LLMs) is to leverage additional computation at inference-time: various works (Lightman et al., 2023; Wu et al., 2024; Kumar et al., 2024; Hosseini et al., 2024) have shown that by using search, re-ranking, multi-turn revision, and more generally, any approach that makes use of more tokens and inference-time compute, the performance of LLMs on various tasks can be significantly improved—so much that investing in improving inference-time computation might prove more beneficial than increasing model pre-training compute (Snell et al., 2024).
|
| 16 |
+
|
| 17 |
+
Despite this promise, existing work largely considers using inference-time computation as an optional post-hoc design choice, after conventional pre-training and fine-tuning. However, decoupling training and inference-time computation is not optimal; for example, if we knew that an LLM is allowed to make multiple attempts to solve a math problem, then it may be better to fine-tune it to explore diverse problem-solving strategies, rather than simply generating the candidates that represent the model's best attempt at solving the problem. Within the context of reasoning problems, these performance gains may be significant, as LLMs often fail due to their inability to draw complex inferences about the input and their internal knowledge (Chen et al., 2024).
|
| 18 |
+
|
| 19 |
+
We argue that the effectiveness of inference-time computation can be substantially increased by explicitly considering the inference procedure during training. We study this inference-aware fine-tuning paradigm using the Best-of-N (BoN) inference strategy, where the LLM generates multiple candidate responses, and a verifier selects the best one according to some scoring function (Cobbe et al., 2021). When this verifier is the ground-truth scoring function, BoN is equivalent to pass@N, a widely-used method for inference-time compute scaling (Brown et al., 2024). In contrast with traditional fine-tuning methods such as supervised fine-tuning (SFT) or reinforcement learning (RL),
|
| 20 |
+
|
| 21 |
+
which are agnostic to the inference strategy used at test-time, our inference-aware (BoN-aware) methods directly optimize the performance of the BoN policy, and lead to significantly improved BoN performance at test time.
|
| 22 |
+
|
| 23 |
+
Our work makes several key contributions to the understanding and optimization of batch-of-neighbors (BoN) inference. (1) We formally define the inference-aware and BoN-aware problem setting, recognizing the crucial role of the inference strategy during training. (2) We establish a co-scaling behavior for BoN, quantifying the inherent trade-off between exploration and exploitation governed by the temperature $(T)$ and the number of samples $(N)$ . This analysis directly informs the design and optimization of our BoN-aware algorithms. By understanding how these interactions influence performance, we can effectively tune these parameters to achieve an optimal balance between exploration and exploitation in both our supervised and reinforcement learning settings. (3) We develop a BoN-aware supervised fine-tuning algorithm that aligns the target distribution with the BoN policy distribution. (4) We extend our method to a general BoN-aware RL framework, enabling the policy to learn and solve downstream tasks under the BoN inference strategy. To further enhance BoN-aware fine-tuning, we devise specialized algorithms inspired by methods optimizing pass@ $N$ accuracy, which promote implicit exploration and connect with established self-supervised learning techniques, particularly in scenarios where the environment reward can be used for verification. (5) Empirically, our experiments demonstrate the effectiveness of BoN-aware fine-tuning in terms of improved performance and inference-time compute. In particular, we show that our methods improve the Bo32 performance of Gemma 2B on Hendrycks MATH from $26.8\%$ to $30.8\%$ , and pass@32 from $60.0\%$ to $67.0\%$ , as well as the pass@16 on HumanEval from $61.6\%$ to $67.1\%$ .
|
| 24 |
+
|
| 25 |
+
# 2 INFERENCE-AWARE FINE-TUNING: A CASE STUDY WITH BEST-OF-N
|
| 26 |
+
|
| 27 |
+
Standard fine-tuning methods typically train LLMs to produce the best response for a given prompt. In LLM fine-tuning, a model (or policy) is trained via supervised fine-tuning (SFT), by maximizing the likelihood w.r.t. ground-truth data. Formally, we search for a policy $\pi : \mathcal{X} \mapsto \Delta_{\mathcal{Y}}$ that maximizes the likelihood $\mathbb{E}_{x \sim P, y \sim \pi^{*}(y|x)}[\log \pi(y|x)]$ , where here, $\mathcal{X}$ and $\mathcal{Y}$ are the space of prompts and outputs of an LLM, $P$ is the prompt distribution, and $\pi^{*}$ is a distribution of expert responses. Alternatively, the policy can be fine-tuned via reinforcement learning (RL) (Schulman et al., 2017): $\max_{\pi \in \Pi} \mathbb{E}_{x \sim P, y \sim \pi(x)}[R(x,y)]$ , to align the LLM's behaviors with the reward function $R(x,y)$ . While popular, these methods have not taken the LLM's inference-time strategies into the account.
|
| 28 |
+
|
| 29 |
+
Inference-Aware Fine-Tuning. To address the gap between how LLMs are trained and how they are used at inference time, we develop inference-aware fine-tuning. During inference, the learned policy $\pi$ is often not directly used; rather some inference strategy $I:\Pi \times \mathcal{X}\mapsto \Delta_{\mathcal{Y}}$ is applied to it. For example, $I$ can be the BoN strategy, which samples multiple candidate responses, and selects the best using the score function of some verifier; or $I$ might be a search mechanism (Lightman et al., 2023) or self-correction (Kumar et al., 2024). To account for this inference strategy $I$ , we alter the objective SFT and RL objectives to be "aware" of the inference strategy:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\max _ {\pi \in \Pi} \mathbb {E} _ {x \sim P, y \sim \pi^ {*} (y | x)} [ \log I (\pi , x) (y) ], \text {a n d} \quad \text {(I n f e r e n c e - A w a r e S F T)}
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\max _ {\pi \in \Pi} J (\pi) := \mathbb {E} _ {x \sim P, y \sim I (\pi , x)} [ R (x, y) ], \quad \text {(I n f e r e n c e - A w a r e R L)}
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
Indeed, Inference-Aware SFT and Inference-Aware RL are aware of the strategy $I$ . In what follows, we focus on the case where the inference strategy is BoN (i.e., $I \equiv \mathrm{BoN}$ ), in both the SFT and RL setups. As we will later see, this brings about new algorithms for training the policy.
|
| 40 |
+
|
| 41 |
+
BoN-Aware Problem Formulation. We begin by defining the BoN strategy. This inference strategy samples $N$ responses from a model with some temperature $T$ , and then selects the best one, based on some verifier score. Formally, the BoN inference policy can be written as:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
I (\pi , x) (y) = \pi_ {\text {b o n}} (y | x; \pi , r, N, T) := \arg \max _ {y ^ {\prime} \in \{y _ {1}, \dots , y _ {N} \}} r (x, y ^ {\prime}), \text {s . t .} y _ {i} \stackrel {T} {\sim} \pi (\cdot | x), x \in \mathcal {X}, \tag {1}
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $\stackrel{T}{\sim}$ is a sample with temperature $T$ , and $r: \mathcal{X} \times \mathcal{Y} \mapsto \mathbb{R}$ is a verifier score<sup>1</sup>. In what follows, when $r, N, T$ are clear from context, we write $\pi_{\mathrm{bon}}(y|x;\pi)$ . We see that the above strategy defines a class of BoN policies that is different from the learned policy $\pi$ , demonstrating the gap
|
| 48 |
+
|
| 49 |
+
between training and inference. We inject this class of BoN polices into the Inference-Aware SFT and Inference-Aware RL frameworks to derive the instantiation of inference-aware fine-tuning.
|
| 50 |
+
|
| 51 |
+
Besides closing the gap between training and inference and mitigating potential discrepancies between the verifier score $r$ and the true reward $R$ , BoN policies provide further benefits. The BoN mechanism introduces implicit exploration during training, bypassing the computational burden of explicit exploration (Cen et al., 2024). Selecting the best of $N$ samples allows the base policy to explore output variations, inducing a controlled exploration that can lead to more robust and generalizable policies, particularly in scaling behavior w.r.t. temperature $T$ and number of samples $N$ .
|
| 52 |
+
|
| 53 |
+
Optimizing the BoN policy class is notoriously difficult due to the non-differentiability of the arg max operator. Although several differentiable top- $k$ operators (Cuturi et al., 2019; Xie et al., 2020) might be exploited in $\pi_{\mathrm{bon}}$ , they induce approximation error, and more importantly, increase the computational cost dramatically. In our work, we derive a variational formulation of the learning problem w.r.t. $\pi_{\mathrm{bon}}$ without top- $k$ operators, allowing us to construct novel algorithms for inference-aware BoN, using both standard supervised imitation learning (Section 3) and RL (Section 4).
|
| 54 |
+
|
| 55 |
+
Exploration-Exploitation with BoN Sampling. BoN sampling offers a natural mechanism for balancing exploration and exploitation in response generation. Adding BoN inference to the base model effectively explore the diverse possibilities within the model's output space while also exploiting its knowledge to generate high-quality candidates. This exploration-exploitation trade-off is crucial for solving various tasks and improving generalizability. To quantify such a trade-off, we empirically verify the implicit exploration and exploitation properties of BoN. We do this by revealing optimal co-scaling w.r.t. temperature $T$ and number of samples $N$ . Specifically, for a fixed base policy $\pi$ , at any prompt $x \in \mathcal{X}$ there is an optimal temperature $T^{*}(x)$ and optimal number of samples $N^{*}(x)$ which maximize performance of BoN:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
N ^ {*} (x; \pi), T ^ {*} (x; \pi) \in \arg \max _ {N, T} \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (y | x; \pi , r, N, T)} [ R (x, y ].
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
To understand the connection between $N^{*}(x)$ and $T^{*}(x)$ , we assess the performance of Gemma 2B (Team et al., 2024) on the MATH benchmark (Hendrycks et al., 2021), when applying the BoN inference strategy. Figure 1 shows empirical frequencies of problems, when varying $T^{*}(x)$ and $N^{*}(x)$ (larger marker size signifies higher frequency). The figure depicts a tradeoff between $T$ and $N$ ,
|
| 62 |
+
|
| 63 |
+
reminiscent of the exploration-expoitation trade-off. When $T^{*}(x)$ is small, any $N$ is optimal (and particularly also a small $N$ ). These "easier" problems do not require heavy exploration (small $T^{*}$ ) and can therefore be more exploitative (small $N^{*}$ ). On the other hand, as $T^{*}$ increases, the base policy $\pi$ becomes more stochastic, resulting in more diversity and exploration. These more "difficult" problems, require more exploration (larger $T^{*}$ ), hence less exploitation (larger $N^{*}$ ). Indeed, in such cases, the distribution of $N^{*}$ shifts to high values. Our results suggest a tradeoff between exploration and exploitation, and further motivates the BoN-aware setup, which can account for this tradeoff uniformly across all samples.
|
| 64 |
+
|
| 65 |
+
Figure 1 also uncovers a cost-effective recipe for adjusting $T$ and $N$ for optimal BoN performance: we can learn how to fine-tune the model for better inference by simply adjusting these accessible parameters. However, it is important to note that relying solely on model selection has limitations. While this approach offers a computationally inexpensive way to improve BoN's inference-time performance, it may not fully capture the nuances of the LLM's behavior. With sufficient computational resources, general BoN-aware fine-tuning can further unlock performance gains by directly training the LLM to optimize for the exploration-exploitation trade-off of the BoN inference process.
|
| 66 |
+
|
| 67 |
+
# 3 SUPERVISED BON-AWARE FINE-TUNING
|
| 68 |
+
|
| 69 |
+
We begin by developing the BoN-aware SFT framework. Under this setting we assume we do not have access to the true reward, and only wish to maximize the likelihood of a dataset of expert
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 1: The relationship between the optimal number of samples $(N^{*})$ and optimal temperature $(T^{*})$ in BoN. The size of each marker at a given $(T,N)$ coordinate indicates the frequency of problems for which the $(T,N)$ pair resulted in the best BoN performance. The plot reveals a trade-off: "easier" problems have small $T^{*}$ and $N^{*}$ , while "harder" problems require a larger $T^{*}$ for exploration and consequently a larger $N^{*}$ .
|
| 73 |
+
|
| 74 |
+
examples. Recall the definition of the BoN policy $\pi_{\mathrm{bon}}$ in Equation (1). The Inference-Aware SFT version of BoN becomes:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\max _ {\pi \in \Pi} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\mathrm {b o n}} (y \mid x; \pi) ], \tag {2}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
A major difficulty in solving Equation (2) is the non-differentiability of the arg max operator in the BoN procedure. To address this, we can use the variational approximation of $\pi_{\mathrm{bon}}$ (see Section A.1)
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\pi_ {\text {b o n}} (y | x) \propto [ \pi (y | x) \cdot \exp (\lambda_ {N} Q _ {\pi} (x, y)) ], \tag {3}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $Q_{\pi}(x,y) = \mathbb{E}_{y' \sim \pi(\cdot|x)} \left[ \mathbf{1}_{r(x,y) \geqslant r(x,y')} \right]$ is the expected win-rate over base policy $\pi$ , characterizing the probability for which a response $y$ outperforms the responses generated by the base over the verifier score $r$ . The constant $\lambda_N > 0$ is a solution of a 1D-search problem (Gui et al., 2024) (see details in Appendix A.1). It can be shown that $\lambda_N$ is monotonically increasing in $N$ , and $\lambda_N \propto N$ approximately for large $N$ . Plugging the variational form of Equation (3) into Equation (2) yields:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\max _ {\pi \in \Pi} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\text {b o n}} (y | x) ] := \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \underbrace {\log \pi (y | x)} _ {\text {L i k e l i h o o d}} + \underbrace {\lambda_ {N} \cdot Q _ {\pi} (x , y) - \log Z _ {\pi} (x)} _ {\text {I n f e r e n c e - A w a r e n e s s}} \right], \tag {4}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $Z_{\pi}(x) = \mathbb{E}_{\pi (y|x)}[\exp (\lambda_N\cdot Q_{\pi}(x,y))]$ is the partition function.
|
| 93 |
+
|
| 94 |
+
The above optimization problem reveals two terms. While the first term tries to push the base policy $\pi$ into maximizing the likelihood of the data, the second term regularizes the policy to be more exploratory by increasing the data win rate over the policy. This in turn accounts for the sampling in BoN. For data efficiency when estimating the win rate $Q_{\pi}(x,y)$ we leverage a common practice in modeling pairwise preferences (Rafailov et al., 2023) to approximate the win rate with its "softened" counterpart: $Q_{\pi}(x,y)\approx \mathbb{E}_{y^{\prime}\sim \pi (\cdot |x)}[\sigma (r(x,y) - r(x,y^{\prime}))]$ , where $\sigma$ is the sigmoid function. Next, we exploit properties of policy gradient (Sutton et al., 1999) and the gradient of energy-based policies (Rafailov et al., 2024) to derive the gradient for Equation (4) (see Appendix A.2 for proof):
|
| 95 |
+
|
| 96 |
+
Lemma 1 (BoN-SFT). The gradient of Equation (4) w.r.t. LLM parameters $\theta \in \Theta$ of $\pi$ is given by $\mathbb{E}_{(x,y)\sim \mathcal{D}}[\nabla_{\theta}f(x,y;\theta)] - \mathbb{E}_{x\sim \mathcal{D},y\sim \pi_{bon}(\cdot |x)}[\nabla_{\theta}f(x,y;\theta)]$ , where
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\nabla_ {\theta} f (x, y; \theta) := \nabla_ {\theta} \log \pi_ {\theta} (y | x) - \lambda_ {N} \cdot \mathbb {E} _ {y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \mathbf {1} \{r (x, y) < r (x, y ^ {\prime}) \} \right]. \tag {5}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
Our formulation circumvents the non-differentiability of the BoN distribution, allowing solution of BoN-SFT via standard gradient-ascent algorithms. The individual terms of the gradient imply the following: (1) $\pi$ clones the expert behavior by maximizing its likelihood over $\mathcal{D}$ ; (2) it aligns with the verifier score ranking, which assigns a high win-rate to the expert over the base; (3) it avoids over-fitting by limiting its likelihood over the BoN sample; and (4) it maintains overall response quality by reducing the win rate between its best and average samples.
|
| 103 |
+
|
| 104 |
+
# 4 BON-AWARE FINE-TUNING USING REINFORCEMENT LEARNING
|
| 105 |
+
|
| 106 |
+
Training LLMs that are amenable to BoN sampling can be framed within the RL paradigm, which trains an agent (LLM) that optimizes its actions within an environment. In this context, the LLM generates N responses (candidates actions) for a given prompt (contexts). A separate macro agent (verifier) selects the candidate deemed most suitable according to a predefined criterion (e.g., probability of success). This action is then deployed to the environment, yielding a reward (e.g., task completion). The key challenge in training this agent lies in achieving two objectives simultaneously: (i) Enhancing agent's exploration capabilities to generate diverse candidates that cover the space of potential solutions and align with the verifier's preferences; (ii) Maximizing the environment reward of the final response. Motivated by this observation, we utilize RL for BoN-aware fine-tuning, enabling the development of more robust and adaptable LLMs. A schematic of the BoN-Aware RL framework is shown in Figure 2.
|
| 107 |
+
|
| 108 |
+
The BoN-Aware RL problem takes the following form:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\max _ {\pi \in \Pi} J (\pi) := \mathbb {E} _ {x \sim P, y \sim \pi_ {\mathrm {b o n}} (\cdot | x; \pi , r, N, T)} [ R (x, y) ]. \tag {6}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
We train the BoN policy $\pi_{\mathrm{bon}}$ (paramterized by $\pi$ ) to attain a high environment reward. Apart from enabling better exploration, using the environment reward $R(x,y)$ in BoN-RL allows the base policy to tolerate potential errors in the verifier $r(x,y)$ . We first develop a general algorithm for solving the BoN-aware RL problem. We then study an important subclass which assumes a binary reward, a common feature of many reasoning problems (e.g., math, code).
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 2: BoN-Aware RL fine-tuning, where $N$ independent samples are first drawn from base $\pi$ and ranked by the verifier $r$ . The BoN policy then optimizes the environment reward of the BoN samples (Lemma 2).
|
| 118 |
+
|
| 119 |
+
We begin with deriving a gradient estimator to the objective in Equation (6). Exploiting the connection between the BoN policy and its energy-based policy counterpart in Equation (10), and using derivations analogous to those in Lemma 1, we compute the gradient of $J(\theta)$ , which leads to a REINFORCE-style algorithm (Williams, 1992) (see Appendix A.3 for proof):
|
| 120 |
+
|
| 121 |
+
Lemma 2 (BoN-RL). The gradient of Equation (6) w.r.t. LLM parameters $\theta \in \Theta$ of $\pi$ is given by
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\nabla_ {\theta} J (\theta) = \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {b o n} (\cdot | x)} [ \nabla_ {\theta} \log \pi_ {\theta} (x, y) \cdot (R (x, y) - b (x)) ] \tag {7}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
- \lambda_ {N} \cdot \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {b o n} (\cdot | x), y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \mathbf {1} \{r (x, y) < r (x, y ^ {\prime}) \} \cdot (R (x, y) - b (x)) \right],
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $b(x) = \mathbb{E}_{y\sim \pi_{bon}(\cdot |x)}[\bar{R} (x,y)]$ is a baseline for variance reduction (Schulman et al., 2015).
|
| 132 |
+
|
| 133 |
+
This formulation resembles the standard REINFORCE gradient with the main difference of drawing samples from the BoN policy (instead from the base policy $\pi$ ). This allows one to solve BoN-RL via actor-critic methods (Sutton et al., 2009a). In practice, one can replace $b(x)$ with a learned value baseline $b_{\psi}(x)$ parameterized by $\psi$ , for which $\psi$ is updated by gradient descent w.r.t. the critic value loss. While BoN-RL inherits the benefits of verifier alignment from BoN-SFT, and can be viewed as a reward-weighted variant of the popular STaR method (Zelikman et al., 2022), generally it can be rather sample inefficient (especially when $N$ is large), as estimating both the value function $b(x)$ and the policy gradient in BoN-RL require samples from the BoN distribution. See Appendix C for a discussion on alleviation using BoN distillation (Sessa et al., 2024).
|
| 134 |
+
|
| 135 |
+
BoN-RL with Binary Reward and Verifier. While Lemma 2 provides a general method for BoN-aware RL, the policy gradient estimator in Equation (7) is sample inefficient for a general rewards and verifiers. However, many domains admit binary success/failure metrics (e.g., reasoning tasks, math, coding) which allow an efficient gradient estimator, obviating the need for value estimation. Specifically, with a binary reward known to the verifier, i.e., $R(x,y) = r(x,y) \in \{0,1\}$ , Theorem 1 of Sessa et al. (2024) implies the following closed-form solution of the BoN policy $\pi_{\mathrm{bon}}$ :
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\pi_ {\text {b o n}} (y | x) = \left\{ \begin{array}{l l} \pi (y | x) \cdot P _ {\text {f a i l}} (x) ^ {N - 1} & \text {i f} R (x, y) = 0 \\ \frac {\pi (y | x)}{1 - P _ {\text {f a i l}} (x)} \cdot \left(1 - P _ {\text {f a i l}} (x) ^ {N}\right) & \text {i f} R (x, y) = 1 \end{array} , \right. \tag {8}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where $P_{\mathrm{fail}}(x) \coloneqq \mathbb{E}_{y' \sim \pi(\cdot | x)} \left[ \mathbf{1}_{R(x, y')} = 0 \right]$ is the fraction of problems on which the base policy $\pi$ is incorrect. Under the binary assumption, $\pi_{\mathrm{bon}}$ is a weighted distribution of the base policy $\pi$ , whose importance sampling ratio depends on the its failure probability $P_{\mathrm{fail}}(x)$ . Introducing this closed form of $\pi_{\mathrm{bon}}$ to Lemma 2, we obtain the following policy gradient (see Appendix A.4 for proof):
|
| 142 |
+
|
| 143 |
+
Lemma 3 (BoN-RLB). Assume $R(x,y) \in \{0,1\}$ . The gradient of Equation (6) w.r.t. LLM parameters $\theta \in \Theta$ of $\pi$ is given by
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {b o n}, R = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot g _ {N} ^ {+} \left(P _ {f a i l} (x)\right) + \mathbb {E} _ {y \sim \pi_ {b o n}, R = 0} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot g ^ {-} \left(P _ {f a i l} (x)\right) \right],
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
where the positive and negative sample-dependent weights are given by
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
g _ {N} ^ {+} (p) = \frac {N \cdot p ^ {N - 1}}{1 - p ^ {N}}, \quad g ^ {-} (p) = \frac {N \cdot p}{1 - p}. \tag {9}
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
Lemma 3 not only reveals an efficient policy gradient estimator for binary reward, but more importantly demonstrates how BoN-RLB balances positive and negative examples in its gradient update. It proposes novel way to re-weigh BoN-RLB's training examples, which prioritizes harder examples (as $P_{\mathrm{fail}}(x) \to 1$ ) by giving their positive samples exponentially more influence and aggressively redistributing log likelihood away from incorrect responses. The significance of this asymmetric
|
| 156 |
+
|
| 157 |
+
Table 1: Summary of Our Best-of-N-Aware Fine-Tuning Methods
|
| 158 |
+
|
| 159 |
+
<table><tr><td>Method</td><td>Offline Data</td><td>Reward (R)</td><td>Verifier (R≠r)</td><td>Binary (R=r)</td><td>Positive Only</td><td>Closed Form</td></tr><tr><td>BoN-SFT</td><td>✓</td><td>×</td><td>✓</td><td>×</td><td>✓</td><td>×</td></tr><tr><td>BoN-RL-V</td><td>×</td><td>✓</td><td>✓</td><td>✓</td><td>×</td><td>×</td></tr><tr><td>BoN-RL-S</td><td>×</td><td>✓</td><td>×</td><td>✓</td><td>×</td><td>×</td></tr><tr><td>BoN-RLB</td><td>×</td><td>✓</td><td>×</td><td>✓</td><td>×</td><td>✓</td></tr><tr><td>BoN-RLB(P)</td><td>×</td><td>✓</td><td>×</td><td>✓</td><td>✓</td><td>✓</td></tr></table>
|
| 160 |
+
|
| 161 |
+
weighting scheme is that it infuses implicit exploration capabilities to the base policy. As Tajwar et al. (2024) observed, when the model reduces the likelihood of negative responses, it shifts that probability mass towards a mode of the learned policy - essentially reinforcing existing successful strategies (exploitation). However, if these high-likelihood regions later produce errors, the resulting negative gradient redistributes this mass again, pushing the model to explore other potential solutions. This iterative process of concentrating probability mass and subsequent redistribution through negative gradients drives a form of exploration: as long as the model can produce correct solutions, it need not devote most of its sampling budget $N$ on that but can also explore more diverse solutions.
|
| 162 |
+
|
| 163 |
+
Positive-only Weighting. Although we have illustrated the benefits of an asymmetric weighting scheme in BoN-RLB for exploration, training with both positive and negative examples may be infeasible (e.g., in a data-limited online RL system that only records positive examples). To tackle this, we apply a change of measure to Lemma 3 with the BoN distribution to derive a policy gradient that only involves positive examples (see Appendix A.5 for proof):
|
| 164 |
+
|
| 165 |
+
Corollary 4 (BoN-RLB(P)). Assume $R(x,y) \in \{0,1\}$ . The gradient of Equation (6) w.r.t. LLM parameters $\theta \in \Theta$ of $\pi$ is given by $\mathbb{E}_{x \sim \mathcal{D}}[\mathbb{E}_{y \sim \pi_{bon},R=1}[\nabla_\theta \log \pi_\theta(y|x)] \cdot \overline{g}_N^+(P_{fail}(x))]$ , where $\overline{g}_N^+(p) := \frac{N \cdot p^{N-1} \cdot (1-p)}{(1-p^N)}$ .
|
| 166 |
+
|
| 167 |
+
Notice that the weighting $\overline{g}^{+}(p,N)$ is monotonically increasing in $p\in [0,1]$ and lies within $[0,1]$ for any $N$ . Using this gradient update, BoN-RLB(P) resembles a weighted version of BoN-STaR (see Remark C.3 in the appendix), where it clones positive examples generated by the current BoN policy and up-weights the more difficult ones, where $P_{\mathrm{fail}}(x)$ is close to 1.
|
| 168 |
+
|
| 169 |
+
Table 1 summarizes different BoN-aware fine-tuning methods including: (1) BoN-SFT from Lemma 1, (2) BoN-RL from Lemma 2 with a verifier, BoN-RL-V, (3) BoN-RL with environment reward as verifier, BoN-RL-S, (4) BoN-RLB from Lemma 3, and (5) BoN-RLB(P) from Corollary 4. These methods are designed to leverage the BoN selection strategy during model fine-tuning, under different settings mentioned in Sections 3 and 4. BoN-SFT uses expert data but doesn't involve explicit reward learning. It relies on a verifier to select the best output and only trains with positive examples. BoN-RL-V and BoN-RL-S employ RL to optimize BoN performance, with the former using a verifier for response selection while the latter relying solely on a reward signal. BoN-RLB and BoN-RLB(P) also utilize RL on the special case of binary reward feedback ( $R = r \in \{0,1\}$ ). They both have closed-form solutions, which can lead to more efficient learning. BoN-RLB(P) only learns from positive examples, which might be beneficial for (e.g., safety-critical) situations where collecting negative data is difficult.
|
| 170 |
+
|
| 171 |
+
# 5 EXPERIMENTS
|
| 172 |
+
|
| 173 |
+
In this section we address the following questions: (1) Can we quantify the co-scaling relationship between the BoN number of samples $N$ and temperature $T$ , enabling joint optimization of these parameters? (2) Do inference-aware fine-tuning methods (SFT and RL) enhance the effectiveness of BoN sampling? (3) Do these improvements generalize across problem domains and BoN settings?
|
| 174 |
+
|
| 175 |
+
# 5.1 CO-SCALING ANALYSIS OF SAMPLE SIZE $N$ AND TEMPERATURE $T$ IN BON
|
| 176 |
+
|
| 177 |
+
We study the co-scaling behaviors of BoN and pass@ $N$ performance over varying $N$ and $T$ by experimenting pre-trained Gemma 2B and 9B models on the Hendrycks MATH benchmark (Hendrycks et al., 2021). Our experiments showed consistent co-scaling behaviors across different model sizes, therefore we summarize the results of 2B model below and include the 9B findings in Appendix D.1. As illustrated in Figure 3 (Figure 9, Figure 10 in Appendix D.1), pass@ $N$ consistently increases with higher $N$ , as commonly observed (Brown et al., 2024). Our analysis suggests that this relationship can be captured by a power-law function of the following form:
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 3: BoN and pass@ $N$ performance of Gemma 2B policy and reward models w.r.t. varying $N$ and $T$ . pass@ $N$ monotonically improves with $N$ ; BoN shows inflection points as $N$ increases. Colored dashed lines denote predictions of scaling functions; black dashed lines in BoN plot denote the last inflection points.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
|
| 184 |
+
$pass@N(T) \approx \exp(a(T)N^{b(T)})$ , where the parameters $a(T)$ and $b(T)$ are temperature-dependent and derived by fitting the model to data at a specific temperature $T$ . Further analysis of this scaling behavior (detailed in Appendix D.1) indicates that there is a strong positive correlation between the optimal temperature and $N$ , which aligns with the intuition that larger $N$ benefits from broader exploration (higher $T$ ), while smaller $N$ favors focused exploitation (constant $T$ ). This relationship is straightforward, as there are no verifier errors confounding the selection of best responses.
|
| 185 |
+
|
| 186 |
+
Our experiments demonstrate an intriguing relationship between BoN accuracy, $T$ , and $N$ . We find that lower temperatures generally yield better BoN accuracy. Furthermore, BoN accuracy generally decreases as $N$ increases, but degrades more rapidly with higher temperatures. With larger $N$ and $T$ , the increased randomness in the base policy inherently generates more "bad" samples (with poor accuracy). This phenomenon suggests that the verifier is sensitive to noise and may mistakenly select random outputs generated at higher temperatures as the best responses due to misalignment with the true reward (Type II error). Conversely, at very low temperatures, BoN accuracy improves with $N$ , indicating the algorithm remains in an exploitation phase. Optimal performance is observed at moderate $N$ values, striking a balance between exploration and exploitation.
|
| 187 |
+
|
| 188 |
+
# 5.2 INFERENCE-AWARE FINE-TUNING WITH BON SAMPLING
|
| 189 |
+
|
| 190 |
+
Experimental setup. We study 2B and 9B Gemma 2 models (Team et al., 2024) on canonical mathematical problem-solving and code generation benchmarks. For math, we train and evaluate on Hendrycks MATH benchmark (Hendrycks et al., 2021), and additionally evaluate on two held-out math benchmarks: Functional MATH (Srivastava et al., 2024) and MathOdyssey (Fang et al., 2024). For coding, we train on MBPP (Austin et al., 2021), and evaluate on HumanEval (Chen et al., 2021). More details of our experiments can be found in Appendix D.2.
|
| 191 |
+
|
| 192 |
+
Our main evaluation metrics are BoN and pass@N accuracies, i.e. the accuracies of the policies defined in Equation (1) with a learned verifier and ground-truth reward respectively. For math, we consider both metrics, using a learned verifier for BoN, and for coding, we consider only pass@N because test-case feedback is usually available.
|
| 193 |
+
|
| 194 |
+
We benchmark our proposed methods BoN-SFT, BoN-RL-V, BoN-RL-S, BoN-RLB, and BoN-RLB(P) against several baselines: (1) STaR from Remark C.3, which uses self-training over correctly generated responses; (2) RL (Lee et al., 2023) with verifier feedback (RL-V); (3) RL with environment feedback (RL-S); (4) standard SFT of the base policy (SFT, $N' = 1$ ); and (5) BoN with the pre-trained model (Base model). We denote by $(N', T')$ and $(N, T)$ the number of samples and temperature used in training and evaluation, respectively. We use $T = T' = 1.0$ unless specified otherwise. Similar to co-scaling, our experiments show similar trends with 2B and 9B models, therefore we summarize that of the 2B model below and defer the 9B results to Appendix D.3.
|
| 195 |
+
|
| 196 |
+
BoN-aware supervised fine-tuning. We first evaluate the BoN and pass@ $N$ performance of offline SFT methods, including BoN-SFT with various $N'$ , and base SFT ( $N' = 1$ ), with results shown in Figure 4. We find that base SFT significantly degrades upon the base model, indicating that it causes overfitting or lack of generalization. BoN-SFT is able to improve the BoN accuracy significantly, especially with increasing $N'$ . We find that BoN-SFT with $N' = 32$ achieves the best performance for both BoN accuracy and pass@ $N$ , suggesting that it is able to produce both high-
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 4: BoN Accuracy and pass@ $N$ accuracy for BoN-SFT with Gemma 2B models.
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
(a) Comparison of different methods.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
(b) BoN-RL-V with various $N'$ values.
|
| 208 |
+
Figure 5: BoN accuracy on BoN-RL methods and baselines, with Gemma 2B model on MATH.
|
| 209 |
+
|
| 210 |
+
quality and exploratory responses. To improve substantively over the base model, we next turn to RL, which should be more effective by virtue of being on-policy.
|
| 211 |
+
|
| 212 |
+
BoN-RL-V improves BoN Accuracy. Our BoN RL algorithm, BoN-RL-V, with $N' = 32$ , significantly outperforms several baselines (Figure 5a). Specifically, it boosts the Bo-32 accuracy of our base model from $26.8\%$ to $30.8\%$ . As expected, the inference-unaware RL-V method performs poorly, likely due to common reward hacking issues (Jinnai et al., 2024). We also find that training with the same verifier used as test-time is critical - our other proposed inference-aware methods that use the environment reward instead of the verifier (BoN-RL-S and BoN-RLB) show improvement over the base model but are substantially worse than BoN-RL-V.
|
| 213 |
+
|
| 214 |
+
We plot the performance of BoN-RL-V with different training $N'$ in Figure 5b, and observed the best performance when training with 32 samples ( $N' = 32$ ). Interestingly, although the gains are more pronounced at higher $N$ values, training with large $N'$ leads to consistent improvements across all $N = 1$ to 32. This suggests that RL-BoN-V not only optimizes the specific BoN setting it was trained on, but also generalizes to other BoN configurations, including large improvements on direct $N = 1$ accuracy (from $22\%$ to $26\%$ ). We hypothesize that the RL-BoN-V method significantly enhances BoN accuracy by effectively exploring a larger sample space during training. Training with a large $N'$ allows the base policy to explore a wider range of responses to generate higher-quality responses, similar to how effective exploration in RL leads to better performance and generalization across different scenarios.
|
| 215 |
+
|
| 216 |
+
BoN-RL-S, BoN-RLB, and BoN-RLB(P) improve pass@ $N$ . We next analyze the pass@ $N$ performance of various methods on math and coding benchmarks, aiming to understand how different training approaches impact the models' ability to generate diverse and correct solutions. As shown in Figure 6, our inference-aware methods designed to explicitly optimize pass@ $N$ during training (BoN-RL-S, BoN-RLB, or BoN-RLB(P)) can lead to better test-time pass@ $N$ across both domains, highlighting the importance of directly considering the desired evaluation metric during training. Notably, in the MATH domain (Figure 6a), BoN-RL-S significantly improves the pass@32 of Gemma 2B from 60.0% to 67.0%. This suggests that by encouraging the model to explore a wider range of solution strategies during training, we can substantially enhance its ability to generate correct answers. Conversely, standard RL with $N' = 1$ slightly degrades pass@32, indicating
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
(a) MATH.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
(b) HumanEval.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 6: pass@ $N$ of BoN-RL methods with binary reward as verifier, with Gemma 2B models.
|
| 226 |
+
(a) Functional MATH.
|
| 227 |
+
Figure 7: pass@ $N$ of BoN-RL and baselines on held-out benchmarks with Gemma 2B models.
|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
(b) MathOdyssey.
|
| 231 |
+
|
| 232 |
+
that over-optimizing for immediate performance can actually hinder the model's exploration capabilities and limit its overall problem-solving ability. Interestingly, BoN-RL-V does not significantly improve pass@ $N$ , likely because its training objective focuses on robustness to a verifier, which may not perfectly align with generating diverse correct solutions. Similar trends are observed on coding benchmarks (Figure 6b), where pass@ $N$ -aware methods, particularly BoN-RLBP, significantly outperform the base model, increasing the pass@16 performance of Gemma 2B from $61.6\%$ to $67.1\%$ . Again, standard RL fine-tuning $(N' = 1)$ negatively impacts performance, reducing pass@16 to $59.8\%$ , demonstrating the downsides of solely focusing on reward maximization during training
|
| 233 |
+
|
| 234 |
+
Generalization of BoN-RL to held-out benchmarks and other temperatures. To further assess the generalization capabilities of our BoN aware fine-tuned models, we evaluate their performance on two challenging, held-out benchmarks: Functional Math (Srivastava et al., 2024) and Math-Odyssey (Fang et al., 2024). As shown in Figure 7, our fine-tuned models demonstrate clear improvements on both benchmarks. Our BoN-aware policies also generalize well to different sampling settings. As shown in Figure 8, BoN-RL-V (trained with $T' = 1.0$ ) consistently outperform the base model across all evaluation temperatures ( $T \in \{0.1, 1.0, 1.5\}$ ). Similarly, BoN-RL-S show superior performance for pass@ $N$ at all temperatures, with increasing gains at higher temperatures. This highlights the benefits of broader exploration, even after BoN-aware training. For BoN-accuracy, lower temperatures favored both models, but BoN-RL-V consistently excelled, particularly at lower temperatures, demonstrating its generalizability across different exploration-exploitation regimes. Furthermore, BoN-RL-V show greater resilience to accuracy degradation at higher temperatures, suggesting an enhanced ability to adapt to verifier failure modes and mitigate Type-II errors.
|
| 235 |
+
|
| 236 |
+
# 6 RELATED WORK
|
| 237 |
+
|
| 238 |
+
Large language models (LLMs) can leverage inference-time computation to improve the quality of their generated outputs (Welleck et al., 2024), particularly on reasoning tasks. One common approach is to use chain-of-thought (Wei et al., 2022), where the model generates a step-by-step rationale before generating the final output. Another useful approach that can be combined with
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
(a) BoN Accuracy
|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
(b) $\mathrm{pass}@\mathcal{N}$
|
| 245 |
+
Figure 8: BoN and pass@ $N$ over various temperatures. BoN-RL with verifier and exact reward (solid lines) are trained with $T = 1.0$ . Dashed and solid lines show the base (Gemma 2B) and finetuned models respectively.
|
| 246 |
+
|
| 247 |
+
chain-of-thought is Best-of-N rejection sampling (Charniak & Johnson, 2005; Stiannon et al., 2020), which is our focus in this work. In Best-of-N, we generate multiple candidate outputs from an LLM and select the best output. BoN re-ranking can be done either using oracle information, such as checking final answers for solving math problems, which is also known as $\text{pass} @ N$ (Chen et al., 2021), or learned verifiers (Cobbe et al., 2021; Lightman et al., 2023; Hosseini et al., 2024; Zhang et al., 2024). Recent work also empirically analyzes strategies that optimally trade off additional test-time compute for improved performance (Wu et al., 2024; Snell et al., 2024).
|
| 248 |
+
|
| 249 |
+
Closely related to our approach is prior work that fine-tunes LLMs to improve their self-correction capabilities (Kumar et al., 2024; Snell et al., 2024) or search capabilities on planning tasks (Gandhi et al., 2024; Lehnert et al., 2024), which allows for more efficient scaling with test-time compute. By contrast, our work focuses on inference-aware fine-tuning that directly optimizes for Best-of-N performance, instead of an intermediate capability that be used at test-time.
|
| 250 |
+
|
| 251 |
+
To make an LLM amenable to test-time scaling, techniques like STaR (Zelikman et al., 2022) or $\mathrm{ReST^{EM}}$ (Singh et al., 2023) have been employed to fine-tune the model using on-policy data. This process leverages BoN sampling to iteratively generate better responses, and fine-tunes on this curated data, for which the LLM learns to improve its proposal distribution, effectively increasing the likelihood of generating high-quality outputs during inference.
|
| 252 |
+
|
| 253 |
+
Finally, our work is related to recent work on leveraging tree search to enhance decision-making in RL (Dalal et al., 2021). A key challenge in both BoN sampling and tree search lies in mitigating the impact of imperfect value estimation. Dalal et al. (2021) address this in tree search by penalizing actions leading to states with high $Q$ -value error, making inference more pessimistic for out-of-distribution samples. In contrast, we address BoN verifier error during training, learning responses robust to these errors and aligning training with inference. Our framework extends to tree search, using the verifier as an approximate $Q$ -function and optimizing policy robustness to its errors.
|
| 254 |
+
|
| 255 |
+
# 7 CONCLUSION
|
| 256 |
+
|
| 257 |
+
We introduced inference-aware fine-tuning, a novel paradigm that bridges the gap between training and inference for LLMs. Specifically for the Best-of-N inference strategy, we discovered a co-scaling law for BoN that guides the optimization of temperature and sample size, developed a gamut of fine-tuning algorithms that handle various imitation learning and reinforcement learning settings, training LLMs to generate diverse and high-quality outputs tailored for BoN inference, demonstrated the efficacy of these methods by significantly improving on BoN accuracy and pass@ $N$ on the standard MATH reasoning benchmark over state-of-the-art baselines, highlighting the robustness and generalizability of our approaches across various BoN configurations.
|
| 258 |
+
|
| 259 |
+
Our work exemplified how BoN-aware fine-tuning learns a meta-strategy, which interleaves best responses with more diverse responses that might be better suited for BoN sampling. These findings underscore the potential of inference-aware fine-tuning to unlock previously undiscovered capabilities in LLMs through aligning training methodologies with inference-time compute strategies. Future work includes extending this framework to incorporate more complex, inference algorithms (e.g., reasoning, critique-and-revise, MCTS), developing contextual BoN-aware algorithms that can generalize to various tasks, investigating the interplay between the co-scaling of temperature, sample size, and BoN-aware fine-tuning, and applying our algorithms to more larger-scale problems.
|
| 260 |
+
|
| 261 |
+
Reproducibility Statement. We utilize the publicly available Gemma 2B and 9B language models, the Hendrycks MATH benchmark, and the HumanEval coding benchmark – all accessible to the research community. Our experimental setup is described in detail in Section 5. Furthermore, the appendix provides comprehensive pseudo-code (Algorithms 1 to 4) and implementation details for our BoN-aware fine-tuning algorithms (BoN-SFT, BoN-RL, BoN-RLB, and BoN-RLB(P)). We also delve into the theoretical underpinnings of our methods in the main text and the appendix, enabling a thorough understanding of our approach.
|
| 262 |
+
|
| 263 |
+
# REFERENCES
|
| 264 |
+
|
| 265 |
+
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
|
| 266 |
+
Mohammad Gheshlaghi Azar, Zhaohan Daniel Guo, Bilal Piot, Remi Munos, Mark Rowland, Michal Valko, and Daniele Calandriello. A general theoretical paradigm to understand learning from human preferences. In International Conference on Artificial Intelligence and Statistics, pp. 4447-4455. PMLR, 2024.
|
| 267 |
+
Ahmad Beirami, Alekh Agarwal, Jonathan Berant, Alexander D'Amour, Jacob Eisenstein, Chirag Nagpal, and Ananda Theertha Suresh. Theoretical guarantees on the best-of-n alignment policy. arXiv preprint arXiv:2401.01879, 2024.
|
| 268 |
+
Bradley Brown, Jordan Juravsky, Ryan Ehrlich, Ronald Clark, Quoc V. Le, Christopher Ré, and Azalia Mirhoseini. Large language monkeys: Scaling inference compute with repeated sampling, 2024. URL https://arxiv.org/abs/2407.21787.
|
| 269 |
+
Miguel A Carreira-Perpinan and Geoffrey Hinton. On contrastive divergence learning. In International workshop on artificial intelligence and statistics, pp. 33-40. PMLR, 2005.
|
| 270 |
+
Shicong Cen, Jincheng Mei, Katayoon Goshvadi, Hanjun Dai, Tong Yang, Sherry Yang, Dale Schuurmans, Yuejie Chi, and Bo Dai. Value-incentivized preference optimization: A unified approach to online and offline rlhf. arXiv preprint arXiv:2405.19320, 2024.
|
| 271 |
+
Eugene Charniak and Mark Johnson. Coarse-to-fine n-best parsing and maxent discriminative reranking. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL'05), pp. 173-180, 2005.
|
| 272 |
+
Lingjiao Chen, Jared Quincy Davis, Boris Hanin, Peter Bailis, Ion Stoica, Matei Zaharia, and James Zou. Are more llm calls all you need? towards scaling laws of compound inference systems. arXiv preprint arXiv:2403.02419, 2024.
|
| 273 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
|
| 274 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
|
| 275 |
+
Marco Cuturi, Olivier Teboul, and Jean-Philippe Vert. Differentiable ranking and sorting using optimal transport. Advances in neural information processing systems, 32, 2019.
|
| 276 |
+
Bo Dai, Niao He, Hanjun Dai, and Le Song. Provable bayesian inference via particle mirror descent. In Artificial Intelligence and Statistics, pp. 985-994. PMLR, 2016.
|
| 277 |
+
Gal Dalal, Assaf Hallak, Steven Dalton, Shie Mannor, Gal Chechik, et al. Improve agents without retraining: Parallel tree search with off-policy correction. Advances in Neural Information Processing Systems, 34:5518-5530, 2021.
|
| 278 |
+
Meng Fang, Xiangpeng Wan, Fei Lu, Fei Xing, and Kai Zou. Mathodyssey: Benchmarking mathematical problem-solving skills in large language models using odyssey math data. arXiv preprint arXiv:2406.18321, 2024.
|
| 279 |
+
|
| 280 |
+
Kanishk Gandhi, Denise Lee, Gabriel Grand, Muxin Liu, Winson Cheng, Archit Sharma, and Noah D Goodman. Stream of search (sos): Learning to search in language. arXiv preprint arXiv:2404.03683, 2024.
|
| 281 |
+
Hans U Gerber, Elias SW Shiu, et al. Option pricing by Esscher transforms. HEC Ecole des hautes études commerciales, 1993.
|
| 282 |
+
Lin Gui, Cristina Gárbacea, and Victor Veitch. Bonbon alignment for large language models and the sweetness of best-of-n sampling. arXiv preprint arXiv:2406.00832, 2024.
|
| 283 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. NeurIPS, 2021.
|
| 284 |
+
Arian Hosseini, Xingdi Yuan, Nikolay Malkin, Aaron Courville, Alessandro Sondoni, and Rishabh Agarwal. V-star: Training verifiers for self-taught reasoners. arXiv preprint arXiv:2402.06457, 2024.
|
| 285 |
+
Yu Jinnai, Tetsuro Morimura, Kaito Ariu, and Kenshi Abe. Regularized best-of-n sampling to mitigate reward hacking for language model alignment. arXiv preprint arXiv:2404.01054, 2024.
|
| 286 |
+
Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D Co-Reyes, Avi Singh, Kate Baumli, Shariq Iqbal, Colton Bishop, Rebecca Roelofs, et al. Training language models to self-correct via reinforcement learning. arXiv preprint arXiv:2409.12917, 2024.
|
| 287 |
+
Harrison Lee, Samrat Phatale, Hassan Mansoor, Kellie Lu, Thomas Mesnard, Colton Bishop, Victor Carbune, and Abhinav Rastogi. Rlaif: Scaling reinforcement learning from human feedback with ai feedback. arXiv preprint arXiv:2309.00267, 2023.
|
| 288 |
+
Lucas Lehnert, Sainbayar Sukhbaatar, Paul Mcvay, Michael Rabbat, and Yuandong Tian. Beyond a*: Better planning with transformers via search dynamics bootstrapping. arXiv preprint arXiv:2402.14083, 2024.
|
| 289 |
+
Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let's verify step by step, 2023.
|
| 290 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D Manning, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. arXiv preprint arXiv:2305.18290, 2023.
|
| 291 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024.
|
| 292 |
+
Machel Reid, Nikolay Savinov, Denis Teptyashin, Dmitry Lepikhin, Timothy Lillicrap, Jeanbaptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan First, Julian Schrittwieser, et al. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530, 2024.
|
| 293 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015.
|
| 294 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 295 |
+
Pier Giuseppe Sessa, Robert Dadashi, Léonard Hussenot, Johan Ferret, Nino Vieillard, Alexandre Ramé, Bobak Shariari, Sarah Perrin, Abe Friesen, Geoffrey Cideron, et al. Bond: Aligning llms with best-of-n distillation. arXiv preprint arXiv:2407.14622, 2024.
|
| 296 |
+
Avi Singh, John D Co-Reyes, Rishabh Agarwal, Ankesh Anand, Piyush Patil, Peter J Liu, James Harrison, Jaehoon Lee, Kelvin Xu, Aaron Parisi, et al. Beyond human data: Scaling self-training for problem-solving with language models. arXiv preprint arXiv:2312.06585, 2023.
|
| 297 |
+
Charlie Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. Scaling llm test-time compute optimally can be more effective than scaling model parameters. arXiv preprint arXiv:2408.03314, 2024.
|
| 298 |
+
|
| 299 |
+
Saurabh Srivastava, Anto PV, Shashank Menon, Ajay Sukumar, Alan Philipose, Stevin Prince, Sooraj Thomas, et al. Functional benchmarks for robust evaluation of reasoning performance, and the reasoning gap. arXiv preprint arXiv:2402.19450, 2024.
|
| 300 |
+
Nisan Stiannon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33:3008-3021, 2020.
|
| 301 |
+
Richard S Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. Advances in neural information processing systems, 12, 1999.
|
| 302 |
+
Richard S. Sutton, Hamid Reza Maei, Doina Precup, Shalabh Bhatnagar, David Silver, Csaba Szepesvári, and Eric Wiewiora. Fast gradient-descent methods for temporal-difference learning with linear function approximation. In International Conference on Machine Learning (ICML), 2009a.
|
| 303 |
+
Richard S. Sutton, Hamid Reza Maei, and Csaba Szepesvári. A convergent o(n) temporal-difference algorithm for off-policy learning with linear function approximation. In Advances in Neural Information Processing Systems (NeurIPS), 2009b.
|
| 304 |
+
Fahim Tajwar, Anikait Singh, Archit Sharma, Rafael Rafailov, Jeff Schneider, Tengyang Xie, Stefano Ermon, Chelsea Finn, and Aviral Kumar. Preference Fine-Tuning of LLMs Should Leverage Suboptimal, On-Policy Data, 2024.
|
| 305 |
+
Gemma Team, Morgane Riviere, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhupatiraju, Léonard Hussenot, Thomas Mesnard, Bobak Shahriari, Alexandre Ramé, Johan Ferret, Peter Liu, Pouya Tafti, Abe Friesen, Michelle Casbon, Sabela Ramos, Ravin Kumar, Charline Le Lan, Sammy Jerome, Anton Tsitsulin, Nino Vieillard, Piotr Stanczyk, Sertan Girgin, Nikola Momchev, Matt Hoffman, Shantanu Thakoor, Jean-Bastien Grill, Behnam Neyshabur, Olivier Bachem, Alanna Walton, Aliaksei Severyn, Alicia Parrish, Aliya Ahmad, Allen Hutchison, Alvin Abdagic, Amanda Carl, Amy Shen, Andy Brock, Andy Coenen, Anthony Laforge, Antonia Paterson, Ben Bastian, Bilal Piot, Bo Wu, Brandon Royal, Charlie Chen, Chintu Kumar, Chris Perry, Chris Welty, Christopher A. Choquette-Choo, Danila Sinopalnikov, David Weinberger, Dimple Vijaykumar, Dominika Rogozinska, Dustin Herbison, Elisa Bandy, Emma Wang, Eric Noland, Erica Moreira, Evan Senter, Evgenii Eltsyshev, Francesco Visin, Gabriel Rasskin, Gary Wei, Glenn Cameron, Gus Martins, Hadi Hashemi, Hanna Klimczak-Plucińska, Harleen Batra, Harsh Dhand, Ivan Nardini, Jacinda Mein, Jack Zhou, James Svensson, Jeff Stanway, Jetha Chan, Jin Peng Zhou, Joana Carrasqueira, Joana Iljazi, Jocelyn Becker, Joe Fernandez, Joost van Amersfoort, Josh Gordon, Josh Lipschultz, Josh Newlan, Ju yeong Ji, Kareem Mohamed, Kartikeya Badola, Kat Black, Katie Millican, Keelin McDonell, Kelvin Nguyen, Kiranbir Sodhia, Kish Greene, Lars Lowe Sjoesund, Lauren Usui, Laurent Sifre, Lena Heuermann, Leticia Lago, Lilly McNealus, Livio Baldini Soares, Logan Kilpatrick, Lucas Dixon, Luciano Martins, Machel Reid, Manvinder Singh, Mark Iverson, Martin Gorner, Mat Velloso, Mateo Wirth, Matt Davidow, Matt Miller, Matthew Rahtz, Matthew Watson, Meg Risdal, Mehran Kazemi, Michael Moynihan, Ming Zhang, Min suk Kahng, Minwoo Park, Mofi Rahman, Mohit Khatwani, Natalie Dao, Nenshad Bardoliwalla, Nesh Devanathan, Neta Dumai, Nilay Chauhan, Oscar Wahltinez, Pankil Botarda, Parker Barnes, Paul Barham, Paul Michel, Pengchong Jin, Petko Georgiev, Phil Culliton, Pradeep Kuppala, Ramona Comanescu, Ramona Merhej, Reena Jana Reza Ardeshir Rokni Rishabh Agarwal Ryan Mullins Samaneh Saadat Sara Mc Carthy Sarah Perrin Sebastien M. R. Arnold Sebastian Krause Shengyang Dai Shruti Garg Shruti Sheth Sue Ronstrom Susan Chan Timothy Jordan Ting Yu Tom Eccles Tom Hennigan Tomas Kocisky Tulsee Doshi,Vihan Jain Vikas Yadav Vilobh Meshram,Vishal DharmadhikariWarren Barkley Wei Wei Wenming Ye Woohyun Han Woosuk Kwon Xiang Xu Zhe Shen Zhitao Gong,Zichuan Wei Victor Cotruta Phoebe Kirk Anand RaoMinh Giang Ludovic Peran Tris Warkentin Eli CollinsJoelle BarralZoubin GhahramaniRaia HadsellD.SculleyJeanine BanksAnca Dragan Slav Petrov Oriol Vinyls Jeff Dean Demis Hassabis Koray Kavukcuoglu Clement Farabet Elena Buchatskaya Sebastian Borgaud Noah Fiedel Armand Joulin Kathleen Kenealy Robert Dadashi and Alek Andreev.Gemma 2: Improving open language models at a practical size2024. URL https://arxiv.org/abs/2408.00118.
|
| 306 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824-24837, 2022.
|
| 307 |
+
|
| 308 |
+
Sean Welleck, Amanda Bertsch, Matthew Finlayson, Hailey Schoelkopf, Alex Xie, Graham Neubig, Ilia Kulikov, and Zaid Harchaoui. From decoding to meta-generation: Inference-time algorithms for large language models. arXiv preprint arXiv:2406.16838, 2024.
|
| 309 |
+
Peter M Williams. Bayesian conditionalisation and the principle of minimum information. The British Journal for the Philosophy of Science, 31(2):131-144, 1980.
|
| 310 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229-256, 1992.
|
| 311 |
+
Yangzhen Wu, Zhiqing Sun, Shanda Li, Sean Welleck, and Yiming Yang. An empirical analysis of compute-optimal inference for problem-solving with language models. arXiv preprint arXiv:2408.00724, 2024.
|
| 312 |
+
Yujia Xie, Hanjun Dai, Minshuo Chen, Bo Dai, Tuo Zhao, Hongyuan Zha, Wei Wei, and Tomas Pfister. Differentiable top-k with optimal transport. Advances in Neural Information Processing Systems, 33:20520-20531, 2020.
|
| 313 |
+
Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah Goodman. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476-15488, 2022.
|
| 314 |
+
Arnold Zellner. Optimal information processing and bayes's theorem. The American Statistician, 42(4):278-280, 1988.
|
| 315 |
+
Lunjun Zhang, Arian Hosseini, Hritik Bansal, Mehran Kazemi, Aviral Kumar, and Rishabh Agarwal. Generative verifiers: Reward modeling as next-token prediction. arXiv preprint arXiv:2408.15240, 2024.
|
| 316 |
+
Jun Zhu, Ning Chen, and Eric P Xing. Bayesian inference with posterior regularization and applications to infinite latent svms. The Journal of Machine Learning Research, 15(1):1799-1847, 2014.
|
| 317 |
+
|
| 318 |
+
# A THEORETICAL DERIVATIONS
|
| 319 |
+
|
| 320 |
+
# A.1 VARIATIONAL APPROXIMATION OF BON
|
| 321 |
+
|
| 322 |
+
We assume that the verifier score $r(x, y)$ is unique for all $x, y$ , and the base model $\pi$ has a finite set of possible outcomes for each context (Beirami et al., 2024).
|
| 323 |
+
|
| 324 |
+
Proposition 5 (Theorem 2 in Gui et al. (2024)). With negligible error, one may effectively approximate $\pi_{bon}$ as the solution to the following optimization problem:
|
| 325 |
+
|
| 326 |
+
$$
|
| 327 |
+
\pi_ {b o n} (y | x) \in \underset {\mu (\cdot | x) \in \Delta_ {\mathcal {Y}}} {\arg \max } \mathbb {E} _ {y \sim \mu} [ Q _ {\pi} (x, y) ] - \frac {1}{\lambda_ {N}} K L (\mu | | \pi) (x), \tag {10}
|
| 328 |
+
$$
|
| 329 |
+
|
| 330 |
+
where $Q_{\pi}(x,y) = \mathbb{E}_{y^{\prime}\sim \pi (\cdot |x)}\left[\mathbf{1}_{r(x,y)\geqslant r(x,y^{\prime})}\right]$ is the expected win-rate over $\pi$ , and
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\frac {(\lambda_ {N} - 1) \exp (\lambda_ {N} + 1)}{\exp (\lambda_ {N} - 1)} - \log \left(\frac {\exp \lambda_ {N} - 1}{\lambda_ {N}}\right) = \log N - \frac {N - 1}{N}, \tag {11}
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
through $\lambda_N$ scaling sub-linearly with BoN number of samples $N$ .
|
| 337 |
+
|
| 338 |
+
We can show the optimal solution to Equation (10) has a closed form $\pi_{\mathrm{bon}}^{*} \propto [\pi \cdot \exp (\lambda_{N}Q_{\pi})](y|x)$ . This can also be revealed by viewing Equation (10) as the variational form of Bayes' rule (Williams, 1980; Zellner, 1988; Zhu et al., 2014; Dai et al., 2016), whose optimal solution is the posterior. This implies $\pi_{\mathrm{bon}}$ can be represented by an exponential-twisting policy (Gerber et al., 1993) over base policy $\pi$ with energy function $\lambda_N \cdot Q_\pi(y,x)$ , partition function $Z_\pi(x) = \mathbb{E}_{\pi(y|x)}[\exp (\lambda_N \cdot Q_\pi(x,y))]$ , and an appropriate $\lambda_N$ from Equation (11).
|
| 339 |
+
|
| 340 |
+
In this section we will provide proofs for the technical results in this paper.
|
| 341 |
+
|
| 342 |
+
# A.2 PROOF OF LEMMA 1
|
| 343 |
+
|
| 344 |
+
Theorem 2 of Gui et al. (2024) shows that, with negligible error, one may effectively approximate $\pi_{\mathrm{bon}}$ as the solution to the following optimization problem:
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\pi_ {\text {b o n}} (y | x) \in \underset {\mu (\cdot | x) \in \Delta_ {\mathcal {Y}}} {\arg \max } \mathbb {E} _ {y \sim \mu} [ Q _ {\pi} (x, y) ] - \frac {1}{\lambda_ {N}} K L (\mu | | \pi) (x), \tag {12}
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
where $Q_{\pi}(x,y) = \mathbb{E}_{y'\sim \pi (\cdot |x)}\left[\mathbf{1}_{r(x,y)\geqslant r(x,y')}\right]$ is the expected win-rate over $\pi$ , and this yields the variational form $\pi_{\mathrm{bon}}\propto [\pi \cdot \exp (\lambda_NQ_\pi)](y|x)$ . Plugging the variational form of $\pi_{\mathrm{bon}}$ into (2) yields the learning problem for $\pi$ :
|
| 351 |
+
|
| 352 |
+
$$
|
| 353 |
+
\max _ {\pi \in \Pi} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\mathrm {b o n}} (y | x) ] := \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \underbrace {\log \pi (y | x)} _ {\text {L i k e l i h o o d}} + \underbrace {\lambda_ {N} \cdot Q _ {\pi} (x , y) - \log Z _ {\pi} (x)} _ {\text {I n f e r e n c e - A w a r e n e s s}} \right], \tag {13}
|
| 354 |
+
$$
|
| 355 |
+
|
| 356 |
+
Taking gradient of this objective function over $\theta \in \Theta$ implies
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\begin{array}{l} \nabla_ {\theta} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\theta} (y | x) + \lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x, y) - \log Z _ {\pi_ {\theta}} (x) ] \\ = \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] + \lambda_ {N} \cdot \nabla_ {\theta} \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ Q _ {\pi_ {\theta}} (x, y) \right] - \nabla_ {\theta} \mathbb {E} _ {x \sim \mathcal {D}} \left[ \log Z _ {\pi_ {\theta}} (x) \right] \\ = \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] + \lambda_ {N} \cdot \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \mathbb {E} _ {y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \sigma (r (x, y) - r (x, y ^ {\prime})) ] \right] \right. \\ - \mathbb {E} _ {x \sim \mathcal {D}} \left[ \nabla_ {\theta} \log \mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x, y)\right) \right] \right] \\ = \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] + \lambda_ {N} \cdot \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \mathbb {E} _ {y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \sigma (r (x, y) - r (x, y ^ {\prime})) ] \right] \right. \\ - \mathbb {E} _ {x \sim \mathcal {D}} \left[ \frac {\mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \cdot \exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x , y)\right) \right] + \mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \nabla_ {\theta} \exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x , y)\right) \right]}{\mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x , y)\right) \right]} \right] \\ \end{array}
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
This further implies that
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\begin{array}{l} \nabla_ {\theta} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\theta} (y | x) + \lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x, y) - \log Z _ {\pi_ {\theta}} (x) ] \\ = \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \nabla_ {\theta} f (x, y; \theta) \right] - \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \frac {\exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x , y)\right)}{\mathbb {E} _ {\pi_ {\theta} (y | x)} \left[ \exp \left(\lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x , y)\right) \right]} \cdot \nabla_ {\theta} f (x, y; \theta) \right] \right], \\ \end{array}
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
through collecting terms from the above expression and recalling the definition of $\nabla_{\theta}f(x,y;\theta)$ as
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
\nabla_ {\theta} f (x, y; \theta) := \nabla_ {\theta} \log \pi_ {\theta} (y | x) + \lambda_ {N} \cdot \mathbb {E} _ {y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} \left(y ^ {\prime} | x\right) \cdot \sigma \left(r (x, y) - r (x, y ^ {\prime})\right) \right].
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
This further implies that
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\begin{array}{l} \nabla_ {\theta} \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \log \pi_ {\theta} (y | x) + \lambda_ {N} \cdot Q _ {\pi_ {\theta}} (x, y) - \log Z _ {\pi_ {\theta}} (x) ] \\ = \mathbb {E} _ {(x, y) \sim \mathcal {D}} [ \nabla_ {\theta} f (x, y; \theta) ] - \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}}} [ \nabla_ {\theta} f (x, y; \theta) ], \\ \end{array}
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
completing the proof of this lemma.
|
| 381 |
+
|
| 382 |
+
# A.3 PROOF OF LEMMA 2
|
| 383 |
+
|
| 384 |
+
Recall the RL objective function
|
| 385 |
+
|
| 386 |
+
$$
|
| 387 |
+
\max _ {\pi \in \Pi} J (\pi) := \mathbb {E} _ {x \sim P, y \sim \pi_ {\mathrm {b o n}} (\cdot | x; \pi , r, N, T)} [ R (x, y) ]. \tag {14}
|
| 388 |
+
$$
|
| 389 |
+
|
| 390 |
+
Applying the REINFORCE trick (Sutton et al., 2009b) to this problem over the BoN policy class and using the analogous argument from the proof of Lemma 1, we have the following expression for the policy gradient:
|
| 391 |
+
|
| 392 |
+
$$
|
| 393 |
+
\begin{array}{l} \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), x \sim \mathcal {D}} [ \nabla_ {\theta} \log \pi_ {\mathrm {b o n}} (y | x) \cdot R (x, y) ] \\ = \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x)} [ \nabla_ {\theta} f (x, y; \theta) \cdot R (x, y) ] - \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}}} [ \nabla_ {\theta} f (x, y; \theta) ] \cdot \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), x \sim \mathcal {D}} [ R (x, y) ] \\ = \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x)} [ \nabla_ {\theta} f _ {\theta} (x, y) \cdot (R (x, y) - b (x)) ] \\ = \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x)} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \cdot (R (x, y) - b (x)) \right] \\ + \lambda_ {N} \cdot \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x), y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} \left(y ^ {\prime} | x\right) \cdot \mathbf {1} \{r (x, y) \geqslant r (x, y ^ {\prime}) \} \cdot (R (x, y) - b (x)) \right] \\ = \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x)} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \cdot (R (x, y) - b (x)) \right] \\ - \lambda_ {N} \cdot \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x), y ^ {\prime} \sim \pi_ {\theta}} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \mathbf {1} \{r (x, y) < r (x, y ^ {\prime}) \} \cdot (R (x, y) - b (x)) \right]. \\ \end{array}
|
| 394 |
+
$$
|
| 395 |
+
|
| 396 |
+
This completes the proof of this lemma.
|
| 397 |
+
|
| 398 |
+
# A.4 PROOF OF LEMMA 3
|
| 399 |
+
|
| 400 |
+
Using the log-likelihood trick, and plugging in the BoN distribution from Equation (8), the gradient of Equation (6) can be computed as
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\begin{array}{l} \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), x \sim \mathcal {D}} [ \nabla_ {\theta} \log \pi_ {\mathrm {b o n}} (y | x) \cdot R (x, y) ] = \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 1, x \sim \mathcal {D}} [ \nabla_ {\theta} \log \pi_ {\mathrm {b o n}} (y | x) ] \\ = \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 1}, \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] + (1 - \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R (x, y ^ {\prime}) = 0} \right] ^ {N}) \nabla_ {\theta} \log \frac {1 - \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R (x , y ^ {\prime}) = 0} \right] ^ {N}}{1 - \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R (x , y ^ {\prime}) = 0} \right]} \right] \\ = \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\text {b o n}} (\cdot | x), R (x, y) = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] - \frac {1 - \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R (x , y ^ {\prime}) = 0} \right] ^ {N}}{1 - \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R (x , y ^ {\prime}) = 0} \right]} \mathbb {E} _ {y ^ {\prime} \sim \pi} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y ^ {\prime} | x) \cdot \mathbf {1} _ {R (x, y ^ {\prime}) = 1} \right] \right. \\ \left. + \mathbb {E} _ {y ^ {\prime} \sim \pi} \left[ \nabla_ {\theta} \log \pi_ {\theta} \left(y ^ {\prime} | x\right) \cdot \mathbf {1} _ {R \left(x, y ^ {\prime}\right) = 1} \right] \cdot N \cdot \mathbb {E} _ {y ^ {\prime} \sim \pi (\cdot | x)} \left[ \mathbf {1} _ {R \left(x, y ^ {\prime}\right) = 0} \right] ^ {N - 1} \right] \\ = \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N I _ {\mathrm {r e f}} (x) ^ {N - 1} (1 - I _ {\mathrm {r e f}} (x))}{1 - I _ {\mathrm {r e f}} (x) ^ {N}} \right]. \\ = \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\text {b o n}} (\cdot | x), R (x, y) = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N \cdot I _ {\text {r e f}} (x) ^ {N - 1}}{1 - I _ {\text {r e f}} (x) ^ {N}} \right. \\ \left. - (- 1) \cdot \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 0} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N \cdot I _ {\mathrm {r e f}} (x)}{1 - I _ {\mathrm {r e f}} (x)} \right] \\ \end{array}
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
# A.5 PROOF OF COROLLARY 4
|
| 407 |
+
|
| 408 |
+
Using the log-likelihood trick, and plugging in the BoN distribution from Equation (8), the gradient of problem Equation (6) can be computed as
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\begin{array}{l} \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\text {b o n}} (\cdot | x), R (x, y) = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N \cdot I _ {\text {r e f}} (x) ^ {N - 1}}{1 - I _ {\text {r e f}} (x) ^ {N}} \right. \\ + \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 0} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N \cdot I _ {\mathrm {r e f}} (x)}{1 - I _ {\mathrm {r e f}} (x)} \Bigg ] \\ = \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\mathrm {b o n}} (\cdot | x), R (x, y) = 1} \left[ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \right] \cdot \frac {N I _ {\mathrm {r e f}} (x) ^ {N - 1} (1 - I _ {\mathrm {r e f}} (x))}{1 - I _ {\mathrm {r e f}} (x) ^ {N}} \right]. \\ \end{array}
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
Algorithm 1 BoN-SFT
|
| 415 |
+
|
| 416 |
+
1: Input: Verifier score $r$ , environment reward $R$ , expert dataset $\mathcal{D}$
|
| 417 |
+
2: for $t = 1, 2, \ldots$ do
|
| 418 |
+
3: Sample a batch of prompts and solutions $\{x_{i},y_{i}\}_{i = 1}^{B}$ from the expert data $\mathcal{D}$ .
|
| 419 |
+
4: for $i = 1,\dots ,B$ do
|
| 420 |
+
5: Sample $N$ responses $\{y_{i,j}\}_{j = 1}^{N}$ from $\pi_{\theta}(\cdot |x_i)$ .
|
| 421 |
+
6: Select the BoN response $y_{i}^{*} = \arg \max_{j} r(x_{i},y_{i,j})$ .
|
| 422 |
+
7: Compute the gradient $\nabla_{\theta}f_{\theta}(x_i,y_i)$ using Equation (5).
|
| 423 |
+
8: end for
|
| 424 |
+
9: Update $\theta$ by following the gradient in Theorem 1 at learning rate $\alpha >0$ , i.e.,
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\theta \leftarrow \theta + \alpha \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \nabla_ {\theta} f \left(x _ {i}, y _ {i}; \theta\right) \right] - \left[ \nabla_ {\theta} f \left(x _ {i}, y _ {i} ^ {*}; \theta\right) \right]\right)
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
# 10: end for
|
| 431 |
+
|
| 432 |
+
# B PSEUDO-CODE AND IMPLEMENTATION DETAILS
|
| 433 |
+
|
| 434 |
+
Pseudo-code for all our SFT and RL methods is presented in Algorithms 1 to 4. Our implementation follows the standard use of an anchor policy, updated using exponential moving average. The policy is trained via BoN-aware losses, with additional KL divergence loss to the anchor policy. Table 2 shows the hyper-parameters used for all of our experiments.
|
| 435 |
+
|
| 436 |
+
We use linear annealing for the KL-coefficient. For all our RL experiments, we use a value baselines to reduce variance of our reward estimates. We normalize our advantage estimates w.r.t. the batch. For BoN-RLB the value network estimates $P_{\mathrm{fail}}(x)$ . We add additional clipping of the coefficients $g_N^+$ , $g_N^-$ by clipping the value estimates for $P_{\mathrm{fail}}$ .
|
| 437 |
+
|
| 438 |
+
Table 2: Hyperparameters used in experiments.
|
| 439 |
+
|
| 440 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Base model</td><td>Gemma 2b v2</td></tr><tr><td>Optimizer</td><td>AdamW</td></tr><tr><td>Learning rate policy</td><td>3e-6</td></tr><tr><td>Policy warmup steps</td><td>100</td></tr><tr><td>Learning rate value</td><td>1e-5</td></tr><tr><td>Anchor EMA</td><td>0.01</td></tr><tr><td>Training steps</td><td>2500</td></tr><tr><td>Batch size</td><td>32</td></tr><tr><td>Sampling temperature</td><td>1.0</td></tr><tr><td>KL coefficient anneal steps</td><td>2500</td></tr><tr><td>KL coefficient anneal range</td><td>1.0 → 0.075</td></tr><tr><td>KL coefficient anneal delay</td><td>10</td></tr><tr><td>Clipping values for \(P_{\text{fail}}\)</td><td>{0.01, 0.99}</td></tr></table>
|
| 441 |
+
|
| 442 |
+
# B.1 ANALYSIS OF BON-RLB WEIGHTS
|
| 443 |
+
|
| 444 |
+
The shifting balance between $g_N^+(p)$ and $g^- (p)$ with varying $p$ directly reflects the exploration-exploitation trade-off. As $p$ approaches 1, signifying very difficult problems, both $g_N^+(p)$ and $g^{-}(p)$ increase, but $g_N^+ (p)$ rises more dramatically, especially for larger values of $N$ . This sharp increase in $g_N^+ (p)$ highlights the algorithm's increasing emphasis on learning from the few correct responses that are available in challenging scenarios. The effect is amplified by larger sample sizes: the more attempts are made, the more valuable the scarce successes become. The $\overline{g}_N^+ (p)$ weight, used when only positive feedback is available, exhibits a similar upward trend with $p$ but with a less pronounced increase. This more moderate behavior can be attributed to the subtraction term in its formula, which tempers the influence of the positive samples and promotes a more balanced learning approach.
|
| 445 |
+
|
| 446 |
+
Finally, the potentially very large values of $g_N^+(p)$ for hard problems and larger $N$ introduce challenges for estimation. These high weights amplify the impact of individual positive samples, making
|
| 447 |
+
|
| 448 |
+
Algorithm 2 BoN-RLB(P)
|
| 449 |
+
|
| 450 |
+
1: Input: Environment reward $R$ , dataset $\mathcal{D}$
|
| 451 |
+
2: for $t = 1, 2, \ldots$ do
|
| 452 |
+
3: Sample a batch of prompts $\{x_{i}\}_{i = 1}^{B}$ from $\mathcal{D}$ .
|
| 453 |
+
4: for $i = 1,\dots ,B$ do
|
| 454 |
+
5: Sample $N$ responses $\{y_{i,j}\}_{j = 1}^{N}$ from $\pi_{\theta}(\cdot |x_i)$ .
|
| 455 |
+
6: Sample rewards for all candidate responses $\{R(x_i, y_i)\}_{i=1}^N$ from environment.
|
| 456 |
+
7: Select the BoN response $y_{i}^{*} = \arg \max_{j} R(x_{i},y_{i,j})$ .
|
| 457 |
+
8: Empirically estimate the base failure probability for each $x_{i}$ , $i \in \{1, \dots, B\}$
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\widehat {P} _ {\text {f a i l}} \left(x _ {i}\right) := \frac {1}{N} \sum_ {j = 1} ^ {N} \mathbf {1} _ {R \left(x _ {i}, y _ {i, j}\right) = 0}.
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
9: end for
|
| 464 |
+
|
| 465 |
+
10: Update $\theta$ by following the gradient in Corollary 4 at learning rate $\alpha > 0$ , i.e.,
|
| 466 |
+
|
| 467 |
+
$$
|
| 468 |
+
\theta \leftarrow \theta + \alpha \left(\frac {1}{B} \sum_ {i = 1} ^ {B} \nabla_ {\theta} \log \pi_ {\theta} \left(y _ {i} ^ {*}, + | x _ {i}\right) \cdot \bar {g} ^ {+} \left(P _ {\text {f a i l}} \left(x _ {i}\right), N\right)\right)
|
| 469 |
+
$$
|
| 470 |
+
|
| 471 |
+
where $y_{i}^{*, + }$ represents the BoN sample that achieves a reward of 1.
|
| 472 |
+
|
| 473 |
+
11: end for
|
| 474 |
+
|
| 475 |
+
Algorithm 3 BoN-RLB
|
| 476 |
+
|
| 477 |
+
1: Input: Environment reward $R$ , dataset $\mathcal{D}$
|
| 478 |
+
2: for $t = 1, 2, \ldots$ do
|
| 479 |
+
3: Sample a batch of prompts $\{x_{i}\}_{i = 1}^{B}$ from $\mathcal{D}$ .
|
| 480 |
+
4: for $i = 1,\dots ,B$ do
|
| 481 |
+
5: Sample $N$ responses $\{y_{i,j}\}_{j = 1}^{N}$ from $\pi_{\theta}(\cdot |x_i)$ .
|
| 482 |
+
6: Sample rewards for all candidate responses $\{R(x_i,y_i)\}_{i = 1}^N$ from environment.
|
| 483 |
+
7: Select the BoN response $y_{i}^{*} = \arg \max_{j} R(x_{i},y_{i,j})$ .
|
| 484 |
+
8: Empirically estimate the base failure probability for each $x_{i}$ , $i \in \{1, \dots, B\}$
|
| 485 |
+
|
| 486 |
+
$$
|
| 487 |
+
\widehat {P} _ {\text {f a i l}} \left(x _ {i}\right) := \frac {1}{N} \sum_ {j = 1} ^ {N} \mathbf {1} _ {R \left(x _ {i}, y _ {i, j}\right) = 0}.
|
| 488 |
+
$$
|
| 489 |
+
|
| 490 |
+
9: end for
|
| 491 |
+
|
| 492 |
+
10: Update $\theta$ by following the gradient in Lemma 3 at learning rate $\alpha > 0$ , i.e.,
|
| 493 |
+
|
| 494 |
+
$$
|
| 495 |
+
\theta \leftarrow \theta + \alpha \left(\frac {1}{B} \sum_ {i = 1} ^ {B} \nabla_ {\theta} \log \pi_ {\theta} \left(y _ {i} ^ {*}, + | x _ {i}\right) \cdot g ^ {+} \left(P _ {\text {f a i l}} (x _ {i}), N\right) - \nabla_ {\theta} \log \pi_ {\theta} \left(y ^ {*}, - | x _ {i}\right) \cdot g ^ {-} \left(P _ {\text {f a i l}} (x _ {i})\right)\right)
|
| 496 |
+
$$
|
| 497 |
+
|
| 498 |
+
where $y_{i}^{*,+}, y_{i}^{*,-}$ represent the BoN samples that achieve rewards of 1 and 0 respectively.
|
| 499 |
+
|
| 500 |
+
11: end for
|
| 501 |
+
|
| 502 |
+
the training more vulnerable to noise and potentially hindering convergence to a stable optimal policy. This underscores the need for techniques like gradient clipping or regularization to mitigate the destabilizing effects of high weight values and ensure robust learning, or alternatively, using $\overline{g}_N^+(p)$ with Corollary 4 to ensure boundness of the gradient weights.
|
| 503 |
+
|
| 504 |
+
Algorithm 4 BoN-RL
|
| 505 |
+
1: Input: Verifier score $r$ , environment reward $R$ , dataset $\mathcal{D}$
|
| 506 |
+
2: for $t = 1,2,\ldots$ do
|
| 507 |
+
3: Sample a batch of prompts $\{x_i\}_{i=1}^B$ from $\mathcal{D}$ .
|
| 508 |
+
4: for $i = 1,\ldots,B$ do
|
| 509 |
+
5: Sample $N$ responses $\{y_{i,j}\}_{j=1}^N$ from $\pi_\theta(\cdot|x_i)$ .
|
| 510 |
+
6: Select the BoN response $y_i^* = \arg \max_j r(x_i,y_{i,j})$ .
|
| 511 |
+
7: (If environment reward $R$ is available to the BoN algorithm, we replace verifier $r$ with that.)
|
| 512 |
+
8: Sample the reward $R(x_i,y_i^*)$ from environment.
|
| 513 |
+
9: Compute the gradient $\nabla_\theta f_\theta(x_i,y_i)$ using Equation (5).
|
| 514 |
+
10: end for
|
| 515 |
+
11: Update $\theta$ by following the gradient in Lemma 2 at learning rate $\alpha > 0$ , i.e., $\theta \gets \theta + \alpha \left( \frac{1}{B} \sum_{i=1}^{B} \nabla_\theta f_\theta(x_i,y_i^*) \cdot (R(x_i,y_i^*) - b(x_i)) \right)$ where $b_\psi(x_i), i = 1,\ldots,B$ is a learned baseline value function of $\pi_{\mathrm{bon}}$ , i.e., $\psi^* \in \arg \min_{\psi} \frac{1}{B} \sum_{i=1}^{B} [R(x_i,y_i^*) - b_\psi(x_i)]^2$
|
| 516 |
+
|
| 517 |
+
12: Update value estimate $\psi$ using the current environment reward target and BoN policy trajectories.
|
| 518 |
+
13: end for
|
| 519 |
+
|
| 520 |
+
# C ALGORITHMIC EXTENSIONS
|
| 521 |
+
|
| 522 |
+
# C.1 ENTROPY-REGULARIZED RL
|
| 523 |
+
|
| 524 |
+
We would like to study an entropy-regularized RL problem for the $\pi_{\mathrm{bon}}$ policy. Recall that generally in entropy-regularized RL, we solve
|
| 525 |
+
|
| 526 |
+
$$
|
| 527 |
+
\max _ {\pi (\cdot | x) \in \Delta} \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi (\cdot | x)} [ R (x, y) ] - \beta \cdot K L (\pi | | \pi_ {\beta}) (x) \right], \tag {15}
|
| 528 |
+
$$
|
| 529 |
+
|
| 530 |
+
where $R(x,y)$ is the environment reward (that is not necessarily identical to the verifier score model), $\pi_{\beta}$ is a baseline policy, and $\beta > 0$ is the weight for the KL regularization term. Using the consistency condition of KL-regularized MDP, solving for the optimal policy of this problem is equivalent to finding a solution pair of $V$ and $\pi \in \Delta$ of the following equation:
|
| 531 |
+
|
| 532 |
+
$$
|
| 533 |
+
\bar {V} (x) = R (x, y) + \beta \log \pi_ {\beta} (y | x) - \beta \log \pi (y | x), \forall x \in \mathcal {D}, \forall y \tag {16}
|
| 534 |
+
$$
|
| 535 |
+
|
| 536 |
+
Now, we further parameterize the policy variable $\pi$ with the BoN policy $\pi_{\mathrm{bon}}$ , then with the sufficiency part of the consistency condition one can show that $\pi_{\mathrm{bon}}$ is an optimal RL policy of Equation (15) if there exists a pair of $V$ and $\pi$ that satisfies the following equation
|
| 537 |
+
|
| 538 |
+
$$
|
| 539 |
+
V (x) = R (x, y) + \beta \log \pi_ {\beta} (y | x) - \beta (\log \pi (y | x) + \lambda_ {N} \cdot Q _ {\pi} (y, x) - \log Z _ {\pi} (x)), \forall x \in \mathcal {D}, \forall y \tag {17}
|
| 540 |
+
$$
|
| 541 |
+
|
| 542 |
+
There are two ways to approximately find the solution in Equation (17). The first way is to reformulate the above equation with a condition that equates the values between any pairwise states and outputs $(x, y, y')$ :
|
| 543 |
+
|
| 544 |
+
$$
|
| 545 |
+
R \left(x, y ^ {\prime}\right) + \beta \log \frac {\pi_ {\beta} \left(y ^ {\prime} \mid x\right)}{\pi \left(y ^ {\prime} \mid x\right)} + \beta \lambda_ {N} \cdot Q _ {\pi} \left(y ^ {\prime}, x\right) = R (x, y) + \beta \log \frac {\pi_ {\beta} \left(y \mid x\right)}{\pi (y \mid x)} + \beta \lambda_ {N} \cdot Q _ {\pi} (y, x), \forall x \in \mathcal {D}, \forall y, y ^ {\prime}. \tag {18}
|
| 546 |
+
$$
|
| 547 |
+
|
| 548 |
+
Suppose one has access to pairwise labels in the data-set, then this formulation eliminates any terms that are independent to $y$ and circumvents the need of solving for the value function $V$ . One may approximately solve Equation (18) by minimizing the following $\ell_2$ loss:
|
| 549 |
+
|
| 550 |
+
$$
|
| 551 |
+
\min _ {\pi \in \Delta} \mathbb {E} _ {(x, y, y ^ {\prime}) \in \mathcal {D}} \left[ (g (x, y; \pi) - (g (x, y ^ {\prime}; \pi)) ^ {2} \right],
|
| 552 |
+
$$
|
| 553 |
+
|
| 554 |
+
$$
|
| 555 |
+
g (x, y; \pi) := R (x, y) + \beta \log \frac {\pi_ {\beta} (y | x)}{\pi (y | x)} + \beta \lambda_ {N} \cdot Q _ {\pi} (y, x).
|
| 556 |
+
$$
|
| 557 |
+
|
| 558 |
+
This formulation is similar to that in IPO (Azar et al., 2024). However, unlike IPO, where the term $g(x,y;\pi)$ is linear in the logits of $\pi$ and therefore one can show that its $\ell_2$ minimization problem has a unique solution, in this case $g(x,y;\pi)$ also depends on $Q_{\pi}$ , which is a function of $\pi$ (and
|
| 559 |
+
|
| 560 |
+
thus a nonlinear function of its logits), preventing us from drawing similar conclusions that the $\ell_2$ minimization problem has a unique solution. Therefore, even if one can exactly solve this $\ell_2$ minimization problem (and make the loss zero), there is no guarantee that the solution policy $\pi^*$ corresponds to the base policy of an optimal $\pi_{\mathrm{bon}}$ policy to the KL-regularized RL problem.
|
| 561 |
+
|
| 562 |
+
For the second approach, consider the following linear programming reformulation of Equation (17):
|
| 563 |
+
|
| 564 |
+
$$
|
| 565 |
+
\min _ {V, \pi \in \Delta} \mathbb {E} _ {x \in \mathcal {D}} [ V (x) ]
|
| 566 |
+
$$
|
| 567 |
+
|
| 568 |
+
$$
|
| 569 |
+
\text {s . t .} V (x) \geqslant R (x, y) + \beta \log \pi_ {\beta} (y | x) - \beta (\log \pi (y | x) + \lambda_ {N} \cdot Q _ {\pi} (y, x) - \log Z _ {\pi} (x)), \forall x \in \mathcal {D}, \forall y \tag {19}
|
| 570 |
+
$$
|
| 571 |
+
|
| 572 |
+
Since the inequality constraint is a convex function in $\pi$ and an affine function in $V$ , by strong duality it has the following equivalent Lagrangian-dual formulation:
|
| 573 |
+
|
| 574 |
+
$$
|
| 575 |
+
\begin{array}{l} \max _ {\kappa (\cdot , \cdot) \geqslant 0} \min _ {V, \pi \in \Delta} \mathbb {E} _ {(x, y) \in \mathcal {D}} \left[ V (x) + \kappa (x, y) \cdot \left(R (x, y) + \beta \frac {\pi_ {\beta} (y | x)}{\pi (y | x)} - \beta \left(\lambda_ {N} \cdot Q _ {\pi} (y, x) - \log Z _ {\pi} (x) - V (x)\right)\right) \right] \\ = \max _ {\kappa (\cdot , \cdot) \geqslant 0} \min _ {V} \mathbb {E} _ {\mathcal {D}} \left[ (1 - \kappa (x, y)) \cdot V (x) + \kappa (x, y) \cdot \left(R (x, y) + \beta \cdot \pi_ {\beta} (y | x)\right) \right] - \max _ {\pi \in \Delta} \mathbb {E} _ {\mathcal {D}} \left[ \kappa (x, y) \cdot \log \pi_ {\mathrm {b o n}} (y | x; \pi) \right] \tag {20} \\ \end{array}
|
| 576 |
+
$$
|
| 577 |
+
|
| 578 |
+
This formulation can be viewed as an weighted-SFT approach that iteratively updates (i) the base policy $\pi$ that maximizes the likelihood of $\pi_{\mathrm{bon}}$ over data $\mathcal{D}$ , weighted with importance weights $\kappa(x,y)$ , and (ii) the importance weight function $\kappa$ itself. Here, the value function $V(x)$ is simply an auxiliary variable.
|
| 579 |
+
|
| 580 |
+
# C.2 IMPROVED EFFICIENCY WITH BON DISTILLATION
|
| 581 |
+
|
| 582 |
+
While Lemma 1 provides a recipe for training a base policy to adapt to the BoN inference strategy, a key challenge lies in the computational cost and data inefficiency associated with BoN sampling, especially when $N$ is large. Particularly, each gradient update requires generating $N$ samples from the current base policy, which can be prohibitively expensive. Furthermore, using these samples solely for a single gradient update may deem wasteful.
|
| 583 |
+
|
| 584 |
+
To alleviate this issue, leveraging the recent advances in BoN Distillation (BoND) (Sessa et al., 2024), an RLHF algorithm that distills BoN behaviors into a standard LLM, we approximate the BoN distribution of the current $\pi$ . This results in an iterative, two-step procedure. First, we estimate a BoND policy $\pi_{\mathrm{BoND}}$ (parameterized by weights $\phi$ ) of $\pi$ by solving the distribution-matching problem: $\min_{\phi} \mathbb{E}_{x \sim \mathcal{D}}[\mathrm{KL}(\pi_{\phi} || \pi_{\mathrm{bon}})(x)]$ , where the backward-KL metric induces quantile-based advantage and mode-seeking behaviors to $\pi_{\mathrm{BoND}}$ . Utilizing the variational form $\pi_{\mathrm{bon}}(y|x) \propto \pi \cdot \exp(\lambda_N Q_{\pi})(y|x)$ , this problem can be further reformulated as
|
| 585 |
+
|
| 586 |
+
$$
|
| 587 |
+
\pi_ {\mathrm {B o N D}} (y | x) \in \arg \max _ {\phi} \mathbb {E} _ {x \sim \mathcal {D}} \left[ \mathbb {E} _ {y \sim \pi_ {\phi} (\cdot | x)} \left[ Q _ {\pi} (y, x) \right] - \frac {1}{\lambda_ {N}} \mathrm {K L} \left(\pi_ {\phi} \| \pi\right) (x) \right]. \tag {21}
|
| 588 |
+
$$
|
| 589 |
+
|
| 590 |
+
Second, equipped with the BoND policy, we change the gradient of Lemma 1 with the approximate gradient $\mathbb{E}_{(x,y)\sim \mathcal{D}}\left[\nabla_{\theta}f(x,y;\theta)\right] - \mathbb{E}_{x\sim \mathcal{D},y\sim \pi_{\mathrm{BoND}}(\cdot |x)}\left[\nabla_{\theta}f(x,y;\theta)\right]$ . In general, this approach is also well-connected with Contrastive Divergence (Carreira-Perpinan & Hinton, 2005) in energy-based learning, which promotes the idea of approximately sample from the current target distribution ( $\pi_{\mathrm{bon}}$ in our case). It shows that the learning algorithm can still converge to an optimum w.r.t. the original objective function as long as the gradient estimated by the approximate samples still points at an ascending direction.
|
| 591 |
+
|
| 592 |
+
# C.3 CONNECTION TO STAR
|
| 593 |
+
|
| 594 |
+
Consider the popular STaR method (Zelikman et al., 2022) applied for training $\pi_{\mathrm{bon}}$ , which updates $\theta$ by following the reward-weighted gradient:
|
| 595 |
+
|
| 596 |
+
$$
|
| 597 |
+
\mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\mathrm {b o n}} (\cdot | x)} [ \nabla_ {\theta} \log \pi_ {\theta} (y | x) \cdot R (x, y) ]. \tag {22}
|
| 598 |
+
$$
|
| 599 |
+
|
| 600 |
+
Notice that the policy gradient of BoN-RL is a sum of two terms: $\nabla_{\theta}J(\theta) = g_1(\theta) + g_2(\theta)$ , where $g_{1}(\theta) = \mathbb{E}_{x\sim \mathcal{D},y\sim \pi_{\mathrm{bon}}(\cdot |x)}[\nabla_{\theta}\log \pi_{\theta}(y|x)\cdot R(x,y)]$ is equivalent to that of BoN-STaR, updating $\pi$ via weighted supervised fine-tuning over the responses and the rewards obtained by the current BoN policy, and $g_{2}(\theta) = \mathbb{E}_{x\sim \mathcal{D},y\sim \pi_{\mathrm{bon}}(\cdot |x)}[\nabla_{\theta}(\lambda_{N}Q_{\pi} - \log \mathbb{E}_{\pi}\exp (\lambda_{N}Q_{\pi})(x,y)\cdot R(x,y)]$ accounts for the gradient effect of the importance sampling term $(\exp \lambda_NQ_\pi /Z_\pi)(x,y)$ between $\pi$ and $\pi_{\mathrm{bon}}$ , emphasizing on how much it can improve the reward. The additional $g_{2}(\theta)$ component
|
| 601 |
+
|
| 602 |
+

|
| 603 |
+
(a) $\operatorname{pass} @ N$
|
| 604 |
+
|
| 605 |
+

|
| 606 |
+
(b) BoN
|
| 607 |
+
Figure 9: Scaling of exponent w.r.t temperature in pass@ $N$ and optimal $N$ w.r.t. temperature in BoN. Dashed curves denote in-training predictions, stars denote extrapolation values for the corresponding temperatures.
|
| 608 |
+
|
| 609 |
+
<table><tr><td></td><td>pass@N</td><td>BoN</td><td>MajorityVoting</td></tr><tr><td>Gemma-9B</td><td>0.986</td><td>0.989</td><td>0.89</td></tr><tr><td>Gemma-2B</td><td>0.998</td><td>0.998</td><td>0.784</td></tr></table>
|
| 610 |
+
|
| 611 |
+
Table 3: R-squared values for different language models and inference algorithms.
|
| 612 |
+
|
| 613 |
+
makes BoN-RL amenable to the distributional shifts introduced by the BoN procedure, enabling the base policy to be adept at utilizing the BoN exploration mechanism to optimize the reward.
|
| 614 |
+
|
| 615 |
+
# D EXPERIMENTAL DETAILS
|
| 616 |
+
|
| 617 |
+
# D.1 ADDITIONAL SCALING RESULTS WITH GEMMA 9B VERIFIER AND POLICY MODELS
|
| 618 |
+
|
| 619 |
+
Similar to Gemma2B co-scaling experiments, for Gemma 9B co-scaling, we present additional results in Figure 9. We analyze the optimal exponent $b^{*}(T)$ w.r.t different temperatures (see co-scaling in Section 5) and find that a power law functional form can explain the relationship very accurately, achieving very low extrapolation error for pass@ $N$ and BoN, i.e., $2.75e - 05$ and 2.87, respectively. Results for pass@ $N$ suggest that exponent can be accurately predicted from just temperature. We also inspect how optimal $N^{*}$ scales with $T$ in BoN. We fit a power law function plus a linear term which accurately predicts optimal $N$ for unseen temperatures. Predictions of the fitted model can be used to achieve close to optimal performance, achieving less than 0.001 point drop in BoN performance. This suggests that our predictive model makes accurate predictions that keeps the optimal performance.
|
| 620 |
+
|
| 621 |
+
Generalization of scaling predictions. In Table 3, we compare various inference algorithms and LLMs of different sizes. For MajorityVoting algorithm, we use MC estimation to simulate different sample sizes. We use the same functional form used for co-scaling experiments in Section 5 for MajorityVoting. Our results remark the strong generalization performance of our predictive models across different LLMs (both policy and reward models) and inference algorithms. The same power-law function with a linear trend term applies well to both BoN and MajorityVoting. While we use unbiased estimates for $\text{pass} @ N$ and BoN, we use MC estimation for MajorityVoting which leads to less smooth curves and slightly lower prediction performance.
|
| 622 |
+
|
| 623 |
+
Gemma-9B Results. In Figure 10, we present results for Gemma-9B policy and reward models. Using Gemma-9B improves both pass@ $N$ and BoN significantly compared to Gemma-2B. We observe that the gap between using large temperatures (0.7 or 1.0) and very small temperatures (0.1) also increased. While Gemma-2B showed very strong reward model overoptimization for larger $N$ and temperatures, we see a lesser overoptimization for Gemma-9B models.
|
| 624 |
+
|
| 625 |
+

|
| 626 |
+
Figure 10: pass@ $N$ (left) and BoN (right) performance for Gemma-9B. While curves show similar shape as Gemma-2B models, overall performance is globally improved and overoptimization is reduced.
|
| 627 |
+
|
| 628 |
+

|
| 629 |
+
|
| 630 |
+

|
| 631 |
+
(a) BoN
|
| 632 |
+
|
| 633 |
+

|
| 634 |
+
(b) pass@ $N$
|
| 635 |
+
Figure 11: BoN and pass@ $N$ Accuracy Results on Hendrycks MATH with Gemma 9B.
|
| 636 |
+
|
| 637 |
+
# D.2 DETAILS OF BON-AWARE FINE-TUNING EXPERIMENTS
|
| 638 |
+
|
| 639 |
+
For the MATH benchmark, we trained the Gemma 2B and 9B models with the Hendrycks MATH dataset. Following Lightman et al. (2023), we augment the original 7500 MATH training problems with 4500 problems from the test set, evaluating performance on the remaining 500 problems. In the supervised setting, we leverage a larger Gemini 1.5 Flash model (Reid et al., 2024) to generate MATH solutions with answers and steps (32 candidates for each of the MATH problems), subsampling only the correct responses and distilling knowledge into the Gemma 2B model. In the RL setting, we use a binary environment reward denoting whether the model's answer matches the ground truth answer. The verifier used in all BoN experiments is a separate pre-trained Gemma 2B model that predicts the probability of a correct response given the prompt. The verifier is trained with the data collected from the Gemini 1.5 Flash model.
|
| 640 |
+
|
| 641 |
+
Alternatively, to benchmark our models on code generation, we train on MBPP (Austin et al., 2021) and evaluate on the HumanEval benchmark (Chen et al., 2021), following the standard procedures delineated in Kumar et al. (2024).
|
| 642 |
+
|
| 643 |
+
# D.3 ADDITIONAL BON-AWARE FINE-TUNING RESULTS
|
| 644 |
+
|
| 645 |
+
We now present additional results on BoN-aware fine-tuning (both SFT and RL).
|
| 646 |
+
|
| 647 |
+
# D.3.1 HENDRYCKS MATH WITH GEMMA 9B
|
| 648 |
+
|
| 649 |
+
We additionally benchmark a larger model, GemmaV2 9B, on Hendrycks MATH, with results shown in Figure 11. We observe that, similar to the trends of the experiments run with the Gemma 2B counterpart, BoN-RLV achieves the best BoN performance, while BoN-RL-S achieves the best pass@ $N$ performance, with both substantially improving over the base model.
|
| 650 |
+
|
| 651 |
+

|
| 652 |
+
(a) Functional MATH.
|
| 653 |
+
|
| 654 |
+

|
| 655 |
+
(b) MathOdyssey.
|
| 656 |
+
|
| 657 |
+

|
| 658 |
+
Figure 12: pass@ $N$ of BoN-RL and baselines on held-out benchmarks with Gemma 9B models.
|
| 659 |
+
Figure 13: pass@ $N$ of various methods with $N^{\prime} = 16$
|
| 660 |
+
|
| 661 |
+
# D.3.2 HELD-OUT MATH BENCHMARKS WITH GEMMA 9B
|
| 662 |
+
|
| 663 |
+
To evaluate the generalization capabilities of our BoN-aware finetuned models, we additionally evaluate on two completely held-out and challenging benchmarks, Functional Math (Srivastava et al., 2024) and MathOdyssey (Fang et al., 2024). We present the results of these held-out benchmarks with 9B models in Figure 12, and observe that our fine-tuned models improve on both BoN and pass@ $N$ for these held-out benchmarks similarly as in the case of Gemma 2B.
|
| 664 |
+
|
| 665 |
+
# D.3.3 PASS@N ACCURACY WITH DIFFERENT TRAINING SAMPLES, WITH GEMMA 2B
|
| 666 |
+
|
| 667 |
+
Similar to the experiments in Figure 6a, our BoN-RL-S, BoN-RLB, and BoN-RLB(P) models also demonstrate superior performance over the baseline methods in pass@ $N$ evaluations with $N' = 16$ (Figure 13). In this case, STaR performs the worst (55% in pass@32) as it fails to (i) utilize negative samples in training for implicit exploration (unlike BoN-RLB, 60% pass@32), (ii) re-weight samples based on difficulty, prioritizing learning from challenging problems and avoiding overfitting to simpler ones (unlike BoN-RLB(P), 60% pass@32), and (iii) account for the importance sampling factor between the base policy and the BoN policy (unlike BoN-RL-S, 58% pass@32). BoN-RLB and BoN-RLB(P) are superior to BoN-RL-S on $N' = 16$ (Figure 13), but worse on $N' = 32$ (Figure 6a), suggesting that they suffer from instability with increasing $N'$ . This is potentially due to the following observations: (i) The asymmetry between the positive ( $g^{+}$ ) and negative ( $g^{-}$ ) weights in BoN-RLB increases with $N'$ , destabilizing its learning at larger $N'$ values; (ii) RL-BoN-S utilizes the variational approximation of $\pi_{\mathrm{bon}}$ in its gradient update, introducing approximation errors that may cause its sub-optimal performance (relative to a stable instance of BoN-RLB trained at $N' = 16$ ); BoN-RLB(P) only uses positive samples, which inherits the shortcomings of STaR (lack of implicit exploration), yet it re-balances the examples with the difficulty of the problems. Overall, it leads to consistent yet mild performance degradation over BoN-RLB.
|
| 668 |
+
|
| 669 |
+
# D.3.4 COMPARING BON-RL WITH BASE-BON DISTILLATION BASELINES, WITH GEMMA 2B
|
| 670 |
+
|
| 671 |
+
We consider various alternative methods to improve Gemma 2B BoN accuracy through various data generation methods. We distill the Gemma 2B model using these datasets and compare to the
|
| 672 |
+
|
| 673 |
+

|
| 674 |
+
Figure 14: BoN Accuracy on MATH comparing Base Gemma 2B and BoN RL-V with other fine-tuning techniques: (1) BoN-SFT: Distillation of BoN sample for N=16; (2) All-SFT: Distillation of all N=16 samples (i.e., average sample); (3) Weighted-SFT: Distillation of all N=16 samples by average re-sampling w.r.t. verifier scores; and (4) Maj-SFT: Distillation of majority voting strategy.
|
| 675 |
+
|
| 676 |
+

|
| 677 |
+
Figure 15: Verifier Mismatch. Plots show BoN accuracy under verifier-reward mismatch using Gemma 2B on MATH. During training verifier was used for BoN. On test, environment reward was used as verifier of the BoN strategy, inducing a mismatch in verifiers.
|
| 678 |
+
|
| 679 |
+
base Gemma 2B model and our BoN-RL-V method. We consider the following four distillation benchmarks (all run over Hendrycks MATH):
|
| 680 |
+
|
| 681 |
+
1. Base-BoN-SFT: In this method we generate a dataset of the best of $N = 16$ samples for each example in the dataset. We use the best sample as target to distill Gemma 2B.
|
| 682 |
+
2. Base-All-SFT: We use the full range of $N = 16$ samples as targets. This dataset is used to distill Gemma 2B to the average effective sample of the base model.
|
| 683 |
+
3. Base-Weighted-SFT: Similar to Base-All-SFT, we sample $N = 16$ samples for each example. We then re-sample $N = 16$ examples (from these samples, with repetition), weighted according to verifier scores. This dataset is used to distill Gemma 2B to the average effective sample, weighted by verifier scores.
|
| 684 |
+
4. Base-Maj-SFT: We use majority voting over $N = 16$ samples to select a target. We distill Lemma 2B to predict the majority voted target.
|
| 685 |
+
|
| 686 |
+
We show the BoN accuracy results of these methods in Figure 10. While the aforementioned baselines do improve BoN performance over the Base Gemma 2B model, they are still out-performed by our BoN-RL-V method, indicating the value of utilizing the inference BoN strategy explicitly during training.
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccfd0e33eb57dd22282ba9cfc2292b25f7d5372a304e9363ff4abe5025a135d6
|
| 3 |
+
size 1137972
|
ICLR/2025/Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5a7966541c99edc597510548270455097b2e67e72b0bf62de5df5cf33b750ad8
|
| 3 |
+
size 998064
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eef30e5d6c92f81b784c07f36c5dadb4e92d7e591e444cbf469863b2b2615154
|
| 3 |
+
size 119228
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:187f690322024296196f44e8a083a5c21eaef8134efc83ba54e6e6c0d236c2e1
|
| 3 |
+
size 134503
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/fc0be9d6-6bd7-48c6-87f9-dbe026add2b8_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aede93e167a14cebe6e25bf2e4edca58c2379e1a6aa249ac50f2e90233c47a6b
|
| 3 |
+
size 476587
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/full.md
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFILLING SCORE * A PRETRAINING DATA DETECTION ALGORITHM FOR LARGE LANGUAGE MODELS
|
| 2 |
+
|
| 3 |
+
Negin Raoof Litu Rout Giannis Daras
|
| 4 |
+
|
| 5 |
+
Sujay Sanghavi Constantine Caramanis Sanjay Shakkottai Alexandros G. Dimakis
|
| 6 |
+
|
| 7 |
+
The University of Texas at Austin
|
| 8 |
+
|
| 9 |
+
{neginmr, litu.rout, giannisdara,constantine, sanjay.shakkottai}@utexas.edu
|
| 10 |
+
sanghavi@mail.utexas.edu, dimakis@austin.utexas.edu
|
| 11 |
+
|
| 12 |
+
# ABSTRACT
|
| 13 |
+
|
| 14 |
+
In pretraining data detection, the goal is to detect whether a given sentence is in the dataset used for training a Large Language Model (LLM). Recent methods (such as Min-K% and Min-K%++) reveal that most training corpora are likely contaminated with both sensitive content and evaluation benchmarks, leading to inflated test set performance. These methods sometimes fail to detect samples from the pretraining data, primarily because they depend on statistics composed of causal token likelihoods. We introduce Infilling Score, a new test-statistic based on non-causal token likelihoods. Infilling Score can be computed for autoregressive models without re-training using Bayes rule. A naive application of Bayes rule scales linearly with the vocabulary size. However, we propose a ratio test-statistic whose computation is invariant to vocabulary size. Empirically, our method achieves a significant accuracy gain over state-of-the-art methods including Min-K%, and Min-K%++ on the WikiMIA benchmark across seven models with different parameter sizes. Further, we achieve higher AUC compared to reference-free methods on the challenging MIMIR benchmark. Finally, we create a benchmark dataset consisting of recent data sources published after the release of Llama-3; this benchmark provides a statistical baseline to indicate potential corpora used for Llama-3 training.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
The significant progress in language modeling can largely be attributed to development and deployment of large-scale models that utilize extensive training corpora, often encompassing trillions of tokens (Li et al., 2024; Dubey et al., 2024). The selection and curation of data for training such Large Language Models (LLMs) is very complex and expensive. Further, recent developers of LLMs withhold details regarding the sources of their pretraining datasets (Dubey et al., 2024; OpenAI et al., 2024; Touvron et al., 2023b). This lack of transparency has raised concerns regarding the inadvertent inclusion of copyrighted content (Chang et al., 2023; Min et al., 2023; Meeus et al., 2023) or personally identifiable information (Mozes et al., 2023; Panda et al., 2024), potentially leading to ethical and legal challenges (Grynbaum & Mac, 2023). Furthermore, the inclusion of benchmark datasets within the training corpora itself can compromise the integrity of model evaluations. This practice may inflate test performance metrics without accurately reflecting the model's capabilities (Oren et al., 2023; Zhou et al., 2023).
|
| 19 |
+
|
| 20 |
+
Recent work has focused on the problem of determining whether specific sequences of tokens have been previously seen by a language model (Shi et al., 2024; Zhang et al., 2024; Duan et al., 2024). These investigations are categorized under a growing field of attacks on LLMs known as Membership Inference Attacks (MIA) (Shokri et al., 2017; Mattern et al., 2023b; Carlini et al., 2022). Many studies in this area focus on fine-tuning data detection (Song & Shmatikov, 2019; Shejwalkar et al., 2021; Mahloujifar et al., 2021). However, pretraining data detection attacks are becoming increasingly important as they can reveal whether a model has been trained on potentially sensitive data and prevent evaluation data contamination (Jiang et al., 2024; Yang et al., 2023).
|
| 21 |
+
|
| 22 |
+
We introduce a novel method for identifying whether a given text sequence was part of a language model's pretraining data. Our method uses a new test-statistic that we call the Infilling Score. Our approach performs a non-causal test to compute the infilling probability of a token, based on the tokens that appear before and after this token in the sentence. An autoregressive language model generates causal likelihoods (i.e. the probability of a word appearing after some context). We find that non-causal likelihoods lead to more accurate tests for membership inference. These likelihoods can be computed using a causal autoregressive model. The computation involves applying Bayes' rule and the law of total probability, and needs a marginalization over the vocabulary to compute a partition function. Unfortunately, computing this partition function requires calling the autoregressive LM many times, one for each vocabulary entry. This would require tens of thousands of calls to the autoregressive LLM to compute a single non-causal probability for one token, and hence is not practical. Our central idea is to propose an approximate test-statistic whose computation is much faster, does not require an exact computation of this partition function and does not depend on the vocabulary size.
|
| 23 |
+
|
| 24 |
+
Our method achieves a significant accuracy gain over state-of-the-art methods including Min-K%, and Min-K%++ on the WikiMIA benchmark across seven models. On WikiMIA, our method outperforms the previous state of the art in AUC. It achieves up to $10\%$ improvement on Llama models when testing long sequences (256 tokens). Further, we achieve higher AUC compared to reference-free methods on the challenging MIMIR benchmark.
|
| 25 |
+
|
| 26 |
+
# Our main contributions are summarized below:
|
| 27 |
+
|
| 28 |
+
(1) We introduce the Infilling Score, a new reference-free method for detecting pretraining data using infilling likelihood of tokens within the candidate sentence (Section 3). While SoTA methods: MIN-K% and MIN-K%++ rely on a statistic based on past tokens only, our method computes a new test statistic considering both past and future tokens in the sentence.
|
| 29 |
+
(2) We develop an efficient algorithm for computing this new score. Though our method conceptually shares similarities with a likelihood computed via Bayes rule, computationally it is much different: whereas any natural approach for computing a Bayes rule calculation scales with vocabulary size, our algorithm has computation invariant to vocabulary size.
|
| 30 |
+
(3) We conduct extensive experiments on the standard (a) WikiMIA (Shi et al., 2024) and, (b) MIMIR (Duan et al., 2024) to verify the efficacy of our method (Section 4). On these benchmarks, we compare our method with state-of-the-art MIA methods including MIN-K% (Shi et al., 2024) and MIN-K%++ (Zhang et al., 2024). On WikiMIA, our method achieves $11\%$ improvement over MIN-K% and $5\%$ improvement over MIN-K%++ in terms of AUROC on average. We attribute the notable performance gain of our method to infilling probability (Section 3).
|
| 31 |
+
(4) We curate a dataset of book excerpts that have not been seen by the LLMs released before April 2024 (Section 4.1). Employing our Infilling Score, we detect a list of books which have (likely) been used for training Llama-3-8B (Dubey et al., 2024) (4.4.3).
|
| 32 |
+
|
| 33 |
+
# 2 BACKGROUND
|
| 34 |
+
|
| 35 |
+
In this section, we discuss the standard definition of Membership Inference Attack (MIA) and recent advances along this line of research.
|
| 36 |
+
|
| 37 |
+
Problem setup. Given a sentence $\boldsymbol{x} = \{x_{i}\}_{i=0}^{N}$ and a Large Language Model (LLM) denoted by $\mathcal{M}$ , the goal of MIA is to build a detector $h(\boldsymbol{x},\mathcal{M}) \to \{0,1\}$ that can infer the membership of $\boldsymbol{x}$ in the training corpus $\mathcal{D} = \{\boldsymbol{x}_j\}_{j \in [n]}$ of $\mathcal{M}$ . Existing MIA methods for LLMs (Shi et al., 2024; Zhang et al., 2024; Carlini et al., 2021; Mattern et al., 2023a) assign a score to each sample $\boldsymbol{x}$ and use a binary threshold to determine its membership class, with 1 indicating $\boldsymbol{x} \in \mathcal{D}$ and 0 otherwise.
|
| 38 |
+
|
| 39 |
+
# 2.1 CHALLENGES IN PRETRAINING DATA DETECTION USING MIA METHODS
|
| 40 |
+
|
| 41 |
+
# 2.1.1 DETECTION DIFFICULTY
|
| 42 |
+
|
| 43 |
+
Prior works (Hardt et al., 2016; Bassily et al., 2020) have shown that the total variation (TV) distance between the distribution of seen and unseen data is proportional to the learning rate, size of the
|
| 44 |
+
|
| 45 |
+
dataset $|\mathcal{D}|$ and the frequency of the test sentence $x$ . Since TV captures the separability between these distributions, low TV makes it difficult to infer the membership class of a given $x$ .
|
| 46 |
+
|
| 47 |
+
# 2.1.2 ARCHITECTURE AND PRETRAINING DISTRIBUTION
|
| 48 |
+
|
| 49 |
+
Membership inference attacks for LLM pretraining data detection are broadly categorized into two classes: (a) reference-based methods and (b) reference-free methods. Reference-based methods such as Reference (Carlini et al., 2021) infer the membership of a sentence $x$ by computing the likelihood of $x$ using two different LLMs. They compare the perplexity of $x$ under the target LLM with the perplexity of $x$ under a smaller language model. The smaller model $\mathbb{M}$ shares the same architecture as $\mathcal{M}$ , and is trained on a subset of samples, $\mathbb{D}$ , collected from the same underlying distribution of $\mathcal{D}$ . The intuition is that smaller networks have less capacity to memorize sentences from the pretraining dataset. One crucial limitation of these methods is that reference model may not always exist. Although LLM developers often do not disclose information about the distribution of pretraining data, reference-based MIAs (Carlini et al., 2021) assume the knowledge of the architecture and underlying pretraining distribution, making these methods less practical.
|
| 50 |
+
|
| 51 |
+
Among reference-free methods, Min-K% (Shi et al., 2024) hypothesizes that when a sentence is seen by the model, i.e., $x \in \mathcal{D}$ , it usually contains a number of tokens with low causal probabilities (outliers). Formally, given a sequence of tokens $x = \{x_{i}\}_{i=0}^{N}$ , Min-K% score is given by:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\operatorname {Min} - \mathrm{K}\% (\boldsymbol {x}) = \frac{1}{|\min - k\%|}\sum_{x_i\in \min -k\%}\operatorname {Min} - \mathrm{K}\%_{\text{token}}(x_i), \tag{1}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\text {where} \operatorname {Min} - \mathrm {K} \% _ {\text {token}} \left(x _ {i}\right) = \log p \left(x _ {i} \mid x _ {< i}\right). \tag{2}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
Here, $\mathrm{Min - K\%_{token}(x_i)}$ denotes the score for each token $x_{i}$ . The set $\min -k\%$ contains $k\%$ of the input tokens which correspond to the bottom $k\%$ scores within the sequence. If the average score for this set is less than $\tau (k)$ , where $\tau (k)$ denotes the binary threshold for a fixed $k$ , then $\mathrm{Min - K\%}$ detects the sequence $x$ as "unseen". Note that the classification threshold $\tau (k)$ is determined empirically using a validation dataset.
|
| 62 |
+
|
| 63 |
+
A recently proposed method, Min-K%++ (Zhang et al., 2024), improves the detection accuracy of Min-K% by normalizing the next-tokens log likelihood $\log p(x_i|x_{< i})$ as follows:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\operatorname {Min} - \mathrm {K} \% + + (\boldsymbol {x}) = \frac {1}{|\min - k \%|} \sum_ {x _ {i} \in \min - k \%} \operatorname {Min} - \mathrm {K} \% + + _ {\text {token}} (x _ {i}), \tag{3}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\text {where} \operatorname {Min}-\mathrm{K}\% + + _{\text {token}}(x_{i}) = \frac {\log p (x_{i} | x_{< i}) - \mu_{x_{< i}}}{\sigma_{x_{< i}}} \tag{4}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
$\mu_{x_{< i}} = \mathbb{E}_{z \sim p(\cdot | x_{< i})}[\log p(z|x_{< i})]$ and $\sigma_{x < i} = \sqrt{\mathbb{E}_{z \sim p(\cdot | x_{< i})}[(\log p(z|x_{< i}) - \mu_{x_{< i}})^2]}$ are the mean and standard deviation of the next-token likelihood.
|
| 74 |
+
|
| 75 |
+
Both Min-K% and Min-K%++ rely on the "causal" likelihood predictions of the model. However, the causal likelihood of $x_{i}$ does not consider the information from the entire sentence context, as it only depends on the preceding tokens $x_{< i}$ . We propose that sentences seen during training $(x \in \mathcal{D})$ typically have a number of tokens with low infilling probabilities. By using the non-causal token likelihoods which depend on both preceding and succeeding tokens $(x_{< i}$ and $x_{>i}$ ), we achieve a more accurate statistic than causal likelihoods alone. This enables our Infilling Score method to outperform previous pretraining data detection approaches on standard benchmarks.
|
| 76 |
+
|
| 77 |
+
# 3 METHOD
|
| 78 |
+
|
| 79 |
+
We describe our method in this section. First we describe the computation of our new ratio statistic, and explain why it offers computational scalability compared to a straightforward application of Bayes Rule. Next, we describe how this score is used to detect data in the pretraining set. Finally, we explain how we employ our method to detect pretraining samples in Llama-3.
|
| 80 |
+
|
| 81 |
+
<table><tr><td>Ground truth:</td><td>She</td><td>ate</td><td>Italian</td><td>pasta</td></tr><tr><td>Masked input:</td><td>She</td><td>ate</td><td><MASKED></td><td>pasta</td></tr><tr><td></td><td>x1</td><td>x2</td><td>m3</td><td>x4</td></tr></table>
|
| 82 |
+
|
| 83 |
+
# 3.1 COMPUTING THE INFILLING LIKELIHOOD
|
| 84 |
+
|
| 85 |
+
In this setting, we search for the most likely token to infill $m_3$ using other tokens in the sentence, i.e., $\{x_1, x_2, x_4\}$ . Using the law of total probability, we get:
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
p \left(x _ {3} \mid x _ {1}, x _ {2}, x _ {4}\right) = \frac {p \left(x _ {4} \mid x _ {1} , x _ {2} , x _ {3}\right) p \left(x _ {3} \mid x _ {1} , x _ {2}\right)}{p \left(x _ {4} \mid x _ {1} , x _ {2}\right)} = \frac {p \left(x _ {4} \mid x _ {1} , x _ {2} , x _ {3}\right) p \left(x _ {3} \mid x _ {1} , x _ {2}\right)}{\sum_ {x _ {3} ^ {\prime} \in \mathcal {V}} p \left(x _ {4} \mid x _ {1} , x _ {2} , x _ {3} ^ {\prime}\right) p \left(x _ {3} ^ {\prime} \mid x _ {1} , x _ {2}\right)}. \tag {5}
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Observe that the partition function in the denominator of equation 5 is expensive to compute as it requires summation over all the tokens in the vocabulary $\mathcal{V}$ . In the naive case, the number of LLM calls required to compute the infilling likelihood scales linearly both with vocabulary size and the sequence length. This is because for each token, the denominator in equation 5 scales linearly in the vocabulary size, and this computation needs to be repeated for each token. The size of the vocabulary can be as large as $128K$ in recent LLM (Dubey et al., 2024).
|
| 92 |
+
|
| 93 |
+
To address the scalability challenge, we introduce a ratio test statistic. Our main idea is to compute the ratio of the infilling probability of the ground-truth token and the maximum causal likelihood token. Using this proposed statistic, we bypass the need to compute the computationally expensive partition function. In the above setting, we define the ratio test-statistic of token $x_{3}$ as:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\frac {p \left(x _ {3} \mid x _ {1} , x _ {2} , x _ {4}\right)}{p \left(x _ {3} ^ {*} \mid x _ {1} , x _ {2} , x _ {4}\right)}, \text {w h e r e} x _ {3} ^ {*} = \underset {x _ {3} ^ {\prime} \in \mathcal {V}} {\arg \max } p \left(x _ {3} ^ {\prime} \mid x _ {1}, x _ {2}\right). \tag {6}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
This ratio compares the infilling likelihood of the ground-truth token to that of the model's causal prediction. If $x_{3}$ is an outlier the ratio is closer to 0, and when $x_{3}$ is among the model's top predictions, this ratio is closer to 1. Since the partition function in equation 5 is the same for $p(x_{3}|x_{1},x_{2},x_{4})$ and $p(x_3^* |x_1,x_2,x_4)$ , it is canceled in the ratio test statistic. This drastically reduces the number of LLM calls from $\mathcal{O}(N|\mathcal{V}|)$ to $\mathcal{O}(N)$ , making our test statistic independent of the size of the vocabulary (details in 4.5). Interestingly, we can exactly compute this ratio analytically using auto-regressive models without retraining. We then compute the log of this ratio and normalize the probabilities to capture the relative significance of each token in the vocabulary. First, we derive
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\begin{array}{l} \log \frac {p \left(x _ {3} \mid x _ {1} , x _ {2} , x _ {4}\right)}{p \left(x _ {3} ^ {*} \mid x _ {1} , x _ {2} , x _ {4}\right)} = \log \frac {p \left(x _ {4} \mid x _ {1} , x _ {2} , x _ {3}\right) p \left(x _ {3} \mid x _ {1} , x _ {2}\right)}{p \left(x _ {4} \mid x _ {1} , x _ {2} , x _ {3} ^ {*}\right) p \left(x _ {3} ^ {*} \mid x _ {1} , x _ {2}\right)} (7) \\ = \log p \left(x _ {4} \mid x _ {1}, x _ {2}, x _ {3}\right) + \log p \left(x _ {3} \mid x _ {1}, x _ {2}\right) - \log p \left(x _ {4} \mid x _ {1}, x _ {2}, x _ {3} ^ {*}\right) - \log p \left(x _ {3} ^ {*} \mid x _ {1}, x _ {2}\right), (8) \\ \end{array}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Generalizing (equation 7) to use $m$ future tokens for calculating the infilling ratio of token $i$ , we get the following:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\log \frac {p \left(x _ {i} \mid x _ {1 : i - 1} , x _ {i + 1 : n}\right)}{p \left(x _ {i} ^ {*} \mid x _ {1 : i - 1} , x _ {i + 1 : i + m}\right)} =
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\sum_ {j = i + 1} ^ {i + m} \log p \left(x _ {j} \mid x _ {1}, x _ {2}, \dots , x _ {i}, \dots x _ {j - 1}\right) + \log p \left(x _ {i} \mid x _ {1: i - 1}\right) - \tag {9}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\sum_ {j = i + 1} ^ {i + m} \log p (x _ {j} | x _ {1}, x _ {2},..., x _ {i} ^ {*},... x _ {j - 1}) - \log p (x _ {i} ^ {*} | x _ {1: i - 1}),
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
where $x_{1:i}$ denotes the sequence $x_1, x_2, \ldots, x_i$ , and $x_i^* = \arg \max_{x_i' \in \mathcal{V}} p(x_i'|x_{1:i-1})$ .
|
| 120 |
+
|
| 121 |
+
As suggested in Zhang et al. (2024), we normalize the terms to compute our infilling score for a given token $x_{3}$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\begin{array}{l} \text {I n f i l l i n g S c o r e} _ {\text {t o k e n}} \left(x _ {i}\right) = \sum_ {j = i + 1} ^ {i + m} \frac {\log p \left(x _ {j} \mid x _ {1} , x _ {2} , \dots , x _ {i} , \dots x _ {j - 1}\right) - \mu_ {x _ {1 : j}}}{\sigma_ {x _ {1 : j}}} + \frac {\log p \left(x _ {i} \mid x _ {1 : i - 1}\right) - \mu_ {x _ {1 : i}}}{\sigma_ {x _ {1 : i}}} \\ - \sum_ {j = i + 1} ^ {i + m} \frac {\log p \left(x _ {j} \mid x _ {1} , x _ {2} , \dots , x _ {i} ^ {*} , \dots x _ {j - 1}\right) - \mu_ {x _ {1: j}}}{\sigma_ {x _ {1: j}}} - \frac {\log p \left(x _ {i} ^ {*} \mid x _ {1 : i - 1}\right) - \mu_ {x _ {1 : i}}}{\sigma_ {x _ {1 : i}}} \tag {10} \\ \end{array}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $\mu_{x_{1:j}} = \mathbb{E}_{z\sim p(.|x_{1:j})}[\log p(z|x_{1:j})]$ , and $\sigma_{x_{1:j}} = \sqrt{\mathbb{E}_{z\sim p(.|x_{1:j})}[(\log p(z|x_{1:j}) - \mu_{x_{1:j}})^2]}$ , are the mean and standard deviation of the next token log probability, $\log p(x_j|x_1,\dots,x_{j-1})$ , over the whole vocabulary. In contrast to equation 5, there is no normalization in the denominator needed in equation 10. Note that the non-causal terms in equation 6 are all replaced by causal terms which can be computed through LLM logits. To implement, we need two calls to the LLM – the first with input as the sequence $x_1,\ldots,x_i,\ldots,x_N$ and the second call with input as $x_1,\ldots,x_i^*,\ldots,x_N$ . Note that the means and standard deviations can be computed from these logits. Thus, equation 10 requires only two calls to the LLM per token. Hence with $N$ tokens, the total number of calls to the LLM scales as $2N$ , in contrast to the naive approach where the scaling is $N|\mathcal{V}|$ . We will see in our experiments (see Section 4.5) that this leads to a dramatic decrease in runtime, with two orders of magnitude improvement.
|
| 128 |
+
|
| 129 |
+
# 3.2 PRETRAINING DATA DETECTION
|
| 130 |
+
|
| 131 |
+
To detect the membership of a given sentence $\mathbf{x}$ , we find the set of min- $k\%$ tokens with low Infilling Scores in the sentence, and compute the average score over this subset. Our final test-statistic becomes:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\operatorname {InfillingScore}(\boldsymbol {x}) = \frac{1}{|\min - k\%|}\sum_{x_i\in \min -k\%}\operatorname {InfillingScore}_{\text{token}}(x_i). \tag{11}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
Our experiments suggest that InfillingScore $(\pmb{x})$ is higher for a given sentence $\pmb{x}$ which was seen by the model during pretraining. Thus, the infilling score enables us to build a detector $h(\cdot ,\mathcal{M})$ for an LLM $\mathcal{M}$ to infer the membership class of $\pmb{x}$ as:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
h (\boldsymbol {x}, \mathcal {M}) = \left\{ \begin{array}{c c} 0 & \text {I n f i l l i n g S c o r e} (x) < \tau \\ 1 & \text {o t h e r w i s e} \end{array} , \right. \tag {12}
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
where $\tau$ denotes the binary threshold that is applied on the soft scores.
|
| 144 |
+
|
| 145 |
+
# 4 EXPERIMENTS
|
| 146 |
+
|
| 147 |
+
# 4.1 BENCHMARKS
|
| 148 |
+
|
| 149 |
+
We conduct comprehensive tests to evaluate the performance of our newly proposed test-statistic against state-of-the-art reference-based and reference-free methods. We experiment with various models and different parameter sizes. Initially, we examine the established pretraining data detection benchmarks: WikiMIA (Shi et al., 2024) and MIMIR (Duan et al., 2024). WikiMIA is a temporal MIA dataset commonly used for evaluating pretraining data detection methods. This benchmark contains excerpts from Wikipedia event articles, and classifies samples based on the timestamp of the articles. Samples from articles published before the training of an LLM are classified as "seen", and samples after the training are classified as "unseen". Hence, this benchmark applies only to a subset of LLMs, depending on their training and release time. WikiMIA has four different subsets with sequence lengths of 32, 64, 128, and 256. Zhang et al. (2024) also published a "Paraphrased" version of WikiMIA which uses ChatGPT to paraphrase the samples.
|
| 150 |
+
|
| 151 |
+
A more challenging benchmark, MIMIR (Duan et al., 2024), aims to evaluate pretraining data detection methods when the distributions of "seen" and "unseen" text samples have high n-gram overlap. MIMIR consists of samples from the Pile (Gao et al., 2020) across seven domains: English
|
| 152 |
+
|
| 153 |
+
Wikipedia, ArXiv, Github, Pile CC, PubMed Central, DM Mathematics, and HackerNews. Parts from the train subset of the Pile are labeled as "seen" while parts of the test set are labeled as "unseen". These seen and unseen samples are selected to have very high n-gram overlaps, making it significantly more challenging to infer training data membership.
|
| 154 |
+
|
| 155 |
+
Previous membership inference benchmarks such as WikiMIA, BookMIA (Shi et al., 2024), and BookTecture (Duarte et al., 2024) cannot be reliably used for Llama-3 because the model was trained more recently. To address this, we curate a new dataset consisting of book excerpts published after the release of Llama-3 labeled as "unseen" data. In this new dataset the "seen" data comes from classical fiction books published before 1965. We sample a set of 100 excerpts, with each excerpt containing 200 tokens. The "unseen" data consists of excerpts from books published after April 2024, similarly having size of 200 tokens.
|
| 156 |
+
|
| 157 |
+
# 4.2 MODELS AND METRICS
|
| 158 |
+
|
| 159 |
+
We use the WikiMIA benchmark to evaluate our Infilling Score method on Llama (7B, 13B, 30B) (Touvron et al., 2023a), Pythia (2.8B, 6.9B) (Biderman et al., 2023), GPT-NeoX-20B (Black et al., 2022), and Mamba-1.4B (Gu & Dao, 2023) models. WikiMIA is applicable to models released between 2017 and 2023. Samples from the Wikipedia event articles published in and after 2023 are labeled as "unseen", and samples from articles published before 2017 are labeled as "unseen".
|
| 160 |
+
|
| 161 |
+
For experiments on the MIMIR benchmark, we evaluate our method using Pythia (160M and 1.4B) on a subset of the Pile (Gao et al., 2020) dataset sampled across seven different domains. Pythia model has been pretrained on the training set of the Pile dataset (Biderman et al., 2023). Therefore, MIMIR benchmark has labeled samples from the train/test of the Pile as "seen"/"unseen", respectively.
|
| 162 |
+
|
| 163 |
+
We evaluate Infilling Score for membership classification against the state-of-the-art methods using the area under the ROC curve (AUROC) metric. As suggested in prior studies (Carlini et al., 2022; Miresghallah et al., 2022), we also report the True Positive rate at low False Positive rate (TPR@5%FPR).
|
| 164 |
+
|
| 165 |
+
# 4.3 BASELINES
|
| 166 |
+
|
| 167 |
+
We compare our proposed method with multiple state-of-the-art methods as our baselines. Reference method (Carlini et al., 2021) relies on the ratio of the sample perplexity (e.g. next token likelihood) estimated by the target model to the sample perplexity estimated by a smaller reference model. Zlib is another reference-based method which uses the Zlib compression entropy for calibrating the score (Carlini et al., 2021). Neighbor method (Mattern et al., 2023a) replaces tokens within a sequence using a pretrained masked language model to generate similar sentences. The method identifies if a sample belongs to the training data by comparing the loss of the original sample with the average loss of its neighboring sentences. The same algorithm is also used for detecting machine generated text in (Mitchell et al., 2023). We compare our results with both Min-K%(Shi et al., 2024) and Min-K%++ methods (Zhang et al., 2024) extensively for performance evaluations because both methods are the current state-of-the-art reference-free baselines, falling under the same category as our Infilling Score.
|
| 168 |
+
|
| 169 |
+
# 4.4 RESULTS
|
| 170 |
+
|
| 171 |
+
# 4.4.1 EVALUATION ON WIKIMIA
|
| 172 |
+
|
| 173 |
+
Table 1 presents the results comparing our Infilling Score method with state-of-the-art methods evaluated on the WikiMIA benchmark. In addition, we evaluate the effectiveness of our method using TPR at low FPR in Table 2. Our experimental setup is consistent with prior work such as Min-K%++ and Min-K%. For 32-token sequences we only use one future token, and for longer sequences we use 5 future tokens. We fix $k = 20\%$ across all experiments.
|
| 174 |
+
|
| 175 |
+
On average, our method shows a $5\%$ improvement in AUC over $\mathrm{Min - K\% + + }$ across various model sizes and different inputs sequence lengths. As hypothesized in Section 3, Infilling Score consistently outperforms existing reference-based and reference-free methods in detecting Llama pretraining data. We empirically show that predicting the token-level likelihoods, using the information in both the past and future tokens is more accurate for pretraining data detection. For longer sequences. This is specially helpful for samples with longer sequence lengths where there are more tokens in the context
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan="2">Seq. length</td><td rowspan="2">Method</td><td colspan="2">Mamba-1.4B</td><td colspan="2">NeoX-20B</td><td colspan="2">Pythia-2.8B</td><td colspan="2">Pythia-6.9B</td><td colspan="2">Llama-7B</td><td colspan="2">Llama-13B</td><td colspan="2">Llama-30B</td><td>Average</td></tr><tr><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td></td></tr><tr><td rowspan="6">32</td><td>Infilling Score (Ours)</td><td>66.6</td><td>66.1</td><td>75.6</td><td>73.1</td><td>65.0</td><td>63.9</td><td>69.7</td><td>68.2</td><td>88.1</td><td>88.0</td><td>88.6</td><td>87.0</td><td>87.3</td><td>84.7</td><td>76.56</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>66.8</td><td>66.1</td><td>75.0</td><td>69.6</td><td>64.4</td><td>62.4</td><td>70.3</td><td>68.0</td><td>85.1</td><td>84.0</td><td>84.8</td><td>82.7</td><td>84.3</td><td>81.2</td><td>74.62</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>63.2</td><td>62.9</td><td>71.8</td><td>69.7</td><td>61.8</td><td>61.7</td><td>66.3</td><td>65.2</td><td>66.3</td><td>67.0</td><td>68.0</td><td>68.4</td><td>70.1</td><td>70.7</td><td>66.65</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>64.1</td><td>63.6</td><td>70.2</td><td>68.3</td><td>62.1</td><td>64.5</td><td>65.8</td><td>65.5</td><td>-</td><td>-</td><td>65.8</td><td>65.0</td><td>67.6</td><td>66.3</td><td>65.73</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>61.9</td><td>62.3</td><td>69.0</td><td>68.2</td><td>62.1</td><td>62.3</td><td>64.3</td><td>64.2</td><td>66.7</td><td>67.3</td><td>67.8</td><td>68.3</td><td>69.8</td><td>70.4</td><td>66.04</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>62.2</td><td>62.3</td><td>67.2</td><td>66.3</td><td>61.3</td><td>61.2</td><td>63.6</td><td>63.5</td><td>-</td><td>-</td><td>57.9</td><td>56.2</td><td>63.5</td><td>62.4</td><td>62.3</td></tr><tr><td rowspan="6">64</td><td>Infilling Score (Ours)</td><td>67.3</td><td>62.9</td><td>76.8</td><td>73.1</td><td>65.7</td><td>58.9</td><td>71.4</td><td>64.2</td><td>89.7</td><td>86.8</td><td>90.1</td><td>84.5</td><td>88.3</td><td>81.2</td><td>75.78</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>67.2</td><td>63.3</td><td>76.0</td><td>67.5</td><td>65.0</td><td>58.5</td><td>71.6</td><td>64.8</td><td>85.7</td><td>80.8</td><td>86.7</td><td>78.8</td><td>84.7</td><td>74.9</td><td>73.25</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>62.2</td><td>58.0</td><td>72.2</td><td>66.1</td><td>61.2</td><td>56.8</td><td>65.0</td><td>61.1</td><td>63.3</td><td>61.8</td><td>66.0</td><td>64.0</td><td>68.5</td><td>65.7</td><td>63.71</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>60.6</td><td>60.6</td><td>67.1</td><td>67.4</td><td>61.3</td><td>59.6</td><td>63.2</td><td>63.1</td><td>-</td><td>-</td><td>64.1</td><td>64.7</td><td>67.1</td><td>66.7</td><td>63.79</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>60.4</td><td>59.1</td><td>67.6</td><td>66.4</td><td>60.5</td><td>59.0</td><td>62.6</td><td>61.6</td><td>63.4</td><td>63.6</td><td>65.3</td><td>65.3</td><td>67.5</td><td>67.4</td><td>63.55</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>60.6</td><td>59.6</td><td>65.7</td><td>65.9</td><td>59.6</td><td>59.2</td><td>62.4</td><td>62.9</td><td>-</td><td>-</td><td>63.4</td><td>60.9</td><td>69.0</td><td>65.4</td><td>63.88</td></tr><tr><td rowspan="6">128</td><td>Infilling Score (Ours)</td><td>69.6</td><td>66.6</td><td>78.1</td><td>74.9</td><td>67.1</td><td>64.1</td><td>70.4</td><td>67.5</td><td>87.6</td><td>83.4</td><td>88.3</td><td>83.5</td><td>86.7</td><td>79.5</td><td>76.23</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>68.8</td><td>65.6</td><td>75.9</td><td>72.2</td><td>66.8</td><td>63.4</td><td>70.4</td><td>66.8</td><td>85.7</td><td>82.2</td><td>83.9</td><td>76.3</td><td>82.6</td><td>73.8</td><td>73.88</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>66.8</td><td>64.5</td><td>75.0</td><td>72.6</td><td>66.9</td><td>64.7</td><td>69.5</td><td>67.0</td><td>70.1</td><td>68.1</td><td>71.5</td><td>68.7</td><td>73.9</td><td>70.2</td><td>69.25</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>64.8</td><td>62.6</td><td>71.6</td><td>69.6</td><td>65.2</td><td>61.9</td><td>67.5</td><td>64.3</td><td>-</td><td>-</td><td>68.3</td><td>64.0</td><td>72.2</td><td>67.2</td><td>66.60</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>65.6</td><td>65.3</td><td>71.8</td><td>71.8</td><td>65.0</td><td>65.0</td><td>67.6</td><td>67.4</td><td>68.3</td><td>68.4</td><td>69.7</td><td>69.6</td><td>71.8</td><td>71.5</td><td>68.48</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>65.2</td><td>61.1</td><td>67.8</td><td>67.8</td><td>59.6</td><td>59.5</td><td>63.3</td><td>62.9</td><td>-</td><td>-</td><td>62.6</td><td>59.7</td><td>71.9</td><td>70.0</td><td>64.28</td></tr><tr><td rowspan="4">256</td><td>Infilling Score (Ours)</td><td>70.1</td><td>-</td><td>77.0</td><td>-</td><td>73.6</td><td>-</td><td>70.5</td><td>-</td><td>96.6</td><td>-</td><td>95.3</td><td>-</td><td>89.8</td><td>-</td><td>81.84</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>65.5</td><td>-</td><td>71.9</td><td>-</td><td>63.9</td><td>-</td><td>65.5</td><td>-</td><td>82.5</td><td>-</td><td>82.3</td><td>-</td><td>77.3</td><td>-</td><td>72.70</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>69.8</td><td>-</td><td>78.0</td><td>-</td><td>70.0</td><td>-</td><td>71.1</td><td>-</td><td>72.4</td><td>-</td><td>72.9</td><td>-</td><td>72.1</td><td>-</td><td>72.33</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>67.6</td><td>-</td><td>73.2</td><td>-</td><td>69.3</td><td>-</td><td>69.8</td><td>-</td><td>71.2</td><td>-</td><td>73.1</td><td>-</td><td>72.8</td><td>-</td><td>71.00</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 1: AUROC results on the Original and Paraphrased subsets of the WikiMIA benchmark (Shi et al., 2024). Note that the paraphrased version of the 256-token subset of WikiMIA is not published on HuggingFace which is why some results are missing for 256 tokens. Bold shows the best result and underline shows the second best results in each section. As seen, our Infilling Score method outperforms previous work for detecting pretraining samples for EleutherAI's Pythia (Biderman et al., 2023) and GPT-NeoX (Black et al., 2022), Mamba (Gu & Dao, 2023), and Meta's Llama (Touvron et al., 2023a) models across various model sizes.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan="2">Seq. length</td><td rowspan="2">Method</td><td colspan="2">Mamba-1.4B</td><td colspan="2">NeoX-20B</td><td colspan="2">Pythia-2.8B</td><td colspan="2">Pythia-6.9B</td><td colspan="2">Llama-7B</td><td colspan="2">Llama-13B</td><td colspan="2">Llama-30B</td><td>Average</td></tr><tr><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td>Ori.</td><td>Para.</td><td></td></tr><tr><td rowspan="6">32</td><td>Infilling Score (Ours)</td><td>14.0</td><td>16.5</td><td>27.6</td><td>23.0</td><td>13.7</td><td>13.7</td><td>17.3</td><td>20.7</td><td>34.1</td><td>35.9</td><td>30.5</td><td>29.7</td><td>33.1</td><td>38.2</td><td>24.85</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>12.9</td><td>10.6</td><td>19.4</td><td>12.9</td><td>14.2</td><td>13.9</td><td>17.1</td><td>17.1</td><td>33.6</td><td>31.5</td><td>38.5</td><td>35.9</td><td>31.3</td><td>27.4</td><td>22.59</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>14.7</td><td>15.2</td><td>27.9</td><td>19.6</td><td>17.1</td><td>16.5</td><td>17.8</td><td>21.7</td><td>15.2</td><td>16.0</td><td>18.9</td><td>17.6</td><td>21.2</td><td>18.1</td><td>18.39</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>11.9</td><td>7.2</td><td>22.2</td><td>15.2</td><td>15.0</td><td>8.5</td><td>16.5</td><td>9.6</td><td>-</td><td>-</td><td>11.6</td><td>8.5</td><td>9.3</td><td>9.3</td><td>12.07</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>15.5</td><td>13.2</td><td>19.9</td><td>18.6</td><td>15.8</td><td>14.5</td><td>16.3</td><td>12.7</td><td>13.7</td><td>14.2</td><td>11.6</td><td>15.0</td><td>14.5</td><td>15.0</td><td>15.03</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>7.8</td><td>5.9</td><td>1.5</td><td>15.2</td><td>6.2</td><td>7.2</td><td>6.7</td><td>6.2</td><td>-</td><td>-</td><td>4.7</td><td>5.4</td><td>9.8</td><td>7.5</td><td>7.01</td></tr><tr><td rowspan="6">64</td><td>Infilling Score (Ours)</td><td>19.4</td><td>10.2</td><td>27.8</td><td>21.8</td><td>18.0</td><td>13.4</td><td>21.1</td><td>14.8</td><td>50.7</td><td>28.5</td><td>53.5</td><td>34.9</td><td>44.0</td><td>27.8</td><td>27.56</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>16.6</td><td>7.0</td><td>20.4</td><td>13.0</td><td>16.2</td><td>9.9</td><td>26.1</td><td>14.1</td><td>39.4</td><td>26.8</td><td>34.1</td><td>26.4</td><td>36.3</td><td>21.5</td><td>21.98</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>19.4</td><td>8.4</td><td>20.4</td><td>17.6</td><td>18.3</td><td>11.3</td><td>19.0</td><td>12.7</td><td>14.4</td><td>13.7</td><td>17.2</td><td>13.4</td><td>17.6</td><td>14.4</td><td>15.55</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>8.8</td><td>9.5</td><td>13.0</td><td>18.3</td><td>10.2</td><td>11.3</td><td>10.9</td><td>12.7</td><td>-</td><td>-</td><td>10.2</td><td>14.4</td><td>9.9</td><td>11.6</td><td>11.73</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>14.1</td><td>15.1</td><td>16.6</td><td>19.4</td><td>14.4</td><td>16.6</td><td>16.2</td><td>15.8</td><td>11.3</td><td>14.8</td><td>12.7</td><td>13.4</td><td>15.5</td><td>16.9</td><td>15.20</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>4.6</td><td>8.1</td><td>15.5</td><td>14.1</td><td>10.6</td><td>13.0</td><td>12.0</td><td>16.2</td><td>-</td><td>-</td><td>4.2</td><td>4.6</td><td>11.3</td><td>8.1</td><td>10.19</td></tr><tr><td rowspan="6">128</td><td>Infilling Score (Ours)</td><td>16.6</td><td>15.8</td><td>25.9</td><td>33.1</td><td>15.8</td><td>13.4</td><td>20.9</td><td>21.6</td><td>38.1</td><td>33.8</td><td>41.0</td><td>30.9</td><td>24.5</td><td>31.7</td><td>25.93</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>16.6</td><td>10.1</td><td>23.0</td><td>19.4</td><td>17.3</td><td>14.4</td><td>22.3</td><td>21.6</td><td>46.8</td><td>38.8</td><td>41.0</td><td>21.5</td><td>38.1</td><td>21.6</td><td>25.18</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>16.6</td><td>14.4</td><td>25.2</td><td>22.3</td><td>13.7</td><td>14.4</td><td>18.0</td><td>17.3</td><td>19.4</td><td>21.6</td><td>25.9</td><td>14.4</td><td>23.7</td><td>18.7</td><td>18.97</td></tr><tr><td>Neighbor (Mattern et al., 2023a)</td><td>15.8</td><td>13.7</td><td>15.8</td><td>18.7</td><td>8.6</td><td>12.2</td><td>10.8</td><td>17.3</td><td>-</td><td>-</td><td>12.9</td><td>11.6</td><td>15.1</td><td>14.4</td><td>13.91</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>19.4</td><td>17.3</td><td>23.0</td><td>21.6</td><td>18.7</td><td>16.6</td><td>20.9</td><td>20.9</td><td>14.4</td><td>18.7</td><td>18.7</td><td>16.9</td><td>18.0</td><td>19.4</td><td>18.89</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>10.1</td><td>11.5</td><td>15.8</td><td>19.4</td><td>10.1</td><td>7.2</td><td>13.7</td><td>8.6</td><td>-</td><td>-</td><td>10.8</td><td>8.1</td><td>10.8</td><td>18.7</td><td>12.07</td></tr><tr><td rowspan="4">256</td><td>Infilling Score (Ours)</td><td>25.5</td><td>-</td><td>29.4</td><td>-</td><td>19.6</td><td>-</td><td>29.4</td><td>-</td><td>80.4</td><td>-</td><td>80.4</td><td>-</td><td>72.5</td><td>-</td><td>48.17</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>15.7</td><td>-</td><td>13.7</td><td>-</td><td>13.7</td><td>-</td><td>11.8</td><td>-</td><td>47.1</td><td>-</td><td>37.3</td><td>-</td><td>19.6</td><td>-</td><td>22.70</td></tr><tr><td>Min-K%%(Shi et al., 2024)</td><td>13.7</td><td>-</td><td>21.6</td><td>-</td><td>13.7</td><td>-</td><td>15.7</td><td>-</td><td>17.6</td><td>-</td><td>19.6</td><td>-</td><td>13.7</td><td>-</td><td>16.51</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>23.5</td><td>-</td><td>23.5</td><td>-</td><td>19.6</td><td>-</td><td>27.5</td><td>-</td><td>21.6</td><td>-</td><td>27.5</td><td>-</td><td>29.4</td><td>-</td><td>24.66</td></tr></table>
|
| 182 |
+
|
| 183 |
+
Table 2: True Positive rate at low False Positive rate (FPR=5%) results on the Original and Paraphrased subsets of the WikiMIA benchmark (Shi et al., 2024). Note that the paraphrased version of the 256-token subset of WikiMIA is not published on HuggingFace, which is why some results are missing for 256 tokens. Bold shows the best results and underline shows the second best results in each section. As shown, our Infilling Score method on average achieves higher True Positive rate compared to existing methods, with the best performance on 256-token long sequences.
|
| 184 |
+
|
| 185 |
+
to use for inference. Since our method offers the capability to leverage the future as well as past tokens, it shows a significant gain over current state-of-the-art method when input sequences are long.
|
| 186 |
+
|
| 187 |
+
# 4.4.2 EVALUATION ON MIMIR
|
| 188 |
+
|
| 189 |
+
Table 3 shows the results comparing our Infilling Score method with SoTA methods evaluated on the challenging MIMIR benchmark. In the MIMIR dataset, samples from the "seen" and "unseen" classes are sampled from the same dataset to ensure 13-gram overlap of up to 0.8 between the classes. Reference-based models show high performance on this benchmark. However, the drawback of this
|
| 190 |
+
|
| 191 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">Wikipedia</td><td colspan="2">Github</td><td colspan="2">Pile CC</td><td colspan="2">PubMed Central</td></tr><tr><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td></tr><tr><td>Infilling Score (Ours)</td><td>49.7</td><td>53.4</td><td>65.5</td><td>70.0</td><td>53.7</td><td>53.3</td><td>52.3</td><td>53.5</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>49.7</td><td>53.7</td><td>64.8</td><td>69.6</td><td>50.6</td><td>51.0</td><td>50.6</td><td>51.4</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>50.2</td><td>51.3</td><td>65.7</td><td>69.9</td><td>50.3</td><td>51.0</td><td>50.6</td><td>50.3</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>51.1</td><td>52.0</td><td>67.4</td><td>71.0</td><td>49.6</td><td>50.1</td><td>49.9</td><td>50.0</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>51.2</td><td>55.2</td><td>63.9</td><td>67.1</td><td>49.2</td><td>52.2</td><td>51.3</td><td>53.1</td></tr><tr><td rowspan="2">Method</td><td colspan="2">ArXiv</td><td colspan="2">DM Math</td><td colspan="2">HackerNews</td><td colspan="2">Average</td></tr><tr><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td><td>160M</td><td>1.4B</td></tr><tr><td>Infilling Score (Ours)</td><td>51.0</td><td>51.3</td><td>53.5</td><td>50.4</td><td>50.9</td><td>52.6</td><td>53.4</td><td>54.9</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>50.1</td><td>51.1</td><td>50.5</td><td>50.9</td><td>50.7</td><td>51.3</td><td>52.4</td><td>54.1</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>51.0</td><td>51.7</td><td>49.4</td><td>49.7</td><td>50.9</td><td>51.3</td><td>52.6</td><td>53.6</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>50.1</td><td>50.9</td><td>48.1</td><td>48.2</td><td>49.7</td><td>50.3</td><td>52.3</td><td>53.2</td></tr><tr><td>Ref (Carlini et al., 2021)</td><td>49.4</td><td>51.5</td><td>51.1</td><td>51.1</td><td>49.1</td><td>52.2</td><td>52.2</td><td>54.6</td></tr></table>
|
| 192 |
+
|
| 193 |
+
Table 3: AUROC results on MIMIR dataset (Duan et al., 2024) for Pythia models for different sizes. Similar to Zhang et al. (2024), we experiment on a subset of MIMIR with maximum 13-gram overlap of 0.8 between samples form "seen" and "unseen" class. Bold shows the best results and underline shows the second best results in each section. As shown, our Infilling Score method overall outperforms existing reference-free and reference-based methods.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Year Pub.</td><td>Book Title</td><td>Contamination Rate</td></tr><tr><td>1817</td><td>Persuasion</td><td>99</td></tr><tr><td>2006</td><td>Oakleaf bearers</td><td>76</td></tr><tr><td>1812</td><td>Grimms’ Fairy Tales</td><td>73</td></tr><tr><td>2003</td><td>The Sacred Land</td><td>73</td></tr><tr><td>1986</td><td>Howl’s Moving Castle</td><td>69</td></tr><tr><td>2009</td><td>CATCHING FIRE</td><td>68</td></tr><tr><td>1991</td><td>Red Magic</td><td>66</td></tr><tr><td>2009</td><td>Tenth Grade Bleeds</td><td>64</td></tr><tr><td>1998</td><td>Mad Ship</td><td>61</td></tr><tr><td>1996</td><td>Too Good to Leave, Too Bad to Stay</td><td>58</td></tr><tr><td>2009</td><td>Crouching Vampire, Hidden Fang</td><td>56</td></tr><tr><td>1889</td><td>Three Men in a Boat (To Say Nothing of the Dog)</td><td>56</td></tr><tr><td>2003</td><td>Something from the Nightside</td><td>54</td></tr><tr><td>2009</td><td>The Silver Eagle</td><td>53</td></tr><tr><td>1982</td><td>The Man From St. Petersburg</td><td>53</td></tr><tr><td>2000</td><td>Ship of Destiny</td><td>53</td></tr><tr><td>2008</td><td>The Painted Man</td><td>53</td></tr><tr><td>2007</td><td>The Center Cannot Hold</td><td>52</td></tr><tr><td>2007</td><td>Raintree: Sanctuary</td><td>52</td></tr><tr><td>2005</td><td>Sister of the Dead</td><td>52</td></tr><tr><td>2006</td><td>The Corfu Trilogy</td><td>50</td></tr><tr><td>2008</td><td>Ascendancy of the Last</td><td>50</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Table 4: Books detected in the pretraining data of Llama-3-8B (Dubey et al., 2024). Contamination rate shows the percentage of excerpts sampled from the books which were classified as "seen" using the Infilling Score method.
|
| 198 |
+
|
| 199 |
+
approach is that it requires testing multiple different LLMs to determine the best performing baseline (Duan et al., 2024; Zhang et al., 2024). Despite the competitive nature of the benchmark, our Infilling Score achieves the best performance compared to both reference-free and reference-based models on average over different domains.
|
| 200 |
+
|
| 201 |
+
# 4.4.3 DETECTING PRETRAINING DATA OF LLAMA-3
|
| 202 |
+
|
| 203 |
+
We apply Infilling Score to detect books that were likely used in the pretraining of the Llama3-8B model, recently released by Meta (Dubey et al., 2024). Llama3 is known to be trained using over 15T tokens of data (7x larger training set than Llama-2) according to Dubey et al. (2024). No information about the source and distribution of this data is disclosed by the developers, making it difficult to construct a labeled MIA dataset of books suitable for this model.
|
| 204 |
+
|
| 205 |
+
We used our books dataset as a validation set to find the best hyperparameters ( $k\%$ and # future tokens, $m$ , and the classification threshold $\tau$ ) for identifying samples used in pretraining Llama3. Since Llama3 has been released in 2024, existing temporal benchmarks such as WikiMIA, BookMIA (Shi et al., 2024), and BookTection (Duarte et al., 2024) cannot be used for pretraining data detection on this model. We found that using the next 100 tokens when calculating the Infilling Score shows the highest accuracy on this benchmark. Table 12 shows the performance of our method on this dataset.
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
Figure 1: Figure shows an example of the distribution of the Infilling Scores for "seen" and "unseen" excerpts in our validation dataset which consists of text from fiction books. Scores are normalized in each distribution. The unseen data comes from recent novels published after the training of Llama 3. For the classic novel Persuasion, our method detects $99\%$ of the excerpt to be in the training set. As seen in this histogram, the distribution for Persuasion matches other seen novels and is clearly separated from unseen data, as one would expect.
|
| 209 |
+
|
| 210 |
+
We employ our method on 20,000 excerpts sampled from 200 books. Table 4 presents the list of books which we found to be in the training dataset of Llama3-8B with $\geq 50\%$ contamination rate. Contamination rate shows the percentage of excerpts detected as 'seen' for each publication. Figure 1 shows that books with high contamination rate have higher sample statistic overlap with the "seen" excerpts in our validation dataset.
|
| 211 |
+
|
| 212 |
+
# 4.4.4 ABLATION STUDY ON THE NUMBER OF FUTURE TAXENS TO USE
|
| 213 |
+
|
| 214 |
+
It is important to note that the number of future tokens used to calculate the Infilling Score determines the performance gain of our method. As shown in the Figure 2 increasing the number of future tokens does not necessarily lead to a higher AUC. However, on the WikiMIA benchmark, using about 5 future tokens leads to relatively better AUC across various context lengths on WikiMIA using Llama-7B and Llama-13B. We conduct all experiments with different input sequence lengths (32, 64, 128, and 256) to examine the effect of the number of future tokens across various context lengths. While the ideal number of next tokens to use remains consistent across various model sizes, the optimal number may differ depending on data distribution and model architecture. We investigate various values for $m$ within $\{0, 1, 3, 5, 10, 20, \dots, N\}$ , where $N$ represents the input sequence length. It's important to note that the hyperparameter search does not increase the computational complexity, as incorporating additional future tokens does not require extra calls to the LLM. We provide additional results in Appendix A.
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 2: The figures show the AUROC achieved by the Infilling Score as the number of future tokens increases. These results are shown for input sequence lengths of 32, 64, 128, and 256. The left figure presents the results for Llama-7B, while the right figure shows the results for Llama-13B. Our baseline, representing existing methods, uses zero future tokens. The optimal number of future tokens to use is 1 for sequences of 32 tokens. For longer sequences of up to 256 tokens, the optimal number is around 5 for both models.
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
|
| 221 |
+
# 4.5 ALGORITHM RUNTIME
|
| 222 |
+
|
| 223 |
+
Table 5 compares the runtime of our Infilling Score algorithm with straightforward application of Bayes, and Min-K%++ (Shi et al., 2024) using Llama-7B. Although both the naive approach and Infilling score are slower than Min-K%, these methods yield a more accurate estimate of token likelihoods for membership inference. Note that our proposed test statistic, Infilling Score, significantly reduces the computational complexity compared to the naive approach, delivering an accurate membership inference score within a feasible runtime. WikiMIA dataset has 776 sequences of length 32, 542 of length 64, 250 of length 128, and 82 of length 256 tokens. The compute cost increases with the sequence length. The 256-token sequences require approximately 2,460 seconds compared to 776 seconds for 32-token sequences (30 seconds per sequence), highlighting the trade-off between detection accuracy and computational efficiency.
|
| 224 |
+
|
| 225 |
+
<table><tr><td>Seq. length</td><td>Min-K%++</td><td>Infilling Score</td><td>Naive Approach</td></tr><tr><td>32</td><td>0.028 sec.</td><td>0.952 sec.</td><td>207 sec.</td></tr><tr><td>64</td><td>0.042 sec.</td><td>3.11 sec.</td><td>334 sec.</td></tr><tr><td>128</td><td>0.064 sec.</td><td>9.47 sec.</td><td>581 sec.</td></tr><tr><td>256</td><td>0.106 sec.</td><td>29.98 sec.</td><td>1141 sec.</td></tr></table>
|
| 226 |
+
|
| 227 |
+
To evaluate the impact of the number of future tokens used, $m$ , on the runtime, we measure the runtime using 1, 5, and 10 future tokens. As discussed in Section 3.1, the number of LLM calls required by our Infilling Score algorithm is independent of the number of future tokens used. However, increasing the number of future tokens also increases the number of terms in the summations in equation 10. The additional computations have a minimal impact on the runtime as shown in Table 6.
|
| 228 |
+
|
| 229 |
+
Table 5: Algorithm runtime results comparing Infilling Score, Min- $K\% + +$ , and the naive approach discussed in Section 3, sequences of 32, 64, 128, and 256 tokens using Llama-7B on a H200 GPU.
|
| 230 |
+
|
| 231 |
+
<table><tr><td>Seq. length</td><td colspan="3">32</td><td colspan="3">64</td><td colspan="3">128</td><td colspan="3">256</td></tr><tr><td># future tokens</td><td>1</td><td>5</td><td>10</td><td>1</td><td>5</td><td>10</td><td>1</td><td>5</td><td>10</td><td>1</td><td>5</td><td>10</td></tr><tr><td>Runtime</td><td>0.952 sec.</td><td>0.953 sec.</td><td>0.956 sec.</td><td>3.11 sec.</td><td>3.12 sec.</td><td>3.12 sec.</td><td>9.47 sec.</td><td>9.48 sec.</td><td>9.49 sec.</td><td>29.98 sec.</td><td>30.01 sec.</td><td>30.04 sec.</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 6: Algorithm runtime as the number of future tokens used increases. As the table indicates, increasing the number of future tokens to use has minimal impact on runtime.
|
| 234 |
+
|
| 235 |
+
# 5 CONCLUSIONS
|
| 236 |
+
|
| 237 |
+
Limitations One limitation is that computing the Infilling Score requires grey-box access to the LLM, meaning access to the sample log probabilities estimated by the model. This requirement is common among most of the existing membership inference methods. Another limitation of our approach lies in its runtime complexity. As described in Section 3.1, the order of LLM calls required for computing the infilling likelihood (for a sequence of length $N$ ) with the naive Bayes method is $N|\mathcal{V}|$ , which scales linearly with both sequence length $N$ , and vocabulary size $|\mathcal{V}|$ . By introducing the Infilling Score, we reduce the number of LLM calls to $2N$ . However, prior methods such as Min-K% and Min-K%++ require only a single LLM call (to test a sequence of length $N$ ), and are faster compared to our proposed algorithm.
|
| 238 |
+
|
| 239 |
+
To conclude, we proposed a novel method that can detect if text sequences have been present in the training set with significantly better accuracy compared to prior work. Our new test statistic allows us to derive non-causal likelihoods (up to a multiplicative factor) from pre-trained autoregressive models and may have other uses, beyond membership inference. Although our method is slower compared to previous methods, it can be practically run in a few seconds for large foundation models.
|
| 240 |
+
|
| 241 |
+
Our results present evidence that numerous books and other recent sources of text have been in the training data of modern LLMs. This test can further be used for measuring dataset contamination rates, and also evaluating decontamination methods. An important research direction would be to create larger evaluation datasets for membership inference, and include high n-gram overlap samples for recent sources that remain unseen to llama3 and other recently released frontier models.
|
| 242 |
+
|
| 243 |
+
# ACKNOWLEDGMENTS
|
| 244 |
+
|
| 245 |
+
This research has been supported by NSF Grants 2019844, 2112471, AF 1901292, CNS 2148141, Tripods CCF 1934932, Tripods 2217069, NSF AI Institute for Foundations of Machine Learning (IFML) 2019844, the Texas Advanced Computing Center (TACC) and research gifts by Western Digital, Wireless Networking and Communications Group (WnCG) Industrial Affiliates Program, UT Austin Machine Learning Lab (MLL), Cisco and the Stanly P. Finch Centennial Professorship in Engineering.
|
| 246 |
+
|
| 247 |
+
# REFERENCES
|
| 248 |
+
|
| 249 |
+
Raef Bassily, Vitaly Feldman, Cristóbal Guzmán, and Kunal Talwar. Stability of stochastic gradient descent on nonsmooth convex losses, 2020.
|
| 250 |
+
Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling, 2023.
|
| 251 |
+
Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, and Samuel Weinbach. Gpt-neox-20b: An open-source autoregressive language model, 2022.
|
| 252 |
+
Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, Alina Oprea, and Colin Raffel. Extracting training data from large language models, 2021.
|
| 253 |
+
Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and Florian Tramer. Membership inference attacks from first principles, 2022.
|
| 254 |
+
Kent K. Chang, Mackenzie Cramer, Sandeep Soni, and David Bamman. Speak, memory: An archaeology of books known to chatgpt/gpt-4, 2023.
|
| 255 |
+
Michael Duan, Anshuman Suri, Niloofar Mireshghallah, Sewon Min, Weijia Shi, Luke Zettlemoyer, Yulia Tsvetkov, Yejin Choi, David Evans, and Hannaneh Hajishirzi. Do membership inference attacks work on large language models? arXiv preprint arXiv:2402.07841, 2024.
|
| 256 |
+
Andre V. Duarte, Xuandong Zhao, Arlindo L. Oliveira, and Lei Li. De-cop: Detecting copyrighted content in language models training data, 2024.
|
| 257 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, and Angela Fan et. al. The llama 3 herd of models, 2024. URL https://arxiv.org/abs/2407.21783.
|
| 258 |
+
Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. The pile: An 800gb dataset of diverse text for language modeling, 2020.
|
| 259 |
+
Michael M. Grynbaum and Ryan Mac. The times sues openai and microsoft over a.i. use of copyrighted work. https://www.nytimes.com/2023/12/27/business/media/new-york-times-open-ai-microsoft-lawsuit.html, 2023.
|
| 260 |
+
Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces, 2023.
|
| 261 |
+
Moritz Hardt, Benjamin Recht, and Yoram Singer. Train faster, generalize better: Stability of stochastic gradient descent, 2016.
|
| 262 |
+
Minhao Jiang, Ken Ziyu Liu, Ming Zhong, Ryan Schaeffer, Siru Ouyang, Jiawei Han, and Sanmi Koyejo. Investigating data contamination for pre-training language models, 2024. URL https://arxiv.org/abs/2401.06059.
|
| 263 |
+
|
| 264 |
+
Jeffrey Li, Alex Fang, Georgios Smyrnis, Maor Ivgi, Matt Jordan, Samir Gadre, Hritik Bansal, Etash Guha, Sedrick Keh, Kushal Arora, Saurabh Garg, Rui Xin, Niklas Muennighoff, Reinhard Heckel, Jean Mercat, Mayee Chen, Suchin Gururangan, Mitchell Wortsman, Alon Albalak, Yonatan Bitton, Marianna Nezhurina, Amro Abbas, Cheng-Yu Hsieh, Dhruba Ghosh, Josh Gardner, Maciej Kilian, Hanlin Zhang, Rulin Shao, Sarah Pratt, Sunny Sanyal, Gabriel Ilharco, Giannis Daras, Kalyani Marathe, Aaron Gokaslan, Jieyu Zhang, Khyathi Chandu, Thao Nguyen, Igor Vasiljevic, Sham Kakade, Shuran Song, Sujay Sanghavi, Fartash Faghri, Sewoong Oh, Luke Zettlemoyer, Kyle Lo, Alaaeldin El-Nouby, Hadi Pouransari, Alexander Toshev, Stephanie Wang, Dirk Groeneveld, Luca Soldaini, Pang Wei Koh, Jenia Jitsev, Thomas Kollar, Alexandros G. Dimakis, Yair Carmon, Achal Dave, Ludwig Schmidt, and Vaishaal Shankar. Datacomp-lm: In search of the next generation of training sets for language models, 2024. URL https://arxiv.org/abs/2406.11794.
|
| 265 |
+
Saeed Mahloujifar, Huseyin A. Inan, Melissa Chase, Esha Ghosh, and Marcello Hasegawa. Membership inference on word embedding and beyond, 2021.
|
| 266 |
+
Justus Mattern, Fatemehsadat Mireshghallah, Zhijing Jin, Bernhard Schoelkopf, Minmaya Sachan, and Taylor Berg-Kirkpatrick. Membership inference attacks against language models via neighbourhood comparison. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Findings of the Association for Computational Linguistics: ACL 2023, pp. 11330–11343, Toronto, Canada, July 2023a. Association for Computational Linguistics. doi: 10.18653/v1/2023-findings-acl.719. URL https://aclanthology.org/2023-findings-acl.719.
|
| 267 |
+
Justus Mattern, Fatemehsadat Mireshghallah, Zhijing Jin, Bernhard Scholkopf, Mrinmaya Sachan, and Taylor Berg-Kirkpatrick. Membership inference attacks against language models via neighbourhood comparison, 2023b.
|
| 268 |
+
Matthieu Meeus, Shubham Jain, Marek Rei, and Yves-Alexandre de Montjoye. Did the neurons read your book? document-level membership inference for large language models, 2023.
|
| 269 |
+
Sewon Min, Suchin Gururangan, Eric Wallace, Hannaneh Hajishirzi, Noah A. Smith, and Luke Zettlemoyer. Silo language models: Isolating legal risk in a nonparametric datastore, 2023.
|
| 270 |
+
Fatemehsadat Mireshghallah, Kartik Goyal, Archit Uniyal, Taylor Berg-Kirkpatrick, and Reza Shokri. Quantifying privacy risks of masked language models using membership inference attacks, 2022.
|
| 271 |
+
Eric Mitchell, Yoonho Lee, Alexander Khazatsky, Christopher D. Manning, and Chelsea Finn. Detectgpt: Zero-shot machine-generated text detection using probability curvature, 2023.
|
| 272 |
+
Maximilian Mozes, Xuanli He, Bennett Kleinberg, and Lewis D. Griffin. Use of llms for illicit purposes: Threats, prevention measures, and vulnerabilities, 2023.
|
| 273 |
+
OpenAI, Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, and Shyamal Anadkat et. al. Gpt-4 technical report, 2024.
|
| 274 |
+
Yonatan Oren, Nicole Meister, Niladri Chatterji, Faisal Ladhak, and Tatsunori B. Hashimoto. Proving test set contamination in black box language models, 2023.
|
| 275 |
+
Ashwinee Panda, Christopher A. Choquette-Choo, Zhengming Zhang, Yaoqing Yang, and Prateek Mittal. Teach llms to phish: Stealing private information from language models, 2024.
|
| 276 |
+
Virat Shejwalkar, Huseyin A. Inan, Amir Houmansadr, and Robert Sim. Membership inference attacks against nlp classification models. 2021. URL https://api-semanticscholar.org/CorpusID:245222525.
|
| 277 |
+
Weijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang, Daogao Liu, Terra Blevins, Danqi Chen, and Luke Zettlemoyer. Detecting pretraining data from large language models, 2024.
|
| 278 |
+
Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks against machine learning models, 2017.
|
| 279 |
+
Congzheng Song and Vitaly Shmatikov. Auditing data provenance in text-generation models, 2019.
|
| 280 |
+
|
| 281 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023a.
|
| 282 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023b.
|
| 283 |
+
Shuo Yang, Wei-Lin Chiang, Lianmin Zheng, Joseph E. Gonzalez, and Ion Stoica. Rethinking benchmark and contamination for language models with rephrased samples, 2023. URL https://arxiv.org/abs/2311.04850.
|
| 284 |
+
Jingyang Zhang, Jingwei Sun, Eric Yeats, Yang Ouyang, Martin Kuo, Jianyi Zhang, Hao Yang, and Hai Li. Min-k%++. Improved baseline for detecting pre-training data from large language models. arXiv preprint arXiv:2404.02936, 2024.
|
| 285 |
+
Kun Zhou, Yutao Zhu, Zhipeng Chen, Wentong Chen, Wayne Xin Zhao, Xu Chen, Yankai Lin, Ji-Rong Wen, and Jiawei Han. Don't make your llm an evaluation benchmark cheater, 2023.
|
| 286 |
+
|
| 287 |
+
# A CHOICE OF HYPERPARAMETERS
|
| 288 |
+
|
| 289 |
+
Infilling Score algorithm has two hyperparameters: $m$ which represents the number of future tokens to use, and $k$ which represents the $k\%$ tokens with minimum probabilities to use. We sweep over 1,3,5,10 and 20 future tokens, and $k = 0.1,0.2,\ldots 0.5$ . Tables 7, 8, 9, and 10 show AUROC and TPR at low FPR results on WikiMIA subsets with sequence lengths of 32, 64, 128, and 256. Based on the results, the optimal number of future tokens is 1 for sequences of 32 tokens and 5 for longer sequences. We find that $k = 0.1$ often works best across different model sizes and sequence lengths.
|
| 290 |
+
|
| 291 |
+
<table><tr><td rowspan="2"># future tokens</td><td rowspan="2">k (Min-k%)</td><td colspan="3">Llama-7B</td><td colspan="3">Llama-13B</td><td colspan="3">Llama-30B</td></tr><tr><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td></tr><tr><td rowspan="5">1</td><td>0.1</td><td>89.10</td><td>33.90</td><td>30.50</td><td>89.20</td><td>32.90</td><td>24.50</td><td>87.80</td><td>37.30</td><td>27.90</td></tr><tr><td>0.2</td><td>88.10</td><td>36.80</td><td>27.60</td><td>88.60</td><td>35.50</td><td>26.40</td><td>87.30</td><td>37.80</td><td>27.40</td></tr><tr><td>0.3</td><td>88.00</td><td>37.80</td><td>27.90</td><td>88.60</td><td>36.20</td><td>26.90</td><td>87.30</td><td>39.10</td><td>28.90</td></tr><tr><td>0.4</td><td>88.10</td><td>36.00</td><td>25.60</td><td>88.60</td><td>35.20</td><td>27.60</td><td>87.30</td><td>37.80</td><td>28.20</td></tr><tr><td>0.5</td><td>88.00</td><td>37.30</td><td>25.30</td><td>88.60</td><td>36.80</td><td>25.60</td><td>87.30</td><td>38.80</td><td>27.10</td></tr><tr><td rowspan="5">3</td><td>0.1</td><td>88.20</td><td>34.70</td><td>29.50</td><td>89.00</td><td>32.10</td><td>29.50</td><td>86.80</td><td>36.00</td><td>27.90</td></tr><tr><td>0.2</td><td>87.80</td><td>35.70</td><td>31.00</td><td>88.70</td><td>38.30</td><td>28.70</td><td>86.60</td><td>37.50</td><td>27.40</td></tr><tr><td>0.3</td><td>87.80</td><td>37.30</td><td>31.80</td><td>88.60</td><td>38.80</td><td>28.40</td><td>86.60</td><td>37.50</td><td>28.90</td></tr><tr><td>0.4</td><td>87.80</td><td>36.00</td><td>32.00</td><td>88.70</td><td>38.30</td><td>30.50</td><td>86.60</td><td>37.50</td><td>27.10</td></tr><tr><td>0.5</td><td>87.70</td><td>37.30</td><td>28.20</td><td>88.70</td><td>38.00</td><td>30.00</td><td>86.60</td><td>36.80</td><td>28.70</td></tr><tr><td rowspan="5">5</td><td>0.1</td><td>88.00</td><td>35.50</td><td>34.10</td><td>88.40</td><td>32.90</td><td>27.60</td><td>87.30</td><td>35.20</td><td>31.80</td></tr><tr><td>0.2</td><td>87.60</td><td>37.50</td><td>32.80</td><td>88.30</td><td>33.70</td><td>29.50</td><td>87.20</td><td>35.20</td><td>33.10</td></tr><tr><td>0.3</td><td>87.60</td><td>37.80</td><td>32.80</td><td>88.20</td><td>36.20</td><td>27.60</td><td>87.30</td><td>35.50</td><td>31.50</td></tr><tr><td>0.4</td><td>87.70</td><td>37.50</td><td>33.90</td><td>88.30</td><td>35.20</td><td>30.50</td><td>87.30</td><td>35.70</td><td>32.00</td></tr><tr><td>0.5</td><td>87.50</td><td>37.80</td><td>30.50</td><td>88.30</td><td>34.40</td><td>28.90</td><td>87.30</td><td>35.50</td><td>31.00</td></tr><tr><td rowspan="5">10</td><td>0.1</td><td>86.80</td><td>39.60</td><td>28.40</td><td>86.80</td><td>37.00</td><td>26.90</td><td>85.30</td><td>39.80</td><td>28.40</td></tr><tr><td>0.2</td><td>86.60</td><td>41.10</td><td>26.60</td><td>86.60</td><td>37.50</td><td>26.90</td><td>85.20</td><td>40.60</td><td>27.90</td></tr><tr><td>0.3</td><td>86.60</td><td>41.40</td><td>27.10</td><td>86.60</td><td>36.20</td><td>26.40</td><td>85.20</td><td>40.90</td><td>27.90</td></tr><tr><td>0.4</td><td>86.60</td><td>41.60</td><td>26.90</td><td>86.70</td><td>35.50</td><td>26.10</td><td>85.20</td><td>41.40</td><td>27.90</td></tr><tr><td>0.5</td><td>86.40</td><td>41.60</td><td>25.10</td><td>86.60</td><td>36.00</td><td>26.40</td><td>85.30</td><td>40.90</td><td>27.90</td></tr><tr><td rowspan="5">20</td><td>0.1</td><td>82.00</td><td>47.30</td><td>22.70</td><td>81.20</td><td>44.20</td><td>19.60</td><td>81.30</td><td>47.80</td><td>22.20</td></tr><tr><td>0.2</td><td>81.80</td><td>47.80</td><td>23.50</td><td>81.00</td><td>45.50</td><td>20.20</td><td>81.20</td><td>49.10</td><td>22.20</td></tr><tr><td>0.3</td><td>81.80</td><td>47.80</td><td>22.50</td><td>80.90</td><td>44.50</td><td>19.90</td><td>81.10</td><td>49.40</td><td>22.20</td></tr><tr><td>0.4</td><td>81.80</td><td>48.10</td><td>23.00</td><td>81.00</td><td>45.80</td><td>20.20</td><td>81.20</td><td>48.60</td><td>22.20</td></tr><tr><td>0.5</td><td>81.40</td><td>46.80</td><td>21.70</td><td>80.80</td><td>45.00</td><td>20.20</td><td>81.20</td><td>48.30</td><td>22.20</td></tr></table>
|
| 292 |
+
|
| 293 |
+
Table 7: Complete Infilling Score results testing Llama-7B, Llama-13B, and Llama-30B models on the Original subset of the WikiMIA 32-token sequences (Shi et al., 2024). For this subset, using one future token results in the best performance.
|
| 294 |
+
|
| 295 |
+
<table><tr><td rowspan="2"># future tokens</td><td rowspan="2">k (Min-k%)</td><td colspan="3">Llama-7B</td><td colspan="3">Llama-13B</td><td colspan="3">Llama-30B</td></tr><tr><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td></tr><tr><td rowspan="5">1</td><td>0.1</td><td>89.60</td><td>33.70</td><td>44.00</td><td>89.90</td><td>35.30</td><td>46.10</td><td>87.70</td><td>36.40</td><td>39.10</td></tr><tr><td>0.2</td><td>89.00</td><td>36.40</td><td>45.40</td><td>89.60</td><td>38.40</td><td>47.90</td><td>87.50</td><td>35.70</td><td>38.40</td></tr><tr><td>0.3</td><td>89.00</td><td>35.70</td><td>45.80</td><td>89.60</td><td>39.50</td><td>47.20</td><td>87.50</td><td>35.70</td><td>39.40</td></tr><tr><td>0.4</td><td>89.00</td><td>36.80</td><td>46.80</td><td>89.60</td><td>37.60</td><td>47.20</td><td>87.60</td><td>35.70</td><td>38.70</td></tr><tr><td>0.5</td><td>89.00</td><td>36.40</td><td>45.80</td><td>89.60</td><td>39.50</td><td>47.20</td><td>87.60</td><td>35.70</td><td>39.10</td></tr><tr><td rowspan="5">3</td><td>0.1</td><td>89.70</td><td>37.60</td><td>41.20</td><td>90.00</td><td>36.80</td><td>52.10</td><td>88.00</td><td>37.60</td><td>36.30</td></tr><tr><td>0.2</td><td>89.60</td><td>38.00</td><td>38.70</td><td>90.00</td><td>37.60</td><td>53.50</td><td>88.00</td><td>35.70</td><td>37.30</td></tr><tr><td>0.3</td><td>89.60</td><td>37.60</td><td>37.30</td><td>90.00</td><td>38.80</td><td>52.50</td><td>88.00</td><td>35.70</td><td>37.30</td></tr><tr><td>0.4</td><td>89.70</td><td>37.60</td><td>39.80</td><td>90.00</td><td>38.40</td><td>53.50</td><td>88.00</td><td>35.70</td><td>37.70</td></tr><tr><td>0.5</td><td>89.70</td><td>37.60</td><td>39.40</td><td>90.00</td><td>38.40</td><td>53.20</td><td>88.00</td><td>35.70</td><td>37.70</td></tr><tr><td rowspan="5">5</td><td>0.1</td><td>89.70</td><td>38.00</td><td>45.80</td><td>90.10</td><td>37.20</td><td>48.60</td><td>88.30</td><td>35.30</td><td>43.00</td></tr><tr><td>0.2</td><td>89.70</td><td>37.20</td><td>45.40</td><td>90.10</td><td>39.50</td><td>49.30</td><td>88.30</td><td>34.90</td><td>43.70</td></tr><tr><td>0.3</td><td>89.70</td><td>38.40</td><td>45.80</td><td>90.10</td><td>39.10</td><td>50.00</td><td>88.30</td><td>34.10</td><td>44.00</td></tr><tr><td>0.4</td><td>89.70</td><td>37.20</td><td>46.10</td><td>90.10</td><td>39.10</td><td>49.60</td><td>88.40</td><td>35.30</td><td>44.00</td></tr><tr><td>0.5</td><td>89.70</td><td>38.00</td><td>46.50</td><td>90.00</td><td>38.80</td><td>46.10</td><td>88.30</td><td>35.30</td><td>43.70</td></tr><tr><td rowspan="5">10</td><td>0.1</td><td>88.70</td><td>40.30</td><td>52.80</td><td>88.70</td><td>40.70</td><td>47.50</td><td>87.30</td><td>38.80</td><td>37.70</td></tr><tr><td>0.2</td><td>88.70</td><td>41.10</td><td>52.50</td><td>88.70</td><td>41.50</td><td>47.20</td><td>87.30</td><td>38.00</td><td>38.70</td></tr><tr><td>0.3</td><td>88.70</td><td>41.10</td><td>52.10</td><td>88.70</td><td>41.50</td><td>47.50</td><td>87.30</td><td>38.00</td><td>38.70</td></tr><tr><td>0.4</td><td>88.70</td><td>40.70</td><td>53.20</td><td>88.80</td><td>41.90</td><td>47.50</td><td>87.30</td><td>38.40</td><td>39.10</td></tr><tr><td>0.5</td><td>88.60</td><td>41.10</td><td>53.50</td><td>88.50</td><td>42.20</td><td>46.80</td><td>87.30</td><td>37.60</td><td>38.00</td></tr><tr><td rowspan="5">20</td><td>0.1</td><td>83.00</td><td>51.90</td><td>33.10</td><td>82.50</td><td>51.20</td><td>26.40</td><td>82.50</td><td>49.60</td><td>36.30</td></tr><tr><td>0.2</td><td>83.00</td><td>52.70</td><td>32.40</td><td>82.50</td><td>50.80</td><td>27.10</td><td>82.50</td><td>49.60</td><td>35.60</td></tr><tr><td>0.3</td><td>82.90</td><td>52.70</td><td>32.70</td><td>82.50</td><td>50.80</td><td>27.10</td><td>82.50</td><td>49.20</td><td>35.90</td></tr><tr><td>0.4</td><td>83.00</td><td>52.30</td><td>32.40</td><td>82.50</td><td>50.80</td><td>27.50</td><td>82.50</td><td>49.20</td><td>35.60</td></tr><tr><td>0.5</td><td>82.90</td><td>52.70</td><td>33.10</td><td>82.30</td><td>50.80</td><td>27.10</td><td>82.40</td><td>48.80</td><td>35.60</td></tr></table>
|
| 296 |
+
|
| 297 |
+
Table 8: Complete Infilling Score results testing Llama-7B, Llama-13B, and Llama-30B models on the Original subset of the WikiMIA 64-token sequences (Shi et al., 2024). For this subset, using five future tokens results in the best performance.
|
| 298 |
+
|
| 299 |
+
<table><tr><td rowspan="2"># future tokens</td><td rowspan="2">k (Min-k%)</td><td colspan="3">Llama-7B</td><td colspan="3">Llama-13B</td><td colspan="3">Llama-30B</td></tr><tr><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td></tr><tr><td rowspan="5">1</td><td>0.1</td><td>87.10</td><td>36.90</td><td>36.00</td><td>88.40</td><td>35.10</td><td>40.30</td><td>84.90</td><td>33.30</td><td>24.50</td></tr><tr><td>0.2</td><td>86.80</td><td>36.90</td><td>35.30</td><td>88.20</td><td>34.20</td><td>39.60</td><td>84.70</td><td>36.90</td><td>24.50</td></tr><tr><td>0.3</td><td>86.80</td><td>36.00</td><td>35.30</td><td>88.20</td><td>34.20</td><td>40.30</td><td>84.70</td><td>36.90</td><td>24.50</td></tr><tr><td>0.4</td><td>86.80</td><td>36.90</td><td>36.00</td><td>88.20</td><td>34.20</td><td>39.60</td><td>84.70</td><td>37.80</td><td>24.50</td></tr><tr><td>0.5</td><td>86.80</td><td>36.90</td><td>36.70</td><td>88.20</td><td>34.20</td><td>41.00</td><td>84.70</td><td>36.90</td><td>24.50</td></tr><tr><td rowspan="5">3</td><td>0.1</td><td>87.20</td><td>37.80</td><td>22.30</td><td>87.90</td><td>36.00</td><td>36.70</td><td>85.30</td><td>39.60</td><td>13.70</td></tr><tr><td>0.2</td><td>87.10</td><td>37.80</td><td>23.70</td><td>87.80</td><td>34.20</td><td>37.40</td><td>85.20</td><td>39.60</td><td>14.40</td></tr><tr><td>0.3</td><td>87.10</td><td>37.80</td><td>23.00</td><td>87.80</td><td>34.20</td><td>37.40</td><td>85.20</td><td>39.60</td><td>13.70</td></tr><tr><td>0.4</td><td>87.10</td><td>37.80</td><td>23.70</td><td>87.80</td><td>35.10</td><td>37.40</td><td>85.20</td><td>39.60</td><td>13.70</td></tr><tr><td>0.5</td><td>87.10</td><td>37.80</td><td>22.30</td><td>87.80</td><td>34.20</td><td>37.40</td><td>85.20</td><td>39.60</td><td>13.70</td></tr><tr><td rowspan="5">5</td><td>0.1</td><td>87.70</td><td>38.70</td><td>37.40</td><td>88.40</td><td>37.80</td><td>34.50</td><td>86.70</td><td>37.80</td><td>19.40</td></tr><tr><td>0.2</td><td>87.60</td><td>38.70</td><td>38.10</td><td>88.30</td><td>37.80</td><td>33.80</td><td>86.70</td><td>37.80</td><td>20.10</td></tr><tr><td>0.3</td><td>87.60</td><td>38.70</td><td>36.70</td><td>88.30</td><td>37.80</td><td>34.50</td><td>86.60</td><td>37.80</td><td>19.40</td></tr><tr><td>0.4</td><td>87.60</td><td>38.70</td><td>37.40</td><td>88.30</td><td>37.80</td><td>34.50</td><td>86.60</td><td>37.80</td><td>19.40</td></tr><tr><td>0.5</td><td>87.60</td><td>38.70</td><td>36.70</td><td>88.30</td><td>36.90</td><td>35.30</td><td>86.60</td><td>37.80</td><td>20.10</td></tr><tr><td rowspan="5">10</td><td>0.1</td><td>87.60</td><td>45.90</td><td>23.70</td><td>87.60</td><td>39.60</td><td>33.80</td><td>86.00</td><td>38.70</td><td>18.00</td></tr><tr><td>0.2</td><td>87.50</td><td>44.10</td><td>24.50</td><td>87.60</td><td>40.50</td><td>34.50</td><td>86.00</td><td>38.70</td><td>18.00</td></tr><tr><td>0.3</td><td>87.60</td><td>43.20</td><td>23.70</td><td>87.50</td><td>40.50</td><td>35.30</td><td>85.90</td><td>38.70</td><td>18.00</td></tr><tr><td>0.4</td><td>87.50</td><td>44.10</td><td>23.70</td><td>87.50</td><td>39.60</td><td>35.30</td><td>85.90</td><td>37.80</td><td>18.00</td></tr><tr><td>0.5</td><td>87.50</td><td>43.20</td><td>23.70</td><td>87.50</td><td>39.60</td><td>33.80</td><td>85.90</td><td>38.70</td><td>18.00</td></tr><tr><td rowspan="5">20</td><td>0.1</td><td>81.50</td><td>54.10</td><td>21.60</td><td>82.30</td><td>53.20</td><td>18.70</td><td>83.20</td><td>52.30</td><td>20.90</td></tr><tr><td>0.2</td><td>81.40</td><td>55.00</td><td>23.00</td><td>82.20</td><td>52.30</td><td>18.70</td><td>83.10</td><td>51.40</td><td>20.90</td></tr><tr><td>0.3</td><td>81.40</td><td>55.00</td><td>21.60</td><td>82.20</td><td>52.30</td><td>18.70</td><td>83.10</td><td>51.40</td><td>21.60</td></tr><tr><td>0.4</td><td>81.40</td><td>55.00</td><td>21.60</td><td>82.20</td><td>52.30</td><td>18.70</td><td>83.20</td><td>51.40</td><td>20.90</td></tr><tr><td>0.5</td><td>81.40</td><td>55.00</td><td>21.60</td><td>82.10</td><td>52.30</td><td>18.70</td><td>83.10</td><td>51.40</td><td>20.90</td></tr></table>
|
| 300 |
+
|
| 301 |
+
Table 9: Complete Infilling Score results testing Llama-7B, Llama-13B, and Llama-30B models on the Original subset of the WikiMIA 128-token sequences (Shi et al., 2024). Again, using five future tokens results in the best performance.
|
| 302 |
+
|
| 303 |
+
<table><tr><td rowspan="2"># future tokens</td><td rowspan="2">k (Min-k%)</td><td colspan="3">Llama-7B</td><td colspan="3">Llama-13B</td><td colspan="3">Llama-30B</td></tr><tr><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td><td>AUROC</td><td>FPR@TPR95</td><td>TPR@FPR05</td></tr><tr><td rowspan="5">1</td><td>0.1</td><td>93.80</td><td>51.60</td><td>80.40</td><td>92.90</td><td>25.80</td><td>66.70</td><td>85.60</td><td>32.30</td><td>21.60</td></tr><tr><td>0.2</td><td>93.80</td><td>51.60</td><td>80.40</td><td>92.80</td><td>29.00</td><td>68.60</td><td>85.60</td><td>35.50</td><td>21.60</td></tr><tr><td>0.3</td><td>93.70</td><td>51.60</td><td>80.40</td><td>92.70</td><td>29.00</td><td>66.70</td><td>85.60</td><td>32.30</td><td>19.60</td></tr><tr><td>0.4</td><td>93.80</td><td>51.60</td><td>80.40</td><td>92.70</td><td>29.00</td><td>66.70</td><td>85.60</td><td>35.50</td><td>21.60</td></tr><tr><td>0.5</td><td>93.90</td><td>51.60</td><td>80.40</td><td>92.70</td><td>29.00</td><td>66.70</td><td>85.70</td><td>32.30</td><td>19.60</td></tr><tr><td rowspan="5">3</td><td>0.1</td><td>96.30</td><td>29.00</td><td>78.40</td><td>95.30</td><td>19.40</td><td>72.50</td><td>90.60</td><td>41.90</td><td>72.50</td></tr><tr><td>0.2</td><td>96.10</td><td>32.30</td><td>74.50</td><td>95.30</td><td>19.40</td><td>72.50</td><td>90.60</td><td>41.90</td><td>72.50</td></tr><tr><td>0.3</td><td>96.00</td><td>35.50</td><td>74.50</td><td>95.30</td><td>19.40</td><td>72.50</td><td>90.60</td><td>41.90</td><td>72.50</td></tr><tr><td>0.4</td><td>96.00</td><td>35.50</td><td>74.50</td><td>95.30</td><td>19.40</td><td>72.50</td><td>90.60</td><td>41.90</td><td>72.50</td></tr><tr><td>0.5</td><td>96.00</td><td>35.50</td><td>72.50</td><td>95.30</td><td>19.40</td><td>72.50</td><td>90.60</td><td>41.90</td><td>72.50</td></tr><tr><td rowspan="5">5</td><td>0.1</td><td>96.80</td><td>22.60</td><td>74.50</td><td>95.30</td><td>22.60</td><td>80.40</td><td>89.80</td><td>35.50</td><td>47.10</td></tr><tr><td>0.2</td><td>96.60</td><td>22.60</td><td>74.50</td><td>95.30</td><td>22.60</td><td>80.40</td><td>89.80</td><td>35.50</td><td>47.10</td></tr><tr><td>0.3</td><td>96.50</td><td>25.80</td><td>74.50</td><td>95.20</td><td>22.60</td><td>80.40</td><td>89.80</td><td>35.50</td><td>47.10</td></tr><tr><td>0.4</td><td>96.60</td><td>22.60</td><td>74.50</td><td>95.20</td><td>22.60</td><td>80.40</td><td>89.80</td><td>35.50</td><td>47.10</td></tr><tr><td>0.5</td><td>96.60</td><td>25.80</td><td>74.50</td><td>95.20</td><td>22.60</td><td>80.40</td><td>89.80</td><td>35.50</td><td>47.10</td></tr><tr><td rowspan="5">10</td><td>0.1</td><td>95.70</td><td>29.00</td><td>78.40</td><td>93.00</td><td>29.00</td><td>54.90</td><td>87.40</td><td>45.20</td><td>49.00</td></tr><tr><td>0.2</td><td>95.90</td><td>25.80</td><td>78.40</td><td>93.10</td><td>29.00</td><td>54.90</td><td>87.50</td><td>45.20</td><td>49.00</td></tr><tr><td>0.3</td><td>95.80</td><td>29.00</td><td>78.40</td><td>93.20</td><td>29.00</td><td>54.90</td><td>87.60</td><td>45.20</td><td>49.00</td></tr><tr><td>0.4</td><td>95.80</td><td>29.00</td><td>78.40</td><td>93.10</td><td>29.00</td><td>54.90</td><td>87.50</td><td>45.20</td><td>49.00</td></tr><tr><td>0.5</td><td>95.80</td><td>29.00</td><td>78.40</td><td>93.20</td><td>29.00</td><td>54.90</td><td>87.50</td><td>45.20</td><td>49.00</td></tr><tr><td rowspan="5">20</td><td>0.1</td><td>93.70</td><td>22.60</td><td>66.70</td><td>90.70</td><td>35.50</td><td>51.00</td><td>85.60</td><td>48.40</td><td>35.30</td></tr><tr><td>0.2</td><td>93.70</td><td>22.60</td><td>66.70</td><td>90.60</td><td>35.50</td><td>51.00</td><td>85.60</td><td>48.40</td><td>33.30</td></tr><tr><td>0.3</td><td>93.40</td><td>22.60</td><td>68.60</td><td>90.60</td><td>35.50</td><td>51.00</td><td>85.80</td><td>48.40</td><td>35.30</td></tr><tr><td>0.4</td><td>93.70</td><td>22.60</td><td>68.60</td><td>90.60</td><td>35.50</td><td>51.00</td><td>85.70</td><td>48.40</td><td>35.30</td></tr><tr><td>0.5</td><td>93.50</td><td>22.60</td><td>66.70</td><td>90.50</td><td>35.50</td><td>51.00</td><td>85.70</td><td>48.40</td><td>35.30</td></tr></table>
|
| 304 |
+
|
| 305 |
+
Table 10: Complete Infilling Score results testing Llama-7B, Llama-13B, and Llama-30B models on the Original subset of the WikiMIA 256-token sequences (Shi et al., 2024). Similar to the WikiMIA 64-token and 128-token sequence subsets, using 5 future tokens results in the best performance.
|
| 306 |
+
|
| 307 |
+
<table><tr><td rowspan="2">Sequence Length</td><td rowspan="2">Model</td><td colspan="2">Infilling Score</td><td colspan="2">Min-K%++</td><td colspan="2">Comparison</td></tr><tr><td>AUROC (%)</td><td>Std Err</td><td>AUROC (%)</td><td>Std Err</td><td>Difference (%)</td><td>p-value</td></tr><tr><td rowspan="3">32 tokens</td><td>llama-7b</td><td>89.185</td><td>1.173</td><td>85.182</td><td>1.328</td><td>4.003 ± 1.130</td><td>0.000***</td></tr><tr><td>llama-13b</td><td>88.850</td><td>1.232</td><td>84.852</td><td>1.333</td><td>3.998 ± 1.222</td><td>0.004**</td></tr><tr><td>llama-30b</td><td>87.628</td><td>1.236</td><td>84.390</td><td>1.329</td><td>3.239 ± 1.157</td><td>0.006**</td></tr><tr><td rowspan="3">64 tokens</td><td>llama-7b</td><td>89.788</td><td>1.341</td><td>85.922</td><td>1.659</td><td>3.866 ± 1.492</td><td>0.012*</td></tr><tr><td>llama-13b</td><td>90.029</td><td>1.265</td><td>85.692</td><td>1.642</td><td>4.338 ± 1.539</td><td>0.010*</td></tr><tr><td>llama-30b</td><td>88.206</td><td>1.447</td><td>84.828</td><td>1.705</td><td>3.378 ± 1.601</td><td>0.040*</td></tr><tr><td rowspan="3">128 tokens</td><td>llama-7b</td><td>87.364</td><td>2.272</td><td>84.896</td><td>2.395</td><td>2.468 ± 2.654</td><td>0.348</td></tr><tr><td>llama-13b</td><td>88.145</td><td>2.214</td><td>83.740</td><td>2.463</td><td>4.405 ± 2.649</td><td>0.080</td></tr><tr><td>llama-30b</td><td>86.207</td><td>2.797</td><td>82.398</td><td>2.602</td><td>3.809 ± 1.993</td><td>0.064</td></tr><tr><td rowspan="3">256 tokens</td><td>llama-7b</td><td>96.307</td><td>1.761</td><td>82.354</td><td>4.662</td><td>13.952 ± 4.296</td><td>0.000***</td></tr><tr><td>llama-13b</td><td>95.124</td><td>2.271</td><td>82.326</td><td>4.740</td><td>12.797 ± 3.952</td><td>0.000***</td></tr><tr><td>llama-30b</td><td>90.737</td><td>3.782</td><td>77.411</td><td>5.643</td><td>13.326 ± 4.459</td><td>0.002**</td></tr></table>
|
| 308 |
+
|
| 309 |
+
# B ADDITIONAL RESULTS
|
| 310 |
+
|
| 311 |
+
B.1 STATISTICAL ANALYSIS: INFILLING SCORE VS. MIN-K%++ WE EMPLOY A BOOTSTRAP-BASED STATISTICAL COMPARISON TO EVALUATE INFILLING SCORE AND MIN-K%++. WE USE 1,000 BOOTSTRAP ITERATIONS TO ESTIMATE THE MEAN DIFFERENCE BETWEEN AUROC METRICS FROM THESE METHODS, ALONG WITH THE STANDARD ERRORS TO CONSTRUCT 95% CONFIDENCE INTERVALS FOR THE TRUE PERFORMANCE GAP. TABLE 11 SHOWS THAT INFILLING SCORE CONSISTENTLY OUTPERFORMS MIN-K%++ ACROSS DIFFERENT SEQUENCE LENGTHS (32, 64, 128, AND 256 TOKENS) AND MODEL SIZES (7B, 13B, AND 30B PARAMETERS).
|
| 312 |
+
|
| 313 |
+
# B.2 DETECTING PRE-TRAINING DATA FROM BOOKS
|
| 314 |
+
|
| 315 |
+
We compare the AUROC of Infilling Score with existing methods on a labeled validation subset of book excerpts. As discussed in Section 4.1, this validation subset contains book excerpts labeled as "seen" and "unseen". Infilling Score significantly outperforms existing methods in detecting "seen" examples.
|
| 316 |
+
|
| 317 |
+
Table 11: Comparing performance of Infilling Score versus Min-K%++ across different sequence lengths and model sizes. Results show bootstrap estimates with 1000 iterations. The mean difference indicates Infilling Score's improvement over Min-K%++. Statistical significance is denoted as: * (p < 0.05), ** (p < 0.01), *** (p < 0.001).
|
| 318 |
+
|
| 319 |
+
<table><tr><td>Method</td><td>AUC</td></tr><tr><td>Infilling Score (Ours)</td><td>0.79</td></tr><tr><td>Min-K%++ (Zhang et al., 2024)</td><td>0.53</td></tr><tr><td>Min-K%(Shi et al., 2024)</td><td>0.71</td></tr><tr><td>Zlib (Carlini et al., 2021)</td><td>0.68</td></tr></table>
|
| 320 |
+
|
| 321 |
+
Table 12: Comparing AUROC of Infilling Score, Min-K%++, Min-K%, and Zlib methods on the validation dataset, detecting book excerpts in Llama3-8B pretraining data.
|
| 322 |
+
|
| 323 |
+
# C COMPUTE RESOURCES
|
| 324 |
+
|
| 325 |
+
We ran our experiments on A100 (40 GB) and H200 (120 GB) GPUs. Testing Infilling Score on the WikiMIA benchmark on an A100 node takes approximately between 20 minutes (for a 3B parameter model) and 35 minutes (for a 30B parameter model). For Llama models, we used float16 data type. On the MIMIR benchmark, where there are 1000 long samples per class, the test approximately takes 10 hours on each subset on an A100 node.
|
| 326 |
+
|
| 327 |
+
# D INFILLING SCORE ALGORITHM
|
| 328 |
+
|
| 329 |
+
Algorithm 1: Infilling Score
|
| 330 |
+
Input: Sequence: $x:x_{1},x_{2}\dots x_{N}$ ,Threshold $\tau$
|
| 331 |
+
for $i = 1$ to $N$ do
|
| 332 |
+
Compute log $p(x_i|x_1\dots x_{i - 1})$ $\mu_{x_{< i}}\gets \mathbb{E}_{z\sim p(.|x_1\dots x_{i - 1})}[\log p(z|x_1\dots x_{i - 1})]$ $\sigma_{x_{< i}}\gets \sqrt{\mathbb{E}_{z\sim p(.|x_1\dots x_{i - 1})}[(\log p(z|x_1\dots x_{i - 1}) - \mu_{x_{< i}})^2]}$
|
| 333 |
+
Find $x_{i}^{*}\gets \arg \max_{x_{i}^{\prime}\in V}p(x_{i}^{\prime}|x_{1}\dots x_{i - 1})$
|
| 334 |
+
Compute log $p(x_i^* |x_1\dots x_{i - 1})$ $r\gets (\log p(x_i|x_1\dots x_{i - 1}) - \mu_{x_{< i}}) / \sigma_{x_{< i}} - (\log p(x_i^* |x_1\dots x_{i - 1}) - \mu_{x_{< i}}) / \sigma_{x_{< i}}$
|
| 335 |
+
for $j = i + 1$ to $i + m$ do
|
| 336 |
+
Compute log $p(x_j|x_1\dots x_{j - 1})$
|
| 337 |
+
Compute log $p(x_j|x_1\dots x_i^*\dots x_{j - 1})$ $r\gets r + (\log p(x_j|x_1\dots x_{j - 1}) - \mu_{x < i}) / \sigma_{x < i} - (\log p(x_j|x_1\dots x_i^*\dots x_{j - 1}) - \mu_{x < i}) / \sigma_{x < i}$
|
| 338 |
+
end
|
| 339 |
+
InfillingScore token $(x_i)\gets r$
|
| 340 |
+
end
|
| 341 |
+
Min-K% $(x)\gets k\%$ of tokens from $x$ with the lowest InfillingScore token $(x_i)$
|
| 342 |
+
InfillingScore $(\boldsymbol {x}) = \sum_{x_i\in \min -k\%}$ InfillingScore token $(x_i)$
|
| 343 |
+
return InfillingScore $(\boldsymbol {x}) < \tau$
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9664a5c86d642dcd42ab9adec3bd1b2f3987376b088ca8eb927dceed3d6031f0
|
| 3 |
+
size 1067677
|
ICLR/2025/Infilling Score_ A Pretraining Data Detection Algorithm for Large Language Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0bd0c487566821308a1547766108bd8e2f0f61e7f47501156cc196fd4686f07
|
| 3 |
+
size 457867
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0dc2999bd05e94ef90c1d80e194d7972e6353ed367cab2a27878b44df5377636
|
| 3 |
+
size 95604
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ab126e28e3f7c81fa189f6ed6c201f9d5339c01d70f281c8ec5c33721e613af
|
| 3 |
+
size 117072
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/ff963066-8cea-4f92-873c-85da0811e70e_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70c6b954142a34398c8871a3d0daf00b62399cdf07faddcaf743b3e700f6a095
|
| 3 |
+
size 40599550
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/full.md
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFINITE-RESOLUTION INTEGRAL NOISE WARPING FOR DIFFUSION MODELS
|
| 2 |
+
|
| 3 |
+
Yitong Deng $^{1,2}$ , Winnie Lin $^{1}$ , Lingxiao Li $^{1}$ , Dmitriy Smirnov $^{1}$ , Ryan Burgert $^{3,4}$ , Ning Yu $^{3}$ , Vincent Dedun $^{1}$ , Mohammad H. Taghavi $^{1}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Netflix, $^{2}$ Stanford University, $^{3}$ Netflix Eyeline Studios, $^{4}$ Stony Brook University yitongd@stanford.edu {winniel, lingxiaol, dimas, vdedun, mtaghavi}@netflix.com rburgert@cs.stonybrook.edu ning.yu@scanlinevfx.com
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Adapting pretrained image-based diffusion models to generate temporally consistent videos has become an impactful generative modeling research direction. Training-free noise-space manipulation has proven to be an effective technique, where the challenge is to preserve the Gaussian white noise distribution while adding in temporal consistency. Recently, Chang et al. (2024) formulated this problem using an integral noise representation with distribution-preserving guarantees, and proposed an upsampling-based algorithm to compute it. However, while their mathematical formulation is advantageous, the algorithm incurs a high computational cost. Through analyzing the limiting-case behavior of their algorithm as the upsampling resolution goes to infinity, we develop an alternative algorithm that, by gathering increments of multiple Brownian bridges, achieves their infinite-resolution accuracy while simultaneously reducing the computational cost by orders of magnitude. We prove and experimentally validate our theoretical claims, and demonstrate our method's effectiveness in real-world applications. We further show that our method readily extends to the 3-dimensional space.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
The success of diffusion models in image generation and editing (Rombach et al., 2022; Nichol et al., 2021; Ho et al., 2020; Zhang et al., 2023a) has spurred significant interest in lifting these capacities to the video domain (Singer et al., 2022; Durrett, 2019; Gupta et al., 2023; Blattmann et al., 2023; Ho et al., 2022; Guo et al., 2024). While training video diffusion models directly on spatiotemporal data is a natural idea, practical concerns such as limited availability of large-scale video data and high computational cost have motivated investigations into training-free alternatives. One such approach is to use pre-trained image models to directly generate video frames, and utilize techniques such as cross-frame attention, feature injection and hierarchical sampling to promote temporal consistency across frames (Ceylan et al., 2023; Zhang et al., 2023b; Khachatryan et al., 2023; Cong et al., 2023).
|
| 14 |
+
|
| 15 |
+
Among these techniques, the controlled initialization of noise has been consistently shown to be an important one (Ceylan et al., 2023; Khachatryan et al., 2023; Cai et al., 2024). However, most existing approaches for noise manipulation either compromise the noise Gaussianity (which introduces a domain gap at inference time), or are restricted to simple manipulations such as filtering and blending which are insufficient for capturing complex temporal correlations. Recently, Chang et al. (2024) proposed a method that both preserves Gaussian white noise distribution and captures temporal correlations via integral noise warping: each warped noise pixel integrates a continuous noise field over a polygonal deformed pixel region, which is computed by summing subpixels of an upsampled noise image. However, this method's theoretical soundness and effectiveness are ensued by its demanding computational cost in both memory and time, which not only incurs a significant overhead at inference time but also limits its useability in novel applications (Kwak et al., 2024).
|
| 16 |
+
|
| 17 |
+
In this paper, we introduce a new noise-warping algorithm that drastically cuts down the cost of Chang et al. (2024) while fully retaining its virtues. Our key insight for achieving this is that, when adopting an Eulerian perspective (as opposed to the original Lagrangian one), the limiting-
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: When the image grid deforms, the Lagrangian view tracks a deformed pixel region, while the Eulerian view tracks the undeformed pixel square as it gets partitioned into multiple regions. On the right, we leverage the exchangeability of upsampled subpixels to convert the Lagrangian gathering procedure into scattering noise subpixels to overlapped deformed pixel regions.
|
| 21 |
+
|
| 22 |
+
case algorithm of Chang et al. (2024) for computing a warped noise pixel reduces to summing over increments from multiple Brownian bridges (Durrett, 2019, Section 8.4). In place of the costly upsampling procedure, sampling the increments of a Brownian bridge can be done efficiently in an autoregressive manner (2). We build upon this to devise the infinite-resolution integral noise warping algorithm (1) which directly resolves noise transport in the continuous space, when given an oracle that returns the overlapping area between a pixel square and a deformed pixel region (Section 2.2).
|
| 23 |
+
|
| 24 |
+
We propose two concrete ways to compute this oracle, leading to a grid-based and a particle-based variant of our method. Similar to Chang et al. (2024), the grid-based variant (Algorithm 2) computes the area by explicitly constructing per-pixel deformed polygons, and is exactly equivalent to the existing approach (Chang et al., 2024) with an infinite upsampling resolution, while running $8.0 \times$ to $19.7 \times$ faster and using $9.22 \times$ less memory<sup>1</sup>. Inspired by hybrid Eulerian-Lagrangian fluid simulation (Brackbill et al., 1988), our novel particle-based variant (Algorithm 3) computes area in a fuzzy manner, which not only offers a further $5.21 \times$ speed-up over our grid-based variant, but is also agnostic to non-injective maps. In real-world scenarios, the particle-based variant shows no compromise in generation quality compared to the grid-based one (see video results), while offering superior robustness, efficiency, simplicity, and extensibility to higher dimensions.
|
| 25 |
+
|
| 26 |
+
In summary, we propose a new noise-warping method to facilitate video generation by lifting image diffusion models. Through analyzing the limiting case of the current state-of-the-art method (Chang et al., 2024) with an infinite upsampling resolution, we derive its continuous-space analogy, which fully retains its distribution-preserving and temporally coherent properties, while achieving orders-of-magnitude speed-up, warping $1024 \times 1024$ noise images in $\sim 0.045\mathrm{s}$ (grid variant) and $\sim 0.0086\mathrm{s}$ (particle variant) using a laptop with an Nvidia RTX 3070 Ti GPU.
|
| 27 |
+
|
| 28 |
+
# 2 METHODOLOGY
|
| 29 |
+
|
| 30 |
+
In this section, we introduce our method as follows:
|
| 31 |
+
|
| 32 |
+
- We present an equivalent Eulerian interpretation (Figure 1) of the method by Chang et al. (2024), which was originally described from a Lagrangian viewpoint.
|
| 33 |
+
- We show that the limiting algorithm of the Eulerian formulation as the upsampling level goes to infinity is equivalent to sampling increments of Brownian bridges.
|
| 34 |
+
- We present our main algorithm (1) which, given a partition record that returns the overlapping area between a pixel square and a deformed pixel region, samples increments of Brownian bridges and scatters the increments to form the warped noise image.
|
| 35 |
+
- We propose two concrete algorithms for computing the overlap areas. The grid-based Algorithm 2 extends Chang et al. (2024) to infinite resolution without the overhead of upsampling. The particle-based Algorithm 3 departs from grid-based discretization and uses particles instead, resulting in a simpler algorithm that is robust to degenerate maps.
|
| 36 |
+
|
| 37 |
+
Given a $D \times D$ prior noise image $I_W \in \mathbb{R}^{D \times D^2}$ and a deformation map $\psi : [0,1]^2 \to [0,1]^2$ , the noise-warping algorithm (Chang et al., 2024) computes the warped noise image $\widetilde{I}_W \in \mathbb{R}^{D \times D}$ with upsampling level $N \in \mathbb{Z}_{\geq 1}$ as follows:
|
| 38 |
+
|
| 39 |
+
1. For $i,j = 1,\dots ,D$ ,upsample noise pixel $[I_W]_{i,j}$ to an $N\times N$ subimage $[\widehat{I}_W]_{i,j}\in \mathbb{R}^{N\times N}$ ..
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\left[ \widehat {I} _ {W} \right] _ {i, j} = \frac {\left[ I _ {W} \right] _ {i , j}}{N ^ {2}} + \frac {1}{N} \left(Z - \frac {S}{N ^ {2}}\right), \text {w i t h} Z \sim \mathcal {N} (\mathbf {0}, \mathbf {I}) \text {a n d} S = \sum_ {k = 1} ^ {N ^ {2}} Z _ {k}. \tag {1}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
The subimage for each pixel assembles into an $ND \times ND$ upsampled noise image $\widehat{I}_W$ .
|
| 46 |
+
|
| 47 |
+
2. For $i,j = 1,\ldots ,D$ , the pixel square $A_{i,j}\coloneqq \left[\frac{i - 1}{D},\frac{i}{D}\right]\times \left[\frac{j - 1}{D},\frac{j}{D}\right]$ is warped to a deformed pixel region $\widetilde{A}_{i,j}\coloneqq \psi (A_{i,j})$ , and the warped noise pixel $[\widetilde{I}_W]_{i,j}$ is set to be the sum of all subpixels in $\widehat{I}_W$ covered by $\widetilde{A}_{i,j}$ divided by $\sqrt{|\widetilde{A}_{i,j}|}$ , where $|A|$ denotes the Lebesgue measure of a Borel set $A\subset \mathbb{R}^2$ .
|
| 48 |
+
|
| 49 |
+
We describe an alternative but equivalent procedure by making the following two observations, which are illustrated in Figure 1.
|
| 50 |
+
|
| 51 |
+
Gathering Noise $\rightarrow$ Scattering Noise. While the original procedure computes the warped noise image by gathering the upsampled noise subpixels in each deformed pixel region $\widetilde{A}_{i,j}$ in a Lagrangian fashion, we can instead use an alternative procedure by scattering the upsampled noise subpixels in each pixel square $A_{i,j}$ to overlapping deformed pixel regions. This new Eulerian procedure does not change the output, but it yields new insights in conjunction with our second observation.
|
| 52 |
+
|
| 53 |
+
Scattering Noise $\rightarrow$ Counting Overlapping Subpixels. Observe that the $N\times N$ subpixels in $[\widehat{I}_W]_{i,j}$ , for every $i,j$ , are correlated only through their sum $S$ when conditioning on $[I_W]_{i,j}$ (1), so they are exchangeable. Hence, when scattering these upsampled noise subpixels to deformed pixel regions, the order of scattering does not matter, and we only need to count the number of subpixels covered by each deformed pixel region.
|
| 54 |
+
|
| 55 |
+
Alternative Eulerian Procedure. Putting both observations together, we now describe an alternative procedure to Chang et al. (2024) with unaltered output:
|
| 56 |
+
|
| 57 |
+
1. For each noise image pixel $[I_W]_{i,j}$ , draw an upsampled subimage, now represented as a 1D vector $X \in \mathbb{R}^{N^2}$ using (1). Then, compute a prefix sum vector $H_{i,j}$ via $[H_{i,j}]_k \coloneqq \sum_{q=1}^k X_q$ for $k = 1, \ldots, N^2$ .
|
| 58 |
+
2. Warp each pixel square and compute deformed pixel regions $\widetilde{A}_{i,j}$ as before.
|
| 59 |
+
3. For each $A_{i,j}$ , let $M$ denote the number of deformed pixel regions that overlap with $A_{i,j}$ . With index $k = 1, \ldots, M$ , we use $l_k, m_k$ to denote the coordinates of the $k^{\text{th}}$ overlap, whose pixel region is $\widetilde{A}_{\ell_k, m_k}$ and pixel value $[\widetilde{I}_W]_{\ell_k, m_k}$ . Form $L \in \mathbb{Z}_{\geq 0}^{M}$ where $L_k$ represents the number of upsampled subpixels covered by $\widetilde{A}_{\ell_k, m_k}$ . Then, compute a prefix sum $[C_{i,j}]_k := \sum_{q=1}^k L_q$ . For $k = 1, \ldots, M$ , accrue $[H_{i,j}]_{[C_{i,j}]_k} - [H_{i,j}]_{[C_{i,j}]_{k-1}}$ to $[\widetilde{I}_W]_{\ell_k, m_k}$ .
|
| 60 |
+
4. Divide each warped noise pixel $[\widetilde{I}_W]_{i,j}$ by $\sqrt{|\widetilde{A}_{i,j}|}$ .
|
| 61 |
+
|
| 62 |
+
Discussion. Compared to the original procedure by Chang et al. (2024), this alternative but equivalent algorithm highlights how the upsampled subpixels of $[I_W]_{i,j}$ are scattered to form the warped noise pixels. In particular, each warped noise pixel receives the sum of a segment of $X$ , which is computed by taking the difference of two entries of $H_{i,j}$ . Since $H_{i,j}$ represents summations of weakly correlated and exchangeable subpixels, once conditioned on $[I_W]_{i,j}$ , can we avoid explicitly instantiating every single subpixel, but instead model the sum of these weakly correlated subpixels?
|
| 63 |
+
|
| 64 |
+
The key insight of this paper is that when the upsampling resolution $N \to \infty$ , the scaling limit of the prefix sum $H_{i,j}$ (with proper interpolation and time scaling to a continuous function) is precisely the Brownian bridge (Durrett, 2019, Section 8.4) conditioned on $[I_W]_{i,j}$ . Once this connection is established, it is easy to progressively sample increments of the Brownian bridge, resulting in a clean and efficient noise-warping algorithm that bypasses the need for upsampling in Chang et al. (2024).
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
Figure 2: Connection between Eulerian noise warping (scattering) and increments of a Brownian bridge for a fixed prior noise pixel $[I_W]_{i,j}$ . The overlapping area with each warped pixel region becomes the "time increments" — sampling the Brownian bridge at these "times" and taking consecutive differences yields the integral noise that is accrued to each warped noise pixel.
|
| 68 |
+
|
| 69 |
+
# 2.1 INFINITE-RESOLUTION NOISE SCATTERING
|
| 70 |
+
|
| 71 |
+
In this section, we first derive a scaling limit result to Brownian bridges. We then illustrate that the limiting version of the Eulerian procedure from the previous section matches precisely this scaling limit result. Lastly, we describe an autoregressive way to sample increments of a Brownian bridge that is linear in runtime in terms of the number of increments.
|
| 72 |
+
|
| 73 |
+
Theorem 1 (Scaling limit to Brownian bridge). Let $\{Z_n\}$ be a sequence of i.i.d. random variables with finite variance that are normalized such that $\mathbb{E}[Z_n] = 0$ and $\mathrm{Var}(Z_n) = 1$ . For $c \in \mathbb{R}$ , define
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
S _ {n} := \sum_ {i = 1} ^ {n} Z _ {i}, \qquad X _ {i, n} := \frac {c}{n} + \frac {1}{\sqrt {n}} \left(Z _ {i} - \frac {S _ {n}}{n}\right).
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
Consider the sequence of random continuous functions $\{H_n(t)\} \subset C[0,1]$ defined as
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
H _ {n} (t) := \sum_ {i = 1} ^ {\lfloor n t \rfloor} X _ {i, n} + (n t - \lfloor n t \rfloor) X _ {\lfloor n t \rfloor + 1, n}.
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
Then the sequence $\{H_n\}$ converges in distribution under the sup-norm metric on $C[0,1]$ to $B_{c}(t)\coloneqq W(t) - tW(1) + tc$ , the Brownian bridge ending at $c$ , where $W(t)$ is standard Brownian motion. Moreover, in distribution, we have $B_{c}(t)\stackrel {d}{=}(W(t)\mid W(1) = c)$ , where $(W(t)\mid W(1) = c)$ is the disintegrated measure (Pachl, 1978) of $W(t)$ on $W(1) = c$ .
|
| 86 |
+
|
| 87 |
+
We prove Theorem 1 in Appendix A. To connect the Eulerian procedure with the setup in Theorem 1, let us fix a pixel $[I_W]_{i,j}$ , and let $B\coloneqq B_{[I_W]_{i,j}}$ , $H\coloneqq H_{i,j}$ , $C\coloneqq C_{i,j}$ to simplify the notation. By setting $n = N^2$ and $c = [I_W]_{i,j}$ , the sequence $\{X_{k,n}\}$ from the theorem has exactly the same law as the upsampled subpixels in $[\widehat{I}_W]_{i,j}$ . Moreover, $H_{nt} = H_n(t)$ when $nt\in \mathbb{Z}_{\geq 1}$ . By taking $N\to \infty$ , implying $n\to \infty$ , for any $t_1,\ldots ,t_M\in [0,1]$ , we have the convergence in distribution of $\left(H_{[nt_1]},\dots ,H_{[nt_M]}\right)\stackrel {d}{\to}\left(B(t_1),\dots ,B(t_M)\right)$ . Recall in the Eulerian procedure, we only need to access the prefix sum $H$ at indices $\{C_k\}_{k = 1}^M$ , where $C_k$ counts the number of upsampled subpixels covered by the first $k$ overlaps. This suggests that if we choose
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
t _ {k} = \lim _ {N \to \infty} \frac {C _ {k}}{N ^ {2}} = \sum_ {k ^ {\prime} = 1} ^ {k} \left| A _ {i, j} \cap \widetilde {A} _ {\ell_ {k ^ {\prime}}, m _ {k ^ {\prime}}} \right|,
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
and use $B(t_{k})$ in place of $H_{k}$ , then we just need to sample from $B$ at times $t_1, \ldots, t_M$ — precisely the limiting algorithm of the Eulerian procedure. We illustrate this connection in Figure 2.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 3: The grid-based variant (left) computes the overlapping areas by explicitly constructing the polygon for the deformed pixel region. The particle-based variant (middle) approximates these areas with a weighting kernel. With degenerate maps (right), the fixed topology of the grid-based variant can lead to problems, while the connectivity-free, particle-based variant remains stable.
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
|
| 102 |
+
Autoregressive Sampling of Brownian Bridges. Since a Brownian bridge is a Markov process (Oksendal, 2013, Exercise 5.11), we can sample the vector $(B_{c}(t_{1}),\dots,B_{c}(t_{M}))$ in an autoregressive fashion, each time sampling $B_{c}(t_{k + 1})$ conditioned on $B_{c}(t_{k})$ :
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\left(B _ {c} \left(t _ {k + 1}\right) \mid B _ {c} \left(t _ {k}\right) = q\right) \stackrel {{d}} {{=}} \mathcal {N} \left(\frac {1 - t _ {k + 1}}{1 - t _ {k}} q + \frac {t _ {k + 1} - t _ {k}}{1 - t _ {k}} c, \frac {\left(t _ {k + 1} - t _ {k}\right) \left(1 - t _ {k + 1}\right)}{1 - t _ {k}}\right). \tag {2}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Once the Brownian bridge at times $t_k$ is sampled, we just need to accrue the increments $B_c(t_k) - B_c(t_{k-1})$ to $[\widetilde{I}_W]_{\ell_k,m_k}$ , the $k^{\text{th}}$ overlapped warped noise pixel. This allows us to present Algorithm 1. Compared to the discrete procedures described earlier, we no longer need upsampling. In addition, we exploited the autoregressive nature of Brownian bridges to bring down the time complexity to linear in the number of overlapping warped pixel regions.
|
| 109 |
+
|
| 110 |
+
Algorithm 1 Infinite-Resolution Integral Noise Warp
|
| 111 |
+
Input: prior noise image $I_W \in \mathbb{R}^{D \times D}$ , deformation map $\psi : [0,1] \to [0,1]$
|
| 112 |
+
Output: warped noise image $\widetilde{I}_W \in \mathbb{R}^{D \times D}$
|
| 113 |
+
Build a partition record $\mathcal{P}$ from $\psi$ (Section 2.2)
|
| 114 |
+
Initialize $\mathcal{A}_{i,j} \gets 0$ for all $i,j = 1,\ldots,D$ $\triangleright \mathcal{A}_{i,j}$ will contain the area of $\widetilde{A}_{i,j}$
|
| 115 |
+
parallel for each $u,v = 1,\ldots,D$ do
|
| 116 |
+
$t,q,M \gets 0,0,|\mathcal{P}_{u,v}|$
|
| 117 |
+
for $k = 1,\ldots,M$ do
|
| 118 |
+
$(a,i,j) \gets [\mathcal{P}_{u,v}]_k$ $\triangleright a$ is the overlapping area between $A_{i,j}$ and $\widetilde{A}_{u,v}$
|
| 119 |
+
Sample $q' \sim (B_c(t + a)|B_c(t) = q)$ by (2) with $c = [I_W]_{u,v}$ $[\widetilde{I}_W]_{i,j} \gets [\widetilde{I}_W]_{i,j} + (q' - q)$ $\mathcal{A}_{i,j} \gets \mathcal{A}_{i,j} + a$ $q,t \gets q',t + a$
|
| 120 |
+
Normalize $[\widetilde{I}_W]_{i,j} \gets \mathcal{A}_{i,j}^{-\frac{1}{2}}[\widetilde{I}_W]_{i,j}$ for all $i,j = 1,\ldots,D$
|
| 121 |
+
return $\widetilde{I}_W$
|
| 122 |
+
|
| 123 |
+
Preservation of Gaussian White Noise. A central desideratum of noise warping is that the resulting warped noise image $\widetilde{I}_W$ needs to have pixels that are i.i.d. standard Gaussians when the prior noise image $I_W$ is Gaussian white noise. This ensures that the warped noise is in-distribution for a pretrained diffusion model. Our algorithm automatically guarantees this preservation of Gaussianity, as long as the warping function $\psi$ is injective. To see this, the injectivity of $\psi$ implies that the warped pixel regions are non-overlapping in the square $[0,1]^2$ . For each $A_{i,j}$ , since $[I_W]_{i,j} \stackrel{d}{=} \mathcal{N}(0,1) \stackrel{d}{=} W(1)$ , by the conditional interpretation of Brownian bridges (1), when marginalizing out $[I_W]_{i,j}$ , the Brownian bridge $B_{[I_W]_{i,j}}$ reduces to standard Brownian motion. Since the increments of the Brownian motion are independent Gaussians, the contribution to a deformed pixel region is simply a zero-mean Gaussian with variance equal to the overlapping area. Therefore, each deformed pixel region will receive the sum of a number of independent Gaussians whose variances sum to the area of the region. The scaling by the inverse square root of the area in Algorithm 1 thus makes each warped noise pixel an i.i.d. standard Gaussian.
|
| 124 |
+
|
| 125 |
+
# 2.2 BUILDING PARTITION RECORDS
|
| 126 |
+
|
| 127 |
+
To compute Algorithm 1, we need a method to compute the partition record $\mathcal{P}$ which specifies how each pixel square is partitioned by multiple deformed pixel regions. In this section, we present one grid-based (Algorithm 2) and one particle-based (Algorithm 3) method for building $\mathcal{P}$ . In particular, for each pixel square with indices $(u,v)$ , we compute $\mathcal{P}_{u,v}$ as a list of 3-tuples $(a,i,j)$ , where $(i,j)$ identifies the overlapped deformed pixel region and $a$ represents the overlapping area.
|
| 128 |
+
|
| 129 |
+
<table><tr><td colspan="2">Algorithm 2 Grid-based Partition</td><td colspan="2">Algorithm 3 Particle-based Partition</td></tr><tr><td colspan="2">Input: Deformation map ψ</td><td colspan="2">Input: Deformation map ψ</td></tr><tr><td colspan="2">Output: Partition record P</td><td colspan="2">Output: Partition record P</td></tr><tr><td colspan="2">1: parallel for each i, j do</td><td colspan="2">1: parallel for each i, j do</td></tr><tr><td colspan="2">2: A* ← DiscretizeSquare(Ai,j)</td><td colspan="2">2: (x,y) ← ψ(i+0.5/D, j+0.5/D)</td></tr><tr><td colspan="2">3: S ← ψ(A*)</td><td colspan="2">3: α0,0,α0,1,α1,0,α1,1 ← BilinearWeights(X)</td></tr><tr><td colspan="2">4: u-, u+, v-, v+ ← AABB(S)</td><td colspan="2">4: for s, t ∈ [0,1] do</td></tr><tr><td colspan="2">5: for u ∈ [u-, u+] do</td><td colspan="2">5: u, v ← {x} + s, {y} + t</td></tr><tr><td colspan="2">6: for v ∈ [v-, v+] do</td><td colspan="2">6: Pu,v ← Pu,v + [ (αs,t, i, j) ]</td></tr><tr><td colspan="2">7: a ← PolygonArea(clip(S, u, v))</td><td colspan="2">7: parallel for each u, v do</td></tr><tr><td colspan="2">8: Pu,v ← Pu,v + [(a, i, j)]</td><td colspan="2">8:Normalize total area of Pu,v to D-2</td></tr><tr><td colspan="2">9: return P</td><td colspan="2">9: return P</td></tr></table>
|
| 130 |
+
|
| 131 |
+
As illustrated in Figure 3, our grid-based method (left) follows Chang et al. (2024) by modeling each deformed pixel region as an octagon and computes overlapping areas by clipping it against undeformed pixel squares; our particle-based method (middle) borrows from the grid-to-particle techniques in fluid particle-in-cell methods (Brackbill et al., 1988), where we treat each deformed pixel region as a particle and each undeformed pixel square as a grid cell. Each particle requests area from nearby cells based on distance; upon receiving requests, each cell normalizes the requests to ensure partition-of-unity, and distributes its area to contacting particles.
|
| 132 |
+
|
| 133 |
+
Discussion. Conceptually, our grid and particle-based methods correspond to two different interpretations of $\psi$ when provided as discrete samples (e.g., an optical flow image). The grid-based method implicitly reconstructs the continuous $\psi$ field by linear interpolation, whereas the particle-based method assumes $\psi$ is only known point-wise. The implication is that when $\psi$ is smooth, linear interpolation works well and the grid-based method will yield a higher-quality warp as seen in Figure B.3. But when $\psi$ is non-smooth, which is commonly the case in real world, linear interpolation can lead to degenerate polygons as illustrated on the right of Figure 3. The spurious overlaps between the degenerate polygons will lead to spatial correlation in the warped noise image. Although both Chang et al. (2024) and our grid-based method implement fail-safes<sup>3</sup> to avoid noise sharing and maintain spatial independence in practice, they suffer from the intrinsic ambiguity caused by these overlaps. On the other hand, the particle-based method circumvents such overlaps to begin with.
|
| 134 |
+
|
| 135 |
+
In addition, we highlight the simplicity and parallelizability of the particle-based method, as it boils down the computation of $\mathcal{P}$ to evaluating one bilinear kernel per pixel. Leveraging this fact, we can very conveniently and efficiently extend our noise warping algorithm to higher spatial dimensions by replacing the bilinear kernel to its higher-dimensional counterparts, as shown in Figure 8.
|
| 136 |
+
|
| 137 |
+
# 3 RESULTS
|
| 138 |
+
|
| 139 |
+
We verify our theoretical claims by showing that both variants of our method preserve Gaussian white noise distribution, and that Chang et al. (2024) (HIWYN) converges to our grid-based variant as $N$ increases. We analyze the behaviors of our grid and particle-based variants under diffeomorphic and non-diffeomorphic deformations. We then apply our method to video generation tasks and benchmark against existing methods (Ge et al., 2023; Chen et al., 2023; Chang et al., 2024). Finally, we extend our method to warping volumetric noise and demonstrate a use case in 3D graphics.
|
| 140 |
+
|
| 141 |
+
Gaussian White Noise Preservation. In Figure 4, we iteratively warp a noise image by the same deformation map for 50 timesteps. We gauge the output noise's resemblance to Gaussian white noise through 1) measuring normality using one-sample Kolmogorov-Smirnov (K-S) test, and 2) detecting
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
|
| 145 |
+
Distribution Preservation Metrics
|
| 146 |
+
|
| 147 |
+
<table><tr><td>Method</td><td>Ours, grid-based</td><td>Ours, particle-based</td><td>HIWYN, N=8</td><td>Bilinear</td><td>Bicubic</td><td>Nearest Neighbor</td></tr><tr><td>Moran's I</td><td>5.103e-4 / 0.849</td><td>-1.995e-3 / 0.475</td><td>3.215e-3 / 0.243</td><td>0.612 / 0</td><td>0.983 / 0</td><td>2.974e-2 / 6.103e-27</td></tr><tr><td>K-S Test</td><td>3.410e-3 / 0.430</td><td>3.023e-3 / 0.586</td><td>3.274e-3 / 0.482</td><td>0.366 / 0</td><td>0.422 / 0</td><td>9.806e-3 / 6.681e-06</td></tr></table>
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 4: Preservation of Gaussian white noise achieved by different warping methods. We report scores and p-values for both Moran's $I$ (spatial correlation) and K-S test (normality). Under these metrics, the results from our method (both variants) and HIWYN are indistinguishable from white Gaussian noise, while generic, interpolation-based warping methods lead to corrupted noise.
|
| 151 |
+
Figure 5: Convergence of HIWYN to our method as $N$ increases. Top left: experimental setup with prior noise and deformation map. Top middle: 2-Wasserstein distance $W^{N}$ between the output of HIWYN and ours. Top right: statistics table. Bottom: $W^{N}$ difference image between the output of HIWYN and ours as $N$ increases. $W^{N}$ becomes statistically insignificant for $N \geq 64$ .
|
| 152 |
+
|
| 153 |
+
spatial correlation using Moran's $I$ . Our results show that both HIWYN and our method generate warped noise images that are indistinguishable from Gaussian white noise under these metrics, while interpolation-based baselines deviate significantly from the desired distribution.
|
| 154 |
+
|
| 155 |
+
Convergence of Chang et al. (2024). We validate that our method is the limiting case of HIWYN. Starting with an $8 \times 8$ prior noise image and a flow map (Figure 5, top left), we run our method along with HIWYN for $N \in \{2, 4, 8, \dots, 256\}$ for 100,000 independent runs to estimate the distribution of the warped noise image. For each upsampling resolution $N$ , we compute the 2-Wasserstein distance $W^{N}$ between the output of HIWYN and that of our method. The results in Figure 5 demonstrate the convergence of HIWYN to our method as $N$ increase, and reveal that $N = 8$ (recommended by Chang et al. (2024)) is not yet in the converged phase to yield a negligible $W^{N}$ .
|
| 156 |
+
|
| 157 |
+
Performance Comparison. For our methods and HIWYN with upsampling levels $N \in \{2,4,8\}$ , we perform 100 independent runs on a $1024 \times 1024$ image. We report the kernel time with CPU and GPU backends (Figure 6) as well as the memory usage. The runtime and memory usage of our methods are largely comparable with those of HIWYN with $N = 2$ . Compared to HIWYN with $N = 8$ , both variants of our method offer order-of-magnitude improvements in runtime and memory usage. Specifically, our grid-based method achieves infinite upsampling resolution while being $19.7 \times$ faster on CPU and $8.0 \times$ faster on GPU, using $9.22 \times$ less memory, and our particle-based method, albeit not strictly equivalent to HIWYN at $N = \infty$ , achieves a $41.7 \times$ speedup on GPU. In the following sections, we show that the particle-based version consistently achieves comparable quality to the grid-based version in real-world scenarios.
|
| 158 |
+
|
| 159 |
+
Comparison between Grid-Based and Particle-Based Variants. In Figure B.3, we compare both variants when the deformation map is diffeomorphic under different levels of distortion. Visually, the difference between the two variants is negligible at frame 25 and becomes noticeable in frame
|
| 160 |
+
|
| 161 |
+
<table><tr><td colspan="4">Comparison of Time and Memory Costs</td></tr><tr><td>Method</td><td>Time (CPU)</td><td>Time (GPU)</td><td>Memory</td></tr><tr><td>N = 2 (HIWYN)</td><td>19.30s</td><td>2.597s</td><td>293.7MB</td></tr><tr><td>N = 4 (HIWYN)</td><td>75.33s</td><td>9.247s</td><td>746.6MB</td></tr><tr><td>N = 8 (HIWYN)</td><td>398.3s</td><td>35.91s</td><td>2147MB</td></tr><tr><td>N = ∞ (ours, grid)</td><td>20.16s</td><td>4.491s</td><td>232.9MB</td></tr><tr><td>N = ∞ (ours, particle)</td><td>15.68s</td><td>0.862s</td><td>320.9MB</td></tr></table>
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 6: Runtime and memory usage of our method versus HIWYN with $N = 2,4,8$ . We compare total allocated memory and kernel time on a CPU/GPU. The computation is done on a laptop with Intel i7-12700H and Nvidia RTX 3070 Ti.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Video
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
Optical Flow
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Grid-based
|
| 174 |
+
Figure 7: Comparison of grid-based versus particle-based variants under non-diffeomorphic optical flow. Pixels with area contention are colored in orange. Further results are given in Figure B.5.
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Particle-based
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Area Occupation (Grid-based)
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Area Occupation (Particle-based)
|
| 184 |
+
|
| 185 |
+
100. We measure this difference by comparing the deformed regions for each pixel in terms of IoU and weighted Chamfer distance. We additionally compare the particle-based result with that of an identity-map baseline (right column in Figure B.3), which shows that the gap between the two variants remains small even under large distortion. In Figure 7, we stress test both variants under non-diffeomorphic maps obtained using optical flow (Teed & Deng, 2020) on a real-world video (Brox & Malik, 2011). In panels 3 and 4, we see that the real-world flow map induces inverted meshes for the grid-based variant and clustered particles for the particle-based variant. While clustered particles are always assigned disjoint regions due to the continuous nature of our algorithm, mesh inversions cause area contention issues (non-injectivity) due to overlaps. In panels 5 and 6, we mark the grid cells with area contention in orange, which occurs in the grid-based version but not in the particle-based version.
|
| 186 |
+
|
| 187 |
+
Video Super-resolution with $\mathbf{I}^2\mathbf{SB}$ . We integrate our method with $\mathrm{I}^2\mathrm{SB}$ (Liu et al., 2023) and adapt its pre-trained image $4\times$ super-resolution model (bicubic) to perform video super-resolution. We show our results in Figures 9 and B.1, and refer to our supplementary video for better visualization of these results. Since $\mathrm{I}^2\mathrm{SB}$ is an image-to-image bridge model, it well preserves the low-frequency structures of the input images regardless of noise scheme. But as seen in our video, without noise warping, the results either show strong flickering in the high-frequency details (random noise) or sticking artifacts (fixed noise). Noise warping allows high-frequency details to transport with the optical flow, making the result significantly more consistent. We also validate that both our variants yield visual quality on par with HIWYN across all tested scenarios while being much more efficient.
|
| 188 |
+
|
| 189 |
+
Conditional Video Generation with SDEdit. We apply our method to conditional video generation by adapting SDEdit (Meng et al., 2021), a conditional image generation method, to producing consistent video frames. We set SDEdit's parameter $t_0$ to 0.4, and apply Perturbed-Attention Guidance (Ahn et al., 2024) with a strength of 3.0. Our two inputs are a conditioning video (generated by applying a median filter to real-world videos similar to (Chen et al., 2023)) and an optical flow field (Teed & Deng, 2020). Without noise manipulation, if we run SDEdit independently frame-by-frame (Figure B.6, random), the high-frequency details display significant flickering. By warping the noise using the optical flow, the temporal consistency is much improved, and we observe that our method (both variants) and HIWYN yield comparable visual qualities. Full experimental results with comparisons to Control-A-Video (Chen et al., 2023), PYoCo (Ge et al., 2023) and additional baselines are provided in Figures B.6 and B.7 with quantitative statistics reported in Table 1. Further results that additionally integrate cross-frame attention (Ceylan et al., 2023) (anchored every 3 frames) are shown in Figure 10 and B.2. We refer to our supplementary video for better visualization.
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
Figure 9: Video $4 \times$ super-resolution by integrating our method (particle) with $\mathrm{I}^2\mathrm{SB}$ . Top row shows the low resolution input video; bottom row shows the output video. Additional results are shown in Figure B.1. We refer to our supplementary video for better visualization of these results.
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 10: Conditional video generation results by integrating our method (particle) with SDEdit and cross-frame attention (Ceylan et al., 2023). Top row shows the input video prompt in a stroke painted style which is converted into a video of photorealistic style (bottom). Additional results are shown in Figure B.2. We refer to our supplementary video for better visualization of these results.
|
| 196 |
+
|
| 197 |
+
3D Noise Warp. We extend our particle-based algorithm to 3D by replacing the bilinear kernel with the trilinear kernel in Algorithm 3 and apply it to GaussianCube (Zhang et al., 2024), which denoises a dense 3D noise grid to reconstruct 3D Gaussians. We adapt it to perform conditional generation a la SDEdit. Starting with a 3D pickup truck generated unconditionally, we condition the model to generate vehicles with smaller and larger cabins by deforming the truck with a horizontal shear velocity field. We compare the results obtained by using random noise to those using noise warped with our particle-based method. We show the results in Figure B.4 and refer to our supplementary video for better visualization.
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
Figure 8: 3D noise warped by our method.
|
| 201 |
+
|
| 202 |
+
# 4 RELATED WORKS
|
| 203 |
+
|
| 204 |
+
Noise in Diffusion Models. Diffusion models generate images from input noise, and noise can thus be considered the counterpart to the latent codes utilized in GAN models. As such, the outputs of diffusion models have dependencies and correlations to the initial input noise, making noise a useful handle to control temporal consistency (Khachatryan et al., 2023). In addition to Chang et al. (2024) which this work was inspired by and improves upon, there are various other temporal noise manipulation techniques that do not preserve Gaussian noise distribution- some methods (Ma et al. (2024); Ren et al. (2024)) blend high frequency Gaussian noise with low frequency motion, while others (Mokady et al. (2022); Wallace et al. (2022)) rely on approximating the inversion of noise from temporally coherent image sequences. Pandey et al. (2024) goes one step further and manipulates inverted noise in 3D space. These approaches are flexible but degrade the output of the diffusion model due to the domain gap between inference time noise and training time noise, and as such, have occasionally been accompanied by mitigation strategies such as anisotropic diffusion (Yu et al. (2024)). Noise manipulation is also not limited to the generation and stylization of videos,
|
| 205 |
+
|
| 206 |
+
but has various applications in image editing (Hou et al. (2024); Pandey et al. (2024)) and 3D mesh texturing (Richardson et al. (2023)) as well.
|
| 207 |
+
|
| 208 |
+
Noise in Computer Graphics. While our noise warping work draws main inspiration from simulation techniques, spatial noise manipulation has been extensively studied in the graphics community through applications in animation and rendering. Works like (Kass & Pesare, 2011; Burley et al., 2024) present 2D noise manipulation techniques that add a stylized organic hand-drawn look to computer-generated animation via dynamic noise textures (Perlin, 1985). In order to make sure the stylization is temporally consistent and visually pleasing, noise textures are deformed in a way that makes them consistent with the underlying animation, but little emphasis is given to the preservation/rigor of the noise distribution. On the other hand, properties of 2D spatial noise have been extensively and rigorously studied in rasterization and raytracing literature (Cook, 1986; Lagae & Dutre, 2008), originating from the idea of using dithering to reduce banding and quantization artifacts in image signal processing (Roberts, 1962). In particular, the lack of low frequency details and clumping in blue noise as opposed to white Gaussian noise has made it the choice of foundational antialIASing methods such as Poisson disc sampling (McCool & Fiume, 1992), and recent progress made in this line of antialIASing research has close ties with our methodology. For example, Wolfe et al. (2022) look at accelerating rendering tasks by extending spatial blue noise to the temporal domain, while Huang et al. (2024) show promising results in supplementing white noise with blue noise during diffusion model training.
|
| 209 |
+
|
| 210 |
+
# 5 DISCUSSION AND CONCLUSION
|
| 211 |
+
|
| 212 |
+
We presented infinite-resolution integral noise warping, a novel algorithm for computing temporally coherent, distribution-preserving noise transport to guide diffusion models to produce consistent results. By deriving a continuous-space analogy to the existing upsampling-based strategy (Chang et al., 2024), our method not only further improves the accuracy by effectively raising the upsampling resolution to infinity, but also drastically reduces the computational cost.
|
| 213 |
+
|
| 214 |
+
Usability of Noise Warping We highlight that the noise warping problem that we address is a recurring subtask in generative modeling, and our method is hence a general-purpose tool that can be integrated in a variety of ways that extend well beyond the ones we showcase in the paper. First, noise warping, which excels at controlling high-frequency details, is orthogonal and thus combinable with feature-level, structure-preserving techniques (e.g. Ceylan et al. (2023); Cong et al. (2023)) to achieve consistency across the frequency spectrum. Our drastic cost-saving makes noise warping an affordable and harm-free add-on to all such existing and future techniques. In addition, the concurrent work by Daras et al. (2024) shows that noise warping can be combined with equivariance guidance to gain further consistency and integrate with latent diffusion models like SDXL (Podell et al., 2023). Beyond video generation, Kwak et al. (2024) showcases the usefulness of noise warping in 3D generation by combining with score distillation sampling (SDS). The advanced noise warping algorithm that we propose presents itself as a desirable candidate across these diverse tasks.
|
| 215 |
+
|
| 216 |
+
Significance of Our Speed-up We argue that the drastic speed-up our method offers has profound practical significance. While the standard denoising diffusion setting requires only a single noise warp operation per image, there exist many use cases that require noise warping to be computed more intensively, which renders our speed-up critical. For example, the combination with bridge models (e.g. $\mathrm{I}^2\mathrm{SB}$ ) requires one noise warp per iteration. With its reported $>0.6$ s time cost per warp, preparing the noise using HIwyn would cost $\sim 4\times$ the time to actually run the image generation model, increasing the total inference time from $\sim 24$ minutes to $\sim 2$ hours. In comparison, our method (particle) prepares the noise in 40.6s (wall time), effectively making the overhead negligible. Similarly, combining noise warping with SDS also requires one noise warp per iteration, which makes HIwyn computationally intractable (Kwak et al., 2024) and our improvements called for. Our speed-up hence makes integral noise warping deployable in a much broader class of problems.
|
| 217 |
+
|
| 218 |
+
We identify a few directions for future work. First, our particle-based variant currently does not capture area contraction or expansion which may be addressed in the future with Voronoi partitioning. Secondly, our method can be readily combined with other map types such as UV maps to facilitate multi-view consistency. Furthermore, since our method relies on the consistency and quality of the deformation map, it can benefit from future advancements in flow extraction techniques. Finally, the effectiveness of warped volumetric noise in 3D generation and editing remains to be studied.
|
| 219 |
+
|
| 220 |
+
# ACKNOWLEDGEMENT
|
| 221 |
+
|
| 222 |
+
We thank Lukas Lepicovsky, Ioan Boieriu, David Michielsen, Mohsen Mousavi, and Perry Kain from Eyeline Studios, for providing data that kickstarted this project and for assisting in shaping our research with practical future use cases. We also thank Austin Slakey for sharing his insights on training diffusion models, and Tianyi Xie for filming his cat for our testing.
|
| 223 |
+
|
| 224 |
+
# REFERENCES
|
| 225 |
+
|
| 226 |
+
Donghoon Ahn, Hyoungwon Cho, Jaewon Min, Wooseok Jang, Jungwoo Kim, SeonHwa Kim, Hyun Hee Park, Kyong Hwan Jin, and Seungryong Kim. Self-rectifying diffusion sampling with perturbed-attention guidance. arXiv preprint arXiv:2403.17377, 2024.
|
| 227 |
+
Andreas Blattmann, Robin Rombach, Huan Ling, Tim Dockhorn, Seung Wook Kim, Sanja Fidler, and Karsten Kreis. Align your latents: High-resolution video synthesis with latent diffusion models. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
|
| 228 |
+
Jeremiah U Brackbill, Douglas B Kothe, and Hans M Ruppel. Flip: a low-dissipation, particle-in-cell method for fluid flow. Computer Physics Communications, 48(1):25-38, 1988.
|
| 229 |
+
T. Brox and J. Malik. Large displacement optical flow: descriptor matching in variational motion estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(3):500-513, 2011. URL http://lmb.informatik.uni-freiburg.de/Publications/2011/Brol1a.
|
| 230 |
+
Brent Burley, Brian Green, and Daniel Teece. Dynamic screen space textures for coherent stylization. In ACM SIGGRAPH 2024 Talks, SIGGRAPH '24, New York, NY, USA, 2024. Association for Computing Machinery. ISBN 9798400705151. doi: 10.1145/3641233.3664321. URL https://doi.org/10.1145/3641233.3664321.
|
| 231 |
+
Shengqu Cai, Duygu Ceylan, Matheus Gadelha, Chun-Hao Paul Huang, Tuanfeng Yang Wang, and Gordon Wetzstein. Generative rendering: Controllable 4d-guided video generation with 2d diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7611-7620, 2024.
|
| 232 |
+
Duygu Ceylan, Chun-Hao P Huang, and Niloy J Mitra. Pix2video: Video editing using image diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 23206-23217, 2023.
|
| 233 |
+
Pascal Chang, Jingwei Tang, Markus Gross, and Vinicius C Azevedo. How i warped your noise: a temporally-correlated noise prior for diffusion models. In The Twelfth International Conference on Learning Representations, 2024.
|
| 234 |
+
Weifeng Chen, Yatai Ji, Jie Wu, Hefeng Wu, Pan Xie, Jiashi Li, Xin Xia, Xuefeng Xiao, and Liang Lin. Control-a-video: Controllable text-to-video generation with diffusion models. arXiv preprint arXiv:2305.13840, 2023.
|
| 235 |
+
Yuren Cong, Mengmeng Xu, Christian Simon, Shoufa Chen, Jiawei Ren, Yanping Xie, Juan-Manuel Perez-Rua, Bodo Rosenhahn, Tao Xiang, and Sen He. Flatten: optical flow-guided attention for consistent text-to-video editing. arXiv preprint arXiv:2310.05922, 2023.
|
| 236 |
+
Robert L Cook. Stochastic sampling in computer graphics. ACM Transactions on Graphics (TOG), 5(1):51-72, 1986.
|
| 237 |
+
Giannis Daras, Weili Nie, Karsten Kreis, Alex Dimakis, Morteza Mardani, Nikola Borislavov Kovachki, and Arash Vahdat. Warped diffusion: Solving video inverse problems with image diffusion models. arXiv preprint arXiv:2410.16152, 2024.
|
| 238 |
+
Rick Durrett. Probability: theory and examples, volume 49. Cambridge university press, 2019.
|
| 239 |
+
Songwei Ge, Seungjun Nah, Guilin Liu, Tyler Poon, Andrew Tao, Bryan Catanzaro, David Jacobs, Jia-Bin Huang, Ming-Yu Liu, and Yogesh Balaji. Preserve your own correlation: A noise prior for video diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 22930-22941, 2023.
|
| 240 |
+
|
| 241 |
+
Yuwei Guo, Ceyuan Yang, Anyi Rao, Zhengyang Liang, Yaohui Wang, Yu Qiao, Maneesh Agrawala, Dahua Lin, and Bo Dai. Animatediff: Animate your personalized text-to-image diffusion models without specific tuning. International Conference on Learning Representations, 2024.
|
| 242 |
+
Agrim Gupta, Lijun Yu, Kihyuk Sohn, Xiuye Gu, Meera Hahn, Li Fei-Fei, Irfan Essa, Lu Jiang, and José Lezama. Photorealistic video generation with diffusion models. arXiv preprint arXiv:2312.06662, 2023.
|
| 243 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
|
| 244 |
+
Jonathan Ho, William Chan, Chitwan Sahara, Jay Whang, Ruiqi Gao, Alexey Gritsenko, Diederik P Kingma, Ben Poole, Mohammad Norouzi, David J Fleet, et al. Imagen video: High definition video generation with diffusion models. arXiv preprint arXiv:2210.02303, 2022.
|
| 245 |
+
Xingzhong Hou, Boxiao Liu, Yi Zhang, Jihao Liu, Yu Liu, and Haihang You. Easydrag: Efficient point-based manipulation on diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 8404-8413, June 2024.
|
| 246 |
+
Yuanming Hu, Tzu-Mao Li, Luke Anderson, Jonathan Ragan-Kelley, and Frédo Durand. Taichi: a language for high-performance computation on spatially sparse data structures. ACM Transactions on Graphics (TOG), 38(6):1-16, 2019.
|
| 247 |
+
Xingchang Huang, Corentin Salaun, Cristina Vasconcelos, Christian Theobalt, Cengiz Oztireli, and Gurprit Singh. Blue noise for diffusion models. In ACM SIGGRAPH 2024 Conference Papers, pp. 1-11, 2024.
|
| 248 |
+
Michael Kass and Davide Pesare. Coherent noise for non-photorealistic rendering. ACM Transactions on Graphics (TOG), 30(4):1-6, 2011.
|
| 249 |
+
Levon Khachatryan, Andranik Movsisyan, Vahram Tadevosyan, Roberto Henschel, Zhangyang Wang, Shant Navasardyan, and Humphrey Shi. Text2video-zero: Text-to-image diffusion models are zero-shot video generators. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15954-15964, 2023.
|
| 250 |
+
Min-Seop Kwak, Donghoon Ahn, Ines Hyeonsu Kim, Jin-wha Kim, and Seungryong Kim. Geometry-aware score distillation via 3d consistent noising and gradient consistency modeling. arXiv preprint arXiv:2406.16695, 2024.
|
| 251 |
+
Ares Lagae and Philip Dutre. A comparison of methods for generating poisson disk distributions. In Computer Graphics Forum, volume 27, pp. 114-129. Wiley Online Library, 2008.
|
| 252 |
+
Guan-Horng Liu, Arash Vahdat, De-An Huang, Evangelos A Theodorou, Weili Nie, and Anima Anandkumar. I²sb: Image-to-image schrödinger bridge. arXiv preprint arXiv:2302.05872, 2023.
|
| 253 |
+
Xin Ma, Yaohui Wang, Gengyu Jia, Xinyuan Chen, Yuan-Fang Li, Cunjian Chen, and Yu Qiao. Cinema: Consistent and controllable image animation with motion diffusion models. arXiv preprint arXiv:2407.15642, 2024.
|
| 254 |
+
Michael McCool and Eugene Fume. Hierarchical poisson disk sampling distributions. In Graphics interface, volume 92, pp. 94-105, 1992.
|
| 255 |
+
Chenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, and Stefano Ermon. Sdedit: Guided image synthesis and editing with stochastic differential equations. arXiv preprint arXiv:2108.01073, 2021.
|
| 256 |
+
Ron Mokady, Amir Hertz, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Null-text inversion for editing real images using guided diffusion models. arXiv preprint arXiv:2211.09794, 2022.
|
| 257 |
+
Peter Mörters and Yuval Peres. Brownian motion, volume 30. Cambridge University Press, 2010.
|
| 258 |
+
Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021.
|
| 259 |
+
|
| 260 |
+
Bernt Oksendal. Stochastic differential equations: an introduction with applications. Springer Science & Business Media, 2013.
|
| 261 |
+
Jan K Pachl. Disintegration and compact measures. Mathematica Scandinavica, pp. 157-168, 1978.
|
| 262 |
+
Karran Pandey, Paul Guerrero, Matheus Gadelha, Yannick Hold-Geoffroy, Karan Singh, and Niloy J Mitra. Diffusion handles enabling 3d edits for diffusion models by lifting activations to 3d. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7695–7704, 2024.
|
| 263 |
+
Ken Perlin. An image synthesizer. ACM Siggraph Computer Graphics, 19(3):287-296, 1985.
|
| 264 |
+
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. arXiv preprint arXiv:2307.01952, 2023.
|
| 265 |
+
Weiming Ren, Harry Yang, Ge Zhang, Cong Wei, Xinrun Du, Stephen Huang, and Wenhu Chen. Consisti2v: Enhancing visual consistency for image-to-video generation. arXiv preprint arXiv:2402.04324, 2024.
|
| 266 |
+
Elad Richardson, Gal Metzer, Yuval Alaluf, Raja Giryes, and Daniel Cohen-Or. Texture: Text-guided texturing of 3d shapes. In ACM SIGGRAPH 2023, 2023.
|
| 267 |
+
L. Roberts. Picture coding using pseudo-random noise. IRE Transactions on Information Theory, 8 (2):145-154, 1962. doi: 10.1109/TIT.1962.1057702.
|
| 268 |
+
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, pp. 10684-10695, 2022.
|
| 269 |
+
Uriel Singer, Adam Polyak, Thomas Hayes, Xi Yin, Jie An, Songyang Zhang, Qiyuan Hu, Harry Yang, Oron Ashual, Oran Gafni, et al. Make-a-video: Text-to-video generation without text-video data. arXiv preprint arXiv:2209.14792, 2022.
|
| 270 |
+
Zachary Teed and Jia Deng. Raft: Recurrent all-pairs field transforms for optical flow. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part II 16, pp. 402-419. Springer, 2020.
|
| 271 |
+
Bram Wallace, Akash Gokul, and Nikhil Naik. Edict: Exact diffusion inversion via coupled transformations, 2022. URL https://arxiv.org/abs/2211.12446.
|
| 272 |
+
Alan Wolfe, Nathan Morrical, Tomas Akenine-Möller, and Ravi Ramamoorthi. Spatiotemporal Blue Noise Masks. In Abhijeet Ghosh and Li-Yi Wei (eds.), Eurographics Symposium on Rendering. The Eurographics Association, 2022. ISBN 978-3-03868-187-8. doi: 10.2312/sr.20221161.
|
| 273 |
+
Xi Yu, Xiang Gu, Haozhi Liu, and Jian Sun. Constructing non-isotropic gaussian diffusion model using isotropic gaussian diffusion model for image editing. Advances in Neural Information Processing Systems, 36, 2024.
|
| 274 |
+
Bowen Zhang, Yiji Cheng, Jiaolong Yang, Chunyu Wang, Feng Zhao, Yansong Tang, Dong Chen, and Baining Guo. Gaussiancube: Structuring gaussian splatting using optimal transport for 3d generative modeling. arXiv preprint arXiv:2403.19655, 2024.
|
| 275 |
+
Lvmin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3836-3847, 2023a.
|
| 276 |
+
Yabo Zhang, Yuxiang Wei, Dongsheng Jiang, Xiaopeng Zhang, Wangmeng Zuo, and Qi Tian. Controlvideo: Training-free controllable text-to-video generation. arXiv preprint arXiv:2305.13077, 2023b.
|
| 277 |
+
|
| 278 |
+
# A PROOF OF THEOREM 1
|
| 279 |
+
|
| 280 |
+
Proof. By unrolling the definitions, for $t \in [0,1]$ , we have
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
H _ {n} (t) = S _ {n} ^ {*} (t) - t S _ {n} ^ {*} (1) + t c, \qquad S _ {n} ^ {*} (t) := \frac {1}{\sqrt {n}} \left(\sum_ {i = 1} ^ {\lfloor n t \rfloor} Z _ {i} + (n t - \lfloor n t \rfloor) Z _ {\lfloor n t \rfloor + 1}\right).
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
By Mörters & Peres (2010, Theorem 5.22), $\{S_n^*\}_{n\in \mathbb{Z}_{\geq 1}}$ converges in distribution to $W(t)$ under the sup-norm metric of $C[0,1]$ . To lift this convergence to the sequence $\{H_{n}\}_{n\in \mathbb{Z}_{\geq 1}}$ , observe that the function $g:C[0,1]\to C[0,1]$ defined by
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
g (x (t)) := x (t) - t x (1) + t c
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
is continuous under the sup-norm metric. To verify this, suppose $\lim_{n\to \infty}f_n = f$ for $\{f_n\}_{n\in \mathbb{Z}_{\geq 1}},f\in C[0,1]$ . Then
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
\begin{array}{l} \left\| g \left(f _ {n}\right) - g (f) \right\| _ {\infty} = \sup _ {t \in [ 0, 1 ]} | \left(f _ {n} (t) - t f _ {n} (1) + t c\right) - \left(f (t) - t f (1) + t c\right) | \\ \leq \| f _ {n} - f \| _ {\infty} + \| f _ {n} (1) - f (1) \| \leq 2 \| f _ {n} - f \| _ {\infty} \to 0. \\ \end{array}
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
Hence, by the continuous mapping theorem,
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
g (S _ {n} ^ {*}) = H _ {n} \xrightarrow {d} B (t) - t B (1) + t c.
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
To show
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
W (t) - t W (1) + t c = (W (t) \mid W (1) = c),
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
first of all, the conditioning $(W(t) \mid W(1) = c)$ is interpreted as the limit of $(W(t) \mid |W(1) - c| < \epsilon)$ as $\epsilon \to 0$ . Denote $Y(t) \coloneqq W(t) - tW(1)$ , so that $W(t) = Y(t) + tW(1)$ . Since $\operatorname{Cov}(Y(t), tW(1)) = \operatorname{Cov}(W(t) - tW(1), tW(1)) = t\operatorname{Cov}(W(t), W(1)) - t^2\operatorname{Var}(W(1), W(1)) = 0$ and that $Y(t), tW(1)$ are jointly Gaussian, they are independent. Therefore,
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
\begin{array}{l} \lim _ {\epsilon \rightarrow 0} (W (t) \mid | W (1) - c | < \epsilon) = \lim _ {\epsilon \rightarrow 0} (Y (t) + t W (1) \mid | W (1) - c | < \epsilon) \\ = Y (t) + \lim _ {\epsilon \rightarrow 0} (t W (1) \mid | W (1) - c | < \epsilon) \\ = W (t) - t W (1) + t c. \\ \end{array}
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
|
| 318 |
+
# B ADDITIONAL RESULTS
|
| 319 |
+
|
| 320 |
+
In this section we include additional visual and numerical results. Figure B.1 shows additional video $4 \times$ super-resolution results with $\mathrm{I}^2\mathrm{SB}$ in addition to those in Figure 9. Figure B.2 shows additional video generation results with SDEdit and cross-frame attention, which mirrors the setup of Figure 10. Figure B.6 and Figure B.7 show video generation results with SDEdit only (without cross-frame attention) to isolate the influence of noise initialization, and we compare our method (both variants) with HIWYN (Chang et al., 2024), Control-A-Video (Chen et al., 2023) PYoCo (Ge et al., 2023), as well as baselines with random, fixed, and interpolated noise using bilinear and nearest interpolating schemes. The statistics for both the church and cat scenes are reported in Table 1. Figure B.3 demonstrates the differences between both our variants in computing warped pixel regions in the diffeomorphic case. Figure B.5 shows the differences in the non-diffeomorphic case, where we use additional examples to demonstrate the area contention issue caused by degenerate meshes that applies similarly to our grid-based variant and (Chang et al., 2024), and highlight the robustness of our particle-based variant. Figure B.4 shows additional results for applying our particle-based, volumetric noise warping to 3D tasks with GaussianCube (Zhang et al., 2024).
|
| 321 |
+
|
| 322 |
+
<table><tr><td colspan="10">Video Generation Quality (Church)</td></tr><tr><td>Metric</td><td>Ours (G)</td><td>Ours (P)</td><td>HIWYN</td><td>PYoCo</td><td>CaV</td><td>Random</td><td>Fixed</td><td>Bilinear</td><td>Nearest</td></tr><tr><td>Consistency ↓</td><td>6.955e-2</td><td>7.057e-2</td><td>6.953e-2</td><td>9.800e-2</td><td>1.108e-1</td><td>1.150e-1</td><td>9.273e-2</td><td>6.906e-2</td><td>8.985e-2</td></tr><tr><td>Realism ↓</td><td>7.251e-2</td><td>7.130e-2</td><td>7.197e-2</td><td>7.535e-2</td><td>7.430e-2</td><td>6.336e-2</td><td>5.893e-2</td><td>2.102e-1</td><td>8.194e-2</td></tr><tr><td>Faithfulness ↓</td><td>1.111e-2</td><td>1.166e-2</td><td>1.171e-2</td><td>1.184e-2</td><td>1.555e-2</td><td>1.344e-2</td><td>1.030e-2</td><td>1.883e-2</td><td>3.090e-2</td></tr><tr><td colspan="10">Video Generation Quality (Cat)</td></tr><tr><td>Metric</td><td>Ours (G)</td><td>Ours (P)</td><td>HIWYN</td><td>PYoCo</td><td>CaV</td><td>Random</td><td>Fixed</td><td>Bilinear</td><td>Nearest</td></tr><tr><td>Consistency ↓</td><td>4.016e-2</td><td>4.070e-2</td><td>3.810e-2</td><td>5.995e-2</td><td>4.507e-2</td><td>1.093e-1</td><td>4.537e-2</td><td>2.613e-2</td><td>7.974e-2</td></tr><tr><td>Realism ↓</td><td>2.235e-1</td><td>2.126e-1</td><td>2.108e-1</td><td>1.647e-1</td><td>1.931e-1</td><td>1.561e-1</td><td>1.982e-1</td><td>3.271e-1</td><td>3.195e-1</td></tr><tr><td>Faithfulness ↓</td><td>7.841e-3</td><td>7.556e-3</td><td>7.305e-3</td><td>9.290e-3</td><td>7.427e-3</td><td>9.637e-3</td><td>8.558e-3</td><td>1.162e-2</td><td>1.128e-1</td></tr></table>
|
| 323 |
+
|
| 324 |
+
Table 1: We show the quantitative statistics for conditional video generation using SDEdit without cross-frame attention. The consistency is measured using Warp MSE (Chang et al., 2024), and the realism and faithfulness are measured as in Meng et al. (2021).
|
| 325 |
+
|
| 326 |
+

|
| 327 |
+
Figure B.1: Additional results generated by performing $4 \times$ video super-resolution with $\mathrm{I}^2\mathrm{SB}$ . For each scene, the upper row represents the low resolution input video, and the lower row represents the high resolution output video generated with our particle variant. We refer to our supplementary video for better visualization of these results.
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Figure B.2: Additional conditional video generation results by integrating our method (particle) with SDEdit and cross-frame attention (Ceylan et al., 2023) on a cat scene.
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Figure B.3: Comparison between the grid-based and particle-based variants for building partition records when the deformation map is diffeomorphic. The first column shows the deformation map at different frames. The second and third columns visualize warped pixel regions for both methods. The fourth and fifth columns show the IoU (larger is better) and Chamfer distance (smaller is better) between the warped pixel regions of both variants. We plot the distance between particle and grid variants alongside a baseline, which is the distance between identity map and the grid variant, to verify that the particle-based version remains close to the grid-based version even under large distortion.
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure B.4: Extension of our particle-based method to warping 3D, volumetric noise. We show volume renders of the noise on the top left, slice views on the top middle, and 3D Gaussians as used in the GaussianCube representation on the top right. The bottom row shows the respective results obtained by running 3D generation with warped and random 3D noise.
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Figure B.5: Comparison of grid-based and particle-based variants under non-diffeomorphic deformation maps typically found in real-world applications. The orange pixels are the invalid pixels where area contention occurs. Flow maps are downsampled $10 \times$ for better visualization. Image sequence comes from Brox & Malik (2011) while optical flow is computed via Teed & Deng (2020).
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
Figure B.6: The full results generated by all the compared methods on the church scene. The interpolation baselines yield noticeably corrupted results, and others yield similar quality on the image level. The difference lies in how the details are preserved across frames. We refer to our supplementary video for better visualization of these results.
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure B.7: The full results generated by all the compared methods on the cat scene. We observe that HIWYN and our method (both variants) yield similar results. While both our variants are much faster and more memory-efficient than HIWYN, this makes a particularly strong case for our particle-based variant considering its significantly improved simplicity and efficiency. We refer to our supplementary video for better visualization of these results.
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59c5dc769d9d92adcf0215f1c4c9d4d1211ee88ee0877151238c6ce8232d8335
|
| 3 |
+
size 1914900
|
ICLR/2025/Infinite-Resolution Integral Noise Warping for Diffusion Models/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f79335e82d389cbc443cbe9eb02d965642329b6462cb94fe452d82f32995d0dc
|
| 3 |
+
size 583343
|
ICLR/2025/Influence-Guided Diffusion for Dataset Distillation/829150ac-5224-4464-847c-4e03bc3285ae_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fcf830159d426406b37c1a071d17a25a924a40f650229b33a836a6fd54a1532
|
| 3 |
+
size 120693
|
ICLR/2025/Influence-Guided Diffusion for Dataset Distillation/829150ac-5224-4464-847c-4e03bc3285ae_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e989552acbbc928b4ae0da2523df638686a89b3813503c824e6c9fa2d68e725f
|
| 3 |
+
size 145449
|