diff --git a/open_review/iclr2024_8795.md b/open_review/iclr2024_8795.md new file mode 100644 index 0000000000000000000000000000000000000000..6c94e78993327d94189f339237dd34cfe9d2000d --- /dev/null +++ b/open_review/iclr2024_8795.md @@ -0,0 +1,582 @@ + + +## HUREF: HUMAN-READABLE FINGERPRINT FOR LARGE LANGUAGE MODELS + +Authors withheld for review + +## ABSTRACT + +Protecting the copyright of large language models (LLMs) has become crucial due to their resource-intensive training and accompanying carefully designed licenses. However, identifying the original base model of an LLM is challenging due to potential parameter alterations through fine-tuning or continued pretraining. In this study, we introduce HuRef, a human-readable fingerprint for LLMs that uniquely identifies the base model without exposing model parameters or interfering with training. We first observe that the vector direction of LLM parameters remains stable after the model has converged during pretraining, showing negligible perturbations through subsequent training steps, including continued pretraining, supervised fine-tuning (SFT), and RLHF, which makes it a sufficient condition to identify the base model. The necessity is validated by continuing to train an LLM with an extra term to drive away the model parameters’ direction and the model becomes damaged. However, this direction is vulnerable to simple attacks like dimension permutation or matrix rotation, which significantly change it without affecting performance. To address this, leveraging the Transformer structure, we systematically analyze potential attacks and define three invariant terms that identify an LLM’s base model. We make these invariant terms human-readable by mapping them to a Gaussian vector using a convolutional encoder and then converting it into a natural image with StyleGAN2. The encoder discriminates between invariants from different base models and ensures Gaussian output through adversarial training, while StyleGAN2 transforms Gaussian vectors into dog images. Consequently, our method generates a dog image as an identity fingerprint for an LLM, where the dog’s appearance strongly indicates the LLM’s base model. Specifically, if the LLM is adapted from another base model, the generated dog highly resembles that model; otherwise if trained independently from scratch, it exhibits a unique dog image distinct from other models. Experimental results across various LLMs demonstrate the effectiveness of our method, the generated dog image remains invariant to different training steps, including SFT, RLHF, or even continued pretraining with augmented vocabulary in a new language. + +## 1 INTRODUCTION + +Large language models (LLMs) have become the foundation models in many scenarios of artificial intelligence. As training an LLM from scratch consumes a huge amount of computation and data resources and the trained LLM needs to be carefully protected from malicious use, the parameters of the LLMs become a crucial property to protect, for both commercial and ethical reasons. As a result, many of the LLMs are open-sourced with carefully designed licences to reject commercial use(Touvron et al., 2023a)(Taylor et al., 2022) or requiring an applyand-approval process(Touvron et al., 2023b)(Zhang et al., 2022)(Penedo et al., 2023)(BaiChuanInc, 2023)(Team, 2023)(Zheng et al., 2023b), let alone some LLMs are not open-sourced entirely(OpenAI, 2022)(GPT-4, 2023)(Brown et al., 2020)(Wu et al., 2023b)(Chowdhery et al., 2022)(Hoffmann et al., 2022). + +At the core of protecting LLMs from unauthorized use is to identify the base model of a given LLM. However, different from other forms of property such as software or images, protecting LLMs is a novel problem with unique challenges. First, the base model usually needs to be fine-tuned or even continue pretrained to be applied to downstream tasks, resulting in parameter updates that make + +1 + +the resulting model different from the original base model, which makes it disputable to identify the base model. Second, many of the popular LLMs are not releasing their parameters, leaving the identification in a black-box setting. Third, different from previous smaller-scale neural networks that are only trained for specific tasks, LLMs are usually targeted for enormous forms of tasks that are not yet defined during pretraining. This has made the watermarking methods for traditional neural networks(Adi et al., 2018)(Xiang et al., 2021)(Yadollahi et al., 2021) not suited in this case, especially under extensive subsequent training steps. + +In this work, we propose a novel way to overcome the aforementioned challenges by proposing a model that reads part of the model parameters and computes a fingerprint for each LLM, without directly exposing the LLM parameters to the public or interfering with its training process. The appearance of the fingerprint is closely dependent on the base model, and invariant to almost all subsequent training steps, including supervised fine-tuning (SFT), reinforcement learning with human feedback (RLHF), or even continue-pretraining with augmented vocabulary in a new language. + +The fingerprint is based on our observation that the vector direction of LLM parameters remains stable against various subsequent training steps after the model has converged during pretraining. This makes it a good indicator for base model identification. Empirically, the sufficiency of this correlation is elaborated in Section 3.1.1, while its necessity is presented in Section 3.1.2. + +Further, despite its stability towards training, the vector direction of the model parameter is vulnerable to some simple direct weight rearrangements that could significantly change the direction of parameter vectors without affecting the model’s performance. We construct three invariant terms that are robust to these weight rearrangements by systematically analyzing possible rearrangements and leveraging the Transformer structure. This is elaborated in Section 3.2. + +Moreover, we make the fingerprint human-readable by mapping the invariant terms into a Gaussian random vector through a convolutional encoder and then map the Gaussian vector to a natural image through an off-the-shelf image generation model, StyleGAN2(Karras et al., 2020). This makes our fingerprints easily interpretable and straightforward to decipher. This is elaborated in Section 4. + +With this fingerprinting approach, we can sketch an outline for protecting LLMs (c.f. Appendix B). + +## 2 RELATED WORKS + +Despite its short history, safeguarding LLMs against unauthorized use has been a topic of significant interest. There are two primary categories of approaches. + +**Post-hoc Detection** methods involve analyzing text generated by LLMs after its production. LLMDet (Wu et al., 2023a) calculates proxy perplexity by leveraging prior knowledge of the model’s next-token probabilities. DetectGPT (Mitchell et al., 2023) uses model-predicted probabilities to identify passages generated by a specific LLM. Li et al. (2023) employs perplexity scores and intricate feature engineering. These methods are usually applicable to a specific LLM and could be affected by supervised fine-tuning (SFT) and continued pretraining. More recently, Sadasivan et al. (2023) presented theoretical findings that for highly advanced AI human mimickers, even the best possible detection methods may only marginally outperform random guessing. + +**Watermarking Techniques** can be divided into two main categories (Boenisch, 2021). The first embeds watermarks or related information into the model parameters, such as explicit watermarking scheme (Uchida et al., 2017) or leveraging another neural network (Wang et al., 2020), which could potentially affect model performance (Wang & Kerschbaum, 2019). The second category focuses on inducing unusual prediction behavior in the model. Xiang et al. (2021) explored embedding phrase triggers, and Gu et al. (2022) extended this approach to LLMs, albeit they are task-specific. Yadollahi et al. (2021) proposed a watermarking method but did not consider subsequent fine-tuning. Christ et al. (2023) proposed cryptographic designs. Kirchenbauer et al. (2023) involved using preselected tokens, but this inevitably alters the model prediction. These methods may turn out to be vulnerable to attacks on certain tokens, for example, Krishna et al. (2023) successfully evaded watermarking (Kirchenbauer et al., 2023), GPTZero(Tian, 2023), DetectGPT, and OpenAI’s text classifier(OpenAI, 2023) using paraphrasing attacks. + +Our work doesn’t fall into any of the two categories since it is based on analyzing model weights post-hoc and relies on a wide spectrum of tokens. + +2 + +**==> picture [397 x 80] intentionally omitted <==** + +**----- Start of picture text -----**
+60
55
50
45
40
PCS 99.95 99.98 99.74 99.87 99.80 99.96 99.91 99.96 99.75 99.58 0.95 1.16 1.20 1.51 35
100 95 90 85 80
ICS 99.43 99.96 91.70 99.48 99.57 99.88 99.69 99.91 99.33 89.60 2.76 2.11 1.05 10.71 Cosine similarity
Model Alpaca-Lora Alpaca Chinese-LLaMA Vicuna Baize MedAlpaca Koala WizardLM MiniGPT-4 Chinese-Alpaca Baichuan OpenLLaMA InternLM LLaMA-2
Average performance
**----- End of picture text -----**
+ +Table 1: The cosine similarities of model parameters (PCS) and invariant terms (ICS) between various LLMs w.r.t. the LLaMA7B base model. All models are of the same size. + +Figure 1: The model’s performance quickly deteriorates as the PCS decreases. + +## 3 VECTOR DIRECTION OF LLM PARAMETERS AND THE INVARIANT TERMS + +## 3.1 USING VECTOR DIRECTION OF LLM PARAMETERS TO IDENTIFY THE BASE MODEL + +We can flatten all weight matrices and biases of an LLM into vectors, concatenate all resulting vectors together, and treat is as single huge vector. In this subsection, we are going to show how the direction of this vector could be used to determine the base model by empirically showing its sufficiency and necessity. + +## 3.1.1 SUFFICIENCY + +For sufficiency, we compute the cosine similarities between a base model LLaMA-7B and various of its offspring models, as well as other independently pretrained LLMs(Geng & Liu, 2023) that are of the same size. Table 1 shows a wide spectrum of models that inherit the LLaMA-7B base model, whose subsequent training processes involve various training paradigms, such as SFT (Taori et al., 2023)(Xu et al., 2023b)(Zheng et al., 2023a)(Geng, 2023)(Xu et al., 2023a)(Han et al., 2023), SFT with LoRA (Wang, 2023) and extensive continue pretraining in a new language(Cui et al., 2023), extending to new modalities (Zhu et al., 2023), etc. Please refer to Appendix C for a detailed description of the subsequent training setting of these models. + +Regardless of their various subsequent training setting, we can figure that all of these models show almost full scores in cosine similarity, largely preserving the base model’s parameter vector direction. On the other hand, the models that are trained independently appear to be completely different in parameter vector direction, showing almost zero cosine similarity with the LLaMA-7B model. + +These observations indicate that a high cosine similarity between the two models highly suggests that they share the same base model, and vice versa. + +## 3.1.2 NECESSITY + +From the necessity perspective, we want to verify that if the base model’s ability could still be preserved when the cosine similarity is intentionally suppressed in subsequent training steps. To this end, we inherit the LLaMA-7B base model and interfere with the Alpaca’s SFT process by augmenting the original SFT loss with an extra term that minimizes the absolute value of cosine similarity. i.e. _LA_ = ��� _⟨_ _**V** A,_ _**V** base⟩_ ���[Here] _**[V]**[A][,]_ _**[ V]**[base]_[stand][for][the][parameter][vector][of][the][model] _|_ _**V** A||_ _**V** base|_[.] being tuned and that of the base model, respectively. + +Figure 1 presents the average zero-shot performance on a set of standard benchmarks when _LA_ is at different values. The benchmarks include BoolQ(Clark et al., 2019), PIQA(Bisk et al., 2020), HellaSwag(Zellers et al., 2019), WinoGrande(Sakaguchi et al., 2021), ARC-e, ARC-c(Clark et al., 2018),RACE(Lai et al., 2017) and MMLU(Hendrycks et al., 2020). (c.f. Appendix E for a detailed breakdown of performances on each task.) We can see that despite the original training loss is still present, the model quickly deteriorates to random guesses as the cosine similarity detaches away from that of the base model. + +These observations indicate that it is fairly hard for the model to preserve the base model’s performance without keeping a high cosine similarity to it. + +3 + +## 3.2 DERIVING THE INVARIANT TERMS + +Although the vector direction of model parameters is shown to closely stick to its base model, directly comparing the vector direction through cosine similarity requires both models to reveal their parameters, which is unacceptable in many cases. In addition, apart from training, parameter vector direction is vulnerable to some attacks that directly rearrange the model weights. For example, since the hidden units in a model layer are permutation-invariant, one can easily alter the parameter vector direction by randomly permuting the hidden units along with the weights wired to the units. These attacks are invisible to discover since they could easily break the cosine similarity but neither change the model structure nor affect the model performance. + +In this subsection, we are going to first systematically analyze and formalize possible weight rearrangements by leveraging the structure constraints of Transformer, and then derive three terms that are invariant under these rearrangements, even when they are combined. + +Let’s first consider the Transformer layer as depicted in Figure 2. Formally, the layer conducts the following computation: + +**==> picture [397 x 138] intentionally omitted <==** + +**----- Start of picture text -----**
+mally, the layer conducts the following computation:
𝐻𝑛+1 T
Add & Norm 𝐻𝑛+1′ H Attn′ [=][ softmax] � H n W Q ( √ H dn W K ) � H n W V W O (1)
Feed Forward H n′ +1 [=] [ σ] [ (] [H] [Attn] [W] [1] [+] [ b] [1][)] [ W] [2] [+] [ b] [2] (2)
𝐻𝐴𝑡𝑡𝑛 where H n ∈ R [l][×][d] is the hidden state of the n -th layer, with l, d
Add & Norm ′
𝐻𝐴𝑡𝑡𝑛′ the self-attention output.being sequence length and model dimensions, respectively.To reduce clutter, we omit equations related H Attn [is]
Attention to residual connection and LayerNorm, but denote the variables right
before it with an apostrophe. The W ’s and b ’s are weights and biases.
𝐻𝑛
H = X
**----- End of picture text -----**
+ +Note that the first layer reads the word embedding, i.e., _**H**_ 0 = _**X** ∈_ R _[l][×][d]_ , and the final output distribution **P** _∈_ R _[l][×][v]_ is given by + +Figure 2: Transformer layer + +**==> picture [183 x 11] intentionally omitted <==** + +where _v_ is the vocabulary size, _N_ is the total number of layers, and _**E** ∈_ R _[d][×][v]_ is the parameter matrix in the softmax layer, which is sometimes tied with the word embedding matrix at the input. + +## 3.2.1 FORMS OF WEIGHT REARRANGEMENT ATTACKS + +Putting Equations 1˜3 together, we can systematically analyze how the parameter vector direction can be attacked through direct weight rearrangements. There are totally 3 forms of attacks that could camouflage the model without changing its architecture or affecting its output. + +**1. Linear mapping attack on** _**W** Q,_ _**W** K_ **and** _**W** V ,_ _**W** O_ **.** Consider Equation 1, one can transform _**W** Q_ and _**W** K_ symmetrically so that the product _**W** Q_ _**W** K[T]_[remains unchanged but both weights are] significantly modified. This will alter the parameter vector direction significantly. Formally, for any invertible matrix _**C**_ 1, let + +˜ ˜ _**W** Q_ = _**W** Q_ _**C**_ 1 _,_ _**W** K_ = _**W** K_ _**C**_ 1 _[−]_[1] (4) + +and substitute them respectively into the model, one can camouflage it as if it’s a brand new model, without sacrificing any of the base model’s performance. The same holds for _**W** V ,_ _**W** O_ as well. + +**2. Permutation attack on** _**W**_ 1 _,_ **b** 1 _,_ _**W**_ 2 **.** Consider Equation 2, since it consists of two fully connected layers, one can randomly permute the hidden states in the middle layer without changing its output. Formally, let _**P** F F N_ be an arbitrary permutation matrix, one can camouflage the model without sacrificing its performance by substituting the following three matrices accordingly + +**==> picture [316 x 13] intentionally omitted <==** + +**3. Permutation attack on word embeddings.** In a similar spirit, one can permute the dimensions in the word embedding matrix as well, although it would require all remaining parameters to be permuted accordingly. Formally, let _**P** E_ be an arbitrary permutation matrix that permutes the dimensions in _**X**_ through _**X**_[˜] = _**XP** E_ , due to the existence of the residual connections, the output of + +4 + +all layers have to be permuted in the same way, i.e., _**H**_[˜] _n_ = _**H** n_ _**P** E_ . Note that it’s not necessarily the case in the former two types of attacks. This permutation has to be canceled out at the final softmax layer (Equation 3), by permuting the dimensions in _**E**_ accordingly, i.e. _**E**_[˜] = _**P** E[−]_[1] _**[E]**_[.][Specifically,] all remaining parameters have to be permuted in the following way: + +**==> picture [356 x 30] intentionally omitted <==** + +Moreover, putting everything together, one can combine all the aforementioned three types of attacks altogether. Formally, the parameters can be camouflaged as: + +**==> picture [379 x 46] intentionally omitted <==** + +**==> picture [13 x 10] intentionally omitted <==** + +Note that for permutation matrix we have _**P**[−]_[1] = _**P**[T]_ . This includes all possible attacks that 1) do not change the model architecture, and 2) do not affect the model’s output. + +3.2.2 THE INVARIANT TERMS TO THESE ATTACKS + +In order to find the invariant terms under all these attacks, we need to combine terms in Equation 7 to get the invariant term that nicely cancels out all extra camouflaging matrices. To this end, we construct 3 invariant terms: + +**==> picture [349 x 15] intentionally omitted <==** + +Note that we are not simply including all tokens of a vocabulary or tokens in a certain sentence for _**X**_ , and instead, we use _**X**_[ˆ] in these terms. There are two problems if we directly use all tokens’ embeddings _**X**_ . First, using the whole embedding matrix will make the terms unnecessarily large and of variable size between different models. Second, more importantly, since it is fairly common to inherit a base model with an augmented vocabulary, i.e., to append a set of new tokens at the end of the original vocabulary, the invariant terms will result in different sizes and are not comparable in this case. Third, if we designate specific tokens instead, the selected tokens may not always exist in all LLMs being tested. As a result, we carefully choose the tokens to be included in _**X**_[ˆ] , by following these steps: + +1. Select a sufficiently big corpus as a standard verifying corpus. + +2. Tokenize the corpus with the LLM’s vocabulary, and sort all tokens in the vocabulary according to their frequency. + +3. Delete all tokens in the vocabulary that don’t show up in the corpus. + +4. Among the remaining tokens, select the least frequent _K_ tokens as the tokens to be included in **X**[ˆ] . + +Here, using a standard corpus ensures that the resulting tokenization will be identical if a certain model’s vocabulary is a subset of another; the sufficiently large corpus stabilizes the frequencies of tokens in the vocabulary and provides enough chance for as many tokens as possible to show up. Deleting zero-shot tokens automatically sweeps off augmented tokens. Selecting the rarest tokens minimizes potential affections brought by parameter updates in subsequent training processes. A properly large _K_ will ensure a large enough set of tokens are included, making the resulting invariant terms more generally representative. More importantly, it will make all the invariant terms have the same size across all LLMs, regardless of their original sizes. In practice, we choose _K_ = 4096. + +We show the cosine similarity between the invariant terms in Table 1. Although not as perfect as the parameter’s cosine distances, they still preserve a high correlation to the base model. + +- 4 MAKING THE INVARIANT TERMS HUMAN-READABLE: THE FINGERPRINTING MODEL + +Instead of directly using the three invariant terms, we can present the content in the terms in a human-readable way, through the fingerprinting model. The fingerprinting model consists of a neu- + +5 + +**==> picture [396 x 224] intentionally omitted <==** + +**----- Start of picture text -----**
+Training
𝒩 0,1
Discriminator Discriminator Loss 𝑳𝑫
Sample Real data 𝒙
𝑴𝒂𝒕𝒓𝒊𝒄𝒆𝒔 𝑷𝒊, 𝑵𝒊~𝓝 𝟎,𝟏 Fake data 𝒙′ Training Loss 𝑳= 𝑳𝑪 +𝑳𝑫
𝑀 [,] = 𝑃(,𝑃),𝑃*,𝑃(,+
Maximize Cos Similarity
𝜺#~𝓝 𝟎, 𝜶 𝑃# + 𝜺$
M = 𝑃(𝑃)𝑃*𝑃(+ Contrastive Loss 𝑳𝑪
Anchor CNN Minimize Cos Similarity
𝑀 [-] = 𝑁(𝑁)𝑁*𝑁(+ Encoder
Training Data Generation Feature Vectors 𝒗
LLama Alpaca Inference
LLama Alpaca
GAN/VAE
OpenLLaMa GPTNeoX Generator OpenLLaMa GPTNeoX
CNN
Encoder Feature Vectors 𝒗
LLMs Invariant Terms
**----- End of picture text -----**
+ +Figure 3: The training and inference of our fingerprinting model. + +ral network encoder - a convolutional encoder in our case - and an off-the-shelf image generator as depicted in Figure 3. In principle, the encoder takes as input the invariant terms of a certain model, tile them together, and deterministically maps them to a vector that appears to be filled with Gaussian variables. The subsequent image generator reads this vector and maps it to a natural image. Importantly, throughout the process, the locality of the inputs has to be preserved from end to end. i.e., similar invariable terms should result in similar Gaussian variables and finally similar images. + +## 4.1 TRAINING THE CONVOLUTIONAL ENCODER + +All the invariant terms in Equation 8 have the same size, i.e., _**M** a,_ _**M** b,_ _**M** f ∈_ R _[K][×][K]_ , regardless of the index of the layer or LLM sizes. As a result, we can tile up them to form a 3D input tensor _**M** ∈_ R _[K][×][K][×][C]_ , where _C_ is the channel dimension. If we are using all layers, _C_ = 3 _N_ . Again, in order to make _**M**_ the same size across all models, we only involve the last _r_ layers in the LLM[1] . + +Note that we don’t need to use any real LLM weights for training the convolutional encoder, as it only needs to learn a locality-preserving mapping between the input tensor and the output Gaussian vector. This ensures strict exclusivity between the training and test data. To construct the training data, we synthesize the matrix in each channel of _**M**_ on-the-fly, by randomly sampling 3 matrices _**P**_ 1 _,_ _**P**_ 2 _,_ _**P**_ 3 and multiplying them together as _**P**_ 1 _**P**_ 2 _**P**_ 3 _**P**_ 1 _[T]_[,as though they are model parameters.] + +To learn locality-preserving mapping, we adopt contrastive learning. For a randomly sampled input _**M**_ , its negative sample is given by another independently sampled tensor _**M**[−]_ . For its positive sample _**M**_[+] , we perturb the content in each of _**M**_ ’s channel by adding small perturbation noises _ϵi ∈N_ (0 _, α_ ) to the 3 matrices behind it. Here _α_ is a hyperparameter determining the small variance. Subsequently, the contrastive loss _LC_ is given by: + +**==> picture [295 x 13] intentionally omitted <==** + +where _SC_ ( _·, ·_ ) computes the cosine similarity between its two input matrices. + +To render the output vector appears to be Gaussian, we adopt the standard GAN(Karras et al., 2019) training scheme. We add a simple MLP as the discriminator _D_ that is trained to discriminate between real Gaussian vectors and the convolutional output vector _**v**_ . In this setting, the convolutional encoder serves as the generator. During training, for every _m_ steps, we alternate between training the discriminator and the generator. The discriminator loss _LD_ is thus given by + +> 1 In fact, experimentally we find that a small _r_ is already sufficient to discriminate LLMs, it’s not necessary to involve many layers. In all of our experiments, _r_ = 2, so there are only 6 channels in the input. + +6 + +**==> picture [396 x 239] intentionally omitted <==** + +**----- Start of picture text -----**
+Falcon-40B MPT-7B LLaMA2-7B Qwen-7B Baichuan-13B InternLM-7B
Instruct 99.78 Instruct 100 Chat 99.55 Chat 99.74 Chat 99.72 Chat 99.07
SFT 99.72 Storywriter 99.82 32K 99.51 Firefly 99.02 SFT 99.98 Firefly 99.32
**----- End of picture text -----**
+ +Figure 4: Fingerprints of 6 different base models (in the first row) and their corresponding offspring models (the lower two rows) are presented. The base model’s name is omitted in the offspring models. The blue number to the right of each offspring model indicates the cosine similarity of its invariant terms (ICS) w.r.t. its base model. + +**==> picture [259 x 29] intentionally omitted <==** + +While training the generator we also need to incorporate the contrastive learning loss. Thus the actual loss _L_ for the training generator is a combination of _LC_ and _LD_ . + +**==> picture [228 x 10] intentionally omitted <==** + +## 4.2 INFERENCE + +In the inference stage, the convolutional encoder takes the invariant terms from real LLMs and outputs _**v**_ . In principle, any image generator that takes a Gaussian input and has the locality-preserving property would fit here. In this paper, we employ the StyleGAN2 generator pre-trained on the AFHQ(Choi et al., 2020) dog dataset to generate natural images, we detailed why it’s a smooth generator in Appendix D. By visually representing the invariant terms as fingerprints, we can easily identify base models based on their fingerprint images, enabling reliable tracking of model origins. + +## 5 EXPERIMENTS + +Apart from the results shown in Section 3, our experiment section is three-fold. First, we choose several widely used and open-sourced LLM base models with their offspring LLMs to compute their invariant terms and fingerprint images. Second, we extensively test our method on the LLaMA model family, including some heavily continue-pretrained ones to experimentally verify the robustness of our method against subsequent training processes. Third, we extensively experimented on more open-sourced LLMs to show the diversity of generated images on different LLMs. + +## 5.1 INDEPENDENTLY TRAINED LLMS AND THEIR OFFSPRING MODELS + +We conduct experiments on 6 commonly used open-sourced LLMs with their sizes ranging from 7B to 40B. For the invariant terms, we use the last 2 layers’ parameters and set _K_ = 4096, which results + +7 + +|ICS|LLaMA MiGPT Alpaca MAlpaca Vicuna Wizard
Baize
AlpacaL CAlpaca Koala CLLaMA Beaver Guanaco BiLLa| +|---|---| +||| +|LLaMA
MiGPT
Alpaca
MAlpaca
Vicuna
Wizard
Baize
AlpacaL
CAlpaca
Koala
CLLaMA
Beaver
Guanaco
BiLLa|100.00
99.33
99.96
99.88
99.48
99.91
99.57
99.43
89.60
99.69
91.70
99.98
91.68
81.13
99.33
100.00
99.30
99.23
99.20
99.27
98.93
98.76
89.02
99.14
91.10
99.32
91.15
80.76
99.96
99.30
100.00
99.84
99.45
99.88
99.53
99.40
89.57
99.66
91.67
99.98
91.66
81.09
99.88
99.23
99.84
100.00
99.38
99.80
99.46
99.31
89.49
99.58
91.60
99.86
91.57
81.03
99.48
99.20
99.45
99.38
100.00
99.41
99.08
98.92
89.16
99.25
91.25
99.47
91.30
80.93
99.91
99.27
99.88
99.80
99.41
100.00
99.49
99.35
89.52
99.63
91.62
99.89
91.60
81.09
99.57
98.93
99.53
99.46
99.08
99.49
100.00
99.05
89.21
99.27
91.30
99.55
91.32
80.79
99.43
98.76
99.40
99.31
98.92
99.35
99.05
100.00
89.08
99.12
91.17
99.42
91.27
80.70
89.60
89.02
89.57
89.49
89.16
89.52
89.21
89.08
100.00
89.34
97.58
89.58
82.81
73.11
99.69
99.14
99.66
99.58
99.25
99.63
99.27
99.12
89.34
100.00
91.43
99.67
91.37
80.94
91.70
91.10
91.67
91.60
91.25
91.62
91.30
91.17
97.58
91.43
100.00
91.68
84.33
74.73
99.98
99.32
99.98
99.86
99.47
99.89
99.55
99.42
89.58
99.67
91.68
100.00
91.67
81.11
91.68
91.15
91.66
91.57
91.30
91.60
91.32
91.27
82.81
91.37
84.33
91.67
100.00
75.62
81.13
80.76
81.09
81.03
80.93
81.09
80.79
80.70
73.11
80.94
74.73
81.11
75.62
100.00| + +Table 2: The cosine similarities of invariant terms between various pairs of LLaMA-7B and its offspring models. Abbreviations used include ”MAlpaca” for ”MedAlpaca,” ”AlpacaL” for ”AlpacaLora,” ”MiGPT” for ”MiniGPT-4,” ”Wizard” for ”WizardLM,” and ”CAlpaca” and ”CLLaMA” representing ”Chinese-Alpaca” and ”Chinese-LLaMA,” respectively. + +**==> picture [397 x 136] intentionally omitted <==** + +**----- Start of picture text -----**
+LLaMA MiniGPT-4 Alpaca MedAlpaca Vicuna WizardLM Baize
Alpaca Lora Chinese Alpaca Koala Chinese LLaMA Beaver Guanaco BiLLa
**----- End of picture text -----**
+ +Figure 5: Fingerprints of LLaMA-7B and its offspring models. + +in _**M** ∈_ R[4096] _[×]_[4096] _[×]_[6] for all models. The 6 base models are Falcon-40B, MPT-7B(Lin et al., 2022), LLaMA2-7B, Qwen-7B (Bai et al., 2023), Internlm-7B, and Baichuan-13B. Most of their offspring models went through an SFT process, except for LLaMA2-7B-32K(Together.ai, 2023), which also had a continued pretraining before SFT. Please refer to Appendix F for a detailed description of the subsequent training steps each model has undergone. Apart from the fingerprints (Figure 4) we also calculate, for each offspring model, its invariant terms’ cosine similarity (ICS) w.r.t. its base model. Remarkably, for all the offspring models, their fingerprints closely resemble those of their base models, and the ICS indicates the high similarity of their invariant terms w.r.t. their base models. On the other hand, LLMs based on different base models yield fingerprints that are highly different, covering diverse appearances and breeds of dogs. + +## 5.2 LLAMA AND ITS OFFSPRING MODELS + +To extensively validate how our proposed method is robust to various subsequent training processes, we choose the LLaMA-7B base model as a testbed, since it is a widely used model with the largest family of offspring models. We collect 10 offspring models introduced in Section 3.1.1. Plus Beaver which underwent RLHF(Dai et al., 2023), Guanaco(Dettmers et al., 2023) SFT on the multilingual dataset, and BiLLa(Li, 2023) continued pretraining on a new language. They are subject to various training paradigms, and we refer the readers to Appendix C for detailed descriptions. Among these offspring models, We want to draw attention to the Chinese-LLaMA and Chinese-Alpaca models, both of which have an extended vocabulary and have been continued pretrained for 20GB of text in a new language, with the latter trained with several millions of additional SFT samples. Following the settings in Section 5.1, the invariant terms again use the last 2 layers’ parameters. + +Despite all these complex subsequent training steps, all the models yield highly relevant invariant terms (Table 2). We extensively compute the cosine similarity of the invariant terms (ICS) between + +8 + +**==> picture [396 x 315] intentionally omitted <==** + +**----- Start of picture text -----**
+LLaMA-7B Qwen-7B LLaMA2-7B RedPajama-7B ChatGLM-6B Bloom-7B
ChatGLM2-6B Pythia-7B InternLM-7B OpenLLaMA-7B OPT-6.7B Baichuan-7B
GPT2-Large Cerebras-GPT-1.3B GPT-Neo-2.7B Pythia-12B LLaMA-13B GPT-NeoX-20B
OPT-30B LLaMA-30B LLaMA-65B Galactica-30B Galactica-120B Falcon-180B
**----- End of picture text -----**
+ +Figure 6: Fingerprints of 24 independently trained LLMs. + +every pair of models and found that they are still highly similar, with the lowest ICS being 73 _._ 11. For our trained fingerprinting model, they are aligned to a similar fingerprint image of a German Shepherd, with similar poses, coat patterns, expressions, and backgrounds (Figure 5). + +## 5.3 A WIDER COLLECTION OF INDEPENDENTLY TRAINED LLMS + +We collect a total of 24 open-sourced LLMs with their sizes ranging from 774M (GPT2-Large) to 180B (Falcon-180B). Please refer to Appendix H for a detailed list and description of these models. We generate their fingerprints, as shown in Figure 6. The similarities between different models were notably low, further confirming the validity of our proposed method and model. Due to space limit, the ICSs between the 24 models are shown in Appendix I. We find that the ICS might accidentally become high between models with different sizes. However, as it is not possible to inherit a model’s parameters into a different-sized model, these accidentally high ICSs don’t affect the effectiveness of our method. + +## 6 CONCLUSION + +In this paper, we introduce a novel approach that uses model parameters to yield a fingerprint for LLMs. This approach could provide a human-readable identity for LLM without exposing its parameters or interfering with its training process. Different from the well-studied black-box or white-box settings, our method lies in the middle of both. Although generating the invariant terms needs access to the model parameters, which has to be done by the LLM owners and might need regulations to prevent fake terms, all the subsequent steps could be done by the public, without requiring a special third-party institution. Moreover, as only the invariant terms and fingerprint images are published, no model weights need to be exposed outside of its owner, neither to the public nor the other LLM owners, during the whole process. + +9 + +## 7 ETHICS STATEMENT + +This study primarily focuses on LLM protection, an area crucial for safeguarding intellectual property and preventing misuse. The collection and use of data in our research comply with all relevant privacy and data protection regulations. We do not engage in any data practices that compromise the privacy or rights of individuals. + +## 8 REPRODUCIBILITY STATEMENT + +We have provided detailed methodologies for our approach throughout this paper. For enhanced clarity, we have included an illustrative framework for LLM protection with fingerprints in Appendix B to help readers better grasp our intuition. Our methods are thoroughly described in Section 3, and we provide a comprehensive account of our model in Section 4. In addition, we have included information about the various LLMs we used in Appendix. These details will make it more feasible for other researchers to replicate our work and validate our findings. + +## REFERENCES + +- Yossi Adi, Carsten Baum, Moustapha Cisse, Benny Pinkas, and Joseph Keshet. Turning your weakness into a strength: Watermarking deep neural networks by backdooring. In _27th USENIX Security Symposium (USENIX Security 18)_ , pp. 1615–1631, 2018. + +- Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, et al. Qwen technical report. _arXiv preprint arXiv:2309.16609_ , 2023. + +- Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. _arXiv preprint arXiv:2204.05862_ , 2022. + +BaiChuan-Inc. [URL removed] 2023. + +- 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. + +- Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. Piqa: Reasoning about physical commonsense in natural language. In _Proceedings of the AAAI conference on artificial intelligence_ , pp. 7432–7439, 2020. + +- Sidney Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, et al. Gpt-neox-20b: An open-source autoregressive language model. In _Proceedings of BigScience Episode# 5–Workshop on Challenges & Perspectives in Creating Large Language Models_ , pp. 95–136, 2022. + +- Franziska Boenisch. A systematic review on model watermarking for neural networks. _Frontiers in big Data_ , 4:729663, 2021. + +- 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. + +- Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. Stargan v2: Diverse image synthesis for multiple domains. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 8188–8197, 2020. + +- 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. _arXiv preprint arXiv:2204.02311_ , 2022. + +10 + +Miranda Christ, Sam Gunn, and Or Zamir. Undetectable watermarks for language models. _arXiv preprint arXiv:2306.09194_ , 2023. + +- Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. _arXiv preprint arXiv:1905.10044_ , 2019. + +- Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. _arXiv preprint arXiv:1803.05457_ , 2018. + +- Together Computer. Redpajama: An open source recipe to reproduce llama training dataset, 2023. URL [URL removed] + +- Mike Conover, Matt Hayes, Ankit Mathur, Jianwei Xie, Jun Wan, Sam Shah, Ali Ghodsi, Patrick Wendell, Matei Zaharia, and Reynold Xin. Free dolly: Introducing the world’s first truly open instruction-tuned llm, 2023. URL [URL removed] 12/dolly-first-open-commercially-viable-instruction-tuned-llm. + +- Yiming Cui, Ziqing Yang, and Xin Yao. Efficient and effective text encoding for chinese llama and alpaca. _arXiv preprint arXiv:2304.08177_ , 2023. + +- Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji, Xinbo Xu, Mickel Liu, Yizhou Wang, and Yaodong Yang. Safe rlhf: Safe reinforcement learning from human feedback. _arXiv preprint arXiv:2310.12773_ , 2023. + +- Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. _arXiv preprint arXiv:2305.14314_ , 2023. + +- Nolan Dey, Gurpreet Gosal, Hemant Khachane, William Marshall, Ribhu Pathria, Marvin Tom, Joel Hestness, et al. Cerebras-gpt: Open compute-optimal language models trained on the cerebras wafer-scale cluster. _arXiv preprint arXiv:2304.03208_ , 2023. + +- Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. Glm: General language model pretraining with autoregressive blank infilling. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 320–335, 2022. + +- Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, et al. The pile: An 800gb dataset of diverse text for language modeling. _arXiv preprint arXiv:2101.00027_ , 2020. + +- Xinyang Geng. Easylm: A simple and scalable training framework for large language models, 2023. URL [URL removed] + +- Xinyang Geng and Hao Liu. Openllama: An open reproduction of llama, May 2023. URL https: //[URL removed] + +OpenAI GPT-4. Gpt-4 technical report. _ArXiv_ , abs/2303.08774, 2023. + +Chenxi Gu, Chengsong Huang, Xiaoqing Zheng, Kai-Wei Chang, and Cho-Jui Hsieh. Watermarking pre-trained language models with backdooring. _arXiv preprint arXiv:2210.07543_ , 2022. + +- Tianyu Han, Lisa C Adams, Jens-Michalis Papaioannou, Paul Grundmann, Tom Oberhauser, Alexander L¨oser, Daniel Truhn, and Keno K Bressem. Medalpaca–an open-source collection of medical conversational ai models and training data. _arXiv preprint arXiv:2304.08247_ , 2023. + +- Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. In _International Conference on Learning Representations_ , 2020. + +- 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. + +11 + +- Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 4401–4410, 2019. + +- Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 8110–8119, 2020. + +- John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers, and Tom Goldstein. A watermark for large language models. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _Proceedings of the 40th International Conference on Machine Learning_ , volume 202 of _Proceedings of Machine Learning Research_ , pp. 17061–17084. PMLR, 23–29 Jul 2023. URL [URL removed] press/v202/kirchenbauer23a.html. + +- Andreas K¨opf, Yannic Kilcher, Dimitri von R¨utte, Sotiris Anagnostidis, Zhi-Rui Tam, Keith Stevens, Abdullah Barhoum, Nguyen Minh Duc, Oliver Stanley, Rich´ard Nagyfi, et al. Openassistant conversations–democratizing large language model alignment. _arXiv preprint arXiv:2304.07327_ , 2023. + +- Kalpesh Krishna, Yixiao Song, Marzena Karpinska, John Wieting, and Mohit Iyyer. Paraphrasing evades detectors of ai-generated text, but retrieval is an effective defense. _arXiv preprint arXiv:2303.13408_ , 2023. + +- Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pp. 785–794, 2017. + +- Linyang Li, Pengyu Wang, Ke Ren, Tianxiang Sun, and Xipeng Qiu. Origin tracing and detecting of llms. _arXiv preprint arXiv:2304.14072_ , 2023. + +- Zhongli Li. Billa: A bilingual llama with enhanced reasoning ability. [URL removed] Neutralzz/BiLLa, 2023. + +- Kevin Lin, Chung-Ching Lin, Lin Liang, Zicheng Liu, and Lijuan Wang. Mpt: Mesh pre-training with transformers for human pose and mesh reconstruction. _arXiv preprint arXiv:2211.13357_ , 2022. + +- Eric Mitchell, Yoonho Lee, Alexander Khazatsky, Christopher D. Manning, and Chelsea Finn. Detectgpt: Zero-shot machine-generated text detection using probability curvature. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA_ , volume 202 of _Proceedings of Machine Learning Research_ , pp. 24950–24962. PMLR, 2023. URL [URL removed] v202/mitchell23a.html. + +OpenAI. Introducing chatgpt. 2022. URL [URL removed] + +OpenAI. Ai classifier. 2023. URL [URL removed] + +- Guilherme Penedo, Quentin Malartic, Daniel Hesslow, Ruxandra Cojocaru, Alessandro Cappelli, Hamza Alobeidli, Baptiste Pannier, Ebtesam Almazrouei, and Julien Launay. The RefinedWeb dataset for Falcon LLM: outperforming curated corpora with web data, and web data only. _arXiv preprint arXiv:2306.01116_ , 2023. URL [URL removed] + +- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. _OpenAI blog_ , 1(8):9, 2019. + +- Vinu Sankar Sadasivan, Aounon Kumar, Sriram Balasubramanian, Wenxiao Wang, and Soheil Feizi. Can ai-generated text be reliably detected? _arXiv preprint arXiv:2303.11156_ , 2023. + +- Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adversarial winograd schema challenge at scale. _Communications of the ACM_ , 64(9):99–106, 2021. + +12 + +Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Stanford alpaca: An instruction-following llama model. [URL removed] 2023. + +- Ross Taylor, Marcin Kardas, Guillem Cucurull, Thomas Scialom, Anthony Hartshorn, Elvis Saravia, Andrew Poulton, Viktor Kerkez, and Robert Stojnic. Galactica: A large language model for science. _arXiv preprint arXiv:2211.09085_ , 2022. + +InternLM Team. Internlm: A multilingual language model with progressively enhanced capabilities. [URL removed] 2023. + +Edward Tian. Gptzero: An ai text detector. 2023. URL [URL removed] + +Together.ai. Llama-2-32k, 2023. URL [URL removed] LLaMA-2-7B-32K. + +- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth´ee Lacroix, Baptiste Rozi`ere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. _arXiv preprint arXiv:2302.13971_ , 2023a. + +- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. _arXiv preprint arXiv:2307.09288_ , 2023b. + +- Yusuke Uchida, Yuki Nagai, Shigeyuki Sakazawa, and Shin'ichi Satoh. Embedding watermarks into deep neural networks. In _Proceedings of the 2017 ACM on International Conference on Multimedia Retrieval_ . ACM, jun 2017. doi: 10.1145/3078971.3078974. URL [URL removed] org/10.1145%2F3078971.3078974. + +Eric J. Wang. [URL removed] 2023. + +Jiangfeng Wang, Hanzhou Wu, Xinpeng Zhang, and Yuwei Yao. Watermarking in deep neural networks via error back-propagation. _Electronic Imaging_ , 2020(4):22–1, 2020. + +- Tianhao Wang and Florian Kerschbaum. Attacks on digital watermarks for deep neural networks. In _ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 2622–2626. IEEE, 2019. + +- BigScience Workshop, Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ili´c, Daniel Hesslow, Roman Castagn´e, Alexandra Sasha Luccioni, Franc¸ois Yvon, et al. Bloom: A 176b-parameter open-access multilingual language model. _arXiv preprint arXiv:2211.05100_ , 2022. + +- Kangxi Wu, Liang Pang, Huawei Shen, Xueqi Cheng, and Tat-Seng Chua. Llmdet: A large language models detection tool. _arXiv preprint arXiv:2305.15004_ , 2023a. + +- Shijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhanjan Kambadur, David Rosenberg, and Gideon Mann. Bloomberggpt: A large language model for finance. _arXiv preprint arXiv:2303.17564_ , 2023b. + +- Tao Xiang, Chunlong Xie, Shangwei Guo, Jiwei Li, and Tianwei Zhang. Protecting your nlg models with semantic and robust watermarks. _arXiv preprint arXiv:2112.05428_ , 2021. + +- Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. Wizardlm: Empowering large language models to follow complex instructions. _arXiv preprint arXiv:2304.12244_ , 2023a. + +- Canwen Xu, Daya Guo, Nan Duan, and Julian McAuley. Baize: An open-source chat model with parameter-efficient tuning on self-chat data. _arXiv preprint arXiv:2304.01196_ , 2023b. + +- Mohammad Mehdi Yadollahi, Farzaneh Shoeleh, Sajjad Dadkhah, and Ali A Ghorbani. Robust black-box watermarking for deep neural network using inverse document frequency. In _2021 IEEE Intl Conf on Dependable, Autonomic and Secure Computing, Intl Conf on Pervasive Intelligence and Computing, Intl Conf on Cloud and Big Data Computing, Intl Conf on Cyber Science and Technology Congress (DASC/PiCom/CBDCom/CyberSciTech)_ , pp. 574–581. IEEE, 2021. + +13 + +Jianxin Yang. Firefly. [URL removed] 2023. + +Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 4791–4800, 2019. + +- Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 586–595, 2018. + +- Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. Opt: Open pre-trained transformer language models. _arXiv preprint arXiv:2205.01068_ , 2022. + +Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. _arXiv preprint arXiv:2306.05685_ , 2023a. + +- Qinkai Zheng, Xiao Xia, Xu Zou, Yuxiao Dong, Shan Wang, Yufei Xue, Zihan Wang, Lei Shen, Andi Wang, Yang Li, Teng Su, Zhilin Yang, and Jie Tang. Codegeex: A pre-trained model for code generation with multilingual evaluations on humaneval-x. In _KDD_ , 2023b. + +- Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models. _arXiv preprint arXiv:2304.10592_ , 2023. + +APPENDICES + +## A IMPLEMENTATION DETAILS + +## A.1 DATA SYNTHESIS + +As illustrated in Figure 3, we dynamically obtain anchor, positive, and negative data on the fly by sampling matrices from a normal distribution and multiplying them following the format of the invariant terms. Following is the detailed process. + +For the anchor data _**M**_ : Sample matrices _**P**_ 1 _,_ _**P**_ 2 _,_ _**P**_ 3 from a standard normal distribution. Consider _**P**_ 1 as _**X**_[ˆ] , and _**P**_ 2 _,_ _**P**_ 3 as model parameter matrices, + +**==> picture [236 x 12] intentionally omitted <==** + +For positive data _**M**_[+] : Independently sample noises _ϵi_ from a normal distribution _N_ (0 _, α_ ), + +**==> picture [285 x 12] intentionally omitted <==** + +For negative data _**M**[−]_ : Independently sample matrices _**N**_ 1 _,_ _**N**_ 2 _,_ _**N**_ 3 from a standard normal distribution, + +**==> picture [244 x 12] intentionally omitted <==** + +## A.2 TRAINING SETTINGS + +In the training stage, we alternate training the discriminator and CNN encoder every 10 steps. We set the batch size to 10, the initial learning rate to 0.0001, and introduce a noise intensity _α_ of 0.16 for positive samples. After 8 epochs of training, we obtained the CNN encoder used in our paper. + +## A.3 MODEL ARCHITECTURE + +For the CNN encoder: The CNN encoder takes invariant terms _**M** ∈_ R[4096] _[×]_[4096] _[×]_[6] as input and produces a feature vector _**v**_ as output. Our CNN encoder structure, as depicted in Figure 3, consists of the first four convolutional layers and the last mean pooling layer. The mean pooling layer simply calculates the average of the feature maps obtained from each channel, resulting in a feature vector + +14 + +|CNN Layers|Input Channel|Output Channel|Kernel Size|Stride|Padding| +|---|---|---|---|---|---| +|Layer 1|6|8|48|4|22| +|Layer 2|8|64|48|4|22| +|Layer 3|64|256|48|4|22| +|Layer 4|256|512|48|4|22| + +Table 3: Detailed hyperparameters of the stacked four convolutional layers. + +_**v**_ with a length equal to the number of channels. The hyperparameters for the four convolutional layers are provided in the table below: + +For the discriminator: We utilize a simple 3-layer MLP as the discriminator. The 512-dimensional feature vector _**v**_ from the CNN encoder serves as fake data, while a 512-dimensional vector _**x**_ sampled from the standard normal distribution serves as real data. The discriminator processes _**v**_ and _**x**_ , progressively reducing dimensionality through three linear layers, and finally outputs the probability of a sample being real after applying a sigmoid activation function. The sizes of the three linear layers are _W_ 1 _∈_ R[512] _[×]_[256] , _W_ 2 _∈_ R[256] _[×]_[128] , and _W_ 3 _∈_ R[128] _[×]_[1] , respectively. + +For the image generator: The pre-trained StyleGAN2 checkpoint we used can be found at: + +[URL removed] pretrained/afhqdog.pkl + +## B AN ILLUSTRATIVE FRAMEWORK FOR LLM PROTECTION WITH FINGERPRINTS + +An example framework is depicted in Figure 7. + +**==> picture [397 x 94] intentionally omitted <==** + +**----- Start of picture text -----**
+Falcon LLaMA Baichuan Alpaca InternLM LLMs
Manufacturers
Invariant terms Invariant terms Invariant terms Invariant terms Invariant terms
FPM FPM FPM FPM FPM LLaMA’s and Alpaca’s
fingerprints are identical,
they must base on same
model !
Public
**----- End of picture text -----**
+ +Figure 7: An illustrative framework for LLM protection with fingerprints. The LLM manufacturers compute the invariant terms internally, feed them to the public fingerprinting model (FPM) to generate a fingerprint image, and release both to the public. This allows the public to detect shared base models merely from the fingerprint image. Although manufacturers can attempt adjustments on their LLM adversarial to the public FPM to make the fingerprint appear differently, the mere use of random matrices in training the FPM enables the public to train new FPMs whenever necessary, preventing such interference. Importantly, manufacturers only disclose the invariant terms and fingerprint images, without revealing model parameters or affecting LLM training. + +## C DETAILED DESCRIPTION OF THE LLAMA FAMILY OF MODELS + +In Table 1, we calculate the cosine similarities of model parameters between various LLMs w.r.t. the LLaMA-7B base model. Among these models, Alpaca , Vicuna , Baize , Koala , and WizardLM underwent supervised fine-tuning (SFT) on general datasets of varying sizes and complexity using the LLaMA-7B base model. MedAlpaca performed SFT on medical datasets, while Alpaca-Lora employed the same instruction dataset as Alpaca but used the Lora training method. Beaver, based on the Alpaca model, utilized RLHF alignment technology. MiniGPT-4 is a multimodal model that underwent SFT on 5 million aligned image-text pairs. Chinese-Alpaca and Chinese-LLaMA + +15 + +|**Model**|BoolQ|HellaSwag|PIQA|WinoGrande|ARC-e|ARC-c|RACE|MMLU|Avg.| +|---|---|---|---|---|---|---|---|---|---| +|LLaMA|75.11|76.19|79.16|70.00|72.90|44.80|40.00|32.75|61.36| +|Alpaca|77.49|75.64|77.86|67.80|70.66|46.58|43.16|41.13|62.54| +|+_LA_(epoch1)|45.44|31.16|67.63|48.70|49.03|34.13|22.78|23.13|40.25| +|+_LA_(epoch2)|42.23|26.09|49.78|47.43|26.43|28.92|22.97|23.22|33.38| +|+_LA_(epoch3)|39.05|26.40|49.95|48.30|26.52|28.75|22.97|23.98|33.24| +|+_LA_(epoch4)|41.62|26.15|50.11|49.33|26.56|28.50|22.78|23.12|33.52| +|+_LA_(epoch5)|38.56|26.13|50.11|50.20|26.22|29.10|22.39|27.02|33.72| + +Table 4: Zero-shot performance on multiple standard benchmarks. + +expanded the Chinese vocabulary based on the original LLaMA model, continuing pretraining with 20GB of text data, with Chinese Alpaca further incorporating 2M to 4.3M additional samples during SFT. Additionally, Baichuan , OpenLLaMA, InternLM , and LLaMA2 have identical architectures to LLaMA-7B but were trained from scratch by different organizations or using different training methods. We can observe that despite various and extensive subsequent training processes, as long as the LLM inherits the LLaMA-7B base model, it still exhibits very high cosine similarity w.r.t. its base model. On the other hand, the LLMs trained from scratch independently exhibit low cosine similarities w.r.t. the LLaMA-7B base model. + +## D STYLEGAN2 GENERATOR + +StyleGAN2 is an improved model based on the style-based GAN architecture. One of its key enhancements is the incorporation of the perceptual path length (PPL) metric, which was originally introduced to quantify the smoothness of the mapping from the latent space to the output image. The PPL metric measures the average LPIPS distances(Zhang et al., 2018) between generated images under small perturbations in the latent space. Through the utilization of path length regularization, StyleGAN2 achieves enhanced reliability, consistency, and robustness, resulting in a smoother behavior of the generator. This regularization technique aligns with our objective of obtaining a smooth generator. + +## E DETAIL PERFORMANCE + +Please refer to Table 4 for a detailed breakdown of performances on each task. + +Falcon-40B-Instruct: Fine-tuned based on Falcon-40B with data from Baize. + +Falcon-40B-SFT-Top1-560: Fine-tuned using top-1 quality demonstrations from the OASST dataset(K¨opf et al., 2023). + +MPT-7B-Instruct: Fine-tuned on data derived from Databricks Dolly-15k(Conover et al., 2023) and the Anthropic Helpful and Harmless (HH-RLHF) datasets(Bai et al., 2022). + +MPT-7B-StoryWriter: Optimized for reading and writing fictional stories, fine-tuned with a context length of 65k tokens. + +LLaMA2-7B-Chat: Tailored for dialogue applications. + +LLaMA-2-7B-32K: Trained through a two-phase process involving continued pretraining on diverse data mixtures and fine-tuning to enhance its long-context and few-shot capacity. + +Qwen-7B-Chat: A large AI assistant model trained with alignment techniques. + +Firefly-Qwen-7B: Fine-tuned version of Qwen-7B by the Firefly project(Yang, 2023). + +Baichuan-13B-Chat: Fine-tuned and alignment-enhanced Chat version of Baichuan-13B-Base, using various instruction-following datasets. + +16 + +Baichuan-13B-SFT: A bilingual instruction-tuned LoRA model of Baichuan-13B-Base, fine-tuned with instruction-following datasets. + +InternLM-7B-Chat: Optimized for dialogue use cases. + +Firefly-InternLM: Fine-tuned version of InternLM-7B-Chat by the Firefly project. + +## G GPT-NEOX MODELS WITH DIFFERENT GLOBAL SEEDS + +To further verify the substantial variability in the distribution of model parameters during training from scratch, we conducted an experiment involving four GPT-NeoX-350M(Black et al., 2022) models trained on a subset of the Pile dataset (Gao et al., 2020). These models were trained using different global number seeds while sharing the same architecture, dataset, computational resources, and hyperparameters. + +Subsequently, we computed the cosine similarities between these GPT-NeoX models, as shown in Table 2. Additionally, we employed the HuRef model to generate fingerprints for these models, depicted in Figure 8. The results revealed a noteworthy pattern: when GPT-NeoX models are trained from scratch, even minor changes to the global seed lead to cosine similarities approaching zero. Correspondingly, their fingerprints exhibited clear distinctions from each other. + +|ICS|Seed=1|Seed=2|Seed=3|Seed=4||||| +|---|---|---|---|---|---|---|---|---| +|Seed=1|100.00|14.12|6.13|5.72||||| +|Seed=2|14.12|100.00|6.52|5.97||||| +|Seed=3|6.13|6.52|100.00|12.71||||| +|Seed=4|5.72|5.97|12.71|100.00|Seed1|Seed2|Seed3|Seed4| + +Table 5: ICS values between GPT-NeoX models with different global seeds + +Figure 8: Fingerprints of GPT-NeoX models trained with varying global seeds + +## H OPEN-SOURCED LLMS + +In these experiments, we aimed to gather diverse models covering various parameter sizes. For the widely used LLaMA models, we included LLaMA-7B, LLaMA-13B, LLaMA-65B, and LLaMA27B. We also incorporated models with similar architectures to LLaMA, such as InternLM-7B, OpenLLaMA-7B, and Baichuan-7B. To encompass a broader range of parameters, we expanded our collection to include GPT2-Large(Radford et al., 2019), Cerebras-GPT-1.3B(Dey et al., 2023), GPT-Neo-2.7B, and even the largest Falcon-180B. Additionally, we considered models like Qwen7B, RedPajama-7B(Computer, 2023), ChatGLM-6B(Du et al., 2022), Bloom-7.1B(Workshop et al., 2022), ChatGLM2-6B,Pythia-6.9B and 12B(Biderman et al., 2023), OPT-6.7B and 30B, and GPTNeoX-20B(Black et al., 2022), among other commonly used LLMs. In total, we gathered a representative set of 24 open-sourced LLMs. + +## I ICS OF LLMS WITH DIFFERENT PARAMETER SIZES + +17 + +|ICS|LLaMA Qwen LLaMA2 RedP CGLM Bloom CGLM2 Pythia InternLM OpenLA OPT Baichuan| +|---|---| +||| +|LLaMA
Qwen
LLaMA2
RedP
CGLM
Bloom
CGLM2
Pythia
InternLM
OpenLA
OPT
Baichuan|100.00
1.72
10.71
-0.08
-0.12
-0.31
0.10
-0.13
1.05
2.11
-20.90
2.76
1.72
100.00
1.44
-0.02
0.00
-0.18
0.11
0.00
0.81
0.59
-2.35
0.80
10.71
1.44
100.00
-0.33
0.05
-0.31
0.03
-0.20
0.46
2.39
-21.64
2.79
-0.08
-0.02
-0.33
100.00 -19.11
6.91
4.20
6.18
-0.10
-0.02
7.98
-0.06
-0.12
0.00
0.05
-19.11 100.00 2.16
-5.30
-3.34
-0.02
0.02
-15.82
0.02
-0.31
-0.18
-0.31
6.91
2.16 100.00
2.34
2.15
-0.08
-0.01
2.70
-0.12
0.10
0.11
0.03
4.20
-5.30
2.34
100.00
1.86
0.44
0.10
1.20
0.06
-0.13
0.00
-0.20
6.18
-3.34
2.15
1.86
100.00
-0.02
-0.04
1.97
-0.07
1.05
0.81
0.46
-0.10
-0.02
-0.08
0.44
-0.02
100.00
0.77
-7.24
0.49
2.11
0.59
2.39
-0.02
0.02
-0.01
0.10
-0.04
0.77
100.00
-5.72
0.88
-20.90
-2.35
-21.64
7.98
-15.82
2.70
1.20
1.97
-7.24
-5.72
100.00
-7.22
2.76
0.80
2.79
-0.06
0.02
-0.12
0.06
-0.07
0.49
0.88
-7.22
100.00| + +Table 6: The cosine similarities of invariant terms(ICS) between different base LLMs. Abbreviations used include ”RedP” for ”RedPajama,” ”OpenLA” for ”OpenLLaMA,” ”CGLM” and ”CGLM2” representing ”ChatGLM” and ”ChatGLM2,” respectively. Additionally, except for the ChatGLM and ChatGLM2, all other models have a parameter size of approximately 7B. + +|ICS|Pythia-12B
LLaMA-13B| +|---|---| +||| +|Pythia-12B
LLaMA-13B|100.00
0.03
0.03
100.00| + +Table 7: ICS between similar size LLMs:Pythia-12B and LLaMA-13B. + +|ICS|OPT-30B
LLaMA-30B
Galactica-30B
GPT-NeoX-20B| +|---|---| +||| +|OPT-30B
LLaMA-30B
Galactica-30B
GPT-NeoX-20B|100.00
-4.23
-32.70
2.76
-4.23
100.00
-0.40
-0.02
-32.70
-0.40
100.00
-4.27
2.76
-0.02
-4.27
100.00| + +Table 8: ICS between LLMs with their sizes ranging from 20B to 30B:GPT-NeoX-20B, OPT-30B, LLaMA-30B and Galactica-30B. + +|ICS|Falcon-180B
LLaMA-65B
Galactica-120B| +|---|---| +||| +|Falcon-180B
LLaMA-65B
Galactica-120B|100.00
0.02
20.99
0.02
100.00
-0.10
20.99
-0.10
100.00| + +Table 9: ICS between LLMs with their sizes not less than 65B: LLaMA-65B, Galactica-120B and Falcon-180B. + +18 + +||GPT2
100.00
32.59
-14.72
79.10
-4.01
27.34
-1.79
-9.34
-0.93
-9.90
-12.16
5.85
-3.13
-2.49
-3.05
-1.51
-3.53
-4.10
-10.13
-4.83
66.45
-3.26
-71.75
-9.96
CGPT1.3
32.59
100.00
77.73
4.13
3.97
43.78
5.00
-7.34
-0.79
-8.49
24.50
18.50
-2.51
-2.01
-2.55
4.63
-2.72
1.07
46.75
-3.46
2.20
-2.42
-35.80 -47.46
Neo2.7
-14.72
77.73 100.00
-31.70
6.04
12.73
6.01
3.10
0.70
2.44
31.83
17.55
-1.35
0.46
0.95
5.72
0.92
3.07
41.93
1.14
-28.56
2.11
-6.54 -47.12
Chatglm
79.10
4.13
-31.70 100.00
-5.30
-15.82
-3.34
-0.12
0.00
0.05
-19.11
2.16
-0.02
0.02
0.02
-2.66
0.18
-5.10
-38.77
-0.02
77.23
-0.05
-77.36
-1.38
Chatglm2
-4.01
3.97
6.04
-5.30
100.00
1.20
1.86
0.10
0.11
0.03
4.20
2.34
0.44
0.10
0.06
1.80
0.10
1.30
3.79
-0.17
-4.62
-0.15
2.64
-2.75
OPT6.7
27.34
43.78
12.73
-15.82
1.20
100.00
1.97 -20.90
-2.35 -21.64
7.98
2.70
-7.24
-5.72
-7.22
1.08
-7.25
1.16
54.00
-8.96
-12.71
-7.06
9.21
-7.63
Pythia6.9
-1.79
5.00
6.01
-3.34
1.86
1.97
100.00
-0.13
0.00
-0.20
6.18
2.15
-0.02
-0.04
-0.07
3.32
-0.04
1.88
3.79
-0.12
-2.99
-0.08
0.77
-3.15
LM7
-9.34
-7.34
3.10
-0.12
0.10
-20.90
-0.13 100.00
1.72
10.71
-0.08
-0.31
1.05
2.11
2.76
0.06
2.80
-0.02
-7.46
2.72
-0.40
2.91
-0.22
0.11
Qwen
-0.93
-0.79
0.70
0.00
0.11
-2.35
0.00
1.72 100.00
1.44
-0.02
-0.18
0.81
0.59
0.80
0.03
1.03
-0.01
-0.77
-0.64
-0.01
0.31
-0.06
0.01
LM27
-9.90
-8.49
2.44
0.05
0.03
-21.64
-0.20
10.71
1.44 100.00
-0.33
-0.31
0.46
2.39
2.79
-0.01
2.68
-0.05
-8.48
4.46
-0.32
3.57
-0.01
0.63
RedPaj
-12.16
24.50
31.83
-19.11
4.20
7.98
6.18
-0.08
-0.02
-0.33 100.00
6.91
-0.10
-0.02
-0.06
5.60
-0.06
3.65
18.21
0.09
-16.58
0.01
5.51 -15.12
Bloom
5.85
18.50
17.55
2.16
2.34
2.70
2.15
-0.31
-0.18
-0.31
6.91 100.00
-0.08
-0.01
-0.12
2.12
-0.24
0.98
6.39
0.61
1.86
0.02
-9.84 -11.48
Internlm
-3.13
-2.51
-1.35
-0.02
0.44
-7.24
-0.02
1.05
0.81
0.46
-0.10
-0.08
100.00
0.77
0.49
0.04
0.78
0.00
-2.46
-1.46
0.09
-1.07
-0.05
0.02
OLM
-2.49
-2.01
0.46
0.02
0.10
-5.72
-0.04
2.11
0.59
2.39
-0.02
-0.01
0.77 100.00
0.88
0.02
0.88
-0.00
-2.07
0.97
-0.05
0.71
-0.09
0.02
Baichuan
-3.05
-2.55
0.95
0.02
0.06
-7.22
-0.07
2.76
0.80
2.79
-0.06
-0.12
0.49
0.88
100.00
0.02
1.06
-0.02
-2.45
0.96
-0.07
1.01
-0.11
0.07
Pythia12
-1.51
4.63
5.72
-2.66
1.80
1.08
3.32
0.06
0.03
-0.01
5.60
2.12
0.04
0.02
0.02
100.00
0.03
1.82
3.03
-0.00
-2.50
0.01
0.31
-3.10
LM13
-3.53
-2.72
0.92
0.18
0.10
-7.25
-0.04
2.80
1.03
2.68
-0.06
-0.24
0.78
0.88
1.06
0.03 100.00
-0.02
-3.22
0.68
0.07
1.51
-0.25
0.07
Neox20
-4.10
1.07
3.07
-5.10
1.30
1.16
1.88
-0.02
-0.01
-0.05
3.65
0.98
0.00
-0.00
-0.02
1.82
-0.02
100.00
2.76
-0.02
-4.27
-0.02
3.54
-0.84
OPT30
-10.13
46.75
41.93
-38.77
3.79
54.00
3.79
-7.46
-0.77
-8.48
18.21
6.39
-2.46
-2.07
-2.45
3.03
-3.22
2.76 100.00
-4.23
-32.70
-2.82
20.12 -18.06
LM30
-4.83
-3.46
1.14
-0.02
-0.17
-8.96
-0.12
2.72
-0.64
4.46
0.09
0.61
-1.46
0.97
0.96
-0.00
0.68
-0.02
-4.23 100.00
-0.40
4.53
-0.07
0.06
Gala30
66.45
2.20
-28.56
77.23
-4.62
-12.71
-2.99
-0.40
-0.01
-0.32
-16.58
1.86
0.09
-0.05
-0.07
-2.50
0.07
-4.27
-32.70
-0.40 100.00
-0.27
-79.95
-0.23
LM65
-3.26
-2.42
2.11
-0.05
-0.15
-7.06
-0.08
2.91
0.31
3.57
0.01
0.02
-1.07
0.71
1.01
0.01
1.51
-0.02
-2.82
4.53
-0.27 100.00
-0.10
0.02
Gala120
-71.75
-35.80
-6.54
-77.36
2.64
9.21
0.77
-0.22
-0.06
-0.01
5.51
-9.84
-0.05
-0.09
-0.11
0.31
-0.25
3.54
20.12
-0.07
-79.95
-0.10
100.00
20.99
Fal180
-9.96
-47.46
-47.12
-1.38
-2.75
-7.63
-3.15
0.11
0.01
0.63
-15.12 -11.48
0.02
0.02
0.07
-3.10
0.07
-0.84
-18.06
0.06
-0.23
0.02
20.99 100.00
Table 10: ICS between 24 open-sourced LLMs with sizes ranging from 774M to 180B.Abbreviations used include ”GPT2” for ”GPT2-Large,” ”CGPT1.3” for”Cerebras-GPT-1.3B,” ”Neo2.7” for ”GPT-Neo-2.7B,” ”CGLM” for
”ChatGLM-6B,” ”CGLM2” for ”ChatGLM-6B2,” ”OPT6.7” for ”OPT-6.7B,” ”Pythia6.9” for ”Pythia-6.9B,” ”LM7” for ”LLaMA-7B,” ”Qwen” for ”Qwen-7B,” ”LM27” for ”LLaMA2-7B2,” ”RedPaj” for ”RedPajama-7B,” ”Bloom”
for ”Bloom-7B,” ”Internlm” for ”InternLM-7B,””OLM” for ”OpenLLaMA-7B,” ”Baichuan” for ”Baichuan-7B,” ”Pythia12” for ”Pythia-12B,” ”LM13” for ”LLaMA-13B,” ”Neox20” for ”GPT-NeoX-20B,” ”OPT30” for ”OPT-
30B,””LM30” for ”LLaMA-30B,” ”Gala30” for ”Galactica-30B,” ”LM65” for ”LLaMA-65B,” ”Gala120” for ”Galactica-120B,” and ”Fal180” for ”Falcon-180B” respectively.From left to right LLMs are sorted by parameter size from
smallest to largest.| +|---|---| +|GPT2 CGPT1.3 Neo2.7 CGLM CGLM2 OPT6.7 Pythia6.9
LM7
Qwen
LM27 RedPaj Bloom Internlm
OLM Baichuan Pythia12
LM13 Neox20 OPT30
LM30 Gala30
LM65 Gala120 Fal180|100.00
32.59
-14.72
79.10
-4.01
27.34
-1.79
-9.34
-0.93
-9.90
-12.16
5.85
-3.13
-2.49
-3.05
-1.51
-3.53
-4.10
-10.13
-4.83
66.45
-3.26
-71.75
-9.96
32.59
100.00
77.73
4.13
3.97
43.78
5.00
-7.34
-0.79
-8.49
24.50
18.50
-2.51
-2.01
-2.55
4.63
-2.72
1.07
46.75
-3.46
2.20
-2.42
-35.80 -47.46
-14.72
77.73 100.00
-31.70
6.04
12.73
6.01
3.10
0.70
2.44
31.83
17.55
-1.35
0.46
0.95
5.72
0.92
3.07
41.93
1.14
-28.56
2.11
-6.54 -47.12
79.10
4.13
-31.70 100.00
-5.30
-15.82
-3.34
-0.12
0.00
0.05
-19.11
2.16
-0.02
0.02
0.02
-2.66
0.18
-5.10
-38.77
-0.02
77.23
-0.05
-77.36
-1.38
-4.01
3.97
6.04
-5.30
100.00
1.20
1.86
0.10
0.11
0.03
4.20
2.34
0.44
0.10
0.06
1.80
0.10
1.30
3.79
-0.17
-4.62
-0.15
2.64
-2.75
27.34
43.78
12.73
-15.82
1.20
100.00
1.97 -20.90
-2.35 -21.64
7.98
2.70
-7.24
-5.72
-7.22
1.08
-7.25
1.16
54.00
-8.96
-12.71
-7.06
9.21
-7.63
-1.79
5.00
6.01
-3.34
1.86
1.97
100.00
-0.13
0.00
-0.20
6.18
2.15
-0.02
-0.04
-0.07
3.32
-0.04
1.88
3.79
-0.12
-2.99
-0.08
0.77
-3.15
-9.34
-7.34
3.10
-0.12
0.10
-20.90
-0.13 100.00
1.72
10.71
-0.08
-0.31
1.05
2.11
2.76
0.06
2.80
-0.02
-7.46
2.72
-0.40
2.91
-0.22
0.11
-0.93
-0.79
0.70
0.00
0.11
-2.35
0.00
1.72 100.00
1.44
-0.02
-0.18
0.81
0.59
0.80
0.03
1.03
-0.01
-0.77
-0.64
-0.01
0.31
-0.06
0.01
-9.90
-8.49
2.44
0.05
0.03
-21.64
-0.20
10.71
1.44 100.00
-0.33
-0.31
0.46
2.39
2.79
-0.01
2.68
-0.05
-8.48
4.46
-0.32
3.57
-0.01
0.63
-12.16
24.50
31.83
-19.11
4.20
7.98
6.18
-0.08
-0.02
-0.33 100.00
6.91
-0.10
-0.02
-0.06
5.60
-0.06
3.65
18.21
0.09
-16.58
0.01
5.51 -15.12
5.85
18.50
17.55
2.16
2.34
2.70
2.15
-0.31
-0.18
-0.31
6.91 100.00
-0.08
-0.01
-0.12
2.12
-0.24
0.98
6.39
0.61
1.86
0.02
-9.84 -11.48
-3.13
-2.51
-1.35
-0.02
0.44
-7.24
-0.02
1.05
0.81
0.46
-0.10
-0.08
100.00
0.77
0.49
0.04
0.78
0.00
-2.46
-1.46
0.09
-1.07
-0.05
0.02
-2.49
-2.01
0.46
0.02
0.10
-5.72
-0.04
2.11
0.59
2.39
-0.02
-0.01
0.77 100.00
0.88
0.02
0.88
-0.00
-2.07
0.97
-0.05
0.71
-0.09
0.02
-3.05
-2.55
0.95
0.02
0.06
-7.22
-0.07
2.76
0.80
2.79
-0.06
-0.12
0.49
0.88
100.00
0.02
1.06
-0.02
-2.45
0.96
-0.07
1.01
-0.11
0.07
-1.51
4.63
5.72
-2.66
1.80
1.08
3.32
0.06
0.03
-0.01
5.60
2.12
0.04
0.02
0.02
100.00
0.03
1.82
3.03
-0.00
-2.50
0.01
0.31
-3.10
-3.53
-2.72
0.92
0.18
0.10
-7.25
-0.04
2.80
1.03
2.68
-0.06
-0.24
0.78
0.88
1.06
0.03 100.00
-0.02
-3.22
0.68
0.07
1.51
-0.25
0.07
-4.10
1.07
3.07
-5.10
1.30
1.16
1.88
-0.02
-0.01
-0.05
3.65
0.98
0.00
-0.00
-0.02
1.82
-0.02
100.00
2.76
-0.02
-4.27
-0.02
3.54
-0.84
-10.13
46.75
41.93
-38.77
3.79
54.00
3.79
-7.46
-0.77
-8.48
18.21
6.39
-2.46
-2.07
-2.45
3.03
-3.22
2.76 100.00
-4.23
-32.70
-2.82
20.12 -18.06
-4.83
-3.46
1.14
-0.02
-0.17
-8.96
-0.12
2.72
-0.64
4.46
0.09
0.61
-1.46
0.97
0.96
-0.00
0.68
-0.02
-4.23 100.00
-0.40
4.53
-0.07
0.06
66.45
2.20
-28.56
77.23
-4.62
-12.71
-2.99
-0.40
-0.01
-0.32
-16.58
1.86
0.09
-0.05
-0.07
-2.50
0.07
-4.27
-32.70
-0.40 100.00
-0.27
-79.95
-0.23
-3.26
-2.42
2.11
-0.05
-0.15
-7.06
-0.08
2.91
0.31
3.57
0.01
0.02
-1.07
0.71
1.01
0.01
1.51
-0.02
-2.82
4.53
-0.27 100.00
-0.10
0.02
-71.75
-35.80
-6.54
-77.36
2.64
9.21
0.77
-0.22
-0.06
-0.01
5.51
-9.84
-0.05
-0.09
-0.11
0.31
-0.25
3.54
20.12
-0.07
-79.95
-0.10
100.00
20.99
-9.96
-47.46
-47.12
-1.38
-2.75
-7.63
-3.15
0.11
0.01
0.63
-15.12 -11.48
0.02
0.02
0.07
-3.10
0.07
-0.84
-18.06
0.06
-0.23
0.02
20.99 100.00| +|ICS|GPT2
CGPT1.3
Neo2.7
Chatglm
Chatglm2
OPT6.7
Pythia6.9
LM7
Qwen
LM27
RedPaj
Bloom
Internlm
OLM
Baichuan
Pythia12
LM13
Neox20
OPT30
LM30
Gala30
LM65
Gala120
Fal180| +||| + +19 + diff --git a/open_review/iclr2024_8797.json b/open_review/iclr2024_8797.json new file mode 100644 index 0000000000000000000000000000000000000000..17e0538e2f0e94c11ea370dd48b92eef2f40bc13 --- /dev/null +++ b/open_review/iclr2024_8797.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8797", + "source": "iclr2024", + "source_year": 2024, + "title": "On information dropping and oversmoothing in graph neural networks", + "abstract": "Graph Neural Networks (GNNs) are widespread in graph representation learning. *Random dropping* approaches, notably DropEdge and DropMessage, claim to alleviate the key issues of overfitting and oversmoothing by randomly removing elements of the graph representation. However, their effectiveness is largely unverified. In this work, we find experimentally that they have a limited effect in reducing oversmoothing, contrary to what is typically assumed in the literature. These approaches are also non-parametric and motivate us to question if *learned* dropping can alleviate the propagation of redundant or noisy edges. We propose a new information-theoretic approach, in which we learn to perform dropping on the data exchanged by nodes during message passing via optimizing an information bottleneck. Our approach is superior to previous dropping methods in oversmoothing reduction and has promising performance in the case of deep GNNs.", + "rebuttal": "Dear Reviewer nv43,\n\nThank you for your response and for acknowledging the changes we've made to our paper -- we appreciate your perspective on the current focus of our study and understand your viewpoint regarding the need for more theoretical analysis.\n\nWe agree that theoretical analysis is a vital component of research in this field. However, we would like to emphasize that the primary intention of our paper is to address a gap we identified in empirical research related to oversmoothing in GNNs. Our work provides critical insights by empirically evaluating widely-used methods like DropEdge and DropMessage, challenging prevalent assumptions about their effectiveness in reducing oversmoothing. This empirical approach is particularly important given the usage rate of these methods in practical applications.\n\nWe believe our empirical findings contribute significantly to the existing body of knowledge by offering a nuanced perspective that is grounded in practical evaluation. This perspective is crucial for researchers and practitioners in the field who rely on these methods for real-world applications.\n\nThat said, we acknowledge the importance of theoretical analysis and are committed to integrating more theoretical perspectives into our work. To this end, we are exploring ways to augment our empirical findings with theoretical insights, possibly drawing from existing analyses while providing a unique angle based on our empirical results.\n\nWe hope this response clarifies the rationale behind our empirical focus and our commitment to enhancing the paper with theoretical insights. \n\nThank you once again for your feedback.\n\nSincerely,\n\nThe authors.\n\nDear Reviewer K9RV,\n\nThank you for your response! Yes -- it is true that the idea that reduction in oversmoothing can be harmful is not a new insight. However, in this work we aimed to focus specifically on random dropping methods -- specifically, our *key contribution* is that DropEdge and DropMessage, do not effectively reduce oversmoothing as previously believed. This observation challenges a key assumption in the field, particularly given the prominence and recent recognition of these methods (e.g., DropMessage being awarded as a distinguished paper at AAAI this year [1]). The main goal of [...]\n\nDear Reviewer xrXy,\n\nWe would like to kindly request your feedback on the revisions made to our paper -- we have thoroughly addressed the concerns raised in your initial review and made significant changes to the paper.\n\nWe would greatly appreciate any additional comments or suggestions you may have before the end of the rebuttal period. We understand the time constraints and appreciate your consideration in providing timely feedback.\n\nThank you for your valuable contribution to improving our work.\n\nSincerely,\n\nThe authors\n\n### Our response\nDear Reviewer yTML,\n\nThank you for your continued engagement with our paper and for sharing your insights. We appreciate your suggestion about refining our conceptual framework and acknowledge the changes in our paper's focus from the original version. However, we believe that the current version of the paper makes an important empirical contribution to the field and merits consideration in its present form.\n\n**Empirical Contribution**: One of our key contributions is the empirical demonstration that commonly used random dropping approaches, such as DropEdge and DropMessage, d [...]\n\n### Request for Feedback Before Rebuttal Period Closure\nDear Reviewer K9Rv,\n\nWe would like to kindly request your feedback on the revisions made to our paper -- we have thoroughly addressed the concerns raised in your initial review and made significant changes to the paper.\n\nWe would greatly appreciate any additional comments or suggestions you may have before the end of the rebuttal period. We understand the time constraints and appreciate your consideration in providing timely feedback.\n\nThank you for your valuable contribution to improving our work.\n\nSincerely,\n\nThe authors\n\n### Request for Feedback Before Rebuttal Period Closure\nDear Reviewer nv43,\n\nWe would like to kindly request your feedback on the revisions made to our paper -- we have thoroughly addressed the concerns raised in your initial review and made significant changes to the paper.\n\nWe would greatly appreciate any additional comments or suggestions you may have before the end of the rebuttal period. We understand the time constraints and appreciate your consideration in providing timely feedback.\n\nThank you for your valuable contribution to improving our work.\n\nSincerely,\n\nThe authors\n\n### Response to Reviewer K9Rv\nDear Reviewer K9Rv,\n\nWe thank you for your response and important feedback. We are glad you have pointed out the issues and inconsistencies you found. We have made many changes to the paper in response to your feedback.\n\n> Please improve literature review.\n\nWe have revised our literature review of oversmoothing. This has been placed in Section 2.2. Thank you for mentioning the paper by Keriven (2022). Indeed there has been recent work that has tried to analyze the relationship between oversmoothing and generalization from a theoretical perspective. Our work is a c [...]\n\n### Response to Reviewer nv43\nDear Reviewer nv43,\n\nWe thank you for your response and important feedback! You highlighted an important point - on the comparison of our Learn2Drop with the latest existing approaches for addressing oversmoothing. We would first like to mention that in the original paper, the main motivation of our work wasn’t clearly addressed and it was misleading. We admittedly overemphasized the significance of ‘reducing oversmoothing’ and would like to highlight that the main novelty of our work is an empirical study and critical look of whether oversmoothing is actually rel [...]\n\n### Response to Reviewer xrXy\nDear Reviewer xrXy,\n\nThank you for taking the time to provide us with feedback and suggestions. We agree with your comments – oversmoothing is a challenging phe\n[rebuttal truncated]", + "initial_scores": [ + 3, + 6, + 3, + 3 + ], + "score_mean": 3.75, + "score_variance": 2.25, + "score_spread": 3, + "score_min": 3, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "The paper investigates the issue of over-smoothing in GNNs and evaluates the limitations of existing methods, DropEdge and DropMessage, which randomly drop information during training. The authors propose a new method called Learn2Drop, which learns which elements to drop non-randomly. They use the normalized Dirichlet energy metric to measure over-smoothing and conduct experiments to show that Learn2Drop effectively mitigates over-smoothing and improves performance compared to DropEdge and DropMessage.\n\nStrengths of the paper are the following:\n* The paper conducts a comprehensive evaluation of over-smoothing using various metrics and experiments, providing a detailed analysis of the limitations of existing methods.\n* The paper addresses an important problem in GNNs and proposes a novel solution, Learn2Drop, which shows promising results in mitigating over-smoothing.\n\nWeaknesses of the paper:\n* The paper primarily compares Learn2Drop with DropEdge and DropMessage but does not compare it with other recent, more complex methods that address over-smoothing. This comparison could provide a more comprehensive assessment of Learn2Drop's effectiveness.\n* The use of NDE as a metric to measure over-smoothing is questioned by one reviewer due to its limitations and lack of correlation with performance accuracy. The paper may benefit from considering alternative metrics or providing additional evidence supporting the choice of NDE.\n* The paper lacks references to recent works on over-s", + "forum_id": "RwhRZojoYw", + "primary_area": "learning on graphs and other geometries & topologies", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_nv43", + "review_id": "d03c4mP72v", + "scores": { + "rating": 3, + "soundness": 3, + "presentation": 2, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 1662, + "edit_detected": true, + "edit_delta_seconds": 877269, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_xrXy", + "review_id": "O3qwcE68GJ", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 2768, + "edit_detected": true, + "edit_delta_seconds": 1044422, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_K9Rv", + "review_id": "scL1BmLJzt", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 4744, + "edit_detected": true, + "edit_delta_seconds": 1214687, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_yTML", + "review_id": "b9JDusT2ik", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 3325, + "edit_detected": true, + "edit_delta_seconds": 1810935, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8797.md b/open_review/iclr2024_8797.md new file mode 100644 index 0000000000000000000000000000000000000000..1b67ce6e147dd92e475ff6db3b26ebb7511d8be0 --- /dev/null +++ b/open_review/iclr2024_8797.md @@ -0,0 +1,405 @@ + + +## ON INFORMATION DROPPING AND OVERSMOOTHING IN GRAPH NEURAL NETWORKS + +Authors withheld for review + +## ABSTRACT + +Graph Neural Networks (GNNs) are widespread in graph representation learning. _Random dropping_ approaches, notably DropEdge and DropMessage, claim to alleviate the key issues of overfitting and oversmoothing by randomly removing elements of the graph representation. However, their effectiveness is largely unverified. In this work, we show empirically that they have a limited effect in reducing oversmoothing at test time due to their training time exclusive nature. We show that DropEdge in particular can be seen as a form of training data augmentation, and its benefits to model generalization are not strictly related to oversmoothing, suggesting that in practice, the precise link between oversmoothing and test time performance is more nuanced. We additionally address the limitations of current dropping methods by _learning_ to drop, and propose a new information-theoretic approach, which performs dropping during message passing by optimizing an information bottleneck. + +## 1 INTRODUCTION + +Graphs are pervasive in the real world, effectively representing complex relationships among various entities across a multitude of domains such as social media (Fan et al., 2019), finance (Bi et al., 2022), and biology Jumper et al. (2021). Graph neural networks (GNNs), as state-of-the-art tools for graph representation learning, have garnered significant interest in recent years (Kipf & Welling, 2017; Hamilton et al., 2017; Veliˇckovi´c et al., 2018). At the core of GNNs lies a message-passing schema, which allows each node to aggregate information from its neighboring nodes. + +Despite rapid advances in GNNs, they still face critical challenges. In particular, _oversmoothing_ occurs when representations of different nodes in a GNN become indistinguishable, as they aggregate information from neighbors recursively (Oono & Suzuki, 2020). This phenomenon hinders GNNs from effectively modeling higher-order dependencies from multihop neighbors and makes them more vulnerable to adversarial attacks (Li et al., 2018; Chen et al., 2019). Common approaches for mitigating oversmoothing include adding regularization terms based on measures of oversmoothing (Chen et al., 2019), and restricting the pairwise distances between nodes (Zhao & Akoglu, 2020). + +Another widely used approach is based on the _random dropping_ of information from the graph or its representation. Prominent examples include DropEdge (Rong et al., 2020) and DropMessage (Fang et al., 2023), which operate on the edge and message levels respectively. Notably, DropMessage has been recently proposed as a generalization of DropEdge. However, the impact of these techniques on oversmoothing and the precise link between their oversmoothing reduction and the benefits to model performance have not been thoroughly investigated. + +In this paper, we investigate the extent to which DropEdge and DropMessage are able to mitigate oversmoothing. We show that at test time, both methods actually have a limited effect in reduciung oversmoothing according to metrics such as _Dirichlet energy_ and _mean average distance_ . We hypothesise that DropEdge has a similar effect to training with data augmentation and demonstrate that its beneficial effects on model performance are highly conditional on the randomness used in dropping. We also observe that enabling random dropping at test time will considerably reduce oversmoothing, but this _does not translate to improved performance_ , suggesting that minimizing oversmoothing by itself is insufficient. This motivates _Learn2Drop_ . In contrast to traditional dropping mechanisms, which apply a uniform approach to information pruning and reduce oversmoothing in + +1 + +a deterministic manner, Learn2Drop learns a mask over the messages each node receives, enabling test-time message dropping to be performed dynamically. + +The foundation of Learn2Drop is rooted upon the information bottleneck principle (Tishby et al., 2000). The bottleneck seeks a representation _Z_ that is minimally informative about the input _X_ , whilst simultaneously being maximally informative about the target _Y_ . By balancing _I_ ( _X, Z_ ) and _I_ ( _Z, Y_ ), it allows task-irrelevant information to be discarded while preserving useful information, allowing the GNN to focus on the most salient features of the data. In a sense, this potentially allows the GNN to _learn_ to reduce oversmoothing in an optimal way. + +## 2 RELATED WORK + +## 2.1 DROPOUT IN NEURAL NETWORKS + +Dropout, as introduced by (Srivastava et al., 2014), stems from the notion that the random deactivation of certain units during training equates to training an ensemble of networks. This process effectively counters overfitting in various models, GNNs included. DropEdge (Rong et al., 2020) adopts a different strategy by randomly omitting a subset of edges from the input graph prior to the standard message-passing procedure. This operation only occurs during training. Given an input graph _G_ = ( _E, V_ ), they remove _p|V |_ edges randomly, where _p ∈_ (0 _,_ 1) is a user-defined parameter. The authors argue that this approach simultaneously addresses both overfitting and oversmoothing. DropNode (Feng et al., 2020) is a similar approach, in which nodes are randomly removed, although it does not specifically aim to address oversmoothing. DropMessage (Fang et al., 2023) is another dropping approach in which elements of the _message matrix_ are randomly dropped during training. + +## 2.2 CURRENT UNDERSTANDING OF OVERSMOOTHING + +Many earlier works on oversmoothing have proposed practical techniques to alleviate it (Chen et al., 2019; Zhao & Akoglu, 2020; Rong et al., 2020; Chen et al., 2020). Recently there has been a greater focus investigating the theoretical nature of oversmoothing. Oono & Suzuki (2020) performed an asymptotic analysis, showing that node embeddings homogenize when the number of layers tends to infinity. Wu et al. (2022) performed a non-asymptotic analysis, showing that oversmoothing occurs when an undesirable mixing effect overcomes a desirable denoising effect. Keriven (2022) showed that some smoothing _but not too much_ can be desirable for linear GNNs, and that there exists a number of layers which optimizes this tradeoff. A major limitation of the existing body of work and an active area of research is the need of a formalized understanding of the relationship between homogenized node representations and model generalization. Many prior works such as DropEdge typically assume a clear relationship between oversmoothing reduction and model performance without formally justifying it. However, Keriven (2022) has made a step in this new direction, giving a theoretical analysis based on risk minimization, although it is limited to linear GNNs. + +## 3 RANDOM DROPOUT AND OVERSMOOTHING + +The authors of DropEdge Rong et al. (2020) and DropMessage Fang et al. (2023) propose to directly measure the amount of smoothing after applying each method. DropEdge (Rong et al., 2020) measures the difference in Euclidean distance between internal layers and the final layer. One criticism is that it does not distinguish between nodes in the same layer. In contrast, DropMessage (Fang et al., 2023) computes a metric over the nodes of the same layer, the mean average distance (MAD) (Chen et al., 2019). Notably, both methods are applied _exclusively during training_ , which raises concerns regarding whether they can address oversmoothing at test time: + +1. Generalization to unseen data: while these training-time interventions might help reduce oversmoothing on the training data, their absence during the test phase can potentially lead to inconsistent behaviour on the test data due to increased oversmoothing. + +2. Model confidence: if the robustness against oversmoothing is only demonstrated during training and not during testing, it reduces the overall confidence in the model’s reliability across diverse environments. + +2 + +The distinction between training and testing time, and its implications on oversmoothing, remains unaddressed in the aforementioned works. This oversight has prompted our investigation into the effects of these random dropping methods on oversmoothing across both training and testing phases. + +## 3.1 MEASURING SMOOTHING + +One metric commonly used in the literature to empirically measure smoothing is _mean average distance_ (MAD) (Chen et al., 2019): + +**==> picture [284 x 33] intentionally omitted <==** + +More recently many works have proposed metrics of smoothing based on the concept of _Dirichlet energy_ (Cai & Wang, 2020; Rusch et al., 2022) which is typically defined as + +**==> picture [279 x 28] intentionally omitted <==** + +This has the property that _d_ DE( **X** _[ℓ]_ ) = 0 if and only if all node representations are equal – in other words, complete oversmoothing is equivalent to 0 Dirichlet energy, which has led to conceptually cleaner proofs (Cai & Wang, 2020) in the theoretical analysis of oversmoothing. However, note that the Dirichlet energy is sensitive to arbitrary scaling of embeddings. Observe that, by simply multiplying the embeddings by a constant greater than 1 after each layer, we are guaranteed to increase this energy. In reality, this might not reflect any improvement in the ability of the model to generalize. For our study, this may be problematic as DropMessage and standard dropout, which scale the embeddings – in the case of dropout with probability _p_ it is common to scale with 1 _/_ (1 _− p_ ). This would ‘fix’ oversmoothing if a sufficiently high dropping probability is used compared to a model that applies less dropping. This is less of a concern when observing the layer-wise exponential convergence of embeddings within the same model. + +Our experiments also aim to empirically compare the relative amount of oversmoothing suffered by different GNNs. As we specifically investigate methods that inherently scale the embeddings, we also consider using MAD, which has two known limitations: (i) complete oversmoothing (all node representations being identical) does not equate to 0 MAD, and (ii) it is ineffective in the case where node representations are scalars – nodes with the same sign but different magnitude cannot be distinguished. However, it can still be shown that for multidimensional MAD, there exist constants _C_ 1 _, C_ 2 _>_ 0 such that _µ_ MAD( **X** _[ℓ]_ ) _≤ C_ 1 _e[−][C]_[2] _[ℓ]_ for _ℓ ∈_ [0 _, N_ ]— it exhibits layer-wise exponential convergence (Rusch et al., 2023). Although theoretically inconvenient, MAD still enables us to make meaningful empirical comparisons on oversmoothing on models where the node embeddings are high dimensional. Limitation (i) is not strictly a concern when we seek a comparison between methods, rather than an absolute measure of oversmoothing that is theoretically sound. + +## 3.2 OBSERVING THE EFFECT OF RANDOM DROPPING ON OVERSMOOTHING + +We empirically observe oversmoothing in a model by measuring the amount of smoothing after each layer. We compare a vanilla baseline with DropEdge and DropMessage by training models while applying random dropping and evaluate the extent of oversmoothing in two scenarios: (i) without applying any random dropping (simulating test-time inference), and (ii) with random dropping applied (resembling a training forward pass). + +**Experimental setup.** Using 128-layer deep GNNs of the GCN architecture (Kipf & Welling, 2017), we train models on node classification tasks with varying levels of homophily. In addition to the commonly-used citation networks _Cora_ (McCallum et al., 2000), _Citeseer_ (Giles et al., 1998) and _Pubmed_ (Sen et al., 2008), we use heterophilic datasets _Wisconsin_ , _Texas_ , _Cornell_ (Craven et al., 1998) and _Chameleon_ (Pei et al., 2020). As baselines, we use a vanilla model trained with skip connections (He et al., 2016), and also a model trained with dropout. + +The results using Dirichlet energy are shown in Figure 1. We observe that at training time, DropEdge can alleviate the amount of smoothing at some layers by a scaling factor – however, the trend is still exponential: at layer _ℓ_ the Dirichlet energy is _O_ ( _C[−][ℓ]_ ) for some constant _C_ . Layer-wise exponential convergence is still occurring. DropMessage, in contrast, is able to completely nullify it at training + +3 + +**==> picture [397 x 119] intentionally omitted <==** + +**----- Start of picture text -----**
+Cora Texas Cornell
Vanilla 10 [2] 10 [2]
DropEdge
10 [1] DropEdge (Train)
DropMessage
DropMessage (Train) 10 [0] 10 [0]
Skip
10 [1] DropoutDropout (Train)
10 [2] 10 [2]
10 [3]
10 [4] 10 [4]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Layer
Dirichlet energy
**----- End of picture text -----**
+ +Figure 1: Measuring oversmoothing in random dropping models, averaged over 5 runs. + +time, although it appears the same can also be achieved by applying dropout on the node vectors at each layer. Results using MAD are very similar, and given in A.3. + +At test time, random dropping is not applied. Instead any improvement comes from the effect that the dropping has during training. However, we observe from our experiments (included in Table 1 in Section 5.2 for ease of later comparison) that naively enabling DropEdge and DropMessage at test time translates to poor accuracy and inconsistent model inference, _despite the reduction of oversmoothing_ , suggesting that the main benefits of these random dropping methods is not primarily from oversmoothing reduction, or that oversmoothing reduction by itself is insufficient to guarantee improved performance. + +**Discussion.** During forward passes, DropEdge is able to mitigate the amount of oversmoothing, but does not appear to prevent it. The amount of mitigation is greater at training time than test time. DropMessage, in contrast, is able to stabilize the oversmoothing at training time, but has little effect at test time. If the primary cause of oversmoothing is the recursive aggregation inherent in the GNN’s structure, this issue will still manifest at test time – it will aggregate information across all available edges without any dropping, which may lead to homogenized node representations. + +We further note a close similarity between methods used outside the specific context of graphs. For instance, DropEdge is methodologically similar to _word dropout_ (Mikolov et al., 2013) used in natural language processing and _cutout_ (DeVries & Taylor, 2017) used in computer vision, both of which are augmentation techniques that aim to prevent the model from overfitting on a specific input feature. In addition, we note that DropMessage’s approach is _effectively applying dropout between the aggregate and update stages of message passing_[1] . We observe that it has a similar effect on oversmoothing compared to applying dropout on the node representations. + +If their primary effect was only through introducing noise during training, then the two methods would arguably be analogous to dropout and other similar approaches. Dropout aims to make neural networks more robust by preventing over-reliance on any particular neuron during training, but it does not drop out neurons at test time. Similarly, DropEdge/DropMessage can be seen as a way to ensure that the GNN does not over-rely on any particular edge or message. + +In conclusion, DropEdge and DropMessage exhibit nuanced effects on smoothing at training time and are not applied at test time. They appear more aligned with robust training and overfitting prevention than directly combating the oversmoothing phenomenon. This suggests that these techniques, particularly DropEdge, might operate more as data augmentation. Their role in mitigating oversmoothing could then be an indirect outcome of the models they assist in training – models that are more robust and inherently resistant to oversmoothing. Further research is needed to explore the primary versus secondary effects of these techniques. + +## 3.3 THE IMPORTANCE OF RANDOMNESS + +An important implication of our results is the possibility that DropEdge actually does not have a significant effect in reducing oversmoothing. The overall behavior is still _O_ ( _k[−][L]_ ). This is contrary + +> 1This can be verified using the source code: [URL removed] + +4 + +to what is implied by the original work. We suspect that the reasons for DropEdge’s performance improvements could lie elsewhere, and we investigate this. + +We first recall that the authors of DropEdge use a specific definition of oversmoothing: they define the concept of _ϵ-smoothing_ , which occurs when all node representations lie within a distance _ϵ_ from a subspace. It can be shown that during a forward inference pass, dropping edges can increase the layer at which (a relaxed version) of _ϵ_ -smoothing occurs. This is stated as Theorem 1 in the work by Rong et al. (2020), and we shall continue to refer to this theorem as the _DropEdge theorem_ . The DropEdge theorem does not make any assumption on _how_ edges are removed, it only requires that the number of edges in the perturbed graph be less than the original. Therefore, removing edges in a completely deterministic manner would also satisfy the theorem, but it is unclear whether this would lead to the same effects. This is the motivation for our next experiment. + +**Experiment.** We perform an investigation in which we train a model Φ using a version of DropEdge where a proportion of the edges, controlled by parameter _τ ∈_ [0 _,_ 1], are sampled deterministically. That is, we set a predefined set of edges _E ⊂ E_ such that _|E|_ = _⌊p|E|⌋_ . During the training of Φ, at each epoch we choose the edges _F_ to drop by sampling from _S_ = _{E[′] | |E[′] ∩E| ≥ ⌊τ |E|⌋∧|E[′] |_ = _⌊p|E|⌋}_ . When _τ_ = 0, the method is equivalent to standard DropEdge. When _τ_ = 1, the method is a fully deterministic version of DropEdge where the same edges are sampled for all epochs. For different values of _τ ∈_ [0 _,_ 1] we observe the test accuracy of Φ and the MAD. + +## **Remark 3.1.** _τ controls the mutual information between E and F_ + +**==> picture [397 x 196] intentionally omitted <==** + +**----- Start of picture text -----**
+Cora Citeseer Pubmed
0.15 3
∆ test acc 4 0.06
5 0.100
2
0.075 2 0.10 0.04
0 ∆ smoothing (Train) 1
∆ smoothing 0.050 0 0.05 0.02
0
5 0.025
2 0.00 1 0.00
0.000
10
5.0 3
4 12.5 50
2.5 0 2
10.0
25
2
0.0 20 7.5 1
0
2.5 40 0 5.0 0 25
5.0 60 2 2.5 1 50
7.5 0.0 75
0 1 0 1 0 1
τ
MAD
∆
test acc (%)
∆
Dir Energy
∆
**----- End of picture text -----**
+ +Figure 2: Investigating the effects of stochasticity in DropEdge. + +In order to obtain stable results, we train shallower models with 3 GCN layers and skip connections. We repeat this experiment for multiple choices of the initial edge set _E_ and measure the mean test accuracy and MAD at each _τ_ . Results using MAD and Dirichlet energy are shown in Figure 2. As _τ_ increases, the performance improvement from using DropEdge degrades. Although satisfying the DropEdge theorem, for certain values of _τ_ that are sufficiently large (typically after 0.9), the model has _worse_ test performance than not using DropEdge, while the amount of oversmoothing surprisingly _decreases_ according to MAD. Moreover, according to Dirichlet energy, there is _no consistent relationship_ between performance improvement and smoothing. For Pubmed the Dirichlet energy tends to decrease as performance worsens, but for Citeseer there is an initial increase. This suggests: + +- the performance improvement provided by DropEdge is highly sensitive to the amount of random noise being injected into the sampling during each training epoch. + +- the amount of oversmoothing at both training and test time is possibly related to the model’s error on the training/test sets, and how it generalizes (i.e. whether we find good minima). + +5 + +As an additional check, we perform the same experiment but modifying the computation of MAD and Dirichlet energy so that only pairs of nodes with _different labels_ are considered. The motivation is that smoothing across nodes with different labels is more problematic for performance, whereas smoothing across nodes with the same label is desirable. The resulting trends are very similar and shown in A.2 We can conclude that a GNN with reduced oversmoothing does not necessarily generalize better, which challenges the preconception made in previous works (Rong et al., 2020; Li et al., 2018; Chen et al., 2019) that less smoothing is strictly better. + +## 4 LEARNING TO DROP + +In Section 3 we highlighted several limitations of DropEdge and DropMessage. In summary, both DropEdge and DropMessage operate only during training, and do not sufficiently address oversmoothing on unseen data at test time. It is unclear whether oversmoothing is related to their effect on model performance. Moreover, dropout on the message matrix (as in the case of DropMessage) will stabilize both Dirichlet energy and MAD. However, doing this at test time will result in poor model performance and unstable predictions. + +To address these concerns, we propose _learning to drop_ (Learn2Drop) in which we _learn_ which elements to drop rather than applying uniform treatment, and at test time choosing which elements to drop based on experience. This will incorporate domain knowledge into the dropping process, which may be advantageous over a pure adhoc approach where the dropping probability is fixed. This can (i) allow the model to keep essential information while filtering out noise, which has been previously observed to be a potential cause of oversmoothing (Chen et al., 2019), (ii) allow the use of topological information, which can affect smoothing (Bodnar et al., 2022), and (iii) perform dropping at test time in a more informed manner. + +## 4.1 INFORMATION BOTTLENECK + +Aligning with the motivation to preserve only critical information, we propose dropping messages based on the information bottleneck (IB) principle (Tishby et al., 2000). This principle has been previously adopted in neural networks for similar purposes, such as pruning less informative neurons (Achille & Soatto, 2018) and enhancing robustness against adversarial attacks (Kolchinsky et al., 2019). The overall idea is to seek a representation _Z_ that is minimally informative about the input _X_ , whilst simultaneously being maximally informative about the target _Y_ . This done by optimally balancing the mutual information terms _I_ ( _X, Z_ ) and _I_ ( _Z, Y_ ). + +Recall that in message passing GNNs, at layer _ℓ_ we obtain the next representation of node _i_ , by applying an aggregation function _⊕_ on the messages passed from the nodes in its neighborhood _Ni_ : + +**==> picture [278 x 31] intentionally omitted <==** + +Here, _ψ_ � **h** _[ℓ] i[,]_ **[ h]** _[ℓ] j_ � denotes the message that a node _j_ passes to a node _i_ . Let **M** _[ℓ] ∈_ R _[|][E][|×][m]_ be the message matrix given to layer _ℓ_ . It is formed by stacking all messages passed at layer _ℓ_ , and each row is a different message. Note that **M** _[ℓ]_ , along with the adjacency matrix of the input graph, are sufficient for obtaining the final output of the model. Thus, **M** _[ℓ]_ can be viewed as some intermediate representation. In this view, the layers 1 _, . . . , ℓ −_ 1 of the message passing GNN can be treated as an encoder, and the remainder of the model can be viewed as a decoder. **M** _[ℓ]_ contains the information necessary to make predictions about the target _Y_ . This motivates us to apply the IB principle, treating **M** _[ℓ]_ as the optimal representation _Z_ . We shall refer to **M** _[ℓ]_ as _Z_ for clarity. + +Let _ϕ_ be the parameters of the encoder and _θ_ be the parameters of the decoder. We can write the mutual information between the input _X_ and the messages _Z_ as _I_ ( _X, Z_ ; _ϕ_ ), and the mutual information between the messages and the output _Y_ as _I_ ( _Z, Y_ ; _θ_ ). We can treat _Z_ as a random variable with distribution P( _Z|X_ ; _θ_ ). Following standard use of the IB principle, we obtain + +**==> picture [263 x 17] intentionally omitted <==** + +Optimizing this objective will allow us to obtain minimal and sufficient representations of the input graph. This objective is intractable. Following (Alemi et al., 2017; Wu et al., 2020; Miao et al., + +6 + +2022), we use variational approximations: P _ϕ_ to approximate the encoder, and Q _θ_ to approximate the decoder, and R( _Z_ ) to approximate the marginal distribution of _Z_ . This yields the variational bounds: + +**==> picture [289 x 25] intentionally omitted <==** + +It can be shown using the standard derivation introduced by Alemi et al. (2017) that applying these variational bounds results in the objective + +**==> picture [308 x 16] intentionally omitted <==** + +Here, the first term is the expected negative log-likelihood. For classification tasks this is equivalent to the cross entropy loss. The second term is harder to evaluate, and depends on the instantiation of the encoder P _ϕ_ . + +## 4.2 INSTANTIATING THE DISTRIBUTIONS + +We have a choice of distribution for the encoding of _Z_ . Recall that our motivation is to optimize the dropping of information from the messages. We can do this probabilistically. Specifically, we obtain each element of every message by sampling from a _spike and slab_ distribution (Ishwaran & Rao, 2005). Each distribution is parameterized by a value _v_ and a sample probability _p_ . The value _v_ is sampled with probability _p_ , and 0 is sampled with probability 1 _−p_ . In the context of our method, we consider each message element as a variable that can be either retained or discarded. This captures the notion of allowing elements to be dropped. We choose the slab as a Delta function _δ_ ( _x − l_ ). The parameters _l_ and _p_ for each distribution are learned during training. + +Thus, sampling from P _ϕ_ is equivalent to sampling from a set of spike-and-slab distributions, where each distribution is parameterized by a different value in the original message matrix (prior to dropping). In practice, for a message vector **q** _ij_ – the message passed from node _j_ to _i_ – we can obtain the vector of probabilities by feeding the concatenated node representations [ **h** _i[ℓ][−]_[1] _||_ **h** _[ℓ] j[−]_[1] ] into an MLP. The final message vector after dropping can be obtained using the Gumbel Sigmoid trick (Jang et al., 2017) to allow the gradients to flow through the learned probabilities. Doing this for all messages will compute the optimized representation _Z_ . + +We can define R( _Z_ ), the variational approximation of the marginal _P_ ( _Z_ ), by sampling each message element _qij[k]_[from][set][of][spike][and][slab][distributions][sharing][the][same][spike][probability] _[r][∈]_[[0] _[,]_[ 1]][,] as well as the same uniform slab distribution Uniform( _a, b_ ) where _a, b ∈_ R. This gives R( _Z_ ) = � _P_ ( _qijk_[)][ where] _[ P]_[(] _[q] ij[k]_[) =][ P][(] _[x]_[) =] _b−pa_[+ (1] _[ −][p]_[)] _[δ]_[(] _[x]_[)][.] + +Now, computing the KL term in Equation 7 directly is intractable, as it requires a summation over all possible _Z_ . Instead, we note that since the elements of _Z_ are independent given _X_ , the joint distribution P( _Z | X_ ) can be factorized into the product of the individual marginal distributions of each element of _Z_ . That is,[�] _P_ ( _vij[k][|][X]_[)][,][where] _[v] ij[k]_[refers][to][the] _[k]_[-th][message][element][of][the] message passed from _j_ to _i_ . The KL divergence then has the analytical form + +**==> picture [349 x 67] intentionally omitted <==** + +where _p[k] ij_[and] _[l] ij[k]_[are][the][spike-and-slab][parameters][for][each][message][element.][This][is][sum][of][the] KL divergences of the marginal distributions of each message element. + +## 5 EXPERIMENTS ON OVERSMOOTHING + +In this section, we evaluate the effectiveness of Learn2Drop. We first show that Learn2Drop is able to successfully mitigate oversmoothing at test time, whereas DropEdge and DropMessage are unable to. We then evaluate the performance of Learn2Drop against previous dropping approaches to investigate whether it helps model performance in practice. + +7 + +## 5.1 OVERSMOOTHING REDUCTION + +**==> picture [397 x 201] intentionally omitted <==** + +**----- Start of picture text -----**
+Cora Citeseer Cornell
Vanilla 10 [2]
10 [1] DropEdgeDropMessageSkip 10 [0] 10 [0]
L2D
10 [1] L2D*
10 [2] 10 [2]
10 [3]
10 [4] 10 [4]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Chameleon Wisconsin Texas
10 [3] 10 [2] 10 [2]
10 [1] 10 [0] 10 [0]
10 [1] 10 [2] 10 [2]
10 [3] 10 [4] 10 [4]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Layer
Dirichlet energy
**----- End of picture text -----**
+ +Figure 3: Oversmoothing comparison across six node classification datasets. + +Using the same methodology as in 3.2 we measure the amount of test-time oversmoothing in models trained using Learn2Drop. We evaluate two versions of Learn2Drop: one where dropping is performed at every layer (denoted L2D) and another where dropping is only performed once every ten layers (L2D*), since dropping at every layer for very deep GNNs may add unnecessary overhead. The results using Dirichlet energy are shown in Figure 3, and corresponding results using MAD are given in Appendix A.3. We observe that for each task, Learn2Drop results in a _significant reduction_ in smoothing according to both metrics. Interestingly, from observing L2D*, we observe that applying a single dropping layer is able to reset the Dirichlet energy. While for DropEdge and DropMessage, there is an increase in oversmoothing at a super-linear rate, it is clear that Learn2Drop keeps oversmoothing from changing beyond one order of magnitude. + +## 5.2 MODEL PERFORMANCE + +In prior work, it has been standard to perform an indirect evaluation on oversmoothing by training very deep GNNs and showing that the usual performance degradation (compared to a shallow model) is reduced (Rong et al., 2020). For instance, whereas a vanilla GCN would suffer a significant reduction in performance on Cora if we were to use 64 layers instead of the usual 2 to 3 that typically yields optimal performance, DropEdge may only suffer a moderate hit. However, as discussed in Section 3.3, the effects of overfitting and oversmoothing are likely interlaced and difficult to decouple. It is not evident from such observations whether the model is simply more resistant against overfitting, or whether oversmoothing is actually reduced, especially since one of these may be the indirect consequence of the other. Nevertheless, it may be beneficial to observe the performance of models in such scenarios where a combination of issues is prevalent. + +For each dataset, we train 3-layer, 32-layer, and 64-layer GCN models. We compare the test time accuracy against both default and test-time enabled versions of DropEdge and DropMessage, as well as an additional baseline where dropout with probability 0 _._ 5 is applied after each layer. Moreover, in the context of evaluating oversmoothing, which purportedly occurs at deeper layers, we desire a scenario where it is beneficial to use more layers. Following Zhao & Akoglu (2020) we opt for using a ‘missing feature’ setting where 90% of the nodes have their feature vector initialized to **0** . + +The results shown in Table 1. Learn2Drop is able to successfully mitigate the performance degradation when increasing the number of layers. Note that the test-time versions of DropEdge and DropMessage (denoted with _∗_ ), despite reducing oversmoothing, perform highly inconsistently resulting in poor performance, and often fail to converge. To make this baseline more sensible, we obtain each individual result by averaging 10 forward passes. Meanwhile, Learn2Drop consistently + +8 + +achieves higher test accuracy, perhaps as it _learns_ the optimal way to drop. One can view this as a mechanism that controls the amount of smoothing reduction by using the IB principle to optimally make the tradeoff between signal and noise. However, we emphasize that this is merely a hypothesis. On the contrary, it could be that the oversmoothing reduction is a side effect of the true mechanisms underlying the performance improvement, which is what we have examined for DropEdge. + +Here we focus on understanding the effect of various random dropping techniques on model performance. Competing with the state-of-the-art techniques that address oversmoothing is not the objective. For completeness, we have included the recent method GraphCON (Rusch et al., 2022) which has specifically been designed to combat oversmoothing and outperforms all dropping approaches. + +|_L_||**Cora**|**Citeseer**|**Cornell**|**Chameleon**|**Wisconsin**|**Texas**| +|---|---|---|---|---|---|---|---| +||||||||| +|**3**|**Vanilla**
**DropEdge**
**Dropout**
**DropMessage**
**L2D**
_DropEdge*_
_DropMessage*_
_GraphCon_|64_._2_±_0_._7
66_._0_±_2_._4
65_._1_±_3_._3
64_._4_±_2_._4
**66**_._**4**_±_**1**_._**3**
_58.9 ± 4.3_
_60.3 ± 3.0_
_68.5 ± 3.2_|44_._0_±_1_._1
44_._5_±_1_._4
46_._2_±_2_._4
48_._0_±_2_._0
**49**_._**1**_±_**2**_._**5**
_42.3 ± 1.3_
_43.0 ± 1.3_
_52.1 ± 0.9_|45_._4_±_7_._3
44_._3_±_5_._6
43_._8_±_5_._2
47_._5_±_5_._3
**48**_._**5**_±_**4**_._**7**
_42.2 ± 4.9_
_40.5 ± 1.9_
_53.1 ± 2.3_|28_._4_±_1_._2
27_._5_±_2_._5
29_._3_±_2_._6
27_._9_±_2_._8
**30**_._**2**_±_**3**_._**3**
_25.7 ± 2.9_
_23.6 ± 3.5_
_35.2 ± 5.3_|46_._3_±_9_._3
46_._3_±_8_._3
45_._9_±_8_._9
**51**_._**0**_±_**4**_._**6**
**51**_._**0**_±_**2**_._**4**
_44.3 ± 6.4_
_47.1 ± 4.6_
_53.4 ± 2.4_|56_._2_±_6_._7
**57**_._**3**_±_**5**_._**5**
55_._7_±_4_._7
56_._6_±_4_._4
56_._4_±_4_._3
_55.7 ± 5.3_
_37.3 ± 21_
_58.5 ± 3.1_| +||||||||| +|**32**|**Vanilla**
**DropEdge**
**Dropout**
**DropMessage**
**L2D**
_DropEdge*_
_DropMessage*_
_GraphCon_|70_._5_±_1_._5
68_._6_±_1_._7
23_._6_±_7_._6
66_._2_±_1_._7
**72**_._**4**_±_**2**_._**5**
_62.9 ± 3.7_
_53.2 ± 20_
_76.6 ± 4.6_|51_._2_±_1_._4
47_._9_±_1_._7
22_._3_±_3_._3
50_._5_±_1_._4
**52**_._**3**_±_**4**_._**6**
_44.8 ± 2.8_
_29.4 ± 3.2_
_53.1 ± 1.2_|44_._3_±_5_._6
40_._0_±_5_._0
44_._3_±_5_._6
47_._1_±_7_._2
**47**_._**4**_±_**6**_._**4**
_44.3 ± 6.2_
_16.8 ± 3.0_
_49.3 ± 3.2_|27_._6_±_2_._6
30_._0_±_2_._2
20_._4_±_1_._9
28_._3_±_2_._1
**30**_._**5**_±_**2**_._**1**
_27.9 ± 1.7_
_16.4 ± 3.3_
_33.4 ± 4.3_|49_._4_±_7_._6
46_._3_±_8_._0
48_._6_±_8_._1
50_._0_±_4_._5
**51**_._**0**_±_**2**_._**7**
_40.8 ± 5.3_
_21.6 ± 11_
_52.3 ± 3.4_|58_._9_±_5_._5
57_._8_±_5_._3
57_._8_±_5_._8
57_._3_±_4_._5
**59**_._**8**_±_**2**_._**4**
_58.4 ± 6.2_
_14.1 ± 6.5_
_59.6 ± 3.1_| +||||||||| +|**64**|**Vanilla**
**DropEdge**
**Dropout**
**DropMessage**
**L2D**
_DropEdge*_
_DropMessage*_
_GraphCon_|47_._2_±_14_._3
66_._4_±_4_._0
18_._3_±_7_._0
65_._2_±_2_._1
**69**_._**3**_±_**3**_._**6**
_29.7 ± 5.0_
_16.7 ± 7.1_
_71.4 ± 3.4_|48_._3_±_3_._4
45_._7_±_0_._7
21_._8_±_2_._4
48_._6_±_1_._5
**50**_._**5**_±_**2**_._**6**
_29.0 ± 4.9_
_23.8 ± 6.1_
_53.3 ± 1.2_|44_._3_±_5_._6
43_._2_±_5_._9
44_._3_±_5_._6
45_._8_±_7_._5
**47**_._**3**_±_**4**_._**7**
_44.3 ± 6.2_
_18.9 ± 9.2_
_50.5 ± 2.2_|27_._6_±_1_._7
27_._4_±_0_._8
21_._4_±_1_._4
**28**_._**9**_±_**2**_._**6**
28_._7_±_1_._4
_27.0 ± 0.7_
_17.3 ± 1.9_
_33.6 ± 3.7_|46_._3_±_7_._2
42_._7_±_3_._1
47_._8_±_8_._8
**50**_._**0**_±_**3**_._**3**
49_._0_±_1_._7
_47.1 ± 8.0_
_20.8 ± 10_
_56.3 ± 3.6_|58_._4_±_5_._6
55_._7_±_7_._2
58_._4_±_5_._6
55_._9_±_5_._6
**59**_._**3**_±_**1**_._**5**
_56.2 ± 5.2_
_20.0 ± 21_
_59.6 ± 5.6_| + +Table 1: Comparison of test accuracy for different models and datasets with different backbone models, averaged over 5 runs. The highest accuracy across random dropping approaches is boldened. + +## 6 CONCLUSION + +In summary, we investigate the relationship between random dropping approaches and their ability to reduce oversmoothing. Specifically, while DropEdge introduces a degree of robustness, its direct impact on addressing oversmoothing at test time appears limited. We hypothesize that its effects are similar to data augmentation and support this with empirical results. DropMessage has a more pronounced effect but is still a training phase technique. In response to the the difficulty in directly applying dropping methods at test time, we present Learn2Drop, which decides which parts of the message matrix to keep or discard based on the information’s relevance. This approach allows us to leverage the effect of dropping at test time in a more informed manner. Learn2Drop, like many previous methods, reduce oversmoothing while improving performance. However, this is not a guarantee that the performance improvement is a consequence of this oversmoothing reduction. + +Our work provides novel emprical results that align with (Keriven, 2022)’s theoretical analysis, suggesting that always seeking to minimize oversmoothing is not optimal. An important takeaway from our work is that in practice, oversmoothing reduction will not strictly boost a GNN’s performance – it is trivial to minimize oversmoothing by dropping messages randomly at test time. We have observed that a GNN with little oversmoothing does not guarantee optimal performance, and a GNN that experiences less oversmoothing is not necessarily more accurate. There is perhaps a general misconception that reducing oversmoothing is always desirable because many of the earlier methods proposed to tackle oversmoothing also implicitly introduce some form of regularization. We hope that future research can shed more clarity on this. + +9 + +## REFERENCES + +Alessandro Achille and Stefano Soatto. Information dropout: Learning optimal representations through noisy computation. _IEEE transactions on pattern analysis and machine intelligence_ , 40 (12):2897–2905, 2018. + +- Alexander A. Alemi, Ian Fischer, Joshua V. Dillon, and Kevin Murphy. Deep variational information bottleneck. In _International Conference on Learning Representations_ , 2017. URL https: //openreview.net/forum?id=HyxQzBceg. + +- Wendong Bi, Bingbing Xu, Xiaoqian Sun, Zidong Wang, Huawei Shen, and Xueqi Cheng. Company-as-tribe: Company financial risk assessment on tribe-style graph with hierarchical graph neural networks. In _Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining_ , pp. 2712–2720, 2022. + +- Cristian Bodnar, Francesco Di Giovanni, Benjamin Chamberlain, Pietro Li`o, and Michael Bronstein. Neural sheaf diffusion: A topological perspective on heterophily and oversmoothing in gnns. _Advances in Neural Information Processing Systems_ , 35:18527–18541, 2022. + +- Chen Cai and Yusu Wang. A note on over-smoothing for graph neural networks. _arXiv preprint arXiv:2006.13318_ , 2020. + +- Deli Chen, Yankai Lin, Wei Li, Peng Li, Jie Zhou, and Xu Sun. Measuring and relieving the oversmoothing problem for graph neural networks from the topological view. In _AAAI Conference on Artificial Intelligence_ , 2019. + +- Ming Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding, and Yaliang Li. Simple and deep graph convolutional networks. In _International conference on machine learning_ , pp. 1725–1735. PMLR, 2020. + +- Mark Craven, Dan DiPasquo, Dayne Freitag, Andrew McCallum, Tom Mitchell, Kamal Nigam, and Se´an Slattery. Learning to extract symbolic knowledge from the world wide web. _AAAI/IAAI_ , 3 (3.6):2, 1998. + +- Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. _arXiv preprint arXiv:1708.04552_ , 2017. + +- Wenqi Fan, Yao Ma, Qing Li, Yuan He, Eric Zhao, Jiliang Tang, and Dawei Yin. Graph neural networks for social recommendation. In _The world wide web conference_ , pp. 417–426, 2019. + +- Taoran Fang, Zhiqing Xiao, Chunping Wang, Jiarong Xu, Xuan Yang, and Yang Yang. Dropmessage: Unifying random dropping for graph neural networks. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 37, pp. 4267–4275, 2023. + +- Wenzheng Feng, Jie Zhang, Yuxiao Dong, Yu Han, Huanbo Luan, Qian Xu, Qiang Yang, Evgeny Kharlamov, and Jie Tang. Graph random neural networks for semi-supervised learning on graphs. _Advances in neural information processing systems_ , 33:22092–22103, 2020. + +- C Lee Giles, Kurt D Bollacker, and Steve Lawrence. Citeseer: An automatic citation indexing system. In _Proceedings of the third ACM conference on Digital libraries_ , pp. 89–98, 1998. + +- William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In _NIPS_ , 2017. + +- 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, 2016. + +- Hemant Ishwaran and J Sunil Rao. Spike and slab variable selection: Frequentist and bayesian strategies. _arXiv preprint math/0505633_ , 2005. + +- Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In _International Conference on Learning Representations_ , 2017. URL [URL removed] net/forum?id=rkE3y85ee. + +10 + +- John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Z´ıdek, Anna Potapenko, et al.[ˇ] Highly accurate protein structure prediction with alphafold. _Nature_ , 596(7873):583–589, 2021. + +- Nicolas Keriven. Not too little, not too much: a theoretical analysis of graph (over) smoothing. _Advances in Neural Information Processing Systems_ , 35:2268–2281, 2022. + +- Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In _International Conference on Learning Representations_ , 2017. URL https: //openreview.net/forum?id=SJU4ayYgl. + +- Artemy Kolchinsky, Brendan D. Tracey, and Steven Van Kuyk. Caveats for information bottleneck in deterministic scenarios. In _International Conference on Learning Representations_ , 2019. URL [URL removed] + +- Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In _AAAI Conference on Artificial Intelligence_ , 2018. + +- Andrew Kachites McCallum, Kamal Nigam, Jason Rennie, and Kristie Seymore. Automating the construction of internet portals with machine learning. _Information Retrieval_ , 3:127–163, 2000. + +- Siqi Miao, Mia Liu, and Pan Li. Interpretable and generalizable graph learning via stochastic attention mechanism. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 15524–15543. PMLR, 17–23 Jul 2022. URL [URL removed] + +- Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. _Advances in neural information processing systems_ , 26, 2013. + +- Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In _International Conference on Learning Representations_ , 2020. URL https: //openreview.net/forum?id=S1ldO2EFPr. + +- Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-gcn: Geometric graph convolutional networks. In _International Conference on Learning Representations_ , 2020. URL [URL removed] + +- Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. In _International Conference on Learning Representations_ , 2020. URL [URL removed] + +- T Konstantin Rusch, Ben Chamberlain, James Rowbottom, Siddhartha Mishra, and Michael Bronstein. Graph-coupled oscillator networks. In _International Conference on Machine Learning_ , pp. 18888–18909. PMLR, 2022. + +- T Konstantin Rusch, Michael M Bronstein, and Siddhartha Mishra. A survey on oversmoothing in graph neural networks. _arXiv preprint arXiv:2303.10993_ , 2023. + +- Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. _AI magazine_ , 29(3):93–93, 2008. + +- Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. _Journal of Machine Learning Research_ , 15(56):1929–1958, 2014. URL [URL removed] srivastava14a.html. + +- Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. _arXiv preprint physics/0004057_ , 2000. + +- Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li`o, and Yoshua Bengio. Graph attention networks. In _International Conference on Learning Representations_ , 2018. URL [URL removed] + +11 + +- Tailin Wu, Hongyu Ren, Pan Li, and Jure Leskovec. Graph information bottleneck. _Advances in Neural Information Processing Systems_ , 33:20437–20448, 2020. + +- Xinyi Wu, Zhengdao Chen, William Wang, and Ali Jadbabaie. A non-asymptotic analysis of oversmoothing in graph neural networks. _arXiv preprint arXiv:2212.10701_ , 2022. + +- Lingxiao Zhao and Leman Akoglu. Pairnorm: Tackling oversmoothing in gnns. In _International Conference on Learning Representations_ , 2020. URL [URL removed] id=rkecl1rtwB. + +12 + +## A ADDITIONAL RESULTS + +- A.1 SMOOTHING OF DROPEDGE AND DROPMESSAGE + +**==> picture [397 x 401] intentionally omitted <==** + +**----- Start of picture text -----**
+Cora Texas Cornell
10 [0] Vanilla
DropEdge 10 [1] 10 [1]
DropEdge (Train)
DropMessage
10 [2] DropMessage (Train)Skip 10 [2] 10 [2]
DropoutDropout (Train) 10 [3] 10 [3]
10 [4] 10 [4] 10 [4]
10 [5] 10 [5]
10 [6] 10 [6] 10 [6]
10 [7]
10 [7]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Layer
Figure 4: Full oversmoothing comparison using mean average distance.
A.2 DROPEDGE OVERSMOOTHING VS TEST ACCURACY
Cora Citeseer Pubmed
∆ test acc 0.04 4 0.06 3 0.020
5
2
0.03 0.015
2 0.04
0 ∆ smoothing (Train) 0.02 1 0.010
∆ smoothing 0 0.02
0 0.005
5 0.01
2 0.00 1 0.000
0.00
10 0.005
5.0 2.5 3
4 10
2.5 0.0 3 2
5
2
0.0 2.5 2 1
0
2.5 5.0 0 0
1 5
5.0 7.5 2 1
10
0
7.5 10.0
0 1 0 1 0 1
τ
MAD
MAD
∆
test acc (%)
∆
Dir Energy
∆
**----- End of picture text -----**
+ +Figure 5: Oversmoothing and test accuracy relationship when DropEdge is applied. Oversmoothing here is calculated on only node pairs with different labels. + +13 + +## A.3 LEARN2DROP OVERSMOOTHING + +**==> picture [397 x 201] intentionally omitted <==** + +**----- Start of picture text -----**
+Cora Citeseer Cornell
10 [0]
Vanilla
DropEdge
10 [2] DropMessageSkip 10 [2] 10 [2]
L2D
10 [4] L2D* 10 [4] 10 [4]
10 [6] 10 [6] 10 [6]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Chameleon Wisconsin Texas
10 [1]
10 [2] 10 [2]
10 [3] 10 [4] 10 [4]
10 [5] 10 [6]
10 [6]
1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128 1 16 32 48 64 80 96 112 128
Layer
MAD
**----- End of picture text -----**
+ +Figure 6: Oversmoothing comparison across six node classification datasets, using MAD. + +## B EXPERIMENTAL SETUP + +We provide details of the model architectures and parameter settings for each of our experiments. All of our experiments were conducted using a V100 GPU on a Colab Pro+ subscription. + +## B.1 EXPERIMENTS IN SECTION 3.3 (OVERSMOOTHING VS MODEL PERFORMANCE) + +For this experiment, we train shallow 3-layer GNNs on Cora, Citeseer and Pubmed using the GCN architecture provided by torch-geometric[2] . The Adam optimizer from pytorch is used for all experiments in this work. The train-validation-test splits are the ones defined by setting the public parameter in torch-geometric. The DropEdge probability is fixed at 0.5. + +|**Parameter**|**Cora**|**Citeseer**|**Pubmed**| +|---|---|---|---| +|LearningRate|0.003|0.005|0.003| +|TrainingEpochs|2000|2000|2000| +|EarlyStopping|150|150|150| +|EmbeddingSize|32|32|32| +|Number of Layers|3|3|3| + +Table 2: Training and Implementation Details for GNNs on Different Datasets + +## B.2 EXPERIMENTS IN SECTION 5.1 (OVERSMOOTHING ANALYSIS) + +In this section we mainly focus on observing oversmoothing for individual models rather than strictly comparing them. There is no rigourous grid search of parameters. The same settings are used across all methods for the same dataset. 0 _._ 5 is used as the dropping probability for both DropMessage and DropEdge. + +> 2[URL removed] + +14 + +|**Parameter**|**Cora**|**Citeseer**|**Cornell**|**Chameleon**|**Wisconsin**|**Texas**| +|---|---|---|---|---|---|---| +|LearningRate|0.01|0.005|0.002|3e-5|2e-5|5e-5| +|TrainingEpochs|2000|2000|2000|3500|500|500| +|EarlyStopping|150|150|150|450|150|150| +|EmbeddingSize|32|32|32|32|32|32| +|Number of Layers|128|128|128|128|128|128| + +Table 3: Training details for GNNs + +## B.3 EXPERIMENTS IN SECTION 5.2 (MODEL PERFORMANCE) + +In these experiments we attempt to compare model performance across different randrom dropping methods. As such, we perform a grid search on the learning rate. The ranges of this search are specified in the table and the search space is logarithmic. The same settings are used across all methods for the same dataset. + +|**Parameter**
LearningRate
TrainingEpochs
EarlyStopping
EmbeddingSize|**Cora 3**|**Citeseer 3**|**Cornell 3**|**Chameleon 3**|**Wisconsin 3**|**Texas 3**| +|---|---|---|---|---|---|---| +||2e-4 to 1e-6|2e-4 to 1e-6|2e-4 to 1e-6|1e-5 to 1e-6|1e-5 to 1e-6|2e-5 to 2e-6| +||2000|2000|2000|3500|500|500| +||150|150|150|450|150|150| +||32|32|32|32|32|32| + +Table 4: 3 layer models + +|**Parameter**|**Cora 32**|**Citeseer 32**|**Cornell 32**|**Chameleon 32**|**Wisconsin 32**|**Texas 32**| +|---|---|---|---|---|---|---| +|LearningRate|2e-4 to 1e-6|2e-4 to 1e-6|2e-4 to 1e-6|1e-5 to 1e-6|1e-5 to 1e-6|2e-5 to 2e-6| +|TrainingEpochs|4000|4000|4000|4500|5500|5500| +|EarlyStopping|550|550|550|1450|1450|1450| +|EmbeddingSize|32|32|32|32|32|32| + +Table 5: 32 layer models + +|**Parameter**|**Cora 64**|**Citeseer 64**|**Cornell 64**|**Chameleon 64**|**Wisconsin 64**|**Texas 64**| +|---|---|---|---|---|---|---| +|LearningRate|1e-3 to 2e-5|1e-3 to 2e-5|2e-4 to 2e-5|9e-4 to 9e-6|9e-4 to 9e-6|9e-4 to 9e-6| +|TrainingEpochs|4000|4000|4000|4500|5500|5500| +|EarlyStopping|550|550|550|1450|1450|1450| +|EmbeddingSize|32|32|32|32|32|32| + +Table 6: 64 layer models + +Moreover, there are method-specific parameters obtained using grid search. + +|**Parameter**|**Start**|**End**|**Search Space**| +|---|---|---|---| +|DropEdge _p_|0.2|0.8|Linear| +|DropMessage _p_|0.2|0.8|Linear| +|L2D _β_|0|100|Logarithmic| + +Table 7: Parameter Search Ranges + +15 + diff --git a/open_review/iclr2024_8798.json b/open_review/iclr2024_8798.json new file mode 100644 index 0000000000000000000000000000000000000000..6e3d6dde16c219e07a66d7a7db369b2c104ec784 --- /dev/null +++ b/open_review/iclr2024_8798.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8798", + "source": "iclr2024", + "source_year": 2024, + "title": "Efficient Large Language Models Fine-Tuning on Graphs", + "abstract": "Learning from Text-Attributed Graphs (TAGs) has attracted significant attention due to its wide range of real-world applications. The rapid evolution of large language models (LLMs) has revolutionized the way we process textual data, which indicates a strong potential to replace shallow text embedding generally used in Graph Neural Networks (GNNs). However, we find that existing LLM approaches that exploit text information in graphs suffer from inferior computation and data efficiency. In this work, we introduce a novel and efficient approach for the end-to- end fine-tuning of Large Language Models (LLMs) on TAGs, named LEADING. The proposed approach maintains computation cost and memory overhead comparable to the graph-less fine-tuning of LLMs. Moreover, it transfers the rick knowledge in LLMs to downstream graph learning tasks effectively with limited labeled data in semi-supervised learning. Its superior computation and data efficiency are demonstrated through comprehensive experiments, offering a promising solution for a wide range of LLMs and graph learning tasks on TAGs.", + "rebuttal": "### A Friendly Reminder\nDear Reviewer k4U4,\n\nWe are thankful for your valuable comments and suggestions. We hope that our responses have addressed all your concerns. As there is only one day remaining in the author-reviewer discussion period, we kindly request you let us know if you have any additional questions. We greatly appreciate your further feedback.\n\nIf you find our responses satisfactory, we would kindly request an update of the rating to reflect your assessment. Your feedback is valuable to us, and we appreciate your time and consideration.\n\nBest regards,\n\nAll authors\n\n### A Friendly Reminder\nDear Reviewer DmWL,\n\nWe are thankful for your valuable comments and suggestions. We hope that our responses have addressed all your concerns. As there is only one day remaining in the author-reviewer discussion period, we kindly request you let us know if you have any additional questions. We greatly appreciate your further feedback.\n\nIf you find our responses satisfactory, we would kindly request an update of the rating to reflect your assessment. Your feedback is valuable to us, and we appreciate your time and consideration.\n\nBest regards,\n\nAll authors\n\n### A Friendly Reminder\nDear Reviewer sP5C,\n\nWe are thankful for your valuable comments and suggestions. We hope that our responses have addressed all your concerns. As there is only one day remaining in the author-reviewer discussion period, we kindly request you let us know if you have any additional questions. We greatly appreciate your further feedback.\n\nIf you find our responses satisfactory, we would kindly request an update of the rating to reflect your assessment. Your feedback is valuable to us, and we appreciate your time and consideration.\n\nBest regards,\n\nAll authors\n\n### A Friendly Reminder\nDear Reviewer LoZg,\n\nWe are thankful for your valuable comments and suggestions. We hope that our responses have addressed all your concerns. As there is only one day remaining in the author-reviewer discussion period, we kindly request you let us know if you have any additional questions. We greatly appreciate your further feedback.\n\nIf you find our responses satisfactory, we would kindly request an update of the rating to reflect your assessment. Your feedback is valuable to us, and we appreciate your time and consideration.\n\nBest regards,\n\nAll authors\n\n### Further Response for your Concerns\nDear Reviewer, \n\nThank you so much for your feedback. We really appreciate that you express your remaining concerns, and we are happy to fully address them.\n\n(1) We would like to emphasize that our paper only focuses on LLM-GNN architecture for learning on text-attributed graphs, and all of our experiments (including the paper and rebuttal) are based on LLM-GNN. Therefore, our study does not deviate from the original topic of \"LLMs for GNNs\". \n\nIn our response, we mention the feasibility of replacing the LLM backbone to process other types of attributes, [...]\n\n### Further Response for your Concerns\nThanks for letting us know your remaining concern about the GPT-2 performance. We are happy to further clarify this.\n\n(1) In our response, we have shown that FT GPT-2 can achieve 70.8% (GCN) and 71.7% (GAT) accuracy on Cora, which aligns with your comment (higher than 52%). Please refer to \"Supervised-FT GPT-2 in the Table \"LEADING performance (%) with GPT-2\" of our response.\n\n\n(2) We want to point out that the performance of GLEM highly depends on the labeling ratio. In all of our experiments (for all LM backbones such as DeBERTa, BERT, and GPT-2), GLEM [...]\n\n### Rebuttal by Authors - Continue Post 2\n**Q2.** The performance of the proposed method is not superior. For example, on Cora dataset, the proposed method equipped with LLMs are inferior to the Shallow Embedding.\n\n**A2.** We would like to point out that the proposed LEADING method outperforms all LLM baselines on all datasets. Moreover, LEADING outperforms ”Shallow Embedding” by 4% and around 2% on ogbn-arxiv and PubMed, respectively. We also provide a further experiment based on ogbn-products. For simplicity, we utilize GraphSAGE as the downstream GNN backbone in this context. \n\nIn the prese [...]\n\n### Rebuttal by Authors - Continue Post 2\n**Q2.** Statistical significance tests are missing. It is unclear whether the gaps between LEADING and the baselines are statistically significant or not. In fact, the gaps on arXiv are quite subtle in Table 1, therefore p-values should be reported./Could you conduct statistical significance tests to compare LEADING with the baselines on arXiv?\n\n**A2.** Thanks for your suggestion. We perform 5 times experiments on both our proposed algorithm and the best baselines, GLEM, which has the closest performance as ours on ogbn-arxiv, here we show the results [...]\n\n### Rebuttal by Authors - Continue Post 2\n**Q2.** In order to fully grasp the importance of the techniques it is advisable to conduct ablation studies that elucidate their individual contributions. / The ablation study seems to have limitations. It would be beneficial to conduct ablation experiments to assess the individual contributions of neighbor decoupling and implicit modeling towards the observed improvements.\n\n**A2.** Thanks again for your suggestion. As discussed in previous answer, the improvements in prediction accuracy come from the improved scalability to support end-to-end traini [...]\n\n### Rebuttal by Authors - Continue Post 2\n**Q2.** The technical novelty is limited. Caching neighborhoods has been one of the common techniques to speed up GNN-LMs.\n\n**A2.** We respectively disagree with this comment. In our paper, we provide a comprehensive survey of related works, and no existing work can achieve end-to-end fine-tuning of LLMs on graphs. Our proposed algorithm is the first to achieve this goal and shows tremendously improved scalability: the training cost of LEADING is close to the training of LLMs without graphs (refer to the scalability analysis in Table 2 in our submissio [...]\n\n### Rebu\n[rebuttal truncated]", + "initial_scores": [ + 3, + 6, + 5, + 5 + ], + "score_mean": 4.75, + "score_variance": 1.58, + "score_spread": 3, + "score_min": 3, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "This paper proposes an approach combining GNNs with language models for learning on text-attributed graphs. Specifically, the proposed method uses a language model as a feature representation encoder for the textual node features, and then apply GNNs on top of it. The GNN and the language model are then trained/fine-tuned in an end-to-end way. The key innovation is that the proposed method caches some of the neighbor representation calculation, and also stops the gradient to neighbor representations to improve computational efficiency.\n\nSeveral reviewers commented that the proposed method is relatively straightforward with limited technical contribution. Furthermore, the proposed method isn't performing particularly well in comparison to GNN methods. Given the heavy computation overhead of introducing a language model, the benefit of the proposed method is rather questionable.", + "forum_id": "DVA0NDUdCQ", + "primary_area": "learning on graphs and other geometries & topologies", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_LoZg", + "review_id": "2iCBZx07nD", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 1115, + "edit_detected": true, + "edit_delta_seconds": 121749, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_sP5C", + "review_id": "tXpAJhoqp2", + "scores": { + "rating": 6, + "soundness": 2, + "presentation": 2, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 5503, + "edit_detected": true, + "edit_delta_seconds": 562127, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_DmWL", + "review_id": "Lj0tLNqVA4", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 2785, + "edit_detected": true, + "edit_delta_seconds": 695546, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_k4U4", + "review_id": "4fS92zL51b", + "scores": { + "rating": 5, + "soundness": 3, + "presentation": 3, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 2486, + "edit_detected": true, + "edit_delta_seconds": 792959, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8798.md b/open_review/iclr2024_8798.md new file mode 100644 index 0000000000000000000000000000000000000000..e59a8e3ba24aabc670c6564d1ef9be67794570cc --- /dev/null +++ b/open_review/iclr2024_8798.md @@ -0,0 +1,311 @@ + + +## EFFICIENT LARGE LANGUAGE MODELS FINE-TUNING ON GRAPHS + +Authors withheld for review + +## ABSTRACT + +Learning from Text-Attributed Graphs (TAGs) has attracted significant attention due to its wide range of real-world applications. The rapid evolution of large language models (LLMs) has revolutionized the way we process textual data, which indicates a strong potential to replace shallow text embedding generally used in Graph Neural Networks (GNNs). However, we find that existing LLM approaches that exploit text information in graphs suffer from inferior computation and data efficiency. In this work, we introduce a novel and efficient approach for the end-toend fine-tuning of Large Language Models (LLMs) on TAGs, named LEADING. The proposed approach maintains computation cost and memory overhead comparable to the graph-less fine-tuning of LLMs. Moreover, it transfers the rick knowledge in LLMs to downstream graph learning tasks effectively with limited labeled data in semi-supervised learning. Its superior computation and data efficiency are demonstrated through comprehensive experiments, offering a promising solution for a wide range of LLMs and graph learning tasks on TAGs. + +## 1 INTRODUCTION + +Graph neural networks (GNNs) have been widely used for representation learning on graphstructured data (Hamilton, 2020; Ma & Tang, 2021), and they achieve promising state-of-the-art performance on various graph learning tasks, such as node classification, link prediction, and graph classification. Numerous graphs within these domains exhibit nodes that are linked to textual attributes, leading to the prevalence of text-attributed graphs (TAGs). TAGs provide a graph-based framework for representing textual data and illustrating connections between phrases, sentences, or documents through edges. The fusion of textual attributes and graph topology constitutes a valuable wellspring of information, bolstering representation learning in real-world applications such as recommender systems (Jin et al., 2023), citation graphs (Hu et al., 2020; Yang et al., 2016), social networks (Hamilton et al., 2017), and knowledge graphs (Wang et al., 2021). + +In the context of GNNs, shallow text embeddings such as Bag-of-Words (Harris, 1954) and Word2Vec (Mikolov et al., 2013) are usually extracted from raw textual data and used as the numerical node attributes in GNNs due to their superior simplicity and efficiency. However, as they do not fully capture the complex textual semantic features, these approaches inherently restrict the performance of downstream tasks. On the other hand, the recursive feature aggregation in GNNs results in the well-known neighborhood explosion problem (Hamilton et al., 2017) such that the computation of each node involves its _L_ -hop neighbors with _L_ feature aggregation layers. This not only leads to significant scalability challenges but also limits the exploration of more complex and powerful deep learning techniques such as LLMs for the representation learning on TAGs. + +Recently, researchers have begun to explore the potential of pre-trained large language models (LLMs), such as BERT (Devlin et al., 2018), Deberta (He et al., 2020) and DistilBERT (Sanh et al., 2019), for representation learning on TAGs due to their unprecedented capabilities in language understanding and generation across a wide range of tasks. The commonly adopted approach follows a _cascaded structure_ (Chen et al., 2023). This entails an initial LLM fine-tuning step on downstream tasks such as node classification. Subsequently, the text embeddings extracted from the fine-tuned LLMs are leveraged as the initial node features for downstream GNNs. Although the cascaded structure is efficient, graph structural information is not incorporated in the fine-tuning of LLMs, resulting in sub-optimal performance. To address this issue, the _iterative structure_ has also been + +1 + +explored for the joint training of LLMs and GNNs. For instance, GLEM (Zhao et al., 2022) trains LLMs and GNNs separately in an iterative manner by generating pseudo labels for each other. In addition, _self-supervised learning_ has also been proposed to enhance LLMs by link prediction tasks, exemplified by GIANT (Chien et al., 2021). + +The aforementioned works demonstrate the potential of exploiting LLMs on TAGs. However, these approaches still face limitations in _data efficiency_ or _computation efficiency_ . First, both cascaded and iterative structures encounter significant data inefficiency. When the labeled data is scarce, these methods struggle to effectively transfer the required knowledge for downstream tasks as the fine-tuning strategies do not utilize labeled data efficiently. Second, both iterative structures and the self-supervised learning approach introduce a substantial increase in computational overhead. This elevated computational cost poses scalability challenges, especially when dealing with largescale datasets. These shortcomings tremendously limit their applications in transferring the rich knowledge of LLMs to facilitate representation learning on TAGs. + +In this paper, we aim to develop an efficient LLM fine-tuning algorithm that not only effectively adapts LLMs to downstream tasks with limited labeled data ( _data efficiency_ ) but also exhibits superior scalability ( _computation efficiency_ ). To this end, we first reveal the _encoding redundancy_ and _propagation redundancy_ in fine-tuning LLMs with GNNs. To reduce these redundancies, we propose a novel LLM-GNN end-to-end training algorithm (LEADING) to efficiently fine-tune LLMs on TAGs. Our empirical study demonstrates that the proposed algorithm exhibits strong scalability comparable to graph-less LLMs fine-tuning. Moreover, it transfers the rich knowledge encoded in LLMs to downstream tasks much more effectively than existing approaches with limited labeled data. Therefore, it offers a promising solution for a wide range of LLMs and graph learning tasks on TAGs. + +## 2 RELATED WORK + +## In this section, we will mainly summarize related works exploring LLMs for learning on TAGs. + +**Basic structure of LLMs integrated with GNNs.** To address the limitations posed by the simple cascaded structure, which lacks the ability to harness topological information from the graph, several approaches have recently emerged to enhance Transformer structures or graph representation techniques. Some of these methods incorporate graph structure information into attention computation (Park et al., 2022), while others introduce orthogonal vectors for node and edge tokens to capture structural nuances (Kim et al., 2022). While these enhancements can be effective, they often involve complex attention mechanisms, rendering the direct representation of graph structure a challenging endeavor and significantly increasing the computation complexity of model training. + +**Advanced structure of LLMs integrated with GNNs.** To address the aforementioned challenges, researchers have explored approaches that combine Large Language Models (LLMs) with graphbased techniques. Notable examples include Graphformers (Yang et al., 2021), GLEM (Zhao et al., 2022), which employs iterative training as mentioned earlier, and Grad (Mavromatis et al., 2023), which uses GNNs for knowledge distillation on language models. However, these models have their drawbacks. They either rely on a powerful student model to generate high-quality soft labels, which necessitate abundant training data, or introduce significant computational overhead. Additionally, there are other approaches like GIANT (Chien et al., 2021), which uses neighbor prediction to fuse graph into LLMs, and E2EG (Dinh et al., 2022), which incorporates node classification into the joint training process of GIANT. However, these models also face scalability challenges. + +**Large-scale GNNs.** A substantial body of existing research is dedicated to enhancing the efficiency and scalability of large-scale GNNs through innovative designs. These designs encompass sampling methods, pre-computing, and post-computing techniques. Sampling methods employ minibatch training strategies to reduce computation and memory demands by selectively sampling nodes and edges. They mitigate the neighbor explosion issue through practices such as neighbor sampling (Hamilton et al., 2017; Chen et al., 2018a; Zeng et al., 2019) or feature memory updating (Fey et al., 2021; Xue et al., 2023). Pre-computing and post-computing methods separate the feature aggregation and prediction models into distinct stages. Pre-computing involves feature aggregation before training (Wu et al., 2019; Frasca et al., 2020; Sun et al., 2021), while post-computing includes + +2 + +label propagation after training (Huang et al., 2020). However, these methods have not been shown to be feasible for the end-to-end training or fine-tuning of LLMs. + +## 3 METHODOLOGY + +GNNs have been proven to be data-efficient due to their excellent prediction performance on semisupervised graph learning tasks where only very limited labeled data is available. The data efficiency of GNNs can be largely attributed to their ability to integrate node attributes and graph structure information in a unified message-passing framework. Through end-to-end training, it leverages the scarce labeled data to provide informative supervision for the vast pool of unlabeled nodes. However, GNNs’ data efficiency comes with the sacrifice of computation efficiency (Hamilton et al., 2017). + +From the LLMs perspective, most of the existing approaches exploiting LLMs for learning on TAGs fall short in data efficiency and thus fail to effectively adapt the rich knowledge in LLMs to downstream graph learning tasks as discussed in Section 1 and Section 2. We conjecture that their data inefficiency originates from the fact that existing methods can not fine-tune LLMs with graph learning in an end-to-end manner due to the scalability challenges in both LLMs and GNNs. + +Motivated by the above analyses, we aim to improve the data efficiency of fine-tuning LLMs for graph learning on TAGs by developing an end-to-end LLM-GNN training approach. To this end, we have to deal with the scalability challenges coupled with LLMs and GNNs. In this section, we will first analyze the computation redundancy in fine-tuning LLMs with GNNs. Then we propose a novel end-to-end fine-tuning strategy (LEADING) to reduce these redundancies, which leads to a highly efficient and scalable solution. Before that, we first introduce the notations as follows. + +**Notations.** A graph is represented by _G_ = ( _V, E_ ) where _V_ = _{v_ 1 _, . . . , vN }_ is the set of nodes and _E_ = _{e_ 1 _, . . . , eM }_ is the set of edges. For a text-attributed graph, each node _vi_ is associated with a sequential of raw text feature. We denote the _d_ -dimensional hidden feature vectors of nodes as **X** _∈_ R _[N][×][d]_ . The graph structure of _G_ can be represented by an adjacency matrix **A** _∈_ R _[N][×][N]_ , where **A** _ij >_ 0 when there exists an edge between node _vi_ and _vj_ , and **A** _i,j_ = 0 otherwise. The symmetrically normalized graph Laplacian matrix is defined as **L**[˜] = **I** _−_ **A**[˜] with **A**[˜] = **D** _[−]_[1] _[/]_[2] **AD** _[−]_[1] _[/]_[2] where **D** is the degree matrix. + +## 3.1 COMPUTATION REDUNDANCY IN LLM-GNN + +Although the end-to-end LLM-GNN training potentially offers the advantage of data efficiency, it does come with tremendous scalability limitations. While various sampling approaches have been proposed to improve the scalability and efficiency of GNN training, the integration of LLMs with GNNs in an end-to-end training paradigm introduces its own unique hurdles, primarily due to the huge computation and memory costs of LLMs due to their giant sizes. To address these challenges, we first provide a novel and insightful analysis of computation redundancy in the end-to-end training framework, such as encoding redundancy in LLMs and propagation redundancy in GNNs, which pinpoints the scalability bottleneck we can try to reduce. + +**Encoding Redundancy.** In the integration of LLMs with GNNs, we have to adopt mini-batch sampling to reduce the computation and memory costs due to the giant size of LLMs. However, existing sampling strategies of GNNs exhibit heavy redundancy that requires frequently repeated LLM encoding of node features. Taking the mini-batch sampling in Figure 1 as an example, the node features need to be encoded by LLMs multiple times through every epoch, either as target nodes themselves or as neighbors of other target nodes. For example, _V_ 1 serves as a target node in Batch 1 and serves as a neighbor node in Batch 2 and Batch 3. However, the LLM embedding of the node features will not have notable changes between the mini-batch iterations due to the nature of model fine-tuning. + +The above analysis implies that a significant amount of computation on LLM encoding is redundant. This redundancy becomes particularly considerable when we employ smaller batch sizes, as typically used in LLMs, as well as when we introduce more aggregation layers to capture long-distance information in GNNs. According to our statistical analysis on ogbn-arxiv dataset, during each epoch in the training of a 2-layer GCN with GraphSAGE sampling, the node feature of each node is encoded as a target node only once but as a neighbor node 19 times on average when the batch size + +3 + +is 1024 (25 times when the batch size is 64). For a 5-layer GCN that requires sampling from 5-hop neighbors, the node feature of each node is encoded 96 times as a neighbor node on average. This statistical analysis clearly verifies the LLM encoding redundancy in mini-batch GNNs. + +**==> picture [238 x 74] intentionally omitted <==** + +Figure 1: Encoding Redundancy in Mini-batch GNNs. + +**Propagation Redundancy.** Besides the LLM encoding redundancy, there also exists propagation redundancy in GNNs. As discovered by a recent work (Xue et al., 2023), the node embedding in the GNN layers will not change notably over the training iterations but the node information is propagated multiple times repeatedly in each iteration to capture long-distance dependency on graphs. This propagation redundancy causes huge sampling, memory, and computation costs that increase significantly with the number of aggregation layers employed. + +Next, we will propose a Large language models fine-tuning on Graph (LEADING) algorithm that tackles the encoding redundancy in Section 3.2 and propagation redundancy in Section 3.3. + +## 3.2 LEADING: NEIGHBOR DECOUPLING + +**==> picture [238 x 153] intentionally omitted <==** + +Figure 2: Two-pipeline training process for our proposed LEADING algorithm. + +Due to the huge computation and memory cost of LLMs, it is imperative to reduce the redundant LLM encoding computation. Our first observation is that for a sampled subgraph, only the target nodes obtain accurate aggregated features and gradients. On the contrary, the major role of neighbor nodes is to facilitate predictions for target nodes but they may not obtain accurate aggregation features and gradients due to their missing neighbors. In other words, the mini-batch neighbor sampling tries to maximally maintain the neighbors of target nodes but the neighbors of neighbors might be out of the batch. As a result, it is feasible to only use the gradient of target nodes to update the LLMs. The second key observation is that the LLM embedding will not change fast during the fine-tuning stage such that we do not need to update the LLM embedding of neighbor nodes in real time. + +**Neighbor Decoupling.** These key observations motivate us to design a novel training algorithm that fully decouples the LLM computation of target nodes and their neighbor node as shown in Figure 2 and Algorithm 1. To reduce the encoding redundancy, we opt to segregate the encoding of target and neighbor nodes into two distinct pipelines. On the one hand, for pipeline 1, the LLM only computes the encoding of target nodes **X** 1 (line 5). It then retrieves the LLM embedding of neighbor nodes **X** neighbor from the memory bank of encoded feature embedding and concat **X** 1 and **X** neighbor as the + +4 + +node embedding of the whole subgraph (line 7) before being fed into GNNs (line 8). On the other hand, for pipeline 2, the LLM randomly sample node features from the whole graph and compute their LLM embedding without requiring gradient (line 3). The computed LLM embedding from both pipeline 1 (line 6) and pipeline 2 (line 4) will be cached in the memory to update the embedding and reduce embedding staleness. + +This two-pipeline neighbor decoupling approach offers two significant benefits. First, it completely resolves the encoding redundancy problem, as the encoding times of each node in each epoch are controlled by the batch size used in the second pipeline. For instance, if two pipeline takes the same batch size, each node feature only needs to be encoded by LLM twice, which significantly reduces the computation cost. Second, the memory cost will be significantly reduced since the first pipeline that involves back-propagation training only needs to process target nodes without worrying about the neighbor explosion, which is the key to LLM fine-tuning. + +## **Algorithm 1** LEADING Algorithm + +**Input:** Input Graph _G_ = ( _V, E_ ), Pre-trained LLM _f_ ( **T** _,_ Θ[0] ) **Output:** Fine-Tuned LLM _f_ ( **T** _,_ Θ _[∗]_ ) 1: **Begin** 2: **for** each mini-batch text **T** 1 in pipeline 1; each mini-batch text **T** 2 in pipeline 2 **do** 3: **X** 2 = _f_ ( **T** 2 _,_ Θ _[k]_ ): Neighbor Nodes Encoding (without gradients) 4: Cache into Memory **M** _←_ **X** 2 5: **X** 1 = _f_ ( **T** 1 _,_ Θ _[k]_ ): Target Nodes Encoding (with gradients) 6: Cache into Memory **M** _←_ **X** 1 7: **X** in = Concat( **X** 1 _,_ **X** neighbor) 8: **X** out = GNN( **X** in) 9: Compute Loss and Gradient Update 10: **end for** + +## 3.3 LEADING: IMPLICIT GRAPH MODELING + +While the proposed two-pipeline neighbor decoupling technique can be used in any downstream GNNs, we aim to further improve its scalability by reducing propagation redundancy in GNNs. Motivated by recent advances in implicit models such as Neural ODE (Chen et al., 2018b), IGNN (Gu et al., 2020), and DEQ (Bai et al., 2019), as well as the unified view of graph signal denoising (Ma et al., 2021), we utilize an implicit graph modeling for feature aggregation in just one layer following IGNN and DEQ, which significantly reduces the memory cost of saving intermediate feature embedding. Moreover, motivated by LazyGNN, we reuse the computation results between training iterations to reduce computation costs. + +In particular, the forward computation works as follows (similar to APPNP (Klicpera et al., 2018)): + +**==> picture [302 x 30] intentionally omitted <==** + +where _l_ and _k_ denote the index of layers and training iterations, respectively. The propagation starts from the aggregated feature **X** _[k] L[−]_[1] from the previous iterations, which reduces propagation cost. The backward propagation works as follows: + +**==> picture [338 x 25] intentionally omitted <==** + +where **G** _[k]_ 0[provides an approximation for gradient] _∂∂_ **X** _L[k]_ 0[.][Similarly, the backward propagation starts] from the gradient in previous iterations **G** _[k]_ 0 _[−]_[1] . Finally, the gradient of target nodes can be retrieved from **G** _[k]_ 0[and used for further back-propagation in the LLM] _[ f]_[(] **[T]**[1] _[,]_[ Θ] _[k]_[)][.][After the end-to-end fine-] tuning, we can utilize the tuned LLM to generate feature embedding, which serves as the initial embedding for any downstream GNNs. + +5 + +## 3.4 COMPUTATION COMPLEXITY ANALYSIS + +**LLM Complexity Analysis.** Suppose _N_ is the total number of nodes and _C_ is the computation complexity of encoding one node feature by LLMs. The total computation complexity of LLM encoding in the proposed LEADING algorithm is _O_ ( _NC_ ), which has a nice linear scaling in terms of graph size (number of nodes) but is independent of the graph density (number of edges). + +Regarding memory complexity, suppose _O_ ( _S_ ) is the memory complexity for executing forward and backward propagation per node. For the mini-batch sampling, suppose _T_ and _B_ are the batch sizes of target nodes and neighbor nodes, respectively. Typically, we have _B ≫ T_ . Then the total memory complexity for LEADING is _O_ ( _TS_ ), which is the same as training LLMs without using graphs. It is much lower than the normal GNN training strategy whose memory complexity is _O_ (( _B_ + _T_ ) _S_ ). These complexity analyses indicate the intriguing scalability of LEADING in the LLM phase. + +**GNN Complexity Analysis.** Suppose _N_ is the total number of nodes, _L_ is the number of propagation layers, and _H_ is the size of hidden units, and _M_ is the number of edges. Performing one feature aggregation in GNNs requires a sparse-dense matrix multiplication, which involves approximately _O_ ( _MH_ ) operations. Consequently, the computation complexity for both forward feature aggregations and backward gradient aggregations in GNNs is approximately _O_ (2 _LMH_ ) per epoch. It is worth noting that LEADING has fewer layers _L_ compared to existing approaches as described in Section 3.3. This reduction in the number of layers contributes to lowering the overall computation cost in feature aggregation. + +For memory complexity, _O_ ( _NH_ ) is required to store the intermediate state at each feature aggregation layer, so the total memory complexity for a normal GNN is _O_ ( _LNH_ ). However, our algorithm achieves a memory complexity of _O_ ( _NH_ ) because we utilize implicit gradient modeling, which does not requires the storage of feature in intermediate layers. Therefore, the memory cost is independent of the number of aggregation layers. This indicates a significant reduction in terms of memory cost. + +## 4 EXPERIMENT + +In this section, we present experiments to demonstrate the superior data efficiency and computation efficiency of the proposed end-to-end LLM-GNN fine-tuning method, namely LEADING. In particular, we try to answer the following questions: (Q1) Data efficiency: can our LEADING algorithm transfer the knowledge from LLMs to downstream graph learning tasks effectively with limited training data? (Section 4.1) and (Q2) Computation efficiency: can our LEADING algorithm be more scalable compared with other fine-tuning paradigms? (Section 4.2) + +**Datasets.** We conduct experiments on both small and large text-attributed graph datasets including Cora (McCallum et al., 2000), PubMed (Sen et al., 2008) and ogbn-arxiv (Hu et al., 2020). We evaluate the effectiveness of LLM fine-tuning by taking semi-supervised node classification problems as the downstream tasks. We randomly split the data into training/val/test sets 10 times for Cora and PubMed and report the mean and variance of accuracy following existing works (Kipf & Welling, 2016). We adopt the default labeling ratios of these datasets, i.e., 20 training nodes per class for Cora and PubMed (low labeling rate) and 53.7% for ogbn-arxiv (high labeling rate). + +**Baselines.** We compare the proposed LEADING algorithm with a set of LLM fine-tuning strategies: + +- **Shallow Embedding:** Default shallow embeddings provided by PyG (Fey & Lenssen, 2019). + +- **Pre-trained LLMs:** LLMs function as simple encoders without fine-tuning on labeled data, and the resulting feature embeddings are used as inputs for downstream GNNs. + +- **Supervised-FT LLMs:** LLMs are directly fine-tuned using the labeled data under the supervised setting. Subsequently, the text embedding generated by the fine-tuned LLMs is used as the node embedding for downstream GNNs. + +- **GIANT & GLEM:** We choose GIANT (Chien et al., 2021) and GLEM (Zhao et al., 2022) as the major baselines since they exhibit the excellent performance among all existing works. Moreover, GLEM is a representative method of iterative training strategy, while GIANT is a representative method of self-supervised training strategy. It is worth noting that due to the + +6 + +high training costs associated with GIANT, we only use the pre-trained features provided by their official repository. + +**Evaluation setting.** For LLMs, in order to ensure a fair comparison with the baselines across different datasets, we select the same LLMs as used in their respective studies. Specifically, we use BERT (Devlin et al., 2018) as employed in GIANT and DeBERTa (He et al., 2020) as used in GLEM. To evaluate the effectiveness of LLMs fine-tuning, we extract the CLS (classification) embedding from the last hidden states of fine-tuned LLMs as the text embeddings, following the setting in GLEM. For downstream GNNs, we conduct performance comparisons on Cora and Pubmed using two classic GNNs, namely GCN (Kipf & Welling, 2016) and GAT (Veliˇckovi´c et al., 2017). In the case of ogbn-arxiv dataset, we employ GCN and Rev-GAT (Li et al., 2021) following existing works (Chen et al., 2023). We perform all hyperparameter tuning following baselines. + +## 4.1 PREDICTION PERFORMANCE + +We evaluate the effectiveness of LLM fine-tuning by comparing the prediction accuracy on downstream GNNs. From the accuracy summarized in Table 1, we can make the following observations: + +- In the low labeling setting (Cora and Pubmed), LEADING outperforms all other LLM finetuning strategies. Notably, compared with Supervised-FT DeBERTa, LEDING significantly boosts the performance of the DeBERTa from 59 _._ 2% to 80 _._ 6% for GCN and from 57 _._ 4% to 81 _._ 4% for GAT on Cora. A similar improvement can be observed on PubMed as well. + +- On the contrary, GLEM (DeBERTa) performs badly in the low labeling rate setting. These comparisons clearly demonstrate the strong _data efficiency_ of the LEADING algorithm since it effectively transfers the knowledge from LLMs with very limited labeled data by end-toend LLM-GNN training. Note that we found that in the low labeling case, because of the poor quality of generated pseudo labels, GLEM actually achieves its best accuracy in a very special case when the ratio of pseudo labels is set to be 0, which will reduce GLEM to either pre-trained LLM (if using 0 learning rate) or supervised FT LLM. Hence we report the same performance as the best result obtained in pre-trained LLM and supervised FT LLM. + +- Another crucial aspect to emphasize is the substantial influence of data efficiency on LLM fine-tuning. In scenarios with limited labeled data, the traditional approach of Supervised Fine-tuning using true labels can negatively impact performance. This observation clarifies instances in our results (Table 1) where the Supervised-FT method achieves similar performance to that of Pre-trained LLMs; this occurrence arises because none fine-tuning is a special case of Supervised-FT when the learning rate is set to 0. This underscores the significance of data efficiency, a key focus of improvement in our LEADING algorithm. + +- Comparing Pre-trained DeBERTa with Supervised-FT DeBERTa, the fine-tuning without an end-to-end manner does not provide significant benefits in the low-labeling setting (Cora and PubMed), but it can become more helpful as the amount of training data increases (ogbn-arxiv). + +- In the high labeling setting (ogbn-arxiv), LEADING also achieves strong performance. For DeBERTa, LEADING achieves 76 _._ 1% and 77 _._ 3% accuracy for GCN and Rev-GAT, which are better than GLEM (75 _._ 9% and 76 _._ 9%), a model that has proven to be very strong in the high labeling setting (Chen et al., 2023). For BERT, LEADING achieves 73 _._ 8% and 74 _._ 8% accuracy for GCN and Rev-GAT, which are better or comparable with GIANT (73 _._ 3% and 75 _._ 9%). However, it should be noted that LEADING achieves this remarkable performance with much better computation efficiency and scalability as will be discussed in Section 4.2. + +## 4.2 SCALABILITY ANALYSIS + +In this section, we investigate the computation efficiency and scalability during the LLM fine-tuning stage. We select BERT and DeBERTa as the LLM architectures since they are used in the baselines of GIANT and GLEM. The results in Table 2 reveal the following noteworthy observations: + +- The iterative training strategy such as GLEM and self-supervised training strategy such as GIANT exhibit significantly higher memory cost or running time compared to the cascaded structure such as Supervised-FT. The computational requirements for GIANT are orders of magnitude higher than others, and it runs Out of Memory (OOM) in our experiment. + +7 + +Table 1: Prediction accuracy (%) of LLM fine-tuning strategies. The **best** are marked as bold. + +||**Cora**|**Cora**|**Pubmed**|**Pubmed**||**Arxiv**| +|---|---|---|---|---|---|---| +|**METHODS**|**GCN**|**GAT**|**GCN**|**GAT**|**GCN**|**Rev-GAT**| +|Shallow Embedding|**82**_._**0**_±_**0**_._**7**|**82**_._**3**_±_**0**_._**7**|78_._9_±_2_._0|77_._7_±_0_._9|71.7|73.6| +|Pre-trained DeBERTa|48_._5_±_1_._9|51_._0_±_1_._2|62_._1_±_0_._1|62_._6_±_0_._3|45.7|47.8| +|Supervised-FT BERT|—|—|—|—|73.0|73.8| +|Supervised-FT DeBERTa|59_._2_±_1_._2|57_._4_±_2_._0|62_._1_±_0_._1|61_._6_±_0_._1|74.7|75.8| +|GIANT (BERT)|—|—|—|—|73.3|75.9| +|GLEM (DeBERTa)|59_._2_±_1_._2|57_._4_±_2_._0|62_._1_±_0_._1|62_._6_±_0_._3|75.9|76.9| +|LEADING (BERT)|—|—|—|—|73.8|74.8| +|LEADING (DeBERTa)|80_._6_±_0_._3|81_._4_±_0_._6|**79**_._**5**_±_**0**_._**8**|**79**_._**3**_±_**0**_._**6**|**76.1**|**77.3**| + +- Notably, the proposed LEADING achieves a memory cost that is nearly identical to Supervised-FT LLM training without using graphs, which aligns with our expectations. This alignment is attributed to the two-pipeline neighbor decoupling and implicit graph modeling as introduced in Section 3. + +- The running time of LEADING is around 0 _._ 8 times higher than that of Supervised-FT, which is reasonable since the two pipelines are run in a sequential manner on the same GPU but it can be easily reduced by parallel computing. + +- The memory cost and running time align well with our computational complexity analysis in Section 3.4. + +Table 2: Scalability comparison between different LLM fine-tuning strategies. + +|**METHODS**|**Memory(GB)**|**Running Time(S)**| +|---|---|---| +|Supervised-FT BERT|11.5|8400| +|Supervised-FT DeBERTa|13.6|12200| +|GIANT (BERT)|OOM|N/A| +|GLEM (DeBERTa)|13.6|67634| +|LEADING (BERT)|11.7|15241| +|LEADING (DeBERTa)|13.9|22226| + +## 4.3 ABLATION STUDY + +**Scalibility study.** We present an ablation study on the memory usage on Cora and the average LLM encoding times of each node on ogbn-arxiv when training BERT with GCN in an end-to-end manner. We assess the memory usage based on two key factors: (1) different batch sizes while keeping 2 hops neighbors (sampling 10 neighbors for the first hop and 5 for the second hop for each node); (2) varying numbers of hops (sampling 10 neighbors for the first hop and 5 for the following hops for each node) while keeping a fixed batch size. + +The memory usage in Figure 3 indicates that a significant portion of the computation cost is attributed to the encoding of neighboring nodes. It also demonstrates that LEADING maintains the same memory cost as Supervised-FT LLMs (“Targets Only”) and is independent of the number of neighbors included. This highlights a significant scalability advantage. The average LLM encoding times of each node in Figure 4 indicate a considerable level of computational redundancy and this redundancy is affected by both batch size and number of neighbors. The results also show that + +8 + +our LEADING algorithm significantly reduces this computation redundancy due to the decoupled computation of target nodes and neighbor nodes. + +**==> picture [143 x 111] intentionally omitted <==** + +**==> picture [143 x 113] intentionally omitted <==** + +Figure 3: Memory Usage (GB) + +**==> picture [143 x 109] intentionally omitted <==** + +**==> picture [143 x 111] intentionally omitted <==** + +Figure 4: Average LLM Encoding Times + +Table 3: Prediction performance comparison between normal LLM-GNN training and LEADING. + +|**Method / Dataset**|**Cora**
**Pubmed**| +|---|---| +|Normal (Coupling neighbors)
LEADING (Decoupling neighbors)|81.6%
80.3%
81.3%
79.8%| + +**Neighbor Decoupling.** We present a simple ablation study to evaluate the impact on prediction performance caused by neighbor decoupling computation. We use DistilBERT (Sanh et al., 2019) with a 2-layer GCN in an end-to-end manner since it is a lightweight version of BERT that can be run faster. We compare two cases: the normal coupling of target and neighbor nodes and our neighbor decoupling approach. The results in Table 3 suggest that neighbor decoupling can achieve closely aligned performance as the coupling method within 0.5% difference, which verifies the rationality of LEADING as discussed in Section 3.2. + +## 5 CONCLUSION + +Exploring the potential of pre-trained LLMs for representation learning on TAGs has been of significant interest in recent years. However, it comes with significant efficiency issues in the integration of powerful LLMs and GNNs. In this work, we revisit and analyze the limitations of existing approaches with a special focus on data efficiency and computation efficiency. To resolve these limitations, this work develops a novel and efficient LLM-GNN end-to-end fine-tuning algorithm (LEADING) that not only effectively adapts LLMs to downstream graph learning tasks with limited labeled data but also exhibits strong scalability and efficiency. Comprehensive experiments validate its superior prediction performance and efficiency in both low labeling ratio and high labeling ratio settings. The proposed algorithm provides a promising solution for the end-to-end integration of LLMs and GNNs in many impactful real-world applications. In the future, we will explore the integration of the proposed LEADING algorithm with existing Parameter Efficient Fine Tuning (PEFT) approaches for applications of larger scales. + +9 + +## REFERENCES + +Shaojie Bai, J Zico Kolter, and Vladlen Koltun. Deep equilibrium models. _Advances in Neural Information Processing Systems_ , 32, 2019. + +- Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. _arXiv preprint arXiv:1801.10247_ , 2018a. + +- Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. _Advances in neural information processing systems_ , 31, 2018b. + +- Zhikai Chen, Haitao Mao, Hang Li, Wei Jin, Hongzhi Wen, Xiaochi Wei, Shuaiqiang Wang, Dawei Yin, Wenqi Fan, Hui Liu, et al. Exploring the potential of large language models (llms) in learning on graphs. _arXiv preprint arXiv:2307.03393_ , 2023. + +- Eli Chien, Wei-Cheng Chang, Cho-Jui Hsieh, Hsiang-Fu Yu, Jiong Zhang, Olgica Milenkovic, and Inderjit S Dhillon. Node feature extraction by self-supervised multi-scale neighborhood prediction. _arXiv preprint arXiv:2111.00064_ , 2021. + +- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. _arXiv preprint arXiv:1810.04805_ , 2018. + +- Tu Anh Dinh, Jeroen den Boef, Joran Cornelisse, and Paul Groth. E2eg: End-to-end node classification using graph topology and text-based node attributes. _arXiv preprint arXiv:2208.04609_ , 2022. + +Matthias Fey and Jan Eric Lenssen. Fast graph representation learning with pytorch geometric. _arXiv preprint arXiv:1903.02428_ , 2019. + +- Matthias Fey, Jan E Lenssen, Frank Weichert, and Jure Leskovec. Gnnautoscale: Scalable and expressive graph neural networks via historical embeddings. In _International conference on machine learning_ , pp. 3294–3304. PMLR, 2021. + +- Fabrizio Frasca, Emanuele Rossi, Davide Eynard, Ben Chamberlain, Michael Bronstein, and Federico Monti. Sign: Scalable inception graph neural networks. _arXiv preprint arXiv:2004.11198_ , 2020. + +- Fangda Gu, Heng Chang, Wenwu Zhu, Somayeh Sojoudi, and Laurent El Ghaoui. Implicit graph neural networks. _Advances in Neural Information Processing Systems_ , 33:11984–11995, 2020. + +- Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. _Advances in neural information processing systems_ , 30, 2017. + +William L Hamilton. Graph representation learning. _Synthesis Lectures on Artifical Intelligence and Machine Learning_ , 14(3):1–159, 2020. + +- Zellig Harris. Distributional structure. _Word_ , 10(2-3):146–162, 1954. doi: 10.1007/ 978-94-009-8467-7 ~~1~~ . URL [URL removed] 978-94-009-8467-7_1. + +- Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. Deberta: Decoding-enhanced bert with disentangled attention. _arXiv preprint arXiv:2006.03654_ , 2020. + +- Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. _Advances in neural information processing systems_ , 33:22118–22133, 2020. + +- Qian Huang, Horace He, Abhay Singh, Ser-Nam Lim, and Austin R Benson. Combining label propagation and simple models out-performs graph neural networks. _arXiv preprint arXiv:2010.13993_ , 2020. + +Wei Jin, Haitao Mao, Zheng Li, Haoming Jiang, Chen Luo, Hongzhi Wen, Haoyu Han, Hanqing Lu, Zhengyang Wang, Ruirui Li, et al. Amazon-m2: A multilingual multi-locale shopping session dataset for recommendation and text generation. _arXiv preprint arXiv:2307.09688_ , 2023. + +10 + +- Jinwoo Kim, Dat Nguyen, Seonwoo Min, Sungjun Cho, Moontae Lee, Honglak Lee, and Seunghoon Hong. Pure transformers are powerful graph learners. _Advances in Neural Information Processing Systems_ , 35:14582–14595, 2022. + +Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. _arXiv preprint arXiv:1609.02907_ , 2016. + +Johannes Klicpera, Aleksandar Bojchevski, and Stephan G¨unnemann. Predict then propagate: Graph neural networks meet personalized pagerank. _arXiv preprint arXiv:1810.05997_ , 2018. + +Guohao Li, Matthias M¨uller, Bernard Ghanem, and Vladlen Koltun. Training graph neural networks with 1000 layers. In _International conference on machine learning_ , pp. 6437–6449. PMLR, 2021. + +Yao Ma and Jiliang Tang. _Deep learning on graphs_ . Cambridge University Press, 2021. + +- Yao Ma, Xiaorui Liu, Tong Zhao, Yozen Liu, Jiliang Tang, and Neil Shah. A unified view on graph neural networks as graph signal denoising. In _Proceedings of the 30th ACM International Conference on Information & Knowledge Management_ , pp. 1202–1211, 2021. + +- Costas Mavromatis, Vassilis N Ioannidis, Shen Wang, Da Zheng, Soji Adeshina, Jun Ma, Han Zhao, Christos Faloutsos, and George Karypis. Train your own gnn teacher: Graph-aware distillation on textual graphs. _arXiv preprint arXiv:2304.10668_ , 2023. + +- Andrew Kachites McCallum, Kamal Nigam, Jason Rennie, and Kristie Seymore. Automating the construction of internet portals with machine learning. _Information Retrieval_ , 3:127–163, 2000. + +- Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. _arXiv preprint arXiv:1301.3781_ , 2013. + +Wonpyo Park, Woonggi Chang, Donggeon Lee, Juntae Kim, and Seung-won Hwang. Grpe: Relative positional encoding for graph transformer. _arXiv preprint arXiv:2201.12787_ , 2022. + +- Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. _arXiv preprint arXiv:1910.01108_ , 2019. + +- Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. _AI magazine_ , 29(3):93–93, 2008. + +- Chuxiong Sun, Hongming Gu, and Jie Hu. Scalable and adaptive graph neural networks with selflabel-enhanced training. _arXiv preprint arXiv:2104.09376_ , 2021. + +- Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. _arXiv preprint arXiv:1710.10903_ , 2017. + +- Luyu Wang, Yujia Li, Ozlem Aslan, and Oriol Vinyals. Wikigraphs: A wikipedia text-knowledge graph paired dataset. _arXiv preprint arXiv:2107.09556_ , 2021. + +- Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In _International conference on machine learning_ , pp. 6861–6871. PMLR, 2019. + +- Rui Xue, Haoyu Han, MohamadAli Torkamani, Jian Pei, and Xiaorui Liu. Lazygnn: Large-scale graph neural networks via lazy propagation. _arXiv preprint arXiv:2302.01503_ , 2023. + +- Junhan Yang, Zheng Liu, Shitao Xiao, Chaozhuo Li, Defu Lian, Sanjay Agrawal, Amit Singh, Guangzhong Sun, and Xing Xie. Graphformers: Gnn-nested transformers for representation learning on textual graph. _Advances in Neural Information Processing Systems_ , 34:28798–28810, 2021. + +- Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In _International conference on machine learning_ , pp. 40–48. PMLR, 2016. + +- Hanqing Zeng, Hongkuan Zhou, Ajitesh Srivastava, Rajgopal Kannan, and Viktor Prasanna. Graphsaint: Graph sampling based inductive learning method. _arXiv preprint arXiv:1907.04931_ , 2019. + +- Jianan Zhao, Meng Qu, Chaozhuo Li, Hao Yan, Qian Liu, Rui Li, Xing Xie, and Jian Tang. Learning on large-scale text-attributed graphs via variational inference. _arXiv preprint arXiv:2210.14709_ , 2022. + +11 + diff --git a/open_review/iclr2024_8801.json b/open_review/iclr2024_8801.json new file mode 100644 index 0000000000000000000000000000000000000000..d0a1771a18037fd2735c02d3247553d1d081226a --- /dev/null +++ b/open_review/iclr2024_8801.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8801", + "source": "iclr2024", + "source_year": 2024, + "title": "Exploiting Code Symmetries for Learning Program Semantics", + "abstract": "Large Language Models (LLMs) hold significant potential for automating program analysis, but current code LLMs face challenges in grasping program semantics. Our paper addresses this by formalizing program semantics through code symmetries and integrating them into LLM architectures for code analysis. We introduce a group-theoretic framework that defines code symmetries as semantics-preserving transformations, enabling precise reasoning within LLMs. Our solution, SymC, employs a novel variant of group-equivariant self-attention that is provably equivariant to code symmetries. We extensively evaluate SymC on four program analysis tasks, comparing it to eight baselines against eight code transformations. Our results show that SymC generalizes to unseen code transformations, outperforming the state-of-the-art code models by 30.7%. SymC, by design, stays invariant to semantics-preserving permutations, while state-of-the-art code models like WizardCoder and GPT-4 violate these invariances at a high rate (i.e., 14% and 43%, respectively).", + "rebuttal": "Dear reviewer 3XTL,\n\nThanks again for your constructive comments. We hope our responses satisfactorily addressed your concerns.\n\nDear reviewer Srm2,\n\nThanks so much again for your constructive comments. We would be grateful if you could let us know whether our responses, i.e., the experiments on comparing to code baselines, e.g., DOBF, CodeT5, GraphCoderBERT, CodeBERT, and UnixCoder, and the evaluation on a new task, i.e., defect prediction, satisfactorily answer your questions and if so, would you like to increase the score. Thanks!\n\nDear reviewer nM8R,\n\nThanks again for making the effort to review our paper. We would be grateful if you could let us know whether our responses, i.e., the experiments on adversarial attacks and GraphCodeBERT, satisfactorily answer your questions and if so, would you like to increase the score. Thanks!\n\nMoreover, even GGNN keeps its output invariant by predicting the same incorrect label most of the time, it still changes its prediction under simple semantics-preserving permutations. Here is one example in the test set, where GGNN predicts “*run*”:\n\n```Java\n1 private void applyNormalPattern(String modeStr, Matcher matcher) {\n2 boolean commaSeperated = false;\n3 for (int i = 0; i < 1 || matcher.end() < modeStr.length(); i++) {\n4 if (i > 0 && (!commaSeperated || !matcher.find())) {\n5 throw new IllegalArgumentException(modeStr);\n6 }\n7 String str [...]\n\n**Q3: Relatedly, models like GGNN may be a better comparison. Notably that model has lower invariance violation than LLMs. Given that GGNN also works on graphs associated to code, could you explain why it is not invariant to the code symmetry transformations you consider?**\n\nWe will answer this question from both conceptual and experimental perspectives.\n\n**Conceptually**, while GGNN incorporates the data and control flow graph, its particular dataflow construction *does not preserve* invariance to semantics-preserving permutations. For example, GGNN maintains edges for all reads and writes to [...]\n\n**Q1: The example and runtimes are helpful, I definitely recommend putting them in the new versions of the paper.**\n\nWe are grateful for your prompt response. We will definitely include them in the paper - we are working on drafting the figure/table and adding the discussion. We will update you as soon as we finish the draft. \n\n**Q2: One issue I have with the paper is the framing of SymC as an LLM (this is why I asked the question about the training procedure). The model is a Transformer with graph information included via relative positional encodings. But it cannot be trained or used for nex [...]\n\n**Q4: Illustrate cases where the relaxation of the interpretation graph to the program dependence graph is too conservative**\n\nAs described in our response to Reviewer 6HuJ, consider the case in binary analysis:\n\n```asm\n…\n1 mov rcx, [rbx]\n2 mov [rax], rdx\n…\n```\nWe have 2 nodes in PDG, i.e., {1,2} denoting 2 instructions, and the edge {1->2} because we can not easily eliminate the possibility that `[rbx]` and `[rax]` would point to the same memory location. This can lead to the spurious edge, rendering the permutation of 1 and 2 an invalid automorphism. In memory-bound applications, [...]\n\n**Q2 & Weakness 2: unclear why the F1/AUC results in Table 2 are not monotonic in the percentage of semantics-preserving permutations**\n\nWe do observe more statements involved in permutations do not necessarily imply more incorrect predictions. One possible explanation is that permutations involving a higher percentage of statements could represent more extensive changes in the code. Such changes might more closely resemble variations found in real-world code distributions. In contrast, single permutations, which only involve altering a single pair of statements, may be less representative of [...]\n\nWe really appreciate your constructive comments. We address each of your points below.\n\n**Weakness 1.1: The definition of the Aut(PDG) distance matrix to be a bit hard to reason about**\n\nWe will clarify the definition of the distance matrix used in our paper. In general, there can be various distance matrices to represent the graph in self-attention layers and preserve automorphisms as long as it satisfies the two properties of Lemma 4 & 5 (see proofs in Lemma 6 in Appendix). We chose to represent the distance between two nodes using their distance to their lowest common ancestor, based on the [...]\n\n**Weakness 3: The paper does not discuss potential limitations of the SymC model, such as its requirement for input code to be processed by a parser and a static analysis tool. This requirement may limit the model's applicability when dealing with incomplete or syntactically incorrect code, such as in code completion tasks or when faced with an empty Python block. While it is acceptable to establish certain assumptions for input code, these assumptions must be explicitly discussed rather than overlooked.**\n\nAs shown in our response to Reviewer 6HuJ, statically analyzing the input code incurs a [...]\n\n* New results\n\nHowever, we agree with the reviewer that there are many ML4code tasks, like defect prediction, that can benefit from code symmetry. To demonstrate that effect, we follow the reviewer’s suggestion by incorporating the defect prediction and include our preliminary results in the following. \n\nParticularly, we consider defects4j dataset [7] and follow CodeXGLUE to formulate the task as a binary classification (buggy/non-buggy) given the function. We ensure the number of buggy and non-buggy samples are the same, and measure the prediction accuracy on the original and permuted samples [...]\n\n* Regarding HumanEval and MBPP\n\nOur paper focuses on representing *program* semantics using code symmetry groups, and thus we focus exclusively on *program analysis tasks* that take a *program* as input. *Program synthesis tasks*, like those suggested by the reviewer (HumanEval and MBPP), \n[rebuttal truncated]", + "initial_scores": [ + 6, + 3, + 3, + 8 + ], + "score_mean": 5.0, + "score_variance": 6, + "score_spread": 5, + "score_min": 3, + "score_max": 8, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "This paper introduces SymC, a novel approach that leverages code symmetries, defined through group-theoretic principles, to enhance large language models (LLMs) for program analysis. The paper defines a symmetry group over program interpretation graphs, and then relaxes this to the sound overapproximation of dependence graphs. SymC achieves significant improvements by embedding a group-equivariant self-attention mechanism within the Transformer architecture. The empirical results show that SymC is competitive or surpasses baseline models, including WizardCoder and GPT-4, in four specific tasks. Most of the reviewers would have appreciated more details about the program graphs and their construction. An insufficient experimental comparison with previous work was also mentioned in multiple reviews.", + "forum_id": "zDMM4ZX1UB", + "primary_area": "learning on graphs and other geometries & topologies", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_6HuJ", + "review_id": "n5iubmHjds", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 2, + "contribution": 3, + "confidence": 2 + }, + "review_text_chars": 1574, + "edit_detected": true, + "edit_delta_seconds": 738707, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_nM8R", + "review_id": "lxPosBP7P5", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 2870, + "edit_detected": true, + "edit_delta_seconds": 1070759, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_Srm2", + "review_id": "PIQ06LvDmV", + "scores": { + "rating": 3, + "soundness": 1, + "presentation": 2, + "contribution": 3, + "confidence": 5 + }, + "review_text_chars": 3015, + "edit_detected": true, + "edit_delta_seconds": 1126130, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_3XTL", + "review_id": "ACm5w7GwRr", + "scores": { + "rating": 8, + "soundness": 4, + "presentation": 3, + "contribution": 4, + "confidence": 4 + }, + "review_text_chars": 2482, + "edit_detected": true, + "edit_delta_seconds": 1289269, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8801.md b/open_review/iclr2024_8801.md new file mode 100644 index 0000000000000000000000000000000000000000..57b51d48900832d580fbe65c261df2776a01c385 --- /dev/null +++ b/open_review/iclr2024_8801.md @@ -0,0 +1,608 @@ +## - EXPLOITING CODE SYMMETRIES FOR LEARNING PRO GRAM SEMANTICS + +Authors withheld for review + +## ABSTRACT + +Large Language Models (LLMs) hold significant potential for automating program analysis, but current code LLMs face challenges in grasping program semantics. Our paper addresses this by formalizing program semantics through code symmetries and integrating them into LLM architectures for code analysis. We introduce a group-theoretic framework that defines code symmetries as semantics-preserving transformations, enabling precise reasoning within LLMs. Our solution, SYMC, employs a novel variant of group-equivariant self-attention that is provably equivariant to code symmetries. We extensively evaluate SYMC on four program analysis tasks, comparing it to eight baselines against eight code transformations. Our results show that SYMC generalizes to unseen code transformations, outperforming the state-of-the-art code models by 30.7%. SYMC, by design, stays invariant to semantics-preserving permutations, while code LLMs like WizardCoder and GPT-4 violate these invariances at a high rate (i.e., 14% and 43%, respectively). + +## 1 INTRODUCTION + +Automated program analysis using Code Large Language Models (LLMs) has become widely popular for software engineering and security tasks (Liu et al., 2023; Maniatis & Tarlow, 2023), but current code LLMs struggle with generalization to new code (Henke et al., 2022; Rabin et al., 2021; Gao et al., 2023b;a; Yefet et al., 2020; Bundt et al., 2022; Zhang et al., 2023). This paper aims to enhance LLMs by establishing and preserving fundamental code symmetries, drawing inspiration from translation and rotation symmetries that typically hold in vision (Cohen & Welling, 2016). + +**Code symmetry.** Intuitively, symmetry of code refers to any transformation applied to a code block that preserves the semantics (i.e., input-output behavior) of the original code. Consider a (sequential) code fragment x=2;y=4. Reordering the instructions to y=4;x=2 does not change the semantics of the code. Of course, any code analysis task that depends solely on the semantics of the code (e.g., bug detection) needs to preserve these symmetries by staying invariant to the transformations. Formally, given a code block _c_ and a set of symmetries _G_ , an LLM _m_ should ensure _∀g ∈ G, m_ ( _g_ ( _c_ )) = _m_ ( _c_ ). **Limitations of existing approaches.** A popular way to train LLMs to be invariant to code symmetries is data augmentation and pre-training (Luo et al., 2023; Feng et al., 2020). However, this approach is not very effective due to the sheer number of possible symmetries and their compositions. Specifically, this approach has two major limitations: (1) it is prohibitively expensive to enumerate each possible variant _g_ ( _c_ ); and (2) it provides no guarantee of invariance even for the seen symmetries. In fact, we find that existing state-of-the-art LLMs break desired invariances at an alarmingly high rate (e.g., 14% in WizardCoder and 43% in GPT4 as shown in Table 1) even for simple code symmetries like a single statement permutation. + +**Our approach.** We introduce a group-theoretic framework to precisely define code symmetries in terms of semantics-preserving permutations of statements and create LLM architectures that inherently preserve these symmetries. Using this framework, we present SYMC, an LLM architecture designed to guarantee invariance to semantics-preserving statement permutations. This is achieved through a _G_ -equivariant code representation learning ( _r_ ) followed by a _G_ -invariant predictive learning ( _p_ ), with _G_ determined based on the graph automorphisms of the code block’s interpretation graph (a generalization of program dependence graph). + +1 + +**==> picture [398 x 157] intentionally omitted <==** + +**----- Start of picture text -----**
+Table 1: Invariance c1: assert a > 0 c2: assert b > 0 c1: assert a > 0 c2: assert b > 0
violation rate across c2: assert b > 0 c1: assert a > 0 c2: assert b > 0 c1: assert a > 0
different code models cc34: area = a * b: return area cc34: area = a * b: return area cc34: area = a * b: return area cc34: area = a * b: return area
(darker colors indicate
more violations).
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Violation
SYMC 0% "calculate_area" "calculate_area" "check"
GPT-4 43%
WizardCoder 14% (a) SYMC (b) Existing LLMs
code2vec 61%
code2seq 52% Figure 1: (a) SYMC as a G -invariant function name predictor where G is a
GGNN 7% group of semantics-preserving statement permutations g . (b) Code LLMs
not preserving the symmetries in G and thus incorrectly change the output.
**----- End of picture text -----**
+ +Figure 1a shows a concrete example of the benefit SYMC when deployed for function name prediction. The code snippets illustrate a semantics-preserving statement reordering. SYMC enforces its output to stay invariant via keeping its learned representation _G_ -equivariant, where the code representation ( _e_ 1 _, e_ 2 _, e_ 3 _, e_ 4) is transformed into ( _e_ 2 _, e_ 1 _, e_ 3 _, e_ 4), followed by a _G_ -invariant prediction module. By contrast, Figure 1b shows an existing code model (Jin et al., 2022) that does not preserve permutation symmetry. In this case, the code representation ( _e_ 1 _, ..., e_ 4) is transformed into a completely different set of embeddings ( _e[′]_ 1 _[, ..., e][′]_ 4[)][, leading to a changed prediction.] + +**Result summary.** We evaluate SYMC on four program analysis tasks against various source code and binary analysis baselines. For semantics-preserving permutations, SYMC is guaranteed to stay invariant while the state-of-the-art code LLMs like WizardCoder and GPT-4 violate the invariance at a high rate, i.e., 14% and 43%, respectively. For other semantics-preserving source code transformations beyond permutations, SYMC surpasses the state-of-the-art code baselines, namely WizardCoder and GPT-4, by 1.63% and 16.1%, respectively, while maintaining a model size 108 _×_ smaller. On sophisticated transformations introduced by compiler optimizations and obfuscations, SYMC outperforms the extensively pre-trained binary analysis baseline, PalmTree, by 30.7% without requiring any pre-training. + +**Contributions.** (1) We establish a foundational framework using semantics-preserving code symmetries, ensuring provable generalization to new samples resulting from their compositions. (2) We introduce a mechanism to identify symmetries in programs through graph automorphism. (3) We present a novel LLM architecture with a new variant of self-attention equivariant to program symmetries. (4) Our approach demonstrates effectiveness in generalizing invariance to various semantics-preserving transformations, surpassing state-of-the-art code LLMs in program analysis. + +## 2 PRELIMINARIES + +This section briefly describes the symmetry groups. See Appendix A for a more formal description. + +**Symmetry group.** A _symmetry group_ ( _G, ◦_ ) consists of a non-empty set _G_ of transformations and a binary operator _◦_ : _G × G → G_ , where _◦_ operates on two elements (i.e., transformations) in _G_ , e.g., _x, y ∈ G_ , and produces a new transformation _z_ = _x ◦ y, z ∈ G_ . The binary operator has to be associative, invertible, and there exists an identity _∃_ **1** _∈ G, ∀x ∈ G, x ◦_ **1** = **1** _◦ x_ . + +**Group action.** The elements of a _G_ are abstract transformations that become concrete when they _act_ on some set _X_ , i.e., they transform _x ∈ X_ into _x[′] ∈ X_ while keeping some properties of _x invariant_ . Formally, an action _•_ of a symmetry group _G_ is a binary operation defined on a set of objects _X_ , i.e., _•_ : _G × X → X_ , where it is also associative and has an identity. + +It is common in the group theory literature to use _◦_ to denote both _action_ and _composition_ , when it is clear from the context (Higgins et al., 2018). It is also customary to interchange _g_ ( _x_ ) and _g ◦ x_ . Therefore, we treat _g •_ ( _h • x_ ), _g ◦_ ( _h ◦ x_ ), and _g_ ( _h_ ( _x_ )) as the same in the rest of this paper. + +2 + +**Invariance and equivariance.** A symmetry group comes with two properties, namely _invariance_ and _equivariance_ , that formalize the concept of preservation of some properties when a set _X_ is acted upon by _G_ . Let _f_ be a function that maps each element _x ∈ X_ to a corresponding element _y_ in the set _Y_ , indicating the property’s value for that particular element. _f_ is called _G_ **-invariant** if _∀g ∈ G, ∀x ∈ X, f_ ( _g◦x_ ) = _f_ ( _x_ ). _f_ is called _G_ **-equivariant** if _∀g ∈ G, ∀x ∈ X, f_ ( _g◦x_ ) = _g◦f_ ( _x_ ). + +Given the definition of _G_ -equivariant function, we have the following lemmas: **Lemma 1.** Let _f_ 1 and _f_ 2 be two functions that are both _G_ -equivariant and _h_ = _f_ 1 _◦ f_ 2 be the new function composed by _f_ 1 and _f_ 2. _h_ is also _G_ -equivariant. + +**Lemma 2.** Let _f_ 1 and _f_ 2 be two functions where _f_ 1 is _G_ -equivariant and _f_ 2 is _G_ -invariant, and _h_ = _f_ 2 _◦ f_ 1 be the new function composed by applying _f_ 1 and then _f_ 2. _h_ is _G_ -invariant. + +## 3 METHODOLOGY + +This section describes the definitions of the equivariance/invariance properties for code models, the construction of group-equivariant self-attention layers, and the group-invariant code analysis model. + +## 3.1 INVARIANCE & EQUIVARIANCE FOR CODE MODELS + +**Code representation units.** We establish formal definitions of the code space as a collection of code blocks, which serves as the input space for representation learning. We then proceed to define representation learning and predictive learning in the code space. + +**Definition 3.1.** A **code representation unit** (e.g., procedure) _c_ consists of _n_ instructions from an instruction set _I_ , i.e., _c ∈ I[n]_ . The **code space** _I[n]_ is the set of all code representation units of interest. + +A typical Code Representation Unit (CRU) is a method with well-defined interfaces, ensuring controlled interaction with other methods, without arbitrary control transfers. Below, we provide formal definitions for learning program representation and predictive learning. + +**Definition 3.2. Representation learning for code** involves learning a function _r_ that maps a CRU _c ∈ I[n]_ to a point in the code representation space R _[d][×][n]_ , _r_ : _I[n] →_ R _[d][×][n]_ , where R denotes the set of real numbers, and _d_ denotes the dimension of the vector to which each instruction is mapped. **Definition 3.3. Predictive learning for code** entails learning a function _p_ : R _[d][×][n] →_ R _[L]_ that maps the code representation produced by the representation learning _r_ to a label space R _[L]_ . R _[L]_ becomes concrete in the context of downstream analyses (§5). + +In this framework, the earlier layers of the neural network serve as the representation learning function _r_ , learning program representations. The subsequent layers serve as the predictive learning function _p_ , making predictions based on analysis-specific labels, such as function names. Therefore, the whole network computation can be thought of as a composition of _r_ and _p_ , i.e., _p ◦ r_ . + +In the following, we establish formal properties for code analysis models with explicit representation learning _r_ and predictive learning _p_ based on _G_ -equivariance/invariance. + +**Definition 3.4** ( _G_ **-equivariant code representation learning).** Let _G_ be a symmetry group consisting of _semantics-preserving transformations_ applied to a CRU _c ∈ I[n]_ . A representation function _r_ : _I[n] →_ R _[d][×][n]_ is _G_ -equivariant if for every _g ∈ G_ and _c ∈ I[n]_ , we have _g ◦ r_ ( _c_ ) = _r_ ( _g ◦ c_ ). + +Note that here the input space of _r_ ( _I[n]_ ) and its output space (R _[d][×][n]_ ) are both sets of size _n_ , where each instruction _I_ is mapped to a _R[d]_ vector by the representation function. This consideration is necessary to ensure the symmetry group can act on both sets appropriately. + +**Definition 3.5** ( _G_ **-invariant code predictive learning).** Let _G_ be a symmetry group consisting of _semantics-preserving transformations_ applied to program representation vector _c ∈ I[n]_ . A predictive learning function _p_ : R _[d][×][n] →_ R _[L]_ is _G_ -invariant if _∀g ∈ G, ∀e ∈_ R _[d][×][n]_ , _p_ ( _g ◦ e_ ) = _p_ ( _e_ ). + +Stacking _p_ on top of _r_ , _p ◦ r_ , leads to a _G_ -invariant model according to Lemma 2. + +## 3.2 SEMANTICS-PRESERVING PROGRAM SYMMETRIES + +A semantics-preserving program symmetry is a program transformation preserves the input and output behavior of a CRU when interpreted by the program interpretation function _f_ . The program + +3 + +interpretation function takes a CRU _c ∈ I[n]_ as input, where _I_ represents the set of possible input values to execute CRU, and produces output values represented by the set _O_ . + +**Definition 3.6.** A **semantics-preserving program symmetry** _g_ is a transformation acting on _c ∈ I[n]_ ( _g_ : _I[n] → I[n]_ ) such that _∀in ∈I, ∀out ∈O, f_ ( _g ◦ c, in_ ) = _f_ ( _c, in_ ) = _out_ . **Definition 3.7.** A semantics-preserving **program symmetry group** _G_ is a set of semantics-preserving program symmetries that also satisfy the group axioms. + +**Local and global program symmetry.** We call _g local program symmetry_ because it acts on a single CRU _c ∈ I[n]_ . In this paper, we do not consider _global_ program symmetry defined over the entire program space _I[n]_ , e.g., rotation as in image space. This is because each independent sample _c_ will have its own symmetries corresponding to its semantics-preserving transformations, and we develop model architectures that preserve the specific code symmetry group for each individual sample (§4). + +## 3.3 _Aut_ ( _IG_ ): A PROGRAM SYMMETRY GROUP + +In this paper, we focus on a specific symmetry group that maintains the structural integrity of CRUs by utilizing their inherent compositional structure. However, note that this approach is not the only way to form code symmetry groups and does not encompass all possible code symmetries. We leave further exploration in these directions to future research. + +Next, we describe the compositional structure of the program interpreter _f_ operating on a CRU, enabling us to define the program interpretation graph that links CRUs to their input-output behavior. + +**Compositional structure of program interpreter** _f_ **.** The interpreter function _f_ (defined in §3.2) can be represented as a composition of individual per-instruction interpreter functions _{f_ 1 _, ..., fn}_ . Each _fi_ : _Ii →Oi_ interprets a single instruction _ci_ from the instruction set _I_ (Definition 3.1), takes the input values _ini ∈Ii_ , and produce the output values _outi ∈Oi_ . It is important to note that the output of _fi_ can include both data flow elements (e.g., variables or memory locations with values assigned by _fi_ ) and control flow elements (e.g., addresses of next interpreter functions _fj ∈ f_ assigned by _fi_ ). Consequently, we can express _f_ as the composition of different individual interpreters, i.e., _fn ◦ ... ◦ f_ 1, where later instructions act on the output of previous instructions. + +**Program interpretation graph (** _IG_ **).** Programs often involve different control flow paths, such as if-else statements, leading compositions between individual interpreter functions to a directed graph instead of a linear sequence. This graph is referred to as the program interpretation graph. For a given CRU _c_ , there can be multiple execution paths, each exercising different subsets of _{f_ 1 _, ..., fn}_ . + +To construct the interpretation graph _IG_ = ( _V, E_ ), we consider all feasible execution paths of _c_ . In _IG_ , each node _Vi ∈ V_ corresponds to _fi_ , and each directed edge _Ei,j ∈ E_ (connecting _Vi_ to _Vj_ ) represents at least one execution path where _fj_ takes the output of _fi_ as input, i.e., _Ei,j_ = ( _outi, inj_ ). + +**Automorphism group of interpretation graph.** Our objective is to find a group of symmetries that act on _c_ while preserving its input and output behavior as interpreted by _f_ in terms of _I_ and _O_ (Definition 3.6). Intuitively, as _IG_ represents all execution paths of _c_ , any transformations that preserve _IG_ should also preserve the execution behavior of _c_ . Therefore, we aim to uncover a group of symmetries that preserve _IG_ (Theorem 1), and such a group can guide us to construct code analysis model that can stay invariant to all symmetries of the group (§3.4). + +To achieve this, we consider a specific set of symmetries called the _automorphisms_ of _IG_ , denoted as _Aut_ ( _IG_ ). An automorphism is a group of symmetries _σ ∈ Aut_ ( _IG_ ) that act on the interpretation graph _IG_ = ( _V, E_ ). Intuitively, graph automorphisms can be thought of as permutations of nodes that do not change the connectivity of the graph. _Aut_ ( _IG_ ) is formally defined as follows: + +**Definition 3.8** ( _IG_ Automorphism) **.** _IG_ automorphism is a group of symmetries _σ ∈ Aut_ ( _IG_ ) acting on an interpretation graph _IG_ = ( _V, E_ ), where _σ_ is a bijective mapping: _σ_ : _V → V_ , such that for every edge _Ei,j ∈ E_ , i.e., connecting _fi_ and _fj_ , there is a corresponding edge ( _σ_ ( _fi_ ) _, σ_ ( _fj_ )) _∈ E_ . + +We now show how the automorphism _σ ∈ Aut_ ( _IG_ ) preserves all input and output behavior of _{f_ 1 _, ..., fn}_ in the space of _I_ and _O_ . As mentioned earlier, graph automorphism is a permutation on the set of nodes in _IG_ such that the edges _Ei,j_ = ( _outi, inj_ ) are preserved in the transformed _IG[′]_ . As each _fi ∈{f_ 1 _, .., fn}_ operates on _ci ∈ c_ , we have the following (see Appendix B for the proof): **Theorem 1.** The set of automorphisms _σ ∈ Aut_ ( _IG_ ) forms a program symmetry group. + +4 + +## 3.4 _Aut_ ( _IG_ )-EQUIVARIANT CODE REPRESENTATION + +Existing approaches for code analysis using Transformer typically involve an embedding layer followed by applying _l_ self-attention layers _A[l]_ . For downstream code analysis, a prediction head _F_ , is placed on top of _A[l]_ . We can thus consider the representation learning _r_ as the composition of embedding layer and _A[l]_ , while the prediction head _F_ as the predictive learning _p_ (§3.1). We now present the development of a new self-attention layer that is _Aut_ ( _IG_ )-equivariant. + +**Self-attention.** The standard self-attention computation can be succinctly represented as _wv · s_ ( _wk[T][·][ w][q]_[)][, where] _[ w][v]_[,] _[ w][k]_[, and] _[ w][q]_[are learnable parameters for transforming value, key, and query,] respectively, and _s_ ( _·_ ) represents scaling by _√d_ and applying Softmax (see Appendix A). + +It is easy to show that the existing self-attention layer is equivariant to permutations (Appendix B). However, we want to make the self-attention layers equivariant _only_ to _Aut_ ( _IG_ ), not _all permutations_ . In the following, we describe how to build _Aut_ ( _IG_ )-equivariant self-attention. + +**Biasing self-attention with a distance matrix.** To build _Aut_ ( _IG_ )-equivariant self-attention layers, denoted as _GA_ , we add a customized distance matrix _dIG_ to _GA_ : _GA_ ( _e_ ) = _wve ·_ ( _s_ ( _wke[T] ◦ wqe_ ) + _dIG_ ). Importantly, _dIG_ should have two properties: (1) _dIG_ stays invariant when _σ ∈ Aut_ ( _IG_ ) acts on _IG_ : _dIG_ = _σ_ ( _dIG_ ), and (2) _dIG_ commutes with permutation matrix _pσ_ ( _σ ∈ Aut_ ( _IG_ )). + +We will describe a concrete instantiation of _dIG_ in §4.2. Based on the two properties, we have the following Theorem (see Appendix B for the proof). + +**Theorem 2.** Self-attention _GA_ ( _e_ ) = _wve ·_ ( _s_ ( _wke[T] · wqe_ ) + _dIG_ ) is _Aut_ ( _IG_ )-equivariant. + +As the embedding layer is trivially permutation equivariant, composing it with _Aut_ ( _IG_ )-equivariant self-attention layers leads to _Aut_ ( _IG_ )-equivariant code representation learning (Lemma 1). + +## 3.5 _Aut_ ( _IG_ )-INVARIANT PREDICTOR + +We describe two prediction modules that are inherently _G_ -invariant, so stacking them on top of the _Aut_ ( _IG_ )-equivariant module leads to an _Aut_ ( _IG_ )-invariant code model (Lemma 2). + +**Token-level.** Token-level predictor is often employed when each input token needs a label, e.g., predicting memory region per instruction (§5). As the automorphism acts on the input sequence _e_ but not individual tokens, i.e., the value of the embedding vectors, the automorphism _σ_ does not apply to the query vector _qi_ (§3.4). Therefore, we have Lemma 3. See Appendix B for complete proof. **Lemma 3.** The biased self-attention computing the embedding _e[′] i_[=] _[ GA]_[(] _[e][i]_[)][ is] _[ Aut]_[(] _[IG]_[)][-invariant.] + +**Pooling-based.** Another popular _Aut_ ( _IG_ )-invariant predictor involves pooling the embedding sequence _e[′]_ = _GA_ ( _e_ ), e.g., using max or mean. Pooling operators are invariant to permutations, thus to _Aut_ ( _IG_ ), e.g., the mean pooling _µ_ ( _e[′]_ ) = (Σ _[n] i_ =1 _[e][′] i_[)] _[/n]_[ is not sensitive to the order of][ (] _[e]_ 1 _[′][, ..., e][′] n_[)][.] Pooling-based predictor is often employed when we aim to predict the property for the entire input sequence, e.g., predicting the function signature, detecting function similarity, etc. (§5). + +## 4 SYMC IMPLEMENTATION + +## 4.1 RELAXING _IG_ TO PROGRAM DEPENDENCE GRAPH + +In §3.4, we demonstrated how to build _Aut_ ( _IG_ )-equivariant self-attention layers. However, directly constructing _IG_ is computationally impractical as we need to iterate all possible execution paths. To address this, we consider _program dependence graph_ (PDG), a sound over-approximation to _IG_ that explicitly captures the control/data dependencies and can be computed statically and efficiently. + +PDG ( _VP DG, EP DG_ ) is a super graph of _IG_ , sharing the same vertices but having a superset of edges ( _EP DG ⊇ EIG_ ), because we consider all memory accesses as aliasing, making PDG a conservative construction of _IG_ . Enforcing PDG to be a super graph of _IG_ is crucial because the automorphism group of a subgraph is a subgroup of that of the super graph ( _Aut_ ( _PDG_ ) _⊇ Aut_ ( _IG_ )). Thus, if the self-attention layer is _Aut_ ( _PDG_ )-equivariant, it is guaranteed to be _Aut_ ( _IG_ )-equivariant. + +**PDG construction.** We construct PDG edges based on data/control dependencies between instructions. Three types of data dependencies (read-after-write, write-after-read, and write-after-write) are + +5 + +considered, indicating the presence of data flow. Control dependencies are included to determine the execution order. These dependencies establish a partial order of instructions, preventing permutations that violate edge directions that might alter the input-output behavior of the program (§3.3). + +## 4.2 ENCODING GRAPH STRUCTURE + +This section presents a concrete instance of the distance matrix defined on PDG, which enables us to prove _Aut_ ( _PDG_ )-equivariance for the resulting self-attention layers. + +**Distance matrix.** Let _d_ denote the distance matrix of PDG where _dij_ represents the distance between nodes _Vi_ and _Vj_ . Each entry _dij_ is a 2-value tuple ( _pij, nij_ ), indicating the shortest path from the lowest common ancestor of _Vi_ and _Vj_ , denoted as _Tij_ , to _Vi_ and _Vj_ , respectively. + +We incorporate _d_ into the multi-head self-attention (MHA), ensuring _Aut_ ( _PDG_ )-equivariance, and define specific modifications to the attention heads to handle positive and negative distances. Specifically, the first half of the attention heads _MHA[i]_ ( _e_ ), for _i ∈_ [1 _, h/_ 2], are combined with the matrix _dp_ formed by the positive distances in _d_ (denoted as _dpij_ = _pij_ ). The second half of the attention heads _MHA[i]_ ( _e_ ), for _i ∈_ [ _h/_ 2 + 1 _, h_ ], are combined with the matrix _dn_ formed by the negative distances in _d_ (denoted as _dnij_ = _nij_ ). The modified attention heads are defined as: (1) _MHA[i]_ ( _e_ ) = _wve·_ ( _s_ ( _wke[T] ·wqe_ )+ _dp_ ) _, i ∈_ [1 _, h/_ 2], (2) _MHA[i]_ ( _e_ ) = _wve·_ ( _s_ ( _wke[T] ·wqe_ )+ _dn_ ) _, i ∈_ [ _h/_ 2+1 _, h_ ]. + +It is easy to show _d_ satisfies the two properties defined in §3.4 (see Appendix B). We thus have: **Lemma 4.** The distance matrix _d_ of PDG remains invariant under the action of _σ ∈ Aut_ ( _PDG_ ). **Lemma 5.** The distance matrix _d_ of PDG commutes with permutation matrix _pσ_ of the automorphism _σ ∈ Aut_ ( _PDG_ ): _d · pσ_ = _pσ · d_ . + +Based on these two properties, we can prove each head in MHA is _Aut_ ( _PDG_ )-equivariant, following the same proof steps to Theorem 2. Therefore, according to Lemma 1, MHA composed by multiple _Aut_ ( _PDG_ )-equivariant heads is also _Aut_ ( _PDG_ )-equivariant. + +## 5 EXPERIMENTAL SETUP + +**Program analysis tasks.** We consider analysis tasks that require a deep understanding of code behavior such that they are expected to stay _invariant_ to code symmetries. Specifically, we consider (1) _function name prediction_ , which performs an “extreme summarization” of the function behavior. (2) _function similarity detection_ , which predicts if a pair of functions are semantically similar; (3) _function signature prediction_ , which predicts the types (int, float, etc.) of function arguments; and (4) _memory region prediction_ , which predicts the memory region (stack, heap, etc.) that each memory-accessing instruction can possibly access. For (2)-(4), we focus on analyzing stripped binaries considering its broad applications, e.g., vulnerability detection and security retrofitting. + +**Baselines.** We consider five baselines for function name prediction: code2vec (Alon et al., 2019), code2seq (Alon et al., 2018), GGNN (Fernandes et al., 2018), and two more general-purpose LLMs, GPT-4 and WizardCoder (3B) (Luo et al., 2023). Note that the dataset used to train LLMs might overlap with our test set. For example, Hadoop (our test set for function name prediction, see Appendix D) is included in BigCode (HuggingFace & ServiceNow, 2022), one of the widely used datasets to train code LLMs. Our goal is to demonstrate SYMC still generalizes better than existing code LLMs under such a disadvantaged setting. + +For tasks (2)-(4), we compare to PalmTree (Li et al., 2021), the state-of-the-art binary analysis tool that covers all our considered tasks. To ensure a fair comparison, we include three PalmTree versions: PalmTree, PalmTree-O, and PalmTree-N. PalmTree is pre-trained on _2.25 billion_ instructions. PalmTree-O is pre-trained on _137.6 million_ instructions using our own dataset (Appendix D), with full access to fine-tuning and evaluation data (excluding labels), while not accessible by SYMC as it is not pre-trained. We aim to show SYMC’s strong generalizability even in this disadvantaged setting. PalmTree-N serves as the baseline Transformer encoder without being pre-trained. + +**Code transformations.** We consider a set of real-world semantics-preserving transformations beyond PDG automorphisms to evaluate SYMC’s generalization by staying _Aut_ ( _PDG_ )-equivariant. Instruction permutation occasionally forms the basis for these transformations. In particular, we + +6 + +Table 2: Evaluation on samples under different percentages of semantics-preserving permutations. F1 measures the prediction performance of function name, function signature, and memory region. AUC (area under the ROC curve) measures the function similarity detection performance. The violation rate is highlighted in red . The larger the violation rate, the darker the color. + +|**Model**
**Size**
**Train**
**Size**
**F1 & AUC**
**Invariance Violation (%)**
0%
25%
50%
75%
100%
25% 50% 75% 100%|**Model**
**Size**
**Train**
**Size**
**F1 & AUC**
**Invariance Violation (%)**
0%
25%
50%
75%
100%
25% 50% 75% 100%|**Model**
**Size**
**Train**
**Size**
**F1 & AUC**
**Invariance Violation (%)**
0%
25%
50%
75%
100%
25% 50% 75% 100%| +|---|---|---| +|Function
Name
SYMC
68.4M 202M
code2seq
6.3M
5.1G
code2vec
348M
32G
GGNN
53M
2.4G
GPT-4
N/A
N/A
WizardCoder 3B
N/A|0.363 0.364_∗_0.363 0.363 0.363|0
0.1_∗_
0
0| +||0.255 0.238
0.236 0.237 0.247|54
53
57
61| +||0.177 0.199
0.195 0.197 0.196|53
53
52
52| +||0.016 0.016
0.016 0.016 0.016|4
4
5
7| +||0.303 0.313
0.317 0.329 0.307|42
43
45
43| +||0.339 0.347
0.348 0.359 0.346|6
7
12
14| +|Function
Signature
SYMC
58.3M 12M
PalmTree
3.2M
17.4G
PalmTree-O
3.2M
5.3G
PalmTree-N
3.2M
614M|0.88
0.88
0.88
0.88
0.88|0
0
0
0| +||0.59
0.55
0.49
0.42
0.41|12
23
18
24| +||0.49
0.48
0.45
0.41
0.41|19
6
12
6| +||0.19
0.41
0.41
0.41
0.41|83
82
83
86| +|Memory
Region
SYMC
58.9M 340M
PalmTree
3.07M 17.9G
PalmTree-O
3.07M 5.8G
PalmTree-N
3.07M 1.1G|0.86
0.86
0.86
0.86
0.86|0
0
0
0| +||0.57
0.45
0.45
0.48
0.43|17
17
28
18| +||0.57
0.42
0.45
0.47
0.44|10
13
14
11| +||0.32
0.22
0.29
0.17
0.2|30
36
31
32| +|Function
Similarity
SYMC
58.9M 133M
PalmTree
3.06M 17.4G
PalmTree-O
3.06M 5.3G
PalmTree-N
3.06M 614M|0.96
0.96
0.96
0.96
0.96|0
0
0
0| +||0.72
0.61
0.53
0.71
0.69|18
19
30
31| +||0.8
0.79
0.76
0.72
0.72|30
28
30
35| +||0.71
0.64
0.56
0.66
0.72|11
18
24
38| + +> _∗_ We observe a slight value change due to the floating point precision error by adopting memory-efficient 16-bit. + +consider two categories of binary code transformations: (1) _compiler optimizations_ from GCC-7.5 and Clang-8, some of which reorder instructions for scheduling purposes (-fdelayed-branch, -fschedule-insns); and (2) _compiler-based obfuscations_ , where we consider 5 obfuscations following Jin et al. (2022), such as control flow flattening, indirect branching, etc. + +In addition to binary transformations, we consider six source code transformations following Rabin et al. (2021) and Wang et al. (2022): _variable rename_ - changes the name of the identifiers; _statement permute_ – permutes statements but preserves the code blocks’s input-output behavior; _loop exchange_ – transforms for from/to while loops; _boolean exchange_ – flips the boolean variables and negates all their uses by tracking their def-use chain; _unused statement_ – injects unused string declaration into a randomly chosen basic block; _switch to if_ – transforms switch from/to if statements. + +## 6 EVALUATION + +## 6.1 INVARIANCE AND GENERALIZATION + +**Evaluating** _Aut_ ( _PDG_ ) **-invariance.** As SYMC is provably invariant to _Aut_ ( _PG_ ), we aim to study how other baselines perform under varying percentages of semantics-preserving statement permutations. Table 2 shows that all baselines, even some of which have much larger model sizes and are extensively pre-trained with samples that potentially include the test set (§5), are susceptible to slight permutations (e.g., 25%), i.e., with their prediction changed by 27.8% on average. + +**Generalization to other semantics-preserving transformations.** Table 3 shows that SYMC generalizes to new samples transformed by unseen semantics-preserving transformations that are not part of _Aut_ ( _PDG_ ), outperforming the second-best non-LLM based approach, code2seq, by 30.8%. It also outperforms the two LLMs, GPT-4 and WizardCoder, by 16.1% and 1.63%, respectively. We integrate CodeWordNet (Jin et al., 2022) to relax predicted names to a cluster of synonyms, addressing the issue of ambiguity of function names. However, the performance of SYMC decreases to 0.309 (was 0.374) when we measure the exact match. This performance gap shows that large pre-trained code models possess a more comprehensive understanding of natural language, especially beneficial for + +7 + +**==> picture [398 x 86] intentionally omitted <==** + +**----- Start of picture text -----**
+SymC Palmtree PalmTree-O PalmTree-N
1.0 1.0 1.0 1.0
0.8 0.8 0.8 0.8
0.6 0.6 0.6 0.6
0.4 0.4 0.4 0.4
0.2 0.2 0.2 0.2
Seen Unseen Seen Unseen Seen Unseen Seen Unseen
(a) Cross-OPT similarity (b) Cross-OPT signature (c) Cross-OBF similarity (d) Cross-OBF signature
AUC F1 AUC F1
**----- End of picture text -----**
+ +Figure 2: Evaluation on unseen optimization and obfuscation (marked in pink). We also include the testing results on seen optimizations and obfuscations. + +function name prediction. Nonetheless, SYMC retains the edge of having a much smaller model size (108 _×_ ), eliminating the need for extensive pre-training, and offering provable robustness. + +Besides basic source rewrites, we compare SYMC to baselines on generalization to unseen compiler optimizations and obfuscations. Figure 2 shows that SYMC outperforms PalmTree across all binary analysis tasks (we do not include memory region prediction as the dataset does not have such information (Guo et al., 2019)) by 33.8% and 30.7% on seen and unseen transformations, respectively. While the compiler optimizations and obfuscations often involve more sophisticated transformations not directly related to instruction permutations, SYMC maintains its superior generalization. + +## 6.2 TRAINING EFFICIENCY + +Besides the improved robustness and generalization, SYMC is efficient in training in avoiding expensive pre-training efforts, e.g., some may take up to 10 days (Jin et al., 2022). As shown in §6.1, SYMC, without any pretraining, outperforms the pre-trained baselines. + +In this section, we assess SYMC’s performance under the limited training resources and how much training effort it can save. Specifically, we reduce the _model sizes_ and _training iterations_ to test the + +Table 3: The performance (F1) of SYMC and baselines against different unseen code transformations. + +||||**SYMC **|**code2seq **|**code2vec **|**GGNN **|**GPT-4 **|**WizardCoder**| +|---|---|---|---|---|---|---|---|---| +||Variable|0%|0.389|0.334|0.264|0.029|0.356|0.362| +||Rename|100%|0.375|0.335|0.247|0.026|0.351|0.361| +||Statement|0%|0.363|0.241|0.177|0.019|0.303|0.339| +||Permute
Loop
Exchange|100%
0%
100%|0.363
0.373
0.357|0.234
0.283
0.299|0.196
0.243
0.241|0.019
0.007
0.007|0.307
0.310
0.308|0.346
0.379
0.366| +||Boolean|0%|0.421|0.332|0.268|0.031|0.329|0.414| +||Exchange
Unused
Statement|100%
0%
100%|0.412
0.347
0.342|0.272
0.296
0.285|0.242
0.267
0.26|0.026
0.016
0.012|0.323
0.316
0.309|0.406
0.358
0.350| +||Switch|0%|0.372|0.31|0.376|0.027|0.326|0.385| +||to If|100%|0.372|0.293|0.33|0.009|0.332|0.379| + +hypothesis that SYMC requires less training effort for similar testing performance due to its improved training efficiency. Figure 3 shows that SYMC’s performance (on memory region prediction) remains the highest in both reduced size and training iterations, outperforming PalmTree by 36.9% and 21.4%, respectively. Even in the most strict scenario, SYMC remains 38.2% and 15.3% better in both settings. + +We then study the training effort (including both pre-training and fine-tuning) of SYMC and PalmTree. Table 4 shows their GPU hours, power, and emitted carbon dioxide estimation when they reach 0.5 F1 score in memory region prediction. We assume the GPU always reaches its power cap (350W) to estimate an upper bound of the power usage. CO2eq stands for the carbon dioxide equivalent, a unit for measuring carbon footprints. By being more training efficient, SYMC incurs 1,281 _×_ less total GPU time, power, and emitted carbon dioxide than PalmTree in obtaining the same performance. + +## 6.3 ABLATIONS OF DESIGN CHOICES + +**Equivariance vs. Invariance.** We compare the _Aut_ ( _PDG_ )- _equivariant_ self-attention layers to the _Aut_ ( _PDG_ )- _invariant_ ones, an alternative design choice to implement _Aut_ ( _PDG_ )- _invariant_ code + +8 + +**==> picture [229 x 86] intentionally omitted <==** + +**----- Start of picture text -----**
+SymC Palmtree PalmTree-O PalmTree-N
0.8
0.6
0.6
0.4 0.4
100% 50% 25% 12.5% 8k 4k 2k 1k
(a) Reduce model size (b) Reduce training iterations
F1 F1
**----- End of picture text -----**
+ +Figure 3: Comparing SYMC and baselines on constrained resources, where we (a) reduce the model weights, and (b) reduce the number of training iterations, and observe how that affects the performance. + +Table 4: The resource consumed by training SYMC and other baselines to reach 0.5 F1 score in memory region prediction. + +|||**Time**|**Power**|**Carbon**| +|---|---|---|---|---| +|||(Hours)|(kWh)|(CO2eq)| +||SYMC|0.07|0.025|0.009| +||PalmTree-O_∗_|89.67|31.38|11.64| + +> _∗_ PalmTree did not disclose its hours for pre-training, so we include the pre-training time (in 10 epochs) based on our own pre-trained PalmTree. + +models. Figure 4a shows that setting layers invariant early hinders prediction performance. SYMC with equivariant layers has an average 0.73 F1 across all training iterations and outperforms the second-best setting by 60.7%. This observation confirms the empirical findings that making earlier layers equivariant instead of invariant leads to better performance (Higgins et al., 2018). + +**Adding pre-training.** We ex2nd 4th 6th w/o pre-train pre-train 5 epochs plore the impact of pre-training Equivariant SymC F1=0.86 pre-train 1 epoch pre-train 10 epochs SYMC with masked language 0.30 modeling (Devlin et al., 2018). 0.28 0.8 We compare SYMC (without pre-training by default) to pre0.26 0.7 trained versions with varying pre0.24 training iterations. We then fine1 2 3Training Iterations (k)4 5 6 7 8 9 10 1 2 3Training Iterations (k)4 5 6 7 8 9 10 tune them for memory region pre(a) Equivariance vs. invariance (b) Pre-training SYMC diction. Figure 4b shows that pretraining with even one epoch reFigure 4: (a) Comparing SYMC’s equivariant self-attention layers sults in a significantly improved with setting them _invariant_ starting at earlier layer. (b) Comparing F1 score, e.g., by 10.8%, with SYMC when adding pre-training with varying pre-training epochs. much faster convergence. How- + +ever, additional pre-training epochs show diminishing returns, likely due to the limited training samples, e.g., the F1 score only improves by 3.2% with pre-training five epochs compared to 1 epoch. + +## 7 RELATED WORK + +**Code representation learning.** Previous research aims to automate software development tasks through code representation learning (Ding et al., 2023; Feng et al., 2020; Guo et al., 2022; Ahmad et al., 2021), employing new architectures and pre-training objectives (Hellendoorn et al., 2019; Allamanis et al., 2017; Sun et al., 2020; Peng et al., 2021; Kim et al., 2021; Guo et al., 2020). However, unlike our approach, these approaches cannot provide any guarantees of encoding semantics. + +**Symmetry in machine learning.** Symmetry plays a crucial role in creating efficient neural architectures across various domains (Reiser et al., 2022; Wang et al., 2020; Bogatskiy et al., 2020; Perraudin et al., 2019; Cohen & Welling, 2016; Gordon et al., 2019; Dehmamy et al., 2021). Different architectures, such as CNNs, GNNs, and Transformers, leverage symmetry to handle translations, rotations, permutations, etc. (Lee et al., 2019; Cohen & Welling, 2016; Esteves et al., 2018; Hutchinson et al., 2021; Gordon et al., 2019; Romero & Cordonnier, 2020). SYMC sets the first step to formalize code semantics learning using symmetry groups. + +## 8 CONCLUSION + +We studied code symmetries’ impact on code LLM architectures for program reasoning tasks, introducing a novel self-attention variant that brought significant gains in generalization and robustness across a variety of program analysis tasks, providing valuable insights for specialized LLM development in reasoning and analyzing programs. + +9 + +## REFERENCES + +- Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. Unified pre-training for program understanding and generation. _arXiv preprint arXiv:2103.06333_ , 2021. + +- Miltiadis Allamanis, Hao Peng, and Charles Sutton. A convolutional attention network for extreme summarization of source code. In _International conference on machine learning_ , pp. 2091–2100. PMLR, 2016. + +- Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. _arXiv preprint arXiv:1711.00740_ , 2017. + +- Uri Alon, Shaked Brody, Omer Levy, and Eran Yahav. code2seq: Generating sequences from structured representations of code. _arXiv preprint arXiv:1808.01400_ , 2018. + +- Uri Alon, Meital Zilberstein, Omer Levy, and Eran Yahav. code2vec: Learning distributed representations of code. _Proceedings of the ACM on Programming Languages_ , 3(POPL):1–29, 2019. + +- Daniel Arp, Erwin Quiring, Feargus Pendlebury, Alexander Warnecke, Fabio Pierazzi, Christian Wressnegger, Lorenzo Cavallaro, and Konrad Rieck. Dos and don’ts of machine learning in computer security. In _31st USENIX Security Symposium (USENIX Security 22)_ , pp. 3971–3988, 2022. + +- Norman Biggs, Norman Linstead Biggs, and Biggs Norman. _Algebraic graph theory_ . Number 67. Cambridge university press, 1993. + +- Alexander Bogatskiy, Brandon Anderson, Jan Offermann, Marwah Roussi, David Miller, and Risi Kondor. Lorentz group equivariant neural network for particle physics. In _International Conference on Machine Learning_ , pp. 992–1002. PMLR, 2020. + +- Joshua Bundt, Michael Davinroy, Ioannis Agadakos, Alina Oprea, and William Robertson. Black-box attacks against neural binary function detection. _arXiv preprint arXiv:2208.11667_ , 2022. + +- Taco Cohen and Max Welling. Group equivariant convolutional networks. In _International conference on machine learning_ , pp. 2990–2999. PMLR, 2016. + +- Nima Dehmamy, Robin Walters, Yanchen Liu, Dashun Wang, and Rose Yu. Automatic symmetry discovery with lie algebra convolutional network. _Advances in Neural Information Processing Systems_ , 34:2503–2515, 2021. + +- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. _arXiv preprint arXiv:1810.04805_ , 2018. + +Yangruibo Ding, Ben Steenhoek, Kexin Pei, Gail Kaiser, Wei Le, and Baishakhi Ray. Traced: Execution-aware pre-training for source code. _arXiv preprint arXiv:2306.07487_ , 2023. + +- Carlos Esteves, Christine Allen-Blanchette, Ameesh Makadia, and Kostas Daniilidis. Learning so (3) equivariant representations with spherical cnns. In _Proceedings of the European Conference on Computer Vision (ECCV)_ , pp. 52–68, 2018. + +- Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, et al. Codebert: A pre-trained model for programming and natural languages. _arXiv preprint arXiv:2002.08155_ , 2020. + +- Patrick Fernandes, Miltiadis Allamanis, and Marc Brockschmidt. Structured neural summarization. _arXiv preprint arXiv:1811.01824_ , 2018. + +- Fengjuan Gao, Yu Wang, and Ke Wang. Discrete adversarial attack to models of code. _Proceedings of the ACM on Programming Languages_ , 7(PLDI):172–195, 2023a. + +- Shuzheng Gao, Cuiyun Gao, Chaozheng Wang, Jun Sun, David Lo, and Yue Yu. Two sides of the same coin: Exploiting the impact of identifiers in neural code comprehension. In _2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)_ , pp. 1933–1945. IEEE, 2023b. + +10 + +- Jonathan Gordon, David Lopez-Paz, Marco Baroni, and Diane Bouchacourt. Permutation equivariant models for compositional generalization in language. In _International Conference on Learning Representations_ , 2019. + +- Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, et al. Graphcodebert: Pre-training code representations with data flow. _arXiv preprint arXiv:2009.08366_ , 2020. + +- Daya Guo, Shuai Lu, Nan Duan, Yanlin Wang, Ming Zhou, and Jian Yin. Unixcoder: Unified cross-modal pre-training for code representation. _arXiv preprint arXiv:2203.03850_ , 2022. + +- Wenbo Guo, Dongliang Mu, Xinyu Xing, Min Du, and Dawn Song. DEEPVSA: Facilitating value-set analysis with deep learning for postmortem program analysis. In _28th USENIX Security Symposium (USENIX Security 19)_ , 2019. + +- Vincent J Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis, and David Bieber. Global relational models of source code. In _International conference on learning representations_ , 2019. + +- Jordan Henke, Goutham Ramakrishnan, Zi Wang, Aws Albarghouth, Somesh Jha, and Thomas Reps. Semantic robustness of models of source code. In _2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)_ , pp. 526–537. IEEE, 2022. + +- Irina Higgins, David Amos, David Pfau, Sebastien Racaniere, Loic Matthey, Danilo Rezende, and Alexander Lerchner. Towards a definition of disentangled representations. _arXiv preprint arXiv:1812.02230_ , 2018. + +- HuggingFace and ServiceNow. BigCode is an open scientific collaboration working on the responsible development and use of large language models for code. [URL removed] org/, 2022. + +- Michael J Hutchinson, Charline Le Lan, Sheheryar Zaidi, Emilien Dupont, Yee Whye Teh, and Hyunjik Kim. Lietransformer: Equivariant self-attention for lie groups. In _International Conference on Machine Learning_ , pp. 4533–4543. PMLR, 2021. + +- Shuiwang Ji, Yaochen Xie, and Hongyang Gao. A mathematical view of attention models in deep learning. _Texas A&M University: College Station, TX, USA_ , 2019. + +- Xin Jin, Kexin Pei, Jun Yeon Won, and Zhiqiang Lin. Symlm: Predicting function names in stripped binaries via context-sensitive execution-aware code embeddings. In _Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security_ , pp. 1631–1645, 2022. + +- Seohyun Kim, Jinman Zhao, Yuchi Tian, and Satish Chandra. Code prediction by feeding trees to transformers. In _2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)_ , pp. 150–162. IEEE, 2021. + +- Donald Knuth. Permutations, matrices, and generalized young tableaux. _Pacific journal of mathematics_ , 34(3):709–727, 1970. + +- Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In _International Conference on Machine Learning_ , pp. 3744–3753. PMLR, 2019. + +- Xuezixiang Li, Qu Yu, and Heng Yin. Palmtree: Learning an assembly language model for instruction embedding. In _2021 ACM SIGSAC Conference on Computer and Communications Security_ , 2021. + +- Dongge Liu, Jonathan Metzman, and Oliver Chang. AI-Powered Fuzzing: Breaking the Bug Hunting Barrier. [URL removed] ai-powered-fuzzing-breaking-bug-hunting.html, 2023. + +- Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. Wizardcoder: Empowering code large language models with evol-instruct. _arXiv preprint arXiv:2306.08568_ , 2023. + +11 + +Petros Maniatis and Daniel Tarlow. Large sequence models for software development activities. [URL removed] large-sequence-models-for-software.html?m=1, 2023. + +- Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. Fairseq: A fast, extensible toolkit for sequence modeling. In _2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Demonstrations_ , 2019. + +- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. _Advances in neural information processing systems_ , 32, 2019. + +- Han Peng, Ge Li, Wenhan Wang, Yunfei Zhao, and Zhi Jin. Integrating tree path in transformer for code representation. _Advances in Neural Information Processing Systems_ , 34:9343–9354, 2021. + +- Nathanael Perraudin, Micha¨ el Defferrard, Tomasz Kacprzak, and Raphael Sgier.¨ Deepsphere: Efficient spherical convolutional neural network with healpix sampling for cosmological applications. _Astronomy and Computing_ , 27:130–146, 2019. + +- Md Rafiqul Islam Rabin, Nghi DQ Bui, Ke Wang, Yijun Yu, Lingxiao Jiang, and Mohammad Amin Alipour. On the generalizability of neural program models with respect to semantic-preserving program transformations. _Information and Software Technology_ , 135:106552, 2021. + +- Patrick Reiser, Marlen Neubert, Andre Eberhard, Luca Torresi, Chen Zhou, Chen Shao, Houssam´ Metni, Clint van Hoesel, Henrik Schopmans, Timo Sommer, et al. Graph neural networks for materials science and chemistry. _Communications Materials_ , 3(1):93, 2022. + +- David W Romero and Jean-Baptiste Cordonnier. Group equivariant stand-alone self-attention for vision. _arXiv preprint arXiv:2010.00977_ , 2020. + +- Zeyu Sun, Qihao Zhu, Yingfei Xiong, Yican Sun, Lili Mou, and Lu Zhang. Treegen: A tree-based transformer architecture for code generation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 34, pp. 8984–8991, 2020. + +- Rui Wang, Robin Walters, and Rose Yu. Incorporating symmetry into deep dynamics models for improved generalization. _arXiv preprint arXiv:2002.03061_ , 2020. + +- Shiqi Wang, Zheng Li, Haifeng Qian, Chenghao Yang, Zijian Wang, Mingyue Shang, Varun Kumar, Samson Tan, Baishakhi Ray, Parminder Bhatia, et al. Recode: Robustness evaluation of code generation models. _arXiv preprint arXiv:2212.10264_ , 2022. + +- Douglas Brent West et al. _Introduction to graph theory_ , volume 2. Prentice hall Upper Saddle River, 2001. + +- Noam Yefet, Uri Alon, and Eran Yahav. Adversarial examples for models of code. _Proceedings of the ACM on Programming Languages_ , 4(OOPSLA):1–30, 2020. + +- Zhuo Zhang, Guanhong Tao, Guangyu Shen, Shengwei An, Qiuling Xu, Yingqi Liu, Yapeng Ye, Yaoxuan Wu, and Xiangyu Zhang. Pelican: Exploiting backdoors of naturally trained deep learning models in binary code analysis. In _32nd USENIX Security Symposium_ , 2023. + +## A PRELIMINARIES + +This section formally defines the symmetry group and the invariance and equivariance properties against the symmetry group. + +**Symmetry group.** Intuitively, a _symmetry_ is a transformation or operation on an object that preserves certain properties of the object. For example, in the context of image classification, a rotation operation acting on an image of a ball, which does not change the label of the ball, can be considered a symmetry. A symmetry group is a set of such symmetries with some additional properties. An arbitrary set of symmetries does not always form a symmetry group. To form a symmetry group, a set of operations must possess certain additional properties as described below. + +12 + +**Definition A.1.** A _symmetry group_ ( _G, ◦_ ) consists of a non-empty set _G_ of transformations and a binary operator _◦_ : _G × G → G_ , where _◦_ operates on two elements (i.e., transformations) in _G_ , e.g., _x, y ∈ G_ , and produces a new transformation _z_ = _x ◦ y_ . ( _G, ◦_ ) should satisfy four axioms: + +- **Associativity** : _∀x, y, z ∈ G, x ◦_ ( _y ◦ z_ ) = ( _x ◦ y_ ) _◦ z_ + +- **Identity** : _∃_ **1** _∈ G, ∀x ∈ G, x ◦_ **1** = **1** _◦ x_ + +- **Inverse** : _∀x ∈ G, ∃x[−]_[1] _∈ G, x ◦ x[−]_[1] = **1** + +- **Closure** : _∀x, y ∈ G, x ◦ y ∈ G_ + +**Action of a symmetry group.** As defined above, the elements of a _G_ are abstract transformations that become concrete when they _act_ on some set _X_ , i.e., they transform some object _x ∈ X_ into another object _x[′] ∈ X_ while keeping some properties of the object _invariant_ . Formally, an action of a symmetry group _G_ is defined as follows: + +**Definition A.2.** An **action** _•_ of a symmetry group ( _G, ◦_ ) is a binary operation defined on a set of objects _X_ , i.e., _•_ : _G × X → X_ ,[1] where + +- **Identitiy:** _∀x ∈ X,_ **1** _• x_ = _x_ + +- **Compatibility:** _∀g, h ∈ G, x ∈ X,_ ( _g ◦ h_ ) _• x_ = _g •_ ( _h • x_ ) + +As a concrete example, _X_ can be a set of programs and _G_ can be all possible instruction permutations that preserve the input-output behavior of the programs in _X_ . It might seem unclear at this point how these permutations form a group (satisfying group axioms). We will formalize the notion of permutations and their actions on programs in §3.3. + +**Notation.** It is common in the group theory literature to use _◦_ to denote both _action_ and _composition_ , when it is clear from the context which operation is being used (Higgins et al., 2018). For example, ( _g ◦ h_ ) _◦ x_ denotes _composing_ the two transformations _g_ and _h_ and then letting the composite transformation _act_ on an object _x_ . It is also customary to interchange _g_ ( _x_ ) and _g ◦ x_ where both denote applying a function/action on _x_ . Therefore, we treat _g •_ ( _h • x_ ), _g ◦_ ( _h ◦ x_ ), and _g_ ( _h_ ( _x_ )) as the same and follow this convention in the rest of this paper. + +**Invariance and equivariance.** A symmetry group comes with two properties, namely _invariance_ and _equivariance_ , that formalize the concept of preservation of some properties when a set _X_ is acted upon by the symmetry group _G_ . Invariance refers to the property that remains unchanged under the action of the symmetry group. Equivariance, on the other hand, expresses the compatibility between the action of the symmetry group and the property. + +To define this more precisely, we need to introduce a function _f_ : _X → Y_ , where _X_ is the set under consideration and _Y_ is the co-domain representing the range of possible values associated with the property of interest. The function _f_ maps each element _x ∈ X_ to a corresponding element _y_ in the set _Y_ , indicating the property’s value for that particular element. We now define the equivariance and invariance of _f_ operating on _X_ against the group operations in _G_ . + +**Definition A.3.** Let _f_ : _X → Y_ be a function where _X_ and _Y_ are two sets and _G_ be the symmetry group that acts on both sets _X_ and _Y_ .[2] + +- **Invariant** : _f_ is called _G_ **-invariant** if _∀g ∈ G, ∀x ∈ X, f_ ( _g ◦ x_ ) = _f_ ( _x_ ). + +- **Equivariant** : _f_ is called _G_ **-equivariant** if _∀g ∈ G, ∀x ∈ X, f_ ( _g ◦ x_ ) = _g ◦ f_ ( _x_ ). + +**Self-attention layers.** Given the embeddings of all vertices _fi_ from _IG_ , we consider a sequence of embeddings by flattening _IG_ following the order of instructions in _c_ . Let this sequence of embeddings be denoted as _e_ = ( _e_ 1 _, ..., en_ ). The self-attention computation, denoted as _A_ , takes _e_ as input and produces another sequence of embeddings, denoted as ( _e[′]_ 1 _[, ..., e][′] n_[)][.] + +> 1In group theory literature, this is often called the left action, but we will omit “left” as it is the only type of action we will use in this paper. + +> 2We assume that _X_ and _Y_ have the same number of elements for the action of _G_ to be defined on both _X_ and _Y_ . + +13 + +The core operations in self-attention _A_ involve updating each embedding _ei_ through the following steps: + +1. First, it maps each embedding _ei_ to three embeddings (query, key, and value): _qi_ = _fq_ ( _ei_ ), _ki_ = _fk_ ( _ei_ ), _vi_ = _fv_ ( _ei_ ), where _fq_ , _fk_ , and _fv_ are affine transformations (i.e., fully-connected linear layers) parameterized by _wq_ , _wk_ , and _wv_ , respectively. + +2. Next, it computes the attention score _aij_ between every pair of embeddings _ei_ and _ej_ by taking the dot product between the query _qi_ of _ei_ and the key _kj_ of _ej_ : _aij_ = _qi · kj_ . The attention scores form a square matrix, where each cell _aij_ indicates the attention that _ei_ should pay to _ej_ . The attention scores are then divided by _√d_ (the dimension of the embedding vectors), scaled using the softmax function to ensure they sum up to 1: _a_ ˆ _ij_ = � _nj_ ex=1p([exp(] _aij_ ) _[a][ij]_[)][.][These two operations are] denoted by _s_ . + +3. Finally, the scaled attention score ˆ _aij_ is multiplied by _vj_ , and a vector sum is computed: _e[′] i_[=] � _nj_ =1 _[a]_[ˆ] _[ij][v][ij]_[.] + +## B PROOFS + +**Lemma 1.** Let _f_ 1 and _f_ 2 be two functions that are both _G_ -equivariant and _h_ = _f_ 1 _◦ f_ 2 be the new function composed by _f_ 1 and _f_ 2. _h_ is also _G_ -equivariant. + +_Proof._ For all _g ∈ G_ and any input _x_ , we have + +_h_ ( _g ◦ x_ ) = ( _f_ 1 _◦ f_ 2)( _g ◦ x_ ) = _f_ 1( _f_ 2( _g ◦ x_ )) _▷_ Associativity = _f_ 1( _g ◦ f_ 2( _x_ )) _▷f_ 2 is equivariant to _g_ = _g ◦ f_ 1( _f_ 2( _x_ )) _▷f_ 1 is equivariant to _g_ = _g ◦_ ( _f_ 1 _◦ f_ 2)( _x_ ) _▷_ Associativity = _g ◦ h_ ( _x_ ) + +Therefore, _h_ ( _g ◦ x_ ) = _g ◦ h_ ( _x_ ), so _h_ is _G_ -equivariant. + +**Lemma 2.** Let _f_ 1 and _f_ 2 be two functions where _f_ 1 is _G_ -equivariant _f_ 2 is _G_ -invariant, and _h_ = _f_ 2 _◦f_ 1 be the new function composed by applying _f_ 1 and then _f_ 2. _h_ is _G_ -invariant. + +_Proof._ For all _g ∈ G_ and any input _x_ , we have + +**==> picture [262 x 81] intentionally omitted <==** + +**Theorem 1.** The set of automorphisms _σ ∈ Aut_ ( _IG_ ) forms a program symmetry group. + +_Proof._ Consider an arbitrary _σ ∈ Aut_ ( _IG_ ). Definition 3.8 states that for all _fi ∈{f_ 1 _, ..., fn}_ , _σ_ ( _fi_ ) have the same edges as _IG_ before _σ_ was applied. As _σ_ is a permutation and there is also a bijective mapping between _fi_ and _ci_ , i.e., _fi_ always interprets _ci_ , we have _σ_ ( _fi_ ) = _fi_ ( _σ◦ci, ini_ ). Definition 3.8 also states that _σ_ ( _fi_ ) is connected with the same edges. Therefore, the output of _σ_ ( _fi_ ) = _outi_ . We thus have _fi_ ( _σ ◦ ci, ini_ ) = _outi_ = _fi_ ( _ci, ini_ ) _, ∀σ ∈ Aut_ ( _IG_ ) and _∀fi ∈{f_ 1 _, ..., fn}_ . Therefore, all _σ ∈ Aut_ ( _IG_ ) are semantics-preserving program symmetries, according to Definition 3.6. Moreover, it is well known in the literature that the automorphisms of any graph form a group by satisfying group axioms (Definition A.1) (Biggs et al., 1993; West et al., 2001). Therefore, _Aut_ ( _IG_ ) forms a group of program symmetries, according to Definition 3.7: _Aut_ ( _IG_ ) _∈ G_ . + +14 + +**Permutation matrix.** Let _π_ be a symmetry in the permutation group that permutes input embeddings _e ∈_ R _[d][×][n]_ to the self-attention layer. Applying _π_ is done by _e_ with a permutation matrix _pπ ∈ {_ 0 _,_ 1 _}[n][×][n]_ (Knuth, 1970). _pπ_ is an orthogonal binary matrix with a single 1 in each column and row, and 0s elsewhere. Right-multiplying _e_ with _pπ_ permutes columns, and left-multiplying _e[T]_ with _p[T] π_ permutes rows. + +**Theorem 2.** The biased self-attention layer, _GA_ ( _e_ ) = _wve ·_ ( _s_ ( _wke[T] · wqe_ ) + _dIG_ ), is _Aut_ ( _IG_ )- equivariant. + +_Proof._ + +**==> picture [187 x 27] intentionally omitted <==** + +_σ_ ( _·_ ) denotes applying the permutation matrix _pσ_ . As we have _σ_ ( _dIG_ ) = _dIG_ (the first property of _dIG_ ): + +**==> picture [195 x 29] intentionally omitted <==** + +Softmax _s_ is permutation equivariant, and _dIG · pσ_ = _pσ · dIG_ (the second property of _dIG_ ): + += _wve_ ( _pσp[T] σ_[)] _[ ·][ s]_[((] _[w][k][e]_[)] _[T][·][ w][q][e]_[)] _[ ·][ p][σ]_[+] _[ w][v][e][ ·][ d][IG][·][ p][σ]_ = _wve ·_ (( _s_ ( _wke_ ) _[T] · wqe_ ) + _dIG_ ) _· pσ_ = _σ_ ( _GA_ ( _e_ )) + +**Lemma 3.** The biased self-attention layer computing the embedding _e[′] i_[=] _[GA]_[(] _[e][i]_[)][is] _[Aut]_[(] _[IG]_[)][-] invariant. + +_Proof._ + +**==> picture [178 x 28] intentionally omitted <==** + +_di_ is a column vector, so permuting the row of _di_ is achieved by _p[T] σ[d][i]_[(see §][3.4][):] + +**==> picture [215 x 45] intentionally omitted <==** + +_pσ_ is an orthogonal matrix (see §3.4): + +**==> picture [133 x 26] intentionally omitted <==** + +**Lemma 4.** The distance matrix _d_ of PDG remains invariant under the action of _σ ∈ Aut_ ( _PDG_ ). + +> _Proof._ We need to show that the shortest path _pσ_ ( _i_ ) _σ_ ( _j_ ) from _σ_ ( _Tij_ ) to _σ_ ( _Vi_ ) remains the same as _pij_ (the same applies to _nσ_ ( _i_ ) _σ_ ( _j_ )). Without loss of generality, we focus on proving _pσ_ ( _i_ ) _σ_ ( _j_ ) = _pij_ . + +Assume there exists a shortest path _P_ = ( _Tij, ..., Vi_ ). Let _P[′]_ = ( _σ_ ( _Tij_ ) _, ..., σ_ ( _Vi_ )) be the corresponding shortest path in _σ_ ( _PDG_ ) under the automorphism _σ_ . We need to demonstrate two properties. + +First, _P[′]_ is a valid path from _σ_ ( _Tij_ ) to _σ_ ( _Vi_ ). Since _P_ is a valid path, _Tij_ is adjacent to its next node in _P_ (denoted as _Vm_ ), and this holds for every pair of neighboring nodes until _Vi_ . As _σ_ is an + +15 + +automorphism, the same adjacency relationship holds for _P[′]_ , where _σ_ ( _Tij_ ) is adjacent to _σ_ ( _Vm_ ) and so on, until _σ_ ( _Vi_ ). Hence, _P[′]_ is a valid path from _σ_ ( _Tij_ ) to _σ_ ( _Vi_ ) in PDG. + +Second, we aim to show that _|P |_ = _|P[′] |_ , meaning _pσ_ ( _i_ ) _σ_ ( _j_ ) = _pij_ . Suppose, for contradiction, that _pσ_ ( _i_ ) _σ_ ( _j_ ) = _pij_ . Let’s consider the case where _pσ_ ( _i_ ) _σ_ ( _j_ ) _< pij_ . This implies that the length of the path _P[′]_ = ( _σ_ ( _Tij_ ) _, σ_ ( _Vm_ ) _, ..., σ_ ( _Vn_ ) _, σ_ ( _Vi_ )) is shorter than _pij_ . + +Now, let’s apply _σ[−]_[1] to each node in _P[′]_ , resulting in _σ[−]_[1] ( _P[′]_ ). Since _σ[−]_[1] is also in _Aut_ ( _PDG_ ) and _σ[−]_[1] ( _σ_ ( _V_ )) = _V_ (Definition A.1), each pair of adjacent nodes in _P[′]_ , after applying _σ[−]_[1] , remains adjacent. Furthermore, the path formed by these adjacent nodes has a length of _pσ_ ( _i_ ) _σ_ ( _j_ ), connecting _Tij_ and _Vi_ in the original PDG. + +Therefore, we obtain a path in PDG connecting _Tij_ and _Vi_ that is shorter than _pij_ , contradicting the fact that _pij_ is the shortest path in PDG between _Tij_ and _Vi_ . Thus, we reject the assumption that _pσ_ ( _i_ ) _σ_ ( _j_ ) _< pij_ . + +Similarly, we can prove that _pσ_ ( _i_ ) _σ_ ( _j_ ) _> pij_ is also false by demonstrating its contradiction with the fact that _pσ_ ( _i_ ) _σ_ ( _j_ ) is the shortest path in _σ_ ( _PDG_ ). + +Hence, we conclude that _pσ_ ( _i_ ) _σ_ ( _j_ ) = _pij_ , and as a result, the positive distance matrix _dp_ remains invariant under the action of _σ ∈ Aut_ ( _PDG_ ). + +By following the same steps, we can prove that _nσ_ ( _i_ ) _σ_ ( _j_ ) = _nij_ , demonstrating the invariance of the negative distance matrix _dn_ under the action of _σ ∈ Aut_ ( _PDG_ ). + +Therefore, the distance matrix _d_ remains invariant. + +**Lemma 5.** The distance matrix _d_ of _PDG_ commutes with permutation matrix _pσ_ of the automorphism _σ ∈ Aut_ ( _PDG_ ): _d · pσ_ = _pσ · d_ . + +_Proof._ According to Lemma 4, we have: + +**==> picture [258 x 42] intentionally omitted <==** + +**Lemma 6.** Standard self-attention layer _A_ is equivariant to the group of all permutations of input sequences. + +_Proof._ Based on the operations performed by the self-attention layer and the permutation matrix, we can show the equivariance property as follows (Ji et al., 2019): + +_A_ ( _π · e_ ) + +**==> picture [135 x 13] intentionally omitted <==** + +**==> picture [284 x 60] intentionally omitted <==** + += _π_ ( _A_ ( _e_ )) + +## C SYMC IMPLEMENTATION DETAILS + +**Input sequences to self-attention.** The Transformer self-attention layer takes an input sequence of embeddings _e_ generated by the embedding layer _Emb_ . It consists of four input sequences: the + +16 + +instruction sequence _c_ , per-instruction positional embeddings, and node centrality, denoted as _xc_ , _xpos_ , _xind_ , and _xoutd_ , respectively. For example, given the instruction sequence a=a+1;b=a, _xc_ represents the tokenized sequence as (a,=,a,+,1,b,=,a). _xpos_ assigns positions such that each new instruction/statement begins with position 1 of its first token and increases by 1 for each subsequent token within the instruction. + +The centrality of each instruction is encoded by the in-degree and out-degree of the corresponding node in PDG. For each token in _ci_ , we annotate it with its in-degree (number of incoming edges) and out-degree (number of outgoing edges). For instance, in the case of a=a+1;b=a, the in-degree sequence _xind_ is (0 _,_ 0 _,_ 0 _,_ 0 _,_ 0 _,_ 1 _,_ 1 _,_ 1), and the out-degree sequence _xoutd_ is (1 _,_ 1 _,_ 1 _,_ 1 _,_ 1 _,_ 0 _,_ 0 _,_ 0). + +We embed the four sequences independently using the embedding layers _Embc_ , _Embpos_ , _Embind_ , and _Emboutd_ . The final input embedding sequences _Emb_ ( _x_ ) are obtained by summing the embedded sequences for each token: _Emb_ ( _x_ ) = _Embc_ ( _xc_ ) + _Embpos_ ( _xpos_ ) + _Embind_ ( _xind_ ) + _Emboutd_ ( _xoutd_ ). We have the following lemma: + +**Lemma 7.** The sum of the input embedding tokens sequences is _Aut_ ( _PDG_ )-equivariant: _Emb_ ( _σ ◦ x_ ) = _σ ◦ Emb_ ( _x_ ). + +Group axiom of inclusion specifies that composing the _Aut_ ( _PDG_ )-equivariant embedding layers with _Aut_ ( _PDG_ )-equivariant MHA layers results in an _Aut_ ( _PDG_ )-equivariant representation learning component _r_ in our implementation. + +## D DETAILED EXPERIMENT SETUP + +## D.1 IMPLEMENTATION DETAILS + +We implement SYMC in 40,162 lines of code using Fairseq (Ott et al., 2019) PyTorch (Paszke et al., 2019). To compute PDG for x86 assembly code, we utilize Ghidra to lift the assembly code into P-Code, an intermediate representation used by Ghidra, to track implicit data and control flow via FLAGS register. To compute PDG for Java functions, we employ JavaParser on Java ASTs to analyze control and data dependencies. We conduct all the experiments on three Linux servers with Ubuntu 20.04 LTS, each featuring an AMD EPYC 7502 processor, 128 virtual cores, and 256GB RAM, with 12 Nvidia RTX 3090 GPUs in total. + +**Datasets.** We use the Java dataset collected by Allamanis et al. (2016) to evaluate the function name prediction. The dataset includes 11 Java projects, such as Hadoop, Gradle, etc., totaling 707K methods and 5.6M statements. We fix Hadoop as our test set and use the other projects for training, to ensure the two sets do not overlap. For binary analysis, we collect and compile 27 open-source projects such as OpenSSL, which contains approximately 1.13M functions and 137.6M instructions. + +## D.2 EXPERIMENT CONFIGURATIONS + +**Hyperparameters.** We use SYMC with 8 attention layers, 12 attention heads, and a maximum input length of 512. For training, we use 10 epochs, a batch size of 64, and 14K/6K training/testing samples (strictly non-overlapping) unless stated otherwise. We employ 16-bit weight parameters for SYMC to optimize for memory efficiency. + +**Evaluation metrics.** For most analysis tasks (§5), we use _F1 score_ , the harmonic mean of precision and recall. For function similarity detection, we use Area Under Curve (AUC) of ROC curve, as it handles continuous similarity scores and varying thresholds for determining function similarity. We note that AUC-ROC might not be the most reliable metric (Arp et al., 2022), but we choose it primarily for comparing to the baselines whose results are measured in AUC-ROC (Li et al., 2021). + +## E MORE DETAILED EXPERIMENTS + +**Unseen optimizations.** We vary the compiler optimizations in training and evaluation and include reference experiments where the training and evaluation share the same optimization options (marked in gray). For function similarity detection, training on O0-O1 means the function pair has one function compiled with O0 and the other with O1. In the case of evaluating on unseen optimizations, the + +17 + +**==> picture [384 x 137] intentionally omitted <==** + +**----- Start of picture text -----**
+SymC Palmtree PalmTree-O PalmTree-N
1.0
0.8
0.6
0.4
0.2
O2-O3 Seen opts O1-O3 Seen opts O1-O2 Seen opts O0-O3 Seen opts O0-O2 Seen opts O1-O0 Seen opts
(a) Train O0-O1 (b) Train O0-O2 (c) Train O0-O3 (d) Train O1-O2 (e) Train O1-O3 (f) Train O2-O3
0.75 0.75 0.75 0.75
0.50 0.50 0.50 0.50
0.25 0.25 0.25 0.25
0.00 0.00 0.00 0.00
O0 O1 O2 O3 O0 O1 O2 O3 O0 O1 O2 O3 O0 O1 O2 O3
(g) Train O0 (h) Train O1 (i) Train O2 (j) Train O3
AUC
F1 F1 F1 F1
**----- End of picture text -----**
+ +Figure 5: Unseen optimization evaluation. The upper row, i.e., (a)-(f), shows the results on function similarity detection. The lower row, i.e., (g)-(j), are results on function signature prediction. We also include the evaluation on seen optimizations (marked in gray). + +**==> picture [386 x 146] intentionally omitted <==** + +**----- Start of picture text -----**
+SymC Palmtree PalmTree-O PalmTree-N
1.0
0.8
0.6
0.4
sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl
(a) Train sub (b) Train cff (c) Train bcf (d) Train ind (e) Train spl
1.0
0.5
sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl sub cff bcf ind spl
(f) Train sub (g) Train cff (h) Train bcf (i) Train ind (j) Train spl
AUC
F1
**----- End of picture text -----**
+ +Figure 6: Unseen obfuscations evaluation. Similar to Figure 5, the upper row, i.e., (a)-(e), shows the results on function similarity detection. The lower row, i.e., (f)-(j), are results on function signature prediction. We also include the evaluation on seen optimizations (marked in gray). + +Figure 5 shows that SYMC outperforms PalmTree by 31% when evaluated on unseen optimizations. SYMC experiences a performance drop (e.g., by 28.6%) when not trained on O0 but tested on those compiled with O0. We believe this drop is caused by the extensive optimizations already enabled at the O1 (e.g., GCC employs 47 optimizations to aggressively reduce execution time and code size). The shift in distribution between O1 and O0 is much more pronounced than between O2 and O1, indicated by a KL divergence of 1.56 from O1 to O0 compared to 0.06 (96.2% lower) from O3 to O2. Nevertheless, when evaluated on seen optimizations, SYMC outperforms PalmTree by 28.1% on average. + +**Unseen obfuscations.** We compare SYMC to baselines on generalization to unseen obfuscations. Figure 6 shows that SYMC outperforms PalmTree (on average) on unseen and seen obfuscations by 33.3% and 36.6%, respectively. Similar to the observations in evaluating unseen optimizations, while the obfuscations are not directly related to instruction permutations (i.e., automorphisms in _Aut_ ( _PDG_ )), SYMC maintains its superior performance. + +**Unseen lengths.** Besides the code transformations, we look into SYMC’s generalization to _longer_ sequences than those seen in training, a popular task for evaluating model generalizability (Gordon et al., 2019). We divide samples into four length bins (bin1 to bin4) based on their distribution in the dataset (§5). The bins are non-overlapping and increase in length. For example, we used bins + +18 + +**==> picture [392 x 87] intentionally omitted <==** + +**----- Start of picture text -----**
+SymC Palmtree PalmTree-O PalmTree-N
1.0
0.75 0.75
0.5 0.50 0.50
0.25 0.25
0.0 0.00 0.00
bin1- bin1- bin1- bin2- bin2- bin3- bin1- bin1- bin1- bin2- bin2- bin3- bin1- bin1- bin1- bin2- bin2- bin3-
bin2 bin3 bin4 bin3 bin4 bin4 bin2 bin3 bin4 bin3 bin4 bin4 bin2 bin3 bin4 bin3 bin4 bin4
(a) Function similarity (b) Function signature (c) Memory region
AUC F1 F1
**----- End of picture text -----**
+ +Figure 7: Evaluation on unseen samples with longer lengths. bin1-bin4 denotes training on samples with lengths in bin1 and testing on those in bin4. + +[0-10], [1-20], [21-50], and [51-500] for function similarity detection. Figure 7 demonstrates that SYMC maintains strong generalization to longer sequences, outperforming PalmTree by 41.8%. + +19 + diff --git a/open_review/iclr2024_8802.json b/open_review/iclr2024_8802.json new file mode 100644 index 0000000000000000000000000000000000000000..b6cb2c5f2da570392137256bea670421197b58fd --- /dev/null +++ b/open_review/iclr2024_8802.json @@ -0,0 +1,88 @@ +{ + "paper_id": "iclr2024_8802", + "source": "iclr2024", + "source_year": 2024, + "title": "Local-Forward: Towards Biological Plausibility in Deep Reinforcement Learning", + "abstract": "A lasting critique of deep learning as a model for biological intelligence and learning is the biological implausibility of backpropagation.\nBackpropagation requires caching local outputs and propagating a global error via derivatives, neither of which are known to be implemented by biological neurons.\nIn reinforcement learning, building more biologically plausible agents would allow us to better model human cognition and social behavior, and improve computational efficiency.\nWe propose Local-Forward, a new temporal-difference learning algorithm (and associated architecture) that trains neural networks to predict Q-values.\nRather than backpropagating error derivates, we rely on updates that are local to each layer of the architecture and additionally use forward connections in time to pass information from upper layers to lower layers via activations. Our approach builds on the recently proposed Forward-Forward algorithm, as well as recurrence and attention in neural architectures. \nThis approach no longer suffer the aforementioned contradictions with biology.\nFurthermore, as a proof-of-concept, we train reinforcement learning agents with Local-Forward to solve control tasks in the MinAtar environments, and show that our method's potential warrants further investigation because it opens avenues for more computational efficient training.", + "rebuttal": "Thanks for the response! We have updated the manuscript, and included more experiments on 4 new RL environments, Cart Pole, Mountain Car, Lunar Lander, and Acrobot. We chose these environments because they were used to evaluate another recent biologically-inspired algorithm for deep Q-learning, Active Neural Generative Coding (Ororbia and Mali, 2022). We also added experiments on MNIST and CIFAR-10, following Reviewer AyQt's suggestion. We're very glad to report that LF performs well on all of the new experiments. Please check out our new Appendix C and Appendix D, and hope this helps quell your remaining concerns!\n\nDear Reviewers,\n\nWe uploaded a new version of our manuscript. Following each reviewer’s advice, the major changes are as follows:\n\n- We added new experimental results for 4 additional environments, Cart Pole, Mountain Car, Lunar Lander, and Acrobot, in Appendix C. We selected these environments because they were used to evaluate another recent biologically-inspired learning algorithm for deep RL, Active Neural Generative Coding (Ororbia and Mali, 2022). We show that LF achieves strong performance in all 4 environments. (Reviewer AyQt, Reviewer MymM)\n- We added new experimental results on MNIST [...]\n\nHey again Reviewer AyQt,\n\nJust wanted to give you an update re: the additional experiments we promised to run-- they're done and in the updated manuscript :)\n\nIn Appendix C we added new experiments on 4 new RL environments, Cart Pole, Mountain Car, Lunar Lander, and Acrobot to further show the applicability of our algorithm across different RL environments, and indirectly compare LF's performance against ANGC.\nIn Appendix D we added results on MNIST and CIFAR-10. LF's performance across all these tasks look strong!\n\nWe chose Cart Pole, Mountain Car, Lunar Lander, and Acrobot as our new environ [...]\n\n- **Computational cost of LF compared to DQN.**\nThe computational efficiency gains of LF over DQN come from two main sources: increased potential for parallelization, and decreased data movement costs.\nFor DQNs (and backpropagation in general), because the error of each lower layer is dependent on higher layers, the updates must be computed sequentially layer-by-layer.\nIn contrast, since LF computes losses and updates locally (using a global signal), the layers of LF are not dependent on each other, which allows the learning to be parallelized across the layers.\nFuthermore, DQNs suffers from t [...]\n\n- **The reward signal is used globally, despite the claim that we do not propagate loss signal between cells.**\nThe reviewer is correct-- however, sending the reward globally is actually intended, and is biologically motivated by known processes from reward-based learning in the striatum (as discussed in our response to the biological insights question).\nAlthough global propagation of loss/error signals is not biologically plausible, broadcasting a reward signal globally is plausible (Li and Jasanoff, 2020).\n\n We understand this can likely be a common point of confusion. To improve clarity, w [...]\n\nWe thank the reviewer for their comments and suggestions.\n\nWe particularly appreciate that the reviewer gave detailed, constructive feedback to help us improve our work, while acknowledging the future potential of our approach.\n\nWe are currently working on additional experiments that compare LF's performance against ANGC, and evaluate LF's performance on MNIST and CIFAR-10 to further support its robustness across tasks.\n\nIn the meantime, we want to address the other concerns and questions the reviewer raised:\n\n- **Biological insights beyond just \"it can solve MinAtar.\"**\nThanks for raising thi [...]\n\n- We have a two-part answer regarding **Weakness 3**, i.e. by conducting our experiments on MinAtar, we only cover 5 basic tasks.\nFirst, while solving MinAtar might not be challenging for more established deep RL algorithms, in our experience they are not certainly not basic tasks for a novel algorithm that does not utilize backpropagation.\nFor example, Active Neural Generative Coding (Ororbia and Mali, 2022), another recently developed biologically-inspired deep Q-learning algorithm, is evaluated on four simpler environments, but their work is nonetheless a very insightful contribution that p [...]\n\nWe thank the reviewer for their comments and suggestions. \n\nUnfortunately, we believe there are some significant misunderstandings, particularly regarding the novelty of our algorithm and our contributions, that may have affected the reviewer’s judgment. This likely reflects that our paper does not present these aspects of our work sufficiently clearly. Thus, we have adjusted Sections 1, 2 and 3 of our upcoming updated manuscript accordingly to better communicate them, but we also want to first provide a more direct response here.\n\n- We believe the reviewer misinterpreted our work as just an [...]\n\nRegarding your question: this is indeed an interesting and surprising observation— intuitively, it seems that a multi-layer network without an information channel from upper to lower layers should not perform well, as the upper layers cannot provide any feedback to the lower layers.\nWe can’t claim any credit for the discovery of this unexpected behavior; it was first raised by Hinton (2022).\nHinton showed that, for the MNIST classification task, the lower layers of a multi-layer network trained without any downward connections can nonetheless learn useful features for upper layers, and thus ac [...]\n\nWe thank the reviewer for their comments and suggestions.\n\nWe particularly appreciate that the reviewer took extra time to give specific, actionable feedback. We agree with the weaknesses, and addressed each concern in our upcoming updated manuscript to improve it. Specifically:\n\n- We modulated our claim in the first bullet point of the contributions; it now reads “We propose an alternative to backpropagation for reinforcement learning that suffers less contradictions with known biology.\"\n- We standardized \n[rebuttal truncated]", + "initial_scores": [ + 6, + 3, + 6 + ], + "score_mean": 5.0, + "score_variance": 3, + "score_spread": 3, + "score_min": 3, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "This submission proposes \"Local-Forward,\" an new temporal-difference learning algorithm for prediction Q-values. This algorithm attempts to replace the biologically-implausible backpropagation algorithm with a method that utilizes local updates and forward connections, drawing inspiration from the Forward-Forward algorithm and integrating aspects of recurrence and attention in neural architectures. This is an important topic, and the paper went through major updates during the rebuttal.\n\nHowever, despite the authors' efforts to clarify, the core novelty of the proposed Local-Forward algorithm remains ambiguous. Reviewers pointed out that it appears to be a variant of the existing Forward-Forward algorithm applied to reinforcement learning tasks, and the authors' response, while detailed, has not fully addressed these concerns. The scope and depth of the experiments conducted to validate the proposed algorithm are limited. Although the authors have expanded their experimental setup in response to reviewer feedback, the additional experiments still do not comprehensively demonstrate the algorithm's effectiveness or superiority over existing methods. While the paper aims to address the biological implausibility of backpropagation, it does not convincingly establish the biological plausibility of its own approach. See reviewer comments below for full details of these points.", + "forum_id": "fjRM5ozPv9", + "primary_area": "reinforcement learning", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_eRt9", + "review_id": "CDSCPXM76g", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 4, + "contribution": 3, + "confidence": 2 + }, + "review_text_chars": 2204, + "edit_detected": true, + "edit_delta_seconds": 759370, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_MymM", + "review_id": "2AujE5TCoC", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 1636, + "edit_detected": true, + "edit_delta_seconds": 2400366, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_AyQt", + "review_id": "JQ8oKtf4VJ", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 4009, + "edit_detected": true, + "edit_delta_seconds": 3450730, + "post_rebuttal_text_signal": true, + "score_mentions_in_text": [ + { + "from": 3, + "to": 6 + } + ] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": true, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8802.md b/open_review/iclr2024_8802.md new file mode 100644 index 0000000000000000000000000000000000000000..845dbc435e31f3b456c1776444ca852f3d2a2bc9 --- /dev/null +++ b/open_review/iclr2024_8802.md @@ -0,0 +1,361 @@ + + +## - LOCAL-FORWARD: TOWARDS BIOLOGICAL PLAUSIBIL ITY IN DEEP REINFORCEMENT LEARNING + +Authors withheld for review + +## ABSTRACT + +A lasting critique of deep learning as a model for biological intelligence and learning is the biological implausibility of backpropagation. Backpropagation requires caching local outputs and propagating a global error via derivatives, neither of which are known to be implemented by biological neurons. In reinforcement learning, building more biologically plausible agents would allow us to better model human cognition and social behavior, and improve computational efficiency. We propose Local-Forward, a new temporal-difference learning algorithm (and associated architecture) that trains neural networks to predict Q-values. Rather than backpropagating error derivatives, we rely on updates that are local to each layer of the architecture and additionally use forward connections in time to pass information from upper layers to lower layers via activations. Our approach builds on the recently proposed Forward-Forward algorithm, as well as recurrence and attention in neural architectures. This approach no longer suffer the aforementioned contradictions with biology. Furthermore, as a proof-of-concept, we train reinforcement learning agents with Local-Forward to solve control tasks in the MinAtar environments, and show that our method’s potential warrants further investigation because it opens avenues for more computational efficient training. + +## 1 INTRODUCTION + +Computer science and neuroscience have long had a reciprocal and mutually beneficial relationship. Indeed, artificial neural networks were inspired by biologically neural networks and foundational RL algorithms have close analogues to neurological processes [31]. Although artificial neural networks share many similarities to biological neural networks, they also differ in many potentially important ways. One such difference is how training occurs. Biological neural networks are trained through activation differences [18]. Instead, backpropagation [29] has been the gold standard technique for training artificial neural networks. Yet, backpropagation computes derivatives of the model prediction errors via automatic differentiation to update the model parameters and requires backwards connections in the computational graph, which contradicts known biology. + +A recent proposal introduces a more biologically-plausible alternative to training artificial neural networks – the Forward-Forward algorithm [13]. In training algorithm, each layer of a neural network is greedily trained to separate positive and negative data using only the activations of that layer. This local, layer-wise loss still enables layers to learn useful representations for subsequent layers; Forward-Forward achieves comparable performance to backpropagation at training a fully-connected network on MNIST [8] and CIFAR-10 [17]. + +We propose a novel algorithm, Local-Forward, which builds on the Forward-Forward method and applies it to reinforcement learning [34]. Because Forward-Forward computes local updates rather than error derivatives (as would be the case in backpropagation), the approach has several potential advantages. First, it may more readily model human cognition. This has implications for areas of reinforcement learning; for instance, it allows us to better model interactions between humans and MARL-agent based models. Second, humans are able to solve many tasks that remain out of reach of artificial neural networks. Hence, biological plausibility has the potential to uncover new techniques for training and deploying reinforcement learning agents. Third, limitations of backpropagation make it computationally-expensive to scale training to increasingly larger models, or take advantage of more efficient neuromorphic hardware [15]. An algorithm like Forward-Forward may lead to significantly + +1 + +**==> picture [342 x 153] intentionally omitted <==** + +Figure 1: Network architecture of a 3-layer Local-Forward network. _h_[[] _t[l]_[]][represents the activations of] layer _l_ at time _t_ , and _st_ the input state. The blocks are Local-Forward cells, whose inner workings are shown in Figure 2. Unlike backpropagation, loss signals do not propagate across layers or timesteps; each layer computes its own loss. To relay information, upper layers send their activations to lower layers in the next timestep. For example, red shows all active connections at _t_ = 1. + +more efficient computational graphs for training larger models. As reinforcement learning can be very compute intense, this is highly desirable. + +Local-Forward builds on two ideas from Forward-Forward to design a novel architecture and training algorithm for deep Q-learning. The first is the local losses to replace the backpropagation of a global error, and the second is the forward[1] connections in time for sending information to lower layers; hence, the name Local-Forward. Figure 1 outlines the architecture of a Local-Forward network, unfolded in time. The structure of the network is similar to a recurrent network, except the forward connections are downwards, and each layer is a Local-Forward cell (see Figure 2), which contains additional components for computing the local Q-prediction and TD loss. + +To test the capabilities of Local-Forward, we evaluate it in the MinAtar testbed [38], which are miniaturized implementations of Atari games, and compare its performance against a Deep Q Network (DQN) [24] trained via backpropagation. The MinAtar environments reflects many of the challenges faced in deep RL [4], while remaining sufficiently tractable that a simpler architecture like a fully-connected double DQN can reach good performance, making it ideal for exploring an alternative to the well-established backpropagation. Our results in Figure 3 show that Local-Forward achieves close performance to DQN in 4 of the 5 environments, and outperforms the DQN baseline in one of the environments. To further demonstrate that our algorithm is applicable across environments, we also performed experiments on several classic RL control environments, as well as MNIST and CIFAR-10, and show the results in Appendix C and Appendix D. + +To summarize our core contributions: + +- We propose an alternative to backpropagation for reinforcement learning that suffer less contradictions with known biology. + +- We propose a new architecture and training scheme for Q-learning that builds upon ForwardForward. Our algorithm trains a neural network that minimizes TD error using only local updates, with no gradients propagating between layers. To send information to lower layers, upper layers utilize connections that send activations forward in time. + +- We empirically show that Local-Forward achieves comparable performance with a similarsized DQN in our experiments on the MinAtar environments. We further show that the forward connections are critical to performance. Our proof of concept demonstrate the learning potential of our Local-Forward approach and architecture. + +1"Forward" and "backward" are widely used both to describe direction in time and in the order of layers. This can be confusing. For the remainder of this paper, we use "forward/backward" when describing time, and "upper/lower" when describing position among layers. + +2 + +## 2 BACKGROUND + +## 2.1 TEMPORAL DIFFERENCE LEARNING + +Formally, we consider a standard discounted infinite horizon Markov Decision Process (MDP) setting with states _S_ , actions _A_ , a transition kernel _p_ ( _s[′] |s, a_ ), a reward function _r_ : _S × A →_ R and a discount factor _γ ∈_ [0 _,_ 1]. The goal of learning is to obtain a policy _π_ ( _a|s_ ) that maximizes the discounted future sum of rewards. The value function _Q_ : _S × A →_ R measures how valuable a given action _a ∈A_ is in a given state _s ∈S_ , and can be used to directly compute a policy. It is defined via a recursive formula _Q_ ( _s, a_ ) = _r_ ( _s, a_ ) + _γ_[�] _s[′][ p]_[(] _[s][′][|][s, a]_[)][ �] _a[′][ π]_[(] _[a][′][|][s][′]_[)] _[Q]_[(] _[s][′][, a][′]_[)][ which] means classic supervised learning methods are insufficient to directly estimate it. + +Temporal difference learning (TD learning) methods are a well established family of approaches that aim to solve the problem of estimating the recursively defined Q function [33]. In their most basic form, they can be implemented as lookup tables, where an estimate of the Q function is kept for each state-action pair. When experience in the form of _s, a, r, s[′]_ tuples becomes available from interaction with the MDP, the Q function estimates are updated using the TD error _δ_ ( _s, a, s[′]_ ) = _r_ ( _s, a_ ) + _γ_[�] _a[′][ π]_[(] _[a][′][|][s][′]_[)] _[Q]_[(] _[s][′][, a][′]_[)] _[ −][Q]_[(] _[s, a]_[)][.][The update rule is] _[ Q][k]_[+1][(] _[s, a]_[)] _[ ←][Q][k]_[(] _[s, a]_[) +] _[ α][k][δ]_[(] _[s, a, s][′]_[)][.] + +In many practical applications, especially real-world interaction like those the human brain is capable of dealing with, a tabular representation of the Q values for all distinct state-action pairs is computationally infeasible. In these cases, function approximation, for example via linear regression or neural networks, is necessary to obtain an estimate of the Q function. These methods, called Fitted Q Iteration [1] or Deep Q Learning [23], use the squared temporal difference error as a regression loss _L_ ( _s, a, s[′]_ ) = _δ_ ( _s, a, s[′]_ )[2] and update a parametric Q function approximation via gradient descent. To prevent the double sampling bias and other instabilities, only _Q_ ( _s, a_ ) is updated and the next states value is estimated with an independent copy _Q_[¯] that is not updated. This is commonly called the bootstrapped Q loss and can be written down as: + +**==> picture [248 x 21] intentionally omitted <==** + +We are particularly interested in exploring methods to progress the biological plausibility of TD learning algorithms, because TD learning is widely studied as an explanatory model in neuroscience for biological learning [32; 6]. Empirical evidence suggests that the phasic activity of dopamine neurons in the midbrain correlates with prediction errors, which can be formalized via TD, and provides a global learning signal for synaptic modification [10]. + +## 2.2 FORWARD-FORWARD LEARNING + +The Forward-Forward (FF) algorithm [13] is a greedy multi-layer learning algorithm that replaces the forward and backward passes of backpropagation with two identical forward passes, positive and negative. These passes differ only in the data fed through the network and the objective they optimize. For a positive pass, the update increases the goodness _g_ of that layer. In the case of a negative pass, the update decreases goodness. While Hinton [13] proposes several measures of goodness, the de facto measure used is the sum of each squared hidden activation _hi_ of the layer minus a threshold _θ_ , i.e. _g_ =[�] _i[h] i_[2] _[−][θ]_[.][The positive data are real examples while the negative data is ‘fake.’][One way to] generate the fake data is by masking and overlaying real examples. For the MNIST dataset, this could be combining the top half of a 7 with the bottom of a 6. The goal of the model is to correctly classify an input as either positive (real) or negative (fake). To optimize each layer’s weights, FF minimizes the binary cross-entropy loss between the sigmoid of the goodness _σ_ ( _g_ ) and the ground truth. Each of the positive and negative pass performs a local update on every layer. Whereas backpropagation is a global algorithm that requires the entire network to be updated at once, the FF is a local algorithm that updates each layer independently through the use of layer-wise local losses. For a feed-forward architecture, one glaring issue with this approach is that representations are learned one layer at a time with no way for later layers to influence earlier ones. One way to address this is to use a multi-layer recurrent architecture, where for each layer _ℓ_ in the network, the input is determined by output of the layers above _ℓ_ + 1 and below _ℓ −_ 1 at the previous time step _t −_ 1. This allows the network to learn representations in a greedy fashion, but also allows for top-to-bottom information flow throughout the network. + +3 + +**==> picture [397 x 141] intentionally omitted <==** + +Figure 2: Inner workings of our proposed Local-Forward cell (i.e., hidden layer). _h_[[] _t[l]_[]][is the activations] of the cell _l_ at time _t_ , and _Q_[ˆ][[] _t[l]_[]][is the Q-value prediction.][We compute the cell’s activations] _[ h]_[[] _t[l]_[]][using] a ReLU weight layer, then use an attention-like mechanism to compute _Q_[ˆ][[] _t[l]_[]][.][Specifically, we obtain] _Q_ ˆ _t_[[] _[l]_[]][by having the cell’s][ tanh][ weight layers, one for each action, compute attention weights that are] then applied to _h_[[] _t[l]_[]][.][Each cell computes its own error.] + +## 3 METHOD + +The core purpose of the method is to obtain a TD-learning algorithm that works via purely local updates; we do not propagate any loss signals between layers of the network. To achieve this, the network is composed of individual layers that each solve the TD regression problem individually. We refer to each of these layers as a _cell_ . The cells are connected via their activations, which they provide as inputs to the next cell (i.e., layer). The whole architecture is summarized in Figure 1. + +## 3.1 CELL INTERNALS + +Our network architecture is designed around individual cells which perform local computations with the squared TD loss. Unlike FF, which separates positive from negative data during training, a binary classification task, predicting the Q-value is a regression task and requires more precision. Inside the Local-Forward cells, we use an attention-like mechanism [2] that learns a weighted sum of the layer’s hidden activations to predict the Q-value. The hidden activations are passed to other cells, but the attention weights and Q-value are withheld. + +The concept of a cell is reminiscent of the design of a recurrent neural network. In our case, there is a single cell per layer – so we may use the terms interchangeably for clarity of exposition. The vital difference is that no loss information is propagated between cells via backpropagation, i.e. there is no backpropagation in time, and the same activations are passed to the cell (i.e., hidden layer) above, which happens in the same timestep, and the layer below, at the next timestep. In the absence of backpropagation, these activations provide a pathway for upper cells to communicate information to lower cells. We discuss in more detail how these connections operate in Section 3.2. + +The cell design is presented in Figure 2. Recall that each cell corresponds to a ‘layer’ in a typical network architecture. Each cell is mechanistically identical and takes in two inputs: the hidden activations of the cell below at the current timestep (or the observation if at the lowest cell), and the hidden activations of the cell above at the previous timestep. They produce two identical outputs, sent to the cell above immediately, and the cell below at the next time step. At the start of an episode, the activations from the previous timestep are zero. The top cell only receives one input and produces one output. Our design currently only admits one-dimensional representations. Hence, we leave extensions to convolutional 2D and 3D networks to future work. + +We introduce an attention mechanism [2] to compute the Q-value prediction. Each cell first computes its hidden activation, _h_[[] _t[l]_[]][,][using][the][layer][above’s][hidden][activations][from][the][previous][timestep,] _ht_[[] _[l] −_[+1]] 1[, and the layer below’s hidden activations at the current timestep,] _[ h] t_[[] _[l][−]_[1]] . Specifically, it passes + +4 + +the concatenation of _h_[[] _t[l] −_[+1]] 1[and] _[ h] t_[[] _[l][−]_[1]] through a ReLU weight layer (shown in Figure 2) to get _h_[[] _t[l]_[]][.] The ReLU weight layer multiplies the concatenated input [ _h_[[] _t[l][−]_[1]] _, h_[[] _t[l] −_[+1]] 1[]][ by its learned weight matrix] _W_ in[[] _[l]_[]][, then applies the][ ReLU][ nonlinearity function.][Next, the cell passes] _[ h]_[[] _t[l]_[]][through the][ tanh][ weight] layers, each corresponding to an action _a_ , which multiplies _h_[[] _t[l]_[]][by its learned weight matrix] _[ W]_[ [] query _[l]_[]][,] then applies the tanh function. The output of the tanh layers plays a role akin to attention weights, although they do not have to sum to 1. Finally, the cell takes the inner product between the output of the tanh layers, tanh( _W_ query[[] _[l]_[]] _[·][ h]_[[] _t[l]_[]][)][, and the hidden activations] _[ h]_[[] _t[l]_[]][, to compute the cell’s Q-value] prediction _Q_[ˆ][[] _[l]_[]] ( _st, a_ ). This structure is heavily inspired by the successful attention architecture [2], and allows each cell to attend to the incoming information dynamically per action. + +Again, recall that each cell corresponds to a layer of our neural network. Each cell reuses its internal weights over time, meaning for instance that the matrix _W_ in[[1]][is used at each timestep in the first cell.] However, across cells, weight matrices are independent, meaning _W_ in[[1]][=] _[ W]_[ [2]] in[.] + +To summarize, the full computation performed by the cell is: + +**==> picture [152 x 59] intentionally omitted <==** + +## 3.2 NETWORK CONNECTIONS + +As shown in Figure 1, each cell passes its state to the cell _l_ + 1 above at the current timestep _t_ , and to the cell _l −_ 1 below in the next timestep _t_ + 1. The information flow is strictly uni-directional to account for the causal sequence of RL environments. This is necessary as interacting with the environment happens sequentially, meaning future information will not be available when acting. + +Although we do not backpropagate gradients across cells, information does flow from upper layers to lower layers via the temporal connection. The upper layers use the connections to communicate with lower layers via activations, which is more biologically plausible [25]. Our results in Section 3 suggest that these connections can greatly increase network performance in the absence of backpropagation. + +## 3.3 LEARNING ALGORITHM + +We formally describe our learning algorithm in Algorithm 1. + +Each cell is updated using the Double Q-learning algorithm [36]. This is a simple and robust extension to the Q-learning algorithm [23] presented in Section 2. In Double Q-learning, the maximization problem defined to find the optimal next state action is solved over the online network, but the evaluation of that action uses a separate target network. This alleviates overestimation problems commonly plaguing deep Q-learning, as different networks are used to estimate and evaluate the optimal action. + +The loss itself needs not change to be adaptable to our setup. The target network is produced, as in double DQN implementations, by replicating the proposed network structure per cell and periodically copying the learned parameters. Different from standard deep Q-learning however, each layer of the network computes its own local loss and update using a global reward signal. Specifically, the reward is broadcasted to all cells, and each cell computes their own Q-value prediction, TD-target, and TD-loss for learning. Globally broadcasting the reward signal to enable local learning is biologically motivated, imitating reward-learning processes in the striatum, which globally broadcasts reward signals via dopamine release that induces local updates [19] (see Appendix E for more details). During inference, the network uses the average Q-values across the layers to produce a final prediction. This can also be interpreted as a bagging method, in which several weaker regression models work jointly to compute a prediction. + +During training, we use a standard replay buffer which stores every transition observed from the environment. We replay sequences of short length, similar to how other recurrent architectures are trained, and compute the local updates for each cell sequentially according to the network graph. + +5 + +**Algorithm 1** Local-Forward Q-Learning + +Initialize replay memory _D_ to capacity _N_ Initialize action-value functions _Q_[[1]] _, . . . , Q_[[] _[L]_[]] with random weights _θ_[[1]] _, . . . , θ_[[] _[L]_[]] Initialize target function _Q_[ˆ][[1]] _, . . . , Q_[ˆ][[] _[L]_[]] with weights _θ_[[] _[i]_[]] _[′]_ = _θ_[[] _[i]_[]] for every _i ∈{_ 1 _, . . . , L}_ **for** episode 1, _M_ **do** Initialize _s_ 1 = initial state **for** _t_ = 1 _, T_ **do** With probability _ε_ select a random action _at_ 1 _L_ otherwise select _at ∈_ arg max _a L_ � _l_ =1 _[Q]_[[] _[l]_[]][(] _[s][t][, a]_[;] _[ θ]_[[] _[l]_[]][)] Execute action _at_ in emulator and observe reward _rt_ +1 and next state _st_ +1 Store experience ( _st, at, rt_ +1 _, st_ +1) in _D_ Sample minibatch of _K_ -sized episodic sub-trajectories ( _sj−K, aj−K, rj−K_ +1 _, sj−K_ +1) _, . . . ,_ ( _sj, aj, rj_ +1 _, sj_ +1) from _D_ with uniform randomness Replay states _sj−K, . . . , sj−_ 1 through online network to obtain layer activations _h_[[1]] _j−_ 1 _[, . . . , h]_[[] _j[L] −_[]] 1 Set current layer input _x ← sj_ **for** layer _l_ = 1 _, . . . , L_ **do** _rj_ +1 if episode terminates at step _j_ + 1 Set TD target _Yj_[[] _[l]_[]] = � _rj_ +1 + _γ_ max _a Q_[ˆ][[] _[l]_[]][ �] _sj_ +1 _, Q_[[] _[l]_[]] ( _sj_ +1 _, a_ ; _θ_[[] _[l]_[]] ); _θ_[[] _[l]_[]] _[′]_[�] otherwise Set prediction _yj ← Q_[[] _[l]_[]] ( _st, aj_ ; _θ_[[] _[l]_[]] ) using _x_ and last activations _h_[[] _t[l][−]_[1]] and _h_[[] _t[l] −_[+1]] 1 Perform a gradient descent step on ( _Yj_[[] _[l]_[]] _− yj_ )[2] with respect to the layer parameters _θ_[[] _[l]_[]] Set input for next layer _x ← h_[[] _j[ℓ]_[]][(] _[x]_[)] **end for** Every _C_ steps reset _θ_[[] _[i]_[]] _[′]_ = _θ_[[] _[i]_[]] for every _i ∈{_ 1 _, . . . , L}_ **end for end for** + +To use the network for environment interaction, we simply keep the recurrent state for each cell and run the computation again, choosing the maximum action according to the aggregated Q function at each timestep. We also found it valuable to use _ϵ_ -greedy exploration to obtain more diverse data. + +## 4 EXPERIMENTS + +As our main purpose is to demonstrate the potential of a novel architecture and learning algorithm, rather than achieve state-of-the-art performance, we opt for a simple implementation with few extensions. Our experiments are designed to support our claim that Local-Forward architecture and algorithm is a promising alternative to backpropagation – and addresses the latter’s biological implausibility. In particular, we empirically show that Local-Forward cells are able to learn meaningful representations by optimizing their local TD error. This setup is similar to the evaluation presented by Hinton [13]. However, we do not use a convolutional network, and the only extension we employ is Double Q-learning [36] to improve learning stability. + +**Environments.** We run our experiments in the MinAtar [38] environment suite. MinAtar is an simplified implementation of 5 Atari 2600 games: Seaquest, Breakout, Asterix, Freeway, and Space Invaders. We use version 1 for all environments. The input frame size is 10 _×_ 10, and the _n_ different objects in each game are placed on separate frames, resulting in a 10 _×_ 10 _× n_ input observation. All tasks have discrete action spaces with up to 6 actions. + +We select this set of environments because they reflect challenges in solving control tasks with highdimensional observations [4], where neural networks are widely adopted, while still remaining simple enough that convolutional layers are not critical. Although the DQN baselines published by [38] + +6 + +**==> picture [136 x 112] intentionally omitted <==** + +**==> picture [136 x 112] intentionally omitted <==** + +**==> picture [135 x 112] intentionally omitted <==** + +**==> picture [135 x 112] intentionally omitted <==** + +**==> picture [135 x 109] intentionally omitted <==** + +Figure 3: Episodic returns of Local-Forward, DQN, Local-Forward without forward connections, and single layer Local-Forward cells on the MinAtar environments. Lines show the mean episode reward over 10 seeds and the shaded area conforms to 3 standard errors of the mean. + +are obtained using a convolutional neural network (CNN), a larger DQN with only fully-connected layers can solve all tasks with comparable or stronger performance. + +**DQN baseline.** We compare our results against a fully-connected DQN to make performance comparisons more direct and informative. As the original baselines by Young & Tian [38] used a CNN, for fairness of comparison, we replaced the CNN with fully-connected layers, and tuned hyper-parameters for the new architecture. We find that the new architecture is consistently as good or better than the one presented by Young & Tian [38]. In particular, we use a double DQN with 3 hidden layers of 1024, 512, and 512 hidden units with ReLU activations. This baseline achieves strong performance and has a similar number of trainable parameters as our networks. + +**Network architecture and hyperparameters.** We use a 3 hidden layer network with forward activation connections. The cell output sizes are 400, 200 and 200. Because we have additional connections within cells, and from upper cells to lower cells, this yields a similar number of trainable parameters as the DQN (see Appendix B). To study the performance effects of the forward connections to lower layers, we also run experiments using the same network without these connections. + +We train agents in each environment for 5 million time steps, with a data-to-update ratio of 4. We use a learning rate of 10 _[−]_[4] , Adam optimization with a warmup scheduler and annealing, an exploration fraction of 0.1, and _ϵ_ -greedy exploration that anneals from 1.0 to 0.01. For more details, see Appendix A. We use the same network and hyperparameters for all 5 environments to test the robustness of our architecture and learning algorithm across similar environments. + +## 5 RESULTS + +We present the results of Local-Forward on MinAtar environments in Figure 3, and compare its performance against DQN, Local-Forward without the forward connections to lower layers, and a single layer Local-Forward cell. + +**Comparison against DQN baseline.** We find that the Local-Forward algorithm is able to learn stable policies reliably in all test environments. Our agent achieves comparable performance to DQN on MinAtar’s Breakout, Asterix and Freeway, slightly surpassing DQN’s performance on Asterix and + +7 + +Freeway, while DQN shows stronger performance in Seaquest and Space Invaders. Our findings here are slightly surprising as our DQN baseline strongly outperforms the results presented by Young & Tian [38], which leads us to believe that the exact network architecture and hyper-parameter tuning method might be important to consider for future experiments with this benchmark suite. + +However, it is promising that Local-Forward matches or outperforms benchmark DQN MinAtar results presented by both Young & Tian [38] and [4], which leads us to believe that the method can be a viable alternative approach to backpropagation in deep reinforcement learning if further explored. + +**Forward connections to lower layers.** To further measure the performance impact of the forward connections in time, we compared the temporal forward version of the network with the performance of a 3-layer Local network using only upward connections and no forward connections. All other hyper-parameters are the same as the recurrent 3-layer Local-Forward network. This results in a moderate drop in performance in SpaceInvaders and Breakout, but devastating drops in Seaquest and Asterix. This strongly suggests that the information channels from the upper to lower layers is vital for performance for many tasks. On this same note, Local-Forward’s ability to achieve similar performance to DQN when the forward connections are added suggest that forward connections may be an effective replacement for backpropagation in certain environments. + +In Seaquest, where the performance gap is most apparent, the agent’s struggle may be attributed to the failure of learning the resurfacing mechanism, which traps it at a local minima. In this environment, the agent must regularly resurface while carrying a diver to replenish oxygen. In the short term, the agent can acquire more reward if it prioritized attacking enemies, rather than managing oxygen, but if it runs out of oxygen the episode ends. We observed that the Local-Forward agent without forward connections and the single layer agent both struggled to manage oxygen, often resurfacing randomly or without first acquiring a diver. In contrast, the Local-Forward agent with the forward connections learns to manage their oxygen more optimally, and often sacrifice short-term rewards to maintain higher oxygen. In fact, during some trials the Local-Forward agent became ultraconservative with oxygen, which led to the agent surviving on average over 1500 timesteps per episode over several thousand episodes before it changed strategy. Interestingly, this same behavior was not observed in DQN agents, whose average episode lengths are consistently under 800. This suggests that Local-Forward has the potential to learn completely different policies from DQN. + +Similarly, in Asterix, we observed that the agent without forward connections struggles to adapt to increased difficulties as the game progresses and the enemies increase. As training progresses, the agent’s performance decreases as it unsuccessfully tries to find a strategy for later stages of the game. + +However, in Freeway the forward connections seem to have minimal impact on the Local-Forward agent’s performance. This is likely a result of the relative simplicity of the environment, and its fixed-episode length format. Unlike the other environments, the episode length of Freeway is fixed at 2500 timesteps, and agents receive reward each time they successfully cross a road during the episode. Once the agent nears an episodic return of 60, it cannot further increase performance, because there is no time to earn more reward even with a near optimal policy. This is reflected in the steep increases in returns in the early phase of learning, followed by rapid flattening. Therefore, both the DQN and Local-Forward agent has no room to pull ahead in performance from the others. + +**Single layer performance.** Another important question about the presented architecture is whether the majority of the learning is accomplished by the lowest cell which is directly supplied with the state. In that case, the inner attention mechanism of the cell can function like a shallow, two layer fully-connected network, which can perform well in simpler RL environments. + +Our ablation study of a single layered cell shows that it is insufficient to achieve strong performance on any of the benchmarking tasks. In all environments, including the simpler Freeway, there are notable gaps between the performance of the single layered cell and the 3-layer Local-Forward network, showing that the multi-layer architecture with forward connections provide crucial performance benefits. + +Additionally, like the Local-Forward network without forward connection, the single layer cell also struggles at Seaquest and Asterix, while the Local-Forward network with the connections thrive. This also provides circumstantial evidence to support the hypothesis that both the multi-layered architecture and the forward connections are essential, and that the forward connections can convey meaningful information to lower layers directly via activations for coordinating learning. + +8 + +## 6 LIMITATIONS + +We make progress towards biologically plausible deep RL by replacing backpropagation with localonly losses and forward connections in time. The latter allow us to pass information to lower layers. However, our model does not capture all aspects of biological neural networks. + +For example, biological neural networks have backward connections that allow for hierarchical predictive coding and the updating of weights through the comparison of pre- and post- synaptic weights [5]. The additional loss function that captures this comparison minimizes the difference between predicted and actual activations. Instead, the model we propose analyzes local losses based on TD errors alone. Additional work will be required to consider other aspects of biological cognition, such as Hebbian learning [12]. Doing so may affect local losses. For instance, a tension between the Hebbian (contrastive) loss and error driven loss could arise within different components of the architecture, which would make it difficult to scale to larger models. Careful consideration will thus be required as to the choice of specific error that each component is sensitive to. + +While we do not propagate any loss signal between cells, within each cell we use an attention-like mechanism [2] to compute the Q-value predictions. This attention-like mechanism is trained via backpropagation, albeit we only propagate through one layer: the loss signal for the ReLU weight layer is propagated through the tanh weight layer. Given that the architecture of this mechanism is very simple, it is likely possible to replace backpropagation as the training algorithm for this mechanism with a more biologically plausible alternative, such as Difference Target Propagation [9] or Equilibrium Propagation [30]. We plan to explore this direction in future work. + +We present this work as an alternative pathway into finding learning architectures and algorithms. In this sense, the paper serves a both an investigation into components that are closer to biological structures, as well as a proof-of-concept that shows this learning paradigm can perform at least as well as established algorithms as DQN. We do not claim state-of-the-art performance over more recent algorithms, as this is a radically departure from established algorithms and more time would be needed to match the performance of algorithms like Rainbow or MuZero. But we believe that our results show that this alternative is feasible and promising. + +## 7 RELATED WORK + +While many early RL algorithms are strongly inspired by neuroscience [37; 7], the machine learning literature has since diverged from these roots and focused strongly on combining reinforcement learning with modern neural networks to produce competitive algorithms [22; 21; 11] for benchmark suits like the Arcade Learning Environment [3] or the DeepMind Control Suite [35]. + +Biologically inspired learning algorithms seek to reconnect machine learning with neurobiology. Similar to our work, [28] proposes an alternative to backpropagation for deep Q-learning that is more biologically plausible, based on the Neural Generative Coding framework [27]. Other related approaches for more plausible deep learning include Feedback Alignment [20], which addresses the weight transport problem of backpropagation [20], target propagation [18], which generates local errors, and SoftHebb [16], which uses Hebbian learning. + +## 8 CONCLUSION + +We proposed Local-Forward, a deep Q-learning algorithm and architecture that alleviates several contradictions between deep RL and biological learning, particularly due to the biological implausibility of backpropagation. Each Local-Forward cell computes its own local TD error, based on the difference between its prediction and the TD target. The TD target is provided to all cells; in parts of the brain this could be achieved by a global signal via dopamine neurons. To send information to lower layers, upper layers send their activations forward in time to the layer below, hence the name Local-Forward. We empirically showed that Local-Forward can learn control tasks in the MinAtar environments, and even surpasses a similar-sized DQN in performance in 2 environments. Thus, we believe it warrants further investigation. We outline some areas for investigating potential improvements in our limitations. + +9 + +## REFERENCES + +- [1] András Antos, Csaba Szepesvári, and Rémi Munos. Learning near-optimal policies with bellman-residual minimization based fitted policy iteration and a single sample path. _Machine Learning_ , 71:89–129, 2008. + +- [2] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. _arXiv preprint arXiv:1409.0473_ , 2014. + +- [3] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. _Journal of Artificial Intelligence Research_ , 47:253–279, jun 2013. + +- [4] Johan Samir Obando Ceron and Pablo Samuel Castro. Revisiting rainbow: Promoting more insightful and inclusive deep reinforcement learning research. In _International Conference on Machine Learning_ , pp. 1373–1383. PMLR, 2021. + +- [5] Chun-Chuan Chen, RN Henson, Klaas E Stephan, James M Kilner, and Karl J Friston. Forward and backward connections in the brain: a dcm study of functional asymmetries. _Neuroimage_ , 45(2):453–462, 2009. + +- [6] Will Dabney, Zeb Kurth-Nelson, Naoshige Uchida, Clara Kwon Starkweather, Demis Hassabis, Rémi Munos, and Matthew Botvinick. A distributional code for value in dopamine-based reinforcement learning. _Nature_ , 577(7792):671–675, 2020. + +- [7] Peter Dayan. Improving generalization for temporal difference learning: The successor representation. _Neural computation_ , 5(4):613–624, 1993. + +- [8] Li Deng. The mnist database of handwritten digit images for machine learning research. _IEEE Signal Processing Magazine_ , 29(6):141–142, 2012. + +- [9] Maxence M Ernoult, Fabrice Normandin, Abhinav Moudgil, Sean Spinney, Eugene Belilovsky, Irina Rish, Blake Richards, and Yoshua Bengio. Towards scaling difference target propagation by learning backprop targets. In _International Conference on Machine Learning_ , pp. 5968–5987. PMLR, 2022. + +- [10] Paul W Glimcher. Understanding dopamine and reinforcement learning: the dopamine reward prediction error hypothesis. _Proceedings of the National Academy of Sciences_ , 108 (supplement_3):15647–15654, 2011. + +- [11] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. In _International Conference on Machine Learning_ , 2018. + +- [12] Donald Olding Hebb. _The organization of behavior: A neuropsychological theory_ . Psychology press, 2005. + +- [13] Geoffrey Hinton. The forward-forward algorithm: Some preliminary investigations. _arXiv preprint arXiv:2212.13345_ , 2022. + +- [14] Shengyi Huang, Rousslan Fernand Julien Dossa, Chang Ye, Jeff Braga, Dipam Chakraborty, Kinal Mehta, and João G.M. Araújo. Cleanrl: High-quality single-file implementations of deep reinforcement learning algorithms. _Journal of Machine Learning Research_ , 23(274):1–18, 2022. URL [URL removed] + +- [15] Dmitry Ivanov, Aleksandr Chezhegov, Mikhail Kiselev, Andrey Grunin, and Denis Larionov. Neuromorphic artificial intelligence systems. _Frontiers in Neuroscience_ , 16:1513, 2022. + +- [16] Adrien Journé, Hector Garcia Rodriguez, Qinghai Guo, and Timoleon Moraitis. Hebbian deep learning without feedback. _arXiv preprint arXiv:2209.11883_ , 2022. + +- [17] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. + +10 + +- [18] Dong-Hyun Lee, Saizheng Zhang, Asja Fischer, and Yoshua Bengio. Difference target propagation. In _Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2015, Porto, Portugal, September 7-11, 2015, Proceedings, Part I 15_ , pp. 498–515. Springer, 2015. + +- [19] Nan Li and Alan Jasanoff. Local and global consequences of reward-evoked striatal dopamine release. _Nature_ , 580(7802):239–244, 2020. + +- [20] Timothy P Lillicrap, Daniel Cownden, Douglas B Tweed, and Colin J Akerman. Random synaptic feedback weights support error backpropagation for deep learning. _Nature communications_ , 7(1):13276, 2016. + +- [21] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. _International Conference on Learning Representations_ , 2016. + +- [22] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. In _NeurIPS Deep Learning Workshop_ . 2013. + +- [23] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. _arXiv preprint arXiv:1312.5602_ , 2013. + +- [24] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. _nature_ , 518(7540):529–533, 2015. + +- [25] Randall C O’Reilly. Biologically plausible error-driven learning using local activation differences: The generalized recirculation algorithm. _Neural computation_ , 8(5):895–938, 1996. + +- [26] Randall C O’Reilly, Yuko Munakata, Michael J Frank, Thomas E Hazy, et al. _Computational cognitive neuroscience_ , volume 1124. PediaPress Mainz, 2012. + +- [27] Alexander Ororbia and Daniel Kifer. The neural coding framework for learning generative models. _Nature communications_ , 13(1):2064, 2022. + +- [28] Alexander G Ororbia and Ankur Mali. Backprop-free reinforcement learning with active neural generative coding. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 36, pp. 29–37, 2022. + +- [29] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by back-propagating errors. _Nature_ , 323(6088):533–536, 1986. + +- [30] Benjamin Scellier and Yoshua Bengio. Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. _Frontiers in computational neuroscience_ , 11:24, 2017. + +- [31] Wolfram Schultz, Peter Dayan, and P Read Montague. A neural substrate of prediction and reward. _Science_ , 275(5306):1593–1599, 1997. + +- [32] Clara Kwon Starkweather and Naoshige Uchida. Dopamine signals as temporal difference errors: recent advances. _Current Opinion in Neurobiology_ , 67:95–105, 2021. + +- [33] Richard S Sutton. Learning to predict by the methods of temporal differences. _Machine learning_ , 3:9–44, 1988. + +- [34] Richard S. Sutton and Andrew G. Barto. _Reinforcement Learning: An Introduction_ . A Bradford Book, Cambridge, MA, USA, 2018. + +- [35] Saran Tunyasuvunakool, Alistair Muldal, Yotam Doron, Siqi Liu, Steven Bohez, Josh Merel, Tom Erez, Timothy Lillicrap, Nicolas Heess, and Yuval Tassa. dm_control: Software and tasks for continuous control. _Software Impacts_ , 6, 2020. + +11 + +- [36] Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q-learning. In _Proceedings of the AAAI conference on artificial intelligence_ , volume 30, 2016. + +- [37] Christopher JCH Watkins and Peter Dayan. Q-learning. _Machine learning_ , 8(3-4), 1992. + +- [38] Kenny Young and Tian Tian. Minatar: An atari-inspired testbed for thorough and reproducible reinforcement learning experiments. _arXiv preprint arXiv:1903.03176_ , 2019. + +12 + +## A MODEL HYPERPARAMETERS + +We show the hyperparameters of the Local Forward networks and DQN used in our MinAtar experiments. + +**Hyperparameter Local Forward DQN** Learning rate 10 _[−]_[4] 10 _[−]_[4] Exploration fraction 0.1 0.1 Final epsilon at end of exploration 0.01 0.01 Loss function Mean squared error Mean squared error Max gradient norm 1.0 1.0 Batch size 512 512 Gamma 0.99 0.99 Training frequency 4 4 Replay buffer size 5 _×_ 10[6] 5 _×_ 10[6] Target network update frequency 1000 1000 + +We also use a learning rate scheduler for both networks, which linearly increase learning rate to 10 _[−]_[4] in 500000 steps, then cosine decay until 3 _×_ 10 _[−]_[5] over remaining training steps. These hyperparameters were jointly tuned and shared by both the baseline DQN and Local-Forward network. + +## B NUMBER OF TRAINABLE PARAMETERS + +In Section 4, we stated that we used a 3-layer Local-Forward network with output sizes 400, 200 and 200 respectively, and that we chose these sizes to yield a similar number of trainable parameters as the DQN with 1024, 512 and 512 units for fairer comparison. Here we provide the detailed calculations. + +Since each MinAtar environment differs slightly in number of input channels and size of action space, the the number of parameters also vary slightly across environments. Assuming an environment with 4 input channels and 3 actions, the number of trainable parameters for the DQN is 10 _×_ 10 _×_ 4 (input size) _×_ 1024 (first layer weights) +1024 (first layer biases) +1024 _×_ 512 (second layer weights, etc.) +512 + 512 _×_ 512 + 512 + 512 _×_ 3 (actions) +3 = 1 _,_ 199 _,_ 619. + +The number of trainable parameters for the Local-Forward (LF) network is (10 _×_ 10 _×_ 4 + 200) (input size + size of hidden activations of second layer from last time step) _×_ 400 (first layer LF cell ReLU weight layer weights) +400 (first layer LF cell ReLU weight layer biases) +3 _×_ 400 _×_ 400 (first layer LF cell tanh weight layer weights) +3 _×_ 400 (first layer LF cell tanh weight layer biases) +(400 + 200) (first layer output size + size of hidden activations of third layer from last time step) _×_ 200 (second layer LF cell ReLU weight layer weights, etc.) +200 + 3 _×_ 200 _×_ 200 + 3 _×_ 400 + 200 _×_ 200 + 200 + 3 _×_ 200 _×_ 200 + 3 _×_ 200 = 1 _,_ 123 _,_ 200 _._ + +## C EXPERIMENTS ON CLASSIC CONTROL ENVIRONMENTS + +Beyond the MinAtar testbed, we also evaluate Local-Forward on 4 classic control environments: Cart Pole (also known as inverted pendulum), Mountain Car, Lunar Lander, and Acrobot, and compare its performance against DQN. We show our results in Figure 4. + +The main purpose of these experiments is to further support Local-Forward’s robustness across different RL environments, and indirectly compare its performance against Active Neural Generative Coding (ANGC) [28], another biologically-inspired deep RL algorithm that provides a more plausible alternative to backpropagation. [28] evaluates ANGC in 4 environments: Cart Pole, Mountain Car, Lunar Lander, and a custom robot-arm-reaching environment. As [28] has yet to publicly release the code for their ANGC agent, we are unable to directly evaluate ANGC on the MinAtar testbed to compare performance; thus, we instead evaluate Local-Forward on ANGC’s environments. + +In addition, we implement 2 DQNs with different hyperparameters as baselines for comparison: first is CleanRL’s reference DQN for classic control problems [14], and second is the DQN tuned by [28] for comparison against their ANGC agent, which we refer to as ANGC’s DQN. The CleanRL DQN + +13 + +**==> picture [151 x 117] intentionally omitted <==** + +**==> picture [151 x 118] intentionally omitted <==** + +**==> picture [151 x 119] intentionally omitted <==** + +**==> picture [151 x 118] intentionally omitted <==** + +Figure 4: Episodic returns of Local-Forward, CleanRL’s DQN, and ANGC’s DQN. Lines show the mean episode reward over 10 seeds and the shaded area conforms to 3 standard errors of the mean. + +provides a well-established, publicly-vetted baseline, whereas ANGC’s DQN serves as a reference point for us to indirectly compare Local-Forward’s performance with ANGC. + +To better demonstrate Local-Forward’s robustness across environments, we use the same set of hyperparameters for each of the environments. Specifically, we use a 2-layer Local-Forward network, with output sizes 128 and 96, a fixed learning rate of 2 _._ 5 _e[−]_[4] with Adam optimization, an exploration fraction of 0.2, and final epsilon of 0.05. All other hyperparameters are the same as our network for MinAtar, shown in Appendix A. As neither CleanRL nor ANGC’s DQN uses a learning rate scheduler, we also removed ours for better comparison. CleanRL’s DQN is a 2-layer network with 120 and 84 units; the same DQN is used for all 4 environments. ANGC uses different 2-layer DQNs for each of their environments, which they tuned for environment-specific performance. Their Cart Pole DQN has 256, 256 hidden units; Mountain Car has 256, 192, and Lunar Lander 512, 384. For Acrobot, we used the same hyperparameters as the Cart Pole DQN, given the similarity of the environments, which worked well. For more hyperparameter details, we refer the reader to [14] and [28]; both works present excellent detail. + +We made two adjustments when reproducing CleanRL and ANGC’s DQNs. First, since LocalForward utilizes double Q-learning to improve its learning stability, for better comparison, we also enhanced both DQNs with double Q-learning, given that it is a simple enhancement without additional computational costs. Second, specific to ANGC’s Cart Pole DQN, we found that the agent’s learning has very high variance with the given hyperparameters, and the agent does not consistently achieve high performance. To counter this, we decreased the learning rate from the provided 5 _e[−]_[4] to 2 _._ 5 _e[−]_[4] , and increased the target network update frequency (referred to as _C_ in [28]) from 128 to 500, which is CleanRL’s value. This improved both the agent’s stability and average return. + +Our results in Figure 4 show that Local-Forward achieves strong performance across all 4 tasks, learning more stably and achieving higher average episodic return than the DQNs in all environments. Most notably, in comparison to DQN, Local-Forward more consistently reaches the maximum 500 return in Cart Pole, and achieves significantly higher return in Mountain Car. It also surpasses DQN’s performance slightly in both Lunar Lander and Acrobot. These results suggest that Local-Forward is highly competitive against ANGC in these tasks. + +We are in contact with the authors of [28], and look forward to performing more direct comparisons between Local-Forward and ANGC once their code is publicly released. As ANGC and Local- + +14 + +|**Dataset**|**Hidden activations**|**Layer 1**|**Layer 2**|**Layer 3**|**Layer 4**| +|---|---|---|---|---|---| +|MNIST|500|0.9848|0.9862|0.9865|0.9867| +|MNIST|1000|0.9834|0.9860|0.9866|0.9870| +|MNIST|2000|0.9834|0.9862|0.9878|0.9874| +|CIFAR-10|500|0.4715|0.5234|0.5394|0.5501| +|CIFAR-10|1000|0.4750|0.5358|0.5496|0.5588| +|CIFAR-10|2000|0.4841|0.5440|0.5610|0.5725| + +Table 1: Test accuracy of each layer of 4-layer Local-Forward networks trained on MNIST and CIFAR-10. Each layer has the same number of hidden activations; for example, the first row refers to a Local-Forward network with layers of 500, 500, 500, and 500 activations. Since each layer makes its own prediction, we can easily see how performance increases per layer. + +Forward learn with different signals, they are not competing approaches, and may possibly be integrated to achieve greater performance– we also look forward to exploring this potential. + +## D EXPERIMENTS ON MNIST AND CIFAR-10 + +To further investigate the generalizability of Local-Forward across different learning tasks, we also evaluate Local-Forward on two supervised learning datasets, MNIST and CIFAR-10, and present our results here. Q-learning is a regression problem; to adapt our architecture to solve these classification problems, we simply change the loss function to cross entropy, and make each of the tanh weight layers correspond to a class, instead of an action. Using a 4-layer Local-Forward network with output sizes 2000, 2000, 2000 and 2000, we achieved 98.74% test accuracy on MNIST, and 57.25% test accuracy on CIFAR-10. These results are in line with the results achieved by Forward Forward in [13]. + +We show our results with different sized networks in Table 1. As each layer in the network makes its own prediction, we additionally show the test accuracy of every layer. Remarkably, for almost every network size, the test accuracy steadily increases per layer. Like our experiments in RL, this supports that Local-Forward cells can learn to coordinate with each other for better performance without the need to backpropagate error signals across layers. + +For clarity, we want to note that these experiments are performed simply to add another perspective to evaluate the robustness of Local-Forward’s learning across tasks. Local-Forward is intentionally designed for Q-learning, rather than supervised learning, as it imitates biological processes of reward-based learning. + +## E BIOLOGICAL INSPIRATION OF LOCAL-FORWARD + +Here we elaborate on the connections between neurobiology and Local-Forward. Local-Forward is heavily biologically inspired. We saw a potential connection between the design principles of Forward-Forward (FF) [13] and biological reward-based learning via striatic dopamine release; Local-Forward is our attempt to synthesize the two to improve deep Q-learning. + +FF provides an alternative to backpropagation that is more biologically plausible and computationally efficient, because it does not suffer from weight transport [20] or update locking [28]. Like LocalForward, FF globally broadcasts the target to each layer of the network, which each computes their own local loss and updates. However, FF does not provide a biologically plausible explanation on how the target signal can be globally broadcasted in the brain. Interestingly, recent research in neuroscience by [19] found that in the striatum, dopamine release can be a global signal that induces local changes to reward stimulation, providing a potential answer in the case of reward-based learning. Additionally, biological reward-based learning has close ties with TD-learning, which is used as an explanatory model for dopamine-induced synaptic modifications in the striatum [32]. The alignment between FF’s principle of globally-induced local learning, and evidence of biological + +15 + +globally-induced local modifications for reward-based learning in the brain, is the central biological insight that motivated us to develop Local-Forward as a Q-learning algorithm. + +To be clear, we do not believe that Local-Forward plausibly represents the complete reward-learning process in the striatum. Unlike backpropagation, the brain likely utilizes multiple types of learning in conjunction, both supervised and unsupervised, using local and global signals [26]. Local-Forward only models one type of learning, i.e. error-driven learning using global reward signals to induce local updates. Other biologically plausible algorithms, such as ANGC [28], may provide explanations to other types of biological learning. Indeed, aspects of Hebbian learning or active inference are likely critical to achieving a full biologically plausible, efficient, and powerful learning system. In that light, we examine Local-Forward here not to replace other methods, but to demonstrate that this one principle alone is sufficient to be able to solve some complex RL tasks nearly as well as backprop. We believe that a key to achieving general, human-like intelligence will be the integration of these different learning methods and learning signals; this is an exciting direction we aim to explore in future work. + +16 + diff --git a/open_review/iclr2024_8804.json b/open_review/iclr2024_8804.json new file mode 100644 index 0000000000000000000000000000000000000000..234f6e61558a44e41111d662675876c7f5c7bd55 --- /dev/null +++ b/open_review/iclr2024_8804.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8804", + "source": "iclr2024", + "source_year": 2024, + "title": "ArchLock: Locking DNN Transferability at the Architecture Level with a Zero-Cost Binary Predictor", + "abstract": "Deep neural network (DNN) models, despite their impressive performance, are vulnerable to exploitation by attackers who attempt to transfer them to other tasks for their own benefit. Current defense strategies mainly address this vulnerability at the model parameter level, leaving the potential of architectural-level defense largely unexplored. This paper, for the first time, addresses the issue of model protection by reducing transferability at the architecture level. Specifically, we present a novel neural architecture search (NAS)-enabled algorithm that employs zero-cost proxies and evolutionary search, to explore model architectures with low transferability. Our method, namely ArchLock, aims to achieve high performance on the source task, while degrading the performance on potential target tasks, i.e., locking the transferability of a DNN model. To achieve efficient cross-task search without accurately knowing the training data owned by the attackers, we utilize zero-cost proxies to speed up architecture evaluation and simulate potential target task embeddings to assist cross-task search with a binary performance predictor. Extensive experiments on NAS-Bench-201 and TransNAS-Bench-101 demonstrate that ArchLock reduces transferability by up to 30% and 50%, respectively, with negligible performance degradation on source tasks (<2%). The code is available at https://github.com/Tongzhou0101/ArchLock.", + "rebuttal": "We look forward to your reply before the rebuttal period ends tomorrow. Thanks!\n\nThanks for your reply.\n\n**[For issue 1]**\n\nWe used image generation and diffusion models as examples to address your question, \"Why even release its parameters to begin with?\" and to provide a better understanding. However, the vulnerability is general and not limited to generative tasks. Also, like all other work conducted on NAS Benchmarks, the objective is to provide a fair comparison. Your current concern seems centered on the existing NAS Benchmarks being less meaningful (or are you questioning the practical significance of NAS?). However, it's crucial to note that constructing NAS benchm [...]\n\nWe would appreciate confirmation that we have adequately addressed all your concerns. Thank you once again for your time.\n\n**[Measurement and Overfitting]**\n\nThe reported numbers in Tables 1 and 2 are indeed derived from the benchmark to ensure a fair comparison by avoiding the influence of hyperparameter tuning.\n\nRegarding the zero-cost predictor, we would like to emphasize that it is not trained on the same set of datasets. Instead, it is meta-trained on ImageNet, as explicitly mentioned in Section 4.3. This intentional separation from the datasets used for the main evaluation mitigates concerns about overfitting, as the predictor is exposed to a diverse range of data during meta-training. We believe this design [...]\n\nThanks for your valuable comments. We would like to address your concerns one by one. \n\n**[Details of S/TU/TK]**\n\nFor S (source-only search scheme), it indeed follows the common NAS search scheme and does not consider the target task during its search process. Specifically, instead of using Eq. (5), its fitness score can simply be $f=-\\\\mathcal{S}_{rank}$, where higher ranks correspond to lower values, resulting in a higher fitness score.\n\nMoreover, Algorithm 1 indeed encapsulates the cross-task search process for both TU and TK, while the difference between them can be better understood with [...]\n\nThanks for pointing out these references; we will cite these works in the proper place in the final version.\n\n**[Training details]**\n\nThe training process of our binary predictor has been provided in Section 4.3. Specifically, the predictor is constructed using a four-layer multi-layer perceptron (MLP). We also conducted experiments with various designs, including different architecture parameters and optimizers. Some of the experiment records are presented in the table below. The selected design, highlighted in bold, achieved an accuracy of 87% with a training cost of approximately 5 GPU hour [...]\n\n### Address Weaknesses\n**[Task Definition]**\n\nIn our work, we did not consider adding more 32x32 images into CIFAR-10 (e.g., via augmentation) for classification as constituting a new task. In the supervised learning setting, a task is defined by both its domain space (data distribution, e.g., CIFAR-10 vs. ImageNet) and its label space (e.g., classification with different classes, classification vs. object detection). Therefore, a task is considered a new task when either its domain space is different or its label space is different.\n\n**[Evaluation and Performance]**\n\nWe would like to emphasiz [...]\n\n### Any remaining concerns?\nWe are looking forward to your feedback and wondering if any concerns remain.\n\n### Kind Request\nConsidering you are the **sole reviewer who has provided a negative rating**, we value your feedback and would like to ensure that all your concerns are addressed. We sincerely appreciate your acknowledgment that our work is interesting. **Our work represents a pioneering effort in providing a defense against unauthorized transfer at the architectural level, and the compelling results obtained underscore the effectiveness of our approach.** We kindly request your reconsideration of the rating, taking into account the clarification and context provided.\n\n### Looking forward to your response\nWe would like to emphasize the practical significance of our contribution to the field. The problem we tackled holds substantial practical relevance, and our motivation is thoroughly justified. We understand the importance of a fair evaluation and believe that the current rating may underestimate the true value of our work. We hope that you can consider raising the rating score based on the information we provided.\n\n### Motivation\nThanks for your question and valuable input. However, we think there is a **misunderstanding about our work** and we would like to clarify below.\n\nOur objective is **not to degrade NN performance on new tasks** as you stated in Summary. Instead, our focus is to find model architectures that perform well on their intended tasks while exhibiting low transferability, or degraded performance, on unauthorized target tasks.\n\n**[Motivation]**\n\nThe motivation for our approach **stems from ethical considerations and the potential misuse of machine learning models**, as highlighted in rec [...]\n\n### To All Reviewers\nAs the rebuttal period is drawing to a close, we sincerely hope that we have adequately addressed all your concerns. We would greatly appreciate your confirmation in this regard. Furthermore, if you choose to maintain your current ratings after we provide additional information or clarification, we kindly request justification for your decision. Your time and consideration are highly valued. Thank you.", + "initial_scores": [ + 6, + 8, + 3 + ], + "score_mean": 5.67, + "score_variance": 6.33, + "score_spread": 5, + "score_min": 3, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "This paper proposes a new formulation of finding a neural architecture that is strong on one task but transfers poorly to others.\nThis problem setting was criticized as unintuitive by Reviewer boEZ, since it is unclear in which circumstances this would be a desideratum of a vision model. The reviewers gave as an example that a diffusion model should not be good at generating hateful memes, which convinced the reviewer as a strong example. While there are no experiments on diffusion models, this is a good justification why the formulation might be useful in the future. \nThe method is fairly standard meta-learning. The results are not stellar, with even the most positive reviewer stating that 2% higher errors on CIFAR-10 are too much. One issue in NAS research has been reproducibility, and while some code is contained in the supplementary material zip file, this is not mentioned in the paper or appendix. I strongly ecourage the authors to make this code available to the public; I would like to emphasize that this is crucial to lay a foundation for follow-up work. The fact that the paper is based on top of standard implementations of ZC proxies and benchmarks in NASlib speaks in favour of reproducibility.\nThe most positive review was rather high-level and asked the authors to cite two additional papers by the same authors (also, at first glance these are not the most immediately related works out there; I would advise against giving into this request); this cannot be held agains", + "forum_id": "e2YOVTenU9", + "primary_area": "societal considerations including fairness, safety, privacy", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_ySE1", + "review_id": "VKtwvyoThI", + "scores": { + "rating": 6, + "soundness": 4, + "presentation": 2, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 2427, + "edit_detected": true, + "edit_delta_seconds": 377716, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_umc9", + "review_id": "PD4dX4zhRs", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 1154, + "edit_detected": true, + "edit_delta_seconds": 2390543, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_boEZ", + "review_id": "aKawfMQhnD", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 5 + }, + "review_text_chars": 1610, + "edit_detected": true, + "edit_delta_seconds": 948072, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8804.md b/open_review/iclr2024_8804.md new file mode 100644 index 0000000000000000000000000000000000000000..b32219a28a3245173a99c9cc3a0318010f1e2c97 --- /dev/null +++ b/open_review/iclr2024_8804.md @@ -0,0 +1,441 @@ + + +## ARCHLOCK: LOCKING DNN TRANSFERABILITY AT - THE ARCHITECTURE LEVEL WITH A ZERO-COST BI NARY PREDICTOR + +Authors withheld for review + +## ABSTRACT + +Deep neural network (DNN) models, despite their impressive performance, are vulnerable to exploitation by attackers who attempt to transfer them to other tasks for their own benefit. Current defense strategies mainly address this vulnerability at the model parameter level, leaving the potential of architectural-level defense largely unexplored. This paper, for the first time, addresses the issue of model protection by reducing transferability at the architecture level. Specifically, we present a novel neural architecture search (NAS)-enabled algorithm that employs zero-cost proxies and evolutionary search, to explore model architectures with low transferability. Our method, namely ArchLock, aims to achieve high performance on the source task, while degrading the performance on potential target tasks, i.e., locking the transferability of a DNN model. To achieve efficient cross-task search without accurately knowing the training data owned by the attackers, we utilize zero-cost proxies to speed up architecture evaluation and simulate potential target task embeddings to assist cross-task search with a binary performance predictor. Extensive experiments on NAS-Bench-201 and TransNAS-Bench-101 demonstrate that ArchLock reduces transferability by up to 30% and 50%, respectively, with negligible performance degradation on source tasks (<2%). The code is available at [URL removed] + +## 1 INTRODUCTION + +It is a common practice today to transfer a pre-trained deep neural network (DNN) from one application domain to another one, as demonstrated in Guo et al. (2019); Jiang et al. (2022). These advantages, however, also provide an incentive for attackers to illicitly exploit well-trained models by transferring them to their desired tasks, resulting in a violation of model owners’ rights. To mitigate the vulnerability of unauthorized model transfer, prior work restricts model usage by introducing a training strategy to optimize the weights Wang et al. (2022). Nonetheless, such a weight-level modification cannot be preserved once attackers fine-tune this model to the domain of interest with enough training data, since they will further adjust the model weights to improve the transferability. + +In contrast, we focus on achieving protection at the architecture level, recognizing that the neural architecture fundamentally determines the model accuracy Zoph & Le (2017) and hence plays a critical role in model transferability Kornblith et al. (2019); Zhou et al. (2021). Despite the critical significance of architectural considerations in model transferability, previous mitigation efforts have largely overlooked this aspect. Therefore, our work seeks to bridge this gap by addressing the question: **how to mitigate the risk of unauthorized transfer by reducing transferability at the architecture level?** In particular, we expect the DNN to perform well on the source task while showing limited transferability to other tasks. + +Although our proposed defense philosophy is intuitive, manually designing an architecture with low transferability is challenging, due to the large design space and requirements for domain knowledge of architecture characteristics associated with transferability. Consequently, neural network search (NAS) is envisioned as a promising solution due to its effectiveness in architecture design Liu et al. (2018b); Real et al. (2019); Zhou et al. (2022). Even so, how to utilize NAS to reduce DNN + +1 + +transferability for model protection has remained an open problem. Indeed, it is significantly more challenging than improving DNN transferability Ding et al. (2022); Pasunuru & Bansal (2019), since the target task for the latter is well-specified but not for our case. Therefore, in addition to the common challenges faced by existing NAS algorithms, i.e., how to efficiently evaluate the performance of architecture in the search space, we have to address additional challenges, including **(a)** how to determine and simulate the potential target task if it is not specified; **(b)** how to address performance evaluation for the simulated task; and **(c)** how to preserve the performance on the source task but degrade performance on the target task. + +In this paper, we formulate the transferability reduction problem as a cross-task search NAS problem and propose a novel algorithm, called ArchLock. Specifically, for challenge **(a)** , we simulate the target task by generating its task embedding based on the source task with a specified similarity, since the target task should be similar to the source task, so as to benefit (i.e., obtain the performance gain) from transfer learning (Sec. 3.1). For challenge **(b)** , we meta-train a binary predictor with zero-cost proxies to indicate the relative performance, which can achieve efficient architecture evaluation and generalize to unseen tasks (Sec. 3.2). Last, we design a cross-task search algorithm using evolutionary search with a rank-based fitness score to guide the search (Sec. 3.3). Overall, our contributions can be summarized as follows: + +_•_ This work is the first to mitigate unauthorized transfer at the architecture level, where the searched architecture excels on the source task but exhibits degraded performance on the target task, regardless of the amount of data available to the attacker. + +_•_ We develop a binary predictor using multiple zero-cost proxies to accelerate NAS. The predictor incorporates task characteristics as an additional input, enabling efficient architecture evaluation and generalization to unseen tasks, thus assisting in cross-task search with a rank-based fitness score. + +_•_ Through extensive experiments on NAS-Bench-201 and TransNAS-Bench-101, we demonstrate that ArchLock can reduce transferability by up to about 30% and 50%, respectively, while maintaining negligible performance degradation on the source task (<2%). + +## 2 RELATED WORK + +## 2.1 EFFECT OF ARCHITECTURE ON MODEL TRANSFERABILITY + +Previous works have demonstrated that the architecture design affects the model transferability Zhou et al. (2021); Kornblith et al. (2019). For example, Zhou _et al_ . demonstrate that the Transformer-based architectures can be better transferred to 13 tasks than ConvNets Zhou et al. (2021). Besides, Zoph _et al_ . search well-performed cells only on CIFAR-10 and transfer them to ImageNet with good performance. However, Dong & Yang (2020) shows that directly transferring an optimal architecture from a source task to a target task might not always yield good performance, since the rank correlation of architecture performances on different tasks is not perfectly positive. This work suggests that a single-task search cannot ensure that the top-1 architecture on the source task also has the best performance on the target task. Therefore, some cross-task search NAS algorithms are proposed. For example, Ding et al. (2022) builds a predictor for each task, then accumulates the gradient from these predictors to guide the architecture search. Besides, Pasunuru & Bansal (2019) utilizes a controller to obtain a joint reward to achieve a multi-task search. + +However, these existing cross-task NAS algorithms aim to find the architecture performing well on several specified tasks. In sharp contrast, our proposed design only expects generating model architectures that perform well on the source task with reduced transferability to uncertain target tasks, which raises challenges including achieving efficient architecture performance evaluation and estimating performance on unseen tasks. + +## 2.2 ACCELERATION FOR ARCHITECTURE EVALUATION + +Evaluating an architecture performance by training it until convergence is computationally expensive. To overcome this limitation, some works design the performance predictors to accelerate NAS, which are usually built as regression models that are trained using architecture encodings and their corresponding validation performances (e.g., accuracy for classification problems) Liu et al. (2018a); + +2 + +Shi et al. (2020). However, collecting these training data is also expensive and the predictor may not have a high correlation between the predicted result with the actual performance White et al. (2021). As an improvement, Dudziak _et al_ . propose a predictor using the binary relationship to rank architectures, which requires fewer training samples but has a higher correlation Dudziak et al. (2020). + +In contrast to the above methods that still require training architectures, several theoretical metrics have been proposed recently that can measure the performance of an architecture at the initialization stage Lee et al. (2019a); Mellor et al. (2021); Lin et al. (2021), thus greatly reducing the computation burden in NAS. Since the computation cost of such a metric is negligible (e.g., less than 5 seconds Krishnakumar et al. (2022)), they are used as zero-cost proxies (ZCPs) in previous NAS works Chen et al.. However, a single ZCP cannot provide accurate rank or generalize well among various tasks Chen et al.; Abdelfattah et al. (2021). Therefore, Krishnakumar et al. (2022) incorporates 13 proxies into the surrogate models used by NAS algorithms, showing up to 42% performance improvement. However, we leverage ZCPs in a different way, with details in Sec. 3.2. + +## 2.3 NAS PREDICTORS WITH META-LEARNING + +Given that explicitly measuring the performance of architectures on simulated target tasks is impossible, we draw inspiration from the following works to leverage meta-learning in training our proposed predictor. In particular, recent NAS algorithms adopt meta-learning to improve its generalizability on other novel tasks Elsken et al. (2020); Lee et al. (2021a;b). For example, MetaNAS optimizes both the meta-architecture and the meta-weights during meta-training, allowing adaptation to unseen tasks during testing Elsken et al. (2020). Besides, Lee _et al_ . propose MetaD2A to meta-train a performance predictor on the ImageNet classification task to accelerate the search Lee et al. (2021a), which generalizes well on other classification tasks and reduces the search cost from O(N) to O(1) for multi-task search. Therefore, we also adopt meta-learning in our predictor design, thus being able to estimate the architecture performance on simulated tasks. Moreover, we extend the applicability of the meta-trained predictor beyond the classification task. + +## 3 OUR PROPOSED FRAMEWORK: ARCHLOCK + +Our goal is to utilize NAS to find an architecture that can mitigate unauthorized transferability. Specifically, except for achieving the optimal performance on the single task as conventional NAS, we expect the searched architecture can restrain the model usage to the source task, i.e., perform well on the source task, but hard to transfer to the target task with good performance. To this end, we propose ArchLock, which learns the cross-task performance of architectures via an evolutionary search. Specifically, ArchLock uses a rank-based fitness score to guide the search. Further, we introduce a binary predictor using zero-cost proxies to rank the architectures in ArchLock, where the pairwise relationship will be task-dependent, thus we can simulate the potential task embedding to evaluate the architecture performance on uncertain tasks. + +**Problem Formulation:** Conventional NAS algorithms focus on finding an optimal architecture that achieves high performance on a single task (denoted as _S_ ), while satisfying the hardware constraints, e.g., memory consumption and/or inference latency Zoph & Le (2017); Chen et al., which can be formulated as a bi-level optimization problem: + +**==> picture [371 x 19] intentionally omitted <==** + +where ( _XS[tr][, Y] S[tr]_[)][and][(] _[X] S[val][, Y] S[val]_ ) are the training data and validation data of _S_ , respectively, and _LS_ is the loss function of _S_ . We use _A_ to denote the search space and _fa_ to represent the network associated with the architecture _a_ , where _a_ is an architecture candidate in _A_ and _W_ is the corresponding weights trained for _S_ . + +However, in order to mitigate the vulnerability of unauthorized transfer, we have to consider the architecture performance on potential target tasks, which is denoted as _Ti_ . Similarly, this problem can be formulated as a bi-level optimization problem, but we aim to minimize the performance of the network on _Ti_ , while maximizing its performance on _S_ , i.e., the specific source task. The optimal + +3 + +architecture _a[∗]_ can be found by solving: + +**==> picture [351 x 47] intentionally omitted <==** + +where ( _XTi, YTi_ ) is the labeled pair from the task _Ti_ and constraints in Eq. (1) still apply. Also, _β_ controls the balance between performance maximization on the source task and minimization on the target task. Especially, when _β_ equals 0, Eq. (2) will be degraded to Eq. (1), thus we can get the performance of NAS without the security concern of transferability reduction as the baseline. + +However, solving Eq. (2) faces three challenging problems: 1) how to simulate the task domain if it is unknown; 2) how to efficiently measure the architecture performance and let it generalize to unseen tasks as well, and 3) how to achieve cross-task search. We tackle these challenges in Sec. 3.1, Sec. 3.2, and Sec. 3.3, respectively. + +## 3.1 TASK EMBEDDING + +It is worth noting that fully protecting the model by reducing the model transferability to _all_ potential target tasks is practically infeasible, i.e., one could not pre-know the tasks or applications of interest to the adversary, which is also not our target in this work. This is also true for other types of defenses, e.g., adversarial training can only robustify the DNN model subject to an input perturbation bound Wang et al. (2019). Here, we expect the transferability to some tasks can degrade so that we can defend against partial potential attacks. + +In general, simulating the potential target tasks by generating their actual dataset can be difficult if not impossible, since we need to know exactly the attacker’s tasks. To address this challenge, we aim to manipulate the feature space directly to save the computational cost of dataset generalization, i.e., generate the possible target task embedding. The bright side is that the target task in general is close to the source task in order to benefit from transfer learning. In this case, we can simulate some potential target tasks during the search to assist cross-task search when the target task is unknown. + +To capture the characteristics of a task as an embedding vector, we leverage the Fisher Information matrix (FIM) similar to Achille et al. (2019) and Huang et al. (2022), which can be expressed by: + +**==> picture [326 x 14] intentionally omitted <==** + +where _p_ ˆ is the empirical distribution defined by the dataset including the input _X_ and the label _Y_ . Specifically, the modern DNN model can be seen as two parts: a feature extractor and a taskdependent head, e.g., a classifier for the classification task. Here, we use ResNet-50 pre-trained on ImageNet as the feature extractor and train the head for any given task. After training, we compute the FIM for the feature extractor with the same approximation in Achille et al. (2019) to represent the task as a fixed dimensional vector **z** . + +With the source task embedding **z** _S_ obtained using the above method, we can simulate the task embedding **z** _Ti_ of potential target tasks _Ti_ . Here we use the cosine similarity for measurement, where the value is between [0,1] and the larger value indicates higher similarity. Therefore, given **z** _S_ and desired cosine similarity _d_ , we can generate **z** _Ti_ following : + +**==> picture [283 x 11] intentionally omitted <==** + +where _ei_ is orthogonal to **z** _S_ and can be obtained via Gram–Schmidt process. The derivation of Eq. (8) is shown in Appendix A. Besides, the orthogonal vector will vary for different **z** _Ti_ . + +The advantage of using such a method is that we can simulate possible target tasks without explicitly generating the samples, and the latent space manipulation is more representative. With the simulated task embedding, we expect that they can represent or approach some real target tasks. Since we do not have the ground truth label for the simulated task, we cannot estimate the architecture performance using supervised learning. Instead, we use the task embedding as an input of the predictor introduced below, where the predictor will be meta-trained to be generalized to the unseen task embedding. + +4 + +## 3.2 ZERO-COST BINARY PREDICTOR + +One challenge we face in developing ArchLock is estimating the architecture’s performance on unseen tasks. Inspired by the success of meta-learning in generalizing models to unseen tasks Finn et al. (2017); Lee et al. (2021a), we propose to train a predictor that can adapt to simulated tasks following the procedure in MetaD2A Lee et al. (2021a). However, unlike the predictor in MetaD2A that uses validation performance as the label for meta-training, we use zero-cost metrics as proxies to measure architecture performance at initialization, thus avoiding architecture training and saving computational costs. + +While various zero-cost proxies have been used in NAS to accelerate the search process, relying on a single proxy as a measure of architecture’s performance is unreliable White et al. (2021). The searched architecture may not perform well, and the zero-cost proxy (ZCP) itself may not generalize to other tasks. To address this, we incorporate multiple data-dependent ZCPs to obtain a more accurate estimation, including _fisher_ , _flops_ , _grad-norm_ , _grasp_ , _jacov_ , _nwot_ , and _snip_ , as summarized in Krishnakumar et al. (2022). These proxies provide complementary information about the characteristics of an architecture’s performance. The details of these proxies and the rationale for their selection are discussed in Appendix B. + +Our objective is to obtain architecture rankings rather than precise performance values. Therefore, we propose a binary predictor _P_ that learns pairwise relations between two architectures instead of predicting ordinal regression. Such a design can improve the overall ranking accuracy of the predictor since learning a relative performance for two architectures will be easier than predicting accurate rankings for multiple architectures. More importantly, we incorporate task characteristics into the predictor using task embedding, so it can be used in the cross-task search to efficiently measure the architecture performance given different task embeddings. + +Overall, the inference process of the proposed predictor is shown in Fig. 1. The graph encoder converts Graph Task Embedding the directed acyclic graph of the architecture cell into Encoder an adjacency matrix, which is then flattened into a Arch. 𝑎! vector. As for the binary predictor, it is built with a Arch. Embedding Binary multi-layer perceptron with a softmax activation funcPredictor tion and takes the concatenated architecture encoding pair and the pre-computed task embedding as inputs. GraphEncoder (𝑝!, 𝑝") During training, the ground-truth label is calculated Concatenation based on the ZCPs proxies using an ensemble method. Arch. 𝑎" Specifically, the label is set to 1 if more proxies indiFigure 1: The inference process of our procate that the first architecture outperforms the second posed predictor, where the inputs include the in an architecture pair. The design and training details are described in Sec. 4.3. During inference, the embedding of a pair of architectures along predictor outputs two logits _p_ 1 and _p_ 2. If _p_ 1 _> p_ 2, it with the pre-computed task embedding. _p_ 1 indicates architecture _a_ 1 outperforms _a_ 2 on the task > _p_ 2 indicates that indicates that _a_ 1 outperforms outperforms _a_ 2 for the for the associated with task embedding _z_ . In summary, the given task. proposed predictor has the following properties: (1) It is scalable to any size of the architecture pool when combined with the sorting algorithm; (2) It uses zero-cost proxies as supervision, eliminating the need to train several architectures from scratch and reducing training costs; (3) It incorporates multiple ZCPs to obtain complementary information, mitigating the bias introduced by a single proxy; (4) It takes both architecture and task embeddings into account, leveraging meta-learning for training and enabling generalization to unseen tasks. + +Figure 1: The inference process of our proposed predictor, where the inputs include the embedding of a pair of architectures along with the pre-computed task embedding. _p_ 1 > _p_ 2 indicates that indicates that _a_ 1 outperforms outperforms _a_ 2 for the for the given task. + +## 3.3 CROSS-TASK EVOLUTIONARY SEARCH + +In ArchLock, we utilize evolutionary search due to its computational efficiency compared to RL-based NAS Zoph & Le (2017). Also, unlike pruning-based approaches Chen et al., its mutation mechanism can help avoid local minima, allowing for a more thorough exploration of the solution space. + +The core algorithm of cross-task search in ArchLock is shown in Alg. 1. To achieve the transferability reduction via a cross-task search, we use the meta-trained predictor along with a sorting algorithm, i.e., topological sorting in this case, to rank the performance of architectures for _S_ and _Ti_ , denoted as BPwSort in Alg. 1. In particular, we incorporate the rankings for all _Ti_ as one using majority voting, + +5 + +denoted as _Trank_ . We can then use the rankings of architecture on _S_ and _T_ to design a fitness score as guidance for the cross-task search. The rank-based fitness score f is designed as: + +f = _Trank − λ ∗Srank,_ (5) + +where _Srank_ denotes the architecture rankings on _S_ and we set _λ_ to 2 to assign the source task higher weight. In this case, we are able to find an architecture that satisfies Eq. 2, i.e., the performance will be degraded on the target task while being well on the source task compared to the conventional NAS. The functions BPwSort and UpdateHistory are shown in Appendix C. + +## 4 EXPERIMENTS + +We evaluate ArchLock on two state-of-the-art NAS benchmarks: NAS-Bench-201 (NB-201) Dong & Yang (2020) and TransNAS-Bench-101 (TNB-101) Duan et al. (2021). These are the only two accessible options that consist of multiple tasks. Performance evaluation is based on the validation performance provided by the benchmarks for fair comparison. We compare three search schemes: one is source-only search and the other two are cross-task search, with details described in Sec. 4.2. + +## 4.1 SEARCH SPACE AND TASKS + +**NAS-Bench-201** is a popular NAS benchmark dataset with cell-based search space. Each cell has 4 nodes and 6 edges, where each edge represents an operation selected from 5 options, i.e., zeroize, skip connection, 1 _×_ 1 convolution, 3 _×_ 3 convolution, and 3 _×_ 3 average pooling. It includes over 15,000 neural network architectures across three image classification tasks, including CIFAR-10, CIFAR-100, and ImageNet16-120 (i.e., 16 _×_ 16 input size with 120 classes). + +**TransNAS-Bench-101** is proposed to facilitate the cross-task NAS by including the architecture performance across 7 different tasks on the same dataset, including scene classification ( **SC** ), object classification ( **OC** ), room layout ( **RL** ), jigsaw ( **JS** ), semantic segmentation ( **SS** ), surface normal ( **SN** ), and autoencoding( **AE** ), where the labels for each task collected from Taskonomy Za- + +||**Algorithm 1**Cross-task Search in ArchLock
**Require**: Predictor_P_, Task embeddings**z**_S_,**z**_Ti_
**Parameters**: Population size_n_, Sample size_m_, History
size_k_
1: _popu ←∅, history ←∅_
2: **procedure**NEWEPOCH(_epoch, P,_**z**_S,_**z**_Ti_)
3:
**if**_epoch < n_**then**
4:
_arch ←_Randomly sample from search space| +|---|---| +||5:
_popu_.append(_arch_)
6:
UpdateHistory(_history, arch, k, P,_**z**_S,_**z**_Ti_)
7:
**else**
8:
_Srank, Trank ←_BPwSort(_popu, P,_**z**_S,_**z**_Ti_)
9:
Calculate f for_arch ∈popu_(Eq.(5))
10:
_samples ←_Randomly sample_m_from_popu_| +||11:
_parent ←arch_with highest f in_samples_| +||12:
_child ←_Mutate(_parent_)| +||13:
_popu_.popleft()| +||14:
_popu_.append(_child_);| +||15:
UpdateHistory(_history, child, k, P,_**z**_S,_**z**_Ti_)
16:
**end if**| +||17: **end procedure**| +||18: _a∗←arch_with highest f in_history_| + +mir et al. (2018). It provides two types of search space, i.e., macro-based and cell-based, where we experiment on the latter with more than 4k architectures. Each cell consists of 4 nodes and 6 edges, where the operations for each edge include zeroize, skip connection, 1 _×_ 1 convolution, and 3 _×_ 3 convolution. + +## 4.2 DIFFERENT SEARCH SCHEMES + +**ArchLock-S** : This is a source-only search scheme, which only conducts ArchLock on the source task _S_ , i.e., setting _β_ in Eq. (2) to 0. After getting the architecture, we will evaluate how it performs when trained on the target task. It is a baseline as the comparison with cross-task search schemes. + +**ArchLock-TU** : It conducts cross-task NAS in the case that the target task is unknown (TU). We use simulated tasks with embedding generated based on the method introduced in Sec. 3.1. We measure the performance of the searched architecture on the target task, which is unseen during the search. + +**ArchLock-TK** : It conducts cross-task NAS in the case that the target task is known (TK), where the objective follows Eq. (2) with only one _T_ obtained from the certain target task. + +6 + +Table 1: The transferability of searched architecture on NB-201 with different search schemes. We report both the Top-1 validation accuracy, i.e., _Acc. (%)_ , and rank percentile, i.e., _Pct. (%)_ to evaluate the performance of architectures. We use _APT_ to denote the average rank percentile on target tasks. + +|Source / Target
Method|CIFAR-10|CIFAR-100|ImageNet-16-120
_APT_
Acc.
_Pct._| +|---|---|---|---| +||Acc.
_Pct._|Acc.
_Pct._|| +|CIFAR-10
ArchLock-S
ArchLock-TU
ArchLock-TK|91.40
99.99|72.96
99.95
70.24
95.81
68.67
82.78|46.77
99.94
99.95
44.11
95.44
95.62
41.80
84.07
**83.37**| +||90.41
97.93||| +||90.55
98.56||| +|CIFAR-100
ArchLock-S
ArchLock-TU
ArchLock-TK|91.18
99.91
89.69
93.45
89.07
84.47|73.25
99.99|46.5
99.84
99.88
41.47
82.11
87.78
37.27
54.84
**68.65**| +|||71.18
98.98|| +|||71.23
99.07|| +|ImageNet-16-120
ArchLock-S
ArchLock-TU
ArchLock-TK|91.23
99.94
89.53
91.95
88.73
76.59|72.74
99.92
69.16
87.60
67.69
72.72|47.27
99.99
99.93
45.22
98.52
89.77
45.58
99.25
**74.65**| + +## 4.3 EXPERIMENTAL SETUP + +**Meta-trained predictor** : we build a binary predictor using a multi-layer perceptron with four layers. To train the predictor, we use ImageNet to build our training set as Lee et al. (2021a). Specifically, the training set includes architecture pairs randomly sampled from Nas-Bench-201, the task embedding of the tasks associated with the sub-set of ImageNet, and the binary label decided by the values of ZPCs. Specifically, if the majority of ZPCs indicate the first architecture outperforms the second, then the label is 1; otherwise, the label would be 0. Following the same meta-training procedure as Lee et al. (2021a), our predictor can generalize to unseen tasks, where the task similarity will affect the performance of the meta-trained predictor as discussed in Sec. 5.2. Our experiments are conducted with the PyTorch framework using NASLib library Ruchte et al. (2020). + +**Simulated task embeddings:** For the following experiments, we simulate 10 task embeddings _Ti_ , where the cosine similarity of _S_ and _Ti_ is set to 0.9. These settings will be the same unless specified otherwise, and we will discuss how they affect the search if the values are changed in Sec. 5.2. + +**Measurement:** For classification tasks, we use top-1 validation accuracy as a metric to measure the performance. Besides, we also use rank percentile, denoted as _Pct._ , to measure how a candidate performs among all architectures in the search space, since the architecture ranking matters in NAS. For example, if _Pct._ of an architecture is 90%, it means that this architecture performs better than 90% of all architectures in the search space. In order to measure the performance of three search schemes, we also introduce the average rank percentile on target tasks, denoted as _APT_ , which takes the _Pct._ on all tasks except the one same as the source task. + +## 4.4 RESULTS ON NAS-BENCH-201 + +We apply three search schemes on the NB-201 benchmark with 3 datasets and take the average of results from several runs for each experiment as reported in Tab. 1. From this table, we can see that ArchLock-S can achieve high performance (with _Pct._ >99%) on target tasks, even though it only searches on the source task, which indicates the searched architectures in this case are more vulnerable to unauthorized transfer. The reason is that the correlation on each task pair over architectures in NB-201 is high, with details shown in Appendix D. + +However, if we change the search scheme to ArchLock-TU, the _APT_ will have an obvious drop, with up to 12% when CIFAR-100 is the source task, while the _Pct._ on the source task does not drop much, i.e., < 2%. The rationale for employing _Pct._ as a descriptor of performance lies in the insufficiency of accuracy alone to fully represent the architectural performance across the entire search space. Specifically, since the architecture performance does not follow the uniform distribution in the search space, i.e., a small accuracy drop will significantly change the architecture ranking, making the result no longer attractive to attackers. Moreover, ArchLock-TK shows the highest _APT_ drop since we can directly use the specified target task in cross-task search, achieving the maximal transferability reduction. Also, it can preserve the performance of the source task, which is close to the source-only search ArchLock-S. + +7 + +Table 2: The transferability of searched architecture on TNB-101 with different search schemes. We use _APT_ to denote the average rank percentile on target tasks. + +|Source / Target|Method|**SC**|**OC**|**RL**|**JS**|**SS**|**SN**|**AE**|_APT_| +|---|---|---|---|---|---|---|---|---|---| +||ArchLock-S|99.99|99.83|59.91|89.71|75.88|99.32|95.97|86.77| +|**SC**|ArchLock-TU|98.96|66.36|59.17|67.37|75.89|67.47|44.96|63.53| +||ArchLock-TK|99.73|39.48|34.03|40.43|46.67|54.49|30.19|**40.88**| +||ArchLock-S|89.21|99.93|73.61|63.87|69.92|82.10|26.76|67.58| +|**OC**|ArchLock-TU|76.94|97.10|73.77|41.41|63.10|62.33|63.21|63.46| +||ArchLock-TK|47.96|99.65|59.91|38.95|42.04|35.24|26.76|**41.81**| +||ArchLock-S|98.47|94.85|99.78|83.26|74.34|99.85|77.02|87.97| +|**RL**|ArchLock-TU|49.38|67.91|97.74|60.54|46.55|64.02|49.62|56.34| +||ArchLock-TK|37.76|40.56|99.75|39.49|32.08|45.46|22.95|**36.38**| +||ArchLock-S|97.98|97.77|65.04|99.68|87.82|97.58|72.31|86.42| +|**JS**|ArchLock-TU|67.51|61.06|76.90|98.52|67.54|53.17|37.38|60.59| +||ArchLock-TK|35.46|31.91|42.46|99.58|54.24|32.08|19.67|**35.97**| +||ArchLock-S|81.81|61.65|36.91|97.35|99.87|63.40|28.03|61.53| +|**SS**|ArchLock-TU|68.72|38.43|34.59|47.48|98.47|85.06|19.21|48.91| +||ArchLock-TK|40.84|30.98|30.07|30.42|99.34|46.36|11.33|**31.67**| +||ArchLock-S|97.02|97.13|79.05|73.19|76.17|99.97|81.49|84.00| +|**SN**|ArchLock-TU|67.95|54.89|56.14|50.95|70.45|98.44|52.44|58.80| +||ArchLock-TK|38.95|33.17|31.00|37.74|43.45|99.61|15.21|**33.25**| +||ArchLock-S|37.37|62.37|84.92|55.26|34.89|74.40|99.83|58.22| +|**AE**|ArchLock-TU|36.33|48.29|54.81|50.08|31.89|46.84|98.08|44.71| +||ArchLock-TK|31.13|47.95|56.13|45.36|30.39|29.58|99.74|**40.09**| + +## 4.5 RESULTS ON TRANS-NAS-101 + +The performances of three search schemes on TNB-101 are shown in Tab. 2, where the architecture performance is reported as the average of multiple runs for each source-target pair. From Tab. 2, we can find that two cross-task search schemes, i.e., ArchLock-TU and ArchLock-TK, can still maintain good performance on the source task as the source-only search ArchLock-S, while the performance on the target tasks drops drastically. Besides, since the correlation of some task pairs over architectures in TNB-101 is low (see Appendix E), e.g., architecture with good performance on **OC** could be bad on **AE** , the _APT_ is relatively low for ArchLock-S compared it on NB-201. The intuition is that the target task could benefit more if the source task does the same kind of vision task. + +**==> picture [322 x 103] intentionally omitted <==** + +**----- Start of picture text -----**
+100
90
80
70
60
50
40
30
20
10
SC OC RL JS SS SN AE SC OC RL JS SS SN AE SC OC RL JS SS SN AE
Target Target Target
Source
Rank Percentile (%)
AE SN SS JS RL OC SC AE SN SS JS RL OC SC AE SN SS JS RL OC SC
**----- End of picture text -----**
+ +Figure 2: From left to right: ArchLock-S, ArchLock-TU, ArchLock-TK. The darker color indicates higher transferability reduction. + +Although the _APT_ of ArchLock-S is relatively low, we can still enhance the transferability reduction via cross-task search, where the results in Fig. 2 can show the performance difference among three search schemes. For example, when transferring **SS** to **SC** , ArchLock-S finds an architecture with _Pct._ of 81.81%, while ArchLock-TU and ArchLock-TK reduce the transferability even lower with _Pct._ of 68.72% and 40.48%, respectively. Besides, each heatmap reflects the asymmetric characteristics of transferability, i.e., transferring one task to another is different from the otherwise (e.g., 65.04% for **JS** to **RL** while 83.26% for **RL** to **JS** in ArchLock-S). + +## 5 DISCUSSION + +## 5.1 NAS ALGORITHMS + +We compare ArchLock with SOTA source-only NAS algorithms on TNB-101, with **SC** denoting the source task and others representing the target tasks. The results are shown in Tab. 3. Note that even in this case the average Spearman rank correlation of all source-target task pairs is just _∼_ 0 _._ 7, our + +8 + +Table 3: Comparison among ArchLock and SOTA source-only NAS, including RS Bergstra & Bengio (2012), REA Real et al. (2019), BONAS Shi et al. (2020) and weakNAS Wu et al. (2021). The results are reported using the percentile (%) of architecture performance in the TNB-101 search space. + +||Source-only|Cross-task
ArchLock-TU
ArchLock-TK| +|---|---|---| +||RS
REA
BONAS
weakNAS
ArchLock-S|| +|Source
SC
Target
OC
RL
JS
SS
SN
AE|99.68
99.85
99.34
99.71
99.99|98.96
99.73| +||83.30
78.83
75.39
95.87
99.83
60.86
62.30
63.31
76.95
59.91
78.78
84.72
64.82
76.95
89.71
88.72
76.90
84.79
72.61
75.88
97.00
77.34
86.79
98.14
99.32
67.02
49.53
65.48
75.88
95.97|66.36
39.48
59.17
34.03
67.34
40.43
75.89
46.67
67.47
54.49
44.96
30.19| +|_APT_|79.28
71.60
73.43
82.73
86.87|**63.54**
**40.88**| + +cross-task search schemes ArchLock-TU and ArchLock-TK can further reduce the _APT_ to 63.54% and 40.88%, where _APT_ for source-only NAS can be as high as over 80%. It demonstrates the effectiveness of the proposed cross-task search in mitigating unauthorized transfer. + +## 5.2 SIMULATED TARGET TASK EMBEDDING + +The simulated target task embedding plays an important role in ArchLock-TU. We experiment on NB-201 with CIFAR-100 as the source task and the other two as target tasks for investigation. + +**The number of embeddings.** We experiment with different numbers of embeddings, i.e., 5, 10, and 15, respectively. From the results shown in Fig. 3, we can notice the gain in transferability reduction as the number of embeddings increases, i.e., the architecture performance does not change much on the source task but is degraded more on the target task with more simulated target task embeddings involved. The reason could be that the cross-task search covers more possible target tasks, which increases the possibility of the actual target task being included. + +|Num = 5 Num = 10 Num = 15
Num = 5 Num = 10 Num~~=~~15
CIFAR-100
CIFAR-10 ImageNet-16-120
100 -
80 -
60 -
40 -
20 -
0 -
Rank Percentile (%)
Figure 3: ArchLock-TU with various
numbers of simulated embeddings.
Table 4: The performance of ArchLock-TU with v
similarities of simulated task embeddings. The resul
reported in terms of the rank percentile (%) of the archit
performance in NB-201 search space.
Similarity_d_
Source
Target
CIFAR-100
CIFAR-10
ImageNet-16-120
0.3
99.07
94.34
97.56
0.5
98.89
95.82
92.59
0.9
98.98
**93.45**
**82.11**|Num = 5 Num = 10 Num = 15
Num = 5 Num = 10 Num~~=~~15
CIFAR-100
CIFAR-10 ImageNet-16-120
100 -
80 -
60 -
40 -
20 -
0 -
Rank Percentile (%)
Figure 3: ArchLock-TU with various
numbers of simulated embeddings.
Table 4: The performance of ArchLock-TU with v
similarities of simulated task embeddings. The resul
reported in terms of the rank percentile (%) of the archit
performance in NB-201 search space.
Similarity_d_
Source
Target
CIFAR-100
CIFAR-10
ImageNet-16-120
0.3
99.07
94.34
97.56
0.5
98.89
95.82
92.59
0.9
98.98
**93.45**
**82.11**|Num = 5 Num = 10 Num = 15
Num = 5 Num = 10 Num~~=~~15
CIFAR-100
CIFAR-10 ImageNet-16-120
100 -
80 -
60 -
40 -
20 -
0 -
Rank Percentile (%)
Figure 3: ArchLock-TU with various
numbers of simulated embeddings.
Table 4: The performance of ArchLock-TU with v
similarities of simulated task embeddings. The resul
reported in terms of the rank percentile (%) of the archit
performance in NB-201 search space.
Similarity_d_
Source
Target
CIFAR-100
CIFAR-10
ImageNet-16-120
0.3
99.07
94.34
97.56
0.5
98.89
95.82
92.59
0.9
98.98
**93.45**
**82.11**|Num = 5 Num = 10 Num = 15
Num = 5 Num = 10 Num~~=~~15
CIFAR-100
CIFAR-10 ImageNet-16-120
100 -
80 -
60 -
40 -
20 -
0 -
Rank Percentile (%)
Figure 3: ArchLock-TU with various
numbers of simulated embeddings.
Table 4: The performance of ArchLock-TU with v
similarities of simulated task embeddings. The resul
reported in terms of the rank percentile (%) of the archit
performance in NB-201 search space.
Similarity_d_
Source
Target
CIFAR-100
CIFAR-10
ImageNet-16-120
0.3
99.07
94.34
97.56
0.5
98.89
95.82
92.59
0.9
98.98
**93.45**
**82.11**| +|---|---|---|---| +||Similarity_d_|Source|Target
CIFAR-10
ImageNet-16-120| +|||CIFAR-100|| +||0.3
0.5
0.9|99.07|94.34
97.56
95.82
92.59
**93.45**
**82.11**| +|||98.89|| +|||98.98|| +||||| + +Table 4: The performance of ArchLock-TU with various similarities of simulated task embeddings. The results are reported in terms of the rank percentile (%) of the architecture performance in NB-201 search space. + +**The similarity of embeddings.** We explore various cosine similarities between the source task embedding and the simulated target embedding, using _d_ values of 0.3, 0.5, and 0.9 (see Eq. 8). In Table 4, we find that ArchLock-TU exhibits higher transferability reduction as similarity increases from 0.3 to 0.9 (97.56% vs 82.11% for ImageNet-16-120). This is likely because simulating lowsimilarity tasks provides less informative guidance, potentially leading to a search towards less similar target tasks resulting in a lower transferability reduction for the actual target task. + +## 6 CONCLUSION + +This paper presents ArchLock, a cross-task NAS framework aimed at mitigating unauthorized DNN transfer. Our framework focuses on finding an architecture that performs well on the source task but exhibits degraded performance when transferred to a similar target task. To achieve this objective efficiently, we introduce a binary predictor that utilizes 7 zero-cost proxies to save computational costs. Additionally, we simulate the target task embeddings as an input of the predictor. By leveraging metalearning, this predictor can be generalized to unseen tasks, thereby assisting cross-task search with a rank-based fitness score. Extensive experiments conducted on NAS-Bench-201 and TransNAS-Bench101 demonstrate the superiority of our proposed cross-task search schemes, namely ArchLock-TU and ArchLock-TK in transferability reduction compared to state-of-the-art source-only NAS methods. + +9 + +## REFERENCES + +Mohamed S Abdelfattah, Abhinav Mehrotra, Łukasz Dudziak, and Nicholas Donald Lane. Zero-cost proxies for lightweight nas. In _International Conference on Learning Representations_ , 2021. + +- Alessandro Achille, Michael Lam, Rahul Tewari, Avinash Ravichandran, Subhransu Maji, Charless C Fowlkes, Stefano Soatto, and Pietro Perona. Task2vec: Task embedding for meta-learning. In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 6430–6439, 2019. + +- James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. _Journal of machine learning research_ , 13(2), 2012. + +- Wuyang Chen, Xinyu Gong, and Zhangyang Wang. Neural architecture search on imagenet in four gpu hours: A theoretically inspired perspective. In _International Conference on Learning Representations_ . + +- Mingyu Ding, Yuqi Huo, Haoyu Lu, Linjie Yang, Zhe Wang, Zhiwu Lu, Jingdong Wang, and Ping Luo. Learning versatile neural architectures by propagating network codes. In _International Conference on Learning Representations_ , 2022. + +- Xuanyi Dong and Yi Yang. Nas-bench-201: Extending the scope of reproducible neural architecture search. In _International Conference on Learning Representations (ICLR)_ , 2020. URL https: //openreview.net/forum?id=HJxyZkBKDr. + +- Yawen Duan, Xin Chen, Hang Xu, Zewei Chen, Xiaodan Liang, Tong Zhang, and Zhenguo Li. Transnas-bench-101: Improving transferability and generalizability of cross-task neural architecture search. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 5251–5260, 2021. + +- Lukasz Dudziak, Thomas Chau, Mohamed Abdelfattah, Royson Lee, Hyeji Kim, and Nicholas Lane. Brp-nas: Prediction-based nas using gcns. _Advances in Neural Information Processing Systems_ , 33:10480–10490, 2020. + +- Thomas Elsken, Benedikt Staffler, Jan Hendrik Metzen, and Frank Hutter. Meta-learning of neural architectures for few-shot learning. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 12365–12375, 2020. + +- Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In _International conference on machine learning_ , pp. 1126–1135. PMLR, 2017. + +- Yunhui Guo, Honghui Shi, Abhishek Kumar, Kristen Grauman, Tajana Rosing, and Rogerio Feris. Spottune: transfer learning through adaptive fine-tuning. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 4805–4814, 2019. + +- Minbin Huang, Zhijian Huang, Changlin Li, Xin Chen, Hang Xu, Zhenguo Li, and Xiaodan Liang. Arch-graph: Acyclic architecture relation predictor for task-transferable neural architecture search. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 11881–11891, 2022. + +- Junguang Jiang, Yang Shu, Jianmin Wang, and Mingsheng Long. Transferability in deep learning: A survey. _arXiv preprint arXiv:2201.05867_ , 2022. + +- Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 2661–2671, 2019. + +10 + +- Arjun Krishnakumar, Colin White, Arber Zela, Renbo Tu, Mahmoud Safari, and Frank Hutter. Nasbench-suite-zero: Accelerating research on zero cost proxies. In _Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track_ , 2022. + +- Hayeon Lee, Eunyoung Hyung, and Sung Ju Hwang. Rapid neural architecture search by learning to generate graphs from datasets. In _International Conference on Learning Representations_ , 2021a. + +- Hayeon Lee, Sewoong Lee, Song Chong, and Sung Ju Hwang. Hardware-adaptive efficient latency prediction for nas via meta-learning. _Advances in Neural Information Processing Systems_ , 34: 27016–27028, 2021b. + +- Jaehoon Lee, Lechao Xiao, Samuel Schoenholz, Yasaman Bahri, Roman Novak, Jascha SohlDickstein, and Jeffrey Pennington. Wide neural networks of any depth evolve as linear models under gradient descent. _Advances in neural information processing systems_ , 32, 2019a. + +- Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. Snip: Single-shot network pruning based on connection sensitivity. In _International Conference on Learning Representations_ , 2019b. + +- Ming Lin, Pichao Wang, Zhenhong Sun, Hesen Chen, Xiuyu Sun, Qi Qian, Hao Li, and Rong Jin. Zen-nas: A zero-shot nas for high-performance image recognition. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 347–356, 2021. + +- Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In _Proceedings of the European conference on computer vision (ECCV)_ , pp. 19–34, 2018a. + +- Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. _arXiv preprint arXiv:1806.09055_ , 2018b. + +- Vasco Lopes, Saeid Alirezazadeh, and Luís A Alexandre. Epe-nas: Efficient performance estimation without training for neural architecture search. In _Artificial Neural Networks and Machine Learning– ICANN 2021: 30th International Conference on Artificial Neural Networks, Bratislava, Slovakia, September 14–17, 2021, Proceedings, Part V_ , pp. 552–563. Springer, 2021. + +- Joe Mellor, Jack Turner, Amos Storkey, and Elliot J Crowley. Neural architecture search without training. In _International Conference on Machine Learning_ , pp. 7588–7598. PMLR, 2021. + +- Xuefei Ning, Changcheng Tang, Wenshuo Li, Zixuan Zhou, Shuang Liang, Huazhong Yang, and Yu Wang. Evaluating efficient performance estimators of neural architectures. _Advances in Neural Information Processing Systems_ , 34:12265–12277, 2021. + +- Ramakanth Pasunuru and Mohit Bansal. Continual and multi-task architecture search. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 1911–1922, 2019. + +- Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In _Proceedings of the aaai conference on artificial intelligence_ , volume 33, pp. 4780–4789, 2019. + +- Michael Ruchte, Arber Zela, Julien Siems, Josif Grabocka, and Frank Hutter. Naslib: A modular and flexible neural architecture search library. [URL removed] 2020. + +- Han Shi, Renjie Pi, Hang Xu, Zhenguo Li, James Kwok, and Tong Zhang. Bridging the gap between sample-based and one-shot neural architecture search with bonas. _Advances in Neural Information Processing Systems_ , 33:1808–1819, 2020. + +- Jack Turner, Elliot J Crowley, Michael O’Boyle, Amos Storkey, and Gavin Gray. Blockswap: Fisher-guided block substitution for network compression on a budget. 2020. + +- Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In _International Conference on Learning Representations_ , 2020. + +- Lixu Wang, Shichao Xu, Ruiqi Xu, Xiao Wang, and Qi Zhu. Non-transferable learning: A new approach for model ownership verification and applicability authorization. In _International Conference on Learning Representations (ICLR)_ , 2022. + +11 + +- Yisen Wang, Xingjun Ma, James Bailey, Jinfeng Yi, Bowen Zhou, and Quanquan Gu. On the convergence and robustness of adversarial training. In _International Conference on Machine Learning_ , pp. 6586–6595. PMLR, 2019. + +- Colin White, Arber Zela, Robin Ru, Yang Liu, and Frank Hutter. How powerful are performance predictors in neural architecture search? _Advances in Neural Information Processing Systems_ , 34: 28454–28469, 2021. + +- Junru Wu, Xiyang Dai, Dongdong Chen, Yinpeng Chen, Mengchen Liu, Ye Yu, Zhangyang Wang, Zicheng Liu, Mei Chen, and Lu Yuan. Stronger nas with weaker predictors. _Advances in Neural Information Processing Systems_ , 34:28904–28918, 2021. + +- Amir R Zamir, Alexander Sax, William Shen, Leonidas J Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 3712–3722, 2018. + +- Hong-Yu Zhou, Chixiang Lu, Sibei Yang, and Yizhou Yu. Convnets vs. transformers: Whose visual representations are more transferable? In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 2230–2238, 2021. + +- Tong Zhou, Shaolei Ren, and Xiaolin Xu. Obfunas: A neural architecture search-based dnn obfuscation approach. In _Proceedings of the 41st IEEE/ACM International Conference on Computer-Aided Design_ , pp. 1–9, 2022. + +- Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. _5th International Conference on Learning Representations (ICLR)_ , 2017. + +12 + +## A DERIVATION IN TASK EMBEDDING + +Given the source task embedding **z** _S_ , we first generate a vector _ei_ that is orthogonal to **z** _S_ , which can be obtained via Gram–Schmidt process. + +To satisfy the desired cosine similarity _d_ , i.e., + +**==> picture [257 x 11] intentionally omitted <==** + +where we use _Scos_ to denote cosine similarity and _θ_ is corresponding angle. Here we set the norm of the target task embedding the same as **z** _S_ , so we will have: + +**==> picture [276 x 11] intentionally omitted <==** + +According to Eq. (6), we also have _θ_ = arccos( _d_ ). Therefore. Eq. (7) can be expressed as: + +**==> picture [283 x 11] intentionally omitted <==** + +## B DETAILS OF ZERO-PROXY + +In ArchLock, we utilize zero-cost proxies (ZCPs) obtained from the NAS-Bench-Suite-Zero tool Ruchte et al. (2020). This tool assesses the performance of various ZCPs, and we specifically focus on data-dependent ZCPs since we believe that architectural performance could vary depending on the data involved. The data-dependent ZCPs consider data/tasks to compute scores but do not update the gradient for weight optimization. + +The NAS-Bench-Suite-Zero tool provides a total of 9 data-dependent ZCPs. We select 7 out of these 9, namely fisher Turner et al. (2020), flops Ning et al. (2021), grad-norm Abdelfattah et al. (2021), grasp Wang et al. (2020), jacov Mellor et al. (2021), nwot Mellor et al. (2021), and snip Lee et al. (2019b). Two ZCPs, namely epe-nas Lopes et al. (2021) and plain Ning et al. (2021), are excluded from our selection. + +We exclude epe-nas because it is designed specifically for the classification task. As for plain, it exhibits the lowest Spearman rank correlation coefficient with validation accuracies among the 9 ZCPs. Furthermore, extensive experiments conducted in Krishnakumar et al. (2022) demonstrate that including more than 6-8 ZCPs only leads to marginal improvements. Therefore, we consider the inclusion of 7 ZCPs to be sufficient for our purposes. + +The technique of each ZCP is briefly described below: + +- fisher: It computes the sum of gradients of the activations in the network. + +- flops: It measures the number of floating-point operations (flops) required to process an input through the network. It provides an estimate of computational complexity. + +- grad-norm: It calculates the sum of Euclidean norms of gradients. + +- grasp: It approximates the change in gradient norm. + +- jacov: It measures the covariance of prediction Jacobian matrices across a minibatch of data. It captures the relationship between predictions and their gradients. + +- nwot: It examines the overlap of activations between data in a mini-batch for an untrained network. + +- :snip: It estimates the change in the loss function. + +It is important to note that while not all of these metrics were initially introduced as ZCPs, they have been later utilized in the field of NAS to assess architecture performance without the need for extensive training. These metrics have been demonstrated effective in providing reliable estimations of performance. + +13 + +C IMPLEMENTATION OF FUNCTIONS IN CROSS-TASK SEARCH + +## **Algorithm 2** Binary Predictor with Sorting Algorithm + +1: **function** BPWSORT( _popu, P,_ **z** _S ,_ **z** _Ti_ ) + +2: Zero-initialize matrix _comps_ and _compt_ of shape [ _len_ ( _popu_ ) _, len_ ( _popu_ )] 3: **for** _a, b ∈ range_ ( _len_ ( _popu_ )) with _b > a_ **do** 4: Encode _archa, archb → arch_ pair_ 5: _pa, pb ← P_ ( _arch_ pair,_ **z** _S_ ) 6: **if** _pa > pb_ **then** 7: _comp_ s_ [ _a, b_ ] _←_ 1 8: **else** 9: _comp_ s_ [ _b, a_ ] _←_ 1 10: **end if** 11: **for** each **z** _Ti_ **do** 12: _pa, pb ← P_ ( _arch_ pair,_ **z** _Ti_ ) 13: **if** _pa > pb_ **then** 14: _comp_ t_ [ _a, b_ ] += 1 15: **else** 16: _comp_ t_ [ _b, a_ ] += 1 17: **end if** 18: **end for** 19: **end for** 20: _sums ←_ Sum _comps_ along dimension 0 21: _Srank ←_ Get the index of elements of _sums_ in descending order 22: _sumt ←_ Sum _compt_ along dimension 0 23: _Trank ←_ Get the index of elements of _sumt_ in descending order 24: **return** _Srank, Trank_ + +25: **end function** + +**Algorithm 3** Update History in cross-task search + +1: **procedure** UPDATEHISTORY( _history, arch, P,_ **z** _S ,_ **z** _Ti_ ) 2: _history_ .append( _arch_ ) 3: **if** _len_ ( _history_ ) _> k_ **then** 4: _Srank, Trank ←_ BPwSort( _history, P,_ **z** _S ,_ **z** _Ti_ ) 5: Calculate fitness score f for each _arch ∈ history_ 6: _history ←_ top- _k arch_ s with highest f in _history_ 7: **end if** + +8: **end procedure** + +## D NAS-BENCH-201 + +The performance of different task pairs in NAS-Bench-201 can be observed in Fig. 4. From the figure, it is evident that there is a relatively high correlation between CIFAR-10 and CIFAR-100, indicating that architectures that perform well on CIFAR-10 tend to also perform well on CIFAR-100. However, the correlation between CIFAR-100 and ImageNet-16-120 is lower. Indeed, the absence of a perfect positive correlation between task pairs in NAS-Bench-201 suggests that the architectural choices yielding optimal performance on one task may not translate to the best performance on another task. This observation indicates that there is room for exploration and development of secure architectures that can effectively defend against malicious transfer attacks. + +14 + +**==> picture [302 x 290] intentionally omitted <==** + +**----- Start of picture text -----**
+CIFAR-10 CIFAR-100 ImageNet-16-120
ImageNet-16-120 CIFAR-100 CIFAR-10
**----- End of picture text -----**
+ +Figure 4: The correlation of each task pair in NAS-Bench-201. + +## E TRANSNAS-BENCH-101 + +The correlation of each task pair in TransNAS-Bench-101 is shown in Fig. 5, where Acc. denotes accuracy and Neg. denotes negative. Here we use the negative loss for RL to be consistent with other metrics, i.e., the higher value indicates better performance. Compared to NAS-Bench-101, the task pair in this benchmark shows a relatively lower correlation, which indicates the transferability of an architecture varies when the task changes. By leveraging the understanding that architectures may perform differently across various tasks, we can focus on designing models that only excel in their source tasks but also possess robustness and resilience against unauthorized transfer. This opens up opportunities for research and innovation in creating architectures that prioritize security and can withstand attempts to extract and transfer their knowledge maliciously. + +15 + +**==> picture [392 x 329] intentionally omitted <==** + +**----- Start of picture text -----**
+SC (Acc. %) OC (Acc. %) RL (Neg. Loss) JS (Acc. %) SS (Acc. %) SN (SSIM) AE (SSIM)
SC (Acc. %)
OC (Acc. %)
RL (Neg. Loss)
AE (SSIM) SN (SSIM) SS (Acc. %) JS (Acc. %)
**----- End of picture text -----**
+ +Figure 5: The correlation of each task pair in TransNAS-Bench-101. + +16 + diff --git a/open_review/iclr2024_8805.json b/open_review/iclr2024_8805.json new file mode 100644 index 0000000000000000000000000000000000000000..e0414b9823d3f712ed8f6b7c0d2c7c6011d8e59a --- /dev/null +++ b/open_review/iclr2024_8805.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8805", + "source": "iclr2024", + "source_year": 2024, + "title": "A Quadratic Synchronization Rule for Distributed Deep Learning", + "abstract": "In distributed deep learning with data parallelism, synchronizing gradients at each training step can cause a huge communication overhead, especially when many nodes work together to train large models.\n Local gradient methods, such as Local SGD, address this issue by allowing workers to compute locally for $H$ steps without synchronizing with others, hence reducing communication frequency.\n While $H$ has been viewed as a hyperparameter to trade optimization efficiency for communication cost, recent research indicates that setting a proper $H$ value can lead to generalization improvement. Yet, selecting a proper $H$ is elusive. This work proposes a theory-grounded method for determining $H$, named the Quadratic Synchronization Rule (QSR), which recommends dynamically setting $H$ in proportion to $\\frac{1}{\\eta^2}$ as the learning rate $\\eta$ decays over time.\n Extensive ImageNet experiments on ResNet and ViT show that local gradient methods with QSR consistently improve the test accuracy over other synchronization strategies. Compared to the standard data parallel training, QSR enables Local AdamW to cut the training time on 16 or 64 GPUs down from 26.7 to 20.2 hours or from 8.6 to 5.5 hours and, at the same time, achieves 1.16% or 0.84% higher top-1 validation accuracy.", + "rebuttal": "### Note on major revisions\nWe sincerely thank all reviewers for their helpful feedback! Following the reviewers’ suggestions, we have made the revisions listed below:\n- In Table 1, we reported the validation accuracy and train loss averaged over 3 runs, along with the standard deviation.\n- We added Figure 5 to visualize the $H$ schedule for QSR.\n- In Appendix B, we presented the pseudocode for standard data parallel methods. \n- In Appendix E, we added a proof outline and two preliminary Lemmas. We also enhanced the proof for Lemma E.2 and Theorem 3.1 with more details.\n- In Appendix F, we presented the details for communication time measurement. \n- In Appendix G, we explored the scaling $H\\sim \\eta^{-3}$.\n- In Appendix H, we presented experiments on a slightly modified Stochastic Weight Averaging in Parallel (SWAP) algorithm.\n\n### Response to Reviewer duf3\nWe sincerely thank the reviewer for the positive and insightful feedback on our paper. We are glad the reviewer found the proposed synchronization rule effective and supported by solid theoretical analysis and comprehensive experiments.\n\nWe thank the reviewer again for the review and appreciation of our paper.\n\n### Response to Reviewer tFqJ (1/2)\nWe sincerely thank the reviewer for acknowledging our experimental results as promising and our theory as intuitive. Below we address the reviewer’s concerns and questions one by one.\n\n**Concern 1**: No confidence intervals in experiments.\n\n**A**: We have repeated our main experiments and updated Table 1. We are unable to repeat all experiments due to high training costs (~20 hours for a single run on 16 NVIDIA GeForce RTX 3090 GPUs), but the improvement is consistent across different settings (Tables 2 and 3, Figures 2 and 3).\n\n**Concern 2**: No visualizati [...]\n\n### Response to Reviewer tFqJ (2/2)\n**Question**: A network speed of 25Gbps is used for the experiments. Would your algorithm still help in HPC settings where fast communications can happen over 100 Gbps Infiniband ?\n\n**A**: The communication time is expected to be 1/4 of that reported in Table 4 as the bandwidth is increased to 4 times. However, we do not know the exact speedup for our experiments over 100 Gbps Infiniband since we do not have access to such a network. \n\nWe thank the reviewer again for the helpful feedback. We hope that we have addressed the key concerns of the reviewer. If s [...]\n\n### Response to Reviewer u85z\nWe sincerely thank the reviewer for the positive and constructive feedback. Below we address the reviewer’s questions.\n\n**Q1**: How does QSR perform in NLP tasks with transformer architectures?\n\n**A**: Thank you for your suggestion on exploring QSR on NLP tasks. As discussed in Section 5, local gradient methods may have the potential to improve the transferability from pretraining to downstream tasks in NLP. However, given that the large-scale experiments on vision tasks are already costly and time-consuming (~20 hours for a single run), we leave the exploration o [...]\n\n### Response to Reviewer ydD5 (Clarification of Misunderstandings)\nWe sincerely thank the reviewer for the time and effort in reviewing our paper. However, in the first place, we would like to respectfully point out the misunderstandings the reviewer may have regarding our paper.\n\n**M1: The reviewer confuses optimization with generalization, leading to a misunderstanding of (1) how QSR works and (2) our theoretical results.**\n\n1. The reviewer summarizes one of our strengths as “The concept presented is intuitive—convergence can be improved by dynamically tuning H the number of steps of local u [...]\n\n### Response to Reviewer ydD5 (Concerns & Questions, 1/3)\nWe believe many of the reviewer’s concerns are due to the above misunderstandings, and we hope the above clarification can help the reviewer understand our paper better. In the following, we address the reviewer’s other concerns and questions.\n\n**W1 (1)**: The motivation for finding 'H’ given a learning rate schedule is questionable. Solely determining H given the learning rate schedule, yet without asking about what the optimal learning rate is, is a less valuable question. What the optimal dynamic learning rate schedule is under a giv [...]\n\n### Response to Reviewer ydD5 (Concerns & Questions, 2/3)\n**W4**: The theoretical analysis and proof overlap too much with previous work [1].\n\n**A**: We respectfully disagree with the above comments. The analysis in [1] cannot handle the case where $H \\sim \\eta^{-2}]$, but our theoretical result can. Specifically, their analysis depends on the condition $H\\eta=O(1)$, and many bounds therein explode as $H\\eta \\to \\infty$, e.g., Theorem 3.3, Lemmas I.14 and I.16. In the context of QSR, where $H\\eta=\\frac{\\alpha^2}{\\eta}$ goes to infinity as $\\eta$ approaches $0$, the condition $H\\eta=O(1)$ is vi [...]\n\n### Response to Reviewer ydD5 (Concerns & Questions, 3/3)\n**Q2**: The proof provided for Lemma E.2 appears to be too succinct. Furthermore, in Lemma E.2, it is stated that 'we can apply the Itô-Taylor expansion from Lemma B.7 of Malladi et al. (2022) to derive (16), (17), and (18).' Is there a typo in this reference to equations? I suspect you meant to refer to equations (11), (12), and (13). Also, could you please elucidate how you derived equations (11), (12), and (13)?\n\n**A**: We thank the reviewer for pointing out the typo; we have corrected it in the updated version. As stated in the proo [...]\n\n### Response to Reviewer ydD5 (References)\n[1] Xinran Gu, Kaifeng Lyu, Longbo Huang, and Sanjeev Arora. Why (and when) does local SGD generalize better than SGD? In The Eleventh International Conference on Learning Representations, 2023.\n\n[2] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 10012–10022, 2021.\n\n[3] Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Fe\n[rebuttal truncated]", + "initial_scores": [ + 8, + 6, + 5, + 8 + ], + "score_mean": 6.75, + "score_variance": 2.25, + "score_spread": 3, + "score_min": 5, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "The paper proposes a new rule for choose how often local gradient descent should communicate. The rule is supported both by simulations, showing improved generalization with fewer communications, as well as by some theory. The theory here seems to be based on setting parameters to make a certain \"slow SDE\" approximation work. The results are interesting and the general consensus of the reviewers favors publication.", + "forum_id": "yroyhkhWS6", + "primary_area": "optimization", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_u85z", + "review_id": "pxzpK4TCH8", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 1792, + "edit_detected": true, + "edit_delta_seconds": 771991, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_tFqJ", + "review_id": "sa2zG2B1uy", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 2, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 4201, + "edit_detected": true, + "edit_delta_seconds": 1881436, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_ydD5", + "review_id": "48q2Cv7Jka", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 6600, + "edit_detected": true, + "edit_delta_seconds": 2003037, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_duf3", + "review_id": "yZ1HLLU2YC", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 2 + }, + "review_text_chars": 943, + "edit_detected": true, + "edit_delta_seconds": 907688, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8805.md b/open_review/iclr2024_8805.md new file mode 100644 index 0000000000000000000000000000000000000000..ad25eb6b3985c81a72a8c2ab2083df8ddb87cca8 --- /dev/null +++ b/open_review/iclr2024_8805.md @@ -0,0 +1,951 @@ + + +## A QUADRATIC SYNCHRONIZATION RULE FOR DISTRIBUTED DEEP LEARNING + +Authors withheld for review + +## ABSTRACT + +In distributed deep learning with data parallelism, synchronizing gradients at each training step can cause a huge communication overhead, especially when many nodes work together to train large models. Local gradient methods, such as Local SGD, address this issue by allowing workers to compute locally for _H_ steps without synchronizing with others, hence reducing communication frequency. While _H_ has been viewed as a hyperparameter to trade optimization efficiency for communication cost, recent research indicates that setting a proper _H_ value can lead to generalization improvement. Yet, selecting a proper _H_ is elusive. This work proposes a theory-grounded method for determining _H_ , named the Quadratic Synchronization Rule (QSR), which recommends dynamically setting _H_ in proportion to 1[as the learning rate] _[ η]_[ decays over time.][Extensive ImageNet experiments on] _η_[2] ResNet and ViT show that local gradient methods with QSR consistently improve the test accuracy over other synchronization strategies. Compared with the standard data parallel training, QSR enables Local AdamW on ViT-B to cut the training time on 16 or 64 GPUs down from 26.7 to 20.2 hours or from 8.6 to 5.5 hours and, at the same time, achieves 1 _._ 12% or 0 _._ 84% higher top-1 validation accuracy. + +## 1 INTRODUCTION + +The growing scale of deep learning necessitates distributed training to reduce the wall-clock time. Data parallel training is a foundational technique that distributes the workload of gradient computation to _K_ workers, also serving as a key building block of more advanced parallel strategies. At each step of this method, each worker first computes gradients on their own local batches of data. Then, they take an average over local gradients, which typically involves a costly All-Reduce operation. Finally, they update the model parameter with the averaged gradient and a gradient-based optimizer OPT, e.g., SGD, AdamW. In this paper, we term the data parallel implementation of optimizer OPT as “Parallel OPT”. See Algorithm 1 for the pseudocode. The cost for this data parallelism is obvious. Frequent gradient synchronization can induce huge communication overhead as the number of workers and model size grow, severely hindering the scalability of distributed training (Tang et al., 2021; Li et al., 2022; Xu et al., 2023). + +One approach to reducing this communication overhead is Local SGD (Stich, 2018; Zhou & Cong, 2018; Woodworth et al., 2020). Rather than synchronizing gradients at every step, Local SGD allows workers to independently train their local replicas using their own local batches with SGD updates. It is only after completing _H >_ 1 local steps that these workers synchronize, where the model parameters get averaged over all replicas. Notably, while we mention SGD, this approach can be readily adapted to other popular optimizers. In this paper, if a gradient-based optimizer OPT is used for local updates, we term the variant as “Local OPT” (e.g., Local SGD, Local AdamW), and collectively refer to this class of approaches as _local gradient methods_ . We provide a pseudocode for local gradient methods in Algorithm 2. + +The main focus of this paper is to study the best strategies to set the synchronization period _H_ (i.e., the number of local steps per communication round) in local gradient methods. While setting _H_ to a larger value reduces communication, a very large _H_ can hinder the training loss from decreasing + +1 + +**==> picture [361 x 162] intentionally omitted <==** + +**----- Start of picture text -----**
+H Schedule and Communcation Volume H Schedule and Communcation Volume
Parallel SGD, 100% H ∼ η [−] [1] , 19.3% Parallel AdamW, 100% H ∼ η [−] [1] , 15.1%
Post-local SGD, 56.3% QSR, 20.1%
Constant Period, 25% QSR, 10.4%
Constant Period, 25%
80 80
75 75
80 . 5 70
70 81
80 . 0 65
80
65 79 . 5
60 79
79 . 0
170 180 190 200 250 300
60 55
0 50 100 150 200 0 100 200 300
Epochs Epochs
(a) Local SGD on ResNet-152 (b) Local AdamW on ViT-B
(%) (%)
Acc. Acc.
Val. Val.
Top-1 Top-1
**----- End of picture text -----**
+ +Figure 1: When training ResNet-152 and ViT-B on ImageNet with cosine learning rate decay, Local SGD/AdamW with QSR consistently outperforms data parallel methods or Local SGD/AdamW with other synchronization strategies in terms of top-1 validation accuracy, while only requiring 20.1% and 10.4% of the communication volume, respectively. With QSR, Local SGD on ResNet or Local AdamW on ViT cuts the training time from 20.7 to 18 hours or 26.7 to 20.2 hours on 16 GPUs, when compared with data parallel methods. We report the mean and the standard deviation over 3 runs. See Appendix C for training details. + +at normal speed, since the local replicas may significantly diverge from each other before averaging. Indeed, it has been observed empirically that larger _H_ leads to higher training loss after the same number of steps (Wang & Joshi, 2021; Ortiz et al., 2021), and efforts to analyze the convergence of local gradient methods in theory usually end up with loss bounds increasing with _H_ (Khaled et al., 2020; Stich, 2018; Haddadpour et al., 2019; Yu et al., 2019). To better trade-off between communication cost and optimization speed, Kamp et al. (2014); Wang & Joshi (2019); Haddadpour et al. (2019); Shen et al. (2021) proposed adaptive synchronization schemes, such as linearly increasing _H_ as the iteration goes on (Haddadpour et al., 2019), or adjusting _H_ based on the variance in model parameters (Kamp et al., 2014). Nonetheless, their effectiveness has only been validated on linear models or small-scale datasets, e.g., CIFAR-10/100. + +All these strategies are developed to avoid sacrificing too much training loss, but training loss is _never_ the final evaluation metric that one cares about in deep learning. Due to the overparameterized nature of modern neural networks, reaching the same training loss does not correspond to the same performance on test data. It has also been long known that the choice of optimizers or hyperparameters can change not only the optimization speed of the training loss but also their _implicit bias_ towards solutions with different test accuracies. + +The presence of this implicit bias indeed complicates the picture of setting _H_ in local gradient methods. Though a large _H_ might be harmful for training loss, it has been observed empirically that setting _H_ properly can sometimes improve rather than hurt the final test accuracy. Lin et al. (2020) are the first to report this phenomenon. Comparing with running just the standard data parallel SGD (equivalent to _H_ = 1), they observed that switching from SGD to Local SGD ( _H >_ 1) halfway through consistently leads to higher final test accuracy. Local SGD with this specific schedule of _H_ is designated as _Post-local SGD_ . Lin et al. (2020)’s work opens up a new angle in setting _H_ in local gradient methods, yet, the proposed schedule in Post-local SGD, referred to as the post-local schedule in this paper, is suboptimal in improving test accuracy. It was later reported by Ortiz et al. (2021) that Post-local SGD does not improve much on ImageNet. For both stepwise decay and cosine decay learning rate schedules, the test accuracy improvement of Post-local SGD diminishes as learning rate decreases. Further, it remains unclear whether the generalization benefit continues to appear when the optimizer is changed from SGD to adaptive gradient methods such as Adam/AdamW, which are now indispensable for training large models. + +**Our Contributions.** In this paper, we aim to propose a general and effective _H_ schedule that can be readily applied to various optimizers and neural network models. Specifically, we introduce a simple yet effective strategy, called _Quadratic Synchronization Rule_ (QSR), for dynamically adjusting the synchronization period according to the learning rate: given a learning rate schedule, we set _H_ proportional to _η[−]_[2] as the learning rate _η_ decays. This rule is largely inspired by a previous theoretical work (Gu et al., 2023), which shows that the generalization benefits arise only if _H_ = Ω( _η_[1][)] when _η →_ 0, but did not make any recommendation on how to set _H_ . + +Our main contributions are: + +2 + +1. We propose the Quadratic Synchronization Rule (QSR) to simultaneously reduce the wall-clock time and improve the final test accuracy of local gradient methods. Based on the theoretical insights in Theorem 3.1, we provide a theoretical separation among data parallel SGD, Local SGD with _H ∼ η[−]_[1] , and Local SGD with QSR in terms of SDE approximations. We show that QSR can help reduce sharpness faster and hence improve generalization. + +2. We demonstrate with ImageNet experiments that QSR can consistently improve the final test accuracy of ResNet-152 and ViT-B over other synchronization strategies, including constantperiod and post-local schedules, and also _H ∼ η[−]_[1] which one will expect to be optimal from the optimization perspective (Figure 1). + +3. We thoroughly validate the efficacy of QSR not only for Local SGD but also for Local AdamW, which is arguably more suitable for training large models. We also validate its efficacy for cosine, linear and step decay learning rate schedules that are commonly used in practice. + +4. We evaluate the communication efficiency of QSR on a 64-GPU NVIDIA GeForce RTX 3090 cluster. As an illustrative example, the standard data parallel AdamW takes 8.6 hours to train ViT-B for 300 epochs. With our QSR, Local AdamW cuts the training time down to 5.5 hours with even higher test accuracy. + +## 2 OUR METHOD: QUADRATIC SYNCHRONIZATION RULE + +Below we formulate the local gradient methods and present our Quadratic Synchronization Rule. + +**Local Gradient Methods.** Given any gradient-based optimizer OPT, the corresponding local gradient method consists of multiple communication rounds. At the _s_ -th round, each of the _K_ workers (say the _k_ -th) gets a local copy of the global iterate _**θ**_[¯][(] _[s]_[)] , i.e., _**θ** k,_[(] _[s]_ 0[)] _[←]_ _**[θ]**_[¯][(] _[s]_[)][,][and][then][performs] _[H]_ steps of local updates. At the _h_ -th local step of the _s_ -th round, which corresponds to the ( _sH_ + _h_ )-th iteration globally, each worker gets a batch of _B_ loc samples ( _ξk,h,_[(] _[s]_[)] 1 _[, . . . , ξ] k,h,B_[(] _[s]_[)] loc[)][ from a globally] shared dataset _D_[˜] , computes the gradient on that batch, and updates the model with optimizer OPT and learning rate _ηsH_ + _h_ : + +**==> picture [361 x 30] intentionally omitted <==** + +After finishing _H_ steps of local updates, all workers average their local models to generate the next global iterate: _**θ**_[¯][(] _[s]_[+1)] _← K_ 1 � _Kk_ =1 _**[θ]** k,H_[(] _[s]_[)][.][Note that conventional local gradient methods set the] synchronization period as a constant, denoted as _H_ , throughout training. See also Algorithm 2. + +**Quadratic Synchronization Rule.** Given a learning rate schedule _ηt, t ∈{_ 0 _, · · · , T −_ 1 _}_ that decays with time, instead of keeping _H_ constant, we propose to dynamically increase the synchronization period _H_[(] _[s]_[)] at each round _s_ as the learning rate decreases. More specifically, if at the global iteration _t_ we need to start a new communication round, then we set + +**==> picture [273 x 31] intentionally omitted <==** + +Here _H_ base is a constant indicating the minimum number of local steps one would like to use for each round, which should be set according to the relative cost of computation and communication. The coefficient _α_ , termed the “growth coefficient” henceforth, is a hyperparameter controlling how fast _H_[(] _[s]_[)] increases as _ηt_ decreases. + +As suggested by our later theorem 3.1, _α_ should be set as a small constant. In our experiments, we tune _α_ properly between 0 _._ 01 and 0 _._ 5 and test the effectiveness of QSR with _H_ base = 2 _,_ 4 _,_ 8. Note that the last communication round may not finish exactly at the last iteration of the learning rate schedule. If this is the case, we force a synchronization at the last step by setting _H_[(] _[s]_[)] := _T − t_ . + +A surprising part of our method is that we use the power 2 in the above formula (2). This choice of power 2 is inspired by the analysis in Gu et al. (2023), which suggests that setting _H_ = Ω( _η_[1][)] is beneficial for reducing the sharpness of the local landscape. Indeed, _H_[(] _[s]_[)] could have been set _γ_ to _H_[(] _[s]_[)] := max � _H_ base _,_ �� _ηαt_ � �� for any _γ_ . However, using _γ_ = 2 is crucial for the success of our method, and we will provide theoretical justification and empirical evidence for this choice in Section 3. We also visualize the _H_ schedule for QSR in Figure 5 in the appendix. + +3 + +**Dealing with Learning Rate Warmup.** Many learning rate schedules use a warmup phase where the learning rate increases linearly from 0 to _η_ max, and then decays monotonically. This warmup phase is often used to avoid the instability caused by the initial large learning rate (Goyal et al., 2017). Our rule is not directly compatible with the warmup phase, since it is designed for a decaying learning rate, but the learning rate increases rather than decreases in this phase. Practically, we recommend setting _H_[(] _[s]_[)] as the value to be used in the communication round right after the warmup. + +## 3 THEORETICAL MOTIVATIONS OF QUADRATIC SYNCHRONIZATION RULE + +To justify our choice of power 2, we build on the same theoretical setup as Gu et al. (2023) to analyze the Stochastic Differential Equation (SDE) approximation of SGD and Local SGD using different scalings of _H_ with respect to _η_ . Though the learning rate continuously decays over time in most of our experiments, it does not usually change much within a couple of epochs. Inspired by this, we take a quasistatic viewpoint: consider a significant period of time where the learning rate is relatively constant, and directly treat the learning rate as a real constant _η_ . First, we recap Gu et al. (2023)’s theory that applies to Local SGD with _H ∼ η[−]_[1] , then we show how to generalize the result to our rule where _H ∼ η[−]_[2] , leading to a stronger implicit bias towards flatter minima. + +**Setup.** Consider optimizing the loss function _L_ ( _**θ**_ ) := E _ξ∼D_ ˜[[] _[ℓ]_[(] _**[θ]**_[;] _[ ξ]_[)]][,][where] _**[θ]**[∈]_[R] _[d]_[is][the][pa-] rameter vector and _ℓ_ ( _**θ**_ ; _ξ_ ) is the loss function for a single data sample _ξ_ drawn from a training set/training distribution _D_[˜] . We use **Σ** ( _**θ**_ ) := Cov _ξ∼D_ ˜[[] _[∇][ℓ]_[(] _**[θ]**_[;] _[ ξ]_[)]][ to denote the covariance matrix of] the stochastic gradient _∇ℓ_ ( _**θ**_ ; _ξ_ ) at _**θ**_ . Following Gu et al. (2023), we make regularity assumptions on _L_ ( _**θ**_ ) _,_ **Σ** ( _**θ**_ ) and _∥∇ℓ_ ( _**θ**_ ; _ξ_ ) _∥_ 2 in Assumption E.1, and we assume that _L_ has a manifold Γ of minimizers in Assumption E.2. Our analysis is based on SDE approximations near Γ, providing a clean view of how different choices of _H_ affect the selection of minimizers by Local SGD. + +**SDE approximations of SGD and Local SGD.** SDE is a powerful tool to precisely characterize the effect of noise in SGD, leading to many applications such as Linear Scaling Rule (Goyal et al., 2017). The SDE d _**θ**_ ( _t_ ) = _−∇L_ ( _**θ**_ ( _t_ ))d _t_ + ~~_√_~~ 1 _B_ **[Σ]**[(] _**[θ]**_[(] _[t]_[))][1] _[/]_[2][d] _**[W]**[t]_[is conventionally used in the] literature (Jastrz˛ebski et al., 2017; Smith et al., 2020; Li et al., 2021b), where _**W** t_ is the standard Wiener process. In this SDE, each discrete step corresponds to a continuous time interval of length _η_ , and the expected gradient and gradient noise become a deterministic drift term and a stochastic diffusion term, respectively. When the training proceeds to a point _**θ**_ ( _t_ ) near a minimizer _**ζ**_ 0 on the manifold Γ, the gradient _∇L_ ( _**θ**_ ( _t_ )) is almost zero but the gradient noise ~~_√_~~ 1 _B_ **[Σ]**[(] _**[θ]**_[(] _[t]_[))][1] _[/]_[2][d] _**[W]**[t]_[drives] the parameter to diffuse locally. This can be captured by a careful first-order approximation of the dynamics, leading to an Ornstein-Uhlenbeck process (Zhu et al., 2019; Li et al., 2019a; Izmailov et al., 2018). However, these rough approximations only hold for about _O_ ( _η[−]_[1] ) steps, whereas neural networks in practice are usually trained for much longer. + +Recently, a series of works (Blanc et al., 2020; Damian et al., 2021; Li et al., 2021c) study the dynamics of SGD on a _longer_ horizon. They show that higher-order terms can accumulate over time and drive this local diffusion to gradually move on the manifold Γ. Among them, Li et al. (2021c) precisely characterized this with an SDE tracking the _gradient flow projection_ of _**θ**_ ( _t_ ) on Γ, denoted as Φ( _**θ**_ ( _t_ )) (see Definition E.1). Here, Φ( _**θ**_ ( _t_ )) can be thought of as a natural “center” of the local diffusion. This SDE, termed as Slow SDE, tracks the dynamics of SGD over _O_ ( _η[−]_[2] ) steps, which is much longer than the _O_ ( _η[−]_[1] ) horizon for conventional SDEs. + +To provide a theoretical understanding of why Local SGD generalizes better than SGD, Gu et al. (2023) derived the Slow SDEs for Local SGD using the scaling _H ∼ η[−]_[1] . By comparing the Slow SDEs, they argued that Local SGD drifts faster to flatter minima than SGD. However, their analysis does not encompass the more aggressive scaling _H ∼ η[−]_[2] recommended by our QSR. Recognizing this gap, we derive the Slow SDE for this scaling, enriching the theoretical framework for the generalization behavior of Local SGD. Below, we first present the Slow SDEs for SGD and Local SGD with _H ∼ η[−]_[1] and _H ∼ η[−]_[2] , then we interpret why _H ∼ η[−]_[2] may generalize better. + +**Definition 3.1** (Slow SDE for SGD, informal, (Li et al., 2021c; Gu et al., 2023)) **.** _Given_ _**ζ**_ 0 _∈_ Γ _, define_ _**ζ**_ ( _t_ ) _as the solution to the following SDE with initial condition_ _**ζ**_ (0) = _**ζ**_ 0 _:_ + +**==> picture [314 x 33] intentionally omitted <==** + +4 + +_Here, P_ _**ζ** is a projection operator of differential forms to ensure that taking an infinitesimal step from_ _**ζ** ∈_ Γ _remains on the manifold_ Γ _. B is the total batch size._ **Σ** _∥_ ( _**ζ**_ ) _and_ **Σ**[�] ♢( _**ζ**_ ) _are certain PSD matrices related to gradient noise and Hessian. See Definition E.2 for the full definition._ + +**Definition 3.2** (Slow SDE for Local SGD with _H ∼ η[−]_[1] , informal (Gu et al., 2023)) **.** _Consider the scaling H_ = _β/η for some constant β. Given_ _**ζ**_ 0 _∈_ Γ _, define_ _**ζ**_ ( _t_ ) _as the solution to the following SDE with initial condition_ _**ζ**_ (0) = _**ζ**_ 0 _:_ + +**==> picture [373 x 33] intentionally omitted <==** + +_where K is the number of workers, B,_ **Σ** _∥_ ( _**ζ**_ ) _and_ **Σ**[�] ♢( _**ζ**_ ) _are the same as in Definition 3.1. Here,_ **Ψ**[�] ( _**ζ**_ ; _β_ ) _is a PSD matrix depending on gradient noise and Hessian. It scales with β as_ lim _β→_ 0 **Ψ**[�] ( _**ζ**_ ; _β_ ) = **0** _,_ lim _β→_ + _∞_ **Ψ**[�] ( _**ζ**_ ; _β_ ) = **Σ**[�] ♢( _**ζ**_ ) _._[1] _See Definition E.3 for the full definition._ **Definition 3.3** (Slow SDE for Local SGD with QSR) **.** _Given_ _**ζ**_ 0 _∈_ Γ _, define_ _**ζ**_ ( _t_ ) _as the solution to the following SDE with initial condition_ _**ζ**_ (0) = _**ζ**_ 0 _:_ + +**==> picture [314 x 33] intentionally omitted <==** + +_where K, B,_ **Σ** _∥_ ( _**ζ**_ ) _and_ **Σ**[�] ♢( _**ζ**_ ) _are defined in Definitions 3.1 and 3.2._ + +The following approximation theorem indicates that when the learning rate _η_ and the growth coefficient _α_ for QSR are small, the above Slow SDEs closely track their discrete counterparts. The approximation theorem for QSR is new, and we defer the proof to Appendix E.2. + +**Theorem 3.1** (Weak Approximations) **.** _Let T >_ 0 _be a constant and_ _**ζ**_ ( _t_ ) _be the solution to one of the above Slow SDEs with the initial condition_ _**ζ**_ (0) = Φ( _**θ**_[(0)] ) _∈_ Γ _. Let g_ ( _**θ**_ ) _be any C_[4] _-smooth function._ + +_1. (Gu et al., 2023) For SGD, let_ _**ζ**_ ( _t_ ) _be the solution to_ (3) _. Then,_ max0 _≤s≤ ηT_[2] _[|]_[E][[] _[g]_[(Φ(] _**[θ]**[s]_[))]] _[ −]_ E[ _g_ ( _**ζ**_ ( _sη_[2] ))] _|_ = _O_[˜] ( _η_[0] _[.]_[25] ) _._ + +_2. (Gu et al., 2023) For Local SGD with H_ = _β/η for some constant β, let_ _**ζ**_ ( _t_ ) _be the solution to_ (4) _. Then,_ max0 _≤s≤ HηT_[2] _[|]_[E][[] _[g]_[(Φ(] _**[θ]**_[(] _[s]_[)][))]] _[ −]_[E][[] _[g]_[(] _**[ζ]**_[(] _[sHη]_[2][))]] _[|]_[ =] _[O]_[˜][(] _[η]_[0] _[.]_[25][)] _[.]_ + +_3. For Local SGD with H_ = ( _[α] η_[)][2] _[,][where][the][positive][constant][α][is][small][but][larger][than]_ Ω( _η[γ]_ ) _for all γ >_ 0 _, let_ _**ζ**_ ( _t_ ) _be the solution to_ (5) _. Then,_ max0 _≤s≤ HηT_[2] _[|]_[E][[] _[g]_[(Φ(] _**[θ]**_[(] _[s]_[)][))]] _[−]_ E[ _g_ ( _**ζ**_ ( _sHη_[2] ))] _|_ = _O_ ( _α_[2] ) _._ + +_Here,_ ˜ _O_ ( _·_ ) _and O_[˜] ( _·_ ) _hide constants that are independent of α and η but can depend on g and T . O_ ( _·_ ) _also hides log terms._ + +By comparing the Slow SDEs, we can predict the generalization order for different scaling as **QSR** _> {_ **H** _∼_ _**η**[−]_ **[1]** _} >_ **{constant H** _}_ , which we explain in detail below. + +**Interpretation of the Slow SDEs.** We first focus on the Slow SDE for SGD (3). The key component of this Slow SDE is the drift term (b), which comes from higher-order approximations of the aforementioned local diffusion that happens in _O_ ( _η[−]_[1] ) steps. Viewing _∇_[3] _L_ ( _**ζ**_ )[ **Σ**[�] ♢( _**ζ**_ )] as a semi-gradient of _⟨∇_[2] _L_ ( _**ζ**_ ) _,_ **Σ**[�] ♢( _**ζ**_ ) _⟩_ that discards the dependence of _**θ**_ in **Σ**[�] ♢( _**ζ**_ ), we can interpret the Slow SDE as a continuous version of a semi-gradient method for reducing _⟨∇_[2] _L_ ( _**ζ**_ ) _,_ **Σ**[�] ♢( _**ζ**_ ) _⟩_ on Γ. Since the Hessian matrix _∇_[2] _L_ ( _**ζ**_ ) determines the local curvature of the loss landscape, we can conclude from the Slow SDE that SGD tends to reduce sharpness and move towards flatter minimizers in _O_ ( _η[−]_[2] ) steps. Reduced sharpness has been shown to yield better sample complexity bounds in specific theoretical settings. For details, we refer the readers to Li et al. (2021c). + +> 1Given _**ζ**_ , **Ψ** � ( _**ζ**_ ; _β_ ) is a monotonically increasing function of _β_ in the eigenspace of the Hessian matrix _∇_[2] _L_ ( _**ζ**_ ). + +5 + +**==> picture [353 x 111] intentionally omitted <==** + +**----- Start of picture text -----**
+( α = 0 . 3) ( α = 0 . 25) 81 . 0 ( α = 0( α = 0 . 0175) . 015)
( β = 1) ( α = 0 . 2)
80 . 0 ( α = 0 . 4) ( β = 0 . 6) 80 . 5 ( α = 0 . 02) ( α = 0 . 01) H = ⌊ ( [α] η [)][2] [⌋]
( β = 1 . 2)( β = 0 . 8) ( β = 0 . 03) H = ⌊ [β] η [⌋]
80 . 0 ( β = 0 . 035) H = 4
( β = 0 . 04) ( β = 0 . 025) Parallel SGD/AdamW
79 . 5
79 . 5
17 . 5 20 . 0 22 . 5 25 . 0 100 10 15 20 25 100
Communication Volume (%) Communication Volume (%)
(a) Local SGD on ResNet-152 (b) Local AdamW on ViT-B
(%) (%)
Acc. Acc.
Val. Val.
Top-1 Top-1
**----- End of picture text -----**
+ +Figure 2: Empirical results on Local SGD and Local AdamW validate the generalization performance order predicted by our theory: QSR _> {H ∼ η[−]_[1] _} >_ {constant _H_ }. For SGD, we additionally have {constant _H_ } _≈_ {parallel SGD} since the latter is equivalent to Local SGD with _H_ = 1. Here, _α_ and _β_ are tuned to maximize the test accuracy of QSR and _H ∼ η[−]_[1] , respectively. + +Now, we turn to the Slow SDE for QSR. Compared with the SDE for SGD, it possesses a _K_ times larger drift term, leading to much faster sharpness reduction than SGD. An intuitive explanation for why this extra drift arises is as follows. Since the local batch size is _K_ times smaller than the global one, this local diffusion at each worker is much more significant than that in parallel SGD, thereby leading to an extra drift term in Slow SDE accumulated from higher-order terms. + +The case of Local SGD with _H_ = _β/η_ is somewhere in between QSR and SGD. Compared with the SDE for SGD, it has an extra drift term (c), where _β_ serves as the knob to control the magnitude of the drift term. For small _β_ , **Ψ**[�] ( _**ζ**_ ) diminishes to zero, yielding the same SDE as SGD. By contrast, as _β_ goes to infinity, **Ψ**[�] ( _**ζ**_ ) approximates **Σ**[�] ♢( _**ζ**_ ), leading to the Slow SDE for QSR. + +**Comparison of different scalings.** Based on the interpretation, keeping _H_ constant as _η_ diminishes is equivalent to setting a small _β_ for _H_ = _β/η_ , making the extra drift term negligible and thus yielding nearly no generalization benefit over SGD. Conversely, the SDE for _H_ = _β/η_ converges to the SDE of QSR in the limit _β →∞_ , maximizing the drift term. But in practice, _β_ cannot be arbitraril _O_ ˜( _[√]_ y _βη_ large.), suggesting that setting a very largeIn Theorem 3.3 of Gu et al. (2023 _β_ for a not-so-small), the distance between the iterate and _η_ can blow up the loss. Γ blows up asTherefore, the generalization performance of _H∼η[−]_[1] is expected to be worse than QSR. In summary, the order of generalization performance predicted by our theory is QSR _> {H ∼ η[−]_[1] _} >_ {constant _H_ }. + +Experimental results in Figure 2 validate that this order of generalization performance for different scalings holds not only for Local SGD but also for Local AdamW. For Local SGD we additionally have {constant _H_ } _≈_ {parallel SGD} since parallel SGD is mathematically equivalent to Local SGD with _H_ = 1. Apart from _H ∼ η[−]_[1] and _H ∼ η[−]_[2] , we also tried a more aggressive scaling, _H ∼ η[−]_[3] , but it does not provide consistent improvements over QSR. See Appendix G for more discussion. + +## 4 EXPERIMENTS + +In this section, we empirically demonstrate that QSR not only improves the test accuracy of local gradient methods but also reduces the wall-clock time of standard data parallel training, with a focus on the ImageNet classification task (Russakovsky et al., 2015). Our experiments include Local SGD on ResNet-152 (He et al., 2016), and Local AdamW on ViT-B with patch size 16x16 (Dosovitskiy et al., 2021). We briefly outline our training configuration below. See Appendix C for full details. + +**Baselines.** For QSR with base synchronization period _H_ base, we benchmark their performance against two baselines running the same number of epochs: ① Local SGD/AdamW with constant synchronization period _H_ = _H_ base, and ② parallel SGD/AdamW. When comparing with these baselines, we mainly focus on validating that (a) QSR maintains or sometimes outperforms the communication efficiency of ①, thus communicating much less than ②, and (b) QSR improves the generalization performance of ①, even surpassing ② in test accuracy. + +**Comparison with other synchronization strategies.** Besides the above two baselines, other potential baselines include ③ Post-local SGD, ④ the scaling of _H ∼ η[−]_[1] , and ⑤ large batch training with batch size _H × B_ , which we discuss below. ③ is proposed for the same purpose as QSR: to improve communication efficiency and generalization together. However, it is less communication efficient than our QSR because it starts with parallel SGD and sustains this for a significant fraction of the training duration, leading to a limited reduction in communication. Also, as shown by + +6 + +Table 1: QSR enhances the test accuracy of local gradient methods, even outperforming the communicationintensive data parallel approach. The experiments below use batch size 4096. We report the validation accuracy and train loss averaged over 3 runs, along with the standard deviation. + +|(a) Local SGD on ResNet-152
Method
Val. acc. (%) Train loss Comm.
Parallel SGD
79.53 (0.07) 1.57 (0.01) 100%
Local SGD (_H_=2) 79.54 (0.07) **1.58**(0.00)
50%
+ QSR (_H_base=2) **80.30**(0.04) 1.67 (0.01) **39.7%**
Local SGD (_H_=4) 79.48 (0.12) **1.62**(0.02)
25%
+ QSR (_H_base=4) **80.27**(0.05) 1.69 (0.01) **20.1%**|(b) Local AdamW on ViT-B| +|---|---| +||Method
Val. acc. (%) Train loss Comm.| +||Parallel AdamW
79.86 (0.03) 1.09 (0.00) 100%| +||Local AdamW (_H_=4) 79.32 (0.06) **1.01**(0.02)
25%
+ QSR (_H_base=4)
**80.98**(0.05) 1.32 (0.00) **10.4%**| +||Local AdamW (_H_=8) 78.93 (0.10) **1.06**(0.00) 12.5%
+ QSR (_H_base=8)
**80.56**(0.10) 1.35 (0.01) **6.9%**| + +our comparison in Figure 1(a) (also observed in Ortiz et al. 2021), its generalization benefits over SGD appear shortly after switching and diminish in the end. ④ is inspired by Gu et al. (2023) and may also improve generalization while reducing communication, but we have conducted a thorough comparison between QSR and ④ in Figure 2, demonstrating the superiority of QSR. ⑤ has the same communication efficiency as Local SGD with the same constant _H_ (①), but it has been observed to have worse test accuracy than parallel SGD/AdamW without scaling up the batch size (②), which we also observe in Table 2. For the above reasons, we mainly compare with baselines ① and ②. + +**Hardware.** We conduct the experiments on Tencent Cloud, where each machine is equipped with 8 NVIDIA GeForce RTX 3090 GPUs. The machines are interconnected by a 25Gbps network. Since intra-machine communication speed is not substantially faster than inter-machine speed on our specific hardware, we treat _each GPU_ as an independent worker and set the batch size on each GPU as _B_ loc = 256. In this paper, we use _a_ x _b_ GPUs to denote _a_ machines with _b_ GPUs each. + +**Training Setup.** Our experiments on ResNet-152 follow the 200-epoch recipe in Foret et al. (2021b) except that we use 5 epochs of linear learning rate warmup. For experiments on ViT-B, we follow the simple and effective 300-epoch recipe proposed in Beyer et al. (2022) with RandAugment and Mixup. We use the cosine decay unless otherwise stated. The hyperparameters (primarily learning rate and weight decay) are optimally tuned for all baselines. We explore _H_ base = 2 _,_ 4 for ResNet-152 and _H_ base = 4 _,_ 8 for ViT-B. This choice stems from the observation that the communication overhead for ResNet-152 is smaller than ViT-B (see Table 4). To tune the growth coefficient _α_ for QSR, we first fix the learning rate schedule and then search among a few values of _α_ . The _α_ values we explore typically allow the training to start with _H_ base, maintain _H_ = _H_ base for an initial period to optimize the training loss, and gradually increase _H_ as _η_ decays in the late phase. + +## 4.1 QSR IMPROVES GENERALIZATION + +Through experiments spanning various batch sizes and learning rate schedules, in this subsection, we illustrate that QSR consistently enhances the generalization of gradient methods, even outperforming the communication-intensive data parallel approach. + +**Main results.** We first present our main results for batch size _B_ = 4096 on 2x8 GPUs, covering Local SGD on ResNet-152 and Local AdamW on ViT-B. As shown in Table 1, QSR significantly improves the validation accuracy of local gradient methods by up to 0 _._ 8% on ResNet-152 and 1 _._ 7% on ViT-B, despite inducing higher training loss. The results support the thesis that the improvement in generalization is due to the implicit regularization of local gradient noise instead of better optimization. Noticeably, QSR surpasses the data parallel approach in validation accuracy by 0 _._ 7% on ResNet-152 and by 1 _._ 1% on ViT-B while cutting the communication volume to less than 25%. As an added benefit of increasing the synchronization interval in line with the decaying learning rate, QSR further reduces communication overhead, even halving the communication volume compared to Local AdamW with a fixed synchronization period on ViT-B. + +The advantages of QSR are more pronounced for ViT-B compared to ResNet-152. This is probably because vision transformers are general-purpose architectures with less image-specific inductive bias than CNNs (Dosovitskiy et al., 2021; Chen et al., 2021). As a result, they may benefit more from external regularization effects, such as those induced by adding local steps. + +**Scaling up the batch size.** In Table 2, when scaling the training up to 8x8 GPUs with total batch size _B_ = 16384, we observe a drop in test accuracy for both data parallel approach and local gradient methods. This generalization degradation for large batch training, which has been widely observed + +7 + +Table 2: QSR mitigates the generalization degradation in large-batch training. Here the batch size is 16384. + +(a) Local SGD on ResNet-152 (b) Local AdamW on ViT-B + +|(a) Local SGD on ResNet-152|(b) Local AdamW on ViT-B| +|---|---| +|Method
Val. Acc.(%) Comm. (%)
Parallel SGD
79.20
100
Local SGD (_H_=2)
78.67
50
+ QSR (_H_base = 2)
**79.27**
**42.8**
Local SGD (_H_=4)
78.34
25
+ QSR (_H_base = 4)
**78.65**
**21.9**|Method
Val. Acc. (%) Comm. (%)| +||Parallel AdamW
78.52
100| +||Local AdamW (_H_=4)
77.83
25
+QSR (_H_base = 4)
**79.36**
**16.1**| +||Local AdamW (_H_=8)
77.62
12.5
+QSR (_H_base = 8)
**78.26**
**9.8**| + +Table 3: QSR also exhibits strong generalization performance on the step-decay learning rate schedule. (a) Local SGD on ResNet-152. (b) Local AdamW on ViT-B. + +|Method
Val. Acc. (%) Comm. (%)
Parallel SGD
79.68
100
Local SGD (_H_=2)
79.58
50
+QSR (_H_base = 2)
**80.40**
**40.3**
Local SGD (_H_=4)
79.53
25
+QSR (_H_base = 4)
**80.11**
**20.5**|Method
Val. Acc.(%) Comm.(%)
Parallel AdamW
79.91
100
Local AdamW (_H_=4)
79.36
25
+ QSR (_H_base = 4)
**80.9**
**12.7**
Local AdamW (_H_=8)
79.23
12.5
+ QSR(_H_base = 8)
**80.65**
**7.2**| +|---|---| + +in the literature (Shallue et al., 2019; Jastrz˛ebski et al., 2017; You et al., 2018), probably arises from a reduced level of gradient noise associated with increased batch size (Keskar et al., 2017b; Smith et al., 2021). While the Linear Scaling Rule for SGD (Krizhevsky, 2014; Goyal et al., 2017) and the Square Root Scaling Rule (Malladi et al., 2022; Granziol et al., 2022) for adaptive gradient methods – which increase the learning rate in proportion to the total batch size or its square root – can mitigate this degradation, they cannot fully bridge the gap. In Table 2, the test accuracy drop persists even when we tune the learning rate for all baselines. Applying QSR to local gradient methods can help reduce this generalization gap. It improves the validation accuracy of local gradient methods by up to 0 _._ 6% on ResNet-152 and 1 _._ 5% on ViT-B. This enables local gradient methods to achieve comparable validation accuracy as the data parallel approach on ResNet or outperform it by 0 _._ 8% on ViT while communicating considerably less. Method and Communcation Volume + +**==> picture [151 x 117] intentionally omitted <==** + +**----- Start of picture text -----**
+Method and Communcation Volume
Parallel AdamW, 100% QSR ( H base = 4), 9.3%
Local AdamW ( H = 4), 25%
80
75
70 81
65
80
60
79
280 290 300
0 100 200 300
Epochs
(%)
Acc.
Val.
Top-1
**----- End of picture text -----**
+ +**Other learning rate schedules.** So far, our experiments are conducted with the cosine learning rate schedule, which is a common choice for training modern deep neural nets (Liu et al., 2021; 2022; Brown et al., 2020). To further validate the efficacy of QSR, we now investigate other popular learning rate schedules, including linear (Li et al., 2020a; Izsak et al., 2021; Leclerc et al., 2023) and step decay (He et al., 2016; Huang et al., 2017; Ma et al., 2019). See Figure 4 for a visualization of these schedules. Figure 3 presents the results for Local AdamW on ViT-B with linear decay, where the peak learning rates for baselines are tuned optimally. QSR improves the test accuracy of Local AdamW by a significant margin of 1 _._ 4%, even outperforming parallel AdamW by 0 _._ 6% while cutting the communication volume to only 9 _._ 3%. The step + +Figure 3: For linear decay, QSR improves the test accuracy of Local AdamW on ViTB, even outperforming the communicationintensive parallel AdamW. + +decay scheduler divides the learning rate by factors such as 2 or 10 at some specified epochs. Given the absence of standard recipes to determine the decay points in our training setup, we derive a step decay schedule from the cosine decay by rounding its learning rate to powers of 2, which is defined as _η_ step( _t_ ) := 2[round(log][2] _[ η]_[cos][(] _[t]_[))] . As shown in Table 3, QSR exhibits strong generalization performance with this decay schedule, enhancing the test accuracy of local gradient methods by up to 0 _._ 8% on ResNet-152 and 1 _._ 5% on ViT-B. It even surpasses the communication-intensive parallel SGD by 0 _._ 7% on ResNet and parallel AdamW by 1% on ViT. + +## 4.2 QSR REDUCES WALL-CLOCK TIME + +In addition to improving generalization, our original motivation for adopting local steps is to reduce communication overhead and hence reduce the wall-clock time. In this section, we confirm this for training with 2x8 and 8x8 GPUs, as shown in Table 4. See also Appendix F for our method of measuring the communication time. In our setup, scaling the training from 2x8 to 8x8 GPUs + +8 + +Table 4: QSR reduces the wall-clock time of data parallel training. The following tables present wall-clock time for the entire training process on 2x8 GPUs and 8x8 GPUs, with batch sizes 4096 and 16384, respectively. We highlight the wall-clock time of QSR when it matches or outperforms the data parallel baseline in test accuracy. “Ratio” represents communication time divided by total time, reflecting the communication overhead. We also include local gradient methods with a constant synchronization period for reference. + +|(a) ResNet-152 (200 epochs) on 2x8 GPUs
Method
Comm. (h) Total (h) Ratio (%)
Parallel SGD
3.3
20.7
15.9
QSR (_H_base = 2)
1.3
**18.7**
7.0
QSR (_H_base = 4)
0.7
**18.0**
3.9
Local SGD (_H_=2)
1.6
19.0
8.4
Local SGD (_H_=4)
0.8
18.0
4.4
(c) ResNet-152 (200 epochs) on 8x8 GPUs
Method
Comm. (h) Total (h) Ratio (%)
Parallel SGD
1.3
5.7
22.8
QSR (_H_base = 2)
0.6
**5.0**
12.0
QSR (_H_base = 4)
0.3
4.7
6.4
Local SGD (_H_=2)
0.7
5.1
13.7
Local SGD (_H_=4)
0.3
4.8
6.3|(b) ViT-B (300 epochs) on 2x8 GPUs| +|---|---| +||Method
Comm. (h) Total (h) Ratio(%)| +||Parallel AdamW
7.3
26.7
27.3
QSR (_H_base = 4)
0.8
**20.2**
4.0
QSR (_H_base = 8)
0.5
**20.0**
2.5| +||Local AdamW (_H_=4)
1.8
21.2
8.4
Local AdamW (_H_=8)
0.9
20.5
4.4| +||(d) ViT-B (300 epochs) on 8x8 GPUs| +||Method
Comm. (h) Total (h) Ratio (%)| +||Parallel AdamW
3.7
8.6
43.0
QSR (_H_base = 4)
0.6
**5.5**
10.9
QSR (_H_base = 8)
0.4
5.3
7.5| +||Local AdamW (_H_=4)
0.9
5.8
15.5
Local AdamW (_H_=8)
0.5
5.3
9.4| + +increases the communication overhead for both models. Notably, on 8x8 GPUs, communication accounts for almost half of the total training time for ViT-B. Since communication makes up a larger portion of the total time for ViT-B compared to ResNet-152, the speedup from QSR is more significant on ViT-B: the time is cut from 26.7 to 20.2 hours on 2x8 GPUs, and 8.6 to 5.5 hours on 8x8 GPUs. As discussed in Section 4.1, compared to the constant period local gradient method, QSR further reduces the communication cost by increasing the synchronization period in the late phase. For example, applying QSR to Local AdamW with _H_ = 4 further reduces the time by 1 hour for ViT training on 2x8 GPUs. + +**Discussion on the choice of** _H_ base **.** As elaborated in Section 2, _H_ base indicates the minimum synchronization period and should be determined based on the communication overhead. For ResNet152, given that communication only accounts for 3.3 out of 20.7 hours on 2x8 GPUs and 1.3 out of 5.7 hours on 8x8 GPUs, setting _H_ base as 2 or 4 suffices to reduce the communication time to an inconsequential amount. By contrast, the communication overhead for ViT-B is more prominent, motivating us to consider larger values of _H_ base, such as 4 and 8. As shown in Tables 1 and 2, _H_ base introduces a tradeoff between communication efficiency and final test accuracy. For instance, when training ResNet-152 with batch size 16384, one can either choose _H_ base = 2 to achieve comparable test accuracy as parallel SGD, or _H_ base = 4 to further halve the communication volume at the expense of a 0 _._ 6% drop in test accuracy. One probable explanation for this accuracy drop for larger _H_ base can be worse optimization in the early training phase, where the learning rate is large. + +## 5 DISCUSSIONS AND FUTURE DIRECTIONS + +This paper primarily focuses on relatively large models trained with long horizons, and proposes the Quadratic Synchronization Rule (QSR). As validated by our experiments, QSR effectively improves test accuracy and communication efficiency simultaneously for training large vision models (ResNet-152 and ViT-B) with quite a few hundred epochs. However, on the downside, for smaller models trained with shorter horizons, QSR may not consistently deliver noticeable generalization improvements (see Table 5). Nonetheless, training in this regime is not costly, either, making it less of a critical concern. Another limitation of our work is that the effectiveness of QSR relies on the implicit regularization effects of noise, but regularization techniques become less important in bridging the gap between the training and population loss (Vyas et al., 2023) in pertaining large model with unsupervised learning, where the training is done on massive data with only a few epochs. Still, certain implicit/explicit regularization effects have been found to be effective in improving downstream performance despite the same pertaining loss (Liu et al., 2023; Panigrahi et al., 2024). We leave it to future work to explore and design communication-efficient methods for unsupervised learning, particularly language model pretraining, that improve models’ transferability to downstream tasks. + +9 + +## REFERENCES + +- Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’ Alché-Buc, E. Fox, and R. Garnett (eds.), _Advances in Neural Information Processing Systems 32_ , pp. 7411–7422. Curran Associates, Inc., 2019. + +- Sanjeev Arora, Zhiyuan Li, and Abhishek Panigrahi. Understanding gradient descent on the edge of stability in deep learning. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 948–1024. PMLR, 17–23 Jul 2022. + +- Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-SGD: Distributed SGD with quantization, sparsification and local computations. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc., 2019. + +- Lucas Beyer, Xiaohua Zhai, and Alexander Kolesnikov. Better plain vit baselines for imagenet-1k. _arXiv preprint arXiv:2205.01580_ , 2022. + +- Guy Blanc, Neha Gupta, Gregory Valiant, and Paul Valiant. Implicit regularization for deep neural networks driven by an ornstein-uhlenbeck like process. In Jacob Abernethy and Shivani Agarwal (eds.), _Proceedings of Thirty Third Conference on Learning Theory_ , volume 125 of _Proceedings of Machine Learning Research_ , pp. 483–513. PMLR, 09–12 Jul 2020. + +- Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. _CoRR_ , abs/2005.14165, 2020. URL [URL removed] + +- Kai Chen and Qiang Huo. Scalable training of deep learning machines by incremental block training with intra-block parallel optimization and blockwise model-update filtering. In _2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 5880–5884, 2016. doi: 10.1109/ICASSP.2016.7472805. + +- Xiangning Chen, Cho-Jui Hsieh, and Boqing Gong. When vision transformers outperform resnets without pre-training or strong data augmentations. In _International Conference on Learning Representations_ , 2021. + +- Lénaïc Chizat and Francis Bach. Implicit bias of gradient descent for wide two-layer neural networks trained with the logistic loss. In Jacob Abernethy and Shivani Agarwal (eds.), _Proceedings of Thirty Third Conference on Learning Theory_ , volume 125 of _Proceedings of Machine Learning Research_ , pp. 1305–1338. PMLR, 09–12 Jul 2020. + +- Jeremy Cohen, Simran Kaur, Yuanzhi Li, J Zico Kolter, and Ameet Talwalkar. Gradient descent on neural networks typically occurs at the edge of stability. In _International Conference on Learning Representations_ , 2020. + +- Aditya Cowsik, Tankut Can, and Paolo Glorioso. Flatter, faster: scaling momentum for optimal speedup of sgd. _arXiv preprint arXiv:2210.16400_ , 2022. + +10 + +- Alex Damian, Tengyu Ma, and Jason D Lee. Label noise SGD provably prefers flat global minimizers. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 27449–27461. Curran Associates, Inc., 2021. + +- Alex Damian, Eshaan Nichani, and Jason D. Lee. Self-stabilization: The implicit bias of gradient descent at the edge of stability. In _The Eleventh International Conference on Learning Representations_ , 2023. + +- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In _International Conference on Learning Representations_ , 2021. + +- Felix Draxler, Kambis Veschgini, Manfred Salmhofer, and Fred Hamprecht. Essentially no barriers in neural network energy landscape. In _International conference on machine learning_ , pp. 1309– 1318. PMLR, 2018. + +- Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In _International Conference on Learning Representations_ , 2021a. + +- Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In _International Conference on Learning Representations_ , 2021b. + +- Jonathan Frankle, Gintare Karolina Dziugaite, Daniel Roy, and Michael Carbin. Linear mode connectivity and the lottery ticket hypothesis. In _International Conference on Machine Learning_ , pp. 3259–3269. PMLR, 2020. + +- Timur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry P Vetrov, and Andrew G Wilson. Loss surfaces, mode connectivity, and fast ensembling of dnns. _Advances in neural information processing systems_ , 31, 2018. + +- Rong Ge, Yunwei Ren, Xiang Wang, and Mo Zhou. Understanding deflation process in overparametrized tensor decomposition. _Advances in Neural Information Processing Systems_ , 34, 2021. + +- Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: Training imagenet in 1 hour. _arXiv preprint arXiv:1706.02677_ , 2017. + +- Diego Granziol, Stefan Zohren, and Stephen Roberts. Learning rates as a function of batch size: A random matrix theory approach to neural network training. _The Journal of Machine Learning Research_ , 23(1):7795–7859, 2022. + +- Xinran Gu, Kaifeng Lyu, Longbo Huang, and Sanjeev Arora. Why (and when) does local SGD generalize better than SGD? In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed] + +- Vipul Gupta, Santiago Akle Serrano, and Dennis DeCoste. Stochastic weight averaging in parallel: Large-batch training that generalizes well. In _International Conference on Learning Representations_ , 2020. + +- Farzin Haddadpour, Mohammad Mahdi Kamani, Mehrdad Mahdavi, and Viveck Cadambe. Local SGD with periodic averaging: Tighter analysis and adaptive synchronization. _Advances in Neural Information Processing Systems_ , 32, 2019. + +- 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, 2016. + +Sepp Hochreiter and Jürgen Schmidhuber. Flat minima. _Neural computation_ , 9(1):1–42, 1997. + +11 + +Wenqing Hu, Chris Junchi Li, Lei Li, and Jian-Guo Liu. On the diffusion approximation of nonconvex stochastic gradient descent. _arXiv preprint arXiv:1705.07562_ , 2017. + +- Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 4700–4708, 2017. + +- Hikaru Ibayashi and Masaaki Imaizumi. Exponential escape efficiency of SGD from sharp minima in non-stationary regime. _arXiv preprint arXiv:2111.04004_ , 2021. + +- P Izmailov, AG Wilson, D Podoprikhin, D Vetrov, and T Garipov. Averaging weights leads to wider optima and better generalization. In _34th Conference on Uncertainty in Artificial Intelligence 2018, UAI 2018_ , pp. 876–885, 2018. + +- Peter Izsak, Moshe Berchansky, and Omer Levy. How to train bert with an academic budget. _arXiv preprint arXiv:2104.07705_ , 2021. + +- Stanisław Jastrz˛ebski, Zachary Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Yoshua Bengio, and Amos Storkey. Three factors influencing minima in SGD. _arXiv preprint arXiv:1711.04623_ , 2017. + +- Ziwei Ji and Matus Telgarsky. Directional convergence and alignment in deep learning. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 17176–17186. Curran Associates, Inc., 2020. + +- Yiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan, and Samy Bengio. Fantastic generalization measures and where to find them. In _International Conference on Learning Representations_ , 2020. + +- Jikai Jin, Zhiyuan Li, Kaifeng Lyu, Simon Shaolei Du, and Jason D. Lee. Understanding incremental learning of gradient descent: A fine-grained analysis of matrix sensing. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _Proceedings of the 40th International Conference on Machine Learning_ , volume 202 of _Proceedings of Machine Learning Research_ , pp. 15200–15238. PMLR, 23–29 Jul 2023. + +- Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. _Foundations and Trends® in Machine Learning_ , 14(1–2):1–210, 2021. + +- Michael Kamp, Mario Boley, Daniel Keren, Assaf Schuster, and Izchak Sharfman. Communicationefficient distributed online prediction by dynamic model synchronization. In _Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2014, Nancy, France, September 15-19, 2014. Proceedings, Part I 14_ , pp. 623–639. Springer, 2014. + +- Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In _International Conference on Machine Learning_ , pp. 5132–5143. PMLR, 2020. + +- Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In _International Conference on Learning Representations_ , 2017a. + +- Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In _International Conference on Learning Representations_ , 2017b. + +- Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local SGD on identical and heterogeneous data. In _International Conference on Artificial Intelligence and Statistics_ , pp. 4519–4529. PMLR, 2020. + +12 + +- Bobby Kleinberg, Yuanzhi Li, and Yang Yuan. An alternative view: When does SGD escape local minima? In Jennifer Dy and Andreas Krause (eds.), _Proceedings of the 35th International Conference on Machine Learning_ , volume 80 of _Proceedings of Machine Learning Research_ , pp. 2698–2707. PMLR, 10–15 Jul 2018. + +- Jakub Koneˇcn`y, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and Dave Bacon. Federated learning: Strategies for improving communication efficiency. _arXiv preprint arXiv:1610.05492_ , 2016. + +- Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. _arXiv preprint arXiv:1404.5997_ , 2014. + +- Guillaume Leclerc, Andrew Ilyas, Logan Engstrom, Sung Min Park, Hadi Salman, and Aleksander Madry. ffcv. [URL removed] 2022. + +- Guillaume Leclerc, Andrew Ilyas, Logan Engstrom, Sung Min Park, Hadi Salman, and Aleksander M ˛adry. Ffcv: Accelerating training by removing data bottlenecks. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , pp. 12011–12020, June 2023. + +- Conglong Li, Ammar Ahmad Awan, Hanlin Tang, Samyam Rajbhandari, and Yuxiong He. 1-bit lamb: communication efficient large-scale large-batch training with lamb’s convergence speed. In _2022 IEEE 29th International Conference on High Performance Computing, Data, and Analytics (HiPC)_ , pp. 272–281. IEEE, 2022. + +- Mengtian Li, Ersin Yumer, and Deva Ramanan. Budgeted training: Rethinking deep neural network training under resource constraints. In _International Conference on Learning Representations_ , 2020a. + +- Qianxiao Li, Cheng Tai, and Weinan E. Stochastic modified equations and dynamics of stochastic gradient algorithms i: Mathematical foundations. _Journal of Machine Learning Research_ , 20(40): 1–47, 2019a. + +- Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. _Proceedings of Machine learning and systems_ , 2:429–450, 2020b. + +- Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. In _International Conference on Learning Representations_ , 2019b. + +- Yuanzhi Li, Tengyu Ma, and Hongyang Zhang. Algorithmic regularization in over-parameterized matrix sensing and neural networks with quadratic activations. In Sébastien Bubeck, Vianney Perchet, and Philippe Rigollet (eds.), _Proceedings of the 31st Conference On Learning Theory_ , volume 75 of _Proceedings of Machine Learning Research_ , pp. 2–47. PMLR, 06–09 Jul 2018. + +- Zhiyuan Li, Yuping Luo, and Kaifeng Lyu. Towards resolving the implicit bias of gradient descent for matrix factorization: Greedy low-rank learning. In _International Conference on Learning Representations_ , 2021a. + +- Zhiyuan Li, Sadhika Malladi, and Sanjeev Arora. On the validity of modeling SGD with stochastic differential equations (sdes). _Advances in Neural Information Processing Systems_ , 34:12712– 12725, 2021b. + +- Zhiyuan Li, Tianhao Wang, and Sanjeev Arora. What happens after SGD reaches zero loss?–a mathematical framework. In _International Conference on Learning Representations_ , 2021c. + +- Tao Lin, Sebastian U. Stich, Kumar Kshitij Patel, and Martin Jaggi. Don’t use large mini-batches, use Local SGD. In _International Conference on Learning Representations_ , 2020. + +- Hong Liu, Sang Michael Xie, Zhiyuan Li, and Tengyu Ma. Same pre-training loss, better downstream: Implicit bias matters for language models. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _Proceedings of the 40th International Conference on Machine Learning_ , volume 202 of _Proceedings of Machine Learning Research_ , pp. 22188–22214. PMLR, 23–29 Jul 2023. + +13 + +- Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 10012–10022, 2021. + +- Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A convnet for the 2020s. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 11976–11986, 2022. + +- Kaifeng Lyu and Jian Li. Gradient descent maximizes the margin of homogeneous neural networks. In _International Conference on Learning Representations_ , 2020. + +- Kaifeng Lyu, Zhiyuan Li, Runzhe Wang, and Sanjeev Arora. Gradient descent on two-layer nets: Margin maximization and simplicity bias. _Advances in Neural Information Processing Systems_ , 34, 2021. + +- Kaifeng Lyu, Zhiyuan Li, and Sanjeev Arora. Understanding the generalization benefit of normalization layers: Sharpness reduction, 2022. + +- Chao Ma and Lexing Ying. On linear stability of SGD and input-smoothness of neural networks. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 16805–16817. Curran Associates, Inc., 2021. + +- Chao Ma, Daniel Kunin, Lei Wu, and Lexing Ying. Beyond the quadratic approximation: The multiscale structure of neural network loss landscapes. _Journal of Machine Learning_ , 1(3):247– 267, 2022. ISSN 2790-2048. + +- Wei-Chiu Ma, Shenlong Wang, Rui Hu, Yuwen Xiong, and Raquel Urtasun. Deep rigid instance scene flow. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 3614–3622, 2019. + +- Sadhika Malladi, Kaifeng Lyu, Abhishek Panigrahi, and Sanjeev Arora. On the SDEs and scaling rules for adaptive gradient algorithms. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), _Advances in Neural Information Processing Systems_ , 2022. + +- Gideon Mann, Ryan T. McDonald, Mehryar Mohri, Nathan Silberman, and Dan Walker. Efficient large-scale distributed training of conditional maximum entropy models. In _Advances in Neural Information Processing Systems 22_ , pp. 1231–1239, 2009. + +- Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In _Artificial intelligence and statistics_ , pp. 1273–1282. PMLR, 2017. + +- Mor Shpigel Nacson, Suriya Gunasekar, Jason Lee, Nathan Srebro, and Daniel Soudry. Lexicographic and depth-sensitive margins in homogeneous and non-homogeneous deep models. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), _Proceedings of the 36th International Conference on Machine Learning_ , volume 97 of _Proceedings of Machine Learning Research_ , pp. 4683–4692, Long Beach, California, USA, 09–15 Jun 2019. PMLR. + +- Giorgi Nadiradze, Amirmojtaba Sabour, Peter Davies, Shigang Li, and Dan Alistarh. Asynchronous decentralized sgd with quantized and local updates. _Advances in Neural Information Processing Systems_ , 34:6829–6842, 2021. + +- Behnam Neyshabur, Srinadh Bhojanapalli, David Mcallester, and Nati Srebro. Exploring generalization in deep learning. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017. + +- Jose Javier Gonzalez Ortiz, Jonathan Frankle, Mike Rabbat, Ari Morcos, and Nicolas Ballas. Tradeoffs of Local SGD at scale: An empirical study. _arXiv preprint arXiv:2110.08133_ , 2021. + +- Abhishek Panigrahi, Nikunj Saunshi, Kaifeng Lyu, Sobhan Miryoosefi, Sashank Reddi, Satyen Kale, and Sanjiv Kumar. Efficient stagewise pretraining via progressive subnetworks. _arXiv preprint arXiv:2402.05913_ , 2024. + +14 + +- Daniel Povey, Xiaohui Zhang, and Sanjeev Khudanpur. Parallel training of dnns with natural gradient and parameter averaging. _arXiv preprint arXiv:1410.7455_ , 2014. + +- Noam Razin and Nadav Cohen. Implicit regularization in deep learning may not be explainable by norms. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 21174–21187. Curran Associates, Inc., 2020. + +- Noam Razin, Asaf Maman, and Nadav Cohen. Implicit regularization in hierarchical tensor factorization and deep convolutional neural networks. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 18422–18462. PMLR, 17–23 Jul 2022. + +- Sashank J Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Koneˇcn`y, Sanjiv Kumar, and Hugh Brendan McMahan. Adaptive federated optimization. In _International Conference on Learning Representations_ , 2020. + +- Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. _International Journal of Computer Vision (IJCV)_ , 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. + +- Christopher J. Shallue, Jaehoon Lee, Joseph Antognini, Jascha Sohl-Dickstein, Roy Frostig, and George E. Dahl. Measuring the effects of data parallelism on neural network training. _Journal of Machine Learning Research_ , 20(112):1–49, 2019. + +- Shuheng Shen, Yifei Cheng, Jingchang Liu, and Linli Xu. Stl-sgd: Speeding up local sgd with stagewise communication period. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 9576–9584, 2021. + +- Samuel Smith, Erich Elsen, and Soham De. On the generalization benefit of noise in stochastic gradient descent. In Hal Daumé III and Aarti Singh (eds.), _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pp. 9058–9067. PMLR, 13–18 Jul 2020. + +- Samuel L Smith, Benoit Dherin, David Barrett, and Soham De. On the origin of implicit regularization in stochastic gradient descent. In _International Conference on Learning Representations_ , 2021. + +- Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. _Journal of Machine Learning Research_ , 19(70): 1–57, 2018a. + +- Daniel Soudry, Elad Hoffer, and Nathan Srebro. The implicit bias of gradient descent on separable data. In _International Conference on Learning Representations_ , 2018b. + +- Sebastian U Stich. Local SGD converges fast and communicates little. In _International Conference on Learning Representations_ , 2018. + +- Dominik Stöger and Mahdi Soltanolkotabi. Small random initialization is akin to spectral learning: Optimization and generalization guarantees for overparameterized low-rank matrix reconstruction. _Advances in Neural Information Processing Systems_ , 34, 2021. + +- Hang Su and Haoyu Chen. Experiments on parallel training of deep neural network using model averaging. _arXiv preprint arXiv:1507.01239_ , 2015. + +- Hanlin Tang, Shaoduo Gan, Ammar Ahmad Awan, Samyam Rajbhandari, Conglong Li, Xiangru Lian, Ji Liu, Ce Zhang, and Yuxiong He. 1-bit adam: Communication efficient large-scale training with adam’s convergence speed. In _Proceedings of the 38th International Conference on Machine Learning_ , 2021. + +15 + +- Nikhil Vyas, Depen Morwani, Rosie Zhao, Gal Kaplun, Sham Kakade, and Boaz Barak. Beyond implicit bias: The insignificance of SGD noise in online learning. _arXiv preprint arXiv:2306.08590_ , 2023. + +- Jianyu Wang and Gauri Joshi. Adaptive communication strategies to achieve the best error-runtime trade-off in local-update SGD. _Proceedings of Machine Learning and Systems_ , 1:212–229, 2019. + +- Jianyu Wang and Gauri Joshi. Cooperative SGD: A unified framework for the design and analysis of local-update SGD algorithms. _Journal of Machine Learning Research_ , 22(213):1–50, 2021. + +- Jianyu Wang, Vinayak Tantia, Nicolas Ballas, and Michael Rabbat. Slowmo: Improving communication-efficient distributed SGD with slow momentum. In _International Conference on Learning Representations_ , 2019. + +- Runzhe Wang, Sadhika Malladi, Tianhao Wang, Kaifeng Lyu, and Zhiyuan Li. The marginal value of momentum for small learning rate sgd. _arXiv preprint arXiv:2307.15196_ , 2023. + +- Blake Woodworth, Kumar Kshitij Patel, Sebastian Stich, Zhen Dai, Brian Bullins, Brendan Mcmahan, Ohad Shamir, and Nathan Srebro. Is local sgd better than minibatch sgd? In _International Conference on Machine Learning_ , pp. 10334–10343. PMLR, 2020. + +- Mitchell Wortsman, Gabriel Ilharco, Samir Ya Gadre, Rebecca Roelofs, Raphael Gontijo-Lopes, Ari S Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, et al. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In _International Conference on Machine Learning_ , pp. 23965–23998. PMLR, 2022. + +- Mitchell Wortsman, Suchin Gururangan, Shen Li, Ali Farhadi, Ludwig Schmidt, Michael Rabbat, and Ari S. Morcos. lo-fi: distributed fine-tuning without communication. _Transactions on Machine Learning Research_ , 2023. ISSN 2835-8856. + +- Lei Wu, Chao Ma, and Weinan E. How sgd selects the global minima in over-parameterized learning: A dynamical stability perspective. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. CesaBianchi, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 31. Curran Associates, Inc., 2018. + +- Zeke Xie, Issei Sato, and Masashi Sugiyama. A diffusion theory for deep learning dynamics: Stochastic gradient descent exponentially favors flat minima. In _International Conference on Learning Representations_ , 2021. + +- Hang Xu, Wenxuan Zhang, Jiawei Fei, Yuzhe Wu, Tingwen Xie, Jun Huang, Yuchen Xie, Mohamed Elhoseiny, and Panos Kalnis. SLAMB: Accelerated large batch training with sparse communication. In _Proceedings of the 40th International Conference on Machine Learning_ , 2023. + +- Yang You, Zhao Zhang, Cho-Jui Hsieh, James Demmel, and Kurt Keutzer. Imagenet training in minutes. In _Proceedings of the 47th International Conference on Parallel Processing_ , pp. 1–10, 2018. + +- Yang You, Jing Li, Sashank Reddi, Jonathan Hseu, Sanjiv Kumar, Srinadh Bhojanapalli, Xiaodan Song, James Demmel, Kurt Keutzer, and Cho-Jui Hsieh. Large batch optimization for deep learning: Training BERT in 76 minutes. In _International Conference on Learning Representations_ , 2020. + +- Hao Yu, Sen Yang, and Shenghuo Zhu. Parallel restarted SGD with faster convergence and less communication: Demystifying why model averaging works for deep learning. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 33, pp. 5693–5700, 2019. + +- Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In _International Conference on Learning Representations_ , 2017. + +16 + +- Xiaohui Zhang, Jan Trmal, Daniel Povey, and Sanjeev Khudanpur. Improving deep neural network acoustic models using generalized maxout networks. In _2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 215–219, 2014. doi: 10.1109/ICASSP. 2014.6853589. + +- Fan Zhou and Guojing Cong. On the convergence properties of a k-step averaging stochastic gradient descent algorithm for nonconvex optimization. In _Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18_ , pp. 3219–3227. International Joint Conferences on Artificial Intelligence Organization, 7 2018. doi: 10.24963/ijcai.2018/447. URL [URL removed] + +- Tongtian Zhu, Fengxiang He, Kaixuan Chen, Mingli Song, and Dacheng Tao. Decentralized SGD and average-direction SAM are asymptotically equivalent. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _Proceedings of the 40th International Conference on Machine Learning_ , volume 202 of _Proceedings of Machine Learning Research_ , pp. 43005–43036. PMLR, 23–29 Jul 2023. + +- Zhanxing Zhu, Jingfeng Wu, Bing Yu, Lei Wu, and Jinwen Ma. The anisotropic noise in stochastic gradient descent: Its behavior of escaping from sharp minima and regularization effects. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), _Proceedings of the 36th International Conference on Machine Learning_ , volume 97 of _Proceedings of Machine Learning Research_ , pp. 7654–7663. PMLR, 09–15 Jun 2019. + +- Martin Zinkevich, Markus Weimer, Lihong Li, and Alex Smola. Parallelized stochastic gradient descent. In J. Lafferty, C. Williams, J. Shawe-Taylor, R. Zemel, and A. Culotta (eds.), _Advances in Neural Information Processing Systems_ , volume 23. Curran Associates, Inc., 2010. + +17 + +|CONTENTS|CONTENTS|| +|---|---|---| +|**1**|**Introduction**|**1**| +|**2**|**Our Method: Quadratic Synchronization Rule**|**3**| +|**3**|**Theoretical Motivations of Quadratic Synchronization Rule**|**4**| +|**4**|**Experiments**|**6**| +||4.1
QSR Improves Generalization
. . . . . . . . . . . . . . . . . . . . . . . . . . . .|7| +||4.2
QSR Reduces Wall-clock Time . . . . . . . . . . . . . . . . . . . . . . . . . . . .|8| +|**5**|**Discussions and Future Directions**|**9**| +|**A **|**Additional Related Works**|**19**| +|**B**|**PseudoCode**|**21**| +|**C **|**Experimental Details**|**22**| +||C.1
Training Details for ResNet-152 . . . . . . . . . . . . . . . . . . . . . . . . . . .|22| +||C.2
Training Details For ViT-B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|23| +|**D **|**Additional Experiments on ResNet-50**|**24**| +|**E**|**Supplementary Materials for Section 3**|**25**| +||E.1
Missing Defnitions and Assumptions
. . . . . . . . . . . . . . . . . . . . . . . .|25| +||E.2
Proof for Theorem 3.1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|26| +|**F**|**Details for Communication Time Measurement**|**32**| +|**G **|**Discussion on More Aggressive Scalings**|**33**| +|**H **|**Comparison with Local SGD/AdamW + SWAP**|**35**| + +18 + +## A ADDITIONAL RELATED WORKS + +**Advances in local gradient methods.** Local gradient methods are a class of communicationefficient algorithms for distributed training. In this approach, workers update their models locally and average the model parameters every time they finish _H_ steps of updates. Dating back to Mann et al. (2009) and Zinkevich et al. (2010), local gradient methods have been widely used to improve communication efficiency in both datacenter distributed training Zhang et al. (2014); Povey et al. (2014); Su & Chen (2015); Chen & Huo (2016) and Federated Learning (Kairouz et al., 2021; McMahan et al., 2017; Li et al., 2019b; Koneˇcn`y et al., 2016). Many variants have been proposed to facilitate the convergence speed. Examples include using control variates (Karimireddy et al., 2020), adding proximal terms to local loss functions (Li et al., 2020b), and applying adaptivity on top of each communication round (Wang et al., 2019; Reddi et al., 2020). Local gradient methods can also be readily combined with orthogonal approaches like communication compression (Basu et al., 2019) and asynchronous updates (Nadiradze et al., 2021) for further communication cost reduction. + +**Optimization perspectives on selecting** _H_ **.** Extensive prior research has been devoted to optimizing the selection of the synchronization period _H_ from an optimization perspective. The conventional approach sets _H_ as a constant throughout training. In this setup, a series of studies (e.g.,Khaled et al. (2020); Stich (2018); Haddadpour et al. (2019); Yu et al. (2019)) established convergence bounds for the training loss, which typically degrade as _H_ gets larger. leading to a trade-off between communication efficiency and model accuracy. Drawing upon these theoretical results, _H_ should be set as the smallest value that reduces the communication cost to an acceptable level to minimize the negative impact on optimization. To better trade-off between optimization and generalization, researchers introduced various adaptive communication strategies. Kamp et al. (2014) designed a synchronization protocol controlled by the variance in model parameters. Haddadpour et al. (2019) suggested linearly increasing _H_ as the iteration goes on. Shen et al. (2021) introduced a stagewise communication scheme that halves the learning rate _η_ while doubles _H_ every time the training has finished a predefined stage. Aimed at optimizing the convergence of training loss with respect to wall-clock time, Wang & Joshi (2019) proposed a strategy that starts with infrequent communication and gradually decreases _H_ as training progresses. Nonetheless, the effectiveness of these adaptive communication strategies has only been empirically validated on linear models or small-scale datasets like CIFAR-10/100. + +**Generalization perspectives on selecting** _H_ **.** While a larger _H_ usually hurts optimization, it can sometimes improve generalization. Apart from Lin et al. (2020) that has been discussed in detail in Section 1, similar observations have been reported by Gupta et al. (2020) and Wortsman et al. (2023). Specifically, Gupta et al. (2020) introduced the Stochastic Weight Averaging in Parallel (SWAP) algorithm, which runs parallel SGD until a target training accuracy, then lets workers perform local updates with a final model averaging. Their empirical results validate SWAP’s superior generalization performance over parallel SGD. When using LAMB (You et al., 2020) as the optimizer, Wortsman et al. (2023) find that complete local fine-tuning, followed by a single model averaging in the end (equivalent to setting _H_ as the total number of iterations), outperforms the standard parallel LAMB in test accuracy under distribution shifts. Another relevant method is the “model soup” (Wortsman et al., 2022), which averages multiple models fine-tuned with different hyperparameters and turns out to beat the single model in test accuracy. Our paper focuses on designing the synchronization scheme best for generalization. + +**Implicit bias of optimizers.** The success of deep learning lies in its remarkable ability to generalize to unseen data, though it possesses the capacity to fit randomly labeled data (Zhang et al., 2017). A significant contributing factor to this success is the implicit bias inherent in popular optimizers like Gradient Descent (GD) and Stochastic Gradient Descent (SGD). Specifically, these optimizers favor minima that exhibit good generalization, without explicitly encoding such bias into the training loss. A lot of studies have been devoted to characterizing this implicit bias, some through the lens of margin maximization (Soudry et al., 2018b;a; Lyu & Li, 2020; Ji & Telgarsky, 2020; Chizat & Bach, 2020; Nacson et al., 2019), and some others focus on the simplicity bias from small initialization (Li et al., 2018; Razin & Cohen, 2020; Arora et al., 2019; Li et al., 2021a; Lyu et al., 2021; Razin et al., 2022; Stöger & Soltanolkotabi, 2021; Ge et al., 2021; Jin et al., 2023). The line of work most closely related to our paper interprets the implicit bias via sharpness reduction. The connection between flatter minima and better generalization is a commonly held belief that has + +19 + +been investigated both theoretically (Hochreiter & Schmidhuber, 1997; Neyshabur et al., 2017) and empirically (Keskar et al., 2017a; Jiang et al., 2020). Drawing on this insight, Foret et al. (2021a) introduced SAM optimizer, which delivers superior generalization performance by explicitly penalizing sharpness. Recent theoretical studies (Arora et al., 2022; Lyu et al., 2022; Damian et al., 2023; Ma et al., 2022) elucidate that GD inherently biases towards flatter regions on the loss landscape. Specifically, under some regularity conditions, they show that GD will eventually enter the “Edge of Stability”(Cohen et al., 2020), where the maximum eigenvalue of the loss Hessian stays around 2/learning rate, and then constantly moves towards flatter minima. Going beyond GD, another line of work studies how gradient noise in SGD helps reduce sharpness. Wu et al. (2018); Hu et al. (2017); Ma & Ying (2021) showed that gradient noise can cause training instability around sharp minima, and hence, the iterate can only settle around flat minima. Kleinberg et al. (2018); Zhu et al. (2019); Xie et al. (2021); Ibayashi & Imaizumi (2021) analyzed the escaping behavior of SGD from sharp minima. Motivated by recent empirical observations that low-loss solutions on the loss landscape are path-connected (Garipov et al., 2018; Draxler et al., 2018; Frankle et al., 2020) rather than isolated, Blanc et al. (2020); Damian et al. (2021); Li et al. (2021c) assume the existence of a minimizer manifold and show that gradient noise provably drives the iterate towards flatter minima on this manifold. Cowsik et al. (2022); Wang et al. (2023) discuss how momentum preserves or strengthens this effect. Also through the lens of sharpness reduction, the recent work by Gu et al. (2023) explains the generalization benefit of Local SGD, as discussed in Section 3. Zhu et al. (2023) elucidate that a similar implicit bias also manifests in decentralized training by making connections to certain variants of SAM. + +20 + +B PSEUDOCODE + +We present the pseudocodes for standard data parallel methods and local gradient methods below. + +**Algorithm 1:** Parallel OPT: Data Parallel Methods on _K_ Workers + +**1 Input** : loss function _ℓ_ ( _**θ**_ ; _ξ_ ), initial parameter _**θ**_[(0)] + +**2 Hyperparameters** : total number of iterations _T_ + +**3 Hyperparameters** : learning rate schedule _ηt_ , _t ∈{_ 0 _, · · · , T }_ , local batch size _B_ loc + +**4** _t ←_ 0 ; // initialize the global iteration number **5 for** _t_ = 0 _, . . . , R −_ 1 **do 6 for** _each worker k_ **do in parallel 7** ( _ξk,t,_[(] _[s]_[)] 1 _[, . . . , ξ] k,t,B_[(] _[s]_[)] loc[)] _[ ←]_[Sample()][ ;] // sample a local batch 1 _B_ loc **8** _**g** k_[(] _[t]_[)] _← B_ loc � _i_ =1 _[∇][ℓ]_[(] _**[θ]**_[(] _[t]_[)][;] _[ ξ] k,i_[(] _[t]_[)][)][ ;] // computing the local gradient **9 end** _K_ **10** _**g**_[(] _[t]_[)] _← K_[1] � _k_ =1 _**[g]** k_[(] _[t]_[)] ; // All-Reduce aggregation of local gradients **11** _**θ**_[(] _[t]_[+1)] _←_ OPT( _**θ**_[(] _[t]_[)] _, ηt,_ _**g**_[(] _[t]_[)] ) ; // update the model with optimizer OPT **12 end** + +**Algorithm 2:** Local OPT: Local Gradient Methods on _K_ Workers + +**1 Input** : loss function _ℓ_ ( _**θ**_ ; _ξ_ ), initial parameter _**θ**_[¯][(0)] + +**2 Hyperparameters** : total number of rounds _R_ + +**3 Hyperparameters** : learning rate schedule _ηt_ , _t ∈{_ 0 _, · · · , T }_ , local batch size _B_ loc + +**4** _t ←_ 0 ; // initialize the global iteration number **5 for** _s_ = 0 _, . . . , R −_ 1 **do 6** _H_[(] _[s]_[)] _←_ GetH( _s_ ) ; // get synchronization period for the current round **7 for** _each worker k_ **do in parallel 8** _**θ** k,_[(] _[s]_ 0[)] _[←]_ _**[θ]**_[¯][(0)][;] // maintain a local copy of the global model parameter **9 for** _h_ = 0 _, . . . , H_[(] _[s]_[)] _−_ 1 **do 10** ( _ξk,h,_[(] _[s]_[)] 1 _[, . . . , ξ] k,h,B_[(] _[s]_[)] loc[)] _[ ←]_[Sample()][ ;] // sample a local batch 1 _B_ loc **11** _**g** k,h_[(] _[s]_[)] _[←] B_ loc � _i_ =1 _[∇][ℓ]_[(] _**[θ]** k,h_[(] _[s]_[)][;] _[ ξ] k,h,i_[(] _[s]_[)][)][ ;] // computing the local gradient **12** _**θ** k,h_[(] _[s]_[)] +1 _[←]_[OPT][(] _**[θ]** k,h_[(] _[s]_[)] _[, η][t]_[+] _[h][,]_ _**[ g]** k,h_[(] _[s]_[)][)][ ;] // update the local model with optimizer OPT **13 end 14 end** ¯ _K_ **15** _**θ**_[(] _[s]_[+1)] _← K_[1] � _k_ =1 _**[θ]** k,H_[(] _[s]_[)][(] _[s]_[)][;] // All-Reduce aggregation of local model parameters **16** _t ← t_ + _H_[(] _[s]_[)] ; // update the global iteration number **17 end** + +**Sampling local batches.** In Algorithms 1 and 2, Sample() returns a local batch for each worker. In our experiments, local batches are sampled without replacement at each epoch, which is standard for distributed training (Goyal et al., 2017; Lin et al., 2020; Ortiz et al., 2021). More specifically, at the beginning of each epoch, all the workers use the same random seed to draw a shared random permutation of train data points, and partition the data points evenly among the _K_ workers. Then at each local step of each worker, Sample() sequentially takes samples from its own partition. Once there are too few remaining samples to form a complete batch, a new permutation is sampled and a new epoch starts. For our theoretical analysis, following Gu et al. (2023), we assume Sample() takes samples with replacement, i.e., the _K_ workers are taking i.i.d. samples from the globally shared dataset/distribution. See Appendix B in Gu et al. (2023) for pseudocodes of sampling with and without replacement. + +21 + +**Setting synchronization periods.** In Algorithm 2, GetH( _s_ ) is a function that returns the synchronization period _H_[(] _[s]_[)] for the current round. Conventionally, _H_[(] _[s]_[)] is chosen as a fixed value, so GetH( _s_ ) always returns a constant. In this paper, we study how _H_[(] _[s]_[)] should change as training goes on, e.g., in QSR, GetH( _s_ ) works as specified in Section 2. + +## C EXPERIMENTAL DETAILS + +This section lists the additional experimental details omitted in the main text. + +**Software and platform.** We use Pytorch Distributed with NCCL backend to support multinode distributed training and use FFCV (Leclerc et al., 2022) to accelerate data loading of ImageNet. + +**Sampling scheme.** We employ the “sampling without replacement” scheme, as described in Appendix B. + +## C.1 TRAINING DETAILS FOR RESNET-152 + +**==> picture [179 x 114] intentionally omitted <==** + +**----- Start of picture text -----**
+0 . 0075 cosine decay
step decay
linear decay
0 . 0050
0 . 0025
0 . 0000
0 100 200 300
Epochs
Rate
Learning
**----- End of picture text -----**
+ +Figure 4: A visualization of the learning rate schedules we investigate. + +We generally follow the recipe in Foret et al. (2021b) to train ResNet-152. Specifically, we set the momentum as 0 _._ 9 and the weight decay _λ_ as 0 _._ 0001. For data augmentation, we employ random resized crop and random horizontal flip. We additionally use label smoothing 0 _._ 1. We adopt a local batch size _B_ loc = 256 through 8 gradient accumulations. Therefore, the batch size for BatchNorm is 32. This choice stems from our observation that a smaller batch size for BatchNorm enhances the test accuracy of parallel SGD. Since the BatchNorm statistics on each worker are estimated on the local model parameter, we pass 100 batches, each of size 32, to estimate the BatchNorm statistics on the global parameter before evaluation. + +**Training details for batch size 4096.** We search the optimal peak learning rate _η_ max of the cosine learning rate schedule among _{_ 0 _._ 4 _,_ 0 _._ 8 _,_ 1 _._ 6 _}_ for all baseline algorithms, i.e., parallel SGD and Local SGD with constant synchronization period _H_ = 2 and _H_ = 4. The learning rate yielding the highest final test accuracy is selected. We find that _η_ max = 0 _._ 8 is optimal for all the baseline algorithms. For QSR with _H_ base = 2 and _H_ base = 4, we directly set _η_ max = 0 _._ 8. We search _α_ among _{_ 0 _._ 2 _,_ 0 _._ 25 _,_ 0 _._ 3 _}_ , and choose _α_ = 0 _._ 2 and 0 _._ 25 for QSR with _H_ base = 2 and 4 respectively. Regarding other communication strategies in Figure 1(a), we set the switching point at epoch 100 and employ _H_ = 8 for Post-local SGD. For _H_ = _β/η_ , we search _β_ among _{_ 0 _._ 6 _,_ 0 _._ 8 _,_ 1 _,_ 1 _._ 2 _}_ , finally selecting _β_ = 1. + +**Training details for batch size 16384.** The hyperparameter tuning procedure for _B_ = 16384 is similar to that of _B_ = 4096. We search _η_ max among _{_ 0 _._ 8 _,_ 1 _._ 6 _,_ 3 _._ 2 _}_ for all baseline algorithms, including SGD and Local SGD with constant synchronization period _H_ base = 2 and _H_ base = 4. We find that _η_ max = 3 _._ 2 yields the highest final test accuracy for all of them. However, for QSR, we find that peak learning rate _η_ max = 3 _._ 2 is excessively large, causing the dynamic scheduling to be triggered too late in the training process. This late triggering leaves insufficient training time for the training to fully leverage the generalization benefits introduced by local steps. Consequently, we set _η_ max = 1 _._ 6 for QSR with _H_ base = 2 and 4. We search _α_ among _{_ 0 _._ 2 _,_ 0 _._ 25 _,_ 0 _._ 3 _}_ , and choose _α_ = 0 _._ 2 for both QSR with _H_ base = 2 and 4. + +**Training details for the step decay scheduler.** In our experiments with step decay, we employ a batch size of 4096. Given that our step decay scheduler is derived from the cosine decay, we only need to specify the weight decay _λ_ , and peak learning rate _η_ max. These are set identically to the values used in our cosine decay experiments. For QSR, we search the growth coefficient _α_ among _{_ 0 _._ 2 _,_ 0 _._ 3 _}_ and choose 0 _._ 2 for both _H_ base = 2 and 4. + +**Training details for experiments in Appendix H.** For Local SGD + SWAP experiments in Appendix H, we use the cosine learning rate schedule with peak learning rate _η_ max = 0 _._ 8. We start with Local SGD with a constant synchronization period _H_ = 4 and explore the switching point _t_ 0 from _{_ 175 _,_ 180 _,_ 185 _,_ 190 _}_ . + +22 + +## C.2 TRAINING DETAILS FOR VIT-B + +For training ViT-B, we primarily follow the 300epoch recipe proposed by Beyer et al. (2022). Specifically, we replace the [cls] token of the original ViT token with global average pooling and use fixed 2D sin-cos position rather than learned positional embeddings. Our implementation of the model architecture follows the high-starred repository[2] by Phil Wang. Apart from random resized crop and random horizontal flip, we employ RandAugment with parameters (2, 10) and MixUp with a coefficient of 0.2 for data augmentation. Different from Beyer et al. (2022), we use a larger batch size ( _B_ = 4096 or 16384 as opposed to their 1024) and use AdamW instead of Adam. + +As for gradient clipping, we set it as 1 for standard AdamW following Beyer et al. (2022); Dosovitskiy et al. (2021) and Chen et al. (2021). However, for Local AdamW, the smaller batch size locally leads to larger gradient noise and, hence larger gradient norm for local updates. This calls for an increase in the gradient clipping threshold. We find that the + +**==> picture [179 x 114] intentionally omitted <==** + +**----- Start of picture text -----**
+10 [4]
H Schedule and Communcation Volume
Constant Period, 25%
10 [3] QSR, 10.4%
10 [2]
10 [1]
0 100 200 300
Epochs
scale)
log
(
H
**----- End of picture text -----**
+ +Figure 5: A visualization of the _H_ schedule for Local AdamW with a constant synchronization period _H_ = 4 and with QSR _H_ base = 4 _, α_ = 0 _._ 0175. The corresponding learning rate schedule is cosine decay with a peak learning rate of 0 _._ 008. Adopting QSR improves the top-1 validation accuracy of Local AdamW on ViT-B from 79 _._ 32% to 80 _._ 98%.. + +training process remains stable even when we remove gradient clipping (equivalent to setting the clipping threshold to + _∞_ ) for most of the hyperparameter configurations we tested. For ease of tuning, we choose to turn off gradient clipping for Local AdamW unless otherwise stated. + +**Training details for batch size 4096.** We use 10k iterations for learning rate warmup following (Beyer et al., 2022; Dosovitskiy et al., 2021; Chen et al., 2021). For parallel AdamW and Local AdamW ( _H_ = 4), we explore combinations of _η_ max and weight decay _λ_ from the grid _{_ 0 _._ 05 _,_ 0 _._ 1 _}× {_ 0 _._ 004 _,_ 0 _._ 008 _,_ 0 _._ 016 _}_ . To optimize the final test accuracy, we select _η_ max = 0 _._ 008 _, λ_ = 0 _._ 1 for parallel AdamW and _η_ max = 0 _._ 008 _, λ_ = 0 _._ 05 for Local AdamW ( _H_ = 4). For Local AdamW ( _H_ = 8), keeping _λ_ = 0 _._ 05, we conduct a grid search for _η_ max among _{_ 0 _._ 004 _,_ 0 _._ 008 _,_ 0 _._ 016 _}_ and choose _η_ max = 0 _._ 008. For QSR with _H_ base = 4 and 8, we directly use _η_ max = 0 _._ 008 and _λ_ = 0 _._ 05. To optimize _α_ , we search among _{_ 0 _._ 015 _,_ 0 _._ 0175 _,_ 0 _._ 02 _}_ and find _α_ = 0 _._ 0175 works best for both QSR with _H_ base = 4 and 8. Regarding the communication strategy of _H_ = _β/η_ in Figure 1(b), we explore _β_ among _{_ 0 _._ 025 _,_ 0 _._ 03 _,_ 0 _._ 035 _,_ 0 _._ 04 _}_ , settling on _β_ = 0 _._ 03. In Figure 5, we also visualize the _H_ schedule for Local AdamW with a constant synchronization period and with QSR. + +**Training details for batch size 16384.** To keep the same portion of the total budget for learning rate warmup as _B_ = 4096, we set the warmup iterations to 2.5k. We set _λ_ as 0 _._ 1 and 0 _._ 05 for parallel AdamW and Local AdamW, respectively. We search for the optimal _η_ max among _{_ 0 _._ 004 _,_ 0 _._ 008 _,_ 0 _._ 016 _}_ and select _η_ max = 0 _._ 004 for parallel AdamW, _η_ max = 0 _._ 016 for Local AdamW with _H_ = 4 and 8. We adopt the same _λ_ and _η_ max as Local AdamW for QSR. For QSR with _H_ base = 4, we search for the optimal _α_ among _{_ 0 _._ 015 _,_ 0 _._ 0175 _,_ 0 _._ 02 _}_ and choose _α_ = 0 _._ 0175. For QSR with _H_ base = 8, we search for the optimal _α_ among _{_ 0 _._ 01 _,_ 0 _._ 0175 _}_ , finally picking _α_ = 0 _._ 01. + +**Training details for linear and step decay schedulers.** For both step and linear decay schedulers, we employ a batch size of 4096. For the step decay scheduler, the peak learning rate _η_ max and weight decay _λ_ are set identically to the values used in our cosine decay experiments. We search the growth coefficient _α_ for QSR among _{_ 0 _._ 015 _,_ 0 _._ 0175 _}_ and choose 0 _._ 015 for both _H_ base = 4 and 8. For linear decay, we use the same weight decay as our cosine decay experiments. We explore _η_ max values from _{_ 0 _._ 004 _,_ 0 _._ 008 _,_ 0 _._ 016 _}_ for baselines, finally picking _η_ max = 0 _._ 008 for parallel AdamW and _η_ max = 0 _._ 016 for Local AdamW. For QSR, we adopt the same _η_ max and _α_ as in our cosine decay experiments. Additionally, we add a gradient clipping threshold of 4 for Local AdamW with a constant synchronization period to stabilize training. + +> 2[URL removed] + +23 + +**Training details for experiments in Appendix G.** For the experiments in Table 6, we employ the same weight decay _λ_ and peak learning rate _η_ max as used in the cosine schedule. Specifically, we set _λ_ = 0 _._ 1 _, η_ max = 0 _._ 008 for parallel AdamW and _λ_ = 0 _._ 05 _, η_ max = 0 _._ 008 for Local AdamW. In Table 6(a), for the cubic rule, we search _ρ_ among _{_ 0 _._ 0025 _,_ 0 _._ 005 _,_ 0075 _,_ 0 _._ 01 _}_ and opt for _ρ_ = 0 _._ 0075, which gives the highest test accuracy. For QSR, we adopt the same _α_ value, 0.0175, as in our cosine decay experiments. In Table 6(b), we set _ρ_ = 0 _._ 0075 and _α_ = 0 _._ 0175 for the cubic rule and QSR, respectively, which are optimal for the original cosine decay schedule, as indicated by Figure 6. As mentioned in Section 2, the final synchronization period may be truncated. Specifically, workers are forced to synchronize at the last iteration if the last synchronization period exceeds the remaining iterations. However, the modified cosine schedule experiments seek to validate that the cubic rule can produce an overly large _H_ when the learning rate is constant. To prevent the truncation from distorting the results, we present the test accuracy at the conclusion of the last full synchronization period, which is not truncated, for both scalings. + +**Training details for experiments in Appendix H.** For Local AdamW + SWAP experiments in Figure 9(b), we use the cosine learning rate schedule with peak learning rate _η_ max = 0 _._ 008 and weight decay _λ_ = 0 _._ 05. We start with Local AdamW with a constant synchronization period _H_ = 4 and explore the switching point _t_ 0 from _{_ 220 _,_ 240 _,_ 260 _,_ 280 _}_ . + +## D ADDITIONAL EXPERIMENTS ON RESNET-50 + +Our paper primarily focuses on training relatively large models with long horizons and proposes QSR to effectively improve the generalization while saving communication. However, on the flip side, QSR may not always yield noticeable generalization benefits for smaller models trained with shorter horizons. As shown in Table 5, for the 90-epoch training of ResNet-50 with cosine learning rate decay, the generalization benefit of QSR over Local SGD with a constant communication period is negligible. Nonetheless, training in this regime is not costly, either, making it less of a critical concern. Specifically, completing this 90-epoch training of ResNet-50 requires only 6.6 hours on a single machine equipped with 8 NVIDIA GeForce RTX 3090 GPUs. In comparison, the 300-epoch training of ViT investigated in the main text necessitates over 50 hours on the same setup. + +Table 5: QSR does not yield noticeable improvement in test accuracy for the 90-epoch training of ResNet-50. + +|Method|Val. Acc. (%)| +|---|---| +|Parallel SGD|76.84| +|Local SGD (_H_ = 2)|76.60| +|+QSR (_H_base = 2)|76.65| + +24 + +## E SUPPLEMENTARY MATERIALS FOR SECTION 3 + +## E.1 MISSING DEFINITIONS AND ASSUMPTIONS + +For a function _F_ : R _[d] →_ R _[d]_ , we use _∂F_ ( _**θ**_ ) to denote its Jacobian at _**θ**_ and use _∂_[2] _F_ ( _**θ**_ ) to denote the second order derivative at _**θ**_ . For any matrix _**M** ∈_ R _[d][×][d]_ , _∂_[2] _F_ ( _**θ**_ )[ _**M**_ ] =[�] _i∈_ [ _d_ ] _[⟨][∂] ∂_[2] _**θ**[F]_[2] _[i][,]_ _**[ M]**[⟩]_ _**[e]**[i]_ where _**e** i_ is the _i_ -th vector of the standard basis. For convenience, we write _∂_[2] ( _∇L_ )( _**θ**_ )[ _**M**_ ] as _∇_[3] _L_ ( _**θ**_ )[ _**M**_ ]. + +**Assumption E.1.** _Following Gu et al. (2023), we assume that L_ ( _**θ**_ ) _and_ **Σ** ( _**θ**_ )[1] _[/]_[2] _are C[∞] -smooth on_ R _[d] . We also assume that ∥∇ℓ_ ( _**θ**_ ; _ξ_ ) _∥_ 2 _is uniformly bounded for all_ _**θ** and ξ._ + +**Assumption E.2.** Γ _is a C[∞] -smooth,_ ( _d − m_ ) _-dimensional compact submanifold of_ R _[d] such that any_ _**ζ** ∈_ Γ _is a local minimizer of L and_ rank( _∇_[2] _L_ ( _**ζ**_ )) = _m. Additionally, there exists an open neighborhood U of_ Γ _such that_ Γ = argmin _**θ** ∈U L_ ( _**θ**_ ) _._ + +Assumption E.2 is motivated by recent empirical observations that low-loss solutions on the loss landscape are not isolated but path-connected (Garipov et al., 2018; Draxler et al., 2018; Frankle et al., 2020). It is also adopted by Li et al. (2021c); Lyu et al. (2022); Gu et al. (2023). + +**Definition E.1** (Gradient Flow Projection) **.** _Fix_ _**θ**_ null _∈/_ Γ _. For_ _**x** ∈_ R _[d] , the gradient flow starting from_ _**x** is the solution to_[d] _**[x]**_ d[(] _t[t]_[)] = _−∇L_ ( _**x**_ ( _t_ )) _with the initial condition_ _**x**_ (0) = _**x** . The gradient flow projection of_ _**x** is defined as_ Φ( _**x**_ ) := lim _t→_ + _∞_ _**x**_ ( _t_ ) _if the limit exists and belongs to_ Γ _. Otherwise,_ Φ( _**x**_ ) := _**θ**_ null _._ + +**Definition E.2** (Slow SDE for SGD, formal) **.** _Given_ _**ζ**_ 0 _∈_ Γ _, define_ _**ζ**_ ( _t_ ) _as the solution to the following SDE with initial condition_ _**ζ**_ (0) = _**ζ**_ 0 _:_ + +**==> picture [314 x 33] intentionally omitted <==** + +_Here, for any_ _**ζ** ∈_ Γ _, P_ _**ζ** is a projection operator that maps any differential form_ _**A**_ d _**W** t_ + _**b**_ d _t in Itô calculus to ∂_ Φ( _**ζ**_ ) _**A**_ d _**W** t_ + � _∂_ Φ( _**ζ**_ ) _**b**_ +[1] 2 _[∂]_[2][Φ(] _**[ζ]**_[)[] _**[AA]**[⊤]_[]] � _, which guarantees_ _**ζ** to remain on the manifold after taking such an infinitesimal step. B is the total batch size._ **Σ** _∥_ ( _**ζ**_ ) := _∂_ Φ( _**ζ**_ ) **Σ** ( _**ζ**_ ) _∂_ Φ( _**ζ**_ ) _is the covariance matrix of gradient noise projected onto the tangent space of_ _**ζ** at_ Γ _, and_ **Σ**[�] ♢( _**ζ**_ ) _is the noise covariance in the rest, with coordinates rescaled in the eigenbasis {_ ( _λi,_ _**v** i_ ) _}[d] i_ =1 _[of][ ∇]_[2] _[L]_[(] _**[ζ]**_[)] _[:]_ + +**==> picture [272 x 17] intentionally omitted <==** + +**Definition E.3** (Slow SDE for Local SGD with _H ∼ η[−]_[1] , formal) **.** _Consider the scaling H_ = _β/η for some constant β. Given_ _**ζ**_ 0 _∈_ Γ _, define_ _**ζ**_ ( _t_ ) _as the solution to the following SDE with initial condition_ _**ζ**_ (0) = _**ζ**_ 0 _:_ + +**==> picture [373 x 33] intentionally omitted <==** + +_where_ � _K is the number of workers, B,_ **Σ** _∥_ ( _**ζ**_ ) _and_ **Σ**[�] ♢( _**ζ**_ ) _are the same as in Definition 3.1. Here,_ **Ψ** ( _**ζ**_ ; _β_ ) _is a PSD matrix depending on gradient noise and Hessian defined as follows:_ + +**==> picture [332 x 17] intentionally omitted <==** + +_where {_ _**v** i}[d] i_ =1 _[is][a][set][of][eigenvectors][of][∇]_[2] _[L]_[(] _**[ζ]**_[)] _[that][forms][an][orthonormal][eigenbasis,][and] λ_ 1 _, . . . , λd are the corresponding eigenvalues. Additionally, ψ_ ( _x_ ) := _e[−][x] −x_ 1+ _x for x_ = 0 _and ψ_ (0) = 0 _._ + +Notice that _ψ_ ( _x_ ) monotonically increases in _x_ and has the limit lim _x→_ 0 _ψ_ ( _x_ ) = 0 and lim _x→∞ ψ_ ( _x_ ) = 1. Therefore, given _**ζ**_ , **Ψ**[�] ( _**ζ**_ ; _β_ ) is a monotonically increasing function of _β_ in the eigenspace of the Hessian matrix _∇_[2] _L_ ( _**ζ**_ ). + +25 + +## E.2 PROOF FOR THEOREM 3.1 + +We consider the asymptotics that _η →_ 0 _, α →_ 0 and _α_ = Ω( _η[γ]_ ) for all _γ >_ 0. We use big- _O_ notation to hide constants independent of _η, α_ , and use big- _O_[˜] notations to hides constants independent _T_ of _η, α_ and also polylog factors of _η, α_ . We define _**ϕ**_[(] _[s]_[)] := Φ( _**θ**_[¯][(] _[s]_[)] ) and let _R_ tot := _⌊ Hη_[2] _[⌋]_[=] _[ ⌊] α[T]_[2] _[⌋]_ be the total number of rounds. + +**Proof outline.** The general framework of our proof follows (Li et al., 2019a) which demonstrates the close tracking between SGD iterates and the conventional SDE by examining the moments of parameter changes over a small observation interval _η_ . However, their analysis is not directly applicable to our case. Their SDE approximation is only valid for _O_ ( _η[−]_[1] ) steps while our QSR involves multiple communication rounds, each containing _O_ ( _η[−]_[2] ) steps. To tackle this challenge, we treat each round as a continuous-time observation interval of length _α_[2] , and then establish that the moments of changes in the manifold projection of Local SGD and the corresponding slow SDE (5), specifically the moments of _**ϕ**_[(] _[s]_[+1)] _−_ _**ϕ**_[(] _[s]_[)] and _**ζ**_ (( _s_ + 1) _α_[2] ) _−_ _**ζ**_ ( _sα_[2] ), are closely aligned. + +Notably, though the results in (Gu et al., 2023) serve as a building block to compute the moments of _**ϕ**_[(] _[s]_[+1)] _−_ _**ϕ**_[(] _[s]_[)] in Lemmas E.1 to E.3, their analysis is not trivially extendable to QSR. This is because their analysis depends on the condition _Hη_ = _O_ (1), and many bounds therein explode as _Hη →∞_ , e.g., Theorem 3.3, Lemmas I.14 and I.16 therein. In the context of QSR, where _Hη_ = _[α] η_[2] goes to infinity as _η_ approaches 0, the condition _Hη_ = _O_ (1) is violated, rendering the analysis in Gu et al. (2023) ineffective for QSR. + +In the following lemma, we present equivalent forms of (3), (4) and (5) that are less intuitive but more friendly to mathematical analysis. + +**Theorem E.1.** _Equations_ (3) _,_ (4) _,_ (5) _can be rewritten as the following SDEs, respectively:_ + +**==> picture [350 x 77] intentionally omitted <==** + +_Proof._ Directly apply Lemmas I.1 to I.5 of Gu et al. (2023), and we have this theorem. + +Based on Gu et al. (2023)’s analysis, below we compute the moments of _**ϕ**_[(] _[s]_[+1)] _−_ _**ϕ**_[(] _[s]_[)] through a series of lemmas. Then, we follow Gu et al. (2023)’s method of moments to derive the SDE approximation. + +**Lemma E.1.** _For any round s ≤ R_ tot _and any worker k ∈_ [ _K_ ] _, if_ _**ϕ**_[(] _[s]_[)] _∈_ Γ _, then it holds with probability at least_ 1 _− δ, where δ_ = _O_ (poly( _η_ )) _, that_ Φ( _**θ** k,H_[(] _[s]_[)][)] _[∈]_[Γ] _[ and][ ∥]_ _**[θ]** k,H_[(] _[s]_[)] _[−]_[Φ(] _**[θ]** k,H_[(] _[s]_[)][)] _[∥]_[2][=] _O_ ( ~~�~~ _η_ log _ηδ_[1][)] _[.]_ + +_Proof._ The key insight is that the dynamics of each worker before averaging in each round is just the standard SGD with a smaller batch size, _B_ loc. Since the distance bound to Γ, Theorem 3.3 in Gu et al. (2023), also applies to SGD by taking _K[′]_ = 1 and _H[′]_ = _η_[1][, we can apply this result to obtain] + +that _∥_ _**θ** k,H_[(] _[s]_[)] _[−]_[Φ(] _**[θ]** k,H_[(] _[s]_[)][)] _[∥]_[2][=] _[ O]_[(] � _η_ log _ηδ_[1][)][.] + +Before computing the moments of the change in manifold projection for each worker Φ( _**θ** k,H_[(] _[s]_[)][)] _[ −]_ _**ϕ**_[(] _[s]_[)] , we introduce Preliminary Lemmas E.1 and E.2. Specifically, the Itô-Taylor expansion lemma E.1 is a straightforward application of Lemma B.7 of (Malladi et al., 2022) on a bounded set. Preliminary Lemma E.2 is adapted from Lemma 26 of (Li et al., 2019a). + +26 + +Let _**X**_ ( _t_ ) be the solution to the SDE d _**X**_ ( _t_ ) = _**b**_ ( _**X**_ ( _t_ ))d _t_ + _**σ**_ ( _**X**_ ( _t_ ))d _**W** t_ , where _**b**_ ( _·_ ) : R _[d] →_ R _[d]_ is the drift function and _**σ**_ ( _·_ ) : R _[d] →_ R _[d][×][d]_ is the diffusion matrix. Both _**b**_ ( _·_ ) and _**σ**_ ( _·_ ) belong to _C_[4] . Let _S_ be a bounded invariant set of the SDE. That is, if _**X**_ (0) _∈S_ , for any _t ≥_ 0, _**X**_ ( _t_ ) _∈S_ almost surely. Let _η_ e be the “effective learning rate”, which can be viewed as the length of the continuous-time observation interval for _**X**_ ( _t_ ). Then we have the following lemma. + +**Preliminary Lemma E.1** (Itô-Taylor expansion) **.** _Let g_ : R _[d] →_ R _be any C_[4] _-smooth function. Define_ + +**==> picture [347 x 37] intentionally omitted <==** + +_Given_ _**X**_ ( _t_ ) = _**x** ∈S, there exists a constant C independent of ηe such that_ + +**==> picture [185 x 12] intentionally omitted <==** + +_Proof._ WLOG, we prove the case for _t_ = 0. Due to the Markovian property of Itô processes, the same proof can be done for any _t >_ 0 by a time shift. Give _**X**_ (0) = _**x** ∈S_ , by Itô’s lemma, + +**==> picture [272 x 25] intentionally omitted <==** + +where Λ( _**x**_ ) := _**σ**_ ( _**x**_ ) _[⊤] ∇g_ ( _**x**_ ). + +Further apply Itô’s lemma to _Ag_ ( _**X**_ ( _s_ )) and we have + +**==> picture [358 x 106] intentionally omitted <==** + +Take expectation on both sides, and the last two terms become zero: + +**==> picture [248 x 24] intentionally omitted <==** + +Since _**X**_ ( _s_ ) belongs to the bounded set _S_ , there exists a constant _C_ independent of _η_ e such that _|A_[2] _g_ ( _**y**_ ) _| ≤ C_ for all _**y** ∈S_ . Therefore, + +**==> picture [172 x 12] intentionally omitted <==** + +**Preliminary Lemma E.2** (Adaptation of Lemma 26 in (Li et al., 2019a)) **.** _Given_ _**X**_ ( _t_ ) = _**x** ∈S, denote the change in_ _**X**_ ( _s_ ) _over time interval η_ e _as_ **∆**[˜] ( _**x** , t, η_ e) := _**X**_ ( _t_ + _η_ e) _−_ _**x** . Then, for all_ _**x** ∈S and t ≥_ 0 _, there exists a constant C[′] independent of η_ e _such that_ + +**==> picture [242 x 31] intentionally omitted <==** + +_where n ≥_ 1 _._ + +_Proof._ WLOG, we prove the case for _t_ = 0. Due to the Markovian property of Itô processes, the same proof can be done for any _t >_ 0 by a time shift. Denote **∆**[˜] ( _**x**_ ) := **∆**[˜] ( _**x** ,_ 0 _, η_ e) for brevity. By definition, + +**==> picture [196 x 25] intentionally omitted <==** + +27 + +By triangle inequality, for all _i ∈_ [ _d_ ], + +**==> picture [238 x 26] intentionally omitted <==** + +Therefore, + +**==> picture [378 x 92] intentionally omitted <==** + +By triangle inequality, + +**==> picture [124 x 25] intentionally omitted <==** + +By Cauchy-Schwarz inequality and Itô’s isometry, + +**==> picture [292 x 32] intentionally omitted <==** + +Since _**X**_ ( _s_ ) _∈S_ almost surely and _S_ is a bounded set, there exists constants _C_ 1 and _C_ 2 such that _T_ 1 _≤ C_ 1 _η_ e _, T_ 2 _≤ C_ 2 _η_ e[0] _[.]_[5][.][Substituting the bounds for] _[ T]_[1][and] _[ T]_[2][back, we have the lemma.] + +**Lemma E.2.** _For any round s ≤ R_ tot _and any worker k ∈_ [ _K_ ] _, given_ _**ϕ**_[(] _[s]_[)] _∈_ Γ _, then_ + +**==> picture [353 x 24] intentionally omitted <==** + +**==> picture [353 x 68] intentionally omitted <==** + +_Proof._ Again, the key insight is that the dynamics of each worker before averaging in each round is just the standard SGD with a smaller batch size, _B_ loc. Since the SDE approximation theorem for Local SGD, Theorem 3.2 in Gu et al. (2023), also applies to SGD by taking _K[′]_ = 1 and _H[′]_ = _η_[1][,] we can apply this result to obtain that, for any _C_[4] -smooth function _g_ ( _**θ**_ ), it holds for _**ζ**_ defined in (9) with the initial condition _**ζ**_ (0) = _**ϕ**_[(] _[s]_[)] that + +**==> picture [288 x 16] intentionally omitted <==** + +where _T[′]_ = _α_[2] is the continuous-time observation interval. + +To establish a connection between the moments of Φ( _**θ** k,t_[(] _[s]_[)][)] _[ −]_ _**[ϕ]**_[(] _[s]_[)][and those of] _**[ ζ]**_[(] _[T][ ′]_[)] _[ −]_ _**[ϕ]**_[(] _[s]_[)][,][we] can let the function _g_ ( _**θ**_ ) to take specific forms, each returning a single coordinate of _**θ** −_ _**ϕ**_[(] _[s]_[)] , ( _**θ** −_ _**ϕ**_[(] _[s]_[)] )( _**θ** −_ _**ϕ**_[(] _[s]_[)] ) _[⊤]_ , ( _**θ** −_ _**ϕ**_[(] _[s]_[)] ) _[⊗]_[3] and _∥_ _**θ** −_ _**ϕ**_[(] _[s]_[)] _∥_ 2[6][.][For][example,][to][relate][Φ(] _**[θ]** k,H_[(] _[s]_[)][)] _[ −]_ _**[ϕ]**_[(] _[s]_[)] to _**ζ**_ ( _T[′]_ ) _−_ _**ϕ**_[(] _[s]_[)] , let _g_ ( _**θ**_ ) = _⟨_ _**e**_ 1 _,_ _**θ** ⟩_ where _**e**_ 1 = (1 _,_ 0 _, · · · ,_ 0) _[⊤]_ . Substitute _g_ into (17), and we get _|_ � _**e**_ 1 _,_ E[Φ( _**θ** k,H_[(] _[s]_[)][)] _[ −]_ _**[ϕ]**_[(] _[s]_[)][]] _[ −]_[E][[Φ(] _**[ζ]**_[(] _[T][ ′]_[))] _[ −]_ _**[ϕ]**_[(] _[s]_[)][]] � _|_ = _O_[˜] ( _η_[0] _[.]_[25] ). We can obtain the same results for all coordinates by letting _g_ ( _**θ**_ ) = _⟨_ _**e** i,_ _**θ** ⟩_ for all _i ∈_ [ _D_ ]. Therefore, _|_ E[Φ( _**θ** k,H_[(] _[s]_[)][)] _[−]_ _**[ϕ]**_[(] _[s]_[)][]] _[−]_ E[ _**ζ**_ ( _T[′]_ ) _−_ _**ϕ**_[(] _[s]_[)] ] _|_ = _O_[˜] ( _η_[0] _[.]_[25] ). Similarly, we can show that the LHS of (14) to (16) are only changed by _O_[˜] ( _η_[0] _[.]_[25] ) = _o_ (poly( _α_ )) when replacing Φ( _**θ** k,H_[(] _[s]_[)][)][ with] _**[ ζ]**_[(] _[T][ ′]_[)][.] + +28 + +Then, it suffices to compute the moments for _**ζ**_ ( _T[′]_ ) and verify that they match the RHS of (13) to (16). Since Γ is compact and invariant for the SDE (11) (Lemma I.39 in (Gu et al., 2023)), we can apply the Itô-Taylor expansion in Preliminary Lemma E.1 with _η_ e = _α_[2] , _**X**_ ( _t_ ) = _**ζ**_ ( _t_ ), _**b**_ ( _**ζ**_ ) = 2 _[K] B[∂]_[2][Φ(] _**[ζ]**_[)[] **[Σ]**[(] _**[ζ]**_[)]][ and] _**[ σ]**_[(] _**[ζ]**_[) =] � 21 _B[∂]_[Φ(] _**[ζ]**_[)] **[Σ]**[1] _[/]_[2][(] _**[ζ]**_[)][.] + +To obtain the first moment (13), let _g_ ( _**ζ**_ ) = � _**e**_ 1 _,_ _**ζ** −_ _**ϕ**_[(] _[s]_[)][�] and substitute it into (12). By Preliminary Lemma E.1, we have + +**==> picture [178 x 19] intentionally omitted <==** + +We can repeat this process for all coordinates of _**ζ**_ ( _T[′]_ ) to obtain + +**==> picture [325 x 24] intentionally omitted <==** + +and thus (13). + +For the second moment (14), define _g_[(] _[i,j]_[)] ( _**ζ**_ ) = � _**M** i,j,_ ( _**ζ** −_ _**ϕ**_[(] _[s]_[)] )( _**ζ** −_ _**ϕ**_[(] _[s]_[)] ) _[⊤]_[�] , where _Mi′,j′_ = 1 _,_ ( _i′, j′_ ) = ( _i, j_ ) _,_ . Since _∂i′g_[(] _[i,j]_[)] ( _**ζ**_ ) = 0 for all _i[′]_ , the first term of _Ag_[(] _[i,j]_[)] ( _**ζ**_ ) vanishes. It suf�0 _,_ otherwise + +**==> picture [396 x 57] intentionally omitted <==** + +**==> picture [396 x 57] intentionally omitted <==** + +Combining (19) and (20) and noticing that _g_[(] _[i,j]_[)] ( _**ϕ**_[(] _[s]_[)] ) = 0 for all _i, j_ , we have + +**==> picture [335 x 23] intentionally omitted <==** + +and thus (14). + +For the third moment (15), define _g_[(] _[i,j,l]_[)] ( _**ζ**_ ) = � _**e** i ⊗_ _**e** j ⊗_ _**e** l,_ (Φ( _**θ** k,H_[(] _[s]_[)][)] _[ −]_ _**[ϕ]**_[(] _[s]_[)][)] _[⊗]_[3][�] . Noticing that _∂i′g_[(] _[i,j,l]_[)] ( _**ϕ**_[(] _[s]_[)] ) = 0 for all _i[′]_ and _∂i_[2] _[′] ,j[′][g]_[(] _[i,j,l]_[)][(] _**[ϕ]**_[(] _[s]_[)][) = 0][ for all][ (] _[i][′][, j][′]_[)][, we have] + +**==> picture [278 x 19] intentionally omitted <==** + +and thus (15). + +Finally, by directly applying Preliminary Lemma E.2, we have + +**==> picture [274 x 19] intentionally omitted <==** + +and thus (16). + +Now we are ready to compute the moments for _**ϕ**_[(] _[s]_[+1)] _−_ _**ϕ**_[(] _[s]_[)] at each round: + +**Lemma E.3.** _For any round s ≤ R_ tot _, given_ _**ϕ**_[(] _[s]_[)] _∈_ Γ _, then_ + +**==> picture [342 x 25] intentionally omitted <==** + +**==> picture [342 x 44] intentionally omitted <==** + +29 + +_K Proof._ Let **∆** 1 := _K_[1] � _k_ =1[Φ(] _**[θ]** k,H_[(] _[s]_[)][)] _[ −]_ _**[ϕ]**_[(] _[s]_[)][.][By Lemma][ E.2][,] + +**==> picture [274 x 148] intentionally omitted <==** + +Let **∆** 2 := _K_ 1 � _Kk_ =1 _**[θ]** k,H_[(] _[s]_[)] _[−]_ _**[ϕ]**_[(] _[s]_[)][.][Then] **[∆]**[2][=] **[∆]**[1][+] _K_ 1 � _Kk_ =1[(] _**[θ]** k,H_[(] _[s]_[)] _[−]_[Φ(] _**[θ]** k,H_[(] _[s]_[)][))][.][Finally,][let] _K_ **∆** 3 := Φ( _K_[1] � _k_ =1 _**[θ]** k,H_[(] _[s]_[)][)] _[−]_ _**[ϕ]**_[(] _[s]_[)][.][By][Lemma][E.1][it][holds][with][probability][at][least][1] _[−][δ]_[that] _∥_ _**θ** k,H_[(] _[s]_[)] _[−]_[Φ(] _**[θ]** k,H_[(] _[s]_[)][)] _[∥]_[2][=] _[ O]_[(] � _η_ log _η_[1][)][ and thus] _[ ∥]_ **[∆]**[2] _[ −]_ **[∆]**[1] _[∥]_ 2[=] _[ O]_[(] � _η_ log _η_[1][)][.][Let] _[ δ]_[=] _[ η]_[100][.][Since] _∥∂_ Φ( _·_ ) _∥_ 2 is always bounded by _O_ (1), we can always add an error of _O_ ( _δ_ ) to our bounds for the moments and ignore the possibility that this event does not happen. To prove (24), we do Taylor expansion of Φ at _**ϕ**_[(] _[s]_[)] , then + +**==> picture [256 x 86] intentionally omitted <==** + +The last equation uses the fact that _∂_ Φ( _**ϕ**_ ), for _**ϕ** ∈_ Γ, is a projection matrix onto the tangent space of Γ at _**θ**_ (Lemma 4.3 of (Li et al., 2021c)). + +To prove (25), again we do Taylor expansion of Φ at _**ϕ**_[(] _[s]_[)] to connect Φ( _**ϕ**_[(] _[s]_[)] + **∆** 2) with Φ( _**ϕ**_[(] _[s]_[)] + **∆** 1) and obtain: + +**==> picture [366 x 42] intentionally omitted <==** + +Applying the second-order Taylor expansion gives + +**==> picture [376 x 74] intentionally omitted <==** + +By (15) and the fact that _∥∂_[2] Φ( _**ϕ**_[(] _[s]_[)] ) _∥_ 2 is bounded, the above equation can be simplified to + +**==> picture [346 x 45] intentionally omitted <==** + +Finally, for (26), we can repeat the above process to bound E[ _∥_ **∆** 1 _∥_ 2[3][]][,][and][then][conclude][that] E[ _∥_ ∆3 _∥_ 2[3][] =] _[ O]_[(] _[α]_[6][)][.] + +30 + +Now we are ready to prove our main theorem. + +_Proof for Theorem 3.1._ Let _**ζ**_ ( _t_ ) be the solution of (11). Let _r_ be some integer greater than _s_ . If _**ϕ**_[(] _[s]_[)] _∈_ Γ, define _**ζ**_[ˆ] _s,r_ as the random variable sampled from the distribution of _**ζ**_ ( _α_[2] _r_ ) conditioned on _**ζ**_ ( _α_[2] _s_ ) = _**ϕ**_[(] _[s]_[)] . If _**ϕ**_[(] _[s]_[)] = _**θ**_ null _∈/_ Γ, define _**ζ**_[ˆ] _s,r_ = **0** . + +If _**θ** ∈_ Γ, define _u_ ( _**θ** , t_ 1 _, t_ 2) the expected value of _g_ ( _**ζ**_ ( _t_ 2)) conditioned on _**ζ**_ ( _t_ 1) = _**θ**_ . If _**θ**_ = _**θ**_ null, define _u_ ( _**θ** , t_ 1 _, t_ 2) = **0** . That is, + +**==> picture [205 x 25] intentionally omitted <==** + +For all _n ≤ R_ tot, we have + +**==> picture [354 x 101] intentionally omitted <==** + +By the law of total expectation and the Markovian property of Itô process, + +**==> picture [246 x 63] intentionally omitted <==** + +Therefore, + +**==> picture [408 x 90] intentionally omitted <==** + +**==> picture [148 x 13] intentionally omitted <==** + +where the latter term comes from the definition of _u_ ( _**θ** , t_ 1 _, t_ 2) and _**ζ**_[ˆ] _s,r_ . By Lemma I.11 in (Gu et al., 2023), there exists a constant _ϵ_ such that if min _**ϕ** ∈_ Γ _∥_ _**θ** −_ _**ϕ** ∥_ 2 _≤ ϵ_ , then Φ( _**θ**_ ) _∈_ Γ. Therefore, substituting _δ_ = _η_[100] into Lemma E.1, we can conclude that the latter term is at most _O_ ( _η_[100] ). + +For _As_ , notice that the two terms differ only in the first position. By Lemma E.3 and (18) to (23), the moments of _**ϕ**_[(] _[s]_[+1)] _−_ _**ϕ**_[(] _[s]_[)] and _**ζ**_[ˆ] _s,s_ +1 _−_ _**ϕ**_[(] _[s]_[)] are close to each other. Therefore, it suffices to discuss the smoothness of _u_ and perform Taylor expansion. By Proposition 25 of (Li et al., 2019a), can safely substitute _u_ forsince˜( _**ϕϕ** , t g_ 1 _∈, t∈C_ Γ2).[4] =Therefore,, _uu_ (( _**ϕϕ** , t, t u_ 11 _, t_ in _, t_ there22) _A_ ) satisfies the compatibility condition for the Whitney Extension Theorem for all _s_ withexists _**ϕ** u_ ˜ and perform Taylor expansion:a _∈_ functionΓ. Denote _u_ ˜( _**ϕ** u_ ˜ _, t_ ( _**ϕ**_ 1 _, t, sα_ 2)[2] that _, nα_ is[2] ) _C_ as[4] in _u_ ˜ _s,n_ _**ϕ**_ (for _**ϕ**_ ) for brevity. _**ϕ** ∈_ R _[d]_ andNow, wesatisfies + +**==> picture [294 x 61] intentionally omitted <==** + +31 + +**==> picture [350 x 133] intentionally omitted <==** + +Substituting in _δ_ = _η_[100] into Lemma E.1, we can conclude that, given _**ϕ**_[(] _[s]_[)] _∈_ Γ, the event _{_ _**ϕ**_[(] _[s]_[+1)] _∈_ Γ _}_ happens with probability at least 1 _− η_[100] . We can replace the condition _**ϕ**_[(] _[s]_[)] _,_ _**ϕ**_[(] _[s]_[+1)] _∈_ Γ with _**ϕ**_[(] _[s]_[)] _∈_ Γ in _A[′] s_[with an error of only] _[ O]_[(] _[η]_[100][)][.][Therefore,] + +**==> picture [382 x 91] intentionally omitted <==** + +Since _**ϕ**_[(] _[s]_[)] _∈_ Γ where Γ is a compact set, both _∥∂u_ ˜ _s_ +1 _,n_ ( _**ϕ**_[(] _[s]_[)] ) _∥_ 2 and _∥∂_[2] _u_ ˜ _s_ +1 _,n_ ( _**ϕ**_[(] _[s]_[)] ) _∥_ 2 are bounded. Substituting Lemma E.3 and (18) to (23) to the expression of _As_ , we have _As_ = _O_ ( _α_[4] ) and thus _|Ts[′][|]_[=] _[O]_[(] _[α]_[4][)][.][Summing] _[|T] s[′][|]_[up,][we][have] _[|]_[E][[] _[g]_[(] _**[ϕ]**_[(] _[n]_[)][)]] _[ −]_[E][[] _[g]_[(] _**[ζ]**_[(] _[nα]_[2][))]] _[|][≤O]_[(] _[nα]_[4][)] _[≤] O_ ( _α_[2] ), which completes the proof. + +## F DETAILS FOR COMMUNICATION TIME MEASUREMENT + +It is straightforward to measure the time duration for the entire training, but it is hard to directly measure the communication time due to the asynchronous nature of CUDA computation. Hence, in our experiments, we derive the communication time from the difference in total training time across runs with various communication frequencies. + +Specifically, let _T_ para[tot] _[, T] H_[ tot] 1[be the total time durations of data parallel approaches and local gradi-] ent methods with _H_ = _H_ 1, respectively. Also let _T_ para[comm] _[, T] H_[ comm] 1 be their communication times, and _T_ para[comp] _[, T] H_[ comp] 1 be their computation time. Ideally, setting the synchronization period to _H_ 1 reduces the communication volume exactly by a factor of _H_ 11[, so these variables satisfy the following] relationships: + +**==> picture [128 x 71] intentionally omitted <==** + +Then we can express the communication and computation times in terms of the total time duration _T_ para[tot][and] _[ T]_[ tot] _H_ 1[:] + +**==> picture [276 x 48] intentionally omitted <==** + +32 + +Therefore, we empirically measure the total time duration _T_[�] para[tot][and] _[T]_[�][ tot] _H_ 1[for some] _[ H]_[1][, then use the] following formulas to obtain estimates of the communication and computation times: + +**==> picture [279 x 49] intentionally omitted <==** + +These estimates are very predictive for the total time duration of local gradient methods with a different _H_ . For example, when _H_ = _H_ 2, we can predict the total time duration _TH_[tot] 2[as follows:] + +**==> picture [262 x 49] intentionally omitted <==** + +We find that the relative error _|T_[�] _H_[tot] 2 _T_ � _[−] H_[tot] 2 _[T] H_[ tot] 2 _[|] ×_ 100%, where _TH_[tot] 2[denotes the measured total time,][is] only _∼_ 1% across all configurations in Table 4, where we set _H_ 1 = 2 _, H_ 2 = 4 for ResNet-152 and _H_ 1 = 4 _, H_ 2 = 8 for ViT-B. The small relative error suggests that our method offers a close approximation to the actual time. For this reason, in Table 4, we report the communication time estimated by (27) and (29) for data-parallel approaches and local gradient methods with a constant synchronization period. + +For QSR, since its communication volume relative to data parallel approaches, denoted as _f_ QSR, can be easily computed given the learning rate schedule, the growth coefficient _α_ and the base synchronization period _H_ base, we can estimate its communication time _T_ QSR[comm] in a similar vein to (27) and (29): + +**==> picture [246 x 15] intentionally omitted <==** + +We report the communication time estimated by (31) in Table 4 for QSR. + +## G DISCUSSION ON MORE AGGRESSIVE SCALINGS + +**==> picture [353 x 111] intentionally omitted <==** + +**----- Start of picture text -----**
+( α = 0 . 3) (( αρ = 0 = 0 .. 15)25) 81 . 0 ( ( α ρ = 0 = 0 . . 0125 0175) ( ρ = 0) . 01) ( ρ = 0 . 0075)
80 . 0 ( α = 0 ( ρ = 0 . 4) . 2) ( α = 0 . 2)( ρ = 0 . 1) 80 . 5 ( α = 0( α. = 002) . 015)( α = 0( ρ. 01 = 0) . 005) HH == ⌊ ⌊ (( η [α][ρ] η [)][)][3][2] [⌋][⌋]
( ρ = 0 . 25) 80 . 0 H = 4
Parallel SGD/AdamW
79 . 5
79 . 5
17 . 5 20 . 0 22 . 5 25 . 0 100 5 10 15 20 25 100
Communication Volume (%) Communication Volume (%)
(a) Local SGD on ResNet-152 (b) Local AdamW on ViT-B
(%) (%)
Acc. Acc.
Val. Val.
Top-1 Top-1
**----- End of picture text -----**
+ +Figure 6: The cubic rule _H_ = _⌊_ ( _η[ρ]_[)][3] _[⌋]_[with a properly tuned] _[ ρ]_[ can either outperform or underperform the QSR] in test accuracy, depending on the training scenarios. + +Apart from the scalings discussed in Section 3, one can consider more aggressive scalings, e.g., _H_ = _⌊_ ( _ρ/η_ ) _[−]_[3] _⌋_ . Compared with QSR _H_ = _⌊_ ( _α/η_ ) _[−]_[2] _⌋_ that uses the same amount of communication, this cubic synchronization rule communicates more frequently at earlier stages but much less at later stages. Our theory in Theorem 3.1 suggests that taking _H ∼ η[−]_[3] blows up the approximation error, but as shown in Figure 6, this cubic rule with a properly tuned _ρ_ can either outperform or underperform the QSR in test accuracy, depending on the training scenarios. + +We argue that this is because our quasistatic view may break in the very late phase of cosine decay, where the learning rate decays so fast that _ηt_ sees significant decay within a single communication round. As an example where the cubic rule performs better, we plot in Figure 8 the test accuracy + +33 + +Table 6: We validate that the higher test accuracy achieved by _H ∼ η[−]_[3] relies on the rapid decaying learning rate within a synchronization period via ablation studies on ViT-B. In Table 6(a), we replace the cosine decay schedule with a variant of the step decay schedule in Smith et al. (2020). In Table 6(b), we run both scalings with a modified cosine decay schedule that ceases to decay at some epoch _t[′′]_ . QSR consistently outperforms _H ∼ η[−]_[3] in both cases. + +(b) Local AdamW with modified cosine decay. Both scalings use _H_ base = 4. + +|(a) Local AdamW with step decay.
Method
Val. Acc. (%) Comm. (%)
Parallel AdamW
78.51
100
Local AdamW (_H_=4)
78.70
25
+QSR (_H_base = 4)
**80.99**
**13.2**
+_H ∼η−_3 (_H_base = 4)
80.86
14.4|| +|---|---| +||Method
_t′′_
Val. Acc. (%)| +||QSR
260
**80.75**
_H ∼η−_3
260
80.51| +||QSR
250
**80.34**
_H ∼η−_3
250
79.91| +||QSR
240
**79.85**
_H ∼η−_3
240
79.72| + +curves of the QSR and cubic rule for training ViT-B with Local AdamW and batch size 4096. Same as our experiment setup in Section 4, the learning rate peaks at the value 0 _._ 008 and then decays to nearly zero (10 _[−]_[6] ) following a cosine decay schedule. Setting _H_ = _⌊_ (0 _._ 0075 _/η_ ) _[−]_[3] _⌋_ results in consistently worse test accuracy than QSR (with the same communication volume) before epoch 265. However, during the final communication round, which spans from epoch 265 to 300, the cubic rule catches up with QSR. During this period, the learning rate dramatically decreases from 3 _._ 5 _×_ 10 _[−]_[4] to nearly zero, but our quasistatic view assumes that the learning rate _ηt_ should remain relatively constant for at least one communication round. + +Based on the above observation, we argue that the cubic rule offers benefits over QSR only for certain schedules that have a rapid tail of learning rate decay near the end of training. To validate this view, we replace the cosine decay schedule with a variant of the step decay schedule in Smith et al. (2020). In our step decay schedule, given a total of 300 epochs, the learning rate remains at its peak until epoch 150, after which it is divided by 2 every 30 epochs. See Figure 7 for an illustration. Unlike the cosine schedule, this step decay schedule maintains a constant learning rate for a significant amount of time. As shown in Table 6(a), the cubic rule yields inferior generalization performance compared with our QSR, even after careful tuning of _ρ_ . See Appendix C.2 for training details. + +Another way to corroborate our view is to run both scalings with a modified cosine learning rate schedule, which ceases to decay after a specific epoch _t[′′]_ and remains con- + +**==> picture [160 x 139] intentionally omitted <==** + +**----- Start of picture text -----**
+cosine decay
step decay similar to Smith et al.(2020)
modified cosine decay
0 . 008
0 . 006
0 . 004
0 . 002
0 . 000
0 100 200 300
Epochs
Rate
Learning
**----- End of picture text -----**
+ +Figure 7: An illustration of the learning rate schedules. + +stant until training ends. See Figure 7 for an illustration of this modified cosine schedule. As shown in Table 6(b), QSR consistently outperforms the cubic rule across various choices of _t[′′]_ . Further training details can be found in Appendix C.2. The probable reason is that when the learning rate is held constant, the cubic rule results in an excessively large _H_ , negatively impacting optimization. + +Given these failure cases of the cubic rule, we generally recommend using the QSR and leave it to future work to design a better rule to deal with schedules that have a rapid tail of learning rate decay. + +34 + +**==> picture [167 x 123] intentionally omitted <==** + +**----- Start of picture text -----**
+H Schedule and Communcation Volume
H ∼ η [−] [3] , 14.9% H ∼ η [−] [2] , 15.4%
80
75
70 81
80
65
79
60 200 250 300
55
0 100 200 300
Epochs
(%)
Acc.
Val.
Top-1
**----- End of picture text -----**
+ +Figure 8: Test accuracy curves for QSR ( _α_ = 0 _._ 01) and the cubic rule ( _ρ_ = 0 _._ 0075). The cubic rule results in consistently worse test accuracy than QSR (with the same communication volume) before the last communication round. + +## H COMPARISON WITH LOCAL SGD/ADAMW + SWAP + +In this section, we compare QSR with the modified Stochastic Weight Averaging in Parallel (SWAP) algorithm, termed “Local SGD/AdamW + SWAP”. Specifically, the original SWAP proposed by (Gupta et al., 2020) uses SGD for the majority of the training process and only switches to local updates at some _t_ 0 near the end, thus saving less communication than QSR. To compare SWAP with QSR at a similar level of communication volume, we experiment with the modified SWAP, which starts with Local SGD/AdamW using a constant communication period _H_ base and, after some time _t_ 0, lets workers perform local updates with a final model averaging. As shown in Figure 9, QSR outperforms Local SGD/AdamW SWAP though we have tuned _t_ 0 carefully for the latter. + +**==> picture [355 x 112] intentionally omitted <==** + +**----- Start of picture text -----**
+( α = 0 . 3) ( α = 0 . 25) 81 ( α = 0 . 0175) ( α = 0 . 015) ( t 0 = 260)
80 . 0 ( α = 0 . 4) ( α = 0 . 2) ( α = 0 . 02) ( α = 0 . 01)
80 ( t 0 = 240) H = ⌊ ( [α] η [)][2] [⌋]
( t 0 = 280) H = 4 + SWAP with t 0
79 . 5 79 H = 4
Parallel SGD/AdamW
78
79 . 0 ( t 0 = 220)
17 . 5 20 . 0 22 . 5 25 . 0 100 5 10 15 20 25 100
Communication Volume (%) Communication Volume (%)
(a) Local SGD on ResNet-152 (b) Local AdamW on ViT-B
(%) (%)
Acc. Acc.
Val. Val.
Top-1 Top-1
**----- End of picture text -----**
+ +Figure 9: QSR outperforms Local SGD/AdamW + SWAP on both models. See Appendix C for training details. + +35 + diff --git a/open_review/iclr2024_8809.json b/open_review/iclr2024_8809.json new file mode 100644 index 0000000000000000000000000000000000000000..3a27edde3b9b5a6c75540942736113f70d2cd224 --- /dev/null +++ b/open_review/iclr2024_8809.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8809", + "source": "iclr2024", + "source_year": 2024, + "title": "SKILL-MIX: a Flexible and Expandable Family of Evaluations for AI Models", + "abstract": "With LLMs shifting their role from statistical modeling of language to serving as general-purpose AI agents, how should LLM evaluations change? Arguably, a key ability of an AI agent is to flexibly combine, as needed, the basic skills it has learned. The capability to combine skills plays an important role in (human) pedagogy and also in a paper on emergence phenomena (Arora & Goyal, 2023).\n\nThis work introduces SKILL-MIX, a new evaluation to measure ability to combine skills. Using a list of $N$ skills the evaluator repeatedly picks random subsets of $k$ skills and asks the LLM to produce text combining that subset of skills. Since the number of subsets grows like $N^k$, for even modest $k$ this evaluation will, with high probability, require the LLM to produce text significantly different from any text in the training set. \nThe paper develops a methodology for (a) designing and administering such an evaluation, and (b) automatic grading (plus spot-checking by humans) of the results using GPT-4 as well as the open LLaMA-2 70B model. \n\nAdministering a version of SKILL-MIX to popular chatbots gave results that, while generally in line with prior expectations, contained surprises. Sizeable differences exist among model capabilities that are not captured by their ranking on popular LLM leaderboards (\"cramming for the leaderboard\"). Furthermore, simple probability calculations indicate that GPT-4's reasonable performance on $k=5$ is suggestive of going beyond \"stochastic parrot\" behavior (Bender et al., 2021), i.e., it combines skills in ways that it had not seen during training.\n\nWe sketch how the methodology can lead to a SKILL-MIX based eco-system of open evaluations for AI capabilities of future models. We maintain a leaderboard of SKILL-MIX at [https://skill-mix.github.io](https://skill-mix.github.io).", + "rebuttal": "**Below, we address the other concerns brought up.**\n\n> One minor issue is that I don’t think the models picked necessarily need to be instruction-finetuned as regular, non-instruction finetuned language models are still able to follow instructions in the prompt. In fact, given that some recent work has demonstrated that instruction-finetuning on smaller models reduces their ability to produce as diverse of a response distribution, it could artificially hurt the performance of the selected open-source models in evaluation due to the selected topics occurring with a Google n-gram probability of ~1e-6 and them likely being fine-tuned on a much smaller dataset that may not include the selected topics/skills.\n\nWe agree that the instruction following can work reasonably for many tasks in the base models. But Skill-Mix is more complicated. Despite multiple attempts we were unable to get any reasonable performance on non-instruction tuned models, especially small 7B models. We would welcome any suggestions (e.g., prompting strategies)! \n\n> What is the variance among the automatically graded scores? It is stated that human variance is higher than the automatic ones, but neither seem to be presented anywhere.\n\nThe standard deviation of GPT-4 grading is 0.050 (averaged across all points), which is much smaller than 0.261, the standard deviation of human grading as reported in Appendix B. The standard deviation of LLaMA-2 grading is 0.105, meaning it is noisier than GPT-4, but still much more stable than human grading. \n\n> The analysis of Skill-Mix vs other benchmarks could be more comprehensive — it would be interesting to see correlation scores against other benchmarks to see how skill-mix differs overall wrt individual LLM rankings.\n\nWe agree with the reviewers that this would be ideal. However, none of the benchmarks have included all the models we tested, making it hard to compute the correlation. We find the ordering of the GPT family and the LLaMA family on Skill-Mix to be consistent with the ordering on other benchmarks. For ordering including newer models, we have pointed out all noticeable inversions in the paper. \n\n\n> Writing + Clarity + Motivation:\n\nWe thank the reviewer for their constructive comments, and have made appropriate changes in the revision (e.g., bolding on the best performing model; for this point in particular, we also include figures in the appendix to help visually assess how well models perform against each other for each metric). \n\nWe apologize for the confusion with respect to the motivation, please see our general response, **Q3**.\n\n> Can the authors explain the derivation of the high probability statement for O(TlogT + NlogN) ? Intuitively, it’s quite surprising given “random prompts” to expose these low-probability skills and their topics.\n\nWe apologize for the confusion. Here we are referring to a dataset that follows Skill-Mix, that is, the random prompts are sampled by uniformly picking $k$ skills out of $N$ total skills, and 1 topic out of $T$ total topics. Thus, each prompt reveals $k$ random skills and 1 random topic. By basic probability calculations, $O(T\\log T+N\\log N)$ random prompts should reveal all $N$ skills and $T$ topics with high probability even when $k=2$.\n\n> Intro: Why is a specific opinion from Hinton used as motivation for desiderata for the authors’ benchmark? \n\nWe apologize for the confusion and have revised wording to following: “(d) capable of producing novel text generations corresponding to a mix of skills and a topic that it did not see in the training corpus.” The ``stochastic parrots’’ question (Bender et al., 2021)” has of course been debated for a few years. We cited the more recent (Hinton & Ng’23) conversation because Hinton emphasized that disagreements about this issue among experts is hindering a full discussion of AI safety. We would be happy to cite other sources if the reviewer has suggestions!\n\n> Tables: some sort of bolding on the best performing across each category for each k would be really helpful\n\nWe thank the reviewer for pointing this out, and in our revision, we have included bolded numbers in Tables wherever appropriate!\n\n**We thank the reviewer for the helpful and insightful comments! Please see our general response above and our responses to the reviewer’s main concern below:**\n\n\n> Skill picking: Section 3.1 (and the appendix) describe how the authors pick the skills by hand based on textbooks on logical reasoning, rhetoric, and theory of mind. But what is the justification for using these types of skills? For example, i’m sure there are many skills not related to any of those topics which still require some sort of intelligent capability to combine meaningfully. The authors should explain this better.\n\nWe ap [...]\n\n**We thank the reviewer for the helpful and insightful comments! Please see our general response above and our responses to the reviewer’s main concerns below:**\n\n> I'd love to get some suggestion on how this framework can be extended beyond language to Vision - Language Models.\n\nWe sketch an example of how to extend Skill-Mix to evaluate vision-language models below:\n\n- The set of skills can include both vision skills (e.g., object recognition, object generation, 3D reconstruction, spatial relation between objects) and language/reasoning skills (e.g., description of the scene, object interact [...]\n\nWe thank the reviewer for the helpful and insightful comments! Please see our general response above and our responses to the reviewer’s main concerns below:\n\n> lack of IRB or ethics approval\n\nWe thank the reviewer for bringing up this point. The human graders were carrying out research too and we understand IRB is not required in such cases. The final version will fully explain this status. \n\n> the paper doesn't make it clear … how these 7 desiderata are related to the 3 pressing issues with current evaluation methods.\n\nPlease see our response to all reviews, **Q1**. \n\n> no reason to believe [...]\n\n[rebuttal truncated]", + "initial_scores": [ + 6, + 8, + 5 + ], + "score_mean": 6.33, + "score_variance": 2.33, + "score_spread": 3, + "score_min": 5, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "The basic idea here is to evaluate LLMs with a mostly-secret set of \"skills\" that can be recombined. The recombination means that we get a very large set of potential tests, making it very impractical to train on the test set even if it was available. The paper is well reasoned and interesting throughout.\n\nThe results are very interesting and might be worth the price of admission, I mean acceptance, on their own. They constitute fairly strong evidence that we are seeing Goodhart's law in action, where the benchmarks have been using as optimization targets to overall detrimental effect. Not releasing all of the skills publicly is a somewhat controversial decision, but there's a good motivation.", + "forum_id": "Jf5gplvglq", + "primary_area": "datasets and benchmarks", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_YRGK", + "review_id": "n3zYtCsa5g", + "scores": { + "rating": 6, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 5634, + "edit_detected": true, + "edit_delta_seconds": 1527869, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_NFpe", + "review_id": "5wo8VwaXg4", + "scores": { + "rating": 8, + "soundness": 4, + "presentation": 4, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 2433, + "edit_detected": true, + "edit_delta_seconds": 905214, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_VgUg", + "review_id": "5MBDIMQC2q", + "scores": { + "rating": 5, + "soundness": 3, + "presentation": 2, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 5208, + "edit_detected": true, + "edit_delta_seconds": 1445762, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8809.md b/open_review/iclr2024_8809.md new file mode 100644 index 0000000000000000000000000000000000000000..670acfb53f4c4e30a058e01f28a3c443140b0766 --- /dev/null +++ b/open_review/iclr2024_8809.md @@ -0,0 +1,850 @@ + + +## - SKILL MIX : A FLEXIBLE AND EXPANDABLE FAMILY OF EVALUATIONS FOR AI MODELS + +Authors withheld for review + +## ABSTRACT + +With LLMs shifting their role from statistical modeling of language to serving as general-purpose AI agents, how should LLM evaluations change? Arguably, a key ability of an AI agent is to flexibly combine, as needed, the basic skills it has learned. The capability to combine skills plays an important role in (human) pedagogy and also in a paper on emergence phenomena (Arora & Goyal, 2023). + +This work introduces SKILL-MIX , a new evaluation to measure ability to combine skills. Using a list of _N_ skills the evaluator repeatedly picks random subsets of _k_ skills and asks the LLM to produce text combining that subset of skills. Since the number of subsets grows like _N[k]_ , for even modest _k_ this evaluation will, with high probability, require the LLM to produce text significantly different from any text in the training set. The paper develops a methodology for (a) designing and administering such an evaluation, and (b) automatic grading (plus spot-checking by humans) of the results using GPT-4 as well as the open LLaMA-2 70B model. + +Administering a version of SKILL-MIX to popular chatbots gave results that, while generally in line with prior expectations, contained surprises. Sizeable differences exist among model capabilities that are not captured by their ranking on popular LLM leaderboards (“cramming for the leaderboard”). Furthermore, simple probability calculations indicate that GPT-4’s reasonable performance on _k_ = 5 is suggestive of going beyond “stochastic parrot” behavior (Bender et al., 2021), i.e., it combines skills in ways that it had not seen during training. + +We sketch how the methodology can lead to a SKILL-MIX based eco-system of open evaluations for AI capabilities of future models. We maintain a leaderboard of SKILL-MIX at skill-mix.github.io. + +## 1 INTRODUCTION + +As LLMs shift roles from mere statistical models of language to fairly general-purpose AI agents, the inadequacy of existing evaluations—even those introduced within the past year—has become clear. Yet, leading models routinely score over 90% on many evaluations (OpenAI, 2023). + +Current evaluations on leaderboards test quantitative, scientific, and academic reasoning suffer from serious limitations. Since they originate from human tests or textbooks, they are vulnerable to _training-set contamination_ , i.e., examples very similar to the ones on the evaluation ending up in the training corpus of the model (OpenAI, 2023; Li, 2023). This is hard to measure given the immense size of training corpora and the fact that the corpora are rarely released. The contamination issue especially affects evaluations based upon human exams (whose difficulty is tied to being time-limited and closed-book) since models are now being trained on technical textbooks as well as course materials.[1] + +A variant of the contamination issue is “ _cramming for the leaderboard._ ” It is possible to deliberately train a model on data similar to those used in the leaderboard evaluations. Such datasets are easy to generate from a small number of examples using existing strong models. If “cramming” happens + +1Studies have revealed significant anomalies on GPT-4’s performance on questions exams created after its release (Narayan & Kapoor). + +1 + +**==> picture [318 x 180] intentionally omitted <==** + +**----- Start of picture text -----**
+Generation Grading
Input: Write at most 2 sentences in the Input : Could you please help me grade a student’s response to
context of sewing that illustrate all of the following question?
the following skills: modus ponens, red Question: Write at most 2 sentences in the context of sewing
herring, and metaphor. that illustrate all of the following skills: modus ponens, red
herring, and metaphor.
Generating model : If needles were the
keys to crafting melodies, then every Student’s Answer: If needles were the keys to crafting melodies,
perfect stitch would be a note in a then every perfect stitch would be a note in a harmonious
symphony; but speaking of symphonies, have you ever noticed
harmonious symphony; but speaking how the early bird's song sounds just like Mozart?
of symphonies, have you ever noticed
how the early bird's song sounds just Grading rubric: Correctly illustrates skills (3 points). On topic (1
like Mozart? point). Makes sense (1 point). At most 2 sentences (1 point).
Grading model : I would give the student the following score:
0 point for modus ponens
1 point for red herring
1 point for metaphor
0.5 point for being on topic
1 point for making sense
1 point for the length requirement
**----- End of picture text -----**
+ +Figure 1: **Left: Simplified depiction (with simplified prompt) of the generation stage of our evaluation.** The full prompt appears in Appendix C.3.1. The generating model is given a topic (sewing) as well as skills (modus ponens, red herring, metaphor), and asked to generate text demonstrating the skills. The full prompt contains skill definitions and examples, which can be found in Appendix C.3.1. **Right: Simplified depiction (with simplified prompt) of the grading stage of our evaluation.** The grading model (not necessarily the same as the generating model) is given the generating model output and grading instructions, and returns pointwise grading. The full grading prompt can be found in Appendix C.3.2. + +during pre-training, it becomes hard to detect. If it happens during fine-tuning, it may be detectable if it ends up harming general-purpose language skills. + +Yet another issue arising from the secrecy of the training corpus is that it is difficult to verify how original the model’s text productions truly are. In a recent interview (Hinton & Ng), Hinton suggested that a significant hurdle in current discussions of AI risk is absence of agreement among experts on whether or not models have already gone past “stochastic parrots” behavior (Bender et al., 2021)—i.e., whether they are able to actually understand the world, or at a minimum produce novel thoughts or “behavior” that they did not see in the training corpus. + +**Desiderata for next-generation evaluations:** To sum up, we need evaluations that are: (a) clearly relevant to general-purpose intelligence and language understanding; (b) easy for humans to design and administer, including with academic-level resources; (c) resistant to training-set contamination and “cramming for the leaderboard;” (d) capable of revealing LLM’s capability on producing novel text that they did not see in the training corpus (Hinton & Ng), i.e., going beyond “stochastic” parrots behavior (Bender et al., 2021); (e) easy to grade at scale (while allowing human spot-checking); (f) easily upgradeable into harder evaluations in the future as models get stronger; and (g) comprehensible at some level for the general public, including with respect to points (c) and (d). + +## 1.1 SKILL-MIX + +Our SKILL-MIX evaluation tests the model’s ability to produce sensible text satisfying natural constraints. It starts with a set of _N_ skills (an example is: “use of metaphor”) that every LLM could reasonably be expected to have encountered in its training set —say, because each skill has a Wikipedia entry. SKILL-MIX also uses a list of _T_ topics that have low, but non-negligible, probability in any reasonable training corpus –e.g., _“dueling,” “gardening.”_ SKILL-MIX ( _k_ ) consists of randomly picking a subset of _k_ skills out of _N_ , and a random topic out of _T_ topics. The chat agent is then asked to produce a short piece of text (say, 3 sentences) in the context of the selected topic and illustrate all _k_ selected skills. This evaluation can be easily administered using any set of skills and questions and any _k_ . The model is being required to do highly constrained text generation, whose difficulty intuitively increases with _k_[2] + +> 2The authors of this paper took an average of more than 7 minutes to answer SKILL-MIX (4). See Table 15 for some examples of text generated by humans vs. GPT-4. + +2 + +Since the evaluation task consists of sampling a random _k_ -tuple from a distribution, performance can be estimated reliably with a few hundred runs of the model. Thus human grading is feasible with modest budgets. We found that it is just as reliable to do auto-grading followed by human spot-checking of the grading. We used two easily-available models GPT-4 (OpenAI, 2023)) and LLaMA-2-70B-Chat (Touvron et al., 2023). + +SKILL-MIX is easily tailored to a model’s capability by adjusting _k_ , and in general larger models are able to handle larger _k_ (Section 1.2). In the future, as models get stronger, the evaluation can be made harder by not only increasing _k_ but also by adding new skills to our list, or by switching to more difficult or specialized skills, or to topics that are rarer or more specialized. It is also possible to create SKILL-MIX evaluations for special domains (e.g., coding or science) and for multi-modal data, although we leave that for future work. + +SKILL-MIX has two theoretical inspirations. The first are theories of human pedagogy and learning (Forehand, 2005; Koedinger et al., 2012; 2023; Li et al., 2013), which have long focused on the ability to combine skills. The other is a recent paper (Arora & Goyal, 2023) that gave a theory for how complex skills emerge in LLMs when they are scaled up. The paper assumed that understanding small pieces of text consists of applying _k_ skills out of a large list of basic skills. Under some assumptions, the paper showed that scaling up language models leads to improvement in proficiency at applying _k[′]_ -tuples of basic skills, where _k[′]_ increases with scaling. (Roughly speaking, _k[′]_ doubles when the mode is scaled up 10x.) Its appendix included a few examples of text produced by current chatbots in response to requests to combine a given set of skills, and that was an inspiration for our SKILL-MIX . + +**Difficulty of** SKILL-MIX **with increasing** _k_ **.** The intuition that the hardness of SKILL-MIX increases with _k_ can be supported by a simple calculation. Given a list of _N_ skills, there are � _Nk_ � ways to choose the subset of _k_ skills. For _N_ = 1000, this quantity exceeds 10[10] when _k_ = 4, and 10[12] when _k_ = 5. Furthermore, the skills and topics are fairly rare in the corpus —e.g., the word “sushi” has a unigram probability of 10 _[−]_[7] in Google n-grams (Google, 2012). Thus, the chance that the training corpus contains a short piece of text on the chosen topic that exhibits the chosen set of _k_ skills becomes very small even for _N_ = 100 (see Section 6). Such calculations are very relevant to be convinced that a model is going past “stochastic parrots” behavior as well as has resistance to dataset contamination. + +**Paper Organization.** Section 2 describes related prior work. Section 3 lays out design principles for the evaluation: assembling the list of skills and topics, as well as the prompt used to administer it. Section 4 describes the setup for auto-grading. Section 5 reports the experimental results. Section 6 gives the calculation for verifying that the model is going beyond stochastic parrots behavior. Section 7 sketches a future framework of several SKILL-MIX evaluations maintained by disinterested research groups, with a secret list of skills and topics. + +## 1.2 KEY FINDINGS + +Section 5 shows results of administering SKILL-MIX ( _k_ ) for different _k_ to today’s leading models. For proprietary models, the results are mostly in accord with prior expectations. GPT-4 ranks highest, being able to perform reasonably even for _k_ = 5. LLaMA-2-70B-Chat turns in a good performance, somewhat below GPT-3.5 Turbo, which is in line with general consensus about its capabilities. For most models, _k_ = 3 already proves too tough. + +**Evidence of cramming for the leaderboard.** Hugging Face’s Open LLM leaderboard (Beeching et al., 2023), which is based upon EleutherAI’s evaluation harness (Gao et al., 2021), is seen as a proving ground for open LLMs. Many models currently at the top of the leaderboard are LLaMA2 derivatives, and are ranked much higher than the corresponding LLaMA-2 model. However, on SKILL-MIX these models perform poorly and worse than LLaMA-2-70B-Chat, suggestive of cramming that significantly harmed general-purpose text skills (see Section 5). The recent Falcon180B-Chat (Almazrouei et al., 2023) also places higher on the leaderboard than LLaMA-2-70B-Chat, and has been claimed to have capabilities between GPT-3.5-turbo and GPT-4 based upon this ranking. Yet, it fares worse than LLaMA-2-70B-Chat on SKILL-MIX . Mistral-7B-Instruct-v0.1 also did not live up to claims of being significantly better than the corresponding LLaMA model. + +**Detecting saturation of an evaluation.** AlpacaEval (Li et al., 2023) is a popular evaluation (with an accompanying leaderboard) for text generation. It uses GPT-4 and a dataset of prompts to check how often the model’s generated output “wins” against that of DaVinci003. AlpacaEval presents a good case-study on the difficulties of creating good evaluations. Designed to give small open models + +3 + +a fighting chance in early 2023, it shows signs of saturation a mere 6 months later. Even 13B models now win against DaVinci003 with probability exceeding 90%, and recently Xwin-LM-70B-V0.1 (built on the LLaMA-2 base models) climbed to the top, pushing GPT-4, by a hair, to second place. Did LLM capabilities truly progress this much within 6 months? We find that the new champion scores well on SKILL-MIX , and noticeably better than LLaMA-2-70B-Chat, but it is handily beaten by GPT-4. In general, most reasonable models now get similar scores on AlpacaEval, but show widely varying performances on SKILL-MIX , which suggests that AlpacaEval has lost its discriminative ability. SKILL-MIX avoids this shortcoming by evaluating on constrained text generation, and using _k_ to adjust the difficulty. + +**Demonstrating capabilities beyond “stochastic parrot.”** Whether or not current models are capable of going past “stochastic parrots” behavior (Bender et al., 2021) remains a crucial topic of discussion in the field (Hinton & Ng), and it is unclear what this would mean. In context of SKILL-MIX we define it to mean: _ability to correctly use combinations of skills + topic that it had not seen in the training corpus._ Our version of SKILL-MIX uses a list of skills each of which has a Wikipedia entry or listing (and thus known to every LLM). As mentioned, GPT-4 generates correct answers with reasonable probability for SKILL-MIX ( _k_ = 5), and we estimate that at least 1 _/_ 3 of the time this involves text that combines a mix of skills and topics that had not appeared in the training corpus. For _k_ = 6, we estimate the majority of the correct answers generated by GPT-4 to involve novel combinations (see Section 6 and Appendix D for calculations). We are unable to find similar evidence for any other model at this time. + +**Design principles for** SKILL-MIX **.** We include ablation studies suggesting design principles for new versions of SKILL-MIX : (i) auto grading setup (Section 4) (ii) deducting points for explicitly mentioning skill names in the answer (Appendix C.6) (iii) filtering out common skills (Appendix C.6). Our initial experiments involved a set of 101 skills selected from books and Wikipedia. Our calculation in Section 6 suggests that including skills that have higher frequencies in the training corpus makes SKILL-MIX easier. We identified 17 skills that appeared with rather high frequency in the common crawl corpus. Omitting them from the evaluation appeared to make it much harder for most models (see Section C.6). This second version is recommended. + +## 2 PRIOR WORK + +Arora & Goyal (2023) gives a mathematical model for skill emergence via LLM scaling. (In principle it applies to non-text data as well, since it makes almost no assumptions about what “text” or “skills” are.) The key assumption is that pieces of text involve random combinations of skills, and then reductions in cross-entropy (which can happen on an arbitrary subset of text pieces) are shown to imply improvements in both individual skills and combinations of skills. A key implication is that the trained model may show competence on k-tuples of skills even though this k-tuple of skills was not demonstrated in the training set. (Note that individual skills were demonstrated, as were some random k-tuples, but most k-tuples were not demonstrated.) It is important to note that the theory did not need to specify what it means to “combine” skills. + +**Skill-It** The goal of Skill-It (Chen et al., 2023) is to select an optimal subset of the training data such that an LLM trained on this subset will perform well on downstream tasks. Chen et al. (2023) utilize the notion of _skill ordering_ to construct this subset. Skill ordering refers to the natural notion that learning “simpler” skills first can make learning “difficult” skills later easier for the learner. Chen et al. (2023) define an _ordered skill set_ as “a collection of skills with a directed skills graph that is neither complete nor empty, where an edge from a prerequisite skill to a skill exists if the amount of training it takes to learn the skill can be reduced if the prerequisite skill is also learned.” + +**Skills in Reinforcement Learning** Reinforcement learning also has a notion of “skills,” which is distinct from the notion that we use (Arora & Goyal, 2023), but bears some similarities to the notion of skill used in Chen et al. (2023). In particular, Pertsch et al. (2021) aims to learn a _skill prior_ , i.e., a distribution over skills, such that a model trained to develop these skills will later perform well on downstream tasks. + +**Prior evaluations** Prior work has emerged which evaluates LLMs on particular skills, in a different sense than we do. Ruis et al. (2023) finds that LLMs do not do well on implicature. + +**Pedagogy work** Another important area where skills have been previously studied is that of human skill learning in pedagogy. Koedinger et al. (2023) develops a cognitive and statistical model of skill acquisition with the goal of understanding why/if some students learn faster than others. Koedinger + +4 + +et al. (2012) presents an algorithm to discover cognitive models, which are essentially skill models. Li et al. (2013) uses a computational model of student learning (a simulated student) in order to discover cognitive models (i.e., “learn the skills”). + +## 3 DESIGN OF SKILL-MIX + +## 3.1 PICKING THE SKILLS + +We obtained a set of 101 language skills and a set of 100 topics for SKILL-MIX evaluation. Since the goal of our evaluation is to test general-purpose text generation capability rather than the ability of the particular skills and topics, we only release 10 skills and 10 topics randomly sampled from the two sets to avoid potential “cramming” for SKILL-MIX . The randomly sampled skills and topics appear in Appendix A (see Tables 2 and 3). + +We curated the topic list by first sampling a large list of topics (e.g. using Reddit forums as inspiration), and then narrowing the list down to 100 topics based on the unigram frequency of the topic (and all related synonyms) on Google Ngram viewer (Google, 2012). To earn a spot on our list, a topic’s average unigram had to be around 10 _[−]_[6] —low (further reducing the likelihood that the model had seen the _k_ skills demonstrated in the context of the topic), and yet still ensuring good coverage even in 100B-sized corpora. The list of basic skills was designed to contain language skills which have a Wikipedia entry or listing (and thus known to every LLM), and whose definition the average person could understand. We started with a longer list of skills taken from textbooks on logical reasoning, rhetoric, theory of mind, (Kelly., 2014; Cummings, 2005; Nichols & Stich, 2003; Mueller, 2014). We tried to eliminate skills that either were too specialized —and thus difficult to apply in the context of the fairly narrow topics already chosen— or difficult to combine with other skills. (Some examples of discarded skills appear in the Appendix C.2.) For each skill, we created a description and an illustrative example of its usage —these were taken from either a textbook or Wikipedia, though occasionally, we modified them to make them clearer or more concise. + +## 3.2 PROCEDURE + +Our evaluation is roughly broken down into two parts (see Figure 2). In the first part, we conduct **generation** , where a (Student) language model is given a set of _k_ skills and a topic, and asked to generate some text demonstrating the _k_ skills in the context of the provided topic. Once the (Student) language model generates some text, it then must be **graded** by a (possibly different) grading language model (i.e., Grader). A simplified version of the prompts used in the generation and grading stages is depicted in Figure 1. + +**Models used for generation** Our dataset is designed to test general skills, and hence many language models may be used in the generation step. However, since the language model must be able to respond to prompt instructions (“generate _k_ skills”), we only pick models that have been instruction-tuned. These models include LLaMA-2-7B-Chat, LLaMA-2-13B-Chat, LLaMA-2-70BChat (Touvron et al., 2023), GPT-3.5-turbo, GPT-4 (OpenAI, 2023), Falcon-180B-Chat (Almazrouei et al., 2023), Xwin-LM-70B-V0.1 (Xwin-LM Team, 2023), Mistral-7B-Instruct-v0.1 (Mistral AI Team, 2023), Qwen-14B-Chat (Bai et al., 2023), Tigerbot-70B-Chat (TigerResearch, 2023). Note Xwin-LM-70B-V0.1, Mistral-7B-Instruct-v0.1, and Qwen-14B-Chat were released only a few days before the deadline, and all of them claim to perform better on benchmarks compared to state-of-theart models of even larger size. + +**Models used for grading** We find that some language models are more suitable for grading than others. Some models have difficulty recognizing the presence of skills, even when they are demonstrated correctly. We use LLaMA-2-70B-Chat and GPT-4 after manually spot-checking grading samples and ensuring they aligned with human grading. + +SKILL-MIX ( _k_ ) consists of picking a random topic and a random subset of _k_ skills (with their respective definitions and illustrative examples) from the list described above, and asking the (Student) model to produce a short piece of text which illustrates all the _k_ skills in the context of the topic of interest. A simplified example prompt appears in Figure 1, but our final prompt includes an additional question that asks the (Student) model to look over and possibly improve its first answer. We find the second answer can be much better than the first one with proper prompt engineering. In addition, we ask the model to separate its answer and explanation with “Answer” and “Explanation.” Otherwise, the model may not separate its generated answer from its explanation, hampering the parsing of the answer. We provide more details about the generation prompts in Appendix C.3.1 + +5 + +The authors took the test (6 questions each with _k_ = 4) to assess the feasibility and difficulty level. The average time taken to understand the prompt and type the answer was more than 7 minutes. This is not an easy test for humans! + +## 4 AUTO-GRADING METHOD + +For each prompt sampled from SKILL-MIX ( _k_ ), the (Student) model’s corresponding answer is graded according to the following criteria: (1) the _k_ skills are present and used properly in the output; (2) the output is on the given topic; (3) the number of sentences in the output is within the provided limit, which we set to be _k −_ 1; and (4) the output is a piece of sensible text. For any of the above subtasks, partial credit can be assigned if the answer partially satisfies the requirement. + +The generations by the models were graded using GPT-4 as well as LLaMA-2-70B-Chat, and these grades were then spot-checked by the paper authors. In the trial run, we focused on tweaking the method for best results and consistency using a small set of around 20 generations. As usual, the assessments generated by the grading models (especially LLaMA-2) were somewhat sensitive to the prompt. We tweaked the grading prompt by including a summarized version of the generation prompt, providing definitions and illustrative examples of the individual _k_ skills, and requesting for the graded output to follow a particular format. + +While both models are creditable graders, they, like all current LLMs, were unreliable at simple arithmetic, which is important for calculating a total score. We changed the prompt to require the grader to output separate grades for individual components (proper use of skills, good fit to the topic, and producing sensible text), which were subsequently aggregated (see Figure 3) using a separate but simple Python script[3] . + +To require separate grades for individual components, we asked GPT-4 to provide a rubric-table style grade, whereas for for LLaMA-2, we simply asked the model to include “Point earned: 1” if the requirement is met, and “Point earned: 0” otherwise, for each rubric item in the evaluation. More details, as well as the full grading prompt, appear in Appendix C.3.2. + +**Human Grading: Better?** With a small test we conducted with five NLP researchers, we found that human grading is noisy, and human graders might need significant training so they can agree on a grading rubric. The standard deviation between the human grading is high, and even higher than the difference between the average human grading and GPT-4 grading.[4] This also indicates that GPT-4 and LLaMA-2 graders are reasonable graders compared to humans. More details of the test can be found in Appendix B. + +## 5 EXPERIMENTAL RESULTS + +In this section, we test various instruction-tuned models (including the LLaMA-2 family, GPT family, Falcon-180B-Chat, Xwin-LM-70B-V0.1, Mistral-7B-Instruct-v0.1, Qwen-14B-Chat, and Tigerbot70B-Chat) on their performance on SKILL-MIX for various _k_ . For convenience, we use _saturation point_ to denote the value of _k_ at which a model’s score in SKILL-MIX drops off. + +From the experimental results, we answer the following questions + +- What differences arise between grading by GPT-4 vs. LLaMA-2? + +- What is the effect of increasing _k_ on SKILL-MIX performance? What is the saturation point for the instruction-tuned models? + +- What is the relationship between model scale and saturation point? We are particularly interested in answering this question for the family of LLaMA-2 models, since they share the same training set and methodology. + +**Setup** We evaluate various instruction-tuned models on SKILL-MIX ( _k_ ) with _k_ = 2 _,_ 3 _,_ 4. We continue to evaluate a model with _k_ = 5 (potential also _k_ = 6) if it does not saturate at _k_ = 4. We use both GPT-4 and LLaMA-2-70B-Chat as Grader. + +> 3We adjusted the point awarded for meeting the number of sentences requirement based on the ground truth. While adjustments were rare, they were more common for LLaMA-2 than GPT-4. + +> 4The difference between the average human grading and LLaMA-2 grading is slightly higher than the standard deviation between humans. + +6 + +Table 1: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** Ratio of Full Marks/Ratio of All Skills/Skill Fraction are reported for each student model at _k_ = 2 _,_ 3 _,_ 4. Evaluations on _k_ = 5 _,_ 6 are skipped if the Ratio of Full Marks drops below 0 _._ 05 with smaller _k_ . Details on prompts can be found in Section 3. See Table 5 for additional metrics. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|.05/.11/.37
.00/.01/.25
.00/.00/.23
-/-/-
-/-/-
.22/.35/.45
.05/.05/.37
.02/.02/.45
-/-/-
-/-/-
.28/.28/.62
.02/.05/.46
.00/.01/.44
-/-/-
-/-/-| +|GPT-3.5-turbo
GPT-4|.53/.60/.75
.20/.25/.59
.08/.13/.54
.04/.16/.51
-/-/-
**.94**/**.97**/**.96**
**.68**/**.70**/**.88**
**.52**/**.55**/**.88**
**.36**/**.38**/**.86**
**.29**/**.29**/**.84**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|.05/.16/.40
.00/.05/.36
.00/.04/.25
-/-/-
-/-/-
.16/.19/.50
.02/.05/.39
.01/.01/.38
-/-/-
-/-/-
.42/.58/.67
.22/.37/.63
.09/.17/.56
.08/.12/.55
-/-/-
.27/.33/.53
.00/.03/.44
.03/.07/.38
-/-/-
-/-/-| +|Tigerbot-70B-Chat|.06/.29/.26
.00/.10/.19
.01/.06/.15
-/-/-
-/-/-| + +For each SKILL-MIX ( _k_ ), we evaluate all models on 100 ( _k_ skills, 1 topic) combinations with GPT-4 grading, and 30 combinations with LLaMA-2 grading.[5] We provide each specific combination of _k_ skills to the (Student) model on three instances (see Figure 2). Each of the three generated texts are also graded three times (to reduce the randomness caused by the Grader), in total creating nine grading results for each ( _k_ skills, 1 topic) (see Figure 3). + +**Metrics** Each generated text can receive up to _k_ + 3 points: 1 point for each correctly illustrated skill, 1 point for sticking to the topic, 1 point for coherence / making sense, and 1 point for having at most _k −_ 1 sentence. Recall that we grade each generated text three times. In each round of grading, we parse each of the criteria individually from the Grader model’s output. For each criterion, we then collect the majority vote among the three grading rounds. The voted points are then converted into various metrics of interest (see Appendix C.5), some of which include + +- _Ratio_[6] _of Full Marks_ : 1 if all _k_ + 3 points are earned, and 0 otherwise + +- _Ratio of All Skills_ : 1 if _k_ points are awarded for the _k_ skills and at least 2 points are awarded for the remaining criteria, and and 0 otherwise + +- _Skill Fraction_ : the fraction of points awarded for the _k_ skills if all 3 points are awarded for the remaining criteria, and 0 otherwise + +We then take the maximum value of the metrics among the 3 generations for a given ( _k_ skill, 1 topic) combination, and average the maximum value across all the combinations. + +**Differences in Grader Scores** From Tables 1 and 4, we clearly observe that LLaMA-2 is a more generous grader than GPT-4. We also observe that when LLaMA-2 is used as the grader, it prefers generations outputted by the LLaMA-2 family. For example, across different metrics, GPT-4 generally gives a higher score to Mistral-7B-Instruct-v0.1 than to LLaMA-2-7B-Chat, but LLaMA-2 grader gives a much higher score to LLaMA-2-7B-Chat than Mistral-7B-Instruct-v0.1 for _k ≥_ 3. Overall, we found via spot-checking the output that GPT-4 is a more accurate and reliable grader than LLaMA-2. + +**Increasing** _k_ **degrades** SKILL-MIX **performance** We observe that the ratio of full marks and the ratio of all skills can decrease dramatically when _k_ increases. With the exception of GPT-4, GPT-3.5-turbo and Xwin-LM-70B-V0.1, all models saturate on or before _k_ = 3 with GPT-4 grading. Amongst the small models, LLaMA-2-7B-Chat and Mistral-7B-Instruct-v0.1 saturate at _k_ = 2. Since LLaMA-2 is more generous, the saturation point is usually delayed by 1 for LLaMA-2 grading. + +**Relationship between model scale and saturation point** We find that as capacity increases on LLaMA-2, so does the saturation point. Observe that for LLaMA-2-7B-Chat, LLaMA-2-13B-Chat, LLaMA-2-70B-Chat, the saturation points (of GPT-4 grading) are _k_ = 2, 3, and 3, respectively. Additionally, for any fixed _k_ and metric type, higher model capacity corresponds to a better score + +> 5Due to computation limits, we only evaluate Falcon-180B-Chat on 30 combinations with GPT-4 grading. + +> 6This is called “ratio” because the metric is later averaged over the 30 combinations, even though this metric is 0 and 1 for a single generation. + +7 + +amongst the LLaMA-2 model family. However, these observations do not necessarily hold true for models from different families. For example, Falcon-180B-Chat has more model parameters than Xwin-LM-70B-V0.1, yet the saturation point of Xwin-LM-70B-V0.1 is higher than that of Falcon-180B-Chat, and Xwin-LM-70B-V0.1 also outperforms Falcon-180B-Chat across all metrics for _k_ = 2 _,_ 3 _,_ 4. + +**A deviation from model rankings on popular LLM leaderboards** Recent models (i.e., Falcon180B-Chat, Xwin-LM-70B-V0.1, Qwen-14B-Chat, Mistral-7B-Instruct-v0.1) are often introduced with their performance evaluated on AlpacaEval or Hugging Face’s Open LLM Leaderboard (which contains ARC (Clark et al., 2018), HellaSwag (Zellers et al., 2019), MMLU (Hendrycks et al., 2020), and TruthfulQA (Lin et al., 2021)), along with a comparison to the LLaMA-2 and GPT families. We find that their superior performance on those evaluations (which is often misaligned with general experience) may not extend to SKILL-MIX : + +- Falcon-180B-Chat and Tigerbot-70B-Chat rank higher than LLaMA-2-70B-Chat on Open LLM Leaderboard, but perform worse on SKILL-MIX for both GPT-4 and LLaMA-2 grading. Tigerbot-70B-Chat performs even worse than LLaMA-2-13B-Chat. + +- Xwin-LM-70B-V0.1 takes on first place on AlpacaEval, beating GPT-4. However, XwinLM-70B-V0.1 is clearly worse than GPT-4 on SKILL-MIX . + +- Qwen-14B-Chat outperforms LLaMA-2-70B-Chat on MMLU, HumanEval (Chen et al., 2021) and GSM8K (Cobbe et al., 2021), but performs worse than LLaMA-2-70B-Chat for _k_ = 2 _,_ 3 _,_ 4 with both GPT-4 and LLaMA-2 grading. + +- Mistral-7B-v0.1 outperforms LLaMA-2 13B on all benchmarks that the Mistral AI team tested. Mistral-7B-Instruct-v0.1 (the model after instruction tuning) outperforms LLaMA-213B-Chat on MT-Bench (Zheng et al., 2023). Yet, the situation is reversed on SKILL-MIX . + +## 6 EVIDENCE FOR GOING BEYOND “STOCHASTIC PARROTS” BEHAVIOR + +As mentioned in the introduction, there is interest in whether or not current models are capable of going past “stochastic parrots” behavior. Using SKILL-MIX we are able to give a guarantee: for _k_ = 5 and _k_ = 6, GPT-4 is generating correct answers a good fraction of time, and a reasonable portion (say more than 1 _/_ 3) of these correct answers contain combinations of skills and topics that have never jointly appeared in the training. We are unable to find similar evidence for any other model. + +Our claim is verified by upperbounding the average frequency of skills _ps_ , the average frequency of topics _pt_ , and the number of sentences in the training corpus _L_ . Then in the training corpus, the total number of text piece that contains _k_ of the skills and one of the topics is bounded by[7] _p[k] s[p][t]_ � _Nk_ � _TL_ . If _αk_ is the model’s “Ratio of Full Marks” in SKILL-MIX ( _k_ ), then the number of text pieces that it successfully generates with _k_ of the skills and one of the topics is at least _αk_ � _Nk_ � _T_ . Thus, the model is “beyond stochastic parrots” if _αk >_[3] 2 _[p] s[k][p][t][L]_[, meaning more than one-third of the successful] generations contain combinations not seen in the training corpus. + +After filtering out skills that have a frequency of at least 5%, we estimate that with high probability, _ps ≤_ 0 _._ 0144, _pt ≤_ 0 _._ 0022 and _L ≤_ 5 _×_ 10[10] on RedPajama dataset (Computer, 2023). Thus, _p[k] s[p][t][L][ ≤]_[0] _[.]_[001][ for] _[ k]_[= 6][, and] _[ p][k] s[p][t][L][ ≤]_[0] _[.]_[07][ for] _[ k]_[= 5][.][Even after filtering out common skills as in] Appendix C.6, GPT-4 still has _α_ 6 _≈_ 0 _._ 08 and _α_ 5 _≈_ 0 _._ 12, which is still “beyond stochastic parrots.” Please see Appendix D for more details of the calculation and estimation. + +## 7 BEST PRACTICES FOR SKILL-MIX ECOSYSTEM + +SKILL-MIX differs from most existing evaluations in two ways: (1) there is no dataset per se; instead, by using _N_ skills and _T_ topics, the tasks (prompts) are generated randomly on the fly from � _Nk_ � _T_ possible combinations; and (2) for moderate _k_ , the task is not easy for humans to solve, or even to grade; at a minimum, high-quality human labor is needed. + +However, note that a dataset of _O_ ( _T_ log _T_ + _N_ log _N_ ) random prompts and corresponding productions already expose (with high probability) the full set of skills and topics, as well as many interesting + +> 7This calculation assumes independence among the occurrence of skills. Verifying _k_ -wise independence becomes computationally very expensive for large _k_ but we verified it for _k_ = 2. + +8 + +ways to combine them. Preliminary results (in Appendix E) suggest that fine-tuning on such a dataset of synthetic productions can improve scores on SKILL-MIX . Since the goal of our evaluation is to test general-purpose text generation capability rather than ability on the particular skills and topics, we propose to release only a random subset of 10% of skills and topics. + +But, ultimately, one needs an evaluation ecosystem. This might consist of independent research groups developing versions of SKILL-MIX (in other words, tests that are chosen randomly from a high number of potential questions) with very different sets of skills and topics, including basic skills related to science, economics, law, etc. Releasing a random subset of, say, 10% of the skills and topics of a new evaluation gives the rest of the world an idea of what it tests –and how it is reasonably distinct from other existing evaluations– while retaining its difficulty. If the research groups are seen as trustworthy, this ecosystem’s continuous assessment of AI capabilities might become important inputs into policy discussions in the future. + +**Difficulty of grading** An open question in the above picture is how to grade harder versions of SKILL-MIX in the future. The obvious idea is to use the current champion model for the evaluation (provided the model retains no memory of its past interactions). But, a natural question arises: whether to trust the champion’s grade for itself. This relates to an interesting debate in pedagogy (Bloom et al., 1956; Anderson & Krathwohl, 2001; Forehand, 2005): _Which is harder: to ace the exam or to grade it well?_ While the answer may seem obvious in quantitative or scientific fields (i.e., acing is harder), this wasn’t obvious in other fields. Today it is more broadly accepted that grading is indeed easier[8] , which suggests that the champion can probably grade itself (assuming the model retains no memory of past interactions), Human spot-checking seems advisable. In our experience, GPT-4’s grading capabilities for a particular _k_ seem to be better than its SKILL-MIX score on the same _k_ ; we plan to further investigate this relationship in future work. On a related note, we found that human spot-checking becomes much easier and more accurate if the grader includes reasoning for grading decisions. + +## 8 CONCLUSIONS AND TAKEAWAYS + +SKILL-MIX is an attempt to evaluate general-purpose language capabilities, specifically, a particular sort of compositional generalization. It tests the model’s ability to create text on a given topic and with a given combination of well-known skills. A key idea is that the skills and the topic are chosen randomly from a big list, which itself can be expanded in many ways to give new evaluations. Such evaluations may end up requiring the (Student) model to imagine and describe situations that does not exactly match anything seen during training. Grading this evaluation is shown to be possible with GPT-4 (and the authors spot-checked the grading). Human evaluations were sought but found to have significant variance. We will try to reduce this variance in the next run with better rubrics and guidance. + +Section 5 showed that the performance of proprietary models on SKILL-MIX ( _k_ ) generally accords with popular perceptions of their quality. The results also show (in line with the theory of Arora & Goyal (2023)) that when created by competent teams, larger models achieve a higher saturation point than smaller models (e.g., the three LLaMA-2 models, which shared their training data and methodology). The disappointing performance of Falcon-180B-Chat was an exception. Several open models show signs of being over-trained for leaderboards at the expense of general-purpose language capabilities (“cramming”). Furthermore, based on our calculations, GPT-4’s reasonable performance on SKILL-MIX ( _k_ = 5) indicates that GPT-4 surpasses “stochastic parrot” behavior (Bender et al., 2021). Of course, no single evaluation can be considered definitive. In future work, we hope to explore whether there are “cramming” shortcuts to improve performance on SKILL-MIX . + +Since current leaderboards show signs of losing their discriminative power, Section 7 sketched a vision for an ecosystem of independent SKILL-MIX evaluations specializing in different sets of skills and topics (most of which would be kept secret) that could provide trusted estimates of model capabilities —both as input to public discussions of AI and as a deterrent against “cramming for leaderboards”. SKILL-MIX scores track our colleagues’ subjective assessments of current models. + +Soon, many AI models will be multi-modal, and we hope to design a multi-modal version of SKILL-MIX for them. + +> 8But the variance we saw among human graders on our SKILL-MIX reminds us of the difficulty of grading exams where there is no obvious best answer. + +9 + +## REFERENCES + +- Ebtesam Almazrouei, Hamza Alobeidli, Abdulaziz Alshamsi, Alessandro Cappelli, Ruxandra Cojocaru, Maitha Alhammadi, Mazzotta Daniele, Daniel Heslow, Julien Launay, Quentin Malartic, Badreddine Noune, Baptiste Pannier, and Guilherme Penedo. The falcon series of language models: Towards open frontier models. 2023. + +- Lorin W. Anderson and David R. Krathwohl (eds.). _A Taxonomy for Learning, Teaching, and Assessing. A Revision of Bloom’s Taxonomy of Educational Objectives_ . Allyn & Bacon, New York, 2 edition, December 2001. ISBN 978-0801319037. + +- Sanjeev Arora and Anirudh Goyal. A theory for emergence of complex skills in language models. _arXiv preprint arXiv:2307.15936_ , 2023. + +- 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. + +- Edward Beeching, Clementine´ Fourrier, Nathan Habib, Sheon Han, Nathan Lambert, Nazneen Rajani, Omar Sanseviero, Lewis Tunstall, and Thomas Wolf. Open llm leaderboard. https: //[URL removed] 2023. + +- Emily M Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big? In _Proceedings of the 2021 ACM conference on fairness, accountability, and transparency_ , pp. 610–623, 2021. + +- B. S. Bloom, M. B. Engelhart, E. J. Furst, W. H. Hill, and D. R. Krathwohl. _Taxonomy of educational objectives. The classification of educational goals. Handbook 1: Cognitive domain_ . Longmans Green, New York, 1956. + +- 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. + +- Mayee F Chen, Nicholas Roberts, Kush Bhatia, Jue Wang, Ce Zhang, Frederic Sala, and Christopher Re.´ Skill-it! a data-driven skills framework for understanding and training language models. _arXiv e-prints_ , pp. arXiv–2307, 2023. + +- Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge, 2018. + +- Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. _arXiv preprint arXiv:2110.14168_ , 2021. + +- Together Computer. Redpajama: An open source recipe to reproduce llama training dataset, 2023. URL [URL removed] + +- Louise Cummings. Pragmatics: a multidisciplinary perspective. In _Edinburgh University Press_ , 2005. + +- Mary Forehand. _Emerging perspectives on learning, teaching, and technology._ , chapter Bloom’s taxonomy: Original and revised. 2005. + +- Leo Gao, Jonathan Tow, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Kyle McDonell, Niklas Muennighoff, Jason Phang, Laria Reynolds, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A framework for few-shot language model evaluation, September 2021. URL [URL removed] + +10 + +Google. Google ngram viewer. [URL removed] 2012. URL http: //books.google.com/ngrams/datasets. + +- Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. _arXiv preprint arXiv:2009.03300_ , 2020. + +- G Hinton and A Ng. A conversation about ai risk. URL [URL removed] status/1667920020587020290?lang=en. + +- Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. _arXiv preprint arXiv:2106.09685_ , 2021. + +- David Kelly. The art of reasoning. an introduction to critical and logical thinking. In _WW Norton & Company Inc_ , 2014. + +- Kenneth R Koedinger, Elizabeth A McLaughlin, and John C Stamper. Automated student model improvement. _International Educational Data Mining Society_ , 2012. + +- Kenneth R Koedinger, Paulo F Carvalho, Ran Liu, and Elizabeth A McLaughlin. An astonishing regularity in student learning rate. _Proceedings of the National Academy of Sciences_ , 120(13): e2221311120, 2023. + +- Nan Li, Eliane Stampfer, William Cohen, and Kenneth Koedinger. General and efficient cognitive model discovery using a simulated student. In _Proceedings of the Annual Meeting of the Cognitive Science Society_ , volume 35, 2013. + +- Xuechen Li, Tianyi Zhang, Yann Dubois, Rohan Taori, Ishaan Gulrajani, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Alpacaeval: An automatic evaluator of instruction-following models. [URL removed] 2023. + +- Yucheng Li. Estimating contamination via perplexity: Quantifying memorisation in language model evaluation, 2023. + +- Stephanie Lin, Jacob Hilton, and Owain Evans. Truthfulqa: Measuring how models mimic human falsehoods. _arXiv preprint arXiv:2109.07958_ , 2021. + +Edward Loper and Steven Bird. Nltk: The natural language toolkit. _arXiv preprint cs/0205028_ , 2002. + +Mistral AI Team. Mistral 7b, 9 2023. URL [URL removed] announcing-mistral-7b/. + +Erik T Mueller. _Commonsense reasoning: an event calculus based approach_ . Morgan Kaufmann, 2014. + +- Arvind Narayan and Sayash Kapoor. Gpt-4 and professional benchmarks: the wrong answer to the wrong question. URL [URL removed] gpt-4-and-professional-benchmarks. + +- Shaun Nichols and Stephen P Stich. Mindreading. an integrated account of pretence, self-awareness, and understanding other’s minds. In _Oxford University Press_ , 2003. + +OpenAI. Gpt-4 technical report, 2023. + +- Karl Pertsch, Youngwoon Lee, and Joseph Lim. Accelerating reinforcement learning with learned skill priors. In _Conference on robot learning_ , pp. 188–204. PMLR, 2021. + +- Laura Ruis, Akbir Khan, Stella Biderman, Sara Hooker, Tim Rocktaschel, and Edward Grefenstette.¨ Large language models are not zero-shot communicators. _NeuRIPS_ , 2023. + +- Philipp Schmid, Omar Sanseviero, Pedro Cuenca, Leandro von Werra, and Julien Launay. Spread your wings: Falcon 180b is here, 9 2023. URL [URL removed] falcon-180b. + +11 + +TigerResearch. TigerBot: A cutting-edge foundation for your very own llm. [URL removed] com/TigerResearch/TigerBot, 2023. Accessed: 2023-09-30. + +- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. _arXiv preprint arXiv:2307.09288_ , 2023. + +Xwin-LM Team. Xwin-lm, 9 2023. URL [URL removed] + +Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence?, 2019. + +- 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. + +12 + +## A LIST OF SKILLS AND TOPICS + +Here we release a random sample of 10% of the skill list and topic list. We do not release the full lists to avoid potential “cramming” for SKILL-MIX . + +Table 2: 10 randomly sampled skills from the 101 skills we used in SKILL-MIX evaluation. + +|**Category**|**Skill**|**Defnition**|**Example**| +|---|---|---|---| +|reasoning|self serving bias|A cognitive or perceptual|“If I do well on the exam,| +|||process that is distorted|it’s because of my academic| +|||by the need to maintain|prowess and hard work. If| +|||and enhance one’s self es-|I do poorly, it’s because the| +|||teem.|course was poorly taught,| +||||and the exam was poorly| +||||proctored.”| +|rhetorical|accident (fallacy)|an informal fallacy and|Cutting people with knives is| +|||a deductively valid but|a crime. Surgeons cut peo-| +|||unsound argument oc-|ple with knives.
Surgeons| +|||curring in a statistical|are criminals.| +|||syllogism (an argument|| +|||based on a generaliza-|| +|||tion) when an exception|| +|||to a rule of thumb is ig-|| +|||nored.|| +|rhetorical|complex question|A question that is loaded|“Why are you lying to me?”| +||(loaded question|with an implicit assump-|is a question that presup-| +||with implicit as-|tion.|poses you are lying to me.| +||sumption )||Any answer you give will| +||||force you to agree you are| +||||lying.| +|rhetorical|red herring|Introducing
irrelevant|A member of the press asks| +|||points to detract attention|the president why they voted| +|||from a question.|to expand a welfare program.| +||||The president responds, “The| +||||strength of America is the| +||||strength of its communities,| +||||and I am proud to make our| +||||communities betterplaces.”| +|literary|metaphor|a fgure of speech that,|“All the world’s a stage,| +|||for rhetorical effect, di-|And
all
the
men
and| +|||rectly refers to one thing|women merely players” is| +|||by mentioning another.|a metaphor because it’s a| +||||comparison without using| +||||“like” or “as.”| +|logical|spatial reasoning|The capacity to reason|The key ft into the box. Us-| +|||about the spatial relation-|ing spatial reasoning, one| +|||ships between objects.|can deduce that the width of| +||||the key was smaller than the| +||||width of the box.| +|logical|modus ponens|A syllogism that is of|“If today is Tuesday, then| +|||the form “If P then Q. P.|John will go to work. Today| +|||Hence Q.”|is Tuesday. Therefore, John| +||||willgo to work.”| + +13 + +|logical||statistical|statistical|syllo-|A syllogism that argues,|“Almost all people are taller| +|---|---|---|---|---|---|---| +|||gism|||using inductive reason-|than 26 inches. Gareth is a| +||||||ing, from a generaliza-|person. Therefore, Gareth is| +||||||tion true for the most part|taller than 26 inches.”| +||||||to aparticular case.|| +|theory|of|emotional self reg-|||a complex process that in-|Examples of emotional self| +|the mind||ulation|||volves initiating, inhibit-|regulation include meditat-| +||||||ing, or modulating one’s|ing, pausing to collect one-| +||||||state or behavior in a|self before speaking, and| +||||||given situation.|practicing
stress
manage-| +|||||||ment.| +|physical||folk physics (com-|||The untrained human per-|“If I roll the pen off of the| +|knowl-||mon|knowledge||ception of basic physical|table, it will fall to the foor.”| +|edge||physics)|||phenomena.|| + +Table 3: 10 random sampled topics from 100 topics used in SKILL-MIX evaluation. + +**Topic** Sewing Dueling The Ottoman Empire Triathlons Beekeeping Survivalism Guerilla warfare Gardening Knots Urbanism + +## B HUMAN GRADING TEST + +We will now describe a test we conducted to measure the grading quality of human graders. Our five volunteers were Ph.D. students and Postdocs working in the field of natural language processing and large language models. They were given 5 outputs generated by GPT-4 on SKILL-MIX (4). The same grading prompt for machine grading was given to human graders, asking them to give each individual point for the criteria. In this case ( _k_ = 4), each output could receive at most 7 points. + +For each point, we computed the mean and standard deviation among the human graders and then averaged over all the points (35 in total). The average standard deviation is 0.261. On the other hand, we compare the average of human grading with GPT-4 and LLaMA-2 grading. For each point, we computed the absolute difference between the mean among the humans and machine grading. Then, we took the average over 35 points. We found that the average difference is 0.257 for GPT-4 grading and 0.268 for LLaMA-2 grading. This means if we assume the average of human grading is the ground truth, then human graders and machine graders have similar errors. + +We also observe that human graders in general give lower scores for text making sense, probably because the output is usually a shortened version of the model’s first attempt. In contrast, the machine graders usually award the point for “making sense” for more than 90% of the generated answers. + +## C EXPERIMENTS + +## C.1 EXPERIMENTAL DETAILS + +Our evaluation is roughly broken down into two parts. In the first part, we conduct **generation** , where a language model is given a set of _k_ skills and a topic and asked to generate some text demonstrating + +14 + +the _k_ skills. Once some text has been generated, it then must be **graded** by a (possibly different) language model. + +**==> picture [397 x 141] intentionally omitted <==** + +**----- Start of picture text -----**
+PART 1: GENERATION PART 2: GRADING
Generate M
( k skill, 1 topic) combinations Generated Text (Round 1) Get Aggregated Grade
1 Generated Text (Round 2) Get Aggregated Grade Take maximum score
2
Select a 3 Generated Text (Round 3) Get Aggregated Grade
Student Model
for Part 1
Select a Grader Model … Report average over M scores
for Part 2 Generated Text (Round 1) Get Aggregated Grade
M Generated Text (Round 2) Get Aggregated Grade Take maximum score
Generated Text (Round 3) Get Aggregated Grade
…
**----- End of picture text -----**
+ +Figure 2: **Illustration of** SKILL-MIX **(** _k_ **) pipeline.** In our experiments, we use _M_ = 30. For a more detailed illustration of grading a single piece of generated text, see Figure 3. + +**Models used for generation.** Our dataset is designed to test general skills, and hence many language models may be used in the generation step. However, since the language model must be able to respond to prompt instructions (”generate k skills”), we pick only models that have been instruction-tuned. These models include LLaMA-2-7B-Chat, LLaMA-2-13B-Chat, LLaMA-2-70BChat (Touvron et al., 2023), GPT-3.5-turbo, GPT-4 (OpenAI, 2023), Falcon-180B-Chat (Almazrouei et al., 2023), Xwin-LM-70B-V0.1 (Xwin-LM Team, 2023), Mistral-7B-Instruct-v0.1 (Mistral AI Team, 2023), and Qwen-14B-Chat (Bai et al., 2023). + +**Models used for grading.** We find that some language models are more suitable for grading than others. Some models have difficulty recognizing the presence of skills, even when they are demonstrated correctly. We use LLaMA-2-70B-Chat and GPT-4 after manually spot-checking grading samples and ensuring they align with human grading. + +**Details of model configurations** We do not use quantization on any of the models. For the GPT family, we use OpenAI API with default generation configuration and the minimal system prompt “You are a helpful assistant.” For the LLaMA-2 family, we use 2 A100 GPU and run with no system prompt, 0.7 temperature, 1.0 repetition penalty, and 512 max new tokens. For Falcon-180BChat, we use the prompt format mentioned in the official Huggingface blog of Falcon-180B-Chat (Schmid et al., 2023) and the same parameters as LLaMA-2 family. For Xwin-LM-70B-V0.1, we use the official prompt format (Xwin-LM Team, 2023) and the same hyperparameters as those used for the LLaMA-2 family. For Mistral-7B-Instruct-v0.1, we access the prompt format with tokenizer.apply ~~c~~ hat ~~t~~ emplate function and again the same parameters as the LLaMA-2 family. For Qwen-14B-Chat, we directly use the model.chat function as mentioned in their official Github repository. + +## C.2 SKILL CHOOSING PROCESS + +The list of _≈_ 100 skills used to draw tuples of _k_ skills was manually curated, and designed to include skills the average person could understand which were common enough that they would appear on Wikipedia (and hence in the model’s pre-training data). We pick skills from standard textbooks on logic (Kelly., 2014), pragmatics (Cummings, 2005) and theory of mind (Nichols & Stich, 2003). We also pick literary skills from Wikipedia. Not all skills were considered suitable for our dataset. Because we want to evaluate the ability of models to compose skills, we eliminate skills that are trivially present in almost any piece of text. Below is an example of a skill that was eliminated from our dataset because it is so common in the English language that the model may “accidentally” generate it, thereby falsely appearing as though it is able to combine this skill with other skills. + +Skill: Pied Piping Definition: A syntax phenomenon whereby a given expression brings along an accompanying phrase when it is moved. + +15 + +**==> picture [396 x 298] intentionally omitted <==** + +**----- Start of picture text -----**
+GRADING ROUND 1 AGGREGATE ALL POINTS
RUBRIC ITEMS Aggregation Options
Each item is worth 1 point
●● Correctly illustrates Skill 1Correctly illustrates Skill 2 … Ratio of Full Marks( = 1 if (0 otherwise A + B ) == ( A, k B + 3) )
● Correctly illustrates Skill k
Ratio of All Skills
●● On TopicMakes sense = 1 if (0 otherwise A == k ) and ( B ≥ 2)
● At most k-1 sentences AGGREGATE INDIVIDUAL POINTS
RUBRIC ITEMS Skills Fraction
GRADING ROUND 2 Each item is worth 1 point = A 0 otherwise/ k if ( B == 3)
RUBRIC ITEMS Each item is worth 1 point ●● Correctly illustrates Skill 1Correctly illustrates Skill 2 … Take sum A Total Score = AA + B
Generated Text ●● Correctly illustrates Skill 1Correctly illustrates Skill 2 … ●● Correctly illustrates Skill On Topic k Take sum Total Skill ScoreB
● Correctly illustrates Skill k ●● Makes senseAt most k-1 sentences B = A
● On Topic
● Makes sense Rescaled Score
● At most k-1 sentences Aggregating Options (for a single rubric item)● Average = A k + 3 + B k + 3
● Max
GRADING ROUND 3
RUBRIC ITEMS
Each item is worth 1 point
● Correctly illustrates Skill 1
● Correctly illustrates Skill 2
…
● Correctly illustrates Skill k
● On Topic
● Makes sense
● At most k-1 sentences
**----- End of picture text -----**
+ +Figure 3: **Illustration of obtaining aggregated grade** This illustration depicts the process used to grade a single generated piece of text. + +16 + +Ex: She bought ‘‘that house’’. ‘‘Which house’’ did she buy? The preceding is an example of pied piping because the word ‘‘Which’’ brings along the word ‘‘house’’ in the ‘‘Wh...’’ clause. + +For similar reasons, we also eliminate skills that inherently compose poorly with other skills. An example is given below: + +Skill: situational irony Ex: A firehouse burning down is situational irony, as one would not expect a place that puts out fires to burn. + +Finally, some skills were not included due to being hard, even for a human grader, to grade whether the skill was present. + +Definitions for skills vary between different sources and textbooks. Since the model was pre-trained on Wikipedia, we prefer the Wikipedia definition over other sources when available. + +Skill examples were scraped from the internet, but chosen by human evaluators to be short and unambiguous. + +## C.3 PROMPT DESIGN + +We experiment with different prompts for both generation and grading. We find that prompts can perform quite differently. We list some examples of prompts we considered below. + +## C.3.1 GENERATION PROMPTS + +We try several different prompts when asking the models to generate tuples of _k_ skills, and find that prompt selection does influence the quality of the generation. In general, our prompts contain two questions, giving the model the chance to look over its first answer and improve it. Without giving specific instructions about the format, we found it hard to parse the model output for grading because the model may not separate the generated answer from its explanation. Hence, we asked the model to separate its answer and explanation with ”Answer:” and ”Explanation:”. Here is our first prompt with the formatting instructions: + +Greetings! I am interested in natural language processing and I was wondering if you could help me generate an example of text that illustrates multiple skills in semantics or syntax. The example should be a single piece of text with _{_ num ~~s~~ entences ~~s~~ tr _}_ in the context of _{_ topic _}_ that illustrates all of the following skills: _{_ skills ~~s~~ tr _}_ . _{_ skills ~~d~~ efs ~~a~~ nd ~~e~~ xamples _}_ Please keep the text short so it can fit in _{_ num sentences ~~s~~ tr _}_ , and please make sure the concepts can be found fully from the text. Please start the text with ’Answer:’ and start the explanation with ’Explanation:’. Thanks very much! Thanks very much. Now could you look it over and shorten your example but make sure it still illustrates all the skills? + +Using this prompt, we observe that the models do not always follow the instructions, especially for the second answer. We also observed that the second answer is sometimes worse than the first generation, partially because some of the skills are also removed when shortening the answer. + +To overcome the shortages, we present our 8th attempt at the generation prompt below. + +Greetings! I am interested in natural language processing and I was wondering if you could help me generate an example of text that illustrates multiple skills in semantics or syntax. The example should be a minimal natural piece of text with up to a few lines in the context of _{_ topic _}_ that illustrates all of the following skills: _{_ skills str _}_ . Please keep the text as short as possible, and make sure the concepts can be found fully from the text. For reference, here are the definitions and examples for the concepts: _{_ skills ~~d~~ efs ~~a~~ nd ~~e~~ xamples ~~s~~ imple _}_ + +17 + +Please start the minimal natural piece of text with ’Answer:’ and start the explanation with ’Explanation:’. Thanks very much! + +Thanks very much. Could you please look over the minimal natural piece of text and possibly improve and shorten it (up to _{_ num ~~s~~ entences ~~s~~ tr _}_ )? If you make changes, please make sure that the text still illustrates all skills and remains on topic. Again, please start the improved minimal natural piece of text with ’Answer:’ and start the explanation with ’Explanation:’. Thanks very much! + +Although there still exists rare failure cases for some models (demonstrated in Appendix C.4.1), the instructions are mostly followed by all models with this version of the prompt. The quality of the second answer is also significantly better when we remove the length constraints on the first answer, and give the model the option of shortening the text (rather than the requirement) for the second answer. + +In the later tuning of the prompt, we further emphasize the improvement of the second answer, and find the performance of GPT-4 continues to improve. The same prompt also improves Xwin-LM70B-V0.1, but makes LLaMA-2 family perform slightly worse on _k >_ 2 (in those cases, we use the previous prompt). Our final prompt is recorded below. + +Greetings! I am interested in natural language processing and I was wondering if you could help me generate an example of text that illustrates multiple skills in semantics or syntax. The example should be a minimal natural piece of text with up to a few lines in the context of _{_ topic _}_ that illustrates all of the following skills: _{_ skills str _}_ . Please keep the text as short as possible, and make sure the concepts can be found fully from the text. For reference, here are the definitions and examples for the concepts: _{_ skills ~~d~~ efs ~~a~~ nd ~~e~~ xamples ~~s~~ imple _}_ Please start the minimal natural piece of text with ’Answer:’ and start the explanation with ’Explanation:’. + +Thanks very much! + +Thanks very much. Could you please look over your answer and improve it? Please make sure that the new answer better illustrates all skills and remains on topic. On top of that, please also make sure the new answer only contains up to _{_ num ~~s~~ entences str _}_ . Again, please start the improved minimal natural piece of text with ’Answer:’ and start the explanation with ’Explanation:’. Thanks very much! + +## **Example of LLaMA-2-70B-Chat generation response** + +Sure, here’s an example of a minimal natural piece of text that illustrates both emotional self regulation and folk physics in the context of sewing: Answer: "I’m so frustrated with this sewing project. I’ve been working on it for hours and it’s still not turning out right. I just want to throw my sewing machine out the window!" Explanation: This text illustrates emotional self regulation because it shows the speaker’s ability to recognize and manage their emotions. The speaker is feeling frustrated and angry, but instead of acting on those emotions and doing something impulsive (like throwing the sewing machine out the window), they pause and express their feelings in a more controlled way. This shows that they are regulating their emotions in order to avoid doing something they might regret. The text also illustrates folk physics because it implies a basic understanding of cause-and-effect and the behavior of objects in the physical world. The speaker’s statement about throwing the sewing machine out the window implies that they understand that objects will fall to the ground if dropped, and that breaking the machine would be a consequence of their actions. This demonstrates an untrained human perception of basic physical phenomena, which is a key aspect of folk physics. + +18 + +Sure, here’s an improved example that better illustrates both emotional self-regulation and folk physics in the context of sewing, and is only one sentence long: Answer: "I’m taking a deep breath and pausing before ripping out this seam for the fifth time, because I know I’ll just get frustrated and make more mistakes if I don’t calm down." Explanation: This text illustrates emotional self-regulation because it shows the speaker actively regulating their emotions by taking a deep breath and pausing before proceeding with a potentially frustrating task. It also illustrates folk physics because it implies an understanding of the cause-and-effect relationship between the speaker’s emotions and their ability to perform the task accurately. The speaker recognizes that if they don’t calm down, they are more likely to make mistakes, demonstrating an understanding of the impact of their emotions on their physical actions. + +## C.3.2 GRADING PROMPTS + +We also try several different prompts when asking the model to grade a response. Unsurprisingly, we find that prompt selection once again does influence grading. In general, our prompts ask the (Grader) model to score the student’s response according to the rubric criteria. + +Below is the final prompt we provided to GPT-4 for grading. + +Greetings! I was wondering if you could help me grade the following answer given by a student. I’ll first describe the question that was given to the student, and then give you the student’s answer, and the grading rubric. The question given to the student was as follows: ‘‘Give a single piece of text with up to _{_ num sentences ~~s~~ tr _}_ in the context of topic. This single piece of text should illustrate all of the following skills: _{_ skills str _}_ .’’ The student’s answer was: ‘‘ _{_ student ~~a~~ nswer _}_ ’’ For reference, here are the definitions for the skills: _{_ skills ~~d~~ efs ~~a~~ nd ~~e~~ xamples ~~s~~ imple _}_ Using a rubric table format, please grade the student’s answer with positive scoring. Each criterion is worth 1 point. The criteria are: _{_ rubric ~~i~~ tems _}_ . The table should only have the following columns: ‘Criteria’, ‘Points Earned’. In the ‘Points Earned’ column, please provide only numerical values with no additional formatting. Please introduce the table with ‘Here’s the grading table:’ and please include a row for ‘Total Points Earned’ at the end of the table. Finally, please start your grading explanation with ‘Explanation’: + +Below is the final prompt we provided to LLaMA-2-70B-Chat for grading. + +Greetings! I was wondering if you could help me grade the following answer given by a student. I’ll first describe the question that was given to the student, and then give you the student’s answer, and the grading rubric. The question given to the student was as follows: ‘‘Give a single piece of text with up to _{_ num sentences ~~s~~ tr _}_ in the context of _{_ topic _}_ . This single piece of text should illustrate all of the following skills: _{_ skills str _}_ .’’ The student’s answer was: ‘‘ _{_ student ~~a~~ nswer _}_ ’’ For reference, here are the definitions for the skills: _{_ skills ~~d~~ efs _}_ Please grade the student’s answer using the following criteria: _{_ rubric ~~i~~ tems _}_ . For each item in the rubric, please include in your evaluation ‘Point earned: 1’ if the requirement is met and ‘Point earned: 0’ otherwise. Please finish your grading with ‘Grade:’ followed by a number indicating the total points earned by the student. Thanks so much. + +The following failure cases guided up towards our final grading prompt and manual-point-extraction scheme. + +- The model would assign points for individual rubric criteria, but then total them up incorrectly + +19 + +- We say we are grading a student’s answer. There is some amount of LLM sycophancy if we say it is a professor’s answer. + +- Without definition in prompt, the model mistakes certain skills for the common English meanings. + +We will now provide examples of these failure cases based on real outputs. + +## C.3.3 UNABLE TO OUTPUT CORRECT TOTAL SCORE + +The following example is based on a real grading response by LLaMA-2-70B-Chat. Observe that the grader model assigns points for each of the rubric criteria, but does not correctly total them up (the correct total is 4, not 3). Because scenarios like these were common, we used a simple Python script to extract the individual points associated with each rubric item to calculate the final score. + +Sure, I’d be happy to help you grade the student’s answer. Here’s my evaluation using the given rubric: 1. Contains red herring: The student’s answer demonstrates red herring in the sentence, where Mrs. Thompson diverts attention from the main issue at hand, so Point earned: 1. 2. Contains modus ponens: The student’s answer does not contain any explicit illustration or use of modus ponens. Therefore, Point earned: 0. 3. Pertains to Gardening: The student’s answer clearly relates to Gardens, as it mentions the garden’s sprinkling system. Point earned: 1. 4. Text makes sense: The student’s answer is a coherent sentence that makes sense in the context of gardening. Point earned: 1. 5. At most one sentence: The student’s answer is a single sentence, which meets the requirement. Point earned: 1. Grade: 3 out of 5. The student’s answer demonstrates the use of red herring and pertains to gardening, but it does not contain modus ponens. The text makes sense and is limited to a single sentence, which meets the given criteria. + +## C.3.4 MISTAKES WITH SKILL MEANING (USE OF COMMON ENGLISH MEANING) + +The following example is based on a real grading response by LLaMA-2-70B-Chat. Observe that the grader model interprets “complex question” by its meaning in colloquial English, rather than the meaning associated with logical fallacy. + +Sure, I’d be happy to help you grade the student’s answer. Here’s my evaluation using the given rubric: 1. Contains red herring: The student’s answer demonstrates red herring in the sentence, where Mrs. Thompson diverts attention from the main issue at hand, so Point earned: 1. 2. Contains complex question: The student’s answer contains the complex question asked by Mrs. Thompson, ‘‘How do you reconcile your current career with what you dreamed of doing as a child?’’ Therefore, Point earned: 1. 3. Pertains to Gardening: The student’s answer clearly relates to Gardens, as it mentions the garden’s sprinkling system. Point earned: 1. 4. Text makes sense: The student’s answer is a coherent sentence that makes sense in the context of gardening. Point earned: 1. 5. At most one sentence: The student’s answer is a single sentence, which meets the requirement. Point earned: 1. Grade: 5 out of 5. The student’s answer demonstrates the use of red herring and complex question. The text makes sense and is limited to a single sentence, which meets the given criteria. + +## C.4 FAILURE CASES WITH FINAL PROMPT + +With our final prompt, most of the generation and grading work well. However, there are still failure cases, especially for relatively weaker models and larger _k_ . Descriptions of some failure cases are below: + +- Model is unable to follow the instructions, e.g., unable to output “Answer:” before the text for generation, and unable to output the table for grading. + +- Model would directly use the word (name of skill) in the generation instead of demonstrating the skill + +20 + +- Some of the _k_ skills are simply left out of the generation + +- Partially correct skills, e.g. logic skills where a premise was not explicitly stated, or the implication was partially wrong. + +We will now provide examples of these failure cases. Note that these examples are not real; instead, they are modeled off of real outputs from particular models and values of _k_ . We do this to respect the release of 10 skills and 10 topics randomly sampled from out master list of skills and topics, to avoid potential “cramming” for SKILL-MIX . + +## C.4.1 UNABLE TO FOLLOW THE INSTRUCTIONS + +Falcon-180B-Chat sometimes does not follow the instructions for generation. This example below is inspired by a real response provided by Falcon-180B-Chat for _k_ = 3: + +**[Answer:] ** Explanation: The **red herring** is shown in the first and second sentence, where Mrs. Thompson diverts attention from the main issue at hand. The **spatial reasoning** is present in the second sentence with the discussion of "how better plumbing routes could save water". The **self-serving bias** is displayed in the second sentence where Mrs. Thompson "tried to deflect blame from personal high water usage". At the town meeting about the water shortage, Mrs. Thompson, who had recently installed a lavish traditional gardening system in her yard sprinkler system to water her garden, blamed the town’s poor plumbing for the crisis. While many were drawn into her spatial reasoning about how better plumbing routes could save water, some recognized that her self-serving bias was evident, as she tried to deflect blame from personal high water usage and onto the town’s infrastructure. + +Here is another failure case inspired by a real response by LLaMA-2-7B-Chat for _k_ = 4: + +Answer: Sure, I’d be happy to help you with that! Here’s an example of a minimal natural piece of text that illustrates multiple skills in semantics or syntax: Explanation: "At the town meeting about the water shortage, Mrs. Thompson, who had recently implemented a lavish traditional gardening system in her yard, asked, "Given that our town’s plumbing is outdated and we all want green spaces, shouldn’t we first consider overhauling our water distribution system?" While many were drawn into her spatial reasoning about how better plumbing routes could save water, some recognized that her self-serving bias was evident, as she tried to deflect blame from personal high water usage and onto the town’s infrastructure." This text demonstrates the following skills in semantics or syntax: 1. Red Herring: In the second sentence, during a discussion about a water shortage, Mrs. Thompson introduces an irrelevant point to detract attention from her new gardening system. 2. Spatial Reasoning: In the second sentence, Mrs. Thompson uses spatial reasoning to discuss how better plumbing routes could save water. 3. Self Serving Bias: In the second sentence, some towns members recognize that Mrs. Thompson discusses plumbing routes in the first place stems from her need to maintain her self-esteem. 4. Complex Question: In the first sentence, Mrs. Thompson asks a question that indicates the implicit assumption that everyone in the town wants green space. Overall, this text shows how these skills in semantics or syntax can be applied in a natural and coherent way in a short piece of text. + +In these situations, models for grading may receive “**” or an empty string as the student’s answer. So they sometimes fail to output the table of points. The following is a typical failure case output by GPT-4: + +As the student’s answer was missing, I will unfortunately be unable to grade it or provide the necessary feedback. Could you please provide me with the student’s answer? + +21 + +Table 4: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by LLaMA-2-70B-Chat.** Ratio of Full Marks/Ratio of All Skills/Skill Fraction are reported for each student model at _k_ = 2 _,_ 3 _,_ 4. Evaluations on _k_ = 5 _,_ 6 are skipped if the Ratio of Full Marks drops below 0 _._ 3 with smaller _k_ . Details on prompts can be found in Section 3. See Table 6 for additional metrics. + +|dditional metrics.|| +|---|---| +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|.53/.63/.72
.33/.50/.70
.13/.13/.66
-/-/-
-/-/-
.63/.87/.73
.33/.63/.54
.33/.43/.74
.13/.17/.47
-/-/-
**.90**/**.97**/**.93**
.47/.50/.81
.40/.47/.75
.13/.23/.55
-/-/-| +|GPT-3.5-turbo
GPT-4|.77/.80/.83
.53/.53/.77
.33/.33/.71
.20/.40/.62
-/-/-
**.90**/.93/.92
**.87**/**.87**/**.94**
**.57**/**.60**/**.87**
**.63**/**.67**/**.90**
**.27**/**.33**/**.77**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|.53/.80/.67
.17/.33/.44
.03/.23/.31
-/-/-
-/-/-
.60/.70/.68
.37/.47/.59
.30/.33/.60
.17/.20/.53
-/-/-
.83/.90/.88
.67/.80/.81
.43/.57/.75
.27/.43/.69
-/-/-
.53/.63/.65
.30/.33/.61
.03/.17/.49
-/-/-
-/-/-| +|Tigerbot-70B-Chat|.20/.45/.30
.00/.17/.15
.00/.00/.12
-/-/-
-/-/-| + +## C.4.2 USING THE NAME OF THE SKILL DIRECTLY IN THE TEXT + +Here is an example inspired by real text generated by GPT-4. The requested skills are red herring, spatial reasoning, self serving bias, and complex question. + +Answer: "At the town meeting about the water shortage, Mrs. Thompson, who had recently implemented a lavish traditional gardening system in her yard, asked, "Given that our town’s plumbing is outdated and we all want green spaces, shouldn’t we first consider overhauling our water distribution system?" While many were drawn into her spatial reasoning about how better plumbing routes could save water, a few discerned it as a red herring and recognized that her self-serving bias was evident, as she tried to deflect blame from personal high water usage and onto the town’s infrastructure." + +## C.4.3 SOME OF THE _k_ SKILLS LEFT OUT OF THE GENERATION + +The example below is inspired by real text generated by LLaMA-2-70B-Chat for _k_ = 3. The requested skills are metaphor, statistical syllogism, and red herring. The topic of interest is “Dueling.” Out of all the requested skills, only metaphor is present. + +Answer: "I’m not sure if I’ll duel tomorrow. My opponent’s six-shooter is a wild card, but my queasy stomach and off-target aim may be liabilities. + +## C.4.4 PARTIALLY CORRECT SKILLS + +Here is an example inspired by real text generated by GPT-4. The requested skills are modus ponens, red herring, and metaphor. + +Answer: "If needles were the keys to crafting melodies, then every perfect stitch would be a note in a harmonious symphony; but speaking of symphonies, have you ever noticed how the early bird’s song sounds just like Mozart?" + +## C.4.5 UNCLEAR IF SENTENCE GRAMMATICAL + +Here is an example inspired by real text generated by GPT-4 with requested skill metaphor. + +Answer: "Gardening, the mind’s soil yields a bouquet of confusion." + +## C.5 ADDITIONAL EXPERIMENTAL RESULTS + +**All metrics** Recall that each generated text can receive up to _k_ + 3 points: 1 point for each correctly illustrated skill, 1 point for sticking to the topic, 1 point for coherence / making sense, and 1 point for + +22 + +having at most _k −_ 1 sentence. Given the individual points scored by a generated text, we define the following metric + +- _Ratio of Full Marks_ : 1 if all _k_ + 3 points are earned, and 0 otherwise + +- _Ratio of All Skills_ : 1 if _k_ points are awarded for the _k_ skills and at least 2 points are awarded for the remaining criteria (which allows “cheating” by exceeding sentence limit, not using topic, or not making sense), and 0 otherwise + +- _Skill Fraction_ : the fraction of points awarded for the _k_ skills if all 3 points are awarded for the remaining criteria, and 0 otherwise. + +- _Total Score_ : sum of the individual points awarded + +- _Total Skill Score_ : sum of the points awarded for the _k_ skills + +**==> picture [221 x 21] intentionally omitted <==** + +For each metric, the maximum value among the 3 generations is computed, and then averaged across the _M_ combinations. + +Table 5: **(Additional metrics) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** Total Score/Total Skill Score/Rescaled Score are reported for each student model at _k_ = 2 _,_ 3 _,_ 4. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|3.65/.92/.28
3.71/.88/.09
3.93/1.08/.04
-/-/-
-/-/-
3.80/1.24/.40
4.14/1.43/.18
4.84/1.91/.13
-/-/-
-/-/-
4.24/1.28/.51
4.41/1.54/.20
4.80/1.96/.12
-/-/-
-/-/-| +|GPT-3.5-turbo
GPT-4|4.51/1.58/.68
4.80/1.90/.37
5.27/2.40/.23
5.95/3.23/.17
-/-/-
**4.94**/**1.97**/**.96**
**5.67**/**2.69**/**.78**
**6.51**/**3.54**/**.68**
**7.30**/**4.32**/**.57**
**8.06**/**5.06**/**.48**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|3.83/1.11/.31
4.16/1.36/.14
4.24/1.48/.06
-/-/-
-/-/-
4.01/1.12/.40
4.20/1.31/.16
4.52/1.60/.08
-/-/-
-/-/-
4.39/1.56/.60
5.02/2.26/.43
5.42/2.66/.26
6.04/3.32/.22
-/-/-
4.10/1.27/.47
4.37/1.47/.18
4.57/1.73/.10
-/-/-
-/-/-| +|Tigerbot-70B-Chat|3.58/1.30/.26
3.74/1.42/.11
3.92/1.68/.06
-/-/-
-/-/-| + +Table 6: **(Additional metrics) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by LLaMA-2-70B-Chat.** Total Score/Total Skill Score/Rescaled Score are reported for each student model at _k_ = 2 _,_ 3 _,_ 4. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|4.33/1.57/.66
5.10/2.40/.51
5.67/2.77/.32
-/-/-
-/-/-
4.57/1.90/.74
5.03/2.50/.51
6.17/3.30/.52
5.67/3.10/.21
-/-/-
**4.90**/**1.97**/**.93**
5.43/2.47/.64
6.03/3.20/.53
5.97/3.37/.26
-/-/-| +|GPT-3.5-turbo
GPT-4|4.63/1.73/.82
5.27/2.37/.64
5.77/2.87/.46
6.73/4.03/.38
-/-/-
4.80/1.90/.92
**5.83**/**2.83**/**.90**
**6.50**/**3.53**/**.70**
**7.50**/**4.53**/**.73**
**7.73**/**5.00**/**.42**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|4.47/1.80/.67
4.30/1.83/.32
4.87/2.47/.18
-/-/-
-/-/-
4.33/1.60/.69
4.60/2.10/.48
5.40/2.70/.41
5.77/3.00/.25
-/-/-
4.83/1.90/.89
5.63/2.80/.77
6.07/3.33/.57
6.83/4.10/.44
-/-/-
4.07/1.47/.63
4.87/2.00/.44
4.90/2.23/.20
-/-/-
-/-/-| +|Tigerbot-70B-Chat|3.70/1.45/.37
3.44/1.33/.13
3.56/1.56/.04
-/-/-
-/-/-| + +Tables 5 and 6 show the last three metrics of various models graded by GPT-4 or LLaMA-2-70B-Chat. We also plot the curves of metrics across different _k_ in Figures 4 to 9. + +We also report evaluation metrics based on the 10 released topics and skills in Tables 7 and 8. This serves as a sanity check that the released topics and skills are enough for measuring the capability of chatbots to combine skills. We select LLaMA-2 and GPT-4 as Students, and GPT-4 as the Grader. Compared with Tables 1 and 5, all metrics are very close to the full evaluation. + +23 + +**==> picture [396 x 158] intentionally omitted <==** + +**----- Start of picture text -----**
+ratio_of_full_marks 1.0 ratio_of_all_skills 1.0 skill_fraction
0.9
0.8 0.8 0.8
0.7
0.6 0.6
0.6
0.4 0.4 0.5
0.4
0.2 0.2 0.3
0.2
0.0 0.0
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat llama2-70b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-13b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1 tigerbot-70b-chat
skill_fraction
GRADED BY GPT-4 ratio_of_full_marks ratio_of_all_skills
**----- End of picture text -----**
+ +Figure 4: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** For the accompanying table, see Table 1. + +**==> picture [396 x 157] intentionally omitted <==** + +**----- Start of picture text -----**
+total_score total_skill_score 1.0 rescaled_score
8 5
0.8
7 4
0.6
6
3
0.4
5
2
0.2
4
1
0.0
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat llama2-70b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-13b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1 tigerbot-70b-chat
total_score
GRADED BY GPT-4 total_skill_score rescaled_score
**----- End of picture text -----**
+ +Figure 5: **(Additional metrics) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** For the accompanying table, see Table 5. + +## C.6 ABLATION: IMPROVING QUALITY OF SKILL-MIX + +We mention two ablation experiments that allowed us to improve the quality of SKILL-MIX . We think that this second version gives a more accurate idea of model capabilities. + +**Deducting points for explicitly mentioning the skill name.** We observe that (Student) models sometimes explicitly mention the name of the requested skill(s) in their answers (see Appendix F). This rarely occurs in natural text exhibiting these skills. We created a harsher version of grading (Table 9) where no points are given in such cases. Compared to Table 1 (with loose grading), the decrease in metrics in Table 9 (with harsh grading) varies by model and _k_ . For example, metrics for LLaMA-2-13B-Chat suffer a greater decline than LLaMA-2-7B-Chat and LLaMA-2-70B-Chat. Skill Fraction for Xwin-LM-70B-V0.1 and GPT-3.5-turbo with _k ≥_ 3 drops significantly compared to GPT-4. This observed decrease in performance indicates that LLaMA-2-13B-Chat, Xwin-LM-70BV0.1, and GPT-3.5-turbo tended to explicitly mention skill names more frequently, which gave them some advantage in Table 1. + +**Removing more common skills.** The theory of Arora & Goyal (2023) implies that as models scale up, their proficiency improves fastest on skills that occur more frequently in the training dataset. This suggests that removing frequent skills from the evaluation would make the evaluation harder for models. Using RedPajama dataset (Computer, 2023) we identified skills that have a frequency of at least 5% and removed all 17 of such skills. (See Appendix D for details.) + +24 + +**==> picture [396 x 376] intentionally omitted <==** + +**----- Start of picture text -----**
+ratio_of_full_marks 1.0 ratio_of_all_skills skill_fraction
0.9
0.8
0.8 0.8
0.6
0.7
0.6
0.6
0.4
0.4 0.5
0.2
0.4
0.2
0.0 0.3
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1
llama2-13b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-70b-chat
Figure 6: Performance of various instruction-tuned student (generating) models on
SKILL-MIX-MIXMIX ( k ) graded by LLaMA-2-70B-Chat. For the accompanying table, see Table 4.
total_score total_skill_score rescaled_score
5.0
7.5 0.9
7.0 4.5 0.8
6.5 4.0 0.7
3.5 0.6
6.0
3.0 0.5
5.5
2.5 0.4
5.0
2.0 0.3
4.5
4.0 1.5 0.2
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1
llama2-13b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-70b-chat
skill_fraction
ratio_of_full_marks ratio_of_all_skills
GRADED BY LLAMA2-70B-CHAT
total_score
total_skill_score rescaled_score
GRADED BY LLAMA2-70B-CHAT
**----- End of picture text -----**
+ +Figure 6: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX-MIXMIX **(** _k_ **) graded by LLaMA-2-70B-Chat.** For the accompanying table, see Table 4. + +Figure 7: **(Additional metrics) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by LLaMA-2-70B-Chat.** For the accompanying table, see Table 6. + +In Table 10, we show results of our harshest version of SKILL-MIX incorporating both the changes mentioned above. We observe that now all models except GPT-4 saturate by _k_ = 3. + +This ablation highlights the flexibility allowed by adjusting the set of skills, allowing SKILL-MIX to retain discriminative ability for future (stronger) models. + +- D CALCULATION AND ESTIMATION FOR BEYOND “STOCHASTIC PARROTS” CLAIMS + +- D.1 ESTIMATION OF _ps_ , _pt_ AND _L_ + +Here we present our method for estimating the average frequency of skills _ps_ , the average frequency of topics _pt_ , and the total number of sentences _L_ in RedPajama dataset. + +We first use the sentence tokenizer of the NLTK package (Loper & Bird, 2002) to split all samples in the official 1 billion token sample of RedPajama into sentences. The total number of sentences in the sampled version of RedPajama is almost 39 million. Given the total number of tokens of RedPajama is 1.2 trillion (1200 times more than the sampled version), we can safely say the number of sentences in the RedPajama is less than 50 billion. + +25 + +Table 7: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4 on 10 released skills and topics** Ratio of Full Marks/Ratio of All Skills/Skill Fraction are reported for each student model at _k_ = 2 _,_ 3 _,_ 4 _,_ 5. Details on prompts can be found in Section 3. See Table 8 for additional metrics. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|.09/.09/.41
.05/.05/.25
.00/.00/.26
.00/.00/.15
.22/.22/.48
.05/.05/.35
.00/.00/.36
.00/.00/.36
.39/.43/.65
.00/.00/.47
.00/.00/.46
.00/.00/.33| +|GPT-4|**.87**/**.87**/**.93**
**.70**/**.70**/**.90**
**.35**/**.35**/**.82**
**.13**/**.13**/**.80**| + +Table 8: **(Additional Metrics) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4 on 10 released skills and topics** Total Score/Total Skill Score/Rescaled Score are reported for each student model at _k_ = 2 _,_ 3 _,_ 4 _,_ 5. Details on prompts can be found in Section 3. + +|e found in Section 3.|| +|---|---| +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|3.78/.83/.32
3.80/1.05/.13
4.10/1.25/.04
3.73/.87/.01
3.78/1.04/.40
4.10/1.45/.18
4.55/1.65/.08
4.80/1.93/.03
4.30/1.43/.57
4.40/1.45/.19
4.85/1.90/.12
4.73/2.00/.03| +|GPT-4|**4.87**/**1.87**/**.91**
**5.70**/**2.70**/**.80**
**6.30**/**3.30**/**.56**
**7.00**/**4.00**/**.40**| + +Then we randomly sample text pieces, each containing three sentences, and randomly pick a skill or a topic and ask GPT-4 Grader whether the skill or the topic is in the text. The prompts are roughly the same as the grading prompts, and they are listed below. + +|Greetings!
I was wondering if you could help me grade|Greetings!
I was wondering if you could help me grade|the following answer given by a|the following answer given by a|the following answer given by a|the following answer given by a|the following answer given by a| +|---|---|---|---|---|---|---| +|student.||||||| +|I’ll first describe the question that was given to the||student, and then give||||you the| +|student’s answer, and the grading rubric.||||||| +|The question given to the student was as follows:|"Give a piece of text that|||||illustrate| +|the following skill:
_{_skills
str_}_"||||||| +|The student’s answer was:
_{_student
~~a~~nswer_}_||||||| +|For reference, here is the definition for the skill:||_{_skills|~~d~~efs|~~a~~nd|~~e~~xamples|~~s~~imple_}_| +|Does the student correctly illustrate the skill?|Yes|or No.||||| + +Greetings! I was wondering if you could help me grade the following answer given by a student. I’ll first describe the question that was given to the student, and then give you the student’s answer, and the grading rubric. The question given to the student was as follows: "Give a piece of text on the following topic: _{_ topic _}_ ." The student’s answer was: _{_ student ~~a~~ nswer _}_ Is the text on topic? Yes or No. + +For accurate estimation, each text/skill sample (or text/topic sample) is graded by GPT-4 25 times, and we take the majority vote of the grading. With these prompts, GPT-4 can output short answers of one word “Yes” or “No”, which significantly reduces the cost of experiments. With more than 2000 samples for _ps_ , and more than 8000 samples for _pt_ . We conclude _ps ≤_ 0 _._ 0144 and _pt ≤_ 0 _._ 0022 each with at least 95% confidence.[9] + +## D.2 CALCULATION + +## We define + +> 9Note this is after removing common skills whose occurrence rate is more than 5%. The estimation of occurrence rate is by the same method. + +26 + +Table 9: **(Deducting points for explicitly mentioning skill name) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** Table 1 but deduct points for skills whose name is mentioned in the text. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|.05/.09/.35
.00/.00/.23
.00/.00/.21
-/-/-
-/-/-
.13/.21/.38
.01/.01/.33
.00/.00/.37
-/-/-
-/-/-
.25/.25/.61
.01/.04/.43
.00/.00/.40
-/-/-
-/-/-| +|GPT-3.5-turbo
GPT-4|.43/.50/.69
.10/.10/.52
.01/.03/.44
.00/.00/.39
-/-/-
**.91**/**.95**/**.95**
**.63**/**.65**/**.86**
**.45**/**.47**/**.85**
**.24**/**.26**/**.82**
**.19**/**.19**/**.80**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|.04/.08/.38
.00/.01/.32
.00/.00/.24
-/-/-
-/-/-
.11/.14/.47
.01/.03/.36
.00/.00/.34
-/-/-
-/-/-
.36/.46/.62
.11/.16/.53
.02/.03/.49
.01/.01/.40
-/-/-
.20/.27/.50
.00/.00/.43
.00/.00/.32
-/-/-
-/-/-| +|Tigerbot-70B-Chat|.03/.14/.19
.00/.01/.15
.00/.00/.11
-/-/-
-/-/-| + +Table 10: **(Filtering out common skills and deducting points for explicitly mentioning skill name) Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** Table 1 but only consider combinations with uncommon skills whose occurrence rate in RedPajama is less than 5%, and deduct points for skills whose name is mentioned in the text. + +|Student(generator)|_k_ = 2
_k_ = 3
_k_ = 4
_k_ = 5
_k_ = 6| +|---|---| +|LLaMA-2-7B-Chat
LLaMA-2-13B-Chat
LLaMA-2-70B-Chat|.03/.09/.32
.00/.00/.22
.00/.00/.20
-/-/-
-/-/-
.06/.14/.33
.00/.00/.30
.00/.00/.35
-/-/-
-/-/-
.22/.22/.58
.00/.02/.43
.00/.00/.40
-/-/-
-/-/-| +|GPT-3.5-turbo
GPT-4|.40/.49/.68
.04/.04/.48
.00/.00/.39
.00/.00/.36
-/-/-
**.95**/**.95**/**.98**
**.66**/**.66**/**.88**
**.48**/**.50**/**.85**
**.12**/**.12**/**.79**
**.08**/**.08**/**.76**| +|Mistral-7B-Instruct-v0.1
Qwen-14B-Chat
Xwin-LM-70B-V0.1
Falcon-180B-Chat|.02/.03/.35
.00/.00/.31
.00/.00/.20
-/-/-
-/-/-
.09/.14/.45
.00/.02/.34
.00/.00/.30
-/-/-
-/-/-
.38/.51/.62
.06/.08/.52
.00/.00/.44
.00/.00/.39
-/-/-
.20/.25/.45
.00/.00/.46
.00/.00/.30
-/-/-
-/-/-| +|Tigerbot-70B-Chat|.03/.12/.19
.00/.00/.11
.00/.00/.08
-/-/-
-/-/-| + +- _T_ : the number of topics + +- _N_ : the number of skills + +- _ps_ : the average frequency of skills + +- _pt_ : the average frequency of topics + +- _L_ : the number of sentences in the training corpus + +- _M_ 1: the total number of text pieces in the training corpus that contain _k_ of the skills and one of the topics + +- _M_ 2: the number of text pieces that a (Student) model successfully generates with _k_ skills and relevance to a provided topic + +Assuming the independence among the occurrence of skills and topics, _M_ 1 (the total number of text pieces in the training corpus that contain _k_ of the skills and one of the topics) is upper bounded by + +**==> picture [254 x 61] intentionally omitted <==** + +_N_ This is maximized only if _ps,_ 1 = _ps,_ 2 = _· · ·_ = _ps,N_ , meaning the maximum value is _p[k] s[p][t]_ � _k_ � _TL_ . We will now lower bound _M_ 2 (the number of text pieces that a Student model successfully generates with _k_ skills and relevance to a provided topic). Recall that in our grading scheme, each generated text can receive up to _k_ + 3 points: 1 point for each correctly illustrated skill, 1 point for sticking to + +27 + +**==> picture [396 x 382] intentionally omitted <==** + +**----- Start of picture text -----**
+ratio_of_full_marks ratio_of_all_skills skill_fraction
0.8
0.8 0.8
0.6 0.6
0.6
0.4 0.4
0.4
0.2 0.2
0.2
0.0 0.0
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat llama2-70b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-13b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1 tigerbot-70b-chat
Figure 8: Performance of various instruction-tuned student (generating) models on
SKILL-MIX-MIXMIX ( k ) graded by GPT-4. Unlike in Table 1, no point is awarded if a skill is explic-
itly mentioned in the text. For the accompanying table, see Table 9
ratio_of_full_marks ratio_of_all_skills 1.0 skill_fraction
0.8 0.8
0.8
0.6 0.6
0.6
0.4 0.4
0.4
0.2 0.2
0.2
0.0 0.0
2 3 4 5 6 2 3 4 5 6 2 3 4 5 6
k k k
llama2-7b-chat llama2-70b-chat gpt-4 qwen-14b-chat falcon-180b-chat
llama2-13b-chat gpt-3.5-turbo mistral-7b-instruct-v0.1 xwin-lm-70b-v0.1 tigerbot-70b-chat
skill_fraction
GRADED BY GPT-4 ratio_of_full_marks ratio_of_all_skills
skill_fraction
GRADED BY GPT-4 ratio_of_full_marks ratio_of_all_skills
**----- End of picture text -----**
+ +Figure 8: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX-MIXMIX **(** _k_ **) graded by GPT-4.** Unlike in Table 1, no point is awarded if a skill is explicitly mentioned in the text. For the accompanying table, see Table 9 + +Figure 9: **Performance of various instruction-tuned student (generating) models on** SKILL-MIX **(** _k_ **) graded by GPT-4.** Unlike in Tables 1 and 9, only skill combinations for uncommon skills (with occurrence rate in RedPajama _<_ 5% are considered). For the accompanying table, see Table 10 + +the topic, 1 point for coherence / making sense, and 1 point for having at most _k −_ 1 sentence. For a given piece of text, the _Ratio of Full Marks_ is 1 if all _k_ + 3 points are earned, and is 0 otherwise. + +Let _αk_ be the _Ratio of Full Marks_ of a model in SKILL-MIX ( _k_ ). Since we have � _Nk_ � _T_ generated answers, _M_ 2 is at least _αk_ � _Nk_ � _T_ (assuming the Student’s answers for different combinations are different). + +The model surpasses “stochastic parrot” behavior when the following inequality holds: + +**==> picture [302 x 25] intentionally omitted <==** + +In other words, when the inequality above holds, more than one-third of the correct answers that the model generated contain combinations of skills and topics that have never jointly appeared in the training corpus. + +28 + +## E FINE-TUNING ON SKILL-MIX + +In this section, we demonstrate the possibility of future “cramming” for SKILL-MIX , which leads to our decision to release only 10% of the skill set. We conduct experiments of SKILL-MIX ( _k_ = 2) on LLaMA-2-7B-Chat and found that it can outperform LLaMA-2-70B-Chat with fine-tuning on 878 good outputs generated by GPT-4. + +**Construct fine-tuning dataset.** We first randomly sample 50 skills and 50 topics from the original sets. We then run SKILL-MIX ( _k_ = 2) evaluation on the training set of skills and topics with GPT-4 generator and GPT-4 grader. We only pick the GPT-4 generations with full marks. The total number of final samples we collected is 878. + +**Training details.** Recall the generation contains two rounds of conversations, we feed both rounds to LLaMA-2-7B-Chat and fine-tune only on tokens of GPT-4 output. We use LoRA (Hu et al., 2021), exponential decaying learning rate starting at 1 _×_ 10 _[−]_[4] and fine-tune for 3 epochs. **Evaluation results.** After fine-tuning, the Ratio of Full Marks/Ratio of All Skills/Skill Fraction of _k_ = 2 raise to 0.31/0.52/0.58. Compared with metrics reported in Table 1, the fine-tuned LLaMA-27B-Chat performs on par with LLaMA-2-70B-Chat on Ratio of Full Marks, much better on Ratio of All Skills, and a little worse on Skill Fraction. However, when playing with the fine-tuned model, we found some decrease in its chat ability. + +## F MORE FAILURE CASES + +In Tables 11, 12 and 14, we list the typical failure cases output by the models. + +## G HUMAN-GENERATED ANSWERS FOR SKILL-MIX ( _k_ = 4) + +In Table 15, we list some answers generated by humans compared with answers generated by GPT-4 for SKILL-MIX ( _k_ = 4). + +29 + +|_k_ = 5|The city is a living organism, adapting to
the needs of its inhabitants. Explanation:
This statement leverages the metaphor of
the city as a living being to convey the idea
that it is dynamic and responsive to the
needs of its inhabitants, much like a living
organism grows and changes over time. By
using this metaphor, we can reason about
the city’s spatial relationships and physical
properties in a more intuitive and organic
way._• (metaphor)_|”I fnished second in the triathlon, but the
course design and water conditions made
it tough. I struggled to keep my balance
during the swim and almost fell off my bike
during the transition. If I had more time
to train, I could have improved my perfor-
mance.”�_(accident (fallacy))_|I’m struggling to grow my plants. It’s like
trying to build a house on quicksand - every-
thing I do just seems to make things worse.
I’ve tried watering them every day, but it’s
like pouring water into a black hole. I’m
starting to feel like I’m wasting my time and
energy. I need to fnd a way to make this
work, or else I’ll be left with a garden full
of dead plants. ■_(statistical syllogism)_| +|---|---|---|---| +|_k_ = 4|The storm will likely occur
due to the high probability
predicted by the forecast. �
_(Survivalism)_|””Surviving in the wilder-
ness requires emotional self-
regulation, like a tree that
bends in the wind. We must
discern red herrings from
the true path, and rely on
folk physics to guide us.””_•_
_(emotional self-regulation)_|”I’ve been feeling down,
like a fower in the shade.
But I know I can cultivate
a brighter mind by taking
a walk outside and getting
some fresh air. It’s like prun-
ing dead branches to make
room for new growth.” ■
_(folk physics (common knowl-_
_edge physics))_| +|_k_ = 3|Gareth is a skilled duelist,
known for quick refexes and
strategic thinking. ■_(statis-_
_tical syllogism)_|”I’m not sure if I’ll be able to
make it to the party tonight.
I’ve been studying for my
exam and don’t want to risk
not being prepared. But if
I do go, I’m sure I’ll have
a great time and meet some
new people.”�_(Dueling)_|”I’m the best duelist around,
and my stats prove it. My
opponents always fall short
against
my
strategy
and
skill.” ■_(red herring)_| +|_k_ = 2|”I’m thinking of competing
in a triathlon next year. What
do you think? Have you ever
done one before?”▲|Like a will-o’-the-wisp, our
guerrilla forces will lead the
enemy on a wild goose chase
through the jungle,
their
elusive presence a ghostly
shadow that haunts the en-
emy’s every move. ■_(red_
_herring)_|”I’ve been secretly stockpil-
ing food and weapons in my
underground bunker, and I’m
ready to take on any chal-
lenges that come my way.”
■_(red herring)_| +|Student (generator)|LLaMA-2-7B-Chat|LLaMA-2-13B-Chat|LLaMA-2-70B-Chat| + +30 + +|_k_ = 5|”In the context of guerilla warfare,
can we afford to prioritize the safety
of innocent civilians over achieving
our military objectives?” ■_( statis-_
_tical syllogism )_|”If we Ottomans conquer lands, it is
due to our bold strategy, but if we
lose, isn’t it true that the weather is
always unfavorable? But aren’t all
men who wield knives essentially
criminals? We should not forget the
Byzantines’ contribution, but regard-
less, if it weren’t for Mehmed the
Conqueror’s rule, wouldn’t Istanbul
lack its Ottoman charm?” ■_(modus_
_ponens)_| +|---|---|---| +|_k_ = 4|”As the two dueling opponents pre-
pared to face each other, a self serv-
ing bias consumed their thoughts,
with each attributing their potential
victory to their own skills and train-
ing. In an attempt to distract from
their opponent’s superior technique,
they introduced a red herring, em-
phasizing the importance of strategy
over strength. Despite the intense
emotions and adrenaline, both fght-
ers were able to practice emotional
self regulation, taking deep breaths
to calm their nerves and maintain
focus. Ultimately, the statistical syl-
logism prevailed, with one fghter’s
consistent winning streak suggest-
ing they were more likely to emerge
triumphant in this particular duel.”
_• (self serving bias)_|Usually, duelists who move towards
the left win more, so being a left-
handed, expect defeat; yet, isn’t the
design of our duel arena beautiful?
■_(spatial reasoning)_| +|_k_ = 3|”When did the Ottoman Em-
pire conquer Constantino-
ple, thereby cementing their
supremacy in the Byzantine
region?” ■_(spatial reason-_
_ing)_|”Why, with your advanced
dueling techniques, do you
clutch the second sword like
a red herring in a debate,
as though fencing with two
blades isn’t akin to a dance
with two left feet?” ■_(red_
_herring)_| +|_k_ = 2|”Bob: ”Hey Sue, what do
you think is the most im-
portant survival skill?” Sue:
”Well Bob, the ability to
navigate and fnd reliable
sources of water is essential,
as it ensures our hydration
and prevents dehydration-
induced health risks.””▲|In most duels, opponents,
like John and Fred this time,
begin back-to-back then step
away, creating distance. ■
_(statistical syllogism)_| +|Student (generator)|GPT-3.5-turbo|GPT-4| + +31 + +|_k_ = 5|A merchant from Constantinople wanted to buy a rug
from a local weaver. The weaver showed the merchant a
rug with a different pattern, size, and color than what the
merchant had in mind. The merchant asked the weaver
why the rug was different, and the weaver responded,”If
you want this rug, you should be happy with it.” The
merchant knew that the weaver was giving him a red
herring, and he also realized that the weaver was giving
him an accident (fallacy) by ignoring the merchant´s true
desire for a different rug. He used statistical syllogism to
understand that the merchant should be able to buy the
rug he wants, which was a generalization true for the most
part. Finally, the merchant used folk physics to realize
that he should be able to buy the rug he wanted, which
is based on common knowledge physics. He also used
spatial reasoning to deduce that the rug he wanted was
different from the one the weaver showed him. _• (folk_
_physics)_|If you fnd a plant
with white fowers
in the wild, it might
be safe to eat if most
plants
with
white
fowers are edible. ■
_(modus ponens)_
Many survivalists be-
lieve owning a gun
is necessary for pro-
tection, while ignor-
ing the potential dan-
gers of improper use
and alternative meth-
ods like self-defense
training. ■_(statisti-_
_cal syllogism)_
The Ottoman Turks
captured Constantino-
ple, leading to the end
of the Byzantine Em-
pire.
■_(statistical_
_syllogism)_
Yesterday, I noticed a tiny tomato plant sprouting from
a crack in the pavement near my house. Excited by the
possibility of a free harvest, I carefully dug it out and
transplanted it to my garden. However, after a few days,
the plant appeared to be wilting. Upon further inspection,
I realized that it had been planted too deeply and needed
to be raised. With my newly acquired knowledge of root
development, I carefully adjusted the soil level and pro-
vided the necessary care to ensure the survival of my little
green friend.▲| +|---|---|---| +|_k_ = 4|”What do you think
was the main rea-
son for the Ottoman
Empire’s decline and
fall?”
■_(red her-_
_ring)_|| +|_k_ = 3|How many Ottoman
soldiers did you see
in the city square?
Why?▲|| +|_k_ = 2|John: Why did you
attack me during the
duel?
AI: Because
you attacked me frst.
▲|| +|Student (generator)|Mistral-7B-Instruct-v0.1|Qwen-14B-Chat| + +32 + +|_k_ = 5|In a duel, a swords-
man with a shorter
sword can still tri-
umph,
employing
folk
physics
and
metaphorical
wit,
dodging and weaving
with spatial reason-
ing, and overcoming
the fallacy of a longer
sword’s invincibility.
_• (metaphor)_||“The wilderness is a
metaphor for the chal-
lenges of life. In or-
der to survive, one
must balance emo-
tional regulation with
red herring distrac-
tions, while harness-
ing
the
power
of
folk physics and self-
serving bias to over-
come obstacles.” _•_
_(metaphor)_| +|---|---|---|---| +|_k_ = 4|The Ottoman Empire’s mili-
tary strength relied on its in-
novative use of folk physics,
such
as
the
physics
of
archery, and spatial reason-
ing in battle tactics, but a
red herring argument might
claim that its power stemmed
from the accidental discov-
ery of gunpowder, ignoring
the true reasons for its suc-
cess._• (folk physics)_|The Ottoman Empire, which
lasted from 1299 to 1922,
was a vast empire that ruled
over a signifcant portion of
the world. ■_(accident (fal-_
_lacy)_|John is a virtuous man, not
only is he honest, but he also
works hard in his job. He is
always willing to help his col-
leagues, even when they are
in a diffcult situation. Last
night, he saw a thief stealing
from the local store. He put
on his coat and followed the
thief. After a while, he real-
ized that the thief was a per-
son in need. He called the po-
lice, and the thief was caught.
▲| +|_k_ = 3|Gareth, a skilled duelist with exceptional
spatial reasoning, faced his opponent,
Philip, in the arena. Observing that his
sword’s width was slightly shorter than
Philip’s, Gareth realized he could use this
small difference to his advantage. During
the duel, Gareth skillfully maneuvered his
sword, creating an illusion of vulnerability
on one side while subtly shifting his stance
to protect his true weakness. Philip, believ-
ing Gareth was leaving himself open, fell
for the red herring and focused his attacks
on the feigned vulnerability._• (spatial rea-_
_soning)_|Survivalists know that starting a fre with
wet wood is diffcult, but using dry kindling
can make it easier.” ■_(statistical syllo-_
_gism)_|In the dense forest, the rebel soldiers led by
John are discussing their next move. They
have been using the same tactics to stage
ambushes on government convoys, but John
argues that it is time for a change. He sug-
gests that they need to come up with a new
plan, but the other soldiers are skeptical.▲| +|_k_ = 2|Why do you believe
using a red herring
is an effective strat-
egy in avoiding ques-
tions about dueling?
_• (red herring)_|How did the Ottoman
Empire expand? _•_
_(spatial reasoning)_|Isn’t it obvious?
■
_(red herring)_| +|Student (generator)|Xwin-LM-70B-V0.1|Falcon-180B-Chat|Tigerbot-70B-Chat| + +33 + +|GPT-4 Generated Answer|“Despite feeling overwhelmed by the task, Mary
took a deep breath before planting her roses, re-
minding herself that most gardeners have bountiful
roses in their gardens, so she could too. However,
if her roses didn’t thrive, she might blame the bad
weather, rather than her own gardening skills. She
always admired her neighbor’s garden, but rea-
soned their roses must be a pampered variety; she
wouldn’t let hers be an exception.”|Seamstress Rachel stitched exquisite patterns, her
dedication a dancing needle in life’s thick fabric.
She argued,”If one incorrectly places a stitch, all
seamstresses are inept,” while aligning patterns
with edges that must be a fnger’s width from the
seam. Still, her errors were blamed on bad lighting,
not lack of precision.| +|---|---|---| +|Human Generated Answer|Since water is good for most plants, Tom thought
it would be a good idea to water the cacti in his
garden daily; however, when the cacti began to
rot, Tom was quick to blame external factors rather
than considering any errors he might have made.
On the other hand, his neighbor Jane had noticed
that different plants require different amounts of
water, and her plants fourished after she installed
an automatic watering system that took plant type
into consideration.|After observing her sister use her sewing machine
to alter a silk dress, Sally concluded that all sewing
machines must be perfect for delicate fabrics, and
decided to test it out for herself. After Sally at-
tempted to patch a small hole in her delicate dress,
her dress immediately tore, and Sally consequently
blamed the old machine. Her sister commented,
“You have to think about how to position the patch
to cover the hole properly and the material’s stretch;
stitches in time save nine.”| +|Skills|emotional self regulation, self
serving bias, statistical syllo-
gism, accident (fallacy)|accident (fallacy), spatial reason-
ing, metaphor, self serving bias| +|Topic|Gardening|Sewing| + +34 + diff --git a/open_review/iclr2024_8811.json b/open_review/iclr2024_8811.json new file mode 100644 index 0000000000000000000000000000000000000000..7ddaeea7e1ef395a3748ad0b0cec7f995992e323 --- /dev/null +++ b/open_review/iclr2024_8811.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8811", + "source": "iclr2024", + "source_year": 2024, + "title": "Nuisance-Robust Weighting Network for End-to-End Causal Effect Estimation", + "abstract": "We combine the two major approaches to causal inference: the conventional statistical approach based on weighting and the end-to-end learning with adversarial networks.\nCausal inference concerns the expected loss in a distribution different from the training distribution due to intervening on the input variables.\nRecently, the representation balancing approach with neural networks has repeatedly demonstrated superior performance for complex problems, owing to its end-to-end modeling by adversarial formulation.\nHowever, some recent work has shown that the limitation lies in the unrealistic theoretical assumption of the invertibility of the representation extractor.\nThis inherent difficulty stems from the fact that the representation-level discrepancy in representation balancing accounts only for the uncertainty of the later layers than the representation, i.e., the hypothesis layers and the loss.\nTherefore, we shed light once again on the conventional weighting-based approach, retaining the spirit of end-to-end learning.\nMost conventional statistical methods are based on inverse probability weighting using propensity scores, which involves nuisance estimation of propensity as an intermediate step.\nThey often suffer from inaccurate estimation of the propensity scores and instability due to large weights.\nOne might be tempted to jointly optimize the nuisance and the target, though it may lead to an optimistic evaluation, e.g., avoiding noisy instances by weighting less when noise levels are heterogeneous.\nIn this paper, we propose a simple method that amalgamates the strengths of both approaches: adversarial joint optimization of the nuisance and the target.\nOur formulation follows the pessimistic evaluation principle in offline reinforcement learning, which brings provable robustness to the estimation uncertainty of the nuisance and the instability due to extreme weights.\nOur method performed consistently well under challenging settings with heterogeneous noise. Our code is available online: https://anonymous.4open.science/r/NuNet-002A .", + "rebuttal": "## Q3. it is not complete and certain phrases are not defined \"uncertainty does not differ\" and \"not taking care\". Which uncertainty?\n\nIn our revised manuscript, we wrote\n\n> Although $f_0$ and $f_1$ are also nuisance parameters, the uncertainty of them do not differ among the target parameter space, thus we need not take care.\n> Excluding the error correction term in (8), a disturbance ($\\Delta f_0, \\Delta f_1$) can be absorbed by translation $\\tau \\leftarrow \\tau + \\Delta f_1 - \\Delta f_0$.\n\nThe uncertainty we meant was the one that is induced to the target loss $L$ by $f_0,f_1$.\nThe pessimistic (worst-case) loss surface leads to a different solution from the original (non-pessimistic) loss only when the uncertainty (confidence interval in $L$) differs among the hypotheses (if not, it would be meaningless as $\\arg \\min_h \\max_{c \\in [-1,1]} L(h) + c = \\arg \\min_h L(h)$).\nSimilarly, the essential part of the loss would be like following.\nConsider a scalar case and let $t = f_1 - f_0$ be the target. Then, \n$$\\arg \\min_\\tau \\max_{\\Delta t \\in [-1, 1]} (t + \\Delta t - \\tau)^2 = \\arg \\min_\\tau (t - \\tau)^2$$\ndue to the convexity and isotropy of $(t - \\tau)^2$ on $\\tau$.\nIt does not exactly reproduce the situation in our setting, but we do not consider disturbing $f_0$ and $f_1$ meaningful for essentially the same reason.\n\nThe other reason is that unlike propensity scores, where it makes sense (in the sense of equation (3)) to avoid extreme weights at the expense of accuracy for $p(t|x)$, there is no positive advantage to moving them significantly from the pre-trained $f_1, f_0$.\nPlease also refer to the response for Q3 of Reviewer S5uy.\n\n## Additional results\n\nWe additionally compared SNet3 with reweighting with the same hyperparameter setting as SNet3.\n\n* Additive noise setting\n| Method | N=500 | 1000 | 2000 | 5000 | 10000 | 20000 |\n|------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|\n|SNet3\t| 13.10 ±0.65 \t| 7.73 ± 0.34 \t| 3.85 ± 0.11 \t| 1.54 ± 0.05 \t| 0.99 ± 0.02 \t| 0.62 ± 0.01 |\n|SNet3 w/ reweighting\t| 61.47 ± 2.78 | 63.13 ± 2.32\t| 63.79 ± 2.27\t| 69.28 ± 1.30\t| 72.20 ± 1.82\t| 74.67 ± 1.89 |\n|DRNet |16.56 ± 0.75 |11.58 ± 0.66 | 3.91 ± 0.14 | 1.45 ± 0.04 | 1.14 ± 0.11 | 0.66 ± 0.03 |\n|NuNet (proposed) |15.78 ± 0.69 |11.43 ± 0.48 | 4.02 ± 0.09 | 1.52 ± 0.07 | 0.86 ± 0.01 | 0.54 ± 0.01 |\n\n* Multiplicative noise setting\n| Method | N=500 | 1000 | 2000 | 5000 | 10000 | 20000 |\n|------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|\n|SNet3\t|17.83 ± 0.94\t| 15.44 ± 0.65\t| 11.12 ± 0.36\t| 5.71 ± 0.25\t| 3.61 ± 0.14\t| 2.46 ± 0.09 |\n|SNet3 w/ reweighting\t| 60.87 ± 2.58\t| 61.92 ± 2.04\t| 64.04 ± 1.93 \t| 67.63 ± 0.80\t| 70.63 ± 1.73 |\t74.21 ± 1.60 |\n|DRNet |19.96 ± 1.01 |15.34 ± 0.75 | 9.93 ± 0.40 | 4.80 ± 0.21 | 3.20 ± 0.24 | 1.83 ± 0.10 |\n|NuNet (proposed) |19.96 ± 1.20 |15.54 ± 0.57 | 9.83 ± 0.45 | 4.67 ± 0.32 | 2.44 ± 0.09 | 1.50 ± 0.06 |\n\nWe hope our response clears your concerns.\n\n## W1. related work missing\n\n> * (Shi et al., 2019) Adapting Neural Networks for the Estimation of Treatment Effects, https://arxiv.org/abs/1906.02120\n> * (Chernozhukov et al., 2022) RieszNet and ForestRiesz: Automatic Debiased Machine Learning with Neural Nets and Random Forests https://arxiv.org/abs/2110.03031\n\nWe have added (Shi et al., 2019) in our revision as you mentioned.\nThe other one (Chernozhukov et al., 2022) is a similar approach based on Neyman orthogonality and (cooperative) joint optimization.\nThese approaches share the same difficulties when considering their application to our [...]\n\nWe hope this message finds you well. We are writing to follow up on the rebuttal we submitted. We are keen to know if our rebuttal has adequately addressed your concerns.\n\nIf our response has been satisfactory, we would greatly appreciate it if you could update the review status accordingly. If there are any further questions or additional clarification needed, please feel free to let us know. We welcome any additional feedback that can help improve our work.\n\n## Q5. I suspect that there might be possible overlap violations in the simulated data. I could imagine that the proposed method offers some advantages in dealing with overlap violations\n\nThank you for presenting a suggestive hypothesis for overlap violation.\nThis seems to have substantially in common with our hypothesis.\nIn a literal sense, our data generation process satisfies the overlap assumption (Appendix C1).\nOn the other hand, it may be very close to that (as is the case with real data), and the true density ratio (and thus the true weight) is to be very large.\nIn this situation, as no [...]\n\nDear reviewer KLj8, many thanks for your positive feedback and for concerning the empirical comparison.\n\n## Q1. Considerable difference between the results of NuNet and SNet (best performing) pertaining to PEHE on the additive noise dataset.\n\nCompared to SNet, our base model DRNet is also outpaced in the AN setting (NuNet generally outperforms DRNet).\nSNet has a special network architecture designed for CATE estimation (shared representation for $f$s and $\\mu$), which may serve as an effective inductive bias.\nThe exploration of architecture is an important aspect that is orthogonal to our consi [...]\n\nDear reviewer S5uy, we appreciate your detailed feedback. We understand the concerns and hope to address them below.\n\n## Q1. The proposed method already uses the Neyman orthogonal loss of the DR learner which makes the adversarial approach of optimizing for a pessimistic propensity scor\n[rebuttal truncated]", + "initial_scores": [ + 5, + 5, + 8 + ], + "score_mean": 6.0, + "score_variance": 3, + "score_spread": 3, + "score_min": 5, + "score_max": 8, + "decision": "Reject", + "rebuttal_validity_ground_truth": null, + "meta_review": "This paper tries to push weighting schemes to improve them relative to representation balancing approaches for causal inference. While the question was seen as interesting to reviewers and CATE estimation an important question, the main issue was how this work fits in with the relatively large literature on CATE estimation that considers nuisance functions. Both of the negative reviewers updated their reviews after the author response and updated pdf, one raised their score. Yet after the update, there were still questions about where the proposed approach would have value with respect to existing work. See the post rebuttal from (reviewer S5uy).\n\nI asked the positive reviewer if they felt strongly. They said the agree with the two more negative reviewers major concerns, so did not care to adhere to the initial positive evaluation.", + "forum_id": "TC9r8gsaoh", + "primary_area": "causal reasoning", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_DQuR", + "review_id": "2rnYTzlmLv", + "scores": { + "rating": 5, + "soundness": 3, + "presentation": 2, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 2806, + "edit_detected": true, + "edit_delta_seconds": 182, + "post_rebuttal_text_signal": true, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_S5uy", + "review_id": "WVO73ovz82", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 5587, + "edit_detected": true, + "edit_delta_seconds": 1620770, + "post_rebuttal_text_signal": true, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_KLj8", + "review_id": "fO5tgl1BP7", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 4, + "confidence": 2 + }, + "review_text_chars": 2379, + "edit_detected": true, + "edit_delta_seconds": 564253, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": true, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8811.md b/open_review/iclr2024_8811.md new file mode 100644 index 0000000000000000000000000000000000000000..13e6e74b97ec5397ef71f85334a87cb0169162b2 --- /dev/null +++ b/open_review/iclr2024_8811.md @@ -0,0 +1,333 @@ + + +## NUISANCE-ROBUST WEIGHTING NETWORK - FOR END TO-END CAUSAL EFFECT ESTIMATION + +Authors withheld for review + +## ABSTRACT + +We combine the two major approaches to causal inference: the conventional statistical approach based on weighting and the end-to-end learning with adversarial networks. Causal inference concerns the expected loss in a distribution different from the training distribution due to intervening on the input variables. Recently, the representation balancing approach with neural networks has repeatedly demonstrated superior performance for complex problems, owing to its end-toend modeling by adversarial formulation. However, some recent work has shown that the limitation lies in the unrealistic theoretical assumption of the invertibility of the representation extractor. This inherent difficulty stems from the fact that the representation-level discrepancy in representation balancing accounts only for the uncertainty of the later layers than the representation, i.e., the hypothesis layers and the loss. Therefore, we shed light once again on the conventional weightingbased approach, retaining the spirit of end-to-end learning. Most conventional statistical methods are based on inverse probability weighting using propensity scores, which involves nuisance estimation of propensity as an intermediate step. They often suffer from inaccurate estimation of the propensity scores and instability due to large weights. One might be tempted to jointly optimize the nuisance and the target, though it may lead to an optimistic evaluation, e.g., avoiding noisy instances by weighting less when noise levels are heterogeneous. In this paper, we propose a simple method that amalgamates the strengths of both approaches: adversarial joint optimization of the nuisance and the target. Our formulation follows the pessimistic evaluation principle in offline reinforcement learning, which brings provable robustness to the estimation uncertainty of the nuisance and the instability due to extreme weights. Our method performed consistently well under challenging settings with heterogeneous noise. Our code is available online: [URL removed] + +## 1 INTRODUCTION + +Causal inference enables us to assess a treatment action’s impact on the decision-making process under uncertainty. Its application originated in the policy-making field (LaLonde, 1986) including healthcare (Sanchez et al., 2022). Recently, the focus was expanded to individualized decisionmaking such as precision medicine (Sanchez et al., 2022), recommendation (Schnabel et al., 2016; Bonner and Vasile, 2018), and advertisement (Sun et al., 2015; Wang et al., 2015) with the help of advanced machine learning-based methods. + +That is, we need accurate predictions of both potential outcomes with and without the treatment to take its difference since the supervision of the actual effect itself is never given. With observational data, where the action is not assigned completely at random but selected by past decision-makers, the model should generalize not only to the factual data distribution but also to the biasedly missing counterfactual outcome of the action that was not selected. This is called the fundamental problem of causal inference (Shalit et al., 2017). + +Conventional statistical methods for causal inference deal with this action selection bias by matching extraction or importance sampling at the input feature level (Rosenbaum and Rubin, 1983). Among others, inverse probability weighting using propensity scores (IPW) (Austin, 2011) is a represen- + +1 + +tative and versatile approach. The IPW method first learns the policy of the past decision makers (propensity) and then trains a target model with weights of the inverse of propensities, i.e., an estimate of the rarity of the observed action. This two-step estimation strategy defines the fundamental limitation of the weighting approach. The problems are twofold: 1) the overall accuracy depends on the precision of the propensity score estimation at the first stage, and 2) even if the propensity score was precise, the weights could be assigned skewed toward a small fraction of the whole training sample, resulting in high estimation variance (Kang et al., 2007). The overall accuracy can only be guaranteed asymptotically, limiting its applicability to modern non-asymptotic situations such as high dimensional models as DNNs for capturing complex heterogeneity or complex action spaces. + +Various countermeasures have been tried to alleviate this problem, such as doubly robust (DR) methods (Kang et al., 2007; Kennedy, 2020; Dudík et al., 2014) and double machine learning (Chernozhukov et al., 2018; Nie and Wager, 2021), which are clever combinations of outcome prediction models and only weighting its residuals using estimated propensity. Nevertheless, the IPWbased approach’s limitation is the instability of the two-step procedure in non-asymptotic situations. Its large estimation variance is problematic in cases of high dimensional covariates or cases where the propensity score is close to 0 or 1 and thus the effective sample size is limited (Athey et al., 2018). + +As in various other advancement with deep neural networks (DNN) has gained substantial attention in causal inference literature (Li and Zhu, 2022). One of the notable advancements made when Shalit et al. (2017) and Johansson et al. (2016) introduced DNN to causal inference was representation-level balancing through distribution discrepancy measures. The representation extracted from the input covariates is encouraged to be _balanced_ , i.e., independent of the action, by measuring and minimizing the discrepancy between the representation distributions conditioned on the action. While the gold standard of causal inference is randomized controlled trials (RCTs), which are costly in many real-world scenarios, this technique allows the construction of hypotheses on a balanced representation space that would virtually mimic RCTs. The performance of representation balancing is guaranteed by a generalization error upper-bound (Shalit et al., 2017) in a non-asymptotic manner. This results in an end-to-end training procedure, free from the concerns in the intermediate estimation problem. + +However, an unrealistic assumption in its theoretical guarantees has been highlighted in several recent studies (Johansson et al., 2019; Zhao et al., 2019; Wu et al., 2020). When the representation becomes degenerate and not invertible, the difference in errors arising from varying input distributions is overlooked. Such oversight stems from the inherent challenge of not addressing uncertainty within the representation extractor The representation discrepancy upper-bounds error only from the uncertainty in the later layers than the representation, i.e., the hypothesis layers and the loss. + +**Contribution** We elevate the conventional two-step weighted estimation with the spirit of endto-end adversarial training rather than representation-level balancing at risk of bias. We define the worst-case loss with respect to the nuisance model uncertainty inspired by the pessimism principle in offline reinforcement learning. Our adversarial loss simultaneously accounts for the true propensity’s uncertainty and the statistical instability due to weighting. We apply our framework to the doubly robust learner (Kennedy, 2020), an extension of IPW. The proposed method performed consistently well on datasets with heterogeneous noise, including real-world datasets, in which nonadversarial losses tend to be too optimistic. + +## 2 PROBLEM SETTING + +We consider a standard causal inference framework. We have observational data _D_ = _{_ ( _x_[(] _[n]_[)] _, a_[(] _[n]_[)] _, y_[(] _[n]_[)] ) _}_ consisting of i.i.d. instances of _d_ -dimensional background feature _x_[(] _[n]_[)] _∈X ⊂_ R _[d]_ , a treatment action _a_[(] _[n]_[)] _∈A_ = _{_ 0 _,_ 1 _}_ , and a continuous or binary outcome _y_[(] _[n]_[)] _∈Y_ , where _n_ is the sample instance index. In the Neyman-Rubin potential outcome framework (Rubin, 2005), the potential outcomes of both factual and counterfactual actions are expressed as random variables _{Ya}a∈{_ 0 _,_ 1 _}_ , of which only the factual outcome is observed � _y_[(] _[n]_[)] = _ya_ ( _n_ ) � and the counterfactual one _y_ 1 _−a_ ( _n_ ) is missing. + +2 + +Our goal is to learn a potential outcome function _f_ : _X × A →Y_ to estimate the causal effect ˆ _τ_ ( _x_ ) := _f_[ˆ] ( _x, a_ = 1) _− f_[ˆ] ( _x, a_ = 0) under the given background feature _x_ , or to learn ˆ _τ_ directly. The estimated effect _τ_ ˆ( _x_ ) is expected to approximate the true individualized causal effect defined as the conditional average treatment effect (CATE). + +**==> picture [88 x 11] intentionally omitted <==** + +A typical metric for the estimation accuracy is the MSE of _τ_ ( _x_ ), also known as the precision in estimating heterogeneous effects (PEHE). + +**==> picture [140 x 19] intentionally omitted <==** + +As a condition for consistent learnability of the CATE, we follow the standard set of assumptions in the potential outcome framework (Imbens and Rubin, 2015). + +- _Y_[(] _[n]_[)] _⊥⊥ A_[(] _[n][′]_[)] _∀n ̸_ = _n[′]_ (Stable Unit Treatment Value Assumption) + +- ( _Y_ 0 _, Y_ 1) _⊥⊥ A | X_ (unconfoundedness) + +- 0 _< µ_ ( _a|x_ ) _<_ 1 _∀x, a_ (overlap) + +## 3 RELATED WORK + +**Inverse probability weighting with propensity scores (IPW) and its extension** IPW is a wellknown and universal approach to various causal inference problems, where the density is balanced by weighting using estimated propensity scores. The extended approach called orthogonal statistical learning including the DR-Learner (Kennedy, 2020) and the R-Learner (Nie and Wager, 2021) also exploit outcome prediction models. These methods have been shown to be robust to estimation errors for the first-stage nuisance parameter, i.e., the errors do not affect the final estimation in the first-order sense of the Taylor expansion. Nonetheless, high estimation variance is a drawback of this approach when applied to non-asymptotic situations (Athey et al., 2018). Aiming at robustness for complex DNN-based models, we therefore develop a unified framework that is based on the orthogonal method but also cares extreme weights as in (Athey et al., 2018). + +**Representation balancing and decomposition** Starting with (Johansson et al., 2016; Shalit et al., 2017), a number of causal inference methods based on DNNs and representation balancing have been proposed (Li and Zhu, 2022). The representation-based methods have been demonstrated to be superior in complex problems such as nonlinear responses (Johansson et al., 2016), large actions spaces (Tanimoto et al., 2021) including continuous (Lopez et al., 2020) or structured spaces (Harada and Kashima, 2021), and so forth. These are end-to-end methods based on adversarial formulations. They virtually evaluate the worst-case with respect to the uncertainty of the model by distribution discrepancy between the representations of covariates in treated and control groups. On the other hand, representation balancing has certain limitations in an unrealistic theoretical assumption that the representation extractor should be invertible. It is shown that unobservable error terms arise when the invertibility is violated (Johansson et al., 2019; Zhao et al., 2019; Wu et al., 2020). + +A solution to this problem is the representation decomposition (Hassanpour and Greiner, 2020; Wu et al., 2022; Cheng et al., 2022). They aim to identify confounding factors that affect both action selection and the outcomes and weights with only those factors. While it is an exciting approach, it is not guaranteed as a joint optimization. Joint optimization approaches have also been proposed for ATE estimation (Shi et al., 2019), though it may lead to cheating by less weighting to noisy regions especially under noise heterogeneity. Thus, we aim at a principled and versatile method without representation extraction while incorporating the advantages of end-to-end modeling by adversarial formulation. + +**Distributionally robust optimization** A similar framework aims at robust training concerning the deviation between the empirical and test distributions (Rahimian and Mehrotra, 2019). This approach and ours both account for distributional uncertainties and care for the worst possible cases in each setting. On the other hand, they do not suppose a significant difference between the training and test distributions but deal only with small perturbations. As a result, they do not face the main + +3 + +problem that motivates this study, namely, extreme weighting by inverse probability. The uncertainty we seek to address appears in the density ratio of the test distribution to the training distribution, which can be roughly estimated from the association between background features and actual actions taken, but remains uncertain. Thus, although the problem and the approaches are similar, there is a significant difference from our setting. + +**Pessimism in reinforcement learning** Recent efforts in offline reinforcement learning revealed the benefit of pessimism on the candidate assessment (Rashidinejad et al., 2021; Buckman et al., 2021). In reinforcement learning, we consider modeling the cumulative expected reward in the long run as the Q function for assessing each action at each time step. The Q function is supposed to be maximized with respect to action _a_ during the inference phase. If the estimation error on an action is optimistic, i.e., if the Q value is overestimated, the action is likely to be selected over other better candidates. Therefore, conservative modeling of Q-function is preferable (Kumar et al., 2020), i.e., training a model to estimate below the true value when uncertain. The provable benefit of pessimism has been revealed in recent years (Buckman et al., 2021). + +Our strategy also goes along with this direction. Q function and then optimizes it, we estimate the weighted loss and then optimize. We apply this pessimism principle to weighted estimation in causal inference; that is, our method pessimistically estimates the weighted loss with respect to the uncertainty of the weights. + +## 4 NUISANCE-ROBUST WEIGHTING NETWORK + +## 4.1 ADVERSARIAL REFORMULATION OF PLUG-IN NUISANCE + +same principle. Most conventional causal inference methods employ a plug-in estimation approach: 1) estimate the nuisance propensity model _µ_ ˆ with its empirical evidence _E_[ˆ] (e.g., the cross entropy loss with the action as the label) and 2) plug it into the target empirical risk _L_[ˆ] (e.g., the MSE related to the CATE estimator _τ_ ˆ _θ_ ) + +**==> picture [295 x 20] intentionally omitted <==** + +as a substitute for the true propensity _L_ ˆ is discussed in Section 4.2. _µ[∗]_ = arg min _µ E_ ( _µ_ ). The specific form of the empirical loss + +The accuracy of the nuisance _µ_ does not ultimately matter. Thus, it could be suboptimal to estimate and fix _µ_ ˆ without considering the subsequent estimation of the target parameter _θ_[ˆ] . we establish an error bound for any _µ_ , in which we utilize _E_[ˆ] as auxiliary evidence. Here, analogous to the effectiveness analysis of pessimism in offline reinforcement learning (Buckman et al., 2021), the sub-optimality compared to the true best parameter _θ[∗]_ := arg min _θ L_ ( _θ_ ; _µ[∗]_ ) can be decomposed into optimistic/underestimation side and pessimistic/overestimation side. + +**Theorem 4.1** (Adaptation from Theorem 1 in (Buckman et al., 2021)) **.** _For any space_ Θ _, true population loss L_ ( _·_ ; _µ[∗]_ ) _, and proxy objective J_[ˆ] ( _·_ ) _,_ + +**==> picture [355 x 21] intentionally omitted <==** + +_where θ_[ˆ] = arg min _θ∈_ Θ _J_[ˆ] ( _θ_ ) _and θ[∗]_ = arg min _θ∈_ Θ _L_ ( _θ_ ; _µ[∗]_ ) _._ + +_Proof._ It follows from the definition of _θ_[ˆ] and _θ[∗]_ . Details are given in Appendix A. + +This analysis illustrates the asymmetry in the meaning of the estimation errors on the optimistic ( _J_[ˆ] ( _θ_ ) _< L_ ( _θ_ ; _µ[∗]_ )) and pessimistic sides of the loss function ( _J_[ˆ] ( _θ_ ) _> L_ ( _θ_ ; _µ[∗]_ )). The first term (2) corresponds to the estimation error on the pessimistic side and is infimum with respect to _θ_ , so it is sufficient if it is small for one _θ_ . On the other hand, the optimistic error in the second term should be uniformly small for all _θ_ . Unlike the pessimistic side, the optimistic error even for a single candidate can mislead the entire estimation process. This fact leads to the pessimism principle: “Be pessimistic + +4 + +when uncertain.” Following this principle, we focus on the optimistic error, i.e., the second term in (2), and enforce it to be bounded for all _θ ∈_ Θ. + +Here, it would be instructive to see what optimism would result when we use the weighted risk as objective _J_[ˆ] ( _θ_ ) = _L_[ˆ] ( _θ_ ; _µ_ ) with a false propensity score _µ_ . The error is decomposed as follows. + +**==> picture [324 x 27] intentionally omitted <==** + +the objective function with respect to _µ_ . Therefore, we define an uncertainty set _U_ such that _µ[∗]_ is included and take the worst case among them. + +**==> picture [272 x 25] intentionally omitted <==** + +On the other hand, weights biased toward some samples for the pessimistic evaluation would decrease the effective sample size (Swaminathan and Joachims, 2015; Tanimoto et al., 2022). Thus we have to care about the statistical stability under _µ_ , which appears as (b) in (3). Swaminathan and Joachims (2015) proposed a pessimistic evaluation of logged bandits under true values of _µ_ , and Tanimoto et al. (2022) analyzed the sample complexity of linear class with weighted loss, both of which imply that we can majorize this term using the mean square of the weights. Though it depends on the class Θ, we now assume there exists a majorizer _R_ ( _µ_ ) _≥_ (b) _,_ and let a stability constrained set _R_ as + +**==> picture [246 x 11] intentionally omitted <==** + +**==> picture [247 x 18] intentionally omitted <==** + +where _U R_ as (5). Our loss upper-bounds the optimistic evaluation error. + +**Theorem 4.2** (Uniform bound with the pessimistic objective) **.** _Suppose we have a model class_ Θ _and a loss L such that a stability constrained set R as_ (5) _can be defined with R so that L_[ˆ] ( _θ_ ; _µ_ ) _− L_ ( _θ_ ; _µ_ ) _≤ R_ ( _µ_ ) _for all θ ∈_ Θ _. Let the objective J_[ˆ] _defined as_ (6) _with sufficiently large parameters c and C so that µ[∗] ∈U ∩R, i.e., E_[ˆ] ( _µ[∗]_ ) _≤_ min _µ′ E_[ˆ] ( _µ[′]_ ) + _c and R_ ( _µ[∗]_ ) _≤ C. Then for all θ ∈_ Θ _we have_ + +**==> picture [90 x 13] intentionally omitted <==** + +_Proof. U , R_ and _R_ . Details can be found in Appendix Appendix A. + +Note that the nuisance uncertainty tolerance _c_ does not appear in this optimistic error upper bound. Being too pessimistic with large _c_ will lead to a large pessimistic-side error in (2). Therefore, _U_ should be as small as possible while containing _µ[∗]_ . + +## 4.2 NUISANCE-ROBUST TRANSFORMED OUTCOME REGRESSION NETWORK + +Under the aforementioned approach, next, we will discuss the application of our nuisance-robust loss to specific estimation methods. Among two-step methods of the form (1), a simple but clever method to directly estimate CATE is the transformed outcome regression (Athey and Imbens, 2016). This method estimates the target CATE without estimating each potential outcome. Based on pretrained and fixed _µ_ ˆ, the transformed outcome _z_ is defined as follows. + +**==> picture [283 x 28] intentionally omitted <==** + +The transformed outcome is equivalent to CATE in expectation supposed that ˆ _µ_ is accurate: E[ _z|x_ ] = ˆ _τ_ ( _x_ ) = E[ _Y_ 1 _− Y_ 0 _|x_ ] (see Appendix B for detail). Therefore, at the population level, the model _τθ_ + +5 + +that minimizes MSE with respect to _z_ is consistent with that of minimizing PEHE. And, unlike CATE, _z_ can be calculated from observed values, since the unobserved potential outcome _y_ 1 _−a_ would be multiplied by 0 and eliminated. We call this approach transformed outcome regression with propensity weighting (PW), or PWNet in short. + +While we do not suffer from estimation errors in potential outcomes, _z_ in PWNet (7) has a large variance in general. Therefore, we can also utilize pre-trained potential outcome models _f_[ˆ] _a_ ( _x_ ) _≃_ E[ _Ya|x_ ] to reduce the variance in the transformed outcome. Kennedy (2020) proposed using the plug-in CATE estimate _f_[ˆ] 1( _x_[(] _[n]_[)] ) _− f_[ˆ] 0( _x_[(] _[n]_[)] ) with residual adjusted with weights. Despite being a plug-in method, the estimation error of these models ( _f_ 1 _, f_ 0) does not necessarily ruin the later step. If either ( _f_ 1 _, f_ 0) or _µ_ is accurate, _z_ works as an accurate target, which is called the double robustness (Kennedy, 2020). This method is called the doubly robust learner or DRNet. + +Taking DRNet as a baseline plug-in method, we formulate our proposed method nuisance-robust transformed outcome regression, NuNet. Our transformed outcome _zµ_ with mutable nuisance _µ_ is + +**==> picture [364 x 28] intentionally omitted <==** + +We start with a pre-trained nuisance _µ_ 0 and randomly initialized parameter _θ_ and perform adversarial 2 optimization of them as in (6) with the MSE _L_[ˆ] ( _θ_ ; _µ_ ) = _N_ 1 � _n zµ_[(] _[n]_[)] _− τθ_ ( _x_[(] _[n]_[)] ) _._ While DRNet � � uses pre-trained and fixed nuisance models _f_[ˆ] 1 _, f_[ˆ] 0 _,_ and ˆ _µ_ for training ˆ _τθ_ , we utilize pre-trained _µ_ 0 for initialization but update simultaneously with _θ_ . Although _f_ 0 and _f_ 1 are also nuisance parameters, the uncertainty of them do not differ among the target parameter space, thus we need not take care. Excluding the error correction term in (8), a disturbance (∆ _f_ 0 _,_ ∆ _f_ 1) can be absorbed by translation _τ ← τ_ + ∆ _f_ 1 _−_ ∆ _f_ 0. + +## 4.3 IMPLEMENTATION OF CONSTRAINTS FOR GRADIENT-BASED UPDATE + +We defined the evidence level _E_[ˆ] ( _µ_ ) and the statistical stability _R_ ( _µ_ ) as constraints in Section 4.1. Typical constraint implementation is as regularization term such as _α_ max _{_ 0 _, E_[ˆ] ( _µ_ ) _− E_[ˆ] ( _µ_ 0) _− c},_ where _µ_ 0 is the pre-trained and fixed propensity model. However, since _−L_[ˆ] ( _θ_ ; _µ_ ) is not convex with respect to _µ_ , the regularization cannot reproduce the constrained optimization within _U_ . _µ_ would diverge to extreme values to increase _L_[ˆ] ( _θ_ ; _µ_ ) with no regard for the increase in the regularization term. Therefore, for _E_[ˆ] , we employ a (simplified version of) augmented Lagrangian method (Bertsekas, 2014). We use the regularization term _αk_ max _{_ 0 _, E_[ˆ] ( _µ_ ) _− E_[ˆ] ( _µ_ 0) _− c},_ where _αk_ = _α_ 0 _γ[k]_ with the training epoch _k_ . Note that the hyperparameters _α_ 0 and _γ_ are for optimization and could be tuned only by the training data. The only statistical hyperparameter here is the tolerance _c_ , which is to be selected by validation. + +For the statistical stability _R_ , we employ squared weights simply as a regularization term. Let _wµ_[(] _[n]_[)] = _µ_ ( _ax_[(][(] _[n][n]_[)][)] )[+] 1 _−_ 1 _−µ_ ( _ax_[(][(] _[n][n]_[)][)] )[the][weight][under][the][nuisance][function] _[µ]_[.][Finally,][our][adversarial] objective at the _k_ -th iteration is the following. + +**==> picture [389 x 37] intentionally omitted <==** + +In each iteration, we minimize _J_[ˆ] ( _θ, µ_ ) with respect to _θ_ and maximize with respect to _µ_ . Overall, our loss controls the optimistic side error due to the uncertainty of _µ_ (3-a) by maximizing the first term with respect to _µ_ under the likelihood constraint in the second term, while simultaneously controlling the optimistic side error of the weighted empirical loss (3-b) by flattening the weight with the third term. The whole algorithm is summarized in Algorithm 1 and Figure 1 illustrates the architecture. + +6 + +**Algorithm 1** Nuisance-Robust Transformed Outcome Regression Network (NuNet) + +**Input:** Training data _D_ = _{_ ( _x_[(] _[n]_[)] _, a_[(] _[n]_[)] _, y_[(] _[n]_[)] ) _}n_ , hyperparameters _α_ 0 _, γ, β, c_ , validation ratio _r_ **Output:** Trained network parameter _θ_ and validation error + +1: Train _f_ ˆ _a ← f_ arg min1 _, f_ 0 _, µ_ by an arbitrary supervised learning method, e.g.: _fa N_ 1 � _n_ : _a_[(] _[n]_[)] = _a_[(] _[y]_[(] _[n]_[)] _[ −][f][a]_[(] _[x]_[(] _[n]_[)][))][2][for each] _[ a][ ∈{]_[0] _[,]_[ 1] _[}]_[,] _µ_ 0 _←_ arg min _µ − N_[1] � _n[a]_[(] _[n]_[)][ log] _[ µ]_[(] _[x]_[(] _[n]_[)][) + (1] _[ −][a]_[(] _[n]_[)][) log(1] _[ −][µ]_[(] _[x]_[(] _[n]_[)][))] 2: Split train and validation _D_ tr _, D_ val by the ratio _r_ + +3: _k ←_ 0 + +- 4: **while** Convergence criteria is not met **do** + +5: **for** each sub-sampled mini-batch from _D_ tr **do** + +6: Update parameters with objective (9) and step sizes _ηθ, ηµ_ from optimizes: 7: _θk_ +1 _← θk − ηθ∇θJ_[ˆ] ( _θ, µ_ ) + +8: _µk_ +1 _← µk_ + _ηµ∇µJ_[ˆ] ( _θ, µ_ ) + +9: _αk_ +1 _← γαk_ 10: _k ← k_ + 1 11: Check convergence criterion with validation error _N_ 1val � _n∈D_ val[(] _[z] µ_[(] _[n]_ 0[)] _[−][τ] θ_[(] _[x]_[(] _[n]_[)][))][2] + +- 12: **return** _θ_ and the last validation error for model selection + +**==> picture [200 x 108] intentionally omitted <==** + +**----- Start of picture text -----**
+y
τθ τ L ( θ ; μ )
x Gradient Reversal Layer
z
μ
μ R ( μ )
f 1, f 0
a max{0, E ( μ ) − E ( μ 0) − c }
**----- End of picture text -----**
+ +Figure 1: The architecture of NuNet. The nuisance function _µ_ is trained to maximize the empirical loss _L_[ˆ] ( _θ_ ; _µ_ ) while minimizing the other terms. This adversarial formulation can be expressed as joint minimization with the gradient reversal layer. + +## 5 EXPERIMENT + +## 5.1 SETTINGS + +**Synthetic data generation** We followed the setup of (Curth and van der Schaar, 2021b) for synthetic data generation processes and model hyperparameters, except for our noise heterogeneous setting. We generated _d_ = 25 dimensional multivariate normal covariates including 5 confounding factors that affect outcome and treatment selection, 5 outcome-related factors, and 5 purely CATErelated factors. The true outcome and CATE models were nonlinear. Other details are described in Appendix C. + +In addition to the original additive noise (AN) setting _y_ = _y_ true + _ε_ , we also tested on the multiplicative noise (MN) setting _y_ = _y_ true(1 + _ε_ ) _,_ where _ε_ is drawn from a normal distribution with its average noise level was adjusted to the one in AN. Most causal inference literature uses synthetic data or semi-synthetic data where only covariates are real and synthesizes outcomes with additive noise, which do not reflect the heterogeneity of the real environment. Noise heterogeneity is critical since the optimistic-side error will likely emerge, and naive joint optimization suffers. We therefore set this up as a simple data generation model with heterogeneous noise. + +**Real-world dataset** Most well-established semi-synthetic datasets have real-world covariates and synthesized outcomes and do not reproduce up to noise heterogeneity, while the Twins dataset from (Almond et al., 2005) had both potential outcomes recorded. The first-year mortality of twins born at low birth weights was treated as potential outcomes for the heavier and lighter-born twins, respectively, and weighted subsampling was performed to reproduce the missing counterfactuals. The test + +7 + +Table 1: PEHE on additive noise dataset (mean _±_ standard error on 10 runs). The best results are shown in bold, and comparable results are italicized and underlined. + +|Method|N=500
1000
2000
5000
10000
20000| +|---|---| +|TNet
TARNet
CFR
SNet3
SNet
PWNet
DRNet|18.55_±_0.88
13.89_±_1.10
5.02_±_0.14
1.96_±_0.06
1.22_±_0.03
0.88_±_0.02
18.21_±_1.12
8.77_±_0.35
4.28_±_0.19
1.74_±_0.06
1.06_±_0.02
0.76_±_0.03
17.90_±_1.18
8.77_±_0.35
4.28_±_0.19
1.71_±_0.05
1.05_±_0.02
0.76_±_0.03
**13.10**_±_**0.65**
_7.73 ± 0.34_
3.85_±_0.11
1.54_±_0.05
0.99_±_0.02
0.62_±_0.01
_14.14 ± 0.57_
**7.17**_±_**0.29**
**3.39**_±_**0.11**
**1.26**_±_**0.03**
**0.74**_±_**0.02**
**0.43**_±_**0.01**
18.46_±_0.82
13.03_±_0.54
15.97_±_0.68
20.99_±_1.25
25.31_±_2.32
19.21_±_1.36
16.56_±_0.75
11.58_±_0.66
3.91_±_0.14
1.45_±_0.04
1.14_±_0.11
0.66_±_0.03| +|NuNet|15.78_±_0.69
11.43_±_0.48
4.02_±_0.09
1.52_±_0.07
0.86_±_0.01
0.54_±_0.01| + +target is the difference between the noisy potential outcomes _τ_[(] _[n]_[)] = _y_ 1[(] _[n]_[)] _− y_ 0[(] _[n]_[)] instead of CATE E[ _τ_[(] _[n]_[)] _|x_ ]. We followed (Curth and van der Schaar, 2021a) for sampling strategy and other details. + +Also, the Jobs dataset from (LaLonde, 1986) has a randomized test set based on an experimental job training program and an observational training set. Although we do not have both potential outcomes, we can substitute the CATE in PEHE with the transformed outcome since the true propensity is known as constant in the randomized test set, as proposed in (Curth et al., 2021). A detailed justification for this evaluation can be found in Appendix B. Most popular semi-synthetic datasets used in causal inference evaluation have generated outcomes and do not reproduce noise heterogeneity in real situations. That is why we used these datasets with real outcomes. + +**Baseline methods** We compared several representative methods for causal inference with DNN. TNet was a simple plug-in method that estimates each potential outcome with separate two networks and then outputs the difference between their predictions. SNet and SNet3 were decomposed representation-based methods that shared representation extractors for outcome and propensity estimation layers. They have three kinds of extractors, namely, outcome-only, propensityonly, and shared representation for confounders. SNet3 was a modified version, not using weighting in (Curth and van der Schaar, 2021b), of what was originally proposed as DR-CFR (Hassanpour and Greiner, 2019) and DeR-CFR (Wu et al., 2022) for simultaneous optimization of the weights and the outcome model. SNet was an even more flexible architecture than SNet3 that had shared and independent extractors for each potential outcome, proposed in (Curth and van der Schaar, 2021b). PWNet and DRNet were DNN implementations of transformed outcome methods (Athey and Imbens, 2016; Kennedy, 2020), in which networks in the first step were independent for each potential outcome and propensity. In the second step, a single CATE network was trained. Our proposed NuNet is based on DRNet architecture. + +**Hyparparameters and model selection** We set the candidates of the hyperparameters as _α_ 0 _∈ {_ 1 _,_ 10 _}_ , _γ ∈{_ 1 _._ 01 _,_ 1 _._ 03 _,_ 1 _._ 05 _}_ , and _β ∈{_ 10 _,_ 100 _,_ 300 _}_ . For the experiment with Twins, we fixed them as _α_ 0 = 10 _, γ_ = 1 _._ 03 _, β_ = 100 _._ The tolerance was fixed at _c_ = 0 _._ 03. Model selection, including early stopping, was performed on the evidence measure of each method with 30% of the training data held out for validation. That is, for transformed outcome methods, we evaluated the MSE with respect to the transformed outcome _z_ in each method. For our proposed NuNet, we used the pre-trained and fixed transformed outcome for validation, just as in DRNet. + +## 5.2 RESULTS + +**AN setting** The results are shown in Table 1. Our proposed NuNet outperformed or was at least comparable to, DRNet, the baseline plug-in method of NuNet. On the other hand, representationbased methods (SNet3 and SNet) outperformed the transformed outcome methods (PWNet, DRNet, and NuNet). The shared representation extractor of the confounding factors could be an effective inductive bias, especially with small sample sizes. SNet is overall more accurate than SNet3 since it can also share parameters for components common to both potential outcomes. + +**MN setting** Table 2 shows the results in PEHE. Our proposed method outperformed other baselines when the sample size was relatively sufficient. Unlike the AN setting, the multiplicative (heterogeneous) noise setting tends to be optimistic. The pessimistic evaluation with more emphasis on + +8 + +Table 2: PEHE on multiplicative noise dataset + +|Method|N=500|1000|2000
5000
10000
20000|2000
5000
10000
20000|2000
5000
10000
20000| +|---|---|---|---|---|---| +|TNet
TARNet
CFR
SNet3
SNet
PWNet
DRNet|22.03_±_1.23
20.75_±_0.99
20.30_±_1.05
**17.83**_±_**0.94**
_18.44 ± 0.86_
_18.97 ± 0.90_
19.96_±_1.01|17.59_±_0.89
**13.06**_±_**0.53**
**13.06**_±_**0.53**
15.44_±_0.65
15.73_±_0.58
_13.14 ± 0.54_
15.34_±_0.75|11.97_±_0.40
5.93_±_0.16
3.76_±_0.08
2.52_±_0.11
_10.25 ± 0.36_
5.27_±_0.18
3.17_±_0.08
2.10_±_0.09
_10.10 ± 0.32_
5.22_±_0.18
3.16_±_0.08
2.07_±_0.09
11.12_±_0.36
5.71_±_0.25
3.61_±_0.14
2.46_±_0.09
11.22_±_0.33
5.47_±_0.17
3.12_±_0.08
2.01_±_0.07
15.95_±_0.64
21.08_±_1.22
25.63_±_2.31
20.92_±_2.09
_9.93 ± 0.40_
_4.80 ± 0.21_
3.20_±_0.24
1.83_±_0.10||| +|NuNet|_19.96 ± 1.20_|15.54_±_0.57||**9.83**_±_**0.45**|**4.67**_±_**0.32**
**2.44**_±_**0.09**
**1.50**_±_**0.06**| + +Table 3: MSE for noisy CATE on real-world datasets (mean _±_ standard error on 5 runs). + +|ble 3: MSE for noisyC|ATE on real|-world datas|ets(mean_±_|standard error on 5 ru| +|---|---|---|---|---| +|Method
N=500
TNet
0.354_±_.004
TARNet
0.336_±_.003
CFR
**0.322**_±_**.001**
SNet3
0.331_±_.002
SNet
0.333_±_.002
PWNet
0.330_±_.001
DRNet
0.340_±_.002
NuNet
0.326_±_.002|1000|Twins
2000|5000|Jobs
11400
N=2570| +||0.350_±_.002
0.336_±_.002
_0.324 ± .002_
0.330_±_.002
0.331_±_.002
0.327_±_.001
0.338_±_.001|0.329_±_.001
0.326_±_.001
_0.323 ± .002_
_0.322 ± .001_
_0.323 ± .001_
0.324_±_.001
_0.322 ± .001_|0.324_±_.002
_0.320 ± .001_
_0.321 ± .001_
**0.319**_±_**.001**
_0.320 ± .001_
_0.322 ± .002_
0.323_±_.001|0.322_±_.001
9.42_±_.12
_0.321 ± .001_
9.33_±_.02
_0.321 ± .001_
9.33_±_.02
_0.320 ± .001_
9.38_±_.06
_0.320 ± .001_
9.36_±_.06
0.323_±_.001
8.82_±_.03
0.323_±_.001
9.10_±_.02| +||**0.323**_±_**.002**|**0.320**_±_**.001**|_0.321 ± .001_|**0.319**_±_**.001**
**8.62**_±_**.06**| + +hard instances would be a reasonable explanation for the superiority of the proposed method. Even though representation decomposition should also be useful in the MN setting since the data generation model was the same as the AN setting except for noise, the weighting approach was superior to the representation decomposition method without weighting. Combining representation decomposition and weighting is a promising future direction. Simultaneous optimization is required and our approach based on plug-in (multi-step) baseline methods cannot be simply applied. + +**Real-world datasets** Experiments on Twins data also showed the superiority of NuNet in most cases as in Table 3. Note that the test target _τ_[(] _[n]_[)] is noisy, and the value contains the noise variance. In the small sample cases as _N_ = 500, the methods with fixed outcome models (TNet and DRNet) underperformed compared to the methods without outcome models or shared representations. NuNet based on DRNet should suffer the same disadvantage, though it still showed superior performance to those baseline methods. Table 3 also showed the results on Jobs data, which exhibits similar trends. Although the accuracy of PWNet is relatively high, probably due to the low dimensionality of _d_ = 8, the proposed DRNet-based method still outperformed other baseline methods. Note that the evaluation metric for Jobs, the MSE with respect to the transformed outcome, also contains constant noise. + +## 6 CONCLUSION + +We proposed NuNet to unify the two steps of nuisance estimation and target estimation in a single step based on the pessimism principle. We have empirically demonstrated that existing methods not based on weighting and methods based on weighting with a two-step strategy tend to be optimistic, and the proposed method exhibited superior performances, especially in noise heterogeneity. To the best of our knowledge, our approach is the first attempt at a principled solution based on pessimism, and it sheds light on the approach for making various multi-step inference methods end-to-end. + +**Limitation and future work** Our framework has wide potential applications to plug-in methods, not only the proposed method. On the other hand, it cannot be applied to methods that are originally formulated as joint optimization of models and weights, such as representation decomposition. Such models that have representation shared by the model and weights often exhibit effective inductive bias, which is another aspect of the combination of the weighting approach and DNNs. Deriving a pessimism-based theoretical framework for such methods and investigating principled learning methods would be a promising future direction for versatile causal inference methods. + +9 + +## REFERENCES + +- D. Almond, K. Y. Chay, and D. S. Lee. The costs of low birth weight. _The Quarterly Journal of Economics_ , 120(3):1031–1083, 2005. + +- S. Athey and G. Imbens. Recursive partitioning for heterogeneous causal effects. _Proceedings of the National Academy of Sciences_ , 113(27):7353–7360, 2016. + +- S. Athey, G. W. Imbens, and S. Wager. Approximate residual balancing. _Journal of the Royal Statistical Society. Series B (Statistical Methodology)_ , 80(4):597–623, 2018. + +- P. C. Austin. An introduction to propensity score methods for reducing the effects of confounding in observational studies. _Multivariate Behavioral Research_ , 46(3):399–424, 2011. + +- D. P. Bertsekas. _Constrained optimization and Lagrange multiplier methods_ . Academic press, 2014. + +- S. Bonner and F. Vasile. Causal embeddings for recommendation. In _ACM conference on recommender systems (RecSys)_ , pages 104–112, 2018. + +- J. Buckman, C. Gelada, and M. G. Bellemare. optimization. In _International Conference on Learning Representations (ICLR)_ , 2021. + +- M. Cheng, X. Liao, Q. Liu, B. Ma, J. Xu, and B. Zheng. Learning disentangled representations for counterfactual regression via mutual information minimization. In _Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval_ , pages 1802–1806, 2022. + +- V. Chernozhukov, D. Chetverikov, M. Demirer, E. C. Hansen, W. Newey, and J. Robins. Double/debiased machine learning for treatment and structural parameters. _The Econometrics Journal_ , 21(1):C1–C68, 2018. + +- A. Curth and M. van der Schaar. On inductive biases for heterogeneous treatment effect estimation. _Advances in Neural Information Processing Systems (NeurIPS)_ , 34:15883–15894, 2021a. + +- A. Curth and M. van der Schaar. Nonparametric estimation of heterogeneous treatment effects: From theory to learning algorithms. In _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pages 1810–1818. PMLR, 2021b. + +- A. Curth, D. Svensson, J. Weatherall, and M. van der Schaar. Really doing great at estimating cate? a critical look at ml benchmarking practices in treatment effect estimation. In _NeurIPS Datasets and Benchmarks_ , 2021. + +- M. Dudík, D. Erhan, J. Langford, and L. Li. Doubly robust policy evaluation and optimization. _Statistical Science_ , 29(4):485–511, 2014. + +- S. Harada and H. Kashima. Graphite: Estimating individual effects of graph-structured treatments. In _ACM International Conference on Information & Knowledge Management (CIKM)_ , pages 659– 668, 2021. + +- N. Hassanpour and R. Greiner. Counterfactual regression with importance sampling weights. In _International Joint Conference on Artificial Intelligence (IJCAI)_ , pages 5880–5887, 2019. + +- N. Hassanpour and R. Greiner. Learning disentangled representations for counterfactual regression. In _International Conference on Learning Representations (ICLR)_ , 2020. + +- G. W. Imbens and D. B. Rubin. _Causal inference in statistics, social, and biomedical sciences_ . Cambridge University Press, 2015. + +- F. D. Johansson, U. Shalit, and D. Sontag. Learning representations for counterfactual inference. In _International Conference on Machine Learning (ICML)_ , pages 3020–3029, 2016. + +- F. D. Johansson, D. Sontag, and R. Ranganath. Support and invertibility in domain-invariant representations. In _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pages 527–536, 2019. + +10 + +- J. D. Kang, J. L. Schafer, et al. Demystifying double robustness: A comparison of alternative strategies for estimating a population mean from incomplete data. _Statistical Science_ , 22(4):523– 539, 2007. + +- E. H. Kennedy. Towards optimal doubly robust estimation of heterogeneous causal effects. _arXiv preprint arXiv:2004.14497_ , 2020. + +- A. Kumar, A. Zhou, G. Tucker, and S. Levine. Conservative Q-learning for reinforcement learning. In _Advances in Neural Information Processing Systems (NeurIPS)_ , volume 33, pages 1179–1191, 2020. + +- R. J. LaLonde. Evaluating the econometric evaluations of training programs with experimental data. _The American economic review_ , pages 604–620, 1986. + +- Z. Li and Z. Zhu. A survey of deep causal model. _arXiv preprint arXiv:2209.08860_ , 2022. + +- R. Lopez, C. Li, X. Yan, J. Xiong, M. Jordan, Y. Qi, and L. Song. Cost-effective incentive allocation via structured counterfactual inference. In _AAAI Conference on Artificial Intelligence (AAAI)_ , volume 34, pages 4997–5004, 2020. + +- X. Nie and S. Wager. Quasi-oracle estimation of heterogeneous treatment effects. _Biometrika_ , 108 (2):299–319, 2021. + +- H. Rahimian and S. Mehrotra. Distributionally robust optimization: A review. _arXiv preprint arXiv:1908.05659_ , 2019. + +- P. Rashidinejad, B. Zhu, C. Ma, J. Jiao, and S. Russell. Bridging reinforcement learning and imitation learning: A tale of pessimism. _Advances in Neural Information Processing Systems (NeurIPS)_ , 34, 2021. + +- P. R. Rosenbaum and D. B. Rubin. The central role of the propensity score in observational studies for causal effects. _Biometrika_ , 70(1):41–55, 1983. + +- D. B. Rubin. Causal inference using potential outcomes: Design, modeling, decisions. _Journal of the American Statistical Association_ , 100(469):322–331, 2005. + +- P. Sanchez, J. P. Voisey, T. Xia, H. I. Watson, A. Q. O’Neil, and S. A. Tsaftaris. Causal machine learning for healthcare and precision medicine. _Royal Society Open Science_ , 9(8):220638, 2022. + +- T. Schnabel, A. Swaminathan, A. Singh, N. Chandak, and T. Joachims. Recommendations as treatments: Debiasing learning and evaluation. In _international conference on machine learning_ , pages 1670–1679. PMLR, 2016. + +- U. Shalit, F. D. Johansson, and D. Sontag. Estimating individual treatment effect: generalization bounds and algorithms. In _International Conference on Machine Learning (ICML)_ , pages 3076– 3085, 2017. + +- C. Shi, D. Blei, and V. Veitch. Adapting neural networks for the estimation of treatment effects. _Advances in neural information processing systems_ , 32, 2019. + +- W. Sun, P. Wang, D. Yin, J. Yang, and Y. Chang. Causal inference via sparse additive models with application to online advertising. In _Twenty-Ninth AAAI Conference on Artificial Intelligence_ , 2015. + +- A. Swaminathan and T. Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In _International Conference on Machine Learning (ICML)_ , pages 814–823. PMLR, 2015. + +- A. Tanimoto, T. Sakai, T. Takenouchi, and H. Kashima. Regret minimization for causal inference on large treatment space. In _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pages 946–954, 2021. + +- A. Tanimoto, S. Yamada, T. Takenouchi, M. Sugiyama, and H. Kashima. Improving imbalanced classification using near-miss instances. _Expert Systems with Applications_ , 201:117130, 2022. + +11 + +- P. Wang, W. Sun, D. Yin, J. Yang, and Y. Chang. Robust tree-based causal inference for complex ad effectiveness analysis. _Proceedings of the Eighth ACM International Conference on Web Search and Data Mining_ , 2015. + +- A. Wu, J. Yuan, K. Kuang, B. Li, R. Wu, Q. Zhu, Y. T. Zhuang, and F. Wu. Learning decomposed representations for treatment effect estimation. _IEEE Transactions on Knowledge and Data Engineering_ , 2022. + +- X. Wu, Y. Guo, J. Chen, Y. Liang, S. Jha, and P. Chalasani. Representation bayesian risk decompositions and multi-source domain adaptation. _arXiv preprint arXiv:2004.10390_ , 2020. + +- H. Zhao, R. T. Des Combes, K. Zhang, and G. Gordon. On learning invariant representations for domain adaptation. In _International Conference on Machine Learning (ICML)_ , pages 7523–7532. PMLR, 2019. + +12 + diff --git a/open_review/iclr2024_8813.json b/open_review/iclr2024_8813.json new file mode 100644 index 0000000000000000000000000000000000000000..762fc31959f462d12bdf9c99d6595e68b3f73221 --- /dev/null +++ b/open_review/iclr2024_8813.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8813", + "source": "iclr2024", + "source_year": 2024, + "title": "Pessimistic Nonlinear Least-Squares Value Iteration for Offline Reinforcement Learning", + "abstract": "Offline reinforcement learning (RL), where the agent aims to learn the optimal policy based on the data collected by a behavior policy, has attracted increasing attention in recent years. While offline RL with linear function approximation has been extensively studied with optimal results achieved under certain assumptions, many works shift their interest to offline RL with non-linear function approximation.\nHowever, limited works on offline RL with non-linear function approximation have instance-dependent regret guarantees.\n In this paper, we propose an oracle-efficient algorithm, dubbed Pessimistic Nonlinear Least-Square Value Iteration (PNLSVI), for offline RL with non-linear function approximation. Our algorithmic design comprises three innovative components: (1) a variance-based weighted regression scheme that can be applied to a wide range of function classes, (2) a subroutine for variance estimation, and (3) a planning phase that utilizes a pessimistic value iteration approach. Our algorithm enjoys a regret bound that has a tight dependency on the function class complexity and achieves minimax optimal instance-dependent regret when specialized to linear function approximation. Our work extends the previous instance-dependent results within simpler function classes, such as linear and differentiable function to a more general framework. To the best of our knowledge, this is the first statistically optimal algorithm for nonlinear offline RL.", + "rebuttal": "### Follow up with Reviewer 38or\nDear Reviewer 38or,\n\nWe greatly appreciate your valuable feedback and are reaching out to see whether there have been any remaining questions that you have. If our response and revision have addressed your questions and concerns, we kindly request you to re-evaluate our work. Thank you!\n\n### Gentle Reminder\nDear Reviewer 38or\n\nAs the deadline for the author-reviewer discussion is fast approaching, we would like to kindly inquire whether our response and revision have adequately addressed your questions and concerns. We really appreciate your feedback.\n\n### Response to Reviewer 38or\nThank you for your valuable feedback. We address your questions point-by-point.\n\n**Q1**: How valuable is it to prove an instance-dependent bound when we have to impose a uniform coverage assumption? Which part of the proof requires uniform data coverage while partial data coverage does not work?\n\n**A1**: In this work, we aim to achieve an optimal dependency on the complexity of the function class. For this purpose, we utilize the technique of reference-advantage decomposition to overcome the challenge posed by the additional error from uniform convergence over the [...]\n\n### Response to Reviewer Fsc5\nThank you for your positive feedback. We address your questions as follows.\n\n**Q1**: The work is overall incremental. The key techniques are largely known, either from online RL or offline RL. I can see that there are technical barriers in directly extending them to the problem of offline RL with general function approximation, but such extensions are mostly not too difficult.\n\n**A1**: We agree with the reviewer that the extension of RL with linear function approximation to general function approximation is in general not too difficult given so many recent develop [...]\n\n### Response to Reviewer FxDp\nThank you for your strong support. We will address your questions as follows.\n\n**Q1**: In section 3, I think you went a bit too far with the abuse of notation when defining Bellman operators. Is $f$ a function of the state or the state and action? How can you define the relationship between the Q and the V function of a fixed policy by Bellman's optimality operator?\n\n**A1**: Thank you for your suggestion. We have defined $f(s) = \\max_{a}f(s,a)$ and added a footnote to clarify the two slightly abused notations $f(s)$ and $f(s,a)$. \n\nFor the Bellman operator, we hav [...]\n\n### Response to Reviewer KfKk\nThank you for your positive feedback. We address your questions point-by-point.\n\n**Q1**: How to computationally efficiently obtain the condition for the second bullet point in 4.3?\n\n**A1**: In Appendix C, we actually discuss how to efficiently compute the optimization problem $\\max\\{ |f_1(z_h)-f_2(z_h)|, f_1,f_2 \\in \\mathcal F_h: \\sum_{k \\in [K] } \\frac{(f_1(z_h^k)- f_2(z_h^k))^2}{(\\hat \\sigma_h(s_h^k,a_h^k))^2} \\leq (\\beta_h)^2\\}$. With the definition of the D^2 divergence, for any $f_1,f_2 \\in \\mathcal F_h $ satisfying $\\sum_{k \\in [K]}\\frac{1}{(\\hat\\sigma_h(z_ [...]\n\n### Thank you\nThank you for your support! We are very happy that our response has clarified your questions.", + "initial_scores": [ + 8, + 6, + 6, + 5 + ], + "score_mean": 6.25, + "score_variance": 1.58, + "score_spread": 3, + "score_min": 5, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "The paper examines the incorporation of pessimism for non-linear function approximation, under an assumption of uniform coverage. It improve upon prior art in terms of dependency on the function complexity and matches the lower bound when applied to the linear setting. The framework allows for instance-dependent results. The result is interesting, although fairly incremental. A lower bound for the general case is not presented,", + "forum_id": "4kLVvIh8cp", + "primary_area": "reinforcement learning", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_FxDp", + "review_id": "57QlmYvLUo", + "scores": { + "rating": 8, + "soundness": 4, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 2773, + "edit_detected": true, + "edit_delta_seconds": 442094, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_KfKk", + "review_id": "gDkpfOnz29", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 2, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 2207, + "edit_detected": true, + "edit_delta_seconds": 819647, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_Fsc5", + "review_id": "hXEPIE1fb7", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 4, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 1504, + "edit_detected": true, + "edit_delta_seconds": 832244, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_38or", + "review_id": "9dAZvKIrYg", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 1978, + "edit_detected": true, + "edit_delta_seconds": 936766, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8813.md b/open_review/iclr2024_8813.md new file mode 100644 index 0000000000000000000000000000000000000000..4f6d7bffaaa2e7ef8399418bb6d58941e951eb48 --- /dev/null +++ b/open_review/iclr2024_8813.md @@ -0,0 +1,959 @@ +## - PESSIMISTIC NONLINEAR LEAST-SQUARES VALUE IT ERATION FOR OFFLINE REINFORCEMENT LEARNING + +Authors withheld for review + +## ABSTRACT + +Offline reinforcement learning (RL), where the agent aims to learn the optimal policy based on the data collected by a behavior policy, has attracted increasing attention in recent years. While offline RL with linear function approximation has been extensively studied with optimal results achieved under certain assumptions, many works shift their interest to offline RL with non-linear function approximation. However, limited works on offline RL with non-linear function approximation have instance-dependent regret guarantees. In this paper, we propose an oracle-efficient algorithm, dubbed Pessimistic Nonlinear Least-Square Value Iteration (PNLSVI), for offline RL with non-linear function approximation. Our algorithmic design comprises three innovative components: (1) a variance-based weighted regression scheme that can be applied to a wide range of function classes, (2) a subroutine for variance estimation, and (3) a planning phase that utilizes a pessimistic value iteration approach. Our algorithm enjoys a regret bound that has a tight dependency on the function class complexity and achieves minimax optimal instance-dependent regret when specialized to linear function approximation. Our work extends the previous instance-dependent results within simpler function classes, such as linear and differentiable function to a more general framework. + +## 1 INTRODUCTION + +Offline reinforcement learning (RL), also known as batch RL, is a learning paradigm where an agent learns to make decisions based on a set of pre-collected data, instead of interacting with the environment in real-time like online RL. The goal of offline RL is to learn a policy that performs well in a given task, based on historical data that was collected from an unknown environment. Recent years have witnessed significant progress in developing offline RL algorithms that can leverage large amounts of data to learn effective policies. These algorithms often incorporate powerful function approximation techniques, such as deep neural networks, to generalize across large state-action spaces. They have achieved excellent performances in a wide range of domains, including the games of Go and chess (Silver et al., 2017; Schrittwieser et al., 2020), robotics (Gu et al., 2017; Levine et al., 2018), and control systems (Degrave et al., 2022). + +Several works have studied the theoretical guarantees of offline tabular RL and proved near-optimal sample complexities in this setting (Xie et al., 2021b; Shi et al., 2022; Li et al., 2022). However, these algorithms cannot handle real-world applications with large state and action spaces. Consequently, a significant body of research has devoted to offline RL with function approximation. For example, (Jin et al., 2021b) proposed the first efficient algorithm for offline RL with linear MDPs, employing the principle of pessimism. Subsequently, numerous works have presented a range of algorithms for offline RL with linear function approximation, as seen in Zanette et al. (2021); Min et al. (2021); Yin et al. (2022a); Xiong et al. (2023); Nguyen-Tang et al. (2023). Among them, some works have instance-dependent (a.k.a., problem-dependent) upper bound (Jin et al., 2021b; Yin et al., 2022a; Xiong et al., 2023; Nguyen-Tang et al., 2023), which matches the worst-case result when dealing with the “hard instance” and performs better in easy cases. To address the complexities of working with more complex function classes, recent research has shifted the focus towards offline reinforcement learning (RL) with general function approximation (Chen & Jiang, 2019; Xie et al., 2021a). Utilizing the principle of pessimism first used in Jin et al. (2021b), Xie et al. (2021a) enforced pessimism at the initial state over the set of functions consistent with the Bellman equations. Their algorithm requires solving an optimization problem over all the potential policies and corresponding version space, which includes all functions with lower Bellman-error. To overcome this limitation, Xie et al. (2021a) proposed a practical algorithm which + +1 + +has a poor dependency on the function class complexity. Later, Cheng et al. (2022) proposed an adversarially trained actor critic method based upon the concept of relative pessimism. Their result is not statistically optimal and was later improved by Zhu et al. (2023). Both algorithms’ implementation relies on a no-regret policy optimization oracle. Another line of works, such as (Zhan et al., 2022; Ozdaglar et al., 2023; Rashidinejad et al., 2021), sought to solve the offline RL problem through a linear programming formulation, which requires some additional convexity assumptions on the policy class. However, most of these works only have worst-case regret guarantee. The only exception is Yin et al. (2022b), which studies the general differentiable function class and proposed an LSVI-type algorithm. For more general function classes, how to get instance-dependent characterizations is still an open problem. Therefore, a natural question arises: + +_Can we design a computationally tractable algorithm that is statistically efficient with respect to the complexity of nonlinear function class and has an instance-dependent regret bound?_ + +We give an affirmative answer to the above question in this work. Our contributions are listed as follows: + +- We propose a pessimism-based algorithm Pessimistic Nonlinear Least-Square Value Iteration (PNLSVI) designed for nonlinear function approximation, which strictly generalizes the existing pessimism-based algorithms for both linear and differentiable function approximation (Xiong et al., 2023; Yin et al., 2022b). Our algorithm is oracle-efficient, i.e., it is computationally efficient when there exists an efficient regression oracle and bonus oracle for the function class (e.g., generalized linear function class). The bonus oracle can also be reduced to a finite number of calls to the regression oracle. + +- We introduce a new type of _D_[2] -divergence to quantify the uncertainty of an offline dataset, which naturally extends the role of the elliptical norm seen in the linear setting and the _D_[2] -divergence in Gentile et al. (2022); Agarwal et al. (2023); Ye et al. (2023) for online RL. We prove an instancedependent regret bound characterized by this new _D_[2] -divergence. Our regret bound has a tight dependence on complexity of the function class, i.e., _O_[�] ( _[√]_ log _N_ ) with _N_ being the cardinality of the underlying function class, which improves the _O_[�] (log _N_ ) dependence[1] in (Yin et al., 2022b) and resolves the open problem raised in their paper. + +**Notation:** In this work, we use lowercase letters to denote scalars and use lower and uppercase boldface letters to denote vectors and matrices respectively. For a vector **x** _∈_ R _[d]_ and matrix **Σ** _∈_ R _[d][×][d]_ , we denote by _∥_ **x** _∥_ 2 the Euclidean norm and _∥_ **x** _∥_ **Σ** = _√_ **x** _[⊤]_ **Σx** . For two sequences _{an}_ and _{bn}_ , we write _an_ = _O_ ( _bn_ ) if there exists an absolute constant _C_ such that _an ≤ Cbn_ , and we write _an_ = Ω( _bn_ ) if there exists an absolute constant _C_ such that _an ≥ Cbn_ . We use _O_[�] ( _·_ ) and Ω([�] _·_ ) to further hide the logarithmic factors. For any _a ≤ b ∈_ R, _x ∈_ R, let [ _x_ ][ _a,b_ ] denote the truncate function _a ·_ 1( _x ≤ a_ ) + _x ·_ 1( _a ≤ x ≤ b_ ) + _b ·_ 1( _b ≤ x_ ), where 1( _·_ ) is the indicator function. For a positive integer _n_ , we use [ _n_ ] = _{_ 1 _,_ 2 _, .., n}_ to denote the set of integers from 1 to _n_ . + +2 RELATED WORK **RL with function approximation.** As one of the simplest function approximation classes, linear representation in RL has been extensively studied in recent years (Jiang et al., 2017; Dann et al., 2018; Yang & Wang, 2019; Jin et al., 2020; Wang et al., 2020c; Du et al., 2019; Sun et al., 2019; Zanette et al., 2020a;b; Weisz et al., 2021; Yang & Wang, 2020; Modi et al., 2020; Ayoub et al., 2020; Zhou et al., 2021; He et al., 2021; Zhong et al., 2022). Several assumptions on the linear structure of the underlying MDPs have been made in these works, ranging from the _linear MDP_ assumption (Yang & Wang, 2019; Jin et al., 2020; Hu et al., 2022; He et al., 2022; Agarwal et al., 2023) to the _low Bellman-rank_ assumption (Jiang et al., 2017) and the _low inherent Bellman error_ assumption (Zanette et al., 2020b). Extending the previous theoretical guarantees to more general problem classes, RL with nonlinear function classes has garnered increased attention in recent years (Wang et al., 2020b; Jin et al., 2021a; Foster et al., 2021; Du et al., 2021; Agarwal & Zhang, 2022; Agarwal et al., 2023). Various complexity measures of function classes have been studied including Bellman rank (Jiang et al., 2017), Bellman-Eluder dimension (Jin et al., 2021a), Decision-Estimation Coefficient (Foster et al., 2021) and generalized Eluder dimension (Agarwal et al., 2023). Among these works, the setting in our paper is most related to Agarwal et al. (2023) where _D_[2] -divergence (Gentile et al., 2022) was introduced in RL to indicate the uncertainty of a sample with respect to a particular sample batch. + +> 1In (Yin et al., 2022b), they denote by _d_ the complexity of the underlying function class, which is essentially log _N_ using our notation. + +2 + +**Offline tabular RL.** There is a line of works integrating the principle of pessimism to develop statistically efficient algorithms for offline tabular RL setting (Rashidinejad et al., 2021; Yin & Wang, 2021; Xie et al., 2021b; Shi et al., 2022; Li et al., 2022). More specifically, Xie et al. (2021b) utilized the variance of transition noise and proposed a nearly optimal algorithm based on pessimism and Bernstein-type bonus. Subsequently, Li et al. (2022) proposed a model-based approach that achieves minimax-optimal sample complexity without burn-in cost for tabular MDPs. Shi et al. (2022) also contributed by proposing the first nearly minimax-optimal model-free offline RL algorithm. **Offline RL with linear function approximation.** Jin et al. (2021b) presented the initial theoretical results on offline linear MDPs. They introduced a pessimism-principled algorithmic framework for offline RL and proposed an algorithm based on LSVI (Jin et al., 2020). Min et al. (2021) subsequently considered offline policy evaluation (OPE) in linear MDPs, assuming independence between data samples across time steps to obtain tighter confidence sets and proposed an algorithm with optimal _d_ dependence. Yin et al. (2022a) took one step further and considered the policy optimization in linear MDPs, which implicitly requires the same independence assumption. Zanette et al. (2021) proposed an actor-critic-based algorithm that establishes pessimism principle by directly perturbing the parameter vectors in a linear function approximation framework. Recently, Xiong et al. (2023) proposed a novel uncertainty decomposition technique via a reference function, and demonstrated their algorithm matches the performance lower bound up to logarithmic factors. + +**Offline RL with general function approximation.** Chen & Jiang (2019) examined the assumptions underlying value-function approximation methods and established an information-theoretic lower bound. Xie et al. (2021a) introduced the concept of Bellman-consistent pessimism, which enables sample-efficient guarantees by relying solely on the Bellman-completeness assumption. Uehara & Sun (2021) focused on model-based offline RL with function approximation under partial coverage, demonstrating that realizability in the function class and partial coverage are sufficient for policy learning. Zhan et al. (2022) proposed an algorithm that achieves polynomial sample complexity under the realizability and single-policy concentrability assumptions. Nguyen-Tang & Arora (2023) proposed a method of random perturbations and pessimism for neural function approximation. For differentiable function classes, Yin et al. (2022b) made advancements by improving the sample complexity with respect to the planing horizon _H_ . However, their result had an additional dependence on the dimension _d_ of the parameter space, whereas in linear function approximation, the dependence is typically on _√d_ . Recently, a sequence of works focus on proposing statistically optimal and practical algorithms under single concentrability assumption. Ozdaglar et al. (2023) provided a new reformulation of linear-programming. Rashidinejad et al. (2022) used the augmented Lagrangian method and proved augmented Lagrangian is enough for statistically optimal offline RL. Cheng et al. (2022) proposed an actor-critic algorithm by formulating the offline RL problem into a Stackelberg game. However, their result is not statistically optimal and Zhu et al. (2023) improved it by combining the marginalized importance sampling framework and achieved the optimal statistical rate. We leave a comparison of these works in Appendix A. + +3 PRELIMINARIES In our work, we consider the inhomogeneous episodic Markov Decision Processes (MDP), which can be denoted by a tuple of _M_ � _S, A, H, {rh}[H] h_ =1 _[,][ {]_[P] _[h][}][H] h_ =1�. In specific, _S_ is the state space, _A_ is the finite action space, _H_ is the length of each episode. For each stage _h ∈_ [ _H_ ], _rh_ : _S ×A →_ [0 _,_ 1] is the reward function[2] and P _h_ ( _s[′] |s, a_ ) is the transition probability function, which denotes the probability for state _s_ to transfer to next state _s[′]_ with current action _a_ . A policy _π_ := _{πh}[H] h_ =1[is a collection] of mappings _πh_ from a state _s ∈S_ to the simplex of action space _A_ . For simplicity, we denote the state-action pair as _z_ := ( _s, a_ ). For any policy _π_ and stage _h ∈_ [ _H_ ], we define the value function _Vh[π]_[(] _[s]_[)][ and the action-value function] _[ Q][π] h_[(] _[s, a]_[)][ as the expected cumulative rewards starting at stage] _[ h]_[,] which can be denoted as follows: + +**==> picture [382 x 31] intentionally omitted <==** + +where _sh′_ +1 _∼_ P _h_ ( _·|sh′, ah′_ ) denotes the observed state at stage _h[′]_ + 1. By this definition, the value function _Vh[π]_[(] _[s]_[)][and][action-value][function] _[Q][π] h_[(] _[s, a]_[)][are][bounded][in][[0] _[, H]_[]][.] In addition, we define the optimal value function _Vh[∗]_[and][the][optimal][action-value][function] _[Q][∗] h_[as] + +2While we study the deterministic reward functions for simplicity, it is not difficult to generalize our results to stochastic reward functions. + +3 + +_Vh[∗]_[(] _[s]_[)][=][max] _[π][ V] h[π]_[(] _[s]_[)][and] _[Q][∗] h_[(] _[s, a]_[)][=][max] _[π][ Q][π] h_[(] _[s, a]_[)][.][We][denote][the][corresponding][optimal] policy by _π[∗]_ . For any function _V_ : _S →_ R, we denote [P _hV_ ]( _s, a_ ) = E _s′∼_ P _h_ ( _·|s,a_ ) _V_ ( _s[′]_ ) and 2 [Var _hV_ ]( _s, a_ ) = [P _hV_[2] ]( _s, a_ ) _−_ �[P _hV_ ]( _s, a_ )� for simplicity. For any function _f_ : _S × A →_ R, we define _f_ ( _s_ ) = max _a f_ ( _s, a_ ). For any function _f_ : _S →_ R[3] , we define the Bellman operator _Th_ as [ _Thf_ ]( _sh, ah_ ) = E _sh_ +1 _∼_ P _h_ ( _·|sh,ah_ ) [ _rh_ ( _sh, ah_ ) + _f_ ( _sh_ +1)]. Based on this definition, for every stage _h ∈_ [ _H_ ] and policy _π_ , we have the following Bellman equation for value functions _Q[π] h_[(] _[s, a]_[)][ and] _Vh[π]_[(] _[s]_[)][, as well as the Bellman optimality equation for optimal value functions:] + +_Q[π] h_[(] _[s][h][, a][h]_[) = [] _[T][h][V] h[π]_ +1[](] _[s][h][, a][h]_[)] _[,][Q][∗] h_[(] _[s][h][, a][h]_[) = [] _[T][h][V] h[∗]_ +1[](] _[s][h][, a][h]_[)] _[,]_ where _VH[π]_ +1[(] _[s]_[)][=] _[V] H[∗]_ +1[(] _[s]_[)][=][0][.][We][also][define][the][Bellman][operator][for][second][moment][as] 2[�] [ _T_ 2 _,hf_ ]( _sh, ah_ ) = E _sh_ +1 _∼_ P _h_ ( _·|sh,ah_ ) �� _rh_ ( _sh, ah_ ) + _f_ ( _sh_ +1)� . For simplicity, we omit the subscripts _h_ in the Bellman operator without causing confusion. **Offline Reinforcement Learning:** In offline RL, the agent only has access to a batch-dataset _D_ = _{s[k] h[, a][k] h[, r] h[k]_[:] _[h][∈]_[[] _[H]_[]] _[, k][∈]_[[] _[K]_[]] _[}]_[,][which][is][collected][by][a][behavior][policy] _[µ]_[,][and][the][agent] cannot interact with the environment. We also make the compliance assumption of the dataset: **Assumption 3.1.** For a dataset _D_ = _{_ ( _s[k] h[, a][k] h[, r] h[k]_[)] _[}][K,H] k,h_ =1[, let][ P] _[D]_[be the joint distribution of the data] collecting process. We say _D_ is compliant with an underlying MDP ( _S, A, H,_ P _, r_ ) if + +**==> picture [242 x 30] intentionally omitted <==** + +for all _r[′] ∈_ [0 _,_ 1], _s[′] ∈S_ , _h ∈_ [ _H_ ] and _k ∈_ [ _K_ ]. + +This assumption is common in offline RL and has also been made in Jin et al. (2021b); Zhong et al. (2022). When the dataset originates from one behavior policy, this assumption naturally holds. In this paper, we assume our dataset is generated by a single behavior policy _µ_ . In addition, for each stage _h_ , we denote the induced distribution of the state-action pair by _d[µ] h_[.] + +Given the batch dataset, the goal of offline RL is finding a near-optimal policy _π_ that minimizes the suboptimality _V_ 1 _[∗]_[(] _[s]_[)] _[ −][V]_ 1 _[π]_[(] _[s]_[)][.][For simplicity, and when there’s no risk of confusion, we will use] the shorthand notation _zh[k]_[= (] _[s][k] h[, a][k] h_[)][ to denote the state-action pair in the dataset up to stage] _[ h]_[ and] episode _k_ . + +**General Function Approximation:** Given a general function class _{Fh}h∈_ [ _H_ ], where each function class _Fh_ is composed of functions _fh_ : _S × A →_ [0 _, L_ ]. For simplicity, we assume _L_ = _O_ ( _H_ ) throughout the paper. We make the following assumptions on the function class. **Assumption 3.2** ( _ϵ_ -realizability under general function approximation) **.** For each stage _h ∈_ [ _H_ ], there exists a function _fh[∗][∈F][h]_[ close to the optimal value function such that] _[ ∥][f] h[ ∗][−][Q][∗] h[∥][∞][≤][ϵ]_[.] + +**Assumption 3.3** ( _ϵ_ -completeness under general function approximation, Agarwal et al. 2023) **.** We assume for each stage _h ∈_ [ _H_ ], and any function _V_ : _S →_ [0 _, H_ ], there exists functions _fh, f_ 2 _,h ∈Fh_ such that + +**==> picture [352 x 17] intentionally omitted <==** + +In this paper, for simplicity, we assume that the function class is finite and denote its cardinality by _N_ = max _h∈_ [ _H_ ] _|Fh|_ . For infinite function classes, we can use the covering number to replace the cardinality. Note that the covering number will be reduced to the cardinality when the function class is finite. + +We introduce the following definition ( _D_[2] -divergence) to quantify the disparity of a given point _z_ = ( _s, a_ ) from the historical dataset _Dh_ . It is a reflection of the uncertainty of the dataset. + +**Definition 3.4.** For a function class _Fh_ consisting of functions _fh_ : _S × A →_ R and _Dh_ = _{_ ( _s[k] h[, a][k] h[, r] h[k]_[)] _[}][k][∈]_[[] _[K]_[]][as a dataset that corresponds to the observations collected up to stage] _[ h]_[ in the] MDP, we introduce the following _D_[2] -divergence: + +**==> picture [342 x 46] intentionally omitted <==** + +> 3In this paper, we slightly abuse notation _f_ for both _f_ ( _s_ ) and _f_ ( _s, a_ ). The context readily clarifies the intended meaning, i.e., value function or action-value function. + +4 + +**Remark 3.5.** This definition signifies the extent to which the behavior of functions within the function class can deviate at the point _z_ = ( _s, a_ ), based on their difference in the historical dataset. It can be viewed as the generalization of the weighted elliptical norm _∥ϕ_ ( _s, a_ ) _∥_ **Σ** _−h_ 1 in linear case, where _ϕ_ is the feature map and **Σ** _h_ is defined as[�] _k∈_ [ _K_ ] _[σ] h[−]_[2][(] _[s] h[k][, a][k] h_[)] _[ϕ]_[(] _[s][k] h[, a][k] h_[)] _[ϕ]_[(] _[s][k] h[, a][k] h_[)] _[⊤]_[+] _[ λ]_ **[I]**[.] Similar ideas have been used to define the Generalized Eluder dimension for online RL (Gentile et al., 2022; Agarwal et al., 2023; Ye et al., 2023). In these works, the summation is over a sequence up to the _k_ -th episode rather than the entire historical dataset. + +**Data Coverage Assumption:** In offline RL, there exists a discrepancy between the state-action distribution generated by the behavior policy and the distribution from the learned policy. Under this situation, the distribution shift problem can cause the learned policy to perform poorly or even fail in offline RL. In this work, we consider the following data coverage assumption to control the distribution shift. + +**Assumption 3.6** (Uniform Data Coverage) **.** there exists a constant _κ >_ 0, such that for any stage _h_ and functions _f_ 1 _, f_ 2 _∈Fh_ , the following inequality holds, + +**==> picture [210 x 16] intentionally omitted <==** + +where the state-action pair (at stage _h_ ) ( _sh, ah_ ) is stochasticly generated from the induced distribution _d[µ] h_[.] + +**Remark 3.7.** Similar uniform coverage assumptions have also been considered in Wang et al. (2020a); Min et al. (2021); Yin et al. (2022a); Xiong et al. (2023); Yin et al. (2022b). Among these works, Yin et al. (2022b) is the most related to ours, proving an instance-dependent regret bound under general function approximation. Here we make a comparison with their assumption. In detail, Yin et al. (2022b) considered the differentiable function class, which is defined as follows + +**==> picture [180 x 19] intentionally omitted <==** + +They introduced the following coverage assumption such that for all stage _h ∈_ [ _H_ ], there exists a constant _κ_ , + +**==> picture [316 x 37] intentionally omitted <==** + +We can prove that our assumption is weaker than the first assumption (*), and we do not need the second assumption (**). This suggests that the differentiable function class studied in Yin et al. (2022b) is an example covered by our general function class. + +In addition, in the special case of linear function class, the coverage assumption in Yin et al. (2022b) will reduce to the following linear function coverage assumption (Wang et al., 2020a; Min et al., 2021; Yin et al., 2022a; Xiong et al., 2023). + +**==> picture [196 x 15] intentionally omitted <==** + +Therefore, our assumption is also weaker than the linear function coverage assumption when dealing with the linear function class. Due to space limitations, we defer a detailed comparison to Appendix B. + +**Remark 3.8.** Many works such as Uehara & Sun (2021); Xie et al. (2021a); Cheng et al. (2022); Ozdaglar et al. (2023); Rashidinejad et al. (2022); Zhu et al. (2023) adopted a weaker partial coverage assumption than ours, where the _ℓ∞_ norm on the right hand is replaced with the expectation over a distribution corresponding to a single policy, typically the optimal one. Their assumption, however, generally confines their results to worst-case scenarios. It is unclear if we can still prove the instancedependent regret under their assumption. We will explore it in the future. + +4 ALGORITHM In this section, we provide a comprehensive and detailed description of our algorithm (PNLSVI), as displayed in Algorithm 1. In the sequel, we introduce the key ideas of the proposed algorithm. 4.1 PESSIMISTIC VALUE ITERATION BASED PLANNING Our algorithm operates in two distinct phases, the Variance Estimate Phase and the Pessimistic Planning Phase. At the beginning of the algorithm, the dataset is divided into two independent disjoint subsets _D, D_[s] with equal size _K_ , and each is assigned to a specific phase. + +5 + +**Algorithm 1** Pessimistic Nonlinear Least-Squares Value Iteration (PNLSVI) + +**Require:** Input confidence parameters _β_[¯] _h_ , _βh_ and _ϵ >_ 0. 1: **Initialize** : Split the input dataset into _D_ = _{s[k] h[, a][k] h[, r] h[k][}][K,H] k,h_ =1 _[,][D]_[s][=] _[ {][s]_[¯] _[k] h[,]_[ ¯] _[a][k] h[,]_[ ¯] _[r] h[k][}][K,H] k,h_ =1[; Set the] value function _f_[�] _H_ +1( _·_ ) = _f_[q] _H_ +1( _·_ ) = 0. 2: //Constructing the variance estimator 3: **for** stage _h_ = _H, . . . ,_ 1 **do** 4: _f_ ¯ _h_ = argmin _fh∈Fh_ � _k∈_ [ _K_ ] � _fh_ (¯ _s[k] h[,]_[ ¯] _[a][k] h_[)] _[ −][r]_[¯] _h[k][−][f]_[q] _[h]_[+1][(¯] _[s][k] h_ +1[)] �2. 2[�][2] ¯ ¯ 5: _gh_ = argmin _gh∈Fh_ � _k∈_ [ _K_ ] � _gh_ (¯ _s[k] h[,]_[ ¯] _[a][k] h_[)] _[ −]_ � _rh[k]_[+] _[f]_[q] _[h]_[+1][(¯] _[s][k] h_ +1[)] � . 6:7: Calculate a bonus function _f_ q _h ←{f_ ¯ _h −_ ¯ _bh − ϵ}_ [0 _,H−h_[¯] _b_ +1] _h_ with confidence parameter; _β_[¯] _h_ , 8: Construct the variance estimator _σ_ � _h_[2][(] _[s, a]_[) = max] 1 _,_ ¯ _gh_ ( _s, a_ ) _−_ ( _f_[¯] _h_ ( _s, a_ ))[2] _− O √_ log( ~~_√_~~ _N ·NKκ b_ ) _H_[3] . � � �� 9: **end for** 10: //Pessimistic value iteration based planning 11: **for** stage _h_ = _H, . . . ,_ 1 **do** 12: _f_ � _h_ = argmin _fh∈Fh_ � _k∈_ [ _K_ ] _σ_ � _h_[2][(] _[s]_ 1 _[k] h[,a][k] h_[)] � _fh_ ( _s[k] h[, a][k] h_[)] _[ −][r] h[k][−][f]_[�] _[h]_[+1][(] _[s][k] h_ +1[)] �2 13:14: Calculate a bonus function _f_ � _h ←{f_ � _h − bh − ϵ}_ [0 _,H−h b_ +1] _h_ with bonus parameter; _βh_ ; � 15: _πh_ ( _·|s_ ) = argmax _a f_[�] _h_ ( _s, a_ ). 16: **end for** � � 17: **Output:** _π_ = _{πh}[H] h_ =1[.] + +**==> picture [19 x 6] intentionally omitted <==** + +The basic framework of our algorithm follows the pessimistic value iteration, which was initially introduced by Jin et al. (2021b). In details, for each stage _h ∈_ [ _H_ ], we construct the estimator value function _f_[�] _h_ by solving the following variance-weighted ridge regression (Line 13): + +**==> picture [272 x 29] intentionally omitted <==** + +where � _σh_[2][is the estimated variance and will be discussed in Section 4.2.][In Line 14, we subtract the] confidence bonus function _bh_ from the estimator value function _f_[�] _h_ to construct the pessimistic value function _f_[�] _h_ . With the help of the confidence bonus function _bh_ , the pessimistic value function _f_[�] _h_ is almost a lower bound for the optimal value function _fh[∗]_[.][The details of the bonus function will be] discussed in Section 4.3. Based on the pessimistic value function _f_[�] _h_ for horizon _h_ , we recursively perform the value iteration for the horizon _h −_ 1. Finally, we use the pessimistic value function _f_[�] _h_ to do planning and output the greedy policy with respect to the pessimistic value function _f_[�] _h_ (Lines 15 - 17). 4.2 VARIANCE ESTIMATOR In this phase, we provide an estimator for the variance _σ_ � _h_ in the weighted ridge regression. We construct this variance estimator with _D_[s] , thus independent of _D_ . Using a larger bonus function[¯] _bh_ , we conduct a pessimistic value iteration process similar to that discussed in Section 4.1 and obtain a more crude estimated value function _{f_[q] _h}h∈_ [ _H_ ]. According to the definition of Bellman operators _T_ and _T_ 2, the variance of the function _f_[q] _h_ +1 for each state-action pair ( _s, a_ ) can be denoted by + +**==> picture [238 x 21] intentionally omitted <==** + +Therefore, we need to estimate the first-order and second-order moments for _f_[q] _h_ +1. We perform nonlinear least-squares regression separately for each of these moments. Specifically, in Line 4, we conduct regression to estimate the first-order moment. + +**==> picture [224 x 28] intentionally omitted <==** + +6 + +In Line 5, we perform regression for estimating the second-order moment. + +**==> picture [244 x 32] intentionally omitted <==** + +In this phase, we set the variance function to 1 for each state-action pair ( _s, a_ ). Combing these two regression results and subtracting some perturbing terms (We will discuss in Section 6.1), we create a pessimistic estimator for the variance function (Lines 7 to 8). 4.3 NONLINEAR BONUS FUNCTION As we discuss in Sections 4.1 and 4.2, following Wang et al. (2020b); Kong et al. (2021); Agarwal et al. (2023), we introduce a bonus function. This function is designed to account for the functional uncertainty, enabling us to develop a pessimistic estimate of the value function. Ideally, we hope to choose _bh_ ( _·, ·_ ) = _βhDFh_ ( _·, ·_ ; _Dh_ ; � _σh_[2][)][, where] _[ β][h]_[ is the confidence parameter and] _[ D][F] h_[(] _[·][,][ ·]_[;] _[ D][h]_[;][ �] _[σ] h_[2][)] is defined in Definition 3.4. However, the _D_[2] -divergence composes a complex function class, and its calculation involves solving a complex optimization problem. To address this issue, following Agarwal et al. (2023), we assume there exists a function class _W_ with cardinally _|W|_ = _Nb_ and can approximate the _D_[2] -divergence well. For the parameters _βh_ , _λ ≥_ 0, error parameter _ϵ ≥_ 0, taking a variance function _σh_ ( _·, ·_ ) : _S × A →_ R and _f_[�] _h ∈Fh_ as input, we can get a bonus function _bh_ ( _·, ·_ ) _∈W_ satisfying the following properties: + +**==> picture [399 x 39] intentionally omitted <==** + +We can implement the function class _W_ with bounded _Nb_ by extending the online subsampling framework presented in Wang et al. (2020b); Kong et al. (2021) to an offline dataset. Additionally, using Algorithm 1 of Kong et al. (2021), we can calculate the bonus function with finite calls of the oracle for solving the variance-weighted ridge regression problem. We leave a detailed discussion to Appendix C. + +5 MAIN RESULTS + +In this section, we prove an instance-dependent regret bound of Algorithm 1. + +log( _N ·Nb_ ) _H_[6] **Theorem 5.1.** Under Assumption 3.6, for _K ≥_ Ω[�] � _κ_[2] �, if we set the parameters + +_β_ 1 _[′] ,h[, β]_ 2 _[′] ,h_[=] _[O]_[�][(] �log( _N · Nb_ ) _H_[2] ) and _βh_ = _O_[�] ( _[√]_ log _N_ ) in Algorithm 1, then with probability at least 1 _− δ_ , for any state _s ∈S_ , we have + +_V_ 1 _[∗]_[(] _[s]_[)] _[ −][V]_ 1 _[π]_[�][(] _[s]_[)] _[ ≤][O]_[�][(] ~~�~~ log _N_ )[�] _[H] h_ =1[E] _[π][∗]_[�] _DFh_ ( _zh_ ; _Dh_ ; [V _hVh[∗]_ +1[](] _[·][,][ ·]_[))] _[|][s]_[1][=] _[ s]_ � _,_ + +where [V _hVh[∗]_ +1[](] _[s, a]_[) = max] _[{]_[1] _[,]_[ [][Var] _[h][V] h[∗]_ +1[](] _[s, a]_[)] _[}]_[ is the truncated conditional variance.] This theorem establishes an upper bound for the suboptimality of our policy � _π_ . The bound depends on the expected uncertainty, which is characterized by the weighted _D_[2] -divergence along the trajectory, marking itself as an instance-dependent result. It’s noteworthy that both the trajectory and the weight function are based on the optimal policy and the optimal value function, respectively. This bound necessitates that the dataset size _K_ is sufficiently large. Furthermore, all parameters are determined solely by the complexity of the function class, the horizon length _H_ , and the data coverage assumption constant _κ_ , regardless of the dataset’s composition. + +**Remark** _O_ �( _[√]_ log _N_ **5.2.** ), which is better than that in Yin et al. (2022b), which scales asIn Theorem 5.1, the dependence on the cardinality of the _O_[�] function(log _N_ ).classThis improvedscales as dependence is due to the reference-advantage decomposition (discussed in Section 6.2), which avoids the unnecessary covering argument. Thus we resolve the open problem raised by Yin et al. (2022b), i.e., how to achieve the _O_[�] ( _[√]_ log _N_ ) dependence. + +**Remark 5.3.** When specialized to linear MDPs (Jin et al., 2020), the following function class + +_Fh_[lin][=] _[ {⟨]_ _**[ϕ]**_[(] _[·][,][ ·]_[)] _[,]_ _**[ θ]**[h][⟩]_[:] _**[ θ]**[h][∈]_[R] _[d][,][ ∥]_ _**[θ]**[h][∥]_[2] _[≤][B][h][}]_[ for any] _[ h][ ∈]_[[] _[H]_[]] _[,]_ + +suffices and satisfies the completeness assumption (Assumption 3.3). Let _Fh_[lin][(] _[ϵ]_[)][ be an] _[ ϵ]_[-net of the] linear function class _Fh_[lin][,][with][log] _[ |F] h_[lin][(] _[ϵ]_[)] _[|]_[=] _[O]_[�][(] _[d]_[)][.][The][dependency][of][the][function][class][will] reduce to _O_[�] ( _[√]_ log _N_ ) = _O_[�] ( _√d_ ). For linear function class, we can prove the following inequality: _DFh_ lin[(] _[ϵ]_[)][(] _[z]_[;] _[ D][h]_[; [][V] _[h][V] h[∗]_ +1[](] _[·][,][ ·]_[))] _[ ≤∥]_ _**[ϕ]**_[(] _[z]_[)] _[∥]_ Σ _[∗−] h_[1] _,_ + +7 + +where Σ _[∗] h_[=][ �] _k∈_ [ _K_ ] _**[ϕ]**_[(] _[s] h[k][, a][k] h_[)] _**[ϕ]**_[(] _[s][k] h[, a][k] h_[)] _[⊤][/]_[[][V] _[h][V] h[∗]_ +1[](] _[s] h[k][, a][k] h_[) +] _[ λ]_ **[I]**[.][Therefore, our regret guarantee] in Theorem 5.1 is reduced to + +**==> picture [262 x 30] intentionally omitted <==** + +which matches the lower bound proved in Xiong et al. (2023). This suggests that our algorithm is optimal for linear MDPs. + +6 KEY TECHNIQUES In this section, we provide an overview of the key techniques in our algorithm design and analysis. 6.1 VARIANCE ESTIMATOR WITH NONLINEAR FUNCTION CLASS In our work, we extend the technique of variance-weighted ridge regression, first introduced in Zhou et al. (2021) for online RL, and later used by Min et al. (2021); Yin et al. (2022a;b); Xiong et al. (2023) for offline RL with linear MDPs, to general nonlinear function class _F_ . We use the following nonlinear least-squares regression to estimate the underlying value function: + +**==> picture [272 x 29] intentionally omitted <==** + +For this regression, it is crucial to obtain a reliable evaluation for the variance of the estimated cumulative reward _rh[k]_[+] _[f]_[�] _[h]_[+1][(] _[s][k] h_ +1[)][.][As discussed in Section 4.2, we use] _[D]_[s][ to construct a variance] estimator independent from _D_ . According to the definition of Bellman operators _T_ and _T_ 2, the variance of the function _f_[q] _h_ +1 for each state-action pair ( _s, a_ ) can be denoted by + +**==> picture [238 x 21] intentionally omitted <==** + +In our algorithm, we perform nonlinear least-squares regression on _D_[s] . For simplicity, we denote the empirical variance as B _h_ ( _s, a_ ) = _g_ ¯ _h_ ( _s, a_ ) _−_ � _f_ ¯ _h_ ( _s, a_ )�2, and the difference between empirical variance B _h_ ( _s, a_ ) and actual variance [Var _hf_[q] _h_ +1]( _s, a_ ) is upper bound by + +���B _h_ ( _s, a_ ) _−_ [Var _h_ q _fh_ +1]( _s, a_ )��� _≤_ ��� _g_ ¯ _h_ ( _s, a_ ) _−_ [ _T_ 2 _,h_ q _fh_ +1]( _s, a_ )��� + ����� _fh_ ( _s, a_ )�2 _−_ �[ _Thf_[q] _h_ +1]( _s, a_ )�2[�] �� _._ + +For these nonlinear function estimators, the following lemmas provide coarse concentration properties for the first and second order Bellman operators. + +**Lemma 6.1.** For any stage _h ∈_ [ _H_ ], let _f_[q] _h_ +1( _·, ·_ ) _≤ H_ be the estimated value function constructed in Algorithm 1 Line 7. By utilizing Assumption 3.3, there exists a function _f_[¯] _h[′][∈F][h]_[, satisfying that] _|f_[¯] _h[′]_[(] _[z][h]_[)] _[ −]_[[] _[T][h]_[ q] _[f][h]_[+1][](] _[z][h]_[)] _[| ≤][ϵ]_[ holds for all state-action pair] _[ z][h]_[= (] _[s][h][, a][h]_[)][.][Then with probability at] least 1 _− δ/_ (4 _H_ ), it holds that + +**==> picture [160 x 17] intentionally omitted <==** + +where _β_[¯] 1 _,h_ = _O_[�] � ~~�~~ log( _N · Nb_ ) _H_ �, and _f_[¯] _h_ is the estimated function for first-moment Bellman operator (Line 4 in Algorithm 1). + +**Lemma 6.2.** For any stage _h ∈_ [ _H_ ], let _f_[q] _h_ +1( _·, ·_ ) _≤ H_ be the estimated value function constructed in Algorithm 1 Line 7. By utilizing Assumption 3.3, there exists a function ¯ _gh[′][∈F][h]_[, satisfying that] _|g_ ¯ _h[′]_[(] _[z][h]_[)] _[ −]_[[] _[T]_[2] _[,h]_[ q] _[f][h]_[+1][](] _[z][h]_[)] _[| ≤][ϵ]_[ holds for all state-action pair] _[ z][h]_[= (] _[s][h][, a][h]_[)][.][Then with probability at] least 1 _− δ/_ (4 _H_ ), it holds that + +**==> picture [160 x 16] intentionally omitted <==** + +where _β_[¯] 2 _,h_ = _O_[�] ��log( _N · Nb_ ) _H_[2][�] , and ¯ _gh_ is the estimated function for second-moment Bellman operator (Line 5 in Algorithm 1). + +Notice that all of the previous analysis focuses on the estimated function _f_[q] _h_ +1. By leveraging an induction procedure similar to existing works in the linear case (Jin et al., 2021b), we can control the distance between the estimated function _f_[q] _h_ +1 and the optimal value function _fh[∗]_ +1[.][In details, with high] + +8 + +probability, for all stage _h ∈_ [ _H_ ], the distance is upper bounded by _O_[�] � ~~�~~ log( _N · Nb_ ) _H_[3] _/√Kκ_ �. This result allows us to further bound the difference between [Var _hf_[q] _h_ +1]( _s, a_ ) and [Var _hfh[∗]_ +1[](] _[s, a]_[)][.] Therefore, the concentration properties in Lemmas 6.1 and 6.2 enable us to add some perturbation terms and construct a variance estimator, which satisfies the following property: + +**==> picture [347 x 26] intentionally omitted <==** + +where [V _hVh[∗]_ +1[](] _[s, a]_[) = max] _[{]_[1] _[,]_[ [][Var] _[h][V] h[∗]_ +1[](] _[s, a]_[)] _[}]_[ is the truncated conditional variance.] 6.2 REFERENCE-ADVANTAGE DECOMPOSITION To obtain the optimal dependency on the function class complexity, we need to tackle the challenge of additional error from uniform concentration over the whole function class _Fh_ . To address this problem, we utilize the so-called reference-advantage decomposition technique, which was used by (Xiong et al., 2023) to achieve the optimal regret for offline RL with linear function approximation. We generalize this technique to nonlinear function approximation. We provide detailed insights into this approach as follows: + +**==> picture [380 x 63] intentionally omitted <==** + +We decompose the Bellman error into two parts: the Reference uncertainty and the Advantage uncertainty. For the first term, the optimal value function _fh[∗]_ +1[is fixed and not related to the pre-] collected dataset, which circumvents additional uniform concentration over the whole function class and avoids any dependence on the function class complexity. For the second term, it is worth noticing that the distance between the estimated function _f_[�] _h_ +1 and the optimal value function _fh[∗]_[decreases] with the speed of _O_ (1 _/√Kκ_ ). Though, we still need to maintain the uniform convergence guarantee, the Advantage uncertainty is dominated by the Reference uncertainty when the number of episodes _K_ is large enough. Such an analysis approach has been first studied in the online RL setting (Azar et al., 2017; Zhang et al., 2021; Hu et al., 2022; He et al., 2022; Agarwal et al., 2023) and later in the offline environment by Xiong et al. (2023). Previous works, such as Yin et al. (2022b), didn’t adapt the reference-advantage decomposition analysis to their nonlinear function class, resulting in a parameter space dependence that scales with _d_ , instead of the optimal _√d_ . By integrating these results, we can prove a variance-weighted concentration inequality for Bellman operators. + +**Lemma** � **6.3.** For each stage _h ∈_ [ _H_ ], assuming the variance estimator _σ_ � _h_ satisfies (6.1), let _fh_ +1( _·, ·_ ) _≤ H_ be the estimated value function constructed in Algorithm 1 Line 14. Then with 2 probability at least 1 _− δ/_ (4 _H_ ), it holds that[�] _k∈_ [ _K_ ] ( _σ_ � _h_ (1 _zh[k]_[))][2] �[ _Thf_[�] _h_ +1]( _zh[k]_[)] _[ −][f]_[�] _[h]_[(] _[z] h[k]_[)] � _≤_ ( _βh_ )[2] _,_ where _βh_ = _O_[�] ( _[√]_ log _N_ ) and _f_[�] _h_ is the estimated function from the weighted ridge regression (Line 12 in Algorithm 1). + +After controlling the Bellman error, with a similar argument to Jin et al. (2021b), we obtain the following lemma, which provides an upper bound for the regret. + +� **Lemma 6.4** (Regret Decomposition Property) **.** If [ _Th_ � _fh_ +1]( _z_ ) _− fh_ ( _z_ ) _≤ bh_ ( _z_ ) holds for all stage ��� ��� _h ∈_ [ _H_ ] and state-action pair _z_ = ( _s, a_ ) _∈S × A_ , then the suboptimality of the output policy � _π_ in Algorithm 1 can be bounded as + +_V_ 1 _[∗]_[(] _[s]_[)] _[ −][V]_ 1 _[π]_[�][(] _[s]_[)] _[ ≤]_[2][�] _[H] h_ =1[E] _[π][∗]_[[] _[b][h]_[ (] _[s][h][, a][h]_[)] _[ |][ s]_[1][=] _[ s]_[]] _[ .]_ Here, the expectation E _π∗_ is with respect to the trajectory induced by _π[∗]_ in the underlying MDP. Combining the results in Lemmas 6.3 and 6.4, we have proved Theorem 5.1. + +7 CONCLUSION AND FUTURE WORK + +In this paper, we present Pessimistic Nonlinear Least-Square Value Iteration (PNLSVI), an oracleefficient algorithm for offline RL with non-linear function approximation. Our result matches the lower bound proved in Xiong et al. (2023) when specialized to linear function approximation. We notice that our uniform coverage assumption can sometimes be strong in practice. In our future work, we plan to relax this assumption by devising algorithms for nonlinear function classes under a partial coverage assumption. + +9 + +REFERENCES + +- Alekh Agarwal and Tong Zhang. Model-based rl with optimistic posterior sampling: Structural conditions and sample complexity. _arXiv preprint arXiv:2206.07659_ , 2022. + +- Alekh Agarwal, Yujia Jin, and Tong Zhang. Vo _q_ l: Towards optimal regret in model-free rl with nonlinear function approximation. In _The Thirty Sixth Annual Conference on Learning Theory_ , pp. 987–1063. PMLR, 2023. + +- Alex Ayoub, Zeyu Jia, Csaba Szepesvari, Mengdi Wang, and Lin Yang. Model-based reinforcement learning with value-targeted regression. In _International Conference on Machine Learning_ , pp. 463–474. PMLR, 2020. + +- Mohammad Gheshlaghi Azar, Ian Osband, and Remi´ Munos. Minimax regret bounds for reinforcement learning. In _International Conference on Machine Learning_ , pp. 263–272. PMLR, 2017. + +- ´ + +- Nicolo Cesa-Bianchi and Gabor Lugosi. _Prediction, learning, and games_ . Cambridge university press, 2006. + +- Jinglin Chen and Nan Jiang. Information-theoretic considerations in batch reinforcement learning. In _International Conference on Machine Learning_ , pp. 1042–1051. PMLR, 2019. + +- Ching-An Cheng, Tengyang Xie, Nan Jiang, and Alekh Agarwal. Adversarially trained actor critic for offline reinforcement learning. In _International Conference on Machine Learning_ , pp. 3852–3878. PMLR, 2022. + +- Christoph Dann, Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, John Langford, and Robert E Schapire. On oracle-efficient pac rl with rich observations. _Advances in neural information processing systems_ , 31, 2018. + +- Jonas Degrave, Federico Felici, Jonas Buchli, Michael Neunert, Brendan Tracey, Francesco Carpanese, Timo Ewalds, Roland Hafner, Abbas Abdolmaleki, Diego de Las Casas, et al. Magnetic control of tokamak plasmas through deep reinforcement learning. _Nature_ , 602(7897):414–419, 2022. + +- Simon Du, Sham Kakade, Jason Lee, Shachar Lovett, Gaurav Mahajan, Wen Sun, and Ruosong Wang. Bilinear classes: A structural framework for provable generalization in rl. In _International Conference on Machine Learning_ , pp. 2826–2836. PMLR, 2021. + +Simon S Du, Sham M Kakade, Ruosong Wang, and Lin F Yang. Is a good representation sufficient for sample efficient reinforcement learning? _arXiv preprint arXiv:1910.03016_ , 2019. + +- Dylan Foster, Alekh Agarwal, Miroslav Dud´ık, Haipeng Luo, and Robert Schapire. Practical contextual bandits with regression oracles. In _International Conference on Machine Learning_ , pp. 1539–1548. PMLR, 2018. + +- Dylan J Foster, Sham M Kakade, Jian Qian, and Alexander Rakhlin. The statistical complexity of interactive decision making. _arXiv preprint arXiv:2112.13487_ , 2021. + +- Claudio Gentile, Zhilei Wang, and Tong Zhang. Achieving minimax rates in pool-based batch active learning. In _International Conference on Machine Learning_ , pp. 7339–7367. PMLR, 2022. + +- Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In _2017 IEEE international conference on robotics and automation (ICRA)_ , pp. 3389–3396. IEEE, 2017. + +- Jiafan He, Dongruo Zhou, and Quanquan Gu. Logarithmic regret for reinforcement learning with linear function approximation. In _International Conference on Machine Learning_ , pp. 4171–4180. PMLR, 2021. + +10 + +Jiafan He, Heyang Zhao, Dongruo Zhou, and Quanquan Gu. Nearly minimax optimal reinforcement learning for linear markov decision processes. _arXiv preprint arXiv:2212.06132_ , 2022. + +- Pihe Hu, Yu Chen, and Longbo Huang. Nearly minimax optimal reinforcement learning with linear function approximation. In _International Conference on Machine Learning_ , pp. 8971–9019. PMLR, 2022. + +- Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, John Langford, and Robert E Schapire. Contextual decision processes with low bellman rank are pac-learnable. In _International Conference on Machine Learning_ , pp. 1704–1713. PMLR, 2017. + +- Chi Jin, Zhuoran Yang, Zhaoran Wang, and Michael I Jordan. Provably efficient reinforcement learning with linear function approximation. In _Conference on Learning Theory_ , pp. 2137–2143. PMLR, 2020. + +- Chi Jin, Qinghua Liu, and Sobhan Miryoosefi. Bellman eluder dimension: New rich classes of rl problems, and sample-efficient algorithms. _Advances in neural information processing systems_ , 34:13406–13418, 2021a. + +- Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline rl? In _International Conference on Machine Learning_ , pp. 5084–5096. PMLR, 2021b. + +- Dingwen Kong, Ruslan Salakhutdinov, Ruosong Wang, and Lin F Yang. Online sub-sampling for reinforcement learning with general function approximation. _arXiv preprint arXiv:2106.07203_ , 2021. + +- Akshay Krishnamurthy, Alekh Agarwal, Tzu-Kuo Huang, Hal Daume III, and John Langford.´ Active learning for cost-sensitive classification. In _International Conference on Machine Learning_ , pp. 1915–1924. PMLR, 2017. + +- Sergey Levine, Peter Pastor, Alex Krizhevsky, Julian Ibarz, and Deirdre Quillen. Learning handeye coordination for robotic grasping with deep learning and large-scale data collection. _The International journal of robotics research_ , 37(4-5):421–436, 2018. + +Gen Li, Laixi Shi, Yuxin Chen, Yuejie Chi, and Yuting Wei. Settling the sample complexity of model-based offline reinforcement learning. _arXiv preprint arXiv:2204.05275_ , 2022. + +- Yifei Min, Tianhao Wang, Dongruo Zhou, and Quanquan Gu. Variance-aware off-policy evaluation with linear function approximation. _Advances in neural information processing systems_ , 34: 7598–7610, 2021. + +- Aditya Modi, Nan Jiang, Ambuj Tewari, and Satinder Singh. Sample complexity of reinforcement learning using linearly combined model ensembles. In _International Conference on Artificial Intelligence and Statistics_ , pp. 2010–2020. PMLR, 2020. + +- Thanh Nguyen-Tang and Raman Arora. Viper: Provably efficient algorithm for offline rl with neural function approximation. In _The Eleventh International Conference on Learning Representations_ , 2023. + +- Thanh Nguyen-Tang, Ming Yin, Sunil Gupta, Svetha Venkatesh, and Raman Arora. On instancedependent bounds for offline reinforcement learning with linear function approximation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 37, pp. 9310–9318, 2023. + +- Asuman E Ozdaglar, Sarath Pattathil, Jiawei Zhang, and Kaiqing Zhang. Revisiting the linearprogramming framework for offline rl with general function approximation. In _International Conference on Machine Learning_ , pp. 26769–26791. PMLR, 2023. + +- Paria Rashidinejad, Banghua Zhu, Cong Ma, Jiantao Jiao, and Stuart Russell. Bridging offline reinforcement learning and imitation learning: A tale of pessimism. _Advances in Neural Information Processing Systems_ , 34:11702–11716, 2021. + +- Paria Rashidinejad, Hanlin Zhu, Kunhe Yang, Stuart Russell, and Jiantao Jiao. Optimal conservative offline rl with general function approximation via augmented lagrangian. In _The Eleventh International Conference on Learning Representations_ , 2022. + +11 + +- Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre, Simon Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, et al. Mastering atari, go, chess and shogi by planning with a learned model. _Nature_ , 588(7839):604–609, 2020. + +- Laixi Shi, Gen Li, Yuting Wei, Yuxin Chen, and Yuejie Chi. Pessimistic q-learning for offline reinforcement learning: Towards optimal sample complexity. In _International Conference on Machine Learning_ , pp. 19967–20025. PMLR, 2022. + +- 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. + +- Wen Sun, Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, and John Langford. Model-based rl in contextual decision processes: Pac bounds and exponential improvements over model-free approaches. In _Conference on learning theory_ , pp. 2898–2933. PMLR, 2019. + +- Masatoshi Uehara and Wen Sun. Pessimistic model-based offline reinforcement learning under partial coverage. In _International Conference on Learning Representations_ , 2021. + +- Ruosong Wang, Dean P Foster, and Sham M Kakade. What are the statistical limits of offline rl with linear function approximation? _arXiv preprint arXiv:2010.11895_ , 2020a. + +- Ruosong Wang, Russ R Salakhutdinov, and Lin Yang. Reinforcement learning with general value function approximation: Provably efficient approach via bounded eluder dimension. _Advances in Neural Information Processing Systems_ , 33:6123–6135, 2020b. + +- Yining Wang, Ruosong Wang, Simon Shaolei Du, and Akshay Krishnamurthy. Optimism in reinforcement learning with generalized linear function approximation. In _International Conference on Learning Representations_ , 2020c. + +- Gellert Weisz, Philip Amortila, and Csaba Szepesv´ ari.´ Exponential lower bounds for planning in mdps with linearly-realizable optimal action-value functions. In _Algorithmic Learning Theory_ , pp. 1237–1264. PMLR, 2021. + +- Tengyang Xie, Ching-An Cheng, Nan Jiang, Paul Mineiro, and Alekh Agarwal. Bellman-consistent pessimism for offline reinforcement learning. _Advances in neural information processing systems_ , 34:6683–6694, 2021a. + +- Tengyang Xie, Nan Jiang, Huan Wang, Caiming Xiong, and Yu Bai. Policy finetuning: Bridging sample-efficient offline and online reinforcement learning. _Advances in neural information processing systems_ , 34:27395–27407, 2021b. + +- Wei Xiong, Han Zhong, Chengshuai Shi, Cong Shen, Liwei Wang, and Tong Zhang. Nearly minimax optimal offline reinforcement learning with linear function approximation: Single-agent mdp and markov game. In _International Conference on Learning Representations (ICLR)_ , 2023. + +- Lin Yang and Mengdi Wang. Sample-optimal parametric q-learning using linearly additive features. In _International Conference on Machine Learning_ , pp. 6995–7004, 2019. + +- Lin Yang and Mengdi Wang. Reinforcement learning in feature space: Matrix bandit, kernels, and regret bound. In _International Conference on Machine Learning_ , pp. 10746–10756. PMLR, 2020. + +- Chenlu Ye, Wei Xiong, Quanquan Gu, and Tong Zhang. Corruption-robust algorithms with uncertainty weighting for nonlinear contextual bandits and markov decision processes. In _International Conference on Machine Learning_ , pp. 39834–39863. PMLR, 2023. + +- Ming Yin and Yu-Xiang Wang. Towards instance-optimal offline reinforcement learning with pessimism. _Advances in neural information processing systems_ , 34:4065–4078, 2021. + +- Ming Yin, Yaqi Duan, Mengdi Wang, and Yu-Xiang Wang. Near-optimal offline reinforcement learning with linear representation: Leveraging variance information with pessimism. _arXiv preprint arXiv:2203.05804_ , 2022a. + +12 + +Ming Yin, Mengdi Wang, and Yu-Xiang Wang. Offline reinforcement learning with differentiable function approximation is provably efficient. In _The Eleventh International Conference on Learning Representations_ , 2022b. + +- Andrea Zanette, David Brandfonbrener, Emma Brunskill, Matteo Pirotta, and Alessandro Lazaric. Frequentist regret bounds for randomized least-squares value iteration. In _International Conference on Artificial Intelligence and Statistics_ , pp. 1954–1964. PMLR, 2020a. + +- Andrea Zanette, Alessandro Lazaric, Mykel Kochenderfer, and Emma Brunskill. Learning near optimal policies with low inherent bellman error. In _International Conference on Machine Learning_ , pp. 10978–10989. PMLR, 2020b. + +- Andrea Zanette, Martin J Wainwright, and Emma Brunskill. Provable benefits of actor-critic methods for offline reinforcement learning. _Advances in neural information processing systems_ , 34:13626– 13640, 2021. + +- Wenhao Zhan, Baihe Huang, Audrey Huang, Nan Jiang, and Jason Lee. Offline reinforcement learning with realizability and single-policy concentrability. In _Conference on Learning Theory_ , pp. 2730–2775. PMLR, 2022. + +- Zihan Zhang, Xiangyang Ji, and Simon Du. Is reinforcement learning more difficult than bandits? a near-optimal algorithm escaping the curse of horizon. In _Conference on Learning Theory_ , pp. 4528–4531. PMLR, 2021. + +- Han Zhong, Wei Xiong, Jiyuan Tan, Liwei Wang, Tong Zhang, Zhaoran Wang, and Zhuoran Yang. Pessimistic minimax value iteration: Provably efficient equilibrium learning from offline datasets. In _International Conference on Machine Learning_ , pp. 27117–27142. PMLR, 2022. + +- Dongruo Zhou, Quanquan Gu, and Csaba Szepesvari. Nearly minimax optimal reinforcement learning for linear mixture markov decision processes. In _Conference on Learning Theory_ , pp. 4532–4576. PMLR, 2021. + +- Hanlin Zhu, Paria Rashidinejad, and Jiantao Jiao. Importance weighted actor-critic for optimal conservative offline reinforcement learning. _arXiv preprint arXiv:2301.12714_ , 2023. + +13 + +## A COMPARISON OF OFFLINE RL ALGORITHMS + +In this section, we make a comparison between different offline RL algorithms, concerning their algorithm type, function approximation class, data coverage assumption, used oracles, and regret type. In the upper part are the algorithms with worst-case regret, while in the lower part are those with instance-dependent regret. + +Table 1: Comparison of offline RL algorithms in terms of algorithm type, function classes, data coverage assumption, types of oracle and regret-type. + +|Algorithm|Algorithm Type|Function|Data Coverage|Types of Oracle|Regret Type| +|---|---|---|---|---|---| +|||Classes|||| +|Xie et al. (2021a)|Bellman-|General|Partial|Optimization on|Worst-case| +||consistent|||Policy and|| +||Pessimism|||Function Class|| +|CPPO-TV|MLE|General|Partial|Optimization on|Worst-case| +|Uehara & Sun||||Policy and|| +|(2021)||||Hypothesis Class|| +|CORAL|Augmented|General|Partial|Optimization on|Worst-case| +|Rashidinejad|Lagrangian with|||Policy and|| +|et al. (2022)|MIS|||Function Class|| +|Reformulated LP|Linear Program|General|Partial|Linear|Worst-case| +|Ozdaglar et al.||||Programming|| +|(2023)|||||| +|ATAC Cheng|Actor Critic|General|Partial|No-regret Policy|Worst-case| +|et al. (2022)||||Optimization and|| +|||||Optimization on|| +|||||the Function|| +|||||Class|| +|A-Crab Zhu et al.|Actor Critic|General|Partial|No-regret Policy|Worst-case| +|(2023)||||Optimization and|| +|||||Optimization on|| +|||||the Function|| +|||||Class|| +|LinPEVI-ADV+|LSVI-type|Linear|Uniform|/|Instance-| +|Xiong et al.|||||dependent| +|(2023)|||||| +|PFQL Yin et al.|LSVI-type|Differentible|Uniform|Gradient Oracle|Instance-| +|(2022b)||||and Optimization|dependent| +|||||on the Function|| +|||||Class|| +|PNLSVI (Our|LSVI-type|General|Uniform|Regression|Instance-| +|work)||||Oracle|dependent| + +B COMPARISON OF DATA COVERAGE ASSUMPTIONS In Yin et al. (2022b), they studied the general differentiable function class, where the function class can be denoted by + +**==> picture [182 x 19] intentionally omitted <==** + +In this definition, Ψ is a compact subset, and _**ϕ**_ ( _·, ·_ ) : _X × A →_ Ψ _⊆_ R _[m]_ is a feature map. The parameter space Θ is a compact subset Θ _⊆_ R _[d]_ . The function _f_ : R _[d] ×_ R _[m] →_ R satisfies the following smoothness conditions: + +- For any vector _**ϕ** ∈_ R _[m]_ , _f_ ( _**θ** ,_ _**ϕ**_ ) is third-time differentiable with respect to the parameter _**θ**_ . + +- Functions _f, ∂_ _**θ** f, ∂_ _**θ**_[2] _,_ _**θ**[f, ∂]_ _**θ**_[3] _,_ _**θ** ,_ _**θ**[f]_[are jointly continuous for][ (] _**[θ]**[,]_ _**[ ϕ]**_[)][.] + +Under this definition, Yin et al. (2022b) introduce the following coverage assumption (Assumption 2.3) such that for all stage _h ∈_ [ _H_ ], there exists a constant _κ_ , + +**==> picture [310 x 37] intentionally omitted <==** + +It is worth noting that our assumption 3.6 is weaker than this assumption. For any compact sets Θ _,_ Ψ and continuous function _f_ , there always exist a constant _κ_ 0 _>_ 0 such that _f_ is _κ_ 0-Lipschitz with respect to the parameter _**θ**_ ,i.e: + +- _|f_ ( _**θ**_ 1 _,_ _**ϕ**_ ) _− f_ ( _**θ**_ 2 _,_ _**ϕ**_ ) _| ≤ κ_ 0 _∥_ _**θ**_ 1 _−_ _**θ**_ 2 _∥_ 2 _, ∀_ _**θ**_ 1 _,_ _**θ**_ 2 _∈_ Θ _,_ _**ϕ** ∈_ Ψ _._ + +14 + +Therefore, the coverage assumption in Yin et al. (2022b) implies that + +**==> picture [376 x 45] intentionally omitted <==** + +Our assumption can be reduced to their first assumption (*). We do not need the second assumption (**). In addition, for the linear function class, the coverage assumption in Yin et al. (2022b) will reduce to the following linear function coverage assumption(Wang et al., 2020a; Min et al., 2021; Yin et al., 2022a; Xiong et al., 2023). + +**==> picture [200 x 13] intentionally omitted <==** + +Therefore, our assumption is also weaker than the linear function coverage assumption when dealing with the linear function class. + +C DISCUSSION ON THE CALCULATION OF THE BONUS FUNCTION To obtain the bonus function satisfying the required properties, we need to consider the constraint optimization problem + +**==> picture [357 x 37] intentionally omitted <==** + +We utilize the online subsampling framework presented in Wang et al. (2020b); Kong et al. (2021) to an offline dataset. Additionally, we generalize the idea of Kong et al. (2021) to the weighted problem. Using the shorthand expression + +**==> picture [136 x 30] intentionally omitted <==** + +we aim to estimate the solution of the following constraint optimization problem. + +**==> picture [309 x 20] intentionally omitted <==** + +**Algorithm 2** Binary Search + +1: **Input:** Dataset _Dh_ = _{s[k] h[, a][k] h[, r] h[k][}][K] k_ =1[, objective] _[ z]_[= (] _[s, a]_[)][,] _[ β][h]_[, precision] _[ α]_ 2: _G ←Fh −Fh_ 3: Define _R_ ( _g, w_ ) := _∥g∥_[2] _σ_ � _h,Dh_[+] _[w]_ 2[(] _[g]_[(] _[s, a]_[)] _[ −]_[2(] _[L]_[ + 1))][2][,] _[ ∀][g][∈G]_ 4: _wL ←_ 0, _wH ← βh/_ ( _α_ ( _L_ + 1)) 5: _gL ←_ 0, _zL ←_ 0 6: _gH ←_ argmin _g∈G R_ ( _g, wH_ ), _zH ← gH_ ( _s, a_ ) 7: ∆ _← αβ/_ (8( _L_ + 1)[3] ) 10:8:9: **while** _wg_ �� _←← |_ � _z_ argmin _H_ ( _w−H z_ + _Lg w|∈G > αL R_ ) _/_ (2 _g,_ and _w_ �) _|_ , _w_ � _zH←−g_ � _w_ ( _s, aL| >_ ) ∆ **do** 12:11: **if** _∥wgH∥_[2] _σ_ � _←h,Dw, zh_ � _[> β] H[h] ←_ **[ then]** _z_ � 13: **else** 14: _wL ← w, z_ � _L ← z_ � 15: **end if** 16: **end while** 17: **Output:** _zH_ + +The binary search algorithm is similar to Kong et al. (2021), which utilizes the oracle for varianceweighted ridge regression in Lines 6 and 10. It reduces the computational complexity of the constrained optimization problem given by (C.1), limiting it to a finite number of calls to the regression oracle. If the function class _Fh_ is convex, the binary search algorithm can solve the optimization problem (C.1) up to a precision of _α_ with _O_ (log(1 _/α_ )) calls of the regression oracle. We summarize the result in the following theorem. If _Fh_ is not convex, the method of Krishnamurthy et al. (2017) can solve the problem with _O_ (1 _/α_ ) calls of the regression oracle. + +15 + +**Theorem C.1.** Assume the optimal solution of the optimization problem (C.1) is _g[∗]_ = _f_ 1 _[∗][−][f]_ 2 _[ ∗]_[and] the function class _Fh_ is convex and closed under pointwise convergence, then Algorithm 2 terminate after _O_ (log(1 _/α_ )) calls of the regression oracle and the returned values satisfy + +**==> picture [86 x 11] intentionally omitted <==** + +_Proof of Theorem C.1._ Easy to see _G_ = _Fh −Fh_ is also convex. We then follow the proof of Theorem 1 of Foster et al. (2018). + +To see the solution of optimization problem C.1 satisfies the condition of the bonus function, we recall the definition of the _D_[2] -divergence + +**==> picture [386 x 70] intentionally omitted <==** + +D ANALYSIS OF THE VARIANCE ESTIMATOR In this section, our main objective is to prove that our variance estimators are close to the truncated variance of the optimal value function [V _hVh[∗]_ +1[](] _[s, a]_[)][.][The following lemmas are helpful in the proof] of Lemma D.4. To start with, we need an upper bound of the _D_[2] -divergence for a large dataset. **Lemma D.1.** Let _Dh_ be the dataset satisfying Assumption 3.6. When the size of data set satisfies _K ≥_ Ω[�] � lo _κ_ g[2] _N_ �, with probability at least 1 _− δ_ , for each state-action pair _z_ , we have + +**==> picture [128 x 25] intentionally omitted <==** + +Lemma 6.1 and Lemma 6.2 show the confidence radius for the first and second-order Bellman error, which is essential in our proof. Here we restate them with more accurate parameter choices. + +**Lemma D.2** (Restatement of Lemma 6.1) **.** For any stage _h ∈_ [ _H_ ], let _f_[q] _h_ +1( _·, ·_ ) _≤ H_ be the estimated value function constructed in Algorithm 1 Line 7. _f_ ¯ _h[′][∈F][h]_[, satisfying that] _[ |][f]_[ ¯] _h[ ′]_[(] _[z][h]_[)] _[ −]_[[] _[T][h]_[ q] _[f][h]_[+1][](] _[z][h]_[)] By utilizing Assumption 3.3, there exists a function _[| ≤][ϵ]_[ holds for all state-action pair] _[ z][h]_[= (] _[s][h][, a][h]_[)][.] Then with probability at least 1 _− δ/_ (4 _H_ ), it holds that + +**==> picture [150 x 26] intentionally omitted <==** + +where _β_[¯] 1 _,h_ = _O_[�] � ~~�~~ log( _N · Nb_ ) _H_ �, and _f_[¯] _h_ is the estimated function for first-moment Bellman operator (Line 4 in Algorithm 1). + +**Lemma D.3** (Restatement of Lemma 6.1) **.** For any stage _h ∈_ [ _H_ ], let _f_[q] _h_ +1( _·, ·_ ) _≤ H_ be the estimated value function constructed in Algorithm 1 Line 7. By utilizing Assumption 3.3, there exists a function _g_ ¯ _h[′][∈F][h]_[, satisfying that] _[ |][g]_[¯] _h[′]_[(] _[z][h]_[)] _[ −]_[[] _[T]_[2] _[,h]_[ q] _[f][h]_[+1][](] _[z][h]_[)] _[| ≤][ϵ]_[ holds for all state-action pair] _[ z][h]_[= (] _[s][h][, a][h]_[)][.] Then with probability at least 1 _− δ/_ (4 _H_ ), it holds that + +**==> picture [150 x 26] intentionally omitted <==** + +where _β_[¯] 2 _,h_ = _O_[�] ��log( _N · Nb_ ) _H_[2][�] , and ¯ _gh_ is the estimated function for second-moment Bellman operator (Line 5 in Algorithm 1). + +Recall the definition of the variance estimator. + +**==> picture [244 x 64] intentionally omitted <==** + +16 + +The variance estimator is defined as: + +**==> picture [298 x 31] intentionally omitted <==** + +We can prove the following lemma: + +**Lemma D.4.** with probability at least 1 _− δ/_ 2, for any _h ∈_ [ _H_ ], the variance estimator designed above satisfies: + +**==> picture [298 x 31] intentionally omitted <==** + +_Proof of Lemma D.4._ We write B _h_ ( _s, a_ ) = _g_ ¯ _h_ ( _s, a_ ) _−_ � _f_ ¯ _h_ ( _s, a_ )�2. We first bound the difference between B _h_ ( _s, a_ ) and [Var _hf_[q] _h_ +1]( _s, a_ ). By the definition of conditional variance, we have B _h_ ( _s, a_ ) _−_ [Var _h_ q _fh_ +1]( _s, a_ ) _≤ g_ ¯ _h_ ( _s, a_ ) _−_ [ _T_ 2 _,h_ q _fh_ +1]( _s, a_ ) + � _f_ ¯ _h_ ( _s, a_ )�2 _−_ �[ _Thf_[q] _h_ +1]( _s, a_ )�2[�] _,_ ��� ��� ��� ��� ��� �� where we use our definition of Bellman operators. By Assumption 3.3, there exists _f_[¯] _h[′][∈F][h]_[,][ ¯] _[g] h[′][∈F][h]_[,] such that for all ( _s, a_ ) + +**==> picture [267 x 32] intentionally omitted <==** + +Then by Lemma D.2, with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds + +**==> picture [274 x 26] intentionally omitted <==** + +Similarly, for the second-order term, using Lemma D.3, with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds + +**==> picture [274 x 26] intentionally omitted <==** + +After taking a union bound, with probability at least 1 _− δ/_ (2 _H_ ), (D.3) and (D.4) hold for all _h ∈_ [ _H_ ] simultaneously. Consequently, we focus on this high probability event and prove that + +**==> picture [349 x 185] intentionally omitted <==** + +**==> picture [166 x 48] intentionally omitted <==** + +17 + +where the first inequality holds due to the completeness assumption. The second inequality holds due to (D.3) and (D.4). The third inequality holds due to Definition 3.4 . The last inequality holds due to Lemma D.1. Therefore, we have + +**==> picture [319 x 31] intentionally omitted <==** + +q To further bound the difference between �Var _hf_[q] _h_ +1�( _s, a_ ) and [Var _hVh[∗]_ +1[](] _[s, a]_[)][, we prove] �� _fh_ +1 _− √_ log( _N·Nb_ ) _H_[3] _Vh[∗]_ +1�� _∞[≤][O]_[�] ~~_√_~~ _Kκ_ by induction. � � At horizon _H_ + 1, _f_[q] _H_ +1 = _VH[∗]_ +1[= 0][, the inequality holds naturally.][At horizon] _[ H]_[, we have] + +**==> picture [216 x 93] intentionally omitted <==** + +where the first inequality holds due to the triangle inequality. The second inequality holds due to (D.1). The third inequality holds due to the property of the bonus function[¯] _bH_ and (D.3). The last equality holds due to our definition of _f_[q] _H_ in Algorithm 1 Line 7. Therefore, _VH[∗]_[(] _[s]_[)] _[ ≥][f]_[q] _[H]_[(] _[s]_[)][ for all] _s ∈S_ . + +We denote the policy derived from _f_[q] _H_ by q _πH_ , i.e. _π_ q _H_ ( _s_ ) = argmax _a f_[q] _H_ ( _s, a_ ) and then we have + +**==> picture [341 x 126] intentionally omitted <==** + +where the first inequality holds because the policy q _πH_ takes the action which maximizes _f_[q] _H_ . The second inequality holds due to (D.1) and (D.3). For the last inequality, we use the choice of _bH_ such that for all _z ∈S × A_ with constant 0 _< C < ∞_ + +**==> picture [219 x 19] intentionally omitted <==** + +Therefore, we have max _z_[¯] _bH_ ( _z_ ) _≤ O_ � _√_ log ~~_√_~~ ( _N ·NKκ b_ ) _H_ , which uses Lemma D.1 and _βH_ = _O_ ���log( _N · Nb_ ) _H_ �. � � + +Next, we prove by induction. Let _Rh_ = _O_[�] _√_ log ~~_√_~~ ( _N ·NKκ b_ ) _H ·_ ( _H − h_ + 1). We define the induction � � assumption as follows:q Suppose with the probability of 1 _− δh_ +1, the event _Eh_ +1 = _{_ 0 _≤ Vh[∗]_ +1[(] _[s]_[)] _[ −] fh_ +1( _s_ ) _≤ Rh_ +1 _}_ holds. Then we want to prove that with the probability of 1 _− δh_ ( _δh_ will be determined later), the event _Eh_ = _{_ 0 _≤ Vh[∗]_[(] _[s]_[)] _[ −][f]_[q] _[h]_[(] _[s]_[)] _[ ≤][R][h][}]_[ holds.] Conditioned on the event _Eh_ +1, using similar argument to stage _H_ , we have + +**==> picture [109 x 28] intentionally omitted <==** + +18 + +**==> picture [166 x 67] intentionally omitted <==** + +where the first inequality holds due to _Eh_ +1. The second inequality holds due to the triangle inequality. The third inequality holds due to (D.1). The fourth inequality holds due to the property of the bonus function[¯] _bh_ and (D.3). The last equality holds due to our definition of _f_[q] _h_ in Algorithm 1 Line 7. Therefore, _Vh[∗]_[(] _[·]_[)] _[ ≥][f]_[q] _[h]_[(] _[·]_[)][.] + +On the other hand, similar to the case at horizon _H_ , we denote the policy derived from _f_[q] _h_ by q _πh_ , i.e. q _πh_ ( _s_ ) = argmax _a f_[q] _h_ ( _s, a_ ). Taking a union bound over the event in Lemma D.1 and _Eh_ +1, we have with probability at least 1 _− δh_ +1 _− δ/_ (2 _H_[2] ), + +**==> picture [326 x 164] intentionally omitted <==** + +where the first inequality holds because the policy q _πH_ takes the action which maximizes _f_[q] _H_ . The second inequality holds due to (D.1) and (D.3). The third inequality holds due to Lemma D.1. The last inequality holds due to the induction assumption. Therefore, we can choose _δh_ = ( _H − h_ + 1) _δ/_ (2 _H_[2] ) _≤ δ/_ 2 _H_ . Taking a union bound over all _h ∈_ [ _H_ ], we prove that with probability at least 1 _− δ/_ 2, the following inequality holds for all _h ∈_ [ _H_ ] simultaneously + +**==> picture [305 x 31] intentionally omitted <==** + +Conditioned on this event, we can further bound the difference between [Var _hf_[q] _h_ +1]( _s, a_ ) and [Var _hVh[∗]_ +1[](] _[s, a]_[)][.] + +**==> picture [382 x 110] intentionally omitted <==** + +where the first inequality holds due to the triangle inequality. The second inequality holds due to _Vh[∗]_ +1 _[,][f]_[q] _[h]_[+1] _[≤][H]_[.][The last inequality holds due to][ (D.6)][.][Therefore, for any][ (] _[s, a]_[)] _[ ∈S × A]_[, we have] + +**==> picture [312 x 42] intentionally omitted <==** + +19 + +**==> picture [117 x 31] intentionally omitted <==** + +Thus, for any ( _s, a_ ) _∈S × A_ , we have + +**==> picture [232 x 31] intentionally omitted <==** + +where the first inequality holds due to the triangle inequality. The second inequality holds due to (D.5) and (D.7). Finally, using the fact that the function max _{_ 1 _, ·}_ is increasing and nonexpansive, we complete the proof of Lemma D.4, which is + +**==> picture [298 x 31] intentionally omitted <==** + +E PROOF OF LEMMAS IN SECTION D E.1 PROOF OF LEMMA D.1 + +_Proof of Lemma D.1._ From the definition of _D_[2] divergence (Definition 3.4), we have + +**==> picture [320 x 31] intentionally omitted <==** + +By the Hoeffding’s inequality (Lemma I.3), with probability at least 1 _− δ/_ ( _N_[2] ), we have + +2 � � _f_ 1( _zh[k]_[)] _[ −][f]_[2][(] _[z] h[k]_[)] � _− K_ E _µ,h_ �( _f_ 1( _zh_ ) _− f_ 2( _zh_ ))[2][�] _≥−_ 2 ~~�~~ 2 _K_ log( _N_[2] _/δ_ ) _· ∥f_ 1 _− f_ 2 _∥_[2] _∞[.] k∈_ [ _K_ ] + +Hence, after taking a union bound, we have with probability at least 1 _− δ_ , for all _f_ 1 _, f_ 2 _∈Fh_ , + +2 � � _f_ 1( _zh[k]_[)] _[ −][f]_[2][(] _[z] h[k]_[)] � _≥ K_ E _µ,h_ �( _f_ 1( _zh_ ) _− f_ 2( _zh_ ))[2][�] _−_ 2�2 _K_ log( _N_[2] _/δ_ ) _· ∥f_ 1 _− f_ 2 _∥_[2] _∞ k∈_ [ _K_ ] _≥ K · κ∥f_ 1 _− f_ 2 _∥_[2] _∞[−]_[2] �2 _K_ log( _N_[2] _/δ_ ) _· ∥f_ 1 _− f_ 2 _∥_[2] _∞[,]_ (E.2) where the second inequality holds due to Assumption 3.6. Substituting (E.2) into (E.1), when the size of dataset _K ≥_ Ω[�] � lo _κ_ g[2] _N_ �, we have + +**==> picture [266 x 26] intentionally omitted <==** + +E.2 PROOF OF LEMMA D.2 In the proof of Lemma D.2, we need to prove the following concentration inequality. **Lemma E.1.** Based on the dataset _D[′]_ = _{s_ ¯ _[k] h[,]_[ ¯] _[a][k] h[,]_[ ¯] _[r] h[k][}][K,H] k,h_ =1[, we define the filtration] ¯ ¯ _Hh[k]_[=] _[ σ]_ � _s_[1] 1 _[,]_[ ¯] _[a]_[1] 1 _[,]_[ ¯] _[r]_ 1[1] _[,]_[ ¯] _[s]_[1] 2 _[, . . . ,]_[ ¯] _[r] H_[1] _[,]_[ ¯] _[s]_[1] _H_ +1[; ¯] _[s]_ 1[2] _[,]_[ ¯] _[a]_[2] 1 _[,]_[ ¯] _[r]_ 1[2] _[,]_[ ¯] _[s]_[2] 2 _[, . . . ,]_[ ¯] _[r] H_[2] _[,]_[ ¯] _[s]_[2] _H_ +1[;] _[ . . . ,]_[ ¯] _[s]_ 1 _[k][,]_[ ¯] _[a][k]_ 1 _[,]_[ ¯] _[r]_ 1 _[k][,]_[ ¯] _[s][k]_ 2 _[, . . . ,]_[ ¯] _[r] h[k][,]_[ ¯] _[s][k] h_ +1� _._ For any fixed functions _f, f[′]_ : _S →_ [0 _, H_ ], we make the following definitions: + +**==> picture [178 x 30] intentionally omitted <==** + +Then with probability at least 1 _− δ/_ (4 _H_[2] _N_[2] _Nb_[2][)][, the following inequality holds,] + +**==> picture [340 x 60] intentionally omitted <==** + +20 + +_Proof of Lemma D.2._ Let ( _β_[¯] 1 _,h_ )[2] = (48 _H_[2] + 10) _i_[2] ( _δ_ ) + 16 _KHϵ_ . We define the event _E_[¯] 1 _,h_ := ¯ 2 2[�] �� _k∈_ [ _K_ ] � _fh ′_[(¯] _[z] h[k]_[)] _[ −][f]_[¯] _[h]_[(¯] _[z] h[k]_[)] � _>_ (¯ _β_ 1 _,h_ ) . We have the following inequality: + +**==> picture [360 x 216] intentionally omitted <==** + +where the first inequality holds due to our choice of _f_[¯] _h_ , i.e., + +**==> picture [224 x 28] intentionally omitted <==** + +Next, we will use Lemma E.1. For any fixed _h_ , let _f_ = _f_[¯] _h ∈Fh_ , _f[′]_ = _f_[q] _h_ +1 = _{f_[¯] _− ϵ}_ [0 _,H−h_ +1], where _f_[¯] = _f_[¯] _h −_[¯] _bh ∈Fh −W_ . Following the construction in Lemma E.1, we define + +**==> picture [232 x 30] intentionally omitted <==** + +Due to the result of Lemma E.1, taking a union bound on the function class, with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds, + +**==> picture [354 x 243] intentionally omitted <==** + +Therefore, with probability at least 1 _− δ/_ (4 _H_[2] ), we have + +21 + +**==> picture [351 x 32] intentionally omitted <==** + +where the first and third inequalities hold because of the completeness assumption. The second inequality holds due to (E.4). The last equality holds due to the choice of + +**==> picture [262 x 19] intentionally omitted <==** + +However, conditioned on the event _E_[¯] 1 _,h_ , we have + +**==> picture [230 x 88] intentionally omitted <==** + +where the first inequality holds due to (E.3). The second inequality holds due to _E_[¯] 1 _,h_ . This is contradictory with (E.7). Thus, we have P[ _E_[¯] 1 _,h_ ] _≤ δ/_ (4 _H_[2] ) and complete the proof of Lemma D.2. + +E.3 PROOF OF LEMMA D.3 To prove this lemma, we need a lemma similar to Lemma E.1 + +**Lemma E.2.** On dataset _D[′]_ = _{s_ ¯ _[k] h[,]_[ ¯] _[a][k] h[,]_[ ¯] _[r] h[k][}][K,H] k,h_ =1[, we define the filtration] + +_H_ ¯ _h[k]_[=] _[ σ]_[(¯] _[s]_ 1[1] _[,]_[ ¯] _[a]_ 1[1] _[,]_[ ¯] _[r]_ 1[1] _[,]_[ ¯] _[s]_ 2[1] _[, . . . ,]_[ ¯] _[r] H_[1] _[,]_[ ¯] _[s] H_[1] +1[; ¯] _[s]_ 1[2] _[,]_[ ¯] _[a]_ 1[2] _[,]_[ ¯] _[r]_ 1[2] _[,]_[ ¯] _[s]_ 2[2] _[, . . . ,]_[ ¯] _[r] H_[2] _[,]_[ ¯] _[s] H_[2] +1[;] _[ . . . ,]_[ ¯] _[s]_ 1 _[k][,]_[ ¯] _[a]_ 1 _[k][,]_[ ¯] _[r]_ 1 _[k][,]_[ ¯] _[s]_ 2 _[k][, . . . ,]_[ ¯] _[r] h[k][,]_[ ¯] _[s] h[k]_ +1[)] _[.]_ For any fixed function _f, f[′]_ : _S →_ [0 _, H_ ], we make the following definitions: + +**==> picture [236 x 32] intentionally omitted <==** + +Then with probability at least 1 _− δ/_ (4 _H_[2] _N_[2] _Nb_[2][)][, the following inequality holds,] + +**==> picture [345 x 62] intentionally omitted <==** + +**==> picture [398 x 192] intentionally omitted <==** + +22 + +**==> picture [372 x 57] intentionally omitted <==** + +where the first inequality holds due to our choice of ¯ _gh_ , i.e. + +**==> picture [236 x 29] intentionally omitted <==** + +¯ Next, we will use Lemma E.2. For any fixed _h_ , let _f_ = _gh ∈Fh_ , _f[′]_ = _f_[q] _h_ +1 = _{f_[¯] _− ϵ}_ [0 _,H−h_ +1], where _f_[¯] = _f_[¯] _h −_[¯] _bh ∈Fh −W_ . Following the construction in Lemma E.2, we define + +**==> picture [252 x 32] intentionally omitted <==** + +Due to the result of Lemma E.2, taking a union bound on the function, with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds, + +**==> picture [346 x 34] intentionally omitted <==** + +Therefore, with probability at least 1 _− δ/_ (4 _H_[2] ), we have + +**==> picture [363 x 214] intentionally omitted <==** + +where the first and third inequalities hold due to the Bellman completeness assumption. The second inequality holds due to (E.9). The last inequality holds due to the choice of + +**==> picture [264 x 13] intentionally omitted <==** + +However, conditioned on the event _E_[¯] 2 _,h_ , we have + +**==> picture [242 x 88] intentionally omitted <==** + +where the first inequality holds due to (E.8). The last inequality holds due to _E_[¯] 2 _,h_ . It is contradictory with (E.10). Thus, we have P[ _E_[¯] 2 _,h_ ] _≤ δ/_ (4 _H_[2] ) and complete the proof of Lemma D.3. + +23 + +## F PROOF OF THEOREM 5.1 + +In this section, we prove Theorem 5.1. The proof idea is similar to that of Section D. To start with, we prove that our data coverage assumption (Assumption 3.6) can lead to an upper bound of the weighted _D_[2] -divergence for a large dataset. + +**Lemma F.1.** Let _Dh_ be a dataset satisfying Assumption 3.6. When the size of data set satisfies _K ≥_ Ω[�] � lo _κ_ g[2] _N_ �, � _σh ≤ H_ , with probability at least 1 _− δ_ , for each state-action pair _z_ , we have + +**==> picture [132 x 25] intentionally omitted <==** + +With Lemma D.4, we can prove a variance-weighted version of concentration inequality. + +**Lemma F.2** (Restatement of Lemma 6.3) **.** Suppose the variance function � _σh_ satisfies the inequality in Lemma D.4. at stage _h ∈_ [ _H_ ], the estimated value function _f_[�] _h_ +1 in Algorithm 1 is bounded by _H_ . According to Assumption 3.3, there exists some function _f_[¯] _h ∈Fh_ , such that _|f_[¯] _h_ ( _zh_ ) _−_ [ _Thf_[�] _h_ +1]( _z_ ) _| ≤ ϵ_ for all _zh_ = ( _sh, ah_ ). Then with probability at least 1 _− δ/_ 2, the following inequality holds for all stage _h ∈_ [ _H_ ] simultaneously, + +**==> picture [192 x 28] intentionally omitted <==** + +With these lemmas, we can start the proof of Theorem 5.1. + +_Proof of Theorem 5.1._ For any state-action pair _z_ = ( _s, a_ ) _∈S × A_ , we have + +**==> picture [272 x 48] intentionally omitted <==** + +where we bound _I_ 1 with the Bellman completeness assumption. For the second term, we use the property of the bonus function and Lemma F.2. Using Lemma I.2, we have + +**==> picture [336 x 136] intentionally omitted <==** + +where the first inequality holds due to Lemma I.2. The second inequality holds due to the property of the bonus function + +**==> picture [214 x 14] intentionally omitted <==** + +The third inequality holds due to our choice of _βh_ = _O_[�] � _√_ log _N_ �. The last inequality holds due to Lemma D.4 and the fact that _D_[2] -divergence is increasing with respect to the variance function. We complete the proof of Theorem 5.1. + +## G PROOF OF THE LEMMAS IN SECTION F + +G.1 PROOF OF LEMMA F.1 + +_Proof of Lemma F.1._ From the definition of _D_[2] divergence, we have + +**==> picture [342 x 31] intentionally omitted <==** + +24 + +By the Hoeffding’s inequality (Lemma I.3), with probability at least 1 _− δ/_ ( _N_[2] ), + +2 � � _f_ 1( _zh[k]_[)] _[ −][f]_[2][(] _[z] h[k]_[)] � _− K_ E _µ,h_ �( _f_ 1( _zh_ ) _− f_ 2( _zh_ ))[2][�] _≥−_ 2�2 _K_ log( _N_[2] _/δ_ ) _· ∥f_ 1 _− f_ 2 _∥_[2] _∞[.] k∈_ [ _K_ ] + +Hence, after taking a union bound, we have with probability at least 1 _− δ_ , for all _f_ 1 _, f_ 2 _∈Fh_ , + +**==> picture [359 x 77] intentionally omitted <==** + +where the last inequality holds due to Assumption 3.6. Substituting (G.2) into (G.1), when _K ≥_ Ω� � log _κN_ �, we have + +**==> picture [276 x 27] intentionally omitted <==** + +G.2 PROOF OF LEMMA F.2 In this section, we assume the high probability event in Lemma D.4 holds,i.e., the following inequality holds: + +**==> picture [348 x 30] intentionally omitted <==** + +To prove Lemma F.2, we need the following lemmas. + +**Lemma G.1.** Based on the dataset _D_ = _{s[k] h[, a][k] h[, r] h[k][}][K,H] k,h_ =1[,][we][define][the][filtration] _[H] h[k]_[=] _σ_ ( _s_[1] 1 _[, a]_[1] 1 _[, r]_ 1[1] _[, s]_[1] 2 _[, . . . , r] H_[1] _[, s]_[1] _H_ +1[;] _[ x]_ 1[2] _[, a]_[2] 1 _[, r]_ 1[2] _[, s]_[2] 2 _[, . . . , r] H_[2] _[, s]_[2] _H_ +1[;] _[ · · ·][ s]_ 1 _[k][, a][k]_ 1 _[, r]_ 1 _[k][, s][k]_ 2 _[, . . . , r] h[k][, s][k] h_ +1[)][.] For any fixed function _f, f[′]_ : _S →∈_ [0 _, L_ ], we define the following random variables: + +**==> picture [186 x 42] intentionally omitted <==** + +As the variance function � _σh_ satisfies (G.3), with probability at least 1 _− δ/_ (4 _H_[2] _N_[2] ), the following inequality holds, + +**==> picture [248 x 64] intentionally omitted <==** + +where _v_ ( _δ_ ) = �2 log _[H][N]_[(][2 lo][g(][18] _[LT]_[)+] _δ_[2][)(][lo][g(][18] _[L]_[)+][2][)] . + +_K,H_ **Lemma G.2.** Based on the dataset _D_ = � _s[k] h[, a][k] h[, r] h[k]_ � _k,h_ =1[, we define the following filtration] _[ H] h[k]_[=] _σ_ � _s_[1] 1 _[, a]_ 1[1] _[, r]_ 1[1] _[, s]_[1] 2 _[, . . . , r] H_[1] _[, s]_[1] _H_ +1[;] _[ x]_ 1[2] _[, a]_[2] 1 _[, r]_ 1[2] _[, s]_ 2[2] _[, . . . , r] H_[2] _[, s]_[2] _H_ +1[;] _[ · · ·][ s]_ 1 _[k][, a][k]_ 1 _[, r]_ 1 _[k][, s][k]_ 2 _[, . . . , r] h[k][, s] h[k]_ +1�. For any fixed functions _f, f_[�] : _S →_ [0 _, L_ ] and _f[′]_ : _S →_ [0 _, H_ ], we define the following random variables + +**==> picture [286 x 42] intentionally omitted <==** + +25 + +As the variance function � _σh_ satisfies (G.3), with probability at least 1 _− δ/_ (4 _H_[2] _N_[3] _Nb_ ), the following inequality holds, + +**==> picture [358 x 60] intentionally omitted <==** + +where _ι_ ( _δ_ ) = ~~�~~ 3 log _[H]_[(] _[N·N][b]_[)(][2 lo][g(][18] _[LT] δ_[)+][2][)(][lo][g(][18] _[L]_[)+][2][)] . With these lemmas, we can start the proof of Lemma F.2. + +**==> picture [399 x 35] intentionally omitted <==** + +**==> picture [403 x 223] intentionally omitted <==** + +where the first inequality holds due to our choice of _f_[�] _h_ in Algorithm 1 Line 12, + +**==> picture [264 x 29] intentionally omitted <==** + +We prove this lemma by induction. At horizon _H_ , we first use Lemma G.1. Let _f_ = _f_[�] _H ∈FH_ , _f[′]_ = _f_[¯] _H ∈FH_ . We define + +**==> picture [192 x 42] intentionally omitted <==** + +Taking a union bound over the function class, with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds, + +**==> picture [382 x 64] intentionally omitted <==** + +26 + +Then we use Lemma G.2. Let _f_ = _f_[�] _H ∈FH_ , _f_[�] = _f_[¯] _H ∈FH_ , _f[′]_ = _f_[�] _H_ +1 = 0. We define: + +**==> picture [276 x 42] intentionally omitted <==** + +Taking a union bound over the function class, with probability at least 1 _− δ/_ (4 _H_[2] ), we have + +**==> picture [397 x 78] intentionally omitted <==** + +Combining (G.5) and (G.6), we have with probability at least 1 _− δ/_ (2 _H_[2] ), the following inequality holds: + +**==> picture [391 x 224] intentionally omitted <==** + +where the first inequality holds due to the complete assumption. The second inequality holds due to (G.5) and (G.6). The last inequality holds due to the fact _f_[�] _H_ +1 = _VH[∗]_ +1[=][0][ and our choice of] _βH_ ,i.e., + +**==> picture [297 x 164] intentionally omitted <==** + +However, conditioned on the event _EH_ , we have + +where the first inequality holds due to (G.4). The second inequality holds due to _EH_ . It contradicts with (G.7). Therefore, we prove that P[ _EH_ ] _≥_ 1 _− δ/_ 2 _H_[2] . + +27 + +Suppose the event _EH_ holds, we can prove the following result. + +**==> picture [216 x 106] intentionally omitted <==** + +where the first inequality holds due to the triangle inequality. The second inequality holds due to the completeness assumption. The third inequality holds due to the property of the bonus function and + +**==> picture [192 x 28] intentionally omitted <==** + +by Lemma F.2. Therefore, _VH[∗]_[(] _[s]_[)] _[ ≥][f]_[�] _[H]_[(] _[s]_[)][ for all] _[ s][ ∈S]_[.] We also have + +**==> picture [341 x 126] intentionally omitted <==** + +where the first inequality holds due to the policy _π_ � _H_ takes the action which maximizes _f_[�] _H_ . The second inequality holds due to the Bellman completeness assumption. The last inequality holds due to the property of the bonus function + +**==> picture [399 x 46] intentionally omitted <==** + +We define another event _Eh_[ind] for induction. + +**==> picture [180 x 13] intentionally omitted <==** + +The above analysis shows that _EH ⊆EH_[ind][and][ P][[] _[E][H]_[]] _[ ≥]_[1] _[ −]_[2] _[δ][H]_[.][Moreover,][ P][[] _[E] H_[ind][]] _[ ≥]_[1] _[ −]_[2] _[δ][H]_ We conduct the induction in the following way. At stage _h_ , if P[ _Eh_ +1] _≥_ 1 _−_ 2 _δh_ +1 and P[ _Eh_[ind] +1[]] _[ ≥]_ 1 _−_ 2 _δh_ +1, we prove that P[ _Eh_ ] _≥_ 1 _−_ 2 _δh_ and P[ _Eh_[ind][]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[.] Suppose at stage _h_ , P[ _Eh_ +1] _≥_ 1 _−_ 2 _δh_ +1 and P[ _Eh_[ind] +1[]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[+1][.][We first use Lemma G.1.][Let] _f_ = _f_[�] _h ∈Fh_ , _f[′]_ = _f_[¯] _h ∈Fh_ . We define + +**==> picture [180 x 43] intentionally omitted <==** + +After taking a union bound, we have with probability at least 1 _− δ/_ (4 _H_[2] ), the following inequality holds, + +**==> picture [286 x 30] intentionally omitted <==** + +28 + +**==> picture [208 x 32] intentionally omitted <==** + +**==> picture [399 x 74] intentionally omitted <==** + +After taking a union bound, we have with probability at least 1 _− δ/_ (4 _H_[2] ), we have + +**==> picture [385 x 75] intentionally omitted <==** + +Let _Uh_ be the event that (G.8) and (G.9) holds simultaneously. On the event _Uh ∩Eh_[ind] +1[,][which] satisfies P[ _Uh ∩Eh_[ind] +1[]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[+1] _[ −]_[2] _[δ/H]_[2][= 1] _[ −]_[2] _[δ][h]_[, we have] + +**==> picture [415 x 223] intentionally omitted <==** + +where the first inequality holds due to the completeness assumption. The second inequality holds due to (G.8) and (G.9). The last inequality holds due to the event _Eh_[ind] +1[and][the][choice][of] _[K][≥]_ � _ι_ ( _δ_ )[2] _H_[6] Ω � _κ_ �. + +However, on the event of _Eh_[c][, we have] + +**==> picture [274 x 97] intentionally omitted <==** + +where the first inequality holds due to (G.4). The second inequality holds due to event _Eh_[c][.][However,] this contradicts with (G.10). We conclude that _Uh ∩Eh_[ind] +1 _[⊆E][h]_[, thus][ P][[] _[E][h]_[]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[.] + +29 + +Next we prove P[ _Eh_[ind][]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[.][Suppose the event] _[ U][h][ ∩E] h_[ind] +1[holds, the above conclusion shows] that + +**==> picture [192 x 29] intentionally omitted <==** + +We can prove the following result. + +**==> picture [202 x 96] intentionally omitted <==** + +where the first inequality hold due to the event _Eh_[ind][.][The second inequality holds due to the triangle] inequality. The third inequality holds due to the completeness assumption. The last inequality holds due to the property of the bonus function and + +**==> picture [192 x 29] intentionally omitted <==** + +Therefore, _Vh[∗]_[(] _[s]_[)] _[ ≥][f]_[�] _[h]_[(] _[s]_[)][ for all] _[ s][ ∈S]_[.] We also have + +**==> picture [326 x 126] intentionally omitted <==** + +where the first inequality holds due to the policy � _πh_ takes the action which maximizes _f_[�] _h_ . The second inequality holds due to the Bellman completeness assumption. The second inequality holds due to the property of the bonus function + +**==> picture [210 x 14] intentionally omitted <==** + +and Lemma F.1. The last inequality holds due to the induction assumption. Therefore, we have _Uh ∩Eh_[ind] +1 _[⊆E] h_[ind] and P[ _Eh_[ind][]] _[ ≥]_[1] _[ −]_[2] _[δ][h]_[.][Thus we complete the proof of induction.] Finally, taking the union bound of all the _Eh_ , we get the result that with probability at least 1 _− δ/_ 2, the event _∪[H] h_ =1 _[E][h]_[ holds, i.e for any] _[ h][ ∈]_[[] _[H]_[]][ simultaneously, we have] + +**==> picture [192 x 29] intentionally omitted <==** + +Therefore, we complete the proof of Lemma F.2. + +H PROOF OF LEMMAS IN SECTION E AND G + +H.1 PROOF OF LEMMA E.1 + +_Proof of Lemma E.1._ We use Lemma I.1, with the following conditions: + +_D_ ¯ _h[k]_[[] _[f, f][ ′]_[]][ is adapted to the filtration] _[H]_[¯] _h[k]_[and][ E] � _D_ ¯ _hk_[[] _[f, f][ ′]_[]] _[ |][H]_[¯] _h[k][−]_[1] � = 0 _._ + +30 + +�� _D_ ¯ _hk_[[] _[f, f][ ′]_[]] �� _≤_ 2 �� _η_ ¯ _hk_ �� max _z |f_ ( _z_ ) _−_ [ _Thf[′]_ ]( _z_ ) _| ≤_ 4 _H_[2] = _M._ � E �� _D_ ¯ _hk_[[] _[f, f][ ′]_[]] �2[�] �� _z_ ¯ _hk_ � = � E �4 � _η_ ¯ _h[k]_[[] _[f][ ′]_[]] �2[�] �� _z_ ¯ _hk_ �� _f_ (¯ _zh[k]_[)] _[ −]_[[] _[T][h][f][ ′]_[](¯] _[z] h[k]_[)] �2 _≤_ (4 _HK_ )2 = _V_ 2 _. k∈_ [ _K_ ] _k∈_ [ _K_ ] + +On the other hand, + +**==> picture [383 x 167] intentionally omitted <==** + +We complete the proof of Lemma E.1. + +H.2 PROOF OF LEMMA E.2 _Proof of Lemma E.2._ We use Lemma I.1, with the following conditions: + +**==> picture [396 x 63] intentionally omitted <==** + +On the other hand, + +**==> picture [315 x 57] intentionally omitted <==** + +Then using Lemma I.1 with _v_ = 1, _m_ = 1, we have: + +**==> picture [371 x 84] intentionally omitted <==** + +We complete the proof of Lemma E.2. + +H.3 PROOF OF LEMMA G.1 _Proof of Lemma G.1._ We use Lemma I.1, with the following conditions: + +**==> picture [286 x 67] intentionally omitted <==** + +31 + +On the other hand, + +**==> picture [283 x 63] intentionally omitted <==** + +where the last inequality holds because of the inequality in Lemma D.4: + +**==> picture [310 x 115] intentionally omitted <==** + +**==> picture [334 x 153] intentionally omitted <==** + +The second inequality holds because of the definition of _D_[2] divergence (Definition 3.4). The third inequality holds due to Lemma F.1. The last inequality holds because of the choice of _K ≥_ � _v_[2] ( _δ_ ) _H_[4] Ω � _κ_ �. + +Then using Lemma I.1 with _v_ = 1, _m_ = 1, we have + +**==> picture [401 x 135] intentionally omitted <==** + +We complete the proof of Lemma G.1. + +H.4 PROOF OF LEMMA G.2 _Proof of Lemma G.2._ ∆ _[k] h_[[] _[f,][f, f]_[�] _[ ′]_[]][ is adapted to the filtration] _[ H] h[k]_[and][ E] ∆ _[k] h_[[] _[f,][f, f]_[�] _[ ′]_[]] _[ | H] h[k][−]_[1] = 0. � � We also have + +**==> picture [305 x 37] intentionally omitted <==** + +32 + +**==> picture [186 x 31] intentionally omitted <==** + +Moreover, for any _k ∈_ [ _K_ ], + +**==> picture [396 x 153] intentionally omitted <==** + +The second inequality holds because of the definition of _D_[2] divergence (Definition 3.4). The third inequality holds due to Lemma F.1. The last inequality holds because of the choice of _K ≥_ � _ι_[2] ( _δ_ ) _H_[4] Ω � _κ_ �. Then using Lemma I.1 with _v_ = 1, _m_ = 1 _/_ log _Nb_ , with probability at least 1 _− δ/_ (4 _H_[2] _N_[3] _Nb_ ), we have + +**==> picture [372 x 137] intentionally omitted <==** + +We complete the proof of Lemma G.2. + +**==> picture [398 x 116] intentionally omitted <==** + +**Lemma I.2** (Regret Decomposition Property, Jin et al. 2021b) **.** Suppose the following inequality holds, + +**==> picture [330 x 32] intentionally omitted <==** + +**==> picture [208 x 31] intentionally omitted <==** + +Here E _π∗_ is with respect to the trajectory induced by _π[∗]_ in the underlying MDP. + +33 + +**Lemma I.3** (Azuma-Hoeffding inequality, Cesa-Bianchi & Lugosi 2006) **.** Let _{xi}[n] i_ =1[be a martin-] gale difference sequence with respect to a filtration _{Gi}_ satisfying _|xi| ≤ M_ for some constant _M_ , _xi_ is _Gi_ +1-measurable, E[ _xi|Gi_ ] = 0. Then for any 0 _< δ <_ 1, with probability at least 1 _− δ_ , we have + +**==> picture [110 x 29] intentionally omitted <==** + +34 + diff --git a/open_review/iclr2024_8818.json b/open_review/iclr2024_8818.json new file mode 100644 index 0000000000000000000000000000000000000000..4bd5f3d269cdf6154387d07ffb78fe8dae0540ef --- /dev/null +++ b/open_review/iclr2024_8818.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8818", + "source": "iclr2024", + "source_year": 2024, + "title": "Towards Better Evaluation of GNN Expressiveness with BREC Dataset", + "abstract": "Research on the theoretical expressiveness of Graph Neural Networks (GNNs) has developed rapidly, and many methods have been proposed to enhance the expressiveness. However, unifying all kinds of models into one framework is untractable, making it hard to measure and compare their expressiveness quantitatively. In contrast to theoretical analysis, another way to measure expressiveness is by evaluating model performance on certain datasets containing 1-WL-indistinguishable graphs. Previous datasets specifically designed for this purpose, however, face problems with difficulty (any model surpassing 1-WL has nearly 100\\% accuracy), granularity (models tend to be either 100\\% correct or near random guess), and scale (only several essentially different graphs in each dataset). To address these limitations, we propose a new expressiveness dataset, **BREC**, including 400 pairs of non-isomorphic graphs carefully selected from four primary categories (Basic, Regular, Extension, and CFI). These graphs have higher difficulty (up to 4-WL-indistinguishable), finer granularity (can compare models between 1-WL and 3-WL), and a larger scale (400 pairs or extend to 319600 pairs or even more). Further, we synthetically test 23 models with higher-than-1-WL expressiveness on our BREC dataset. Our experiment gives the first thorough measurement of the expressiveness of those state-of-the-art beyond-1-WL GNN models and reveals the gap between theoretical and practical expressiveness. We expect this dataset to serve as a benchmark for testing the expressiveness of future GNNs. Dataset and evaluation codes are released at: https://github.com/brec-iclr2024/brec-iclr2024.", + "rebuttal": "### Acknowledging Your Feedback: Offering a Deeper Look into Our Work (Part 1/2)\nWe sincerely appreciate your thoughtful comments and the time you invested in evaluating our work. Your feedback is invaluable, and we are grateful for the positive aspects you highlighted, including the improved Table 2 and the thoroughness of our response. We also acknowledge your concerns about the perceived challenges and effort in generating our expressiveness dataset, especially compared to the effort of human labeling in standard benchmark papers. We would like to provide further insight into the extensive effort involved in creating the graphs in our dataset, which is highly challenging and nontrivial.\n\nConcretely, for Extension Graphs, we implemented four distinct extension methods within our framework: the k-WL hierarchy, k-hop subgraph, counting substructure, and node marking. These methods were uniformly integrated into the WL framework, and we systematically applied them in iterative tests on graphs that met specific criteria. Additionally, we introduced a sub-sampling approach to lower testing burden and balance different types of graphs. To further enhance difficulty, we incorporated dedicated examples featuring the use of virtual nodes and large cycles. In the case of CFI Graphs, we pioneered the implementation of CFI Graphs generation and rigorously tested them using k-WL algorithms. Our work on regular graphs also extended beyond conventional benchmarks by not only a wider search for rare regular graphs (please refer to Appendix L) but also by introducing new sub-categories like the 4-vertex condition graph. Additionally, we implemented theoretical upperbound algorithms for certain models, such as the distance-WL algorithm for Graphormer, and incorporated various graph representation techniques, including incidence graphs and hamming codes, because some rare regular graphs do not provide graph compositions but generation methods with other representations.\n\nWe have made our implemented algorithms publicly available at https://github.com/brec-iclr2024/brec-iclr2024/tree/main/Non-GNNs and https://github.com/brec-iclr2024/brec-iclr2024/tree/main/dataset_generation. We would like to especially highlight our contribution to implementing CFI graphs. As pointed out by reviewer Bpfn, \"The authors are the first to implement CFI graphs that enable any k-WL tests.\" Our implementation enables generating CFI graphs meeting **arbitrary k-WL test difficulty** and using **arbitrary backbone graphs**. This is not only superficially beneficial for GNN expressiveness comparison right now, but also provides a profound contribution to the broader research community, including the graph theory community, as CFI graphs are an essential category for studying the graph isomorphism problem but have never been implemented before due to their implementation challenges. CFI graphs are crafted initially with backbone graphs, necessitating the determination of an appropriate separator size. Subsequently, the original nodes, along with their combinations, undergo expansion, resulting in a multitude of nodes. The creation of new edges is facilitated by leveraging information from the original edges and incorporating cardinal parity considerations. The final two non-isomorphic graphs are generated with additional twist operations. These operations maintain an underlying similarity while introducing nuanced differences between the graphs, which make them distinguishable by some k+1-WL test but not by k-WL. Furthermore, the complexity of the generated graphs is rigorously validated through the application of high-order WL algorithms, which we also implemented ourselves for arbitrary k for the first time. In addition, the involved operations in the implementation are generally different from standard graph operators, and thus are missing from existing graph libraries, which forced us to implement these graph operators one by one ourselves too (see https://github.com/brec-iclr2024/brec-iclr2024/blob/main/dataset_generation/utils.py for the util functions we implemented). All these challenges demonstrate the nontrivial effort in generating our dataset. Overall, the CFI graphs quickly grow very large, and we automate this process for arbitrary k and arbitrary backbone graphs, which can emancipate researchers from composing them by hand. This involves not only nontrivial intellectual effort but also facilitates future research on graph isomorphism testing, graph theory, and GNN expressivity.\n\n### Acknowledging Your Feedback: Offering a Deeper Look into Our Work (Part 2/2)\nWe hope this detailed explanation underscores the tremendous effort we have spent in the dataset generation, as well as the technical challenges we have overcome and the valuable contributions that distinguish our work from other expressiveness benchmarks. Finally, we would like to highlight the difference between human-labeled datasets and synthesized datasets (such as our BREC). Although the former one takes great effort in manual labeling, the data samples are usually easy to collect. In contrast, the latter on [...]\n\n### Grateful for Reviewers’ comments and a Gentle Reminder\nWe hope this letter finds you well. Firstly, we want to express our sincere gratitude for your time and expertise in reviewing our work. Your insightful feedback has been invaluable in improving the quality of our research. We highly appreciate your attention to detail and thoughtful evaluation.\n\nWe would like to kindly remind you about our response to your previous comments and concerns. We have carefully considered and addressed them in our response and corresponding code repository. Specifically, we have dedicated a discussion to el [...]\n\n### Gratitude for Your Feedback and a Slight Clarification\nThank you ever so much for your thoughtful acknowledgment of our paper. We are sincerely grateful for the time and effort you dedicated to reviewing our work.\n\nWhile addressing your comments,\n[rebuttal truncated]", + "initial_scores": [ + 6, + 6, + 5 + ], + "score_mean": 5.67, + "score_variance": 0.33, + "score_spread": 1, + "score_min": 5, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": null, + "meta_review": "This paper proposed BREC, a new expressiveness dataset to benchmark GNN Expressiveness. Reviewers found this paper to be interesting and useful, but have concerns related to novelty and the significance of the contribution.", + "forum_id": "aqqE1yS3RY", + "primary_area": "learning on graphs and other geometries & topologies", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_ZHhj", + "review_id": "Q93WQJmDOH", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 2, + "contribution": 2, + "confidence": 2 + }, + "review_text_chars": 1514, + "edit_detected": true, + "edit_delta_seconds": 818110, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_Bpfn", + "review_id": "CiD727rsCB", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 1495, + "edit_detected": true, + "edit_delta_seconds": 898367, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_D7WE", + "review_id": "C9h7GayYLq", + "scores": { + "rating": 5, + "soundness": 3, + "presentation": 3, + "contribution": 1, + "confidence": 4 + }, + "review_text_chars": 2119, + "edit_detected": true, + "edit_delta_seconds": 2305307, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8818.md b/open_review/iclr2024_8818.md new file mode 100644 index 0000000000000000000000000000000000000000..53c38db01aef1297b4c5ee16cbc5aa62fc8e652c --- /dev/null +++ b/open_review/iclr2024_8818.md @@ -0,0 +1,607 @@ + + +## TOWARDS BETTER EVALUATION OF GNN EXPRESSIVENESS WITH BREC DATASET + +Authors withheld for review + +## ABSTRACT + +Research on the theoretical expressiveness of Graph Neural Networks (GNNs) has developed rapidly, and many methods have been proposed to enhance the expressiveness. However, unifying all kinds of models into one framework is untractable, making it hard to measure and compare their expressiveness quantitatively. In contrast to theoretical analysis, another way to measure expressiveness is by evaluating model performance on certain datasets containing 1-WL-indistinguishable graphs. Previous datasets specifically designed for this purpose, however, face problems with difficulty (any model surpassing 1-WL has nearly 100% accuracy), granularity (models tend to be either 100% correct or near random guess), and scale (only several essentially different graphs in each dataset). To address these limitations, we propose a new expressiveness dataset, **BREC** , including 400 pairs of non-isomorphic graphs carefully selected from four primary categories (Basic, Regular, Extension, and CFI). These graphs have higher difficulty (up to 4- WL-indistinguishable), finer granularity (can compare models between 1-WL and 3-WL), and a larger scale (400 pairs or extend to 319600 pairs or even more). Further, we synthetically test 23 models with higher-than-1-WL expressiveness on our BREC dataset. Our experiment gives the first thorough measurement of the expressiveness of those state-of-the-art beyond-1-WL GNN models and reveals the gap between theoretical and practical expressiveness. We expect this dataset to serve as a benchmark for testing the expressiveness of future GNNs. Dataset and evaluation codes are released at: [URL removed] + +## 1 INTRODUCTION + +GNNs have been extensively utilized in bioinformatics, recommender systems, social networks, and others, yielding remarkable outcomes (Duvenaud et al., 2015; Barab´asi et al., 2011; Fan et al., 2019; Wang et al., 2018b; Berg et al., 2017; Zhou et al., 2020). Despite impressive empirical achievements, related investigations have revealed that GNNs exhibit limited abilities to distinguish some similar but non-isomorphic graphs. In practical situations, the inability to recognize specific structures, such as benzene rings (6-member rings), may cause misleading learning results. Xu et al. (2019); Morris et al. (2019) established a connection between the expressiveness of message-passing neural networks (MPNNs) and the WL test for graph isomorphism testing, demonstrating that MPNN’s upper bound is 1-WL. Numerous subsequent studies have proposed GNN variants with enhanced expressiveness (Bevilacqua et al., 2022; Cotta et al., 2021; You et al., 2021; Zhang & Li, 2021). + +Given the multitude of models employing different approaches, such as feature injection, equivariance maintenance, and subgraph extraction, a unified framework that can theoretically compare the expressive power among various variants is highly desirable. In this regard, several attempts have been made under the _k_ -WL architecture. Maron et al. (2019b) propose the concept of _k_ -order invariant/equivariant graph networks, which unify linear layers while preserving permutation invariance/equivariance. Additionally, Frasca et al. (2022) unify recent subgraph GNNs and establish that their expressiveness upper bound is 3-WL. Zhang et al. (2023a) further construct a comprehensive expressiveness hierarchy for subgraph GNNs. Nonetheless, the magnitude of the gaps remains unknown. Furthermore, there exist methods that are difficult to categorize within the _k_ -WL hierarchy. For instance, Papp & Wattenhofer (2022) propose four extensions of GNNs, each of which cannot strictly compare with the other. Similarly, Feng et al. (2022) propose a GNN that is partially stronger than 3-WL yet fails to distinguish many 3-WL-distinguishable graphs. In a different ap- + +1 + +proach, Huang et al. (2023) propose evaluating expressiveness by enumerating specific significant substructures, such as 6-cycles. Zhang et al. (2023b) introduces biconnectivity as a measurement. + +Without a unified theoretical characterization of expressiveness, employing expressiveness datasets for testing proves valuable. Notably, three expressiveness datasets, EXP, CSL, and SR25, have been introduced by Abboud et al. (2021); Murphy et al. (2019); Balcilar et al. (2021) and have found widespread usage in recent studies. However, these datasets exhibit notable limitations. Firstly, they lack sufficient difficulty. The EXP and CSL datasets solely consist of examples where 1-WL fails, and most recent GNN variants have achieved perfect accuracy on these datasets. Secondly, the granularity of these datasets is too coarse, which means that graphs in these datasets are generated using a single method, resulting in a uniform level of discrimination difficulty. Consequently, the performance of GNN variants often falls either at random guessing (completely indistinguishable) or 100% (completely distinguishable), thereby hindering the provision of a nuanced measure of expressiveness. Lastly, these datasets suffer from small sizes, typically comprising only a few substantially different graphs, raising concerns of incomplete measurement. + +To overcome the limitations of previous datasets, we propose BREC, including 400 pairs of nonisomorphic graphs in 4 major categories: Basic, Regular, Extension, and CFI graphs. Compared to previous datasets, BREC has a greater difficulty (up to 4-WL-indistinguishable), finer granularity (can compare models between 1-WL and 3-WL), and larger scale (800 non-isomorphic graphs organized as 400 pairs or extend to 319600 pairs or even more), addressing previous ones’ shortcomings. + +Due to the increased size and diversity of the dataset, the traditional classification task may not be suitable for training-based evaluation methods that rely on generalization ability. Thus, we propose a novel evaluation procedure based on directly comparing the discrepancies between model outputs to test pure practical expressiveness. Acknowledging the impact of numerical precision owning to tiny differences between graph pairs, we propose reliable paired comparisons building upon a statistical method (Fisher, 1992; Johnson & Wichern, 2007), which offers a precise error bound. Experiments verify that the evaluation procedure aligns well with known theoretical results. + +Finally, we comprehensively compared 23 representative beyond-1-WL models on BREC. Our experiments first give a **reliable empirical comparison** of state-of-the-art GNNs’ expressiveness. The currently most thorough investigation is a good start for gaining deeper insights into various schemes to enhance GNNs’ expressiveness. On BREC, GNN accuracies range from 41.5% to 70.2%, with I[2] -GNN (Huang et al., 2023) performing the best. The 70.2% highest accuracy also implies that the dataset is **far from saturation** . We expect BREC can serve as a benchmark for testing future GNNs’ expressiveness. Our dataset is included in [URL removed] + +## 2 LIMITATIONS OF EXISTING DATASETS + +**Preliminary.** We utilize the notation _{}_ to represent sets and _{{}}_ to represent multisets. The cardinality of a (multi)set S is denoted as _|_ S _|_ . The index set is denoted as [ _n_ ] = 1 _, . . . , n_ . A graph is denoted as _G_ = (V( _G_ ) _,_ E( _G_ )), where V( _G_ ) represents the set of _nodes_ or _vertices_ and E( _G_ ) represents the set of _edges_ . Without loss of generality, we assume _|_ V( _G_ ) _|_ = _n_ and V( _G_ ) = [ _n_ ]. + +The permutation or reindexing of _G_ is denoted as _G[π]_ = (V( _G[π]_ ) _,_ E( _G[π]_ )) with the permutation function _π_ : [ _n_ ] _→_ [ _n_ ], s.t. ( _u, v_ ) _∈_ E( _G_ ) _⇐⇒_ ( _π_ ( _u_ ) _, π_ ( _v_ )) _∈_ E( _G[π]_ ). Here node and edge features are excluded from definitions for briefness. Additional discussions can be found in Appendix B. + +**Graph Isomorphism (GI) Problem.** Two graphs _G_ and _H_ are considered isomorphic (denoted as _G ≃H_ ) if _∃ ϕ_ (a bijection mapping) :V( _G_ ) _→_ V( _H_ ) s.t. ( _u, v_ ) _∈_ E( _G_ ) iff. ( _ϕ_ ( _u_ ) _, ϕ_ ( _v_ )) _∈_ E( _H_ ). GI is essential in expressiveness. Only if GNN successfully distinguishes two non-isomorphic graphs can they be assigned different labels. Some researchers (Chen et al., 2019; Geerts & Reutter, 2022) indicate the equivalence between GI and function approximation, underscoring the importance of GI. However, we currently do not have polynomial-time algorithms for solving the GI problem. A naive solution involves iterating all _n_ ! permutations to test whether such a bijection exists. + +**Weisfeiler-Lehman algorithm (WL).** WL is a well-known isomorphism test relying on color refinement (Weisfeiler & Leman, 1968). In each iteration, WL assigns a state (or color) to each node by aggregating information from its neighboring nodes’ states. This process continues until convergence, resulting in a multiset of node states representing the final graph representation. While WL + +2 + +**==> picture [372 x 60] intentionally omitted <==** + +**==> picture [357 x 10] intentionally omitted <==** + +**----- Start of picture text -----**
+(a) EXP dataset core pair sample (b) CSL graph( m = 10 , r = 2 / 3) (c) SR25 dataset sample
**----- End of picture text -----**
+ +Figure 1: Sample graphs in previous datasets + +Table 1: Dataset statistics + +||||Table|1: Dataset statistics|| +|---|---|---|---|---|---| +|Dataset|# Graphs|# Core graphsa|# Nodes|Distinguishing diffculty|Evaluation metrics| +|EXP|1200|6|33-73|1-WL-indistinguishable|2-way classifcation| +|CSL|150|10|41|1-WL-indistinguishable|10-way classifcation| +|SR25|15|15|25|3-WL-indistinguishable|15-way classifcation| +|**BREC**|800|**800**|**10-198**|**1-WL to 4-WL-indistinguishable**|Reliable Paired Comparisons| + +> a Core graphs represent graphs that actually serve to measure expressiveness. + +effectively identifies most non-isomorphic graphs, it may fail in certain simple graphs, leading to the development of extended versions. One such extension is _k_ -WL, which treats each _k_ -tuple of nodes as a unit for aggregating information. Another slightly different method (Cai et al., 1989) is also referred to as _k_ -WL. To avoid confusion, we follow Morris et al. (2019) to call the former _k_ -WL and the latter _k_ -FWL. Further information can be found in Appendix C. + +Given the significance of GI and WL, several expressiveness datasets have been introduced, with the following three being the most frequently utilized. We selected a pair of graphs from each dataset, illustrated in Figure 1. Detailed statistics for these datasets are presented in Table 1. + +**EXP Dataset.** This dataset is generated pairwise. Each graph in a pair includes two disconnected components, the core component and planar component, where the former are two 1-WLindistinguishable counterexamples while the latter are identical and only for adding noise. The two graphs are labeled 0/1 based on whether their core component satisfies the SAT condition for a binary classification problem. Although it is formally consistent with general datasets, the insufficient difficulty and number of different core components ( **only three substantially different pairs** ) results in most recent GNNs achieving nearly 100% accuracy, making detailed comparisons unavailable. + +**CSL Dataset.** This dataset consists of Circulant Skip Links (CSL) graphs, which are 1-WLindistinguishable 4-degree regular graphs. Ten distinct CSL graphs with 41 nodes are generated first. Each of the ten distinct CSL graphs is treated as a separate class, and the task is to train a 10-way classification model. Then, each graph is reindexed 14 times, resulting in the final dataset with 150 graphs. Because of the relatively low difficulty and their fixed structure (only **ten essentially different graphs with the same number of nodes and degree** ), many recent expressive GNN models achieve close to 100% accuracy. More details about CSL graphs are in Appendix D. + +**SR25 Dataset.** This dataset consists of 15 3-WL-indistinguishable Strongly Regular Graphs (SR) with parameter srg(25,12,5,6)[1] . In practice, SR25 is transformed into a 15-way classification problem for mapping each graph into a different class where the training and test graphs overlap. Most methods obtain 6.67% (1/15) accuracy due to 3-WL’s high expressiveness. However, some methods partially surpassing 3-WL achieve 100% accuracy easily since each graph has the same parameters. + +These three datasets have limitations regarding difficulty, granularity, and scale. In terms of difficulty, they are all bounded by 3-WL, failing to evaluate models (partly) beyond 3-WL (Feng et al., 2022). In terms of granularity, the graphs are generated in one way with repetive parameters, which easily leads to a 0/1 step function of model performance and cannot measure subtle differences between models. In terms of scale, the number of substantially different graphs in the datasets is small, and the test results may be incomplete to reflect expressiveness measurement. + +## 3 BREC: A NEW DATASET FOR EXPRESSIVENESS + +We propose a new expressiveness dataset, BREC, to address the limitations regarding difficulty, granularity, and scale. It consists of four major categories of graphs: Basic, Regular, Extension, and CFI. Basic graphs include relatively simple 1-WL-indistinguishable graphs. Regular graphs include + +> 1Strongly regular graphs can be described by four parameters. More details can be found in Appendix A + +3 + +**==> picture [361 x 132] intentionally omitted <==** + +**==> picture [330 x 23] intentionally omitted <==** + +**----- Start of picture text -----**
+(a) Basic (b) Regular (c) Strongly regular (d) Extension (e) CFI
Figure 2: BREC dataset samples
**----- End of picture text -----**
+ +four types of subcategorized regular graphs. Extension graphs include special graphs that arise when comparing four kinds of GNN extensions (Papp & Wattenhofer, 2022). CFI graphs include graphs generated by CFI methods[2] (Cai et al., 1989) with high difficulty. Some samples are shown in Fig 2. + +## 3.1 DATASET COMPOSITION + +BREC includes 800 non-isomorphic graphs arranged in a pairwise manner to construct 400 pairs, with detailed composition as follows: (For detailed generation process, please refer to Appendix L) + +**Basic Graphs.** Basic graphs consist of 60 pairs of 10-node graphs. These graphs are collected from an exhaustive search and intentionally designed to be non-regular. Although they are 1- WL-indistinguishable, most can be distinguished by expressive GNN variants. Basic graphs can also be regarded as an augmentation of the EXP dataset, as they both employ non-regular 1-WLindistinguishable graphs. Nevertheless, Basic graphs offer a greater abundance of instances and more intricate graph patterns. The relatively small size also facilitates visualization and analysis. + +**Regular Graphs.** Regular graphs consist of 140 pairs of regular graphs, including 50 pairs of simple regular graphs, 50 pairs of strongly regular graphs, 20 pairs of 4-vertex condition graphs, and 20 pairs of distance regular graphs. A regular graph refers to a graph where all nodes possess the same degree. Regular graphs are 1-WL-indistinguishable, and some studies delve into the analysis of GNN expressiveness from this perspective (Li et al., 2020; Zhang & Li, 2021). We denote regular graphs without any special properties as simple regular graphs. When exploring more intricate regular graphs, the concept of strongly regular graphs (where 3-WL fails) is often introduced. They further require that the number of neighboring nodes shared by any two nodes depends solely on their connectivity. Notable examples of strongly regular graphs include the 4 _×_ 4-Rook’s graph and the Shrikhande graph (Fig 2(c)). Additionally, the 4 _×_ 4-Rook’s graph satisfies the 4-vertex condition property, which signifies that the number of connected edges between the common neighbors of any two nodes is solely determined by their connectivity (Brouwer et al., 2023). It is worth mentioning that the diameter of a connected strongly regular graph is always 2 (Brouwer et al., 2012b). A more challenging type of graph known as the distance regular graphs (Brouwer et al., 2012a) is proposed aiming for extending the diameter. By expanding upon the existing subdivisions of regular graphs, this section widens the range of difficulty and complexity. Moreover, unlike the previous datasets, regular graphs are not limited to sharing identical parameters for all graphs within each category, greatly enhancing diversity. More details about regular graphs can be found in Appendix A. + +**Extension Graphs.** Extension graphs consist of 100 pairs of graphs inspired by Papp & Wattenhofer (2022). They proposed 4 types of theoretical GNN extensions: _k_ -WL hierarchy-based, substructurecounting-based, _k_ -hop-subgraph-based, and marking-based without strict comparison relationship. Leveraging the insights from theoretical analysis and some empirically derived findings, we generated 100 pairs of graphs between 1-WL and 3-WL distinguishing difficulty to improve granularity. Note that we are the first to realize the algorithms and generate counterexamples on a large scale. + +**CFI Graphs.** CFI graphs consist of 100 pairs of graphs inspired by Cai et al. (1989). They developed a method to generate graphs distinguishable by _k_ -WL but not by ( _k −_ 1)-WL for any _k_ . We are the + +> 2CFI is short for Cai-Furer-Immerman algorithm, which can generate counterexample graphs for any k-WL. + +4 + +**==> picture [372 x 109] intentionally omitted <==** + +**----- Start of picture text -----**
+Comparison
results
Isomorphic flag
𝑮𝑮 Network 1Siamese 𝒇𝒇(𝑮𝑮) procedureMajor Generating comparison resultsof external paired 𝟏𝟏 group Calculating 𝑻𝑻𝟐𝟐𝒕𝒕𝑻 𝒕𝒕 Outputting results by comparing 𝑻𝑻𝑻𝟐𝟐𝒕𝒕𝑻𝑻 𝒕𝒕𝑻 and 𝑻 𝑻𝑻 = 𝑻𝑻𝟐𝟐𝒕𝒕𝑻 𝒕𝒕 > 𝑻 𝑻 𝑻 𝑻 𝑻𝑻
Same weights Contrastive loss 𝑻 𝐦𝑻 Setting 𝑻𝐦𝐦 𝑻𝑻𝑻 [𝟐𝟐] 𝑻𝑻= Reliability flag = True GNN can distinguish 𝑮𝑮 Isomorphic flag = and 𝑯𝑯 only when
𝑯𝑯 Network 2Siamese 𝒇𝒇(𝑯𝑯) Reliability check Generating comparison resultsof inner paired 𝟏𝟏 group Calculating 𝑻𝑻𝟐𝟐𝑻 𝑻𝑻𝒓 𝒓 𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓 Outputting results by comparing 𝑻𝑻𝟐𝟐𝑻𝑻 𝑻𝑻𝒓𝑻𝒓 𝑻𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓𝑻 and 𝑻𝑻 Reliability flag= 𝑻𝑻𝟐𝟐𝑻 𝑻𝑻𝒓 𝒓 𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓 <
𝑻 𝑻 𝑻 𝑻 𝑻𝑻
(a) Training Framework (b) RPC Pipeline
**----- End of picture text -----**
+ +Figure 3: Evaluation Method + +first to implement it and create 100 pairs of graphs spanning up to 4-WL-indistinguishable, even surpassing the current research’s upper bounds. Specifically, 60 pairs are solely distinguishable by 3-WL, 20 are solely distinguishable by 4-WL, and 20 are even 4-WL-indistinguishable. As the most challenging part, it pushes the upper limit of difficulty even higher. Furthermore, the graph sizes in this section are larger than other parts (up to 198 nodes). This aspect intensifies the challenge of the dataset, demanding a model’s ability to process graphs with heterogeneous sizes effectively. + +## 3.2 ADVANTAGES + +**Difficulty.** The CFI graphs raise difficulty to 4-WL-indistinguishable. The newly involved 4-vertex condition and distance regular graphs also pose greater challenges regarding higher regularity. + +**Granularity.** The different classes of graphs in BREC exhibit varying difficulty levels, each contributing to the dataset in distinct ways. Basic graphs contain fundamental 1-WL-indistinguishable graphs, similar to the EXP dataset, as a starting point for comparison. Regular graphs extend the CSL and SR25 datasets. The major components of regular graphs are simple regular graphs and strongly regular graphs, where 1-WL and 3-WL fail, respectively. Including 4-vertex condition graphs and distance regular graphs further elevates the complexity. Extension graphs bridge the gap between 1-WL and 3-WL, offering a finer-grained comparison for evaluating models beyond 1-WL. CFI graphs span the spectrum of difficulty from 1-WL to 4-WL-indistinguishable. By comprehensive graph composition, BREC explores the boundaries of graph pattern distinguishability. + +**Scale.** While previous datasets relied on only a few essentially different graphs, BREC utilizes a collection of 800 different graphs organized as 400 pairs. This significant increase in the number of graphs greatly enhances the diversity. The larger graph set in BREC also contributes to a more varied distribution of graph statistics. In contrast, previous datasets such as CSL and SR25 only have the same number of nodes and degrees across all graphs. For detailed statistics of BREC, please refer to Appendix E. BREC can also be easily further scaled up to 319600 pairs by iterating over all possible compare combinations, or even more by adding more graphs as it is a small sample of what we have done in the generation process (Appendix L). However, we deliberately did not scale it to facilitate a lower testing burden and balance the distribution of graphs with different difficulties. The experiments also verify that the current size is enough to find subtle differences between models. + +## 4 RPC: A NEW EVALUATION METHOD + +This section introduces a novel training framework and evaluation method for BREC. Unlike previous datasets, BREC departs from the conventional classification setting, where each graph is assigned a label, a classification model is trained, and the accuracy on test graphs serves as the measure of expressiveness. The labeling schemes used in previous datasets like semantic labels based on SAT conditions in EXP, or distinct labels for essentially different graphs in CSL and SR25, do not apply to BREC. There are two primary reasons. First, BREC aims to enrich the diversity of graphs, which precludes using a semantic label tied to SAT conditions, as it would significantly limit the range of possible graphs. Second, assigning a distinct label to each graph in BREC would result in an 800-class classification problem, where performance could be influenced by factors other than expressiveness. Our core idea is to measure models’ practical ”separating power” directly. Thus BREC is organized in pairs, where each pair is individually tested to determine whether a GNN can distinguish them. By adopting a pairwise evaluation method, BREC provides a more focused measure of models’ expressiveness, aligning to assess distinguishing ability. + +5 + +Nevertheless, how can we say a pair of graphs is successfully distinguished? Previous researchers tend to set a small threshold (like 1E-4) manually. If the embedding distance between them is larger than the threshold, the GNN is considered can distinguish them. This setting may satisfy previous datasets’ requirements due to the relatively simple construction. However, it lacks **reliability** on numerical precision with more complex graphs where tiny differences may even overlap with numerical fluctuations. In order to yield dependable outcomes, we propose an evaluation method measuring both **external difference** and **internal fluctuations** . Furthermore, we introduce a training framework for pairwise data, employing the siamese network design (Koch et al., 2015) and contrastive loss (Hadsell et al., 2006; Wang et al., 2018a). The pipeline is depicted in Fig 3(a). + +## 4.1 TRAINING FRAMEWORK + +We adhere to the siamese network design (Koch et al., 2015) to train a model to distinguish each pair of graphs. The central component consists of two identical models maintaining identical parameters. For a pair of graphs inputted, it outputs a pair of embeddings. Subsequently, the difference between them is assessed using cosine similarity. The loss function is formulated as follows: + +**==> picture [291 x 24] intentionally omitted <==** + +where the GNN model _f_ : _{G} →_ R _[d]_ , _G_ and _H_ are two graphs, and _γ_ is a margin hyperparameter (set to 0 in our experiments). The loss function aims to promote the cosine similarity value lower than _γ_ , thereby encouraging a greater separation between the two graph embeddings. + +The training process **yields several benefits** for the models. Firstly, it helps the GNN to achieve its theoretical expressiveness. The GNN expressiveness analysis focuses primarily on the network’s structure without imposing any constraints on its parameters, which means it is exploring the expressiveness of **a group of functions** . If a model with particular parameters can distinguish a pair of graphs, the model’s design and structure are considered possessing sufficient expressiveness. However, it is impractical to iterate all possible parameter combinations to test the real upper bound. Hence, training can **realize searching** in the function space, enabling models to achieve better practical expressiveness. Furthermore, training aids components to **possess specific properties** , such as injectivity and universal approximation, which are vital for attaining theoretical expressiveness. These properties require specific parameter configurations, but randomly initialized parameters may not satisfy. Moreover, through training, model-distinguishable pairs are **more easily discriminated** from model-indistinguishable pairs, which helps reducing the false negative rate caused by numerical precision. The difference between model-distinguishable pairs’ embeddings is further magnified in the pairwise contrastive training process. However, the difference for model-indistinguishable pairs caused by numerical precision remains unaffected mainly. The framework is shown in Fig 3(a). + +## 4.2 EVALUATION METHOD + +We evaluate models by comparing the outputs of two non-isomorphic graphs. If we notice a significant difference between the outputs, we conclude that the GNN can distinguish the pair of graphs. However, setting a suitable threshold can be challenging. A large threshold may yield false negatives, which means the model can distinguish the pair, but the observed difference falls short of the threshold. Conversely, a small threshold may yield false positives, which means the model cannot distinguish the pair, but fluctuating errors cause the difference to exceed the threshold. + +To address the issue of fluctuating errors, we draw inspiration from Paired Comparisons (Fisher, 1992). It involves comparing two groups of results instead of a single pair. The influence of random errors is mitigated by repeatedly generating results and comparing the two groups of results. Building upon it, we introduce a method called **R** eliable **P** aired **C** omparison (RPC) to verify whether a GNN genuinely produces distinct outputs for a pair of graphs. The pipeline is depicted in Fig 3(b). + +RPC consists of two main components: Major procedure and Reliability check. The Major procedure is conducted on a pair of non-isomorphic graphs to measure their dissimilarity. In contrast, the Reliability check is conducted on graph automorphisms to capture internal fluctuations. + +**Major procedure.** Given two non-isomorphic graphs _G, H_ , we create _q_ copies of each by random permutation (still isomorphic to original graph) to generate two groups of graphs, denoted as: + +**==> picture [231 x 11] intentionally omitted <==** + +6 + +**==> picture [397 x 26] intentionally omitted <==** + +**Assumption 4.1** _**d** i are independent N_ ( _**µ** ,_ **Σ** ) _random vectors._ + +The above assumption is based on a more basic assumption that _f_ ( _Gi_ ) _, f_ ( _Hi_ ) follow Gaussian distributions, which presumes that random permutation only introduces Gaussian noise to the result. + +If the GNN cannot distinguish _G_ and _H_ , the mean difference should satisfy _**µ**_ = **0** . To check whether the equation holds, we can conduct an _α_ -level Hotelling’s T-square test, comparing the hypotheses _H_ 0 : _**µ**_ = **0** against _H_ 1 : _**µ** ̸_ = **0** . The _T_[2] -statistic for _**µ**_ is calculated as follows: + +**==> picture [261 x 12] intentionally omitted <==** + +where + +**==> picture [301 x 29] intentionally omitted <==** + +Hotelling’s T-square test proves that _T_[2] is distributed as an[(] _[q] q[−] −_[1] _d_[)] _[d][F][d,q][−][d]_[random][variable,][where] _Fd,q−d_ represents _F_ -distribution with degree of freedom _d, q − d_ (Hotelling, 1992). The theorem establishes a connection between the unknown parameter _**µ**_ and a definite distribution _Fd,q−d_ , allowing us to confirm the confidence interval of _**µ**_ by testing the distribution fit. To test the hypothesis _H_ 0 : _**µ**_ = **0** , we substitute _**µ**_ = **0** into Equation (4), obtaining _T_ test[2][=] _[q]_ _**d**_ ~~_T_~~ _**S** −_ 1 _**d**_ . Then an _α_ -level test of _H_ 0 : _**µ**_ = **0** versus _H_ 1 : _**µ** ̸_ = **0** accepts _H_ 0 (the GNN cannot distinguish the pair) if: + +**==> picture [282 x 25] intentionally omitted <==** + +where _Fd,q−d_ ( _α_ ) is the upper (100 _α_ )th percentile of the _F_ -distribution _Fd,q−d_ (Fisher, 1950) with _d_ and _q − d_ degrees of freedom. Similarly, we reject _H_ 0 (the GNN can distinguish the pair) if + +**==> picture [282 x 24] intentionally omitted <==** + +**Reliability check.** With an appropriate choice of _α_ , the Major procedure provides a dependable confidence interval for assessing the distinguishability. However, manually selected _α_ based on heuristics may not be optimal. Furthermore, computational precisions can introduce distribution shifts in assumed Gaussian fluctuations. To address this issue, we introduce the Reliability check. It bridges external differences between two graphs and internal fluctuations within a single graph. + +WLOG, we replace _H_ by permutation of _G_ , i.e., _G[π]_ . We can then obtain the internal fluctuations within _G_ by comparing it with _G[π]_ , and the external difference between _G_ and _H_ by comparing _G_ and _H_ . We utilize the same step as Major procedure on _G_ and _G[π]_ , calculating the _T_[2] -statistics as: + +**==> picture [246 x 16] intentionally omitted <==** + +**==> picture [382 x 28] intentionally omitted <==** + +Recalling that _G_ and _G[π]_ are isomorphic, the GNN should not distinguish between them, implying that _**µ**_ = **0** . Therefore, the test is considered reliable only if _T_ reliability[2] _[<]_[(] ( _[q] q[−] −_[1] _d_[)] ) _[d][F][d,q][−][d]_[(] _[α]_[)][.][Combin-] ing the reliability and distinguishability results, we get the complete RPC (Fig 3(b)) as follows: + +For each pair of graphs _G_ and _H_ , we first calculate the threshold value, denoted as Threshold = ( _q−_ 1) _d_ ( _q−d_ ) _[F][d,q][−][d]_[(] _[α]_[)][.][Next,][we][conduct][the][Major][procedure][on] _[G]_[and] _[H]_[for][distinguishability][and] perform the Reliability check on _G_ and _G[π]_ for Reliability. Only when the _T_[2] -statistic from the Major procedure, denoted as _T_ test[2][,][and][the] _[T]_[ 2][-statistic][from][the][Reliability][check,][denoted][as] _[T]_[ 2] reliability[,] satisfying _T_ reliability[2] _[<]_[ Threshold] _[ < T]_ test[ 2][, do we conclude that the GNN can distinguishing] _[ G]_[and] _[ H]_[.] + +We further propose **R** eliable **A** daptive **P** aired **C** omparisons (RAPC), aiming to adaptively adjust the threshold and provide an upper bound for false positive rates. In practice, we use **RPC** due to its less computational time and satisfactory performance. For more details, please refer to Appendix F. + +7 + +Table 2: Pair distinguishing accuracies on BREC + +|Type
Model|Basic Graphs (60)
Number
Accuracy|Regular Graphs (140)|Extension Graphs (100)|CFI Graphs (100)|Total (400)| +|---|---|---|---|---|---| +|||Number
Accuracy|Number
Accuracy|Number
Accuracy|Number
Accuracy| +|Non-GNNs
3-WL
SPD-WL
_S_3
_S_4
_N_1
_N_2
_M_1|60
100%
16
26.7%
52
86.7%
60
100%
60
100%
60
100%
60
100%|50
35.7%
14
11.7%
48
34.3%
99
70.7%
99
85%
138
98.6%
50
35.7%|100
100%
41
41%
5
5%
84
84%
93
93%
100
100%
100
100%|60
60.0%
12
12%
0
0%
0
0%
0
0%
0
0%
41
41%|270
67.5%
83
20.8%
105
26.2%
243
60.8%
252
63%
298
74.5%
251
62.8%| +|Subgraph GNNs
NGNN
DE+NGNN
DS-GNN
DSS-GNN
SUN
SSWL
~~P~~
GNN-AK
KP-GNN
I2-GNN|59
98.3%
60
100%
58
96.7%
58
96.7%
60
100%
60
100%
60
100%
60
100%
60
100%|48
34.3%
50
35.7%
48
34.3%
48
34.3%
50
35.7%
50
35.7%
50
35.7%
106
75.7%
100
71.4%|59
59%
100
100%
100
100%
100
100%
100
100%
100
100%
97
97%
98
98%
100
100%|0
0%
21
21%
16
16%
15
15%
13
13%
38
38%
15
15%
11
11%
21
21%|166
41.5%
231
57.8%
222
55.5%
221
55.2%
223
55.8%
248
62%
222
55.5%
275
68.8%
281
70.2%| +|k-WL GNNs
PPGN
_δ_-k-LGNN
KC-SetGNN|60
100%
60
100%
60
100%|50
35.7%
50
35.7%
50
35.7%|100
100%
100
100%
100
100%|23
23%
6
6%
1
1%|233
58.2%
216
54%
211
52.8%| +|Substructure GNNs
GSN|60
100%|99
70.7%|95
95%|0
0%|254
63.5%| +|Random GNNs
DropGNN
OSAN|52
86.7%
56
93.3%|41
29.3%
8
5.7%|82
82%
79
79%|2
2%
5
5%|177
44.2%
148
37%| +|Transformer GNNs
Graphormer|16
26.7%|12
8.6%|41
41%|10
10%|79
19.8%| + +## 5 EXPERIMENT + +In this section, we evaluate the expressiveness of 23 representative models using our BREC dataset. + +**Model selection.** We evaluate six categories of methods: non-GNN methods, subgraph-based GNNs, _k_ -WL-hierarchy-based GNNs, substructure-based GNNs, transformer-based GNNs, and random GNNs. Our primary focus will be on the first three categories. We implement four types of non-GNN baselines based on Papp & Wattenhofer (2022); Ying et al. (2021), including WL test (3-WL and SPD-WL), counting substructures ( _S_ 3 and _S_ 4), neighborhood up to a certain radius ( _N_ 1 and _N_ 2), and marking ( _M_ 1). We implemented them by adding additional features during the WL test update or using heterogeneous message passing. It is important to note that they are more theoretically significant than practical since they may require exhaustive enumeration or exact isomorphism encoding of various substructures. We additionally included 16 state-of-the-art GNNs, including NGNN (Zhang & Li, 2021), DE+NGNN (Li et al., 2020), DS/DSS-GNN (Bevilacqua et al., 2022), SUN (Frasca et al., 2022), SSWL ~~P~~ (Zhang et al., 2023a), GNN-AK (Zhao et al., 2022a), KP-GNN (Feng et al., 2022), I[2] -GNN (Huang et al., 2023), PPGN (Maron et al., 2019a), _δ_ -k-LGNN (Morris et al., 2020), KC-SetGNN (Zhao et al., 2022b), GSN (Bouritsas et al., 2022), DropGNN (Papp et al., 2021), OSAN (Qian et al., 2022), and Graphormer (Ying et al., 2021). + +Table 2 presents the primary results. _N_ 2 achieves the highest accuracy among non-GNNs, and I[2] - GNN achieves the highest among GNNs. We provide a detailed analysis of each method’s accuracy across various graphs. The findings generally indicate that practical expressiveness aligns closely with theoretical expectations. Nevertheless, there are still some situations where a gap between theory and practice persists. Detailed experiment settings are included in Appendix K. + +**Non-GNN baselines.** 3-WL successfully distinguishes all Basic graphs, Extension graphs, simple regular graphs and 60 CFI graphs as expected. _S_ 3, _S_ 4, _N_ 1, and _N_ 2 demonstrate excellent performance on small-radius graphs such as Basic, Regular, and Extension graphs. However, due to their limited receptive fields, they struggle to distinguish large-radius graphs like CFI graphs. Noting that the expressiveness of _S_ 3 and _S_ 4 is bounded by _N_ 1 and _N_ 2, respectively, as analyzed by Papp & Wattenhofer (2022). Conversely, _M_ 1 is implemented by heterogeneous message passing, which makes it unaffected by large graph diameters, thus maintaining its performance across different graphs. SPDWL is another 1-WL extension operated on a complete graph with shortest path distances as edge features. It may degrade to 1-WL on low-radius graphs, causing its relatively poor performance. + +**Subgraph-based GNNs.** Regarding subgraph-based models, they can generally distinguish almost all Basic graphs, simple regular graphs and Extension graphs. However, an exception lies with NGNN, which performs poorly in Extension graphs due to its simplicial node selection policy and lack of node labeling. Two other exceptions are KP-GNN and I[2] -GNN, both exhibiting exceptional performance in Regular graphs. KP-GNN can differentiate a substantial number of strongly regular + +8 + +graphs and 4-vertex condition graphs, surpassing the 3-WL partially. And I[2] -GNN surpasses the limitations of 3-WL partially through its enhanced cycle-counting power. An influential aspect that impacts the performance is the subgraph radius. Approaches incorporating appropriate encoding functions are expected to yield superior performance as the subgraph radius increases. However, in practice, enlarging the radius may result in the smoothness of information, wherein the receptive field expands, encompassing some irrelevant or noisy information. Hence, we treat the subgraph radius as a hyperparameter, fine-tuning it for each model, and present the best results in Table 2. Please refer to Appendix G for further details regarding the radius selection. + +When comparing various subgraph GNNs, KP-GNN can discriminate part of the strongly regular graphs by peripheral subgraphs. Additionally, distance encoding in DE+NGNN and I[2] -GNN enables better discrimination among different hops within a given subgraph radius, particularly in larger subgraph radii. As for DS-GNN, DSS-GNN, GNN-AK, SUN and SSWL ~~P~~ , they employ similar aggregation schemes with slight variations in their operations. These models exhibit comparable performance, with SSWL ~~P~~ outperforming others, which aligns with expectations that SSWL ~~P~~ achieves the most expressiveness with least components (Zhang et al., 2023a). + +_k_ **-WL hierarchy-based GNNs.** For the _k_ -WL-hierarchy-based models, we adopt two implemented approaches: high-order simulation and local-WL simulation. PPGN serves as the representative work for the former, while _δ_ -k-LGNN and KCSet-GNN as the latter. PPGN aligns its performance with 3-WL across all graphs except for CFI graphs. For CFI graphs with large radii, more WL iterations (layers of GNNs) are required. However, employing many layers may lead to over-smoothing, resulting in a gap between theoretical expectations and actual performance. Nonetheless, PPGN still surpasses most GNNs in CFI graphs due to global _k_ -WL’s global receptive field. For _δ_ -k-LGNN, we set _k_ = 2, while for KCSet-GNN, we set _k_ = 3 _, c_ = 2 to simulate local 3-WL, adhering to the original configuration. By comparing the output results with relatively small diameters, we observed that local WL matches the performance of general _k_ -WL. However, local WL exhibits lower performance for CFI graphs with larger radii due to insufficient receptive fields. + +**Substructure-based GNNs** For substructure-based GNNs, we select GSN, which incorporates substructure isomorphism counting as features. The best result obtained for GSN-e is reported when setting _k_ = 4. For further exploration of policy and size, please refer to Appendix I. + +**Random GNNs** Random GNNs are unsuitable for GI problems since even identical graphs can yield different outcomes due to inherent randomness. However, the RPC can quantify fluctuations in the randomization process, thereby enabling testing for random GNNs. We test DropGNN and OSAN. For more details regarding the crucial factor of random samples, please refer to Appendix J. + +**Transformer-based GNNs** For transformer-based GNNs, we select Graphormer, which is anticipated to possess a level of expressiveness with SPD-WL. The experimental results verify that. + +## 6 CONCLUSION AND FUTURE WORK + +This paper proposes a new dataset, BREC, for GNN expressiveness measurement. BREC addresses the limitations of previous datasets, including difficulty, granularity, and scale, by incorporating 400 pairs of diverse graphs in four categories. A new evaluation method is proposed for principled expressiveness evaluation. Finally, a thorough comparison of 23 baselines on BREC is conducted. The experiment highlights a gap between theoretical and practical expressiveness. Additionally, the algorithms implemented in practice for the first time offer valuable tools for future research. + +Apart from the expressiveness comparison based on GI, there are various other metrics for GNN expressiveness evaluation, such as substructure counting, diameter counting, and biconnectivity checking. However, it’s worth noting that these tests are often conducted on datasets not specifically designed for expressiveness (Huang et al., 2023; Zhao et al., 2022a; Chen et al., 2020), which can lead to biased results caused by spurious correlations. In other words, certain methods may struggle to identify a particular substructure, but they can capture another property that correlates with substructures, resulting in false high performance. This problem can be alleviated in BREC because of the difficulty. We reveal the data generation process of BREC in Appendix L, hoping that researchers can utilize them in more tasks. We also hope the test of practical expressiveness will aid researchers in exploring its effects on performance in real datasets and other domains. + +9 + +## 7 REPRODUCIBILITY + +The datasets and evaluation codes are released at [URL removed] The GitHub repository provides the complete dataset and test methods, as well as the first implementation of the traditional algorithm for further use by researchers. In addition to complete and customizable testing via the GitHub repository, users can install the Pypi package for easier and faster testing. We commit to maintaining this dataset for the long term. + +## REFERENCES + +- Ralph Abboud, Ismail[˙][˙] Ilkan Ceylan, Martin Grohe, and Thomas Lukasiewicz. The surprising power of graph neural networks with random node initialization. In Zhi-Hua Zhou (ed.), Proceedings of the Thirtieth International Joint Conference on Artifcial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021, pp. 2112–2118. ijcai.org, 2021. doi: 10.24963/ijcai.2021/ 291. URL [URL removed] + +L´aszl´o Babai and Ludik Kucera. Canonical labelling of graphs in linear average time. In 20th Annual Symposium on Foundations of Computer Science (sfcs 1979), pp. 39–46. IEEE, 1979. + +- Muhammet Balcilar, Pierre H´eroux, Benoit Gauzere, Pascal Vasseur, S´ebastien Adam, and Paul Honeine. Breaking the limits of message passing graph neural networks. In International Conference on Machine Learning, pp. 599–608. PMLR, 2021. + +- Albert-L´aszl´o Barab´asi, Natali Gulbahce, and Joseph Loscalzo. Network medicine: a network-based approach to human disease. Nature reviews genetics, 12(1):56–68, 2011. + +- Rianne van den Berg, Thomas N Kipf, and Max Welling. Graph convolutional matrix completion. arXiv preprint arXiv:1706.02263, 2017. + +- Beatrice Bevilacqua, Fabrizio Frasca, Derek Lim, Balasubramaniam Srinivasan, Chen Cai, Gopinath Balamurugan, Michael M. Bronstein, and Haggai Maron. Equivariant subgraph aggregation networks. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net, 2022. URL [URL removed] net/forum?id=dFbKQaRk15w. + +- Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, and Michael M Bronstein. Improving graph neural network expressivity via subgraph isomorphism counting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(1):657–668, 2022. + +- A. E. Brouwer, F. Ihringer, and W. M. Kantor. Strongly regular graphs satisfying the 4-vertex condition. Combinatorica, 43(2):257–276, apr 2023. doi: 10.1007/s00493-023-00005-y. URL [URL removed] + +- Andries E Brouwer, Willem H Haemers, Andries E Brouwer, and Willem H Haemers. Distance-regular graphs. Springer, 2012a. + +- Andries E Brouwer, Willem H Haemers, Andries E Brouwer, and Willem H Haemers. Strongly regular graphs. Spectra of graphs, pp. 115–149, 2012b. + +- J.-Y. Cai, M. Furer, and N. Immerman. An optimal lower bound on the number of variables for graph identification. In 30th Annual Symposium on Foundations of Computer Science, pp. 612–617, 1989. doi: 10.1109/SFCS.1989.63543. + +- Zhengdao Chen, Soledad Villar, Lei Chen, and Joan Bruna. On the equivalence between graph isomorphism testing and function approximation with gnns. Advances in neural information processing systems, 32, 2019. + +- Zhengdao Chen, Lei Chen, Soledad Villar, and Joan Bruna. Can graph neural networks count substructures? Advances in neural information processing systems, 33:10383–10395, 2020. + +- Leonardo Cotta, Christopher Morris, and Bruno Ribeiro. Reconstruction for powerful graph representations. Advances in Neural Information Processing Systems, 34:1713–1726, 2021. + +10 + +David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Al´an Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. Advances in neural information processing systems, 28, 2015. + +- Wenqi Fan, Yao Ma, Qing Li, Yuan He, Eric Zhao, Jiliang Tang, and Dawei Yin. Graph neural networks for social recommendation. In The world wide web conference, pp. 417–426, 2019. + +- Jiarui Feng, Yixin Chen, Fuhai Li, Anindya Sarkar, and Muhan Zhang. How powerful are k-hop message passing graph neural networks. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL [URL removed] + +- Ronald Aylmer Fisher. Contributions to mathematical statistics. 1950. + +Ronald Aylmer Fisher. Statistical methods for research workers. Springer, 1992. + +- Fabrizio Frasca, Beatrice Bevilacqua, Michael Bronstein, and Haggai Maron. Understanding and extending subgraph gnns by rethinking their symmetries. Advances in Neural Information Processing Systems, 35:31376–31390, 2022. + +- Floris Geerts and Juan L. Reutter. Expressiveness and approximation properties of graph neural networks. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net, 2022. URL [URL removed] net/forum?id=wIzUeM3TAU. + +- Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006. + +- Harold Hotelling. The generalization of student’s ratio. In Breakthroughs in statistics: Foundations and basic theory, pp. 54–65. Springer, 1992. + +- Ningyuan Teresa Huang and Soledad Villar. A short tutorial on the weisfeiler-lehman test and its variants. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 8533–8537. IEEE, 2021. + +- Yinan Huang, Xingang Peng, Jianzhu Ma, and Muhan Zhang. Boosting the cycle counting power of graph neural networks with i$ˆ2$-gnns. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023. URL [URL removed] + +- Richard A. Johnson and Dean W. Wichern. Applied multivariate statistical analysis. Pearson Prentice Hall, Upper Saddle River, N.J, 6th ed edition, 2007. ISBN 978-0-13-187715-3. OCLC: ocm70867129. + +- Gregory Koch, Richard Zemel, Ruslan Salakhutdinov, et al. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2. Lille, 2015. + +- Pan Li, Yanbang Wang, Hongwei Wang, and Jure Leskovec. Distance encoding: Design provably more powerful neural networks for graph representation learning. Advances in Neural Information Processing Systems, 33:4465–4478, 2020. + +- Haggai Maron, Heli Ben-Hamu, Hadar Serviansky, and Yaron Lipman. Provably powerful graph networks. Advances in neural information processing systems, 32, 2019a. + +- Haggai Maron, Heli Ben-Hamu, Nadav Shamir, and Yaron Lipman. Invariant and equivariant graph networks. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019b. URL [URL removed] net/forum?id=Syx72jC9tm. + +- Christopher Morris, Martin Ritzert, Matthias Fey, William L Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In Proceedings of the AAAI conference on artifcial intelligence, volume 33, pp. 4602–4609, 2019. + +11 + +- Christopher Morris, Gaurav Rattan, and Petra Mutzel. Weisfeiler and leman go sparse: Towards scalable higher-order graph embeddings. Advances in Neural Information Processing Systems, 33:21824–21840, 2020. + +- Ryan Murphy, Balasubramaniam Srinivasan, Vinayak Rao, and Bruno Ribeiro. Relational pooling for graph representations. In International Conference on Machine Learning, pp. 4663–4673. PMLR, 2019. + +- P´al Andr´as Papp and Roger Wattenhofer. A theoretical comparison of graph neural network extensions. In International Conference on Machine Learning, pp. 17323–17345. PMLR, 2022. + +- P´al Andr´as Papp, Karolis Martinkus, Lukas Faber, and Roger Wattenhofer. Dropgnn: Random dropouts increase the expressiveness of graph neural networks. Advances in Neural Information Processing Systems, 34:21997–22009, 2021. + +- Chendi Qian, Gaurav Rattan, Floris Geerts, Mathias Niepert, and Christopher Morris. Ordered subgraph aggregation networks. Advances in Neural Information Processing Systems, 35:21030– 21045, 2022. + +- Ryoma Sato. A survey on the expressive power of graph neural networks. arXiv preprint arXiv:2003.04078, 2020. + +- Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5265–5274, 2018a. + +- Hongwei Wang, Fuzheng Zhang, Jialin Wang, Miao Zhao, Wenjie Li, Xing Xie, and Minyi Guo. Ripplenet: Propagating user preferences on the knowledge graph for recommender systems. In Proceedings of the 27th ACM international conference on information and knowledge management, pp. 417–426, 2018b. + +- Boris Weisfeiler and Andrei Leman. The reduction of a graph to canonical form and the algebra which appears therein. nti, Series, 2(9):12–16, 1968. + +- Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, Conference Track Proceedings. OpenReview.net, 2019. URL [URL removed] + +- Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform badly for graph representation? Advances in Neural Information Processing Systems, 34:28877–28888, 2021. + +- Jiaxuan You, Jonathan M Gomes-Selman, Rex Ying, and Jure Leskovec. Identity-aware graph neural networks. In Proceedings of the AAAI conference on artifcial intelligence, volume 35, pp. 10737–10745, 2021. + +- Bohang Zhang, Guhao Feng, Yiheng Du, Di He, and Liwei Wang. A complete expressiveness hierarchy for subgraph GNNs via subgraph weisfeiler-lehman tests. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 41019–41077. PMLR, 23–29 Jul 2023a. URL [URL removed] + +- Bohang Zhang, Shengjie Luo, Liwei Wang, and Di He. Rethinking the expressive power of gnns via graph biconnectivity. In The Eleventh International Conference on Learning Representations, 2023b. + +- Muhan Zhang and Pan Li. Nested graph neural networks. Advances in Neural Information Processing Systems, 34:15734–15747, 2021. + +- Lingxiao Zhao, Wei Jin, Leman Akoglu, and Neil Shah. From stars to subgraphs: Uplifting any GNN with local structure awareness. In International Conference on Learning Representations, 2022a. URL [URL removed] + +12 + +Lingxiao Zhao, Neil Shah, and Leman Akoglu. A practical, progressively-expressive gnn. Advances in Neural Information Processing Systems, 35:34106–34120, 2022b. + +- Jie Zhou, Ganqu Cui, Shengding Hu, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, Lifeng Wang, Changcheng Li, and Maosong Sun. Graph neural networks: A review of methods and applications. AI open, 1:57–81, 2020. + +## A DETAILS ON REGULAR GRAPHS + +In this section, we introduce the relationship between four types of regular graphs. The inclusion relations of them are shown in Figure 4, but their difficulty relations and inclusion relations are not consistent. + +**==> picture [199 x 113] intentionally omitted <==** + +**----- Start of picture text -----**
+4-Vertex Condition Graph
Strongly Regular Graph
Distance Regular Graph
Regular Graph
**----- End of picture text -----**
+ +Figure 4: Regular graphs relationship + +A graph is deemed a regular graph when all of its vertices possess an identical degree. If a regular graph, with _v_ vertices and degree _k_ , satisfies the additional conditions wherein any two adjacent vertices share _λ_ common neighbors, and any two non-adjacent vertices share _µ_ common neighbors, it is categorized as a strongly regular graph. Hence, it can be represented as srg( _v, k, λ, µ_ ), denoting its four associated parameters. + +Regular graphs and strongly regular graphs find wide application in expressiveness analysis. The difficulty of strongly regular graphs surpasses that of general regular graphs due to the imposition of additional requirements. Notably, the simplest strongly regular graphs with identical parameters (srg(16 _,_ 6 _,_ 2 _,_ 2)) are exemplified by the Shrikhande graph and the 4 _×_ 4-Rook’s graph, as depicted in Figure 2(c). + +Both 4-vertex condition graphs and distance regular graphs introduce heightened complexities, albeit in opposing directions. A 4-vertex condition graph is a strongly regular graph with an additional property that mandates the determination of the number of edges between the common neighbors of two vertices based on their connectivity. Conversely, distance regular graphs expand upon the definition of strongly regular graphs by specifying that for any two vertices _v_ and _w_ , the count of vertices at a distance _j_ from _v_ and at a distance _k_ from _w_ relies solely on _j_ , _k_ , and the distance between _v_ and _w_ . Notably, a distance regular graph with a radius of 2 is equivalent to a strongly regular graph. + +The 4-vertex condition graph has yet to be explored in previous research endeavors. Similarly, instances of distance regular graphs are relatively scarce and analyzing them through examples proves to be challenging. To encourage further research in these domains, we have incorporated them into BREC. + +## B NODE FEATURES + +In this section, we present the concept of node features and edge features in graphs. + +We commence by providing the definition of graphs using an adjacency matrix representation. Consider a graph where the node features are represented by a _dn_ -dimensional vector, and the edge features are represented by a _de_ -dimensional vector. This graph can be denoted as _G_ = ( **V** ( _G_ ) _,_ **E** ( _G_ )), where **V** ( _G_ ) _∈_ R _[n][×][d][n]_ represents the node features, and **E** ( _G_ ) _∈_ R _[n][×][n][×]_[(] _[d][e]_[+1)] represents the edge + +13 + +features, with _n_ being the number of nodes in the graph. The adjacency matrix of the graph is denoted as **A** ( _G_ ) _∈_ R _[n][×][n]_ = _E_ ( _G_ ): _,_ : _,_ ( _de_ +1), where **A** ( _G_ ) _i,j_ = 1 if ( _i, j_ ) _∈_ E( _G_ ) (i.e., if nodes _i_ and _j_ are connected by an edge), otherwise _A_ ( _G_ ) _i,j_ = 0. The feature of node _i_ is represented by _V_ ( _G_ ) _i,_ :, and the feature of edge ( _i, j_ ) is represented by _E_ ( _G_ ) _i,j,_ 1: _de_ . The permutation (or reindexing) of _G_ is denoted as _G[π]_ = ( **V** ( _G_ ) _,_ **E** ( _G_ )) with permutation _π_ : [ _n_ ] _→_ [ _n_ ], such that _V_ ( _G_ ) _i,_ : = _V_ ( _G_ ) _π_ ( _i_ ) _,_ : and _E_ ( _G_ ) _i,j,_ : = _E_ ( _G_ ) _π_ ( _i_ ) _,π_ ( _j_ ) _,_ :. + +Next, we explore the utilization of features. It is evident that incorporating node features during initialization and edge features during message passing can enhance the performance of GNNs, given appropriate hyperparameters and training. However, we should consider whether features can truly represent graph structures or provide additional expressiveness. Let us categorize features into two types. + +The first type involves fully utilizing the original features, such as distances to other nodes or spectral embeddings. While using these features can aid GNNs in solving Graph Isomorphism (GI) problems, this type of feature requires a dedicated design to effectively utilize them. For instance, if we aim to recognize a 6-cycle in a graph, we can manually identify the cycle and assign distinct features to each node within the cycle. In this way, the GNN can recognize the cycle by aggregating the six distinctive features. However, the injecting strategy influences expressiveness and requires further analysis. Utilizing distance can also enhance expressiveness but also need a suitable design (like subgraph distance encoding and SPD-WL). + +The second type entails incorporating additional features, such as manually selected node identifiers. it is important to note that this improvement stems from reduced difficulty rather than increased expressiveness. For instance, given a pair of non-isomorphic graphs with high similarity, we can manually find the components causing the distinguishing difficulty and assign identifiers to help models overcome them. However, this process is generally unavailable in practice. + +In summary, we can conclude that features have the potential to introduce expressiveness, but this should be accomplished through model design rather than relying solely on the dataset. In the case of BREC, a dataset created specifically for testing expressiveness, we do not include additional meaningful features. Instead, we employ the same vector for all node features and edge features and adhere to specific model settings to incorporate graph-specific features, such as the distance between nodes in distance encoding based models. + +## C WL ALGORITHM + +This section briefly introduces the WL algorithm and two high-order variants. + +The 1-WL algorithm, short for ”1-Weisfeiler-Lehman,” is an initial version of the WL algorithm. It serves as a graph isomorphism algorithm and can be employed to generate a distinctive label for each graph. + +In the 1-WL algorithm, every node in the graph maintains a state or color, which undergoes refinement during each iteration by incorporating information from the states of its neighboring nodes. As the algorithm progresses, the graph representation evolves into a multiset of node states, ultimately converging to a final representation. + +To circumvent these examples, researchers have devised a technique to augment each node in the 1-WL test, resulting in the development of the _k_ -WL test (Babai & Kucera, 1979; **?** ). The _k_ - dimensional Weisfeiler-Lehman test expands the scope of the test to consider colorings of k-tuples of nodes instead of individual nodes. This extension allows for a more comprehensive analysis of graph structures and assists in overcoming the limitations posed by certain examples. + +In addition to the _k_ -WL test, Cai et al. (1989) proposed an alternative WL test algorithm that also extends to _k_ -tuples. This variant is commonly referred to as the _k_ -FWL ( _k_ -folklore-WL) test. The _k_ -FWL test differs from the _k_ -WL test in terms of how neighbors are defined and the order in which aggregation is performed on tuples and multisets. + +There are three notable results associated with these tests: + +1 1-WL = 2-WL + +14 + +**==> picture [384 x 106] intentionally omitted <==** + +**----- Start of picture text -----**
+350 140 350
300 120 300
250 100 250
200 80 200
150 60 150
100 40 100
50 20 50
0 2 4 6 8 10 12 14 16 18 0 0 200 400 600 800 1000 0 2 4 6 8 10 12 14 16 18
#Diameter #Edges #Diameter
(a) #Nodes Distribution (b) #Edges Distribution (c) Diameter Distribution
Frequency Frequency Frequency
**----- End of picture text -----**
+ +Figure 5: BREC Statistics + +**==> picture [278 x 153] intentionally omitted <==** + +**----- Start of picture text -----**
+Manually setting
𝑻 𝑻 𝑻 𝑻 𝑻𝑻
Outputting results Isomorphic flag
procedureMajor Generating comparison resultsof external paired 𝟏𝟏 group 𝑻𝑻 Calculating [𝟐𝟐] -statistics by comparing 𝑻𝑻𝑻𝟐𝟐𝒕𝒕𝑻𝑻 𝒕𝒕𝑻 and 𝑻 𝑻𝑻 = 𝑻𝑻𝟐𝟐𝒕𝒕𝑻 𝒕𝒕 > 𝑻 𝑻 𝑻 𝑻 𝑻𝑻
confidence Adaptive Generatingof inner paired 𝟐𝟐𝑷𝑷 groups 𝟐𝟐𝑷𝑷 Calculating groups of 𝑻 𝑻 Setting 𝑻 𝑻 𝑻𝑻= GNN can distinguish 𝑮𝑮 and 𝑯𝑯 only when
interval comparison results 𝑻𝑻𝟐𝟐𝒓𝒓,𝒋𝒋 𝐦 𝐦𝐦 𝑻𝑻𝟐𝟐𝒓𝒓,𝒋𝒋 Reliability flag = True Isomorphic flag =
Outputting results
Reliability Generating 𝟏𝟏 group Calculating by comparing
check comparison resultsof inner paired 𝑻𝑻𝟐𝟐𝑻 𝑻𝑻𝒓 𝒓 𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓 𝑻𝑻𝟐𝟐𝑻𝑻 𝑻𝑻𝒓𝑻𝒓 𝑻𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓𝑻 and 𝑻𝑻 Reliability flag= 𝑻𝑻𝟐𝟐𝑻 𝑻𝑻𝒓 𝒓 𝑻𝑻𝒓𝒓𝒕𝒕𝒓𝒓 <
𝑻 𝑻 𝑻 𝑻 𝑻𝑻
**----- End of picture text -----**
+ +Figure 6: RAPC pipeline. + +2 _k_ -WL ¿ ( _k −_ 1)-WL, ( _k >_ 2) + +3 ( _k −_ 1)-FWL = _k_ -WL + +More details can be found in Sato (2020); Huang & Villar (2021). + +## D CIRCULANT SKIP LINKS (CSL) GRAPHS + +A CSL graph is defined as follows: Let _r_ and _m_ be co-prime natural numbers with _r < m −_ 1. _G_ ( _m, r_ ) = (V _,_ E) is an undirected 4-regular graph with V = [ _m_ ], where the edges form a cycle and include skip links. Specifically, for the cycle, ( _j, j_ + 1) _∈_ E for _j ∈_ [ _m −_ 1], and ( _m,_ 1) _∈_ E. For the skip links, the sequence is recursively defined as _s_ 1 = 1, _si_ +1 = ( _si_ + _r_ ) mod _m_ + 1, and ( _si, si_ +1) _∈_ E for any _i ∈_ N. Two Sample graphs with _m_ = 10 _, r_ = 2 _or_ 3 are shown in Fig 1(b). + +In the CSL dataset, 10 CSL graphs with _m_ = 41 and _r_ = 2 _,_ 3 _,_ 4 _,_ 5 _,_ 6 _,_ 9 _,_ 11 _,_ 12 _,_ 13 _,_ 16 are generated. Thus resulting in 10 non-isomorphic but 1-WL-indistinguishable graphs. + +## E BREC STATISTICS + +Here we give some statistics of the BREC dataset, shown in Figure 5. + +## F RAPC: A RELIABLE AND ADAPTIVE EVALUATION METHOD + +In this section, we propose RAPC with an additional stage called adaptive confidence interval based on RPC. Though RPC performs excellently in experiments with a general theoretical guarantee in reliability, with manually setting _α_ . We still want to make the procedure more automated. In addition, we found that the inner fluctuations of each pair, i.e. _T_ reliability[2][,][vary][from][pairs.][This] means some graph outputs are more stable than others, and their threshold can be larger than others. However, it is impossible to manually set the confidence interval ( _α_ ) for all pairs, thus, we propose + +15 + +an adaptive confidence interval method to solve this problem. The key idea is to set the threshold according to minimum internal fluctuations. + +Given a pair of non-isomorphic graphs _G_ and _H_ to be tested. For simplicity, we rename _G_ as _G_ 1, _H_ as _G_ 2. For each graph ( _G_ 1 and _G_ 2), we generate _p_ groups of graphs, with each group containing 2 _q_ graphs, represented by: + +**==> picture [264 x 11] intentionally omitted <==** + +Similarly, we can calculate _T_[2] -statistics for each group (2 _p_ groups in total): + +**==> picture [274 x 16] intentionally omitted <==** + +where + +**==> picture [357 x 64] intentionally omitted <==** + +Similar to major procedure, we can conduct an _α_ -level test of _H_ 0 : _δ_ = **0** versus _H_ 1 : _δ_ = **0** , it should always accept _H_ 0(the GNN cannot distinguish them) since the 2 _q_ graphs in each group are essentially the same. And _T_[2] -statistics should satisfy the: + +**==> picture [288 x 25] intentionally omitted <==** + +If the GNN can distinguish the pair, _T_ test[2][in major procedure and] _[ T]_[ 2] _i,j_[in adaptive confidence interval] should satisfy the: + +**==> picture [305 x 25] intentionally omitted <==** + +Thus we set the adaptive confidence interval as Threshold = Max _i∈{_ 1 _,_ 2 _}, p∈{_ 1 _,...,P }{Ti,p_[2] _[}]_[. Then we] conduct Major Procedure and Reliability Check based on Threshold similar to RPC. The pipeline is shown in Fig 6. + +In our analysis of the current evaluation method, we take into account the probabilities of false positives and false negatives. Typically, achieving extremely low levels of both probabilities simultaneously is challenging, and there is often a trade-off between them. However, since false positives can undermine the reliability of the methods, we prioritize establishing stringent bounds for this type of error. On the other hand, false negatives are explained in a more intuitive manner, acknowledging their presence but placing greater emphasis on minimizing false positives. + +Regarding false positives, we give the following theorem. + +**Theorem F.1** _The false positive rate with adaptive confidence interval is_ + +**==> picture [18 x 13] intentionally omitted <==** + +**Proof F.1** _We first define false positives more formally. False positives mean the GNN f cannot distinguish G and H, but we reject H_ 0 _and accept H_ 1 _. f cannot distinguish G and H means f_ ( _G_ ) = _f_ ( _H_ ) = _f_ ( _G[π]_ ) _∼N_ ( _**µ** G,_ **Σ** _G_ ) _. Since_ _**d** i in major procedure and_ _**d** i,j,k in adaptive confidence interval are derived from paired comparison by same function outputs, i.e., from f_ ( _G_ ) _and f_ ( _H_ ) _, and from f_ ( _G_ ) _and f_ ( _G[π]_ ) _, respectively._ _**d** i and_ _**d** i,j,k should follow the same distribution, leading that Ttest_[2] _[and][ T]_[ 2] _i,j[are independently random variables following the same distribution.][Thus][ P]_[(] _[T]_[ 2] _test[>] T_[2][1] _[Then we can calculate the probability of false positives as] i,j_[) =] 2 _[.]_ + +**==> picture [346 x 21] intentionally omitted <==** + +_Thus we proof theorem F.1._ + +Regarding false negatives, we propose the following explanation. A small threshold can decrease the false negative rate. Thus without compromising the rest of the theoretical analysis, we give the minimum value of the threshold. Equation 13 introduces a minimum threshold restriction. We obtain the threshold strictly based on it by taking the maximum value, which is the theoretical minimum threshold that minimizes the false negative rate. + +16 + +Table 3: A general theoretical expressiveness upper bound of subgraph with radius _k_ + +|Radius|1|2|3|4|5|6|7|8|9|10| +|---|---|---|---|---|---|---|---|---|---|---| +|#Accurate on BREC|252|298|300|327|326|385|398|398|399|400| + +Table 4: The performance of 3-WL with different iteration times + +|Iterations|1|2|3|4|5| +|---|---|---|---|---|---| +|#Accurate on BREC|193|209|217|264|270| + +## G SUBGRAPH GNNS + +In this section, we discuss settings for subgraph GNN models. The most important setting is the subgraph radius. As discussed before, a larger radius can capture more structural information, increasing the model’s expressiveness. However, it will include more invalid information, making reaching the theoretical upper bound harder. Thus we need to find a balance between the two. + +To achieve this, we first explore the maximum structural information that can be obtained under a given radius. Following Papp & Wattenhofer (2022), we implement _Nk_ method, which embeds the isomorphic type of _k_ -hop subgraph when initializing. This method is only available in the theoretical analysis as one can not solve the GI problem by manually giving graph isomorphic type. We mainly use it as a general expressiveness upper bound of subgraph GNNs. The performance of _Nk_ on BREC is shown in Table 3. Actually, _N_ 3 already successfully distinguishes all graphs except for CFI graphs. _k_ = 6 is an important threshold as _Nk_ outperforms 3-WL (expressiveness upper bound for most subgraph GNNs (Frasca et al., 2022; Zhang et al., 2023a)) in all types of graphs. An interesting discovery is that increasing the radius does not always lead to expressiveness increasing as expected. This is caused by the fact that we only encode the exact _k_ -hop subgraph instead of 1 to _k_ -hop subgraphs. This phenomenon is similar to subgraph GNNs, revealing the advantages of using distance encoding. + +We then test the subgraph GNNs’ radii by increasing them until reaching the best performance, which is expected to be a perfect balance. For some methods, radius= 6 is the best selection, which is consistent with the theory. The exceptions are NGNN, NGNN+DE, KPGNN, I[2] -GNN and SSWL ~~P~~ . NGNN directly uses an inner GNN to calculate subgraph representation, whose expressiveness is restricted by the inner GNN. As the subgraph radius increases, though the subgraph contains information, the simple inner GNN can hardly give a correct representation. That’s why radius= 1 is the best setting for NGNN. NGNN+DE and I[2] -GNN add distance encodings, making the subgraph with a large radius can always clearly extract a subgraph with a small radius. Therefore, a large radius= 8 is available. KPGNN utilizes a similar setting by incorporating distance to subgraph representation, and radius= 8 is also the best setting. KPGNN can also use graph diffusion to replace the shortest path distance. Though graph diffusion outperforms some graphs, the shortest path distance is generally a better solution. Previous findings reveal the advantages of using distance, which we hope can be more widely used in further research. SSWL ~~P~~ achieves better expressiveness with theoretical minimum components, making more information available. + +## H _k_ -WL HIERARCHY GNNS + +In this section, we discuss settings for _k_ -WL hierarchy GNN models. _k_ -WL algorithm requires a converged tuple embedding distribution for GI. However, _k_ -WL hierarchy GNNs do not have the definition of converging. It will output the final embeddings after a specific number of layers, i.e., the iteration times of _k_ -WL. Thus we need to give a suitable number of layers where the _k_ -WL converged after the number of iteration times. In theory, increasing the number of layers always leads to a non-decreasing expressiveness, since the converged distribution will not change furthermore. However, more layers may cause over-smoothing, leading to worse performance in practice. + +17 + +Table 5: Substructure-based model performance on BREC + +|Model|Basic Graphs (60)
Number
Accuracy|Regular Graphs (140)|Extension Graphs (100)|CFI Graphs (100)|Total (400)| +|---|---|---|---|---|---| +|||Number
Accuracy|Number
Accuracy|Number
Accuracy|Number
Accuracy| +|_S_3
_S_4|52
86.7%
60
100%|48
34.3%
99
70.7%|5
5%
84
84%|0
0%
0
0%|105
26.2%
243
60.8%| +|GSN-v(k=3)
GSN-v(k=4)
GSN-e(k=3)
GSN|52
86.7%
60
100%
59
98.3%
60
100%|48
34.3%
99
70.7%
48
34.3%
99
70.7%|5
5%
84
84%
52
52%
95
95%|0
0%
0
0%
0
0%
0
0%|105
26.2%
243
60.8%
159
39.8%
254
63.5%| + +Table 6: The performance of DropGNN with different sample numbers + +|#Samples|100|200|400|800|1200|1600| +|---|---|---|---|---|---|---| +|#Accurate on BREC|177|222|242|253|260|OOM| + +To keep a balance, we utilize similar methods for subgraph GNNs. We first analyze the iteration times of 3-WL, shown in Table 4. One can see 6 iteration times are enough for all types of graphs. Then we increase the layers of _k_ -WL GNNs until reaching the best performance. We finally set 5 layers for PPGN, 4 layers for KCSet-GNN and 6 layers for _δ_ -k-LGNN. + +## I SUBSTRUCTURE-BASED GNNS + +In this section, we discuss the performance of substructure-based GNN models. Specifically, we focus on the GSN (Graph Substructure Network) model proposed by Bouritsas et al. (2022), which offers a straightforward neural network implementation, denoted as GSN-v, of the _Sk_ substructure. Additionally, we introduce GSN-e, a slightly stronger version of GSN-v that incorporates features on edges instead of just nodes. + +Experimental results presented in Table 5 demonstrate that GSN-v achieves a perfect match with the performance of _Sk_ . Furthermore, GSN-e outperforms GSN-v, indicating superior performance when edge features are included. + +## J RANDOM GNNS + +In this section, we delve into the settings for random GNNs. Random GNNs leverage samples from graphs using specific strategies, and both the number of samples and the sampling strategies have an impact on performance. + +For DropGNN, the sampling strategy revolves around a relatively straightforward approach of deleting nodes. As for the number of samples, it is recommended to set it to the average number of nodes in the dataset. In our reported results, we set the number of samples to 100, which aligns with the average number of nodes. The ablation study results on the number of samples can be found in Table 6. + +Another approach, OSAN, proposes a data-driven method that achieves similar performance with fewer samples. This is achieved by training the model to select diverse samples. However, it requires an additional training framework and may not necessarily lead to improved performance. In our case, we select the edge-deleting strategy and set the number of samples to 20. + +## K EXPERIMENT SETTINGS + +All experiments were performed on a machine equipped with an Intel Core i9-10980XE CPU, an NVIDIA RTX4090 graphics card, and 256GB of RAM. + +18 + +Table 7: Model Hyperparameters + +|Model|Radius|Layers|Inner dim|Learning rate|Weight decay|Batch size|Epoch|Early stop threshold| +|---|---|---|---|---|---|---|---|---| +|NGNN|1|6|16|1_e −_4|1_e −_5|32|20|0.01| +|DE+NGNN|8|6|128|1_e −_4|1_e −_5|32|30|0.01| +|DS-GNN|6|10|32|1_e −_4|1_e −_5|32|30|0| +|DSS-GNN|6|9|32|1_e −_4|1_e −_4|32|20|0.01| +|SUN|6|9|32|1_e −_4|1_e −_4|32|20|0.01| +|SSWL
P|8|8|64|1_e −_5|1_e −_5|8|20|0.1| +|GNN-AK|6|4|32|1_e −_4|1_e −_4|32|10|0.1| +|KP-GNN|8|8|32|1_e −_4|1_e −_4|32|20|0.3| +|I2GNN|8|5|32|1_e −_5|1_e −_4|16|20|0.2| +|PPGN|/|5|32|1_e −_4|1_e −_4|32|20|0.2| +|_δ_-k-LGNN|/|6|16|1_e −_4|1_e −_4|16|20|0.2| +|KC-SetGNN|/|4|64|1_e −_4|1_e −_4|16|15|0.3| +|GSN|/|4|64|1_e −_4|1_e −_5|16|20|0.1| +|DropGNN|/|10|16|1_e −_3|1_e −_5|16|100|0| +|OSAN|/|8|64|1_e −_3|1_e −_5|16|40|0| +|Graphormer|/|12|80|2_e −_5|0|16|100|0| + +**RPC settings.** For non-GNN methods, the output results are uniquely determined, and as such, this part of the experiment does not require RPC. It is worth noting that most non-GNN baselines involve running graph isomorphism testing software on subgraphs, and they mainly serve as theoretical references in our evaluation. + +Regarding GNNs, we employ RPC with _q_ = 32 and _d_ = 16 to evaluate their performance. Considering a confidence level of _α_ = 0 _._ 95, which is a typical setting in statistics, the threshold should be set to[(] ( _[q] q[−] −_[1] _d_[)] ) _[d][F][d,q][−][d]_[(] _[α]_[) = 31] _[F]_[16] _[,]_[16][(0] _[.]_[95) = 72] _[.]_[34][.] + +To ensure robustness, we repeat all evaluation methods ten times using different seeds selected from the set _{_ 100 _,_ 200 _, . . . ,_ 1000 _}_ . We consider the final results reliable only if the model passes the Reliability check for all graphs with any seed, meaning that the quantification of the output embedding distance between isomorphic pairs is always smaller than the threshold. The reported results are selected as the best results rather than the average, as we aim to explore the upper bound of expressiveness. + +**Training settings.** We employ a Siamese network design and utilize the cosine similarity loss function. Another commonly used loss function is contrastive loss (Hadsell et al., 2006), which directly calculates the difference between two outputs. However, we opt for cosine similarity loss due to its advantage of measuring output difference under the same scale through normalization. This approach prevents model outputs from being excessively amplified, which could otherwise magnify minor precision errors and treat them as differentiated results of the model. + +We use the Adam optimizer with a learning rate searched from _{_ 1 _e −_ 3 _,_ 1 _e −_ 4 _,_ 1 _e −_ 5 _}_ , weight decay selected from _{_ 1 _e −_ 3 _,_ 1 _e −_ 4 _,_ 1 _e −_ 5 _}_ , and batch size chosen from _{_ 8 _,_ 16 _,_ 32 _}_ . Graphormer, on the other hand, follows the original training settings on ZINC. + +We incorporate an early stopping strategy, which halts training when the loss reaches a small value. While for random GNNs, we do not utilize early stopping. The maximum number of epochs is typically set to around 20 since the model can often distinguish a pair relatively quickly. + +**Model hyperparameters.** The most crucial hyperparameters related to expressiveness, such as the subgraph radius for subgraph GNNs and the number of layers for _k_ -WL hierarchy GNNs, are determined through theoretical analysis, as outlined in Appendix G and H. These hyperparameters have a direct impact on the expressiveness of the models. + +Other hyperparameters also implicitly influence expressiveness. We generally adopt the same settings as previous expressiveness datasets, with two exceptions: inner embedding dimension and batch normalization. + +The inner embedding dimension reflects the model’s capacity. For smaller and simpler expressiveness datasets used in the past, a small embedding dimension has been sufficient. However, the + +19 + +appropriate embedding dimension for BREC is unknown, so we generally conduct a search within the range of 16 _,_ 32 _,_ 64 _,_ 128. + +Additionally, we utilize batch normalization for all models, even though it may not have been used in all previous models. Batch normalization helps control the outputs within a suitable range, which can be beneficial for distinguishing graph pairs. + +The detailed hyperparameter settings for each method are provided in Table 7. + +## L GRAPH GENERATION + +In this section, we provide an overview of how the graphs in the BREC dataset were generated. + +**Basic graphs.** This category consists of 60 pairs of graphs, each containing 10 nodes. To generate these graphs, the 1-WL algorithm was applied to all 11.7 million graphs with 10 nodes, resulting in a hash value for each graph. Among these graphs, 83,074 happened to have identical hash values as others. From this set, 60 pairs of graphs were randomly selected. + +**Regular graphs.** This category includes 140 pairs of regular graphs. For the 50 simple regular graphs, the search was conducted for regular graphs with 6 to 10 nodes, and 50 pairs of regular graphs with the same parameters were randomly selected. For the 50 strongly regular graphs, the number of nodes ranged from 16 to 35. The graphs were obtained from sources such as [URL removed] es/srgraphs.php and [URL removed] bdm/data/graphs.html. For the 20 4-vertex condition graphs, a search was conducted on [URL removed] and the simplest 20 pairs of 4-vertex condition graphs with the same parameters were selected. For the 20 distance regular graphs, a search was performed on [URL removed] and the simplest 20 pairs of distance regular graphs with the same parameters were chosen. + +**Extension graphs.** This category consists of 100 pairs of graphs based on comparing results between GNN extensions. The _S_ 3, _S_ 4, and _N_ 1 algorithms were applied to all 1-WL-indistinguishable graphs with 10 nodes. This yielded 4,612 _S_ 3-indistinguishable graphs, 1,132 _N_ 1-indistinguishable graphs, and 136 _S_ 4-indistinguishable graphs. From these sets, 60 pairs of _S_ 3-indistinguishable graphs, 20 pairs of _N_ 1-indistinguishable graphs, and 10 pairs of _S_ 4-indistinguishable graphs were randomly selected. Care was taken to ensure that no graphs were repeated. Additionally, 10 pairs of graphs were added using a virtual node strategy, including 5 pairs obtained by adding a virtual node to a 10-node regular graph and 5 pairs based on _C_ 2 _l_ and _Cl,l_ as described in Papp & Wattenhofer (2022). + +**CFI graphs.** This category consists of 100 pairs of graphs generated based on the CFI methods proposed by Cai et al. (1989). All CFI graphs with backbones ranging from 3 to 7-node graphs were generated. From this set, 60 pairs of 1-WL-indistinguishable graphs, 20 pairs of 3-WLindistinguishable graphs, and 20 pairs of 4-WL-indistinguishable graphs were randomly selected. + +These different categories of graphs provide a diverse range of graph structures and properties for evaluating the expressiveness of GNN models. + +20 + diff --git a/open_review/iclr2024_8825.json b/open_review/iclr2024_8825.json new file mode 100644 index 0000000000000000000000000000000000000000..af936ed8e6255b4212f6b01f1367172d20c93671 --- /dev/null +++ b/open_review/iclr2024_8825.json @@ -0,0 +1,105 @@ +{ + "paper_id": "iclr2024_8825", + "source": "iclr2024", + "source_year": 2024, + "title": "MoAT: Multi-Modal Augmented Time Series Forecasting", + "abstract": "Time series forecasting plays a pivotal role in various domains, facilitating optimized resource allocation and strategic decision-making. However, the scarcity of training samples often hinders the accuracy of the forecasting task. To address this, we explore the potential of leveraging information from different modalities that are commonly associated with time series data. In this paper, we introduce MoAT, a novel multi-modal augmented time series forecasting approach that strategically integrates both feature-wise and sample-wise augmentation methods to enrich multi-modal representation learning. It further enhances prediction accuracy through joint trend-seasonal decomposition across all modalities and fuses the information for the final prediction. Extensive experiments show that MoAT outperforms state-of-the-art methods, resulting in a substantial reduction in mean squared error ranging from 6.5% to 71.7%, which demonstrates the effectiveness and robustness in addressing the limitations imposed by data scarcity. The datasets and code are available at https://anonymous.4open.science/r/MoAT-201E.", + "rebuttal": "### Text Decomposition (Common Response)\nWe acknowledge the feedback from the reviewers concerning the trend-seasonal decomposition of text data. In response to this feedback, we have made modifications to MoAT to enhance the clarity and effectiveness of text decomposition. Specifically, we modified the text aggregation function as:\n\n$\\text{Softmax}(\\text{tanh}(d_{ta:tb}W + b) p_{ta:tb})d_{ta:tb}$\n\nwhere $p_{ta:tb}$ is the time series patch embedding spanning from time ta to tb. Instead of utilizing a global query vector, we now incorporate the corresponding time series patch. This alteration allows for text aggregation based on the semantics of the time series. Notably, as the time series patch varies between trend and seasonal time series, texts are aggregated differently based on these distinctions. Our experimental results after the modification are as follows:\n\n| | Fuel | Metal | Bitcoin | Stock-Index | Covid | Stock-Tech |\n|------------|-------|-------|---------|-------------|-------|------------|\n| Previous | 0.0816| 0.0257| 0.0494 | 0.8134 | 0.1727| 0.1176 |\n| New | 0.0818| 0.0255| 0.0496 | 0.8131 | 0.1734| 0.1176 |\n\nOur experimental results indicate that the performance following this modification shows marginal changes from the attention pooling function. The ranks in Table 1 remain the same.\n\n### Dear Reviewer Moxw: Thank you for the reviews\nWe are grateful for the time and effort you have invested in offering constructive feedback.\n\n### Dear Reviewer kpLg: Thank you for the review\nWe appreciate your thoughtful comments. Here, we have attempted to respond to your concerns as outlined below.\n\n### Dear Reviewer roN3: Thank you for the review\nWe appreciate your thoughtful comments, and we have made an effort to address them below.\n\n### Dear Reviewer uJCG: Thank you for the review.\nWe appreciate your time and efforts in providing insightful comments. Below, we tried our best to address your concerns.\n\n### Response to the weakness and questions\n**C1. Text already contains a wealth of information, so using patching is unreasonable here.**\n\nAs the reviewer commented, text provides sufficient information at each timestep while time-series data does not. However, we would like to emphasize the necessity of patching texts in our architecture. Specifically, we aggregate text embeddings within corresponding time intervals as the time series patches. This alignment is particularly crucial for feature-wise augmentation, where we concatenate temporally aligned time series and text patches as input for [...]\n\n### Response to the weakness and questions\n**C1. It requires further clarification why the proposed textual decomposition components map to the trend and seasonality aspects of the time-series data.**\n\nWe acknowledge the reviewer's comment and modified the attention pooling function for texts by using time series patches as query vectors during the attention computation for text aggregation. From the modification, texts are aggregated differently based on the seasonal and trend time sereis patches. For more details, please refer to the common response above.\n\n**C2. The paper focuses on short-t [...]\n\n### Responses to the weakness\n**C1. This paper is mostly applied and combines several existing techniques, e.g., patch-wise embedding and pattern decomposition. The authors are expected to better position this work by clarifying the technical novelty, contribution, or new insights.**\n\nWe would like to emphasize the technical contributions and novel insights our work brings to both the multi-modal and time-series domains as follows:\n\n- We have reformulated existing augmentation techniques within the multi-modal domain, categorizing them into sample-wise (modality-specific) and feature-wise (mod [...]\n\n### Responses to the weakness and questions #1\n**C1. Lack of experiments assessing whether the model performs well with scarce data.**\n\nWe would like to highlight that it is common in real-world scenarios to encounter time series datasets with a limited number of data samples or lengths, like the datasets collected for this study. Thus, our experimental results demonstrate the effectiveness of MoAT, in scenarios where datasets exhibit scarce time series information.\n\n**C2. Lack of details in the caption of the T-SNE decomposition between time series and texts.**\n\nWe apologize for the lack of c [...]\n\n### Responses to the weakness and questions #2\n**C9. Is the forecasting in Figure 5 autoregressive?**\n\nThe experiments are conducted in an autoregressive manner, as correctly mentioned by the reviewer.\n\n**C10. The motivation for offline prediction synthesis discusses improved parameter efficiency, but parameter efficiency is not discussed in the rest of the paper. Why is modularity desirable in this setting?**\n\nOur intention was not to claim that modularity is desirable in our setting but rather to mention its importance in the referred paper. We apologize for any confusion caused and will mak [...]\n\n### Thank you for the reviews\nWe deeply appreciate the valuable time and effort invested by the reviewers in thoroughly assessing our work. Their insightful feedback and comments have been instrumental in shaping and improving our research.", + "initial_scores": [ + 5, + 5, + 5, + 5 + ], + "score_mean": 5.0, + "score_variance": 0, + "score_spread": 0, + "score_min": 5, + "score_max": 5, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "This paper studies a new application of time series forecasting by augmenting with text data. Paper received negative reviews initially, while the rebuttal did not convince the reviewers sufficiently. In a nutshell, the introduction of the new dataset is useful, while it is well motivated from an application perspective to include other modalities to enhance time series forecasting tasks. However, the concerns still held by the reviewers after rebuttal are well grounded. The paper is insufficient in technical contribution and empirical insights. The benefit from the text modality is not pronounced. The performance benefit mainly comes from combining well-established methods such as patchify and decomposition.", + "forum_id": "uRXxnoqDHH", + "primary_area": "representation learning for computer vision, audio, language, and other modalities", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_uJCG", + "review_id": "ZwaSqIt9LR", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 2571, + "edit_detected": true, + "edit_delta_seconds": 1666910, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_Moxw", + "review_id": "tcG39ZCsCx", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 3746, + "edit_detected": true, + "edit_delta_seconds": 866783, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_kpLg", + "review_id": "WoWrJQ57mE", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 1830, + "edit_detected": true, + "edit_delta_seconds": 1278393, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [ + { + "from": 96, + "to": 712 + } + ] + }, + { + "reviewer": "Reviewer_roN3", + "review_id": "scYQdxMqhi", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 3342, + "edit_detected": true, + "edit_delta_seconds": 1939581, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8825.md b/open_review/iclr2024_8825.md new file mode 100644 index 0000000000000000000000000000000000000000..fcf18f3815b4ce6533d4f0abcff45759be201092 --- /dev/null +++ b/open_review/iclr2024_8825.md @@ -0,0 +1,527 @@ + + +## MOAT: MULTI-MODAL AUGMENTED TIME SERIES FORECASTING + +Authors withheld for review + +## ABSTRACT + +Time series forecasting plays a pivotal role in various domains, facilitating optimized resource allocation and strategic decision-making. However, the scarcity of training samples often hinders the accuracy of the forecasting task. To address this, we explore the potential of leveraging information from different modalities that are commonly associated with time series data. In this paper, we introduce MoAT, a novel multi-modal augmented time series forecasting approach that strategically integrates both feature-wise and sample-wise augmentation methods to enrich multi-modal representation learning. It further enhances prediction accuracy through joint trend-seasonal decomposition across all modalities and fuses the information for the final prediction. Extensive experiments show that MoAT outperforms state-of-the-art methods, resulting in a substantial reduction in mean squared error ranging from 6.5% to 71.7%, which demonstrates the effectiveness and robustness in addressing the limitations imposed by data scarcity. The datasets and code are available at [URL removed] r/MoAT-201E. + +## 1 INTRODUCTION + +Time series forecasting is a fundamental task with widespread applications across various domains, including finance, healthcare, energy management, and environmental monitoring (Sawhney et al., 2020; Chou & Tran, 2018; Ong et al., 2016). Accurate time series forecasting is essential for making informed decisions, optimizing resource allocation, and enhancing strategic planning. Notable progress has been achieved by various time series forecasting models (Wu et al., 2021; Zhou et al., 2022b; Nie et al., 2022; Zhang & Yan, 2022) following recent advancements in deep learning. However, in numerous scenarios, time-series data suffer from a scarcity of training samples, posing significant challenges in predicting future trends (Zhou et al., 2022c). Recall the COVID-19 outbreak, where accurate predictions of confirmed cases, fatalities, and recoveries were crucial in public health responses and resource allocation. Nevertheless, due to the limited amount of data available at the time, it was extremely challenging to make reliable predictions about future epidemic occurrences solely from time-series data, despite its critical importance (Gothai et al., 2021). + +To address this limitation, leveraging the information from other modalities that associated with time series data emerges as a potential solution. For example, within the healthcare domain, clinical notes have been used to enhance the accuracy of predicting patient mortality (Deznabi et al., 2021; Yang et al., 2021). In the financial domain, leveraging text data from social media has proven to be effective in enhancing the accuracy of predicting individual stock movements (Du & Tanaka-Ishii, 2020; 2022; Sawhney et al., 2020). Another motivative example is evident in Fig. 1 which provides a visual representation of how distinct data modalities can shed light on similar dynamics. We can observe two prominent drops in the time series data marked as 1 and 2 in Fig. 1a, which correspond to significant changes in the similarity of text embeddings depicted in Fig. 1b. Expanding the scope of the training dataset becomes possible when taking into account both data sources, as shown in a 2D space in Fig. 1c. These findings suggest the potential of using text data to enhance the precision of time series forecasting. + +The aforementioned studies that aid the time-series modeling by exploiting knowledge from other modalities, mostly from text data, can be formulated as data augmentation which is widely used to improve the model performance by enlarging the distribution covered by training dataset (Qin et al., + +1 + +**==> picture [376 x 121] intentionally omitted <==** + +**----- Start of picture text -----**
+① ①
②
②
(a) Visualization of stock price time (b) Similarity heatmap of financial (c) Visualization of the aug-
series data news embedding mented training data
**----- End of picture text -----**
+ +Figure 1: (a) Visualization of the Stock-Index dataset’s time series data used in this study; (b) Corresponding similarity heatmap of financial news embedding, and (c) Visualization of the augmented training dataset. In the time series plot (a), there are two noticeable drops indicated by circled 1 and 2, which coincide with significant changes in text embedding similarity shown in (b). While these two data modalities are synchronized in time, they offer distinct information, as illustrated in a 2D space using t-SNE (c), thereby expanding the coverage of the training dataset. + +**==> picture [394 x 114] intentionally omitted <==** + +**----- Start of picture text -----**
+Trend Part
Global energy
consumption is …
Time Series
Seasonal Part
Major Oil-Producing Nations Predictions
Announce Supply Cut, Fuel
Prices Expected to Rise
Text Winter heating oil
demand is …
$ !"#
𝐖
Decoder
% !"#
𝐖
Cross-Modal Fusion
Trend-Seasonal Decomposition
Multi-Modal Augmented Encoder Decoder
**----- End of picture text -----**
+ +Figure 2: The architecture of MoAT. Time series and text data are jointly decomposed into trend and seasonal components. These components are fed to the multi-modal augmented encoder which incorporates both sample-wise and feature-wise multi-modal data augmentation. The resulting outputs are decoded using component-specific decoders. Finally, the predictions for trend and seasonality are combined through a cross-modal fusion scheme to generate the final predictions. + +2020; Zhou et al., 2022a; Baltruˇsaitis et al., 2018). Data augmentation can be approached from two distinct angles, each offering unique benefits. The first method involves sample-wise augmentation, treating samples originating from different modalities as additional training examples (Xing et al., 2019; Pahde et al., 2021; Lin et al., 2023). The second method integrates supplementary information from diverse modalities into each individual sample (Sun et al., 2019; Guo et al., 2020; Zheng et al., 2021; Shi et al., 2021). Each approach improves model performance and robustness in its distinct way. This motivates us to strategically integrate both augmentation techniques, allowing us to leverage the unique advantages offered by both augmentation approaches. + +Notably, the aforementioned studies utilizing text data for time series tasks have primarily concentrated on classification tasks (e.g., predicting whether a patient will survive or not, or the trend of stock movements). In this work, we present MoAT, a general multi-modal augmented framework designed to enhance forecasting accuracy by integrating information from various sources. Illustrated in Fig. 2, our approach comprises three main components: multi-modal augmentation, cross-modal fusion, and trend-seasonal decomposition. The augmentation encoder integrates both sample-wise and feature-wise multi-modal data augmentation techniques to enhance the quality and diversity of the training data. The resulting outputs are decoded using component-specific decoders. MoAT then facilitates the fusion of decoded representations from different modalities, enabling a more comprehensive understanding of the underlying processes governing time series behavior. To further enhance its capabilities, MoAT incorporates a joint trend-seasonal decomposition module, which generates distinct embedding to capture trend and seasonal dynamics from both time series and text information. Through extensive experiments, MoAT demonstrates substantial improvements, achieving a 6.5%-71.7% reduction in mean square error (MSE). In summary, this paper makes the following contributions: + +- We introduce MoAT, a multi-modal augmented time series forecasting framework that addresses data scarcity issues by employing both sample-wise and feature-wise multi-modal augmentation and cross-modal fusion to enhance training data quality and diversity. + +2 + +- MoAT further enhances forecasting accuracy through joint trend-seasonal decomposition module, which extracts distinct embedding to capture trend and seasonal patterns from both time series and text information. + +- Extensive experiments on six multi-modal datasets confirm the effectiveness and robustness of our proposed model. Furthermore, we release all compiled multi-modal time series datasets[1] to facilitate further research in this domain. + +## 2 RELATED WORK + +**Time series forecasting.** Given its significant importance, time series forecasting has been extensively researched over a long period. In its early stages, classical deep learning methods were commonly applied. For example, TCN (Lea et al., 2017) uses CNN, and DeepAR (Salinas et al., 2020) utilizes RNN to capture temporal dependencies within time series. In addition, LSTnet (Lai et al., 2018) integrates both CNN and RNN in its approach. Recently, inspired by the success of Transformers (Vaswani et al., 2017) in various domains, including natural language processing (NLP) (Devlin et al., 2019), computer vision (CV) (Dosovitskiy et al., 2020), and speech processing (Dong et al., 2018), they have been actively used for time series forecasting. Informer (Zhou et al., 2021) is based on an efficient ProbSparse self-attention for capturing cross-time dependencies. Autoformer (Wu et al., 2021) uses time series decomposition and auto-correlation to forecast time series. FEDformer (Zhou et al., 2022b) uses Fourier or wavelet transforms to apply attention in the frequency domain. Despite these advancements, comparative evaluations have shown that these methods can be outperformed by DLinear (Zeng et al., 2023), a very simple linear model, shedding light on the limitations of Transformer-based time series forecasting models. However, this claim is contradicted by recent patch-level (or segment-level) Transformer models. Inspired by the effectiveness of patching in NLP (Devlin et al., 2019) and CV (Dosovitskiy et al., 2020; Bao et al., 2021), PatchTST (Nie et al., 2022) and Crossformer (Zhang & Yan, 2022) employ time series patches as the input for the Transformer encoder. Utilizing time series patching allows the model to capture temporal dependencies beyond individual data points, facilitating a comprehensive understanding of time series patterns and leading to more accurate forecasting. + +**Multi-modal data augmentation.** Data augmentation is widely used to improve the model performance by enlarging the distribution covered by training data. An extensive literature on uni-modal data augmentation exists across diverse domains including images (Shorten & Khoshgoftaar, 2019), texts (Feng et al., 2021), and time series Wen et al. (2021). Here, we summarize the augmentation methods applied to multi-modal datasets, which aggregate data from multiple distinct sources. One approach involves incorporating additional training samples from different modalities, which is especially beneficial when the specific modality of interest has limited available data. This can be achieved by simply using samples from other modalities as extra training data (Lin et al., 2023; Pahde et al., 2021), or by generating synthetic training samples through transformations from multiple sources (Hao et al., 2023). An alternative and orthogonal approach is to enrich the information within each sample by integrating additional data from different modalities. A simple and direct method is to concatenate features from multiple modalities and feed them collectively into the Transformer encoder, allowing for cross-modal learning (Sun et al., 2019; Zheng et al., 2021; Shi et al., 2021). In summary, + +- **Sample-wise augmentation** in multi-modal data treats samples originating from different modalities as additional samples to train the model (Xing et al., 2019; Pahde et al., 2021; Lin et al., 2023). This approach is particularly advantageous when different modalities contribute complementary information, each capturing unique aspects of the underlying concept. For example, incorporating samples from text data can assist in clarifying the decision boundary of the image classifier. + +- **Feature-wise augmentation** integrates additional information from different modalities into each sample (Sun et al., 2019; Guo et al., 2020; Zheng et al., 2021; Shi et al., 2021). Enriching each sample by incorporating features from diverse sources enables the model to understand complex relationships and patterns within the data, leading to more accurate predictions or classifications. For example, concatenating text features with image features can assist in adjusting the weights of the image classifier. + +> 1[URL removed] + +3 + +**Multi-modal for time series.** Additional information, mostly in textual data, has been leveraged to solve time series tasks, primarily within specific domains. For example, within the healthcare domain, clinical notes have been used to enhance the accuracy of predicting patient mortality (Deznabi et al., 2021; Yang et al., 2021) or to optimize the management of patients’ ICU stays (Khadanga et al., 2019). In the financial domain, leveraging text data from social media has proven to be effective in enhancing the accuracy of predicting individual stock movements (Du & Tanaka-Ishii, 2020; 2022; Sawhney et al., 2020). Importantly, previous studies that utilize text data for time series tasks have primarily concentrated on classification tasks (e.g., predicting whether a patient will survive or not, or whether the stock price will increase or decrease the following day), differing from our specific focus on forecasting. In this work, we propose MoAT, a general time series forecasting model that integrates text information to enhance prediction accuracy. + +## 3 PROPOSED METHOD + +We propose MoAT, a multi-modal time series forecasting model that leverages information from different modalities to improve the accuracy of the forecasting task, as illustrated in Fig. 2. + +## 3.1 PROBLEM STATEMENT + +The problem of multivariate time series forecasting is defined as predicting the future _T_ steps of time-series values **X** = ( _xL_ +1 _, ..., xL_ + _T_ ) _∈_ R _[T][ ×][C]_ , based on the past _L_ steps of time series data **Y** = ( _x_ 1 _, ..., xL_ ) _∈_ R _[L][×][C]_ , where _C_ represents the dimension or the number of channels of the time series data. At each historical time step _t_ = 1 _, ..., L_ , there is a set _Dt_ = _{Dt,_ 1 _, ..., Dt,|Dt|}_ of data available from other modalities, which has the potential to improve forecasting accuracy. + +## 3.2 MOAT: MULTI-MODAL AUGMENTED TIME SERIES FORECASTING + +Here, we describe our framework for time-series forecasting using text data as an example. This approach can readily be expanded to include other modalities such as image and audio data. + +**Patch-wise embedding.** Beyond point-wise, analyzing time series data at the segment level provides richer insights for understanding its underlying dynamic patterns. For example, when examining stock price movements, it becomes crucial to analyze how prices change over time, rather than focusing on the individual price on a specific day. The effectiveness of patching time series data has been well-demonstrated, particularly in transformer-based forecasting models (Nie et al., 2022; Zhang & Yan, 2022), and thus MoAT also adopts this approach. In our approach, we represent both time series and text as an identical number of patches, as described below. + +To patch **time series** _**x**_[(] _[i]_[)] = ( _x_[(] 1 _[i]_[)] _[, ..., x]_[(] _L[i]_[)][)] _[∈]_[R] _[L]_[of][the] _[i]_[-th][channel,][we][segment][it][into][multiple] (non-)overlapping patches. Precisely, given the patch length _P_ and the stride _S_ , we segment _**x**_[(] _[i]_[)] into _N_ patches, each of length _P_ , denoted as **p**[(] _[i]_[)] = ( **p**[(] 1 _[i]_[)] _[, ...,]_ **[ p]**[(] _N[i]_[)][)] _[ ∈]_[R] _[N][×][P]_[where two consecutive] patches share _S_ values. Here, the number _N_ of patches is _⌊[L][−] S[P][⌋]_[+ 2][ if we pad the last value of the] time series _S_ times before patching. Then, we map these patches into a _d_ -dimensional latent space using a learnable linear projection **W** time _∈_ R _[P][ ×][d]_ , i.e., **z**[(] time _[i]_[)][=] **[ p]**[(] _[i]_[)] **[W]**[time] _[∈]_[R] _[N][×][d]_[.] + +To patch **text data** , we require a different approach due to the variability in the number of texts and their unordered nature at each timestep. Specifically, we are given a sequence _D_ = ( _D_ 1 _, ..., DL_ ) of sets of documents, where at each timestep _t_ , we have a set _Dt_ = _{Dt,_ 1 _, ..., Dt,|Dt|}_ of an arbitrary number of texts. Firstly, we use the pretrained language model (denoted as “PLM” below) to represent each text _Dt,j_ as a _d[′]_ -dimensional embedding vector, i.e., _**d** t,j_ = PLM( _Dt,j_ ) _∈_ R _[d][′]_ . This yields an embedding matrix _**d** t_ = [ _**d** t,_ 1 _, ...,_ _**d** t,|Dt|_ ] _∈_ R _[|D][t][|×][d][′]_ of texts at each timestep _t_ . + +Following the segmentation approach similar to that of the time series, we segment text data into multiple patches, each spanning _P_ timesteps. To represent a text patch covering the time span from _ta_ to _tb_ , where _tb − ta_ + 1 = _P_ , our goal is to aggregate text embeddings within this interval into a single embedding. To this end, we collect text embeddings spanning from _ta_ to _tb_ , _**d** ta_ : _tb_ = _**d** ta ⊕· · · ⊕_ _**d** tb ∈_ R _[|D][ta]_[:] _[tb][|×][d][′]_ , where _⊕_ is the vertical concatenation operation. Since various documents may hold different degrees of significance, we apply attentive pooling to aggregate their + +4 + +**==> picture [396 x 114] intentionally omitted <==** + +**----- Start of picture text -----**
+ℝ [!#] 𝑧̂!"#$,&' 𝑧̂!$(!,&' 𝑧̃!"#$,&' 𝑧̃!$(!,&' 𝑧̂!"#$,)' 𝑧̂!$(!,)' 𝑧̃!"#$,)' 𝑧̃!$(!,)' Prediction Synthesis
Flatten (Offline)
① ② Multi-Modal Augmented Encoder ③ ④ ⑤ ⑥ 𝜆! … 𝜆" … 𝜆#
ℝ [!×#] … …
Patching
Global energy … Winter heating … Cross-Fusion
Trend Part Seasonal Part
Sample-wise Augmentation Feature-wise Augmentation Trend Part Predictions ℝ [$] Seasonal Part Predictions ℝ [$]
(a) Multi-modal augmented encoder (b) Cross-modal fusion and offline synthesis
**----- End of picture text -----**
+ +Figure 3: Key components of MoAT. (a) The multi-modal augmented encoder is utilized across six distinct input patches, labeled 1 to 6, which are obtained by augmenting multi-modal inputs either in a sample-wise or feature-wise manner. Note that inputs 1 to 6 are processed independently with the shared encoder. (b) Using the eight different representations derived from trend and seasonal components, MoAT generates multiple predictions through cross-fusion. These predictions are then aggregated to generate the final prediction using an offline synthesis approach. + +embeddings while assigning varying weights as follows: + +**==> picture [308 x 19] intentionally omitted <==** + +where **W**[(] _[i]_[)] _∈_ R _[d][′][×][d]_ , _**b**_[(] _[i]_[)] _∈_ R _[d]_ , and **V**[(] _[i]_[)] _∈_ R _[d][×][d]_ are learnable weights specific to the _i_ -th channel. It is important to note that we utilize channel-specific parameters when applying attention, which enables us to generate text patches that are unique to each channel. Consider financial markets as an example, where the importance and relevance of documents can vary for different stocks or companies. After mapping the patches into a _d_ -dimensional latent space using a trainable linear projection **W** text _∈_ R _[d][′][×][d]_ , we obtain embeddings of text patches **z**[(] text _[i]_[)] _[∈]_[R] _[N][×][d]_[of the] _[ i]_[-th channel.] These patch embeddings temporally align with the time series patches, **z**[(] time _[i]_[)][.] + +**Multi-modal augmented encoder.** Now that we have obtained patch embeddings, **z**[(] time _[i]_[)][for][time] series and **z**[(] text _[i]_[)][for][text][data,][in][the] _[i]_[-th][channel,][we][proceed][to][feed][them][into][the][shared][encoder] illustrated in Fig. 3a. In this step, we leverage multi-modal data augmentation strategies from two distinct angles, each providing unique benefits, all with a common goal of forecasting time series. + +Commonly, we introduce modality-specific learnable positional embeddings **W** time[pos] _[∈]_[R] _[N][×][d]_[and] **W** text[pos] _[∈]_[R] _[N][×][d]_[for time series and text, respectively.][In addition, we employ a vanilla Transformer] encoder (denoted as “Encoder” below) equipped with multi-head attention. The encoder yields patch representations equivalent to the number of input patches, and we assume that these representations are then flattened into a single embedding vector. + +To employ the **sample-wise augmentation** , we use embeddings from the two modalities as independent training samples. Specifically, we pass them separately to the shared encoder, preventing any explicit interactions between patches across modalities: + +**z** ˆtime[(] _[i]_[)][=][ Encoder] **z**[(] time _[i]_[)][+] **[ W]** time[pos] _∈_ R _[Nd]_ and **z** ˆ[(] text _[i]_[)][=][ Encoder] **z**[(] text _[i]_[)][+] **[ W]** text[pos] _∈_ R _[Nd]_ (2) � � � � As a result, the encoder processes twice the number of training samples, enriching diversity within the training data, which potentially improves generalization and robustness in the model. We refer to these embeddings as _single-modal_ representations as they originate from individual modalities. + +To employ the **feature-wise augmentation** , we feed the encoder with the concatenated embeddings derived from time series and text, allowing cross-modal interactions across modalities: + +**==> picture [317 x 19] intentionally omitted <==** + +where _∥_ is the concatenation operator. Note that, since the input comprises of 2 _N_ patches, the output ˆ **z**[(] joint _[i]_[)][is the concatenation of][ 2] _[N]_[patches.][We subsequently split it into two halves to obtain] **z** ˜[(] time _[i]_[)] _[∈]_[R] _[Nd]_[ and][ ˜] **[z]** text[(] _[i]_[)] _[∈]_[R] _[Nd]_[, i.e.,][ ˆ] **[z]**[(] joint _[i]_[)][= ˜] **[z]**[(] time _[i]_[)] _[∥]_ **[z]**[˜] text[(] _[i]_[)][.][We refer to these embeddings as] _[ cross-modal]_ representations as they result from joint interactions across patches from different modalities. + +_**Remarks.**_ Our multi-modal augmented encoder yields two distinct types of representations, singlemodal (i.e., modality-specific) and cross-modal (i.e., modality-fused), each contributing unique information. While most existing works tend to utilize either one of these aspects (Lin et al., 2023; + +5 + +Shi et al., 2021), MoAT leverages both perspectives of the multi-modal data, which strategically broadens its learning spectrum. In addition, the usefulness of these representations may vary across datasets, and in the subsequent descriptions, we describe how MoAT adaptively utilizes them to achieve accurate time series forecasting. + +**Joint trend-seasonal decomposition.** This technique is one of the most valuable techniques for improving the predictability of raw time series data (Cleveland et al., 1990; Hamilton, 2020). Notably, recent forecasting models have incorporated time series decomposition into their frameworks due to its effectiveness (Wu et al., 2021; Zhou et al., 2022b; Zeng et al., 2023). Specifically, the seasonaltrend decomposition employs a moving average kernel on the input time series to extract the _trendcyclic_ component of the data. Then, the _seasonal_ component is derived as the difference between the original input time series and the extracted trend component. Inspired by its effectiveness, we enhance the method by employing time series decomposition. + +To decompose **time series** , we use the seasonal-trend decomposition to yield trend part _**x**_[(] T _[i]_[)] and seasonal part _**x**_[(] S _[i]_[)][, each of which explain different aspects of the time series.][From each component,] we compute patch embeddings **z**[(] time,T _[i]_[)][and] **[ z]**[(] time,S _[i]_[)][using the aforementioned approach.] To decompose **text data** , we employ two distinct and independent sets of attention parameters, _θ_ T[(] _[i]_[)] = _{_ **W** T[(] _[i]_[)] _[,]_ _**[ b]**_[(] T _[i]_[)] _[,]_ **[ V]** T[(] _[i]_[)] _[}]_[and] _[θ]_ S[(] _[i]_[)] = _{_ **W** S[(] _[i]_[)] _[,]_ _**[ b]**_[(] S _[i]_[)] _[,]_ **[ V]** S[(] _[i]_[)] _[}]_[in][Eq.][6][to][obtain][aggregated][text][em-] beddings for trend and seasonal components, respectively. This allows us to derive distinguished embeddings for capturing trend and seasonal dynamics from text information, highlighting documents differently. From each set of text embeddings, we derive two distinct sets of text patches, **z**[(] text,T _[i]_[)][and] **[ z]**[(] text,S _[i]_[)][, representing trend-related and seasonal-related text information, respectively.] Once we obtain two sets of patch embeddings, **z**[(] time,M _[i]_[)][and] **[ z]**[(] text,M _[i]_[)][, for each component M] _[∈{]_[T] _[,]_[ S] _[}]_[,] we utilize the shared multi-modal augmented encoder described above. As shown in Fig. 3a, we feed time series and text patches from each component independently into the shared encoder, resulting in the following two sets, **Z**[(] T _[i]_[)][and] **[ Z]**[(] S _[i]_[)][, of representations:] + +ˆ ˆ **Z**[(] T _[i]_[)] = _{_ **z**[(] time,T _[i]_[)] _[,]_[ ˆ] **[z]** text,T[(] _[i]_[)] _[,]_[ ˜] **[z]**[(] time,T _[i]_[)] _[,]_[ ˜] **[z]** text,T[(] _[i]_[)] _[}]_ and **Z**[(] S _[i]_[)] = _{_ **z**[(] time,S _[i]_[)] _[,]_[ ˆ] **[z]**[(] text,S _[i]_[)] _[,]_[ ˜] **[z]**[(] time,S _[i]_[)] _[,]_[ ˜] **[z]**[(] text,S _[i]_[)] _[}]_ (4) These representations originate from either single-modal or cross-modal inputs, granting us four unique information for both trend and seasonal components. This notably enriches the variety of training samples that the decoder can utilize to predict future time series. + +**Multi-modal cross fusion.** Since we have decomposed the data into its trend and seasonal components, the next step involves recombining them to generate predictions. While a straightforward approach would be combining corresponding representations from **Z**[(] T _[i]_[)] and **Z**[(] S _[i]_[)] (e.g., combining **z** ˆ[(] time,T _[i]_[)][and][ ˆ] **[z]** time,S[(] _[i]_[)][or][ ˜] **[z]**[(] text,T _[i]_[)][and][ ˜] **[z]** text,S[(] _[i]_[)][) to yield four predictions, we propose to use a richer strategy.] Instead of limiting the combinations to the corresponding pairs, we propose to aggregate all possible combinations of representations from **Z**[(] T _[i]_[)][and] **[ Z]**[(] S _[i]_[)] as shown in Fig. 3b. Thus, we minimize: + +**==> picture [314 x 32] intentionally omitted <==** + +where **W** dec[T] _[∈]_[R] _[Nd][×][T]_[and] **[ W]** dec[S] _[∈]_[R] _[Nd][×][T]_[are the single-layer linear decoders for the trend and] seasonal representations, respectively. The overall loss _L_ is computed by the average of the _C_ individual losses from the _C_ channels, i.e., _L_ = _C_ 1 � _L_[(1)] + _..._ + _L_[(] _[C]_[)][�] . This approach yields a total of 16 different combinations, each contributing to a distinguished prediction. Predicting from a wider range of representation combinations allows us to unravel a comprehensive understanding of the interplay between the trend and seasonal components. _**Discussion 1: How is multi-modality fused?**_ To improve forecasting accuracy by integrating various modalities, it is essential to effectively fuse the information acquired from these sources. Initially, an _implicit fusion_ of time series and text occurs in Eq. 3 by jointly passing patches from both modalities to the shared Transformer encoder, enabling cross-modal interactions among them. Cross-fusion, on the other hand, is an _explicit fusion_ approach aimed at facilitating interactions between these modalities. By systematically combining all feasible pairs from **Z**[(] T _[i]_[)] and **Z**[(] S _[i]_[)] to make predictions, this approach explicitly considers all potential cross-modal fusions. + +6 + +Table 1: Time series forecasting accuracy (in terms of MSE) in six real-world datasets. With effective integration of text information, MoAT provides the most accurate predictions for future time series. The best results are in **bold** and the second best are underlined. The average improvements (%) and ranks are reported on the right. + +|Method|Fuel|Metal|Bitcoin|Stock-Index|Covid|Stock-Tech|Improv.
Rank| +|---|---|---|---|---|---|---|---| +|LightTS
DLinear
Autoformer
FEDformer
Pyraformer
Crossformer
PatchTST|0.1930 _±_0.0828
0.1916 _±_0.0346
0.1599 _±_0.0266
0.1088 _±_0.0151
0.1366 _±_0.0289
0.0962 _±_0.0049
0.0913 _±_0.0055|0.1829 _±_0.2065
0.0757 _±_0.0462
0.0529 _±_0.0084
0.0488 _±_0.0041
0.2494 _±_0.0590
0.1110 _±_0.0344
0.0278 _±_0.0005|0.3109 _±_0.2528
0.0822 _±_0.0213
0.0757 _±_0.0038
0.0743 _±_0.0068
1.3467 _±_0.1913
0.4256 _±_0.0398
0.0527 _±_0.0017|1.6765 _±_0.6564
0.8250 _±_0.0542
**0.7856** _±_**0.0408**
0.8004 _±_0.0375
0.9558 _±_0.3773
1.5374 _±_0.3410
0.8612 _±_0.0315|0.4504 _±_0.1746
0.2513 _±_0.1221
0.2597 _±_0.0213
0.2366 _±_0.0179
1.5176 _±_0.2595
0.5700 _±_0.0912
0.1774 _±_0.0077|1.0780 _±_1.3709
0.3546 _±_0.1006
0.2115 _±_0.0314
0.1369 _±_0.0074
11.0625 _±_1.5610
7.0709 _±_1.0786
0.1215 _±_0.0026|71.67
9.66
43.81
7.33
34.92
6.00
24.22
4.50
71.46
9.83
65.92
8.83
6.46
3.33| +|MM-Linear
MM-LSTM
MM-TST|0.1127 _±_0.0212
0.1947 _±_0.0014
0.0902 _±_0.0023|0.0504 _±_0.0045
0.0607 _±_0.0004
0.0285 _±_0.0009|0.0525 _±_0.0050
0.0628 _±_0.0014
0.0522 _±_0.0018|1.5321 _±_0.3410
0.8571 _±_0.0252
0.8919 _±_0.0322|0.1906 _±_0.0129
0.1943 _±_0.0088
0.1804 _±_0.0162|0.2680 _±_0.1163
32.48
5.66
0.1665 _±_0.0017
30.45
6.33
0.1201 _±_0.0025
6.65
3.16|| +|**MoAT**|**0.0816** _±_**0.0016**|**0.0257** _±_**0.0004**|**0.0494** _±_**0.0006**|0.8134 _±_0.0959|**0.1727** _±_**0.0020**|**0.1176** _±_**0.0019**
-
**1.33**|| + +_**Discussion 2: Why independent predictions?**_ In our loss function (Eq. 5), we compute the loss for each of the 16 independent predictions, which are then summed to compute the final loss _L_[(] _[i]_[)] . An intuitively different approach would be to aggregate the representations themselves and forecast time series as a united prediction. However, our choice of the objective exploits a larger number of training samples, enabling the model to effectively capture a diverse set of input patterns. Information from different modalities may provide complementary insights (Xing et al., 2019; Mu et al., 2020; Wortsman et al., 2022), and thus utilizing each prediction independently could lead to a more comprehensive understanding of the underlying dynamics. + +**Prediction synthesis.** In the inference phase, our primary objective is to generate a singular, definitive prediction from a set of multiple predictions generated by MoAT. While simply taking the mean of the 16 predictions appears as a straightforward approach, the reliability and accuracy of each prediction can vary across datasets, depending on the quality of the input modalities. Thus, instead, we implement a simple offline linear aggregation module consisting of 16 weight parameters _λ_ 1 _, · · · , λ_ 16, along with an intercept _b_ , that assign varying weights to the predictions, as shown in Fig. 3b. Note that this synthesis module is trained offline, separately from the main module (e.g., encoder and decoder), and thus gradients are not shared. + +_**Discussion 3: Why offline synthesis?**_ One might hypothesize that jointly learning _λ_ 1 _, · · · λ_ 16 along with the main module in an end-to-end manner could yield better results. However, in such a case, the model serves two roles: (1) accurately forecasting time series and (2) synthesizing predictions by learning their weights based on their importance. We disentangle the model’s two functionalities by training the synthesis module offline. This allows MoAT to dedicate itself to generating accurate forecasts, while the offline module learns the weights associated with the generated predictions. The disentanglement of functionalities has been proven to enhance the modularity and efficiency of multi-modal models (Liang et al., 2022). + +## 4 EXPERIMENTS + +In this section, we evaluate MoAT by answering the following questions: **Q1. Accuracy:** Does MoAT accurately forecast time series? **Q2. Effectiveness:** Does each component of MoAT improve the performance? and **Q3. Versatility:** Does MoAT perform well in other settings as well? Supplementary results can be found in Appendix D. + +## 4.1 SETTINGS + +We first share the experimental settings where the experiments are conducted. + +**Datasets.** We evaluate the performance of MoAT across six multi-modal datasets: Fuel, Gold, Stock-Index, Stock-Tech, Bitcoin, and Covid. These datasets, which will be made publicly available, consist of multivariate time series data ranging from daily to monthly resolution. Additionally, each dataset is accompanied by a collection of documents associated with each timestep. For more detailed descriptions of each dataset (e.g., statistics and preprocessing steps), refer to Appendix B.1. + +**Baselines.** To evaluate our proposed method, we compare it with both uni-modal and multimodal time series forecasting methods. As for uni-modal baselines, we consider linear models, + +7 + +Table 2: The effects of (1) incorporating multi-modal data, (2) employing dual multi-modal augmentation schemes, and (3) considering other design choices discussed in Section 3. All components contribute collectively to improve the performance of MoAT. + +|Method|Fuel|Metal|Bitcoin|Stock-Index|Covid|Stock-Tech|Improv. (%)| +|---|---|---|---|---|---|---|---| +|MoATtime
MoATtext|**0.0802** _±_**0.0015**
0.1044 _±_0.0003|0.0264 _±_0.0007
0.0310 _±_0.0002|0.0501 _±_0.0005
0.0516 _±_0.0001|1.1879 _±_0.0354
1.1750 _±_0.0293|0.1763 _±_0.0032
0.1806 _±_0.0004|0.1223 _±_0.0018
0.1501 _±_0.0010|6.613
16.696| +|MoATsample
MoATfeature|0.0814 _±_0.0016
0.0819 _±_0.0018|**0.0256** _±_**0.0008**
0.0262 _±_0.0013|**0.0491** _±_**0.0005**
0.0496 _±_0.0007|0.8405 _±_0.0269
0.8383 _±_0.0302|0.1748 _±_0.0026
0.1756 _±_0.0031|0.1191 _±_0.0023
0.1200 _±_0.0035|0.724
1.532| +|MoATw.o.JD
MoATw.o.CF
MoATw.o.IP
MoATw.o.OS|0.0823 _±_0.0013
0.0853 _±_0.0013
0.0855 _±_0.0018
0.0898 _±_0.0027|0.0261 _±_0.0010
0.0290 _±_0.0005
0.0260 _±_0.0013
0.0258 _±_0.0008|0.0501 _±_0.0005
0.0513 _±_0.0004
0.0539 _±_0.0016
0.0548 _±_0.0022|**0.7986** _±_**0.0614**
0.8565 _±_0.0840
0.8555 _±_0.0745
0.8196 _±_0.0709|0.1754 _±_0.0026
0.1801 _±_0.0021
0.1864 _±_0.0053
0.1833 _±_0.0046|0.1212 _±_0.0016
0.1263 _±_0.0023
**0.1165** _±_**0.0017**
0.1180 _±_0.0030|1.113
5.938
4.264
4.387| +|**MoAT**|0.0816 _±_0.0016|0.0257 _±_0.0004|0.0494 _±_0.0006|0.8134 _±_0.0959|**0.1727** _±_**0.0020**|0.1176 _±_0.0019|-| + +LightTS (Zhang et al., 2022) and DLinear (Zeng et al., 2023), as well as Transformer-based models including Autoformer (Wu et al., 2021), FEDformer (Zhou et al., 2022b), Pyraformer (Liu et al., 2021), Crossformer (Zhang & Yan, 2022), and PatchTST (Nie et al., 2022). Regarding multi-modal baselines, we include MM-Linear, MM-LSTM, and MM-TST. MM-Linear and MM-TST are designed based on extensions of DLinear and PatchTST, respectively, to integrate text information for time series forecasting. MM-LSTM is developed by modifying the multi-modal time series classification method (Deznabi et al., 2021) for forecasting purposes. For more details, refer to Appendix C. + +**Experimental setup.** We partitioned each dataset into train/validation/test sets with a ratio of 6:2:2. Unless otherwise stated, MoAT and its baselines predicted the immediate subsequent step (i.e., _T_ = 1) based on the preceding 8 timesteps (i.e., _L_ = 8), while MoAT can forecast over longer durations (see Appendix D). By default, we used a hidden dimension of 64 and 4 attention heads for the Transformer encoder. For more specific configuration information, refer to Appendix B.4. + +## 4.2 Q1. ACCURACY + +We begin by evaluating the accuracy of MoAT in time series forecasting. As shown in Table 1, MoAT achieves a significant performance advantage over both uni-modal and multi-modal baselines. Specifically, MoAT achieves the lowest MSE across five out of six datasets, exhibiting improvements ranging from 6.455% to 71.688%, on average. This demonstrates the effectiveness of incorporating multi-modal data into the model, as well as the careful design choices incorporated into MoAT. For additional experimental results, refer to Appendix D. + +## 4.3 Q2. EFFECTIVENESS + +Next, we conduct ablation studies to validate the effectiveness of the design choices made in MoAT. The results are summarized in Table 2. For further details on each variant, refer to Appendix C.3. + +**Effectiveness of multi-modality.** We study the effects of incorporating multi-modal data into time series forecasting. To this end, we examine two variants of MoAT, each utilizing one of the modalities: (1) MoATtime uses only the time series modality as input, and (2) MoATtext uses only the text modality as input. As shown in Table 2, MoAT outperforms both variants, enhancing the accuracy of MoATtime by 6.613% and MoATtext by 16.696%, on average. This demonstrates that under MoAT, both the time series and text modalities contribute to accurate time series forecasting. + +**Effectiveness of dual augmentation.** MoAT consists of a multi-modal augmented encoder that utilizes dual augmentation methods on the input multi-modal data. To investigate the effectiveness of the augmentation schemes, we consider two variants: (1) MoATsample augments the data in the sample space yielding single-modal representations ˆ **z** time and ˆ **z** text, and (2) MoATfeature augments the data in the feature space generating cross-modal representations ˜ **z** time and ˜ **z** text. As shown in Table 2, MoAT, which incorporates both augmentation schemes, forecasts time series more accurately than MoATsample and MoATfeature by 0.724% and 1.532%, respectively, on average. This implies that both augmentation methods are effective, and adopting both provides the best performance. + +**Effectiveness of other design choices.** We conduct ablation studies to verify other design components of MoAT including the discussions outlined in Section 3. To this end, we consider four variants: (1) MoATw.o.JD (w.o. _joint decomposition_ ) forecasts without trend-seasonal decomposition, (2) MoATw.o.CF (w.o. _cross-fusion_ ) removes the cross-fusion scheme from MoAT, only com- + +8 + +**==> picture [396 x 102] intentionally omitted <==** + +**----- Start of picture text -----**
+6 4.54.0 0.110.10 MoATPatchTST 0.08
3.5 0.09 MM-TST
4 Ground-Truth 3.0 54 56 58 60 62 64 66 0.08 0.07
MoAT 0.07 0.06 MoAT
2 PatchTST 0.06 PatchTST
MM-TST 0.05 0.05 MM-TST
0 20 40 60 80 100 120 140 1 2 4 8 60 54 48 42 36 30
Timestep Prediction Length Train Ratio (%)
(a) Visualization of Bitcoin price forecasting (b) Extended forecast (c) Fewer training samples
Price MSE MSE
**----- End of picture text -----**
+ +Figure 5: (a) MoAT accurately predicts future Bitcoin price compared to the uni-modal PatchTST and multi-modal MM-TST time series forecasting models. (b) MoAT consistently outperforms its baselines for various forecasting lengths. (c) MoAT maintains superior performance over its baselines even when trained with a reduced number of training samples. + +bining the corresponding representations from each component, (3) MoATw.o.IP (w.o. _independent predictions_ ) averages the representations in each component and makes a united prediction, and (4) MoATw.o.OS (w.o. _offline synthesis_ ) combines the prediction synthesis module into the main model, training its parameters in an end-to-end manner. More details about each variant can be found in Appendix C.3. As shown in Table 2, MoAT outperforms these variants, improving them by 1 _._ 113%, 5 _._ 938%, 4 _._ 264%, and 4 _._ 387%, respectively, confirming the effectiveness of each design choice. + +We conduct a visual analysis of the distributions of representations obtained by MoAT using the Bitcoin dataset. Fig. 4 illustrates the dis𝑧̂!"#$,&' , 𝑧̂!$(!,&' , 𝑧̃!"#$,&' , 𝑧̃!$(!,&' tributiontationsof the test(Eq.ofset,4)eightinacrossadistinct2Dthespacetimestepsrepresen-using 𝑧̂𝑧̂!"#$,)!"#$,&' ' , 𝑧̂+ 𝑧̂!$(!,)' !$(!,&' , 𝑧̃!"#$,)+ 𝑧̃' !"#$,&', 𝑧̃!$(!,)' + 𝑧̃!$(!,&' /4 t-SNE (Van der Maaten & Hinton, 𝑧̂!"#$,)' + 𝑧̂!$(!,)' + 𝑧̃!"#$,)' + 𝑧̃!$(!,)' /4 2008). It is evident that these eight independent representations cover a broader space compared to the united Figure 4: Augmentation space of MoAT. Multi-modal data representation obtained by averaging. augmentation expands the representation space, leading to This observation provides insight into why MoAT outperforms its variant, more accurate forecasting of temporal dynamics. MoATw.o.IP, which aggregates the representations for making a single prediction. Furthermore, it is noteworthy that the representations originating from the trend and seasonal components are clearly distinguishable, implying their complementary roles in making predictions. + +## 4.4 Q3. VERSATILITY + +We evaluate MoAT across different settings. In Fig. 5, we illustrate our results using the Bitcoin dataset as a case study. As shown in Fig. 5a, MoAT provides more accurate predictions of future Bitcoin prices compared to its strongest uni-modal and multi-modal competitors, PatchTST and MM-TST. In addition, as seen in Fig. 5b, MoAT consistently exhibits superior performance compared to its baselines when forecasting over longer future timesteps, specifically 2, 4, and 8 timesteps ahead. Moreover, Fig. 5c shows that MoAT maintains its superiority over its baselines even when trained with a reduced number of training samples, demonstrating the robustness and adaptability of MoAT across varying data availability scenarios. These results emphasize MoAT as a reliable choice for accurate time series forecasting in diverse settings. + +## 5 CONCLUSIONS + +This paper presents MoAT, a novel multi-modal augmented approach for time series forecasting aimed at overcoming data scarcity challenges. MoAT efficiently integrates information from various sources, including textual data, by combining both sample-wise and feature-wise multi-modal augmentation and fusion. Additionally, it enhances prediction accuracy through trend-seasonal decomposition using both data modalities. Extensive experiments conclusively demonstrate that MoAT surpasses existing methods, confirming its effectiveness and robustness in addressing data scarcity issues within the realm of time series forecasting. + +9 + +## REFERENCES + +- Tadas Baltruˇsaitis, Chaitanya Ahuja, and Louis-Philippe Morency. Multimodal machine learning: A survey and taxonomy. _IEEE transactions on pattern analysis and machine intelligence_ , 41(2): 423–443, 2018. + +- Hangbo Bao, Li Dong, Songhao Piao, and Furu Wei. Beit: Bert pre-training of image transformers. In _International Conference on Learning Representations_ , 2021. + +- Jui-Sheng Chou and Duc-Son Tran. Forecasting energy consumption time series using machine learning techniques based on usage patterns of residential householders. _Energy_ , 165:709–726, 2018. + +- Robert B Cleveland, William S Cleveland, Jean E McRae, and Irma Terpenning. Stl: A seasonaltrend decomposition. _J. Off. Stat_ , 6(1):3–73, 1990. + +- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In _Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL-HLT)_ , 2019. + +- Iman Deznabi, Mohit Iyyer, and Madalina Fiterau. Predicting in-hospital mortality by combining clinical notes with time-series data. In _Findings of the association for computational linguistics: ACL-IJCNLP 2021_ , 2021. + +- Linhao Dong, Shuang Xu, and Bo Xu. Speech-transformer: a no-recurrence sequence-to-sequence model for speech recognition. In _IEEE international conference on acoustics, speech and signal processing (ICASSP)_ , 2018. + +- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In _International Conference on Learning Representations_ , 2020. + +- Xin Du and Kumiko Tanaka-Ishii. Stock embeddings acquired from news articles and price history, and an application to portfolio optimization. In _Proceedings of the 58th annual meeting of the association for computational linguistics_ , 2020. + +- Xin Du and Kumiko Tanaka-Ishii. Stock portfolio selection balancing variance and tail risk via stock vector representation acquired from price data and texts. _Knowledge-Based Systems_ , 249:108917, 2022. + +- Steven Y Feng, Varun Gangal, Jason Wei, Sarath Chandar, Soroush Vosoughi, Teruko Mitamura, and Eduard Hovy. A survey of data augmentation approaches for nlp. In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_ , 2021. + +- E Gothai, R Thamilselvan, RR Rajalaxmi, RM Sadana, A Ragavi, and R Sakthivel. Prediction of covid-19 growth and trend using machine learning approach. _Materials Today: Proceedings_ , 2021. + +- Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, et al. Graphcodebert: Pre-training code representations with data flow. _arXiv preprint arXiv:2009.08366_ , 2020. + +James D Hamilton. _Time series analysis_ . Princeton university press, 2020. + +- Xiaoshuai Hao, Yi Zhu, Srikar Appalaraju, Aston Zhang, Wanqian Zhang, Bo Li, and Mu Li. Mixgen: A new multi-modal data augmentation. In _Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision_ , 2023. + +- Swaraj Khadanga, Karan Aggarwal, Shafiq Joty, and Jaideep Srivastava. Using clinical notes with time series data for icu management. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , 2019. + +10 + +Guokun Lai, Wei-Cheng Chang, Yiming Yang, and Hanxiao Liu. Modeling long-and short-term temporal patterns with deep neural networks. In _The 41st international ACM SIGIR conference on research & development in information retrieval_ , 2018. + +Colin Lea, Michael D Flynn, Rene Vidal, Austin Reiter, and Gregory D Hager. Temporal convolutional networks for action segmentation and detection. In _proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2017. + +- Sheng Liang, Mengjie Zhao, and Hinrich Sch¨utze. Modular and parameter-efficient multimodal fusion with prompting. In _Findings of the Association for Computational Linguistics: ACL 2022_ , 2022. + +- Zhiqiu Lin, Samuel Yu, Zhiyi Kuang, Deepak Pathak, and Deva Ramanan. Multimodality helps unimodality: Cross-modal few-shot learning with multimodal models. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2023. + +- Shizhan Liu, Hang Yu, Cong Liao, Jianguo Li, Weiyao Lin, Alex X Liu, and Schahram Dustdar. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In _International conference on learning representations_ , 2021. + +- Jesse Mu, Percy Liang, and Noah Goodman. Shaping visual representations with language for few-shot classification. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , 2020. + +- Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. In _The Eleventh International Conference on Learning Representations_ , 2022. + +- Bun Theang Ong, Komei Sugiura, and Koji Zettsu. Dynamically pre-trained deep recurrent neural networks using environmental monitoring data for predicting pm 2.5. _Neural Computing and Applications_ , 27:1553–1566, 2016. + +- Frederik Pahde, Mihai Puscas, Tassilo Klein, and Moin Nabi. Multimodal prototypical networks for few-shot learning. In _Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision_ , 2021. + +- F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. _Journal of Machine Learning Research_ , 12:2825–2830, 2011. + +- Tiexin Qin, Wenbin Li, Yinghuan Shi, and Yang Gao. Diversity helps: Unsupervised few-shot learning via distribution shift-based data augmentation. _arXiv preprint arXiv:2004.05805_ , 2020. + +- David Salinas, Valentin Flunkert, Jan Gasthaus, and Tim Januschowski. Deepar: Probabilistic forecasting with autoregressive recurrent networks. _International Journal of Forecasting_ , 36(3):1181– 1191, 2020. + +- Ramit Sawhney, Shivam Agarwal, Arnav Wadhwa, and Rajiv Shah. Deep attentive learning for stock movement prediction from social media text and company correlations. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , 2020. + +- Bowen Shi, Wei-Ning Hsu, Kushal Lakhotia, and Abdelrahman Mohamed. Learning audio-visual speech representation by masked multimodal cluster prediction. In _International Conference on Learning Representations_ , 2021. + +- Connor Shorten and Taghi M Khoshgoftaar. A survey on image data augmentation for deep learning. _Journal of big data_ , 6(1):1–48, 2019. + +- Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid. Videobert: A joint model for video and language representation learning. In _Proceedings of the IEEE/CVF international conference on computer vision_ , 2019. + +11 + +Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. _Journal of machine learning research_ , 9(11), 2008. + +- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017. + +- Qingsong Wen, Liang Sun, Fan Yang, Xiaomin Song, Jingkun Gao, Xue Wang, and Huan Xu. Time series data augmentation for deep learning: A survey. In _Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence_ , 2021. + +- Mitchell Wortsman, Gabriel Ilharco, Jong Wook Kim, Mike Li, Simon Kornblith, Rebecca Roelofs, Raphael Gontijo Lopes, Hannaneh Hajishirzi, Ali Farhadi, Hongseok Namkoong, et al. Robust fine-tuning of zero-shot models. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2022. + +- Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. _Advances in Neural Information Processing Systems_ , 34:22419–22430, 2021. + +- Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O O Pinheiro. Adaptive cross-modal few-shot learning. _Advances in Neural Information Processing Systems_ , 32, 2019. + +- Haiyang Yang, Li Kuang, and FengQiang Xia. Multimodal temporal-clinical note network for mortality prediction. _Journal of Biomedical Semantics_ , 12(1):1–14, 2021. + +- Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In _Proceedings of the AAAI conference on artificial intelligence_ , 2023. + +- Tianping Zhang, Yizhuo Zhang, Wei Cao, Jiang Bian, Xiaohan Yi, Shun Zheng, and Jian Li. Less is more: Fast multivariate time series forecasting with light sampling-oriented mlp structures. _arXiv preprint arXiv:2207.01186_ , 2022. + +- Yunhao Zhang and Junchi Yan. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In _The Eleventh International Conference on Learning Representations_ , 2022. + +- Renjie Zheng, Junkun Chen, Mingbo Ma, and Liang Huang. Fused acoustic and text encoding for multimodal bilingual pretraining and speech translation. In _International Conference on Machine Learning_ , 2021. + +- Yi Zheng, Qi Liu, Enhong Chen, Yong Ge, and J Leon Zhao. Time series classification using multichannels deep convolutional neural networks. In _International conference on web-age information management_ , 2014. + +- Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai Zhang. Informer: Beyond efficient transformer for long sequence time-series forecasting. In _Proceedings of the AAAI conference on artificial intelligence_ , 2021. + +- Jing Zhou, Yanan Zheng, Jie Tang, Li Jian, and Zhilin Yang. Flipda: Effective and robust data augmentation for few-shot learning. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics_ , 2022a. + +- Tian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang, Liang Sun, and Rong Jin. Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting. In _International Conference on Machine Learning_ , 2022b. + +- Xiaofeng Zhou, Naiju Zhai, Shuai Li, and Haibo Shi. Time series prediction method of industrial process with limited data based on transfer learning. _IEEE Transactions on Industrial Informatics_ , 2022c. + +12 + +**==> picture [254 x 128] intentionally omitted <==** + +**----- Start of picture text -----**
+Trend Part ℝ [!] Seasonal Part ℝ [!] Trend Part ℝ [!×$][!] Seasonal Part ℝ [!×$][!]
Global energy … Winter heating …
Moving Average Remainder 𝜽𝐓𝒊 : Trend-Specific 𝜽𝐒𝒊 : Seasonal-Specific
Attention Pooling Attention Pooling
Major Oil-Producing Nations
Announce Supply Cut, Fuel
Prices Expected to Rise
Time Series ℝ [!] Text ℝ [!×∗×$][!]
**----- End of picture text -----**
+ +Figure 6: Trend-seasonal decomposition of time series and text data. For time series, MoAT applies the standard decomposition method, utilizing the moving average kernel and the residual component from the input time series. For text data, MoAT utilizes distinct attention parameters to aggregate text embeddings, allowing for varied emphasis on documents. + +## A FURTHER DETAILS OF MOAT + +In this section, we provide additional details of the architecture of MoAT. + +**Instance Normalization.** We employ the instance normalization scheme for the input time series, a choice inspired by its proven effectiveness in PatchTST (Nie et al., 2022). This involves computing the mean _mi_ and standard deviation _σi_ for the input time series _**x**_[(] _[i]_[)] of the _i_ -th channel. Subsequently, we normalize the time series using these values, i.e., ( _**x**_[(] _[i]_[)] _− mi_ ) _/σi_ . After obtainint the prediction _**y**_ ˆ[(] _[i]_[)] , we reverse this process through de-normalization using _σi_ ˆ _**y**_[(] _[i]_[)] + _mi_ . MoAT takes an additional step to account for the temporal locality within the time series. Specifically, instead of using the mean value _mi_ , it opts for ( _mi_ + _**x**_[(] _L[i]_[)][)] _[/]_[2][,][which is the average between the mean value] and the last value of the input time series _**x**_[(] _[i]_[)] . This adjustment enables the method to better capture the temporal locality during the forecasting process. + +**Channel Independence.** Building upon previous studies such as CNN (Zheng et al., 2014), DLinear (Zeng et al., 2023), and PatchTST Nie et al. (2022), we incorporate the concept of channelindependence within the MoAT framework. In this approach, instead of mixing information across channels, we consider each channel as an independent data sample that shares the projection weight parameters and Transformer encoder weights. Thus, each input time series sample is considered a univariate time series along with its corresponding specialized text embeddings. We plan to explore channel-dependent version of MoAT in our future work. + +**Trend-Seasonal Decomposition.** As described in Section 3, we adopt trend-seasonal decomposition of both time series and text in MoAT, as illustrated in Fig. 6. + +For **time series** , we use the standard trend-seasonal decomposition method. This involves utilizing the moving average kernel on the input time series _**x**_[(] _[i]_[)] to extract the trend component _**x**_[(] T _[i]_[)][,][while] the residual becomes the seasonal component _**x**_[(] S _[i]_[)][.][Thus,] _**[ x]**_[(] _[i]_[)][=] _**[ x]**_[(] T _[i]_[)][+] _**[ x]**_[(] S _[i]_[)] holds. + +For **text data** , we introduce two independent sets of attention parameters _θ_ T[(] _[i]_[)] = _{_ **W** T[(] _[i]_[)] _[,]_ _**[ b]**_[(] T _[i]_[)] _[,]_ **[ V]** T[(] _[i]_[)] _[}]_ and _θ_ S[(] _[i]_[)] = _{_ **W** S[(] _[i]_[)] _[,]_ _**[ b]**_[(] S _[i]_[)] _[,]_ **[ V]** S[(] _[i]_[)] _[}]_[ to extract trend-related and seasonal-related text information, respec-] tively. More precisely, given a set of text embeddings _**d** ta_ : _tb ∈_ R _[|D][ta]_[:] _[tb][|×][d][′]_ ranging from _ta_ to _tb_ , we apply attention pooling using _θ_ M[(] _[i]_[)][to aggregate the embeddings as follows:] + +**==> picture [295 x 19] intentionally omitted <==** + +for each component M _∈{_ T _,_ S _}_ . By using distinct sets of attention parameters, MoAT can selectively emphasize documents to extract information pertaining to trend and seasonal dynamics. + +13 + +## B EXPERIMENTAL DETAILS + +In this section, we share more detailed information about the experimental settings. + +## B.1 DATASETS + +In this subsection, we detail our preprocessing methods for the multi-modal datasets employed in our experiments. To the best of our knowledge, currently, there is no benchmark time series dataset accompanied by textual information for each timestep. Thus, we collected and processed the raw datasets, and they will be released to the public. + +**Fuel** is a monthly dataset consisting of gas[2] and oil[3] prices, spanning from January 2000 to September 2022. For each month, we extracted news articles from The New York Times[4] that contain relevant keywords _{brent crude, crude oil, energy policy, gas demand, gas market, gasoline price, natural gas, oil demand, oil market, oil price, OPEC}_ , as suggested by ChatGPT. + +**Metal** is a monthly dataset consisting of gold[5] and silver[6] prices, spanning from January 2000 to August 2022. For each month, we extracted news articles from The New York Times that contain relevant keywords _{coinage, COMEX, currency strength, exchange market, exchange rate, Fort Knox, gold and silver, gold coin, gold industry, gold market, gold mining, gold price, gold reserves, gold silver, gold standard, hedging, inflation, karat, LBMA, mining output, precious metal, quantitative easing, recession, safe-heaven asset, silver coins, silver industry, silver institute, silver market, silver price, sterling silver, supply chain disruptions, world gold council}_ , as suggested by ChatGPT. + +**Stock-Index** is a monthly dataset consisting of the commodity price index[7] ranges from March 2010 to Feburary 2022. The news articles related to each month are gathered from _S&P Global Commodity Insights_ . + +**Stock-Tech** is a weekly dataset of Microsoft (MSFT) and Apple (AAPL) stock prices ranging from December 1, 2006 to November 30, 2016. For each week, we aggregated news articles featuring these two companies retrieved from The New York Times API[8] . + +**Bitcoin** is a daily dataset consisting of Bitcoin (BTC), Ethereum (ETH), Tether (USDT), and Binance Coin (BNB) prices[9] , spanning from November 13, 2017 to November 23, 2019. For each day, we filtered tweets about Bitcoins[10] that received at least 100 likes and 50 retweets. + +**Covid** is a daily dataset consisting of the number of confirmed COVID-19 cases in 10 countries: China, the United States, Italy, Singapore, South Korea, Georgia, Japan, Canada, Russia, and Australia[11] , spanning from January 22, 2020 to July 27, 2020. For each day, we used news content that is related to Coronavirus which was aggregated, analyzed, and enriched by AYLIEN using the AYLIEN’s News Intelligence Platform. Among a large number of articles, we filtered 20 articles per day based on the number of times the articles were shared on social media platforms including Facebook, LinkedIn, Reddit, and Google Plus. + +## B.2 HYPERPARAMETER SEARCH + +We report the hyperparameter search space for each method, including MoAT. By default, a hidden dimension of 64 is used, and if needed, dropout with a probability of 0.2 is applied. We search for the optimal learning rate from _{_ 0 _._ 00005 _,_ 0 _._ 0001 _}_ and weight decay from _{_ 0 _._ 0001 _,_ 0 _._ 001 _}_ . + +In the case of attention-based models (Autoformer, FEDformer, Pyraformer, Crossformer, PatchTST, MM-TST, and MoAT), we use 2 attention layers and explore the number of attention + +> 2 [URL removed] + +> 3 [URL removed] 4 [URL removed] + +> 5 [URL removed] + +> 6 [URL removed] + +> 7 [URL removed] + +> 8 [URL removed] + +> 9 [URL removed] + +> 10 [URL removed] + +> 11 [URL removed] + +14 + +Table 3: Summary of dataset statistics, including time series and text data. “Timesteps” refers to the time series length, “# of Channels” indicates the number of channels in the time series, and “Resolution” denotes the temporal granularity. “Min,” “Max,” and “Avg” represent the minimum, maximum, and average number of texts at each timestep, respectively. + +|Dataset|Time Series
Timesteps
# of Channels
Resolution|Text
Min.
Max
Avg.| +|---|---|---| +|Fuel
Metal
Stock-Index
Stock-Tech
Bitcoin
Covid|273
2
Month
272
2
Month
144
10
Month
522
2
Week
741
4
Day
188
10
Day|1
117
21.758
3
187
34.033
12
518
289.611
1
10
7.019
2
369
53.896
20
20
20.000| + +heads from _{_ 4 _,_ 16 _}_ . For models utilizing time series decomposition (Autoformer, FEDformer, and MoAT), we search for the moving average for obtaining the trend component from _{_ 3 _,_ 5 _}_ . In patchbased methods (PatchTST, Crossformer, MM-TST, and MoAT), we used the patch length _P_ = 4 and stride _S_ = 2. + +We determined the best configuration that resulted in the highest accuracy (i.e., lowest MSE) in the validation set. Using this identified hyperparameter setting, we report the average performance along with its standard deviation, calculated across performance from 10 random seeds. + +## B.3 IMPLEMENTATION DETAILS + +**Base Implementation.** We developed MoAT and its variants based on the open source implementation for time series forecasting[12] . We used the Ridge regression provided by scikit-learn (Pedregosa et al., 2011) for the prediction synthesis module of MoAT. + +**Channel Independence.** Following PatchTST, we employ a channel-independent approach for time series forecasting by considering each input time series as a univariate time series. Given a batch of _B_ samples sized _B × C × L_ , where _C_ is the number of channels and _L_ is the number of past observable timesteps, we reshape the input as ( _B · C_ ) _× L_ so that each channel within the batch is treated independently. After segmenting each univariate time series into _N_ patches, the input is reshaped to ( _B · C_ ) _× N × d_ , which can be readily utilized by any standard Transformer architecture. + +**Pretrained Language Model.** To generate embeddings for each text, we used the pretrained language model. Specifically, we used the sentence transformer provided by Hugging Face with the pretrained model named all-mpnet-base-v2[13] , which is trained on a 1B sentence pairs dataset using contrastive loss. + +## B.4 TRAINING DETAILS + +**Data Split.** For each dataset, we split the time series and text data based on their temporal order into train, validation, and test sets using a 6:2:2 ratio. Following Zhou et al. (2021), the entire time series data is normalized using the mean and standard deviation of the training set. + +**Training Epochs.** The total number of training epochs is set to 200. But, if the validation loss fails to decrease for 10 consecutive epochs, we stop the training process early. For the Steel dataset, we limit the training to just 1 epoch due to its small size. + +**Offline Prediction Synthesis.** Our offline prediction synthesis module is trained separately from the main forecasting model. We utilize a Ridge regression approach, incorporating 16 weight parameters and an intercept for aggregating the 16 predictions from the decoder. During each training epoch, a Ridge regression is trained from scratch using the training set. Then, the model’s learned parameters are utilized to evaluate validation and test sets. + +> 12 [URL removed] + +> 13 [URL removed] + +15 + +## C BASELINES AND VARIANTS + +In this section, we describe the baseline methods that are compared with MoAT in Section 4. Each method is either uni-modal or multi-modal models. + +## C.1 UNI-MODAL BASELINE METHODS + +We first describe the uni-modal baselines we used to evaluate MoAT in Section 4. + +**LightTS** (Zhang et al., 2022) is a simple MLP-based time series forecasting model. Specifically, it utilizes MLP-based structures to effectively capture two significant patterns, short-term and longterm temporal dependencies within the time series. + +**DLinear** (Zeng et al., 2023) is a recent non-Transformer model that argues that the Transformerbased models have difficulty in capturing ordering information within the time series. It consists of two distinct linear layers which are independently applied to the trend and seasonal components of the input time series. The resulting outputs are then summed to generate the final prediction. + +**Autoformer** (Wu et al., 2021) is a Transformer-based method that incorporates time series decomposition, inspired by classical time series analysis methods. In addition, it integrates an auto-correlation mechanism, which replaces the conventional self-attention layer within the Transformer. + +**FEDformer** (Zhou et al., 2022b) is a Transformer-based method that also uses a time series decomposition scheme. Motivated by the fact that time series tend to have sparse representations, it is based on a frequency-enhanced Transformer, which offers linear complexity to the length of the input time series. + +**Pyraformer** (Liu et al., 2021) is a Transformer-based method incorporating a pyramidal attention module. Specifically, the module consists of inter-scale connections that summarize features at various resolutions and intra-scale connections that capture temporal dependencies across diverse ranges. Moreover, it scales linearly to the length of the input time series. + +**Crossformer** (Zhang & Yan, 2022) is a Transformer-based method that utilizes cross-dimension dependency for time series forecasting. Specifically, it segments the input time series into patches and trains a module that captures cross-time and cross-dimension dependencies among them. + +**PatchTST** (Nie et al., 2022) is a Transformer-based method that adopts an independent learning approach for each channel using a shared encoder. This model demonstrates that Transformers are effective when the input time series is segmented into patches at the subseries level. + +## C.2 MULTI-MODAL BASELINE METHODS + +In this subsection, we describe MM-Linear, MM-LSTM, and MM-TST, baseline models designed to compare against MoAT. MM-Linear and MM-TST extend DLinear (Zeng et al., 2023) and PatchTST (Nie et al., 2022), respectively to integrate multi-modal data within their framework. MMLSTM is an adapted version of a time series classification method (Deznabi et al., 2021), designed for mortality prediction within the healthcare domain. + +Commonly, these models are given with a time series _**x**_[(] _[i]_[)] = ( _x_[(] 1 _[i]_[)] _[,][ · · ·][, x]_[(] _L[i]_[)][)] _[∈]_[R] _[L]_[of][the] _[i]_[-] th channel and a set of texts _Dt_ = _{Dt,_ 1 _, · · · , Dt,|Dt|}_ at each timestep _t_ = 1 _, · · · , L_ . Using the pretrained language model, each set of texts is represented as a set of text embeddings _**d** t_ = _{_ _**d** t,_ 1 _, · · · ,_ _**d** t,|D,t|} ∈_ R _[|D][t][|×][d][′]_ where _**d** t,j_ = PLM( _Dt,j_ ) _∈_ R _[d][′]_ . + +**MM-Linear** is a multi-modal method that extends DLinear, a simple linear method for time series forecasting. The input time series _**x**_[(] _[i]_[)] is decomposed into the trend part _**x**_[(] T _[i]_[)] and the seasonal part _**x**_[(] S _[i]_[)] from the seasonal-trend decomposition. For the text data, the method applies attention pooling (Eq. 6) to each set of texts at each timestep _t_ to derive a single aggregated text embedding _**z**_ text[(] _[i]_[)] _,t_[.] Then, these text embeddings are averaged to obtain _**z**_ text[(] _[i]_[)][= (] _**[z]**_ text[(] _[i]_[)] _,_ 1[+] _[ · · ·]_[ +] _**[ z]**_ text[(] _[i]_[)] _,L_[)] _[/L][ ∈]_[R] _[d][′]_[, which] represents the general textual information associated with the _i_ -th channel. Finally, it concatenates time series and text embeddings, _**x**_[(] T _[i]_[)] _∥_ _**z**_ text[(] _[i]_[)] _[∈]_[R] _[L]_[+] _[d][′]_[and] _**[x]**_[(] S _[i]_[)] _∥_ _**z**_ text[(] _[i]_[)] _[∈]_[R] _[L]_[+] _[d][′]_[,][which][represent] the multi-modal embeddings of the trend and seasonal dynamics, respectively. Following this, two + +16 + +independent one-layer linear layers are individually applied to each component and summed to derive the final prediction, consistent with the original DLinear. + +**MM-LSTM** is inspired by the time series classification model for patients’ mortality prediction. It employs LSTM to capture the temporal dependencies within the time series _**x**_ , resulting in _**z**_ time = LSTM( _**x**_ ) _∈_ R _[d][′′]_ . For text data, it averages all the text embeddings at timestep _t_ = 1 _, · · · , L_ to obtain _**z**_ text _∈_ R _[d][′]_ . Upon concatenating _**z**_ time and _**z**_ text to yield _**z** ∈_ R _[d][′]_[+] _[d][′′]_ , an independent onelayer linear layer is applied for each channel to generate a unique prediction for each channel. To ensure forecasting stability, the input time series is normalized with zero mean and unit standard deviation, and they are added back to the output prediction. + +**MM-TST** is an extension of the Transformer-based time series forecasting model, PatchTST. In line with the original PatchTST, it produces patch-wise time series embeddings **z**[(] time _[i]_[)] _[∈]_[R] _[N][×][d]_[.][In] addition, it computes patch-wise text embeddings **z**[(] text _[i]_[)] _[∈]_[R] _[N][×][d]_[,][employing][the][same][approach][as] in MoAT. Next, temporally aligned patches from the two modalities are concatenated, forming a 2 _d_ -dimensional patch at each timestep. Following this, a single linear-layer decoder is employed on the flattened output patches to predict _T_ future timesteps. + +## C.3 VARIANTS OF MOAT + +We provide the details of the variants of MoAT that are used to evaluate the effectiveness of the design components of MoAT in Section 4.3. + +**Effectiveness of multi-modality.** To assess the effectiveness of integrating multi-modal datasets, we examine two variants of MoAT. The first, MoATtime exclusively utilizes the time series modality and incorporates trend-seasonal decomposition. On the other hand, MoATtext mainly relies on the text modality to forecast time series. Given the challenge of accurately predicting one modality using another, MoATtext leverages hints from time series data normalization described in Appendix A. That is, the generated prediction is de-normalized by the mean, the last value, and the standard deviation of the input time series. As these variants operate as single-modal methods, neither multi-modal augmentation nor cross-fusion can be applied. + +**Effectiveness of dual augmentation.** To evaluate the effectiveness of the multi-modal data augmentation schemes, we explore two variants, MoATsample and MoATfeature. These variants integrate both time series and text data in their approach. First, MoATsample employs sample-wise augmentation **z** ˜time toandgenerate ˜ **z** text. In each variant, two representations are generated for each trend and seasonal com- ˆ **z** time and ˆ **z** text. Second, MoATfeature utilizes feature-wise augmentation to generate ponent, resulting in four predictions from cross-fusion. In contrast, MoAT generates 16 predictions by considering more representations for the trends and seasonal components by incorporating both augmentation schemes. + +**Effectiveness of other design choices.** To validate the effectiveness of the key design choices discussed in Section 3, we examine three variants of MoAT: MoATw.o.CF, MoATw.o.IP, and MoATw.o.OS. + +- **MoATw.o.JD** removes the trend-seasonal decomposition module from MoAT. Consequently, it generates four representations instead of eight, and the cross-fusion scheme is removed as well. + +- **MoATw.o.CF** removes the cross-fusion scheme utilized in MoAT. That is, instead of considering all 16 combinations of aggregations of representations from **Z**[(] T _[i]_[)] and **Z**[(] S _[i]_[)][, it only aggregates the] corresponding representations. Specifically, it aggregates **z** ˆ[(] time,T _[i]_[)][&] **[z]**[ˆ][(] time,S _[i]_[)][,] **[z]**[ˆ][(] text,T _[i]_[)][&] **[z]**[ˆ][(] text,S _[i]_[)][,] **[z]**[˜][(] time,T _[i]_[)] & ˜ **z**[(] time,S _[i]_[)][, and][ ˜] **[z]** text,T[(] _[i]_[)][&][ ˜] **[z]**[(] text,S _[i]_[)][, resulting in four predictions.] + +**==> picture [396 x 54] intentionally omitted <==** + +Using these unified representations of both trend and seasonal components, it generates a singular, united prediction by summing them: + +**==> picture [162 x 21] intentionally omitted <==** + +17 + +Table 4: Time series forecasting accuracy (in terms of MSE) in six real-world datasets for a prediction length of _T_ = 2. The best results are in **bold** and the second best are underlined. The average improvements (%) and ranks are reported on the right. MoAT performs the best on average. + +|Method|Fuel|Metal|Bitcoin|Stock-Index|Covid|Stock-Tech|Improv.
Rank| +|---|---|---|---|---|---|---|---| +|LightTS
DLinear
Autoformer
FEDformer
Pyraformer
Crossformer
PatchTST|0.1707 _±_0.0318
0.2335 _±_0.0390
0.1948 _±_0.0220
0.1464 _±_0.0055
0.1783 _±_0.0229
0.1330 _±_0.0042
0.1375 _±_0.0056|0.1609 _±_0.1045
0.0870 _±_0.0262
0.0669 _±_0.0066
0.0579 _±_0.0027
0.2918 _±_0.1485
0.1686 _±_0.1029
0.0410 _±_0.0013|0.1853 _±_0.0943
0.0911 _±_0.0199
0.0957 _±_0.0055
0.0897 _±_0.0091
1.4690 _±_0.2101
0.5108 _±_0.0511
0.0624 _±_0.0010|1.6850 _±_0.3808
**0.8116** _±_**0.0500**
0.8549 _±_0.0181
0.8487 _±_0.0181
1.3141 _±_0.5165
1.6567 _±_0.3210
0.8666 _±_0.0178|0.4022 _±_0.1285
0.2783 _±_0.0950
0.2672 _±_0.0175
0.2438 _±_0.0126
1.6353 _±_0.2116
0.5584 _±_0.0371
**0.1966** _±_**0.0087**|0.7412 _±_0.3926
0.4051 _±_0.0919
0.2905 _±_0.242
0.1808 _±_0.0059
11.8653 _±_1.4095
8.2583 _±_0.8155
0.1723 _±_0.0041|58.72
8.66
37.54
7.16
31.82
6.50
19.10
4.83
73.03
9.83
64.50
8.50
5.33
3.16| +|MM-Linear
MM-LSTM
MM-TST|0.1915 _±_0.0126
0.2174 _±_0.0128
0.1369 _±_0.0028|0.0547 _±_0.0096
0.0686 _±_0.0004
0.0402 _±_0.0008|0.0588 _±_0.0023
0.0621 _±_0.0023
0.0628 _±_0.0016|1.7323 _±_0.0609
0.8720 _±_0.0139
0.9076 _±_0.0573|0.2121 _±_0.0194
0.2170 _±_0.0013
0.2050 _±_0.0156|0.3559 _±_0.0774
29.94
6.00
0.3201 _±_0.0494
25.95
6.16
0.1731 _±_0.0049
6.59
3.83|| +|**MoAT**|**0.1215** _±_**0.0024**|**0.0370** _±_**0.0004**|**0.0583** _±_**0.0005**|0.8319 _±_0.0496|0.2011 _±_0.0032|**0.1682** _±_**0.0020**
-
**1.33**|| + +It is important to note that this approach differs from MoAT’s loss function in Eq. 5, where each representation is used independently to derive the loss, and the losses are averaged instead of averaging the representations themselves. + +- **MoATw.o.OS** optimizes the weight parameters _λ_ 1 _, · · · , λ_ 16 in an end-to-end fashion, concurrently with the training of the encoder and decoder. In this integrated training approach, the same optimizer is employed, enabling the model to simultaneously serve both the time series forecasting and prediction aggregating functionalities. Specifically, given the synthesized prediction **Y**[ˆ][(] _[i]_[)] using _λ_ 1 _, · · · , λ_ 16, the final loss is the sum of Eq. 5 and the MSE loss of the synthesized one: + +**==> picture [306 x 31] intentionally omitted <==** + +## D ADDITIONAL EXPERIMENTAL RESULTS + +In this section, we present supplementary experimental results that are not included in the main content due to space constraints. + +**Varying prediction lengths.** In Section 4, we utilized a default prediction length of 1. In this section, we present the experimental results for varying prediction lengths, specifically at lengths of 2, 4, and 8. The forecasting accuracy of MoAT and its baselines when predicting future 2, 4, and 8 timesteps is depicted in Tables 4, 5, and 6, respectively. These results demonstrate that MoAT accurately predicts both short-term and longer-term future time series. + +**Temporal alignment.** In Figure 7, we observe temporal similarities among representations across different timesteps in the Bitcoin dataset. It is noticeable that the similarity heatmaps for trend and seasonal representations exhibit comparable patterns, implying the temporal alignment within each trend and seasonal component. In addition, we can clearly see that heatmaps are distinguished between the two components, suggesting that each component offers unique temporal information that is potentially beneficial for accurate time series forecasting. + +18 + +Table 5: Time series forecasting accuracy (in terms of MSE) in six real-world datasets for a prediction length of _T_ = 4. The best results are in **bold** and the second best are underlined. The average improvements (%) and ranks are reported on the right. MoAT performs the best on average. + +|Method|Fuel|Metal|Bitcoin|Stock-Index|Covid|Stock-Tech|Improv.
Rank| +|---|---|---|---|---|---|---|---| +|LightTS
DLinear
Autoformer
FEDformer
Pyraformer
Crossformer
PatchTST|0.1865 _±_0.0101
0.3001 _±_0.0310
0.2459 _±_0.0144
0.1990 _±_0.0084
0.2247 _±_0.0259
0.1998 _±_0.0059
0.1981 _±_0.0027|0.1833 _±_0.1259
0.1307 _±_0.0222
0.0853 _±_0.0062
0.0814 _±_0.0062
0.4750 _±_0.2248
0.3736 _±_0.1157
0.0616 _±_0.0010|0.1519 _±_0.0503
0.1326 _±_0.0337
0.1132 _±_0.0027
0.1085 _±_0.0068
1.6298 _±_0.1754
0.6778 _±_0.0672
0.0791 _±_0.0010|1.8960 _±_0.3034
0.9719 _±_0.0603
0.9969 _±_0.0270
1.0194 _±_0.0329
1.7009 _±_0.1172
1.6747 _±_0.1742
0.9279 _±_0.0236|0.4079 _±_0.0737
0.3465 _±_0.0499
0.2986 _±_0.0097
0.2814 _±_0.0151
1.7994 _±_0.2905
0.6559 _±_0.0431
**0.2427** _±_**0.0126**|1.3437 _±_1.0994
0.5073 _±_0.0469
0.4003 _±_0.0213
0.2805 _±_0.0261
13.1298 _±_1.5395
9.2539 _±_0.6315
**0.2660** _±_**0.0017**|49.80
8.16
36.95
7.66
25.36
6.16
16.16
5.00
72.98
10.00
65.48
9.00
3.33
2.50| +|MM-Linear
MM-LSTM
MM-TST|0.2384 _±_0.0102
0.2576 _±_0.0022
0.1973 _±_0.0040|0.0888 _±_0.0258
0.0855 _±_0.0006
0.0596 _±_0.0008|0.0743 _±_0.0022
0.0836 _±_0.0064
0.0788 _±_0.0012|1.8208 _±_0.0548
0.9416 _±_0.0034
1.0192 _±_0.0181|0.3018 _±_0.0273
0.2625 _±_0.0018
0.2709 _±_0.0169|0.5122 _±_0.0694
29.52
7.00
0.4312 _±_0.0015
20.11
5.50
0.2731 _±_0.0054
6.41
3.33|| +|**MoAT**|**0.1687** _±_**0.0014**|**0.0582** _±_**0.0008**|**0.0728** _±_**0.0007**|**0.9228** _±_**0.0343**|0.2508 _±_0.0065|0.2807 _±_0.0086
-
**1.66**|| + +Table 6: Time series forecasting accuracy (in terms of MSE) in six real-world datasets for a prediction length of _T_ = 8. The best results are in **bold** and the second best are underlined. The average improvements (%) and ranks are reported on the right. MoAT performs the best on average. + +|Method|Fuel|Metal|Bitcoin|Stock-Index|Covid|Stock-Tech|Improv.
Rank| +|---|---|---|---|---|---|---|---| +|LightTS
DLinear
Autoformer
FEDformer
Pyraformer
Crossformer
PatchTST|0.3006 _±_0.0118
0.3966 _±_0.0301
0.3461 _±_0.0092
0.3316 _±_0.0089
0.3068 _±_0.0201
0.3318 _±_0.0175
0.3358 _±_0.0050|0.2504 _±_0.0500
0.2160 _±_0.0430
0.1265 _±_0.0064
0.1100 _±_0.0000
0.6715 _±_0.0863
0.4295 _±_0.1315
0.0928 _±_0.0010|0.2573 _±_0.0528
0.2041 _±_0.0125
0.1398 _±_0.0051
0.1438 _±_0.0075
1.7596 _±_0.1932
0.7878 _±_0.0876
0.1072 _±_0.0006|2.0410 _±_0.1924
0.9518 _±_0.0393
1.0202 _±_0.0184
1.0138 _±_0.0396
1.3721 _±_0.4393
1.4830 _±_0.2267
0.8777 _±_0.0270|0.5448 _±_0.0416
0.5294 _±_0.0644
0.3886 _±_0.0139
0.3724 _±_0.0235
1.9689 _±_0.2832
0.6923 _±_0.0796
0.3645 _±_0.0131|2.1131 _±_0.6886
0.6941 _±_0.0383
0.5799 _±_0.0101
0.4907 _±_0.0533
14.6437 _±_1.4263
10.6312 _±_0.8214
**0.4630** _±_**0.0115**|50.09
8.16
34.04
8.00
18.22
6.33
12.70
4.66
67.71
9.16
61.33
9.16
2.84
3.33| +|MM-Linear
MM-LSTM
MM-TST|0.3334 _±_0.0236
0.3349 _±_0.0012
0.3273 _±_0.0033|0.1441 _±_0.0950
0.1287 _±_0.0006
0.0919 _±_0.0011|0.1850 _±_0.0550
0.1157 _±_0.0082
0.1069 _±_0.0011|1.8349 _±_0.0064
0.9423 _±_0.0372
0.9359 _±_0.0462|0.4321 _±_0.0390
0.3696 _±_0.0009
0.4107 _±_0.0167|0.6679 _±_0.0403
31.96
7.50
0.5770 _±_0.0150
13.44
5.00
0.4673 _±_0.0053
5.37
3.16|| +|MoAT|**0.2740** _±_**0.0029**|**0.0867** _±_**0.0003**|**0.0994** _±_**0.0005**|**0.8741** _±_**0.0177**|**0.3644** _±_**0.0087**|0.5355 _±_0.0088
-
**1.50**|| + +**==> picture [396 x 184] intentionally omitted <==** + +**----- Start of picture text -----**
+0 1.0 0 1.0 0 1.0 0 1.0000
20 0.9 20 0.9 20 0.9 20 0.9975
40 40 40 40 0.9950
60 0.8 60 0.8 60 0.8 60 0.9925
80 0.7 80 0.7 80 0.7 80 0.9900
100 0.6 100 0.6 100 0.6 100 0.9875
120 0.5 120 0.5 120 120 0.9850
140 140 140 0.5 140 0.9825
0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140
Timestep Timestep Timestep Timestep
(a) ˆ z [(] time,T [i] [)] (b) ˆ z [(] text,T [i] [)] (c) ˜ z [(] time,T [i] [)] (d) ˜ z [(] text,T [i] [)]
0 1.0 0 1e 5+9.999e 1 10 0 1.0 0 1.000
20 20 20 0.9 20 0.995
40 0.8 40 9 40 0.8 40 0.990
60 60 60 0.7 60
80 0.6 80 8 80 0.6 80 0.985
100 0.4 100 7 100 0.5 100 0.980
120 120 120 0.4 120 0.975
140 0.2 140 6 140 0.3 140 0.970
0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140 0 20 40 60 80 100 120 140
Timestep Timestep Timestep Timestep
(e) ˆ z [(] time,S [i] [)] (f) ˆ z [(] text,S [i] [)] (g) ˜ z [(] time,S [i] [)] (h) ˜ z [(] text,S [i] [)]
Timestep Timestep Timestep Timestep
Timestep Timestep Timestep Timestep
**----- End of picture text -----**
+ +Figure 7: Pairwise cosine similarities between different timesteps for each of the eight representaˆ tions. The representations of the trend component ( **Z**[(] T _[i]_[)] = _{_ **z**[(] time,T _[i]_[)] _[,]_[ ˆ] **[z]** text,T[(] _[i]_[)] _[,]_[ ˜] **[z]**[(] time,T _[i]_[)] _[,]_[ ˜] **[z]** text,T[(] _[i]_[)] _[}]_[) and those] ˆ of the seasonal component ( **Z** S[(] _[i]_[)] = _{_ **z**[(] time,S _[i]_[)] _[,]_[ ˆ] **[z]**[(] text,S _[i]_[)] _[,]_[ ˜] **[z]**[(] time,S _[i]_[)] _[,]_[ ˜] **[z]**[(] text,S _[i]_[)] _[}]_[) exhibit distinctive temporal simi-] larities, effectively capturing specific aspects essential for accurate time series forecasting. + +19 + diff --git a/open_review/iclr2024_8826.json b/open_review/iclr2024_8826.json new file mode 100644 index 0000000000000000000000000000000000000000..415c44667bec017f65afe8aade2bf4518668b749 --- /dev/null +++ b/open_review/iclr2024_8826.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8826", + "source": "iclr2024", + "source_year": 2024, + "title": "Data Debugging with Shapley Importance over Machine Learning Pipelines", + "abstract": "When a machine learning (ML) model exhibits poor quality (e.g., poor accuracy or fairness), the problem can often be traced back to errors in the training data. Being able to discover the data examples that are the most likely culprits is a fundamental concern that has received a lot of attention recently. One prominent way to measure \"data importance\" with respect to model quality is the Shapley value. Unfortunately, existing methods only focus on the ML model in isolation, without considering the broader ML pipeline for data preparation and feature extraction, which appears in the majority of real-world ML code. This presents a major limitation to applying existing methods in practical settings. In this paper, we propose Datascope, a method for efficiently computing Shapley-based data importance over ML pipelines. We introduce several approximations that lead to dramatic improvements in terms of computational speed. Finally, our experimental evaluation demonstrates that our methods are capable of data error discovery that is as effective as existing Monte Carlo baselines, and in some cases even outperform them. We release our code as an open-source data debugging library available at https://github.com/easeml/datascope.", + "rebuttal": "We are grateful to the reviewers for acknowledging the novelty, significance, and potential impact of our contributions, and we deeply appreciate all their constructive feedback. We did our very best to address all the concerns raised by them through our clarifying remarks posted below and extensive color-coded modifications to our paper draft. The opportunity to enhance our paper's quality was invaluable, and we thank the reviewers for their efforts. We hope that they will find that we managed to adequately address all the concerns they raised.\n\n### Initial Comments\nWe cannot thank the reviewer enough for highlighting so many positive aspects of our work! The summary provided hits all the major points of our contributions and gives us the impression that the confidence rating that the reviewer specified might be underestimating their true competencies. We provide a few brief comments below regarding several points raised by the reviewer.\n\n(W1) **Format: Appendix is not cut from the main paper. The PDF provided for the main paper is this 34-page document**\n\nWe apologize if the reviewer was inconvenienced by the large document. Our deci [...]\n\n### Initial Comments - Part 1\nWe sincerely thank the reviewer for the appreciation they expressed for the problem we are trying to address, the novelty of our solution, as well as our attempt at a rigorous theoretical treatment and a thorough experimental evaluation. We also greatly appreciate the reviewer's constructive feedback. We provide our best attempt at addressing some concerns that were raised in the comments below (we apologize for the length) and in various edits we made to our paper draft (found in the revised version, marked with purple). Finally, in case the reviewer feels that t [...]\n\n### Initial Comments - Part 1\nWe express sincere gratitude to the reviewer for providing valuable feedback. The reviewer raised several interesting points which we address below. We also provide corresponding changes made in the paper draft itself (marked in orange). We hope that the reviewer will consider updating their review score in case they find our comments and edits satisfying. Finally, we apologize for the length of our comments, but we were aiming to bring as much clarity as we could when responding to all the excellent points raised by the reviewer.\n\n(W1) **The framework depends on [...]\n\n### Initial Comments - Part 1\nWe are deeply thankful to the reviewer for their insightful feedback and we are grateful for their appreciation of our figures and experiments!\n\nWe made our best effort to integrate their feedback which can be found in the provided revised version (changes marked in blue). Furthermore, we provide some comments below on some specific points that the reviewer thoughtfully drew our attention to. We apologize in advance for the length of our comments, but given the detailed review, we were compelled to address every single point. We sincerely hope that the reviewer fi [...]\n\n### Initial Comments - Part 2\n(continued)\n\n(W3) **What kind of correctness guarantee can be obtained by approximately evaluating Shapley values with KNN surrogate models?**\n\nThis is an excellent point that, to the best of our knowledge, targets a key shortcoming of the current state of the art. Unfortunately, we are not aware of any existing work that tries to explore theoretical *correctness guarantees* for computing the Shapley value using KNN surrogate models. There is prior work that addresses the original problem of KNN-based Shapley values without data preprocessing pipelines which is fo [...]\n\n### Initial Comments - Part 2\n(continued)\n\n(W3) **On inverting the pipeline manually as a baseline approach / on the significance of a method that captures data preprocessing**\n\nIt looks like this point has several related but distinct questions raised so we would like to address them separately.\n\n* **How do the baselines handle data preprocessing pipelines?** - The scenario we present in the paper always assumes importance being computed for raw data (i.e. before preprocessing; we argue below why this scenario is significant). To make existing baselines (e.g. Truncated Monte Carlo) handle thi [...]\n\n### Initial Comments - Part 2\n(continued)\n\n(W6) **The intuitions behind modified KNN and quality metrics in section 4.1 are unclear**\n\nWe understand this comment to mean that the KNN model and additive quality metrics are introduced too abruptly without explaining why we are introducing them in the first place. We add a brief motivational paragraph at the beginning of section 4.1 (marked in blue).\n\n(W7) **It would be good, if possible, to describe counting oracles in a more intuitive way**\n\nWe apologize for the density of section 4.2. Our goal was to introduce key building blocks of our method [...]\n\n### Initial Comments - Part 3\n(continued)\n\n(Q2) **Are modified KNN and quality metrics based on previous work or something new that the authors propose?**\n\nFirstly, just to clarify, the KNN model defined in section 4.1 is actually the vanilla KNN model. When we refer to that definition as \"specific\", we simply mean that it is slightly \"alternative\" because we split it into components that allow us to construct the counting oracle later on. Secondly, even though we are not specifically aware that someone else was using the definitions in the exact form defined in our paper, we would not count t [...]", + "initial_scores": [ + 6, + 6, + 8, + 8 + ], + "score_mean": 7.0, + "score_variance": 1.33, + "score_spread": 2, + "score_min": 6, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "This paper proposes a novel data debugging framework to identify influential training examples in a machine learning pipeline (including data preprocessing) via efficient Shapley value computation.\n\n**STRENGTHS**\n\n(1) The paper is thorough in introducing the new problem setting and motivating the significance of this problem.\n\n(2) The proposed approach is technically sound with time complexity analysis.\n\n(3) An extensive empirical evaluation is conducted to assess the performance of the proposed approach.\n\n\n**WEAKNESSES**\n\n(1) There were a fair number of questions/concerns regarding the clarity of presentation and some additional experiments. However, the authors have done a good job with addressing these concerns in great detail in their rebuttal as well as revising their paper to incorporate them.\n\n(2) In the related work, there isn't much mention of Shapley value-based works in the context of data valuation which is highly related to data importance in this work. The authors can consider the following references (and the references therein) and discuss whether such works can be used within their pipeline:\n\nProbably Approximate Shapley Fairness with Applications in Machine Learning. AAAI 2023.\n\nData Valuation in Machine Learning: \"Ingredients\", Strategies, and Open Challenges. IJCAI 2022.\n\nhttps://github.com/daviddao/awesome-data-valuation\n\nThe authors are strongly encouraged to address the above concerns and the reviewers' in their revised paper.", + "forum_id": "qxGXjWxabq", + "primary_area": "infrastructure, software libraries, hardware, etc.", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_V8Vh", + "review_id": "HkYQb3vZP0", + "scores": { + "rating": 6, + "soundness": 2, + "presentation": 2, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 3314, + "edit_detected": true, + "edit_delta_seconds": 3028999, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_guJp", + "review_id": "09tJ3FvZlV", + "scores": { + "rating": 6, + "soundness": 4, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 3157, + "edit_detected": true, + "edit_delta_seconds": 1033802, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_bts9", + "review_id": "zUWXq24jUV", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 2 + }, + "review_text_chars": 2224, + "edit_detected": true, + "edit_delta_seconds": 1108372, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_5GXy", + "review_id": "bOZoIZYSZh", + "scores": { + "rating": 8, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 2710, + "edit_detected": true, + "edit_delta_seconds": 2531548, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8826.md b/open_review/iclr2024_8826.md new file mode 100644 index 0000000000000000000000000000000000000000..f79c4759754ba7d7b461ddca8922c5bc59026578 --- /dev/null +++ b/open_review/iclr2024_8826.md @@ -0,0 +1,865 @@ + + +## DATA DEBUGGING WITH SHAPLEY IMPORTANCE OVER MACHINE LEARNING PIPELINES + +Authors withheld for review + +## ABSTRACT + +When a machine learning (ML) model exhibits poor quality (e.g., poor accuracy or fairness), the problem can often be traced back to errors in the training data. Being able to discover the data examples that are the most likely culprits is a fundamental concern that has received a lot of attention recently. One prominent way to measure "data importance" with respect to model quality is the Shapley value. Unfortunately, existing methods only focus on the ML model in isolation, without considering the broader ML pipeline for data preparation and feature extraction, which appears in the majority of real-world ML code. This presents a major limitation to applying existing methods in practical settings. In this paper, we propose Datascope, a method for efficiently computing Shapley-based data importance over ML pipelines. We introduce several approximations that lead to dramatic improvements in terms of computational speed. Finally, our experimental evaluation demonstrates that our methods are capable of data error discovery that is as effective as existing Monte Carlo baselines, and in some cases even outperform them. We release our code as an open-source data debugging library available at [URL removed] + +## 1 INTRODUCTION + +Data quality issues have been widely recognized to be among the main culprits for underperforming machine learning (ML) models, especially when it comes to tasks that are otherwise considered solved by ML (Liang et al., 2022; Ilyas & Chu, 2019). A common type of data errors are wrong labels. For example, biomedical images can be misdiagnosed due to human error which results in label errors. Many systematic methods have been developed to repair _data errors_ (Rekatsinas et al., 2017; Krishnan et al., 2017). Unfortunately, in many practical scenarios, repairing data in a reliable manner requires human labor, especially if humans have been involved in producing the original data. The high cost of this _data debugging_ process has led to a natural question – Can we prioritize data repairs based on some notion of _importance_ which leads to the highest quality improvements for the downstream model? + +In recent years, several approaches have emerged to answer these questions. One line of work suggests expressing importance using _influence functions_ (Koh & Liang, 2017) which is essentially a gradientbased approximation of the leave-one-out (LOO) method. Here, the importance of a training data example is expressed as the difference in the model quality score observed after removing that data example from the training set. This quality difference is referred to as the _marginal contribution_ of that data example. Another line of work proposes _Shapley value_ as a measure of importance (Ghorbani & Zou, 2019; Jia et al., 2019b; 2021) that has a long history in game theory (Shapley, 1951). In the context of data importance, it can be seen as a generalization of LOO. Namely, instead of measuring the marginal contribution over the entire training set, we measure it over every subset of the training set and then compute a weighted average. Apart from having many useful theoretical properties, the Shapley value was shown to be very effective in many data debugging scenarios (Jia et al., 2021). On the flip side, because the Shapley value requires enumerating _exponentially_ many subsets, computing it is _intractable_ in practical settings. There have been different ways to _approximate_ this computation. This includes Monte Carlo (MC) sampling (Ghorbani & Zou, 2019) or group testing (Jia et al., 2019b) to sample subsets of training data, train models as black boxes on those subsets, compute marginal contributions of training data examples, and aggregate the results to compute the final approximated result. Unfortunately, re-training the model can be quite costly, especially for large models. Some methods try to overcome this by leveraging proxy models such as K-nearest neighbors + +1 + +**==> picture [386 x 84] intentionally omitted <==** + +**----- Start of picture text -----**
+Source
ImportanceData Country Training Data Avg. Income Data Preprocessing Operators Prepared Model Quality
???????????? Origin USUSFRFR blackother Race $34,375$31,133 Age26 18 Wealthy yesno Inner Join join AugmentRandom fork Standard reduce+map ScalerIndicatorMissing mapreduce+map K-Means FeatureUnion map ImportanceData 0.710.640.43 Training Data Features Labels TrainedModel AccuracyFairnessROC AUCMetrics
??? FR white 65 no
computed with respect to
Data Errors
Data Debugging Occurs Here Existing Methods Assume This Setting
**----- End of picture text -----**
+ +Figure 1: Existing data debugging methods were designed to compute data importance of already preprocessed data. In typical real-world scenarios, data errors occur in source datasets, before being passed through a data preparation pipeline. The goal of our work is to help close that gap. + +(KNN) (Jia et al., 2019a) and exploiting its simple structure to derive dynamic programming (DP) algorithms for computing the Shapley value. + +One major trait of the existing work in this space is that it primarily focuses on computing the importance of data examples in the _prepared training dataset_ . This poses a challenge in practical settings where data errors typically occur earlier in the data preparation process. In most realistic scenarios, this process involves taking one or more _source training datasets_ , joining them together if needed, and applying a composition of data preprocessing operators (Figure 1). The simplest operators may represent a 1-1 _map_ of input dataset elements to output dataset elements (referred to as _tuples_ in the data management literature). Some operators, such as the data augmentation operator, _fork_ the data by converting a single input data tuple into multiple output tuples. On the other hand, an output tuple of a _join_ operator can be the product of multiple input tuples. Finally, some operators involve a _reduce_ operation which involves computing some intermediate result based on the entire input dataset (e.g. the mean and standard deviation) and then applying that result to output tuples. + +This new setting impacts existing approximation methods in several ways. Firstly, given that it is a black box approach, Monte Carlo sampling (Ghorbani & Zou, 2019) can directly be applied to this setting. However, this comes with the computational cost of re-running the data preprocessing operators for every subset of the training data that we sample. Depending on the complexity of the preprocessing pipeline, this cost can be quite significant. Secondly, the existing KNN-based Shapley approximation method (Jia et al., 2019a) strictly relies on the ability to independently remove tuples from the prepared training dataset in order to compute their marginal contributions. Given the aforementioned complexity induced by preprocessing operators, the tractability result of the previous KNN-based method does not hold directly in this new setting. Therefore, a novel analysis is needed to see whether the Shapley value computation can be made tractable depending on the structure of the data preprocessing pipeline. + +**Contributions.** In this paper, we focus on studying the relationship between the structure of ML pipelines and our ability to efficiently compute Shapley values of source data examples. We make use of data provenance (Green et al., 2007; Cheney et al., 2009), a simple yet powerful theoretical toolkit for tracing individual data examples as they pass through a data processing pipeline. We propose ease.ml/datascope, a framework for modeling the interdependence between tuples induced by data preprocessing operators. Our contributions can be summarized as follows: + +- We apply the notion of data provenance to ML pipelines in order to relate the input and output datasets as a function of the pipeline structure. We introduce the notion of a _“canonical pipeline”_ which we simply define as a distinct pipeline structure that lends itself to efficiently relating pipeline inputs and outputs, as well as efficiently computing Shapley values. We identify three classes of canonical pipelines: map, fork and one-to-many join. (section 3) + +- We show how approximating pipelines as canonical leads to significant speed-ups of Monte Carlo methods for Shapley computation. We also demonstrate how the majority of real-world ML pipelines can be approximated as canonical. (section 3) + +- We combine canonical pipelines with the K-nearest neighbor as a proxy model. We show how canonical pipelines can be compiled into efficient counting oracles and used to derive PTIME Shapley computation algorithms. Under this framework, the KNN Shapley method from prior work represents a special case applicable to map pipelines. (section 4) + +- We conduct an extensive experimental evaluation by applying all considered Shapley computation methods to the task of repairing noisy labels in various real-world datasets. We conclude that in most cases our method is able to achieve solid performance in terms of reducing the cost of label repair while demonstrating significant improvements in computational runtime. (section 5) + +2 + +## 2 PROBLEM: COMPUTING THE SHAPLEY VALUE OVER ML PIPELINES + +**Shapley Value.** Let _Dtr_ be a training dataset and _u_ some utility function used to express the _value_ of any subset of _Dtr_ by mapping it to a real number. Then, the Shapley value, denoting the importance of a tuple _ti ∈Dtr_ , is defined as + +**==> picture [358 x 22] intentionally omitted <==** + +Intuitively, the _importance_ of _ti_ for a subset _D ⊆Dtr\{ti}_ is measured as the difference between the utility _u_ ( _D ∪{ti}_ ) _with ti_ and the utility _u_ ( _D_ ) _without ti_ . The Shapley value takes a weighted average of all of the 2 _[|D][tr][|−]_[1] possible subsets _D ⊆Dtr\{ti}_ , which enables it to have a range of desired properties that significantly benefit data debugging tasks, often leading to more effective data debugging mechanisms compared to other leave-one-out methods. + +**Quality of ML Pipelines.** As mentioned, the utility function _u_ is defined to measure the value of any subset of _Dtr_ , which in our context corresponds to the _source training dataset_ . We assume that this dataset can be made up of multiple sets of tuples (e.g. a multi-modal dataset involving a set of images and a table with metadata). The _validation dataset Dval_ is defined in a similar manner. + +Then, let _f_ be a _data preprocessing pipeline_ that transforms any training data subset _D ⊆Dtr_ into a set of tuples _{ti_ = ( _xi, yi_ ) _}i∈_ [ _M_ ] made up of _M_ feature and label pairs that the ML training algorithm _A_ takes as input. Finally, we obtain a trained ML model _A ◦ f_ ( _D_ ) which we can evaluate using some model quality metric. Based on this, we can define the utility function _u_ used to express the value of a training data subset _D_ as a measure of the quality of an ML pipeline _A ◦ f_ ( _D_ ) when scored using _Dval_ . Formally, we write this as + +**==> picture [266 x 11] intentionally omitted <==** + +Here, _m_ can be any model quality metric such as accuracy or a fairness metric such as equalized odds difference. Note that, for simplicity, we assume that we are applying the same pipeline to both the training data subset _D_ and the validation dataset _Dval_ . In general, these two pipelines can differ as long as the data format of _f_ ( _Dval_ ) is readable by the trained ML model. For example, a data augmentation operation is typically applied to training data only (as is the case in our experiments). **Core Technical Problem.** In this work, we focus on the ML pipeline utility _u_ defined in Equation 2 and we ask the following question: _How can we approximate the structure of u in order to obtain Shapley-based data importance that is (1) computationally fast; and (2) effective at downstream data debugging tasks?_ + +## 3 CANONICAL ML PIPELINES + +In this section, we take a closer look at a data preprocessing pipeline _f_ that can, in principle, contain an arbitrarily complex set of data processing operators. This complexity can result in a heavy overhead on the cost of computing the Shapley value. This overhead comes from having to re-evaluate the pipeline many times for different training data subsets. In this section, we describe a framework for minimizing that overhead by solving a concrete technical problem. + +**Problem 1.** We are given a training dataset _Dtr_ , a data preprocessing pipeline _f_ , and the output set _f_ ( _Dtr_ ). For an arbitrary subset _D ⊆Dtr_ and some tuple _t[′] ∈ f_ ( _Dtr_ ), decide whether _t[′] ∈ f_ ( _D_ ) in time _O_ (1) w.r.t. _|Dtr|_ . + +It is easy to see how solving this problem virtually removes the cost of computing the pipeline output of an arbitrary training data subset. Next, we describe a reduced version of the _data provenance_ framework (Green et al., 2007; Cheney et al., 2009) which we will apply to solve this problem. + +## 3.1 DATA PROVENANCE FOR ML PIPELINES + +We define a set of binary variables _A_ and associate a variable _at ∈ A_ with every training data tuple _t ∈Dtr_ . Each subset _D ⊆Dtr_ can be defined using a _value assignment v_ ( _a_ ) _�→{_ 0 _,_ 1 _}_ , where _v_ ( _at_ ) = 1 means that _t ∈D_ . We can use _Dtr_ [ _v_ ] to denote _D_ . We write _VA_ to denote the set of all the 2 _[|A|]_ possible value assignments. Next, with every tuple _t[′] ∈ f_ ( _Dtr_ ) we associate a “provenance polynomial” _pt′_ which is a logical formula with variables in _A_ (e.g. _a_ 1 + _a_ 2 _· a_ 3). For a given value assignment _v_ , we define an evaluation function eval _v_ ( _pt′_ ) _�→{_ 0 _,_ 1 _}_ which simply follows the + +3 + +**==> picture [363 x 56] intentionally omitted <==** + +**----- Start of picture text -----**
+(a) Map pipeline (b) Fork pipeline (c) One-to-many join pipeline (d) Distribution of canonical pipelines
Purely Canonical
Approximately Canonical
50k Other
0 0 3 6 9 12 15 18
Pipeline Size
Pipelines
of
Number
**----- End of picture text -----**
+ +Figure 2: (a-c) Three types of canonical pipelines where data provenance allows us to efficiently compute subsets. (d) A majority of real-world ML pipelines (Psallidas et al., 2019) either already exhibit a canonical pipeline pattern, or are easily convertible to it using our approximation scheme. + +standard logical reduction rules to determine the truthiness of _pt′_ given _v_ . For a tuple _t[′] ∈ f_ ( _Dtr_ ) and a value assignment _v_ , we define _t[′] ∈ f_ ( _Dtr_ [ _v_ ]) iff eval _v_ ( _pt′_ ) = 1. It is easy to see that we can directly apply this framework to solve Problem 1. However, to respect the _O_ (1) time complexity, _|pt|_ must be _O_ (1) w.r.t. _|Dtr|_ . In subsection 3.2, we explore when this condition is met. + +**Redefining the Shapley value.** Using this framework, we can rewrite the Shapley value as: + +**==> picture [358 x 20] intentionally omitted <==** + +The notation [ _v_ ; _ai ← X_ ] for _X ∈{_ 0 _,_ 1 _}_ means that we augment _v_ with _v_ ( _ai_ ) = _X_ . Also, we define the support of _v_ as supp( _v_ ) := _{a ∈ A_ : _v_ ( _a_ ) = 1 _}_ . + +## 3.2 APPROXIMATION: ML PIPELINES ARE CANONICAL + +As mentioned above, solving Problem 1 in _O_ (1) time depends on _|pt|_ being _O_ (1) w.r.t. _|Dtr|_ . This does not necessarily hold true for an arbitrary pipeline _f_ . However, it does hold true for some classes of pipelines, which we refer to as _canonical pipelines_ . Hence, if we approximate the pipeline _f_ as canonical, then we can solve Problem 1. The three classes of canonical pipelines that we identified to be useful in the context of this work are: map, fork, and one-to-many join pipelines (Figure 2). + +**Map pipelines.** This is the simplest form of pipeline where each input tuple _t ∈Dtr_ corresponds to at most one output tuple _t[′] ∈ f_ ( _Dtr_ ), after passing through an optional per-tuple mapping function _µ_ ( _t_ ) _�→ t[′]_ (Figure 2a). Examples of such pipelines include missing value indicators, polynomial feature generators, pre-trained embeddings, etc. + +**Fork pipelines.** In this pipeline, each input tuple _t ∈Dtr_ can be associated with multiple output tuples _t[′] ∈ f_ ( _Dtr_ ), but a single output tuple is associated with a single input tuple (Figure 2b). A prominent example is a data augmentation pipeline that outputs several slightly altered versions of every input tuple. + +**One-to-many Join pipelines.** This pipeline contains table join operators like the one in Figure 1. Here, the training dataset _Dtr_ = _{Dt, Da_ 1 _, . . . , Dak }_ is made up of multiple tuple sets that form a "star schema". This means that any training example tuple _t ∈Dt_ can be joined with no more than one tuple from each of the auxiliary tables _Da_ 1 _, . . . , Dak_ . Note that, for this pipeline, the provenance polynomial of each output tuple is a Boolean product of variables associated with all tuples that were joined to produce that output tuple (Figure 2c). + +## 3.3 APPROXIMATING REAL ML PIPELINES + +Even though many real-world pipelines can be directly represented as our canonical pipelines, there is still a solid amount that cannot be represented. Nevertheless, upon taking a closer look, we can identify a class of pipelines that we might be able to approximately represent. These are the pipelines that exhibit an _estimator-transformer_ pattern _f_ ( _D_ ) = map(reduce( _D_ ) _, D_ ). Specifically, they are made up of some reduce operation performed on the entire dataset which produces some intermediate data, which is used to parameterize a map operation which is performed on individual tuples. An example of such a pipeline is a min-max scaler, where the reduce step computes min and max statistics for each feature, which are then used to re-scale individual tuples. + +The reduce step of this pipeline causes every output tuple to depend on every input tuple, which does not fit into our canonical pipeline framework. However, we can still approximate such pipelines by isolating the intermediate data produced by reduce( _Dtr_ ). Then, conditioned on that intermediate data, we can re-define our pipeline _f_ to be a _conditional map_ pipeline _f[∗]_ as follows: + +_f_ ( _D_ ) = map(reduce( _D_ ) _, D_ ) _�→ f[∗]_ ( _D_ ) = map(reduce( _Dtr_ ) _, D_ ) _._ + +**Evaluation of Effectiveness.** We evaluate our method of approximating pipelines as canonical and apply it directly to compute the Shapley value using the Truncated Monte Carlo (TMC) sampling + +4 + +**==> picture [396 x 97] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Random Augment + Missing Indicator + Standard Scaler + K-Means
(a) Target Model: XGBoost (b) Target Model: Logistic Regression
100% 100% 10 [3] 666.48
0.7 80% 10 [3] 611.28 0.7 80%
60% 291.23 60% 10 [2]
0.6 40% 10 [2] 55.11 0.6 40% 48.45 48.57
0.5 20% 31.07 0.5 20% 10 [1]
0% 50% 100% 0% 0% 50% 100% 10 [1] 0.4 0% 50% 100% 0% 0% 50% 100% 2.88
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 Datascope TMC x10 TMC x100 Datascope TMC x100
Accuracy Accuracy
Compute Time [s] Compute Time [s]
Portion of Dirty Labels Found Portion of Dirty Labels Found
**----- End of picture text -----**
+ +Figure 3: An ML pipeline with an _estimator-transformer_ pattern approximated as a canonical pipeline can achieve comparable performance on a label repair task, with significantly faster runtime. + +method (Ghorbani & Zou, 2019). We run the evaluation for 10 and 100 Monte Carlo iterations (x10/x100). We can see that our approach exhibits comparable performance with significant gains in computational runtime (Figure 3). See section 5 for more details about the experimental protocol. + +**Statistics of Real-world Pipelines.** A natural question is how common these families of pipelines are in practice. Figure 2d illustrates a case study that we conducted using 500K real-world pipelines provided by Microsoft (Psallidas et al., 2019). We divide pipelines into three categories: (1) “pure” map/fork pipelines, based on our definition of canonical pipelines; (2) “conditional” map/fork pipelines, which are comprised of a reduce operator that can be effectively approximated using the scheme we just described; and (3) other pipelines, which contain complex operators that cannot be approximated. We observe that a vast majority of pipelines we encountered in our case study fall into the first two categories that we can effectively approximate using our canonical pipelines framework. + +## 4 SHAPLEY VALUE OVER CANONICAL PIPELINES + +In section 3 we described an approach for treating the data preprocessing pipeline _f_ as a white box which led us to directly attainable performance improvements of Monte Carlo Shapley methods. However, these methods still rely on treating the model _A_ as a black box and retraining it for different training data subsets, which often results in slow runtime. In this section, we are interested in PTIME algorithms that give orders of magnitude faster runtime and thus open the door for interactive data debugging. Specifically, we focus on the following technical problem: + +**Problem 2.** We are given a training dataset _Dtr_ , a data preprocessing pipeline _f_ and a model quality metric _m_ computed over a given validation dataset _Dval_ . Compute the Shapley value (as defined in Equation 1) of a given tuple _ti ∈Dtr_ for the ML pipeline utility (as defined in Equation 2) in time polynomial w.r.t. _|Dtr|_ and _|Dval|_ . + +We will now explore additional approximations we can make on the model _A_ as well as the model quality metric _m_ . Specifically, we replace the model with a KNN classifier, and we assume that the quality metric has a specific additive structure. We then sketch the outline of a solution to the given problem that leverages these approximations. It should be noted that although prior work has explored the idea of using the KNN proxy model for PTIME algorithms (Jia et al., 2019a), to the best of our knowledge, the work presented in this paper is the first to analyze the relationship between the structure of different types of ML pipelines and the computational complexity of the Shapley value computation. A brief discussion about the limitations of prior work is presented in Appendix A. + +## 4.1 APPROXIMATION: THE MODEL IS KNN AND THE MODEL QUALITY METRIC IS ADDITIVE + +Here we define two structures which we will use as building blocks for approximating ML pipelines: the KNN model and additive model quality metrics. In the following section we will show how these building blocks can be leveraged to provide PTIME algorithms for computing Shapley values. **K-Nearest Neighbor (KNN) Model.** We provide a specific definition of the KNN model in order to facilitate our further analysis. Given some set of training tuples _D_ and a validation tuple _tval_ , the KNN model _AKNN_ ( _D_ ) can be defined as follows: + +**==> picture [338 x 24] intentionally omitted <==** + +Here, top _K_ ( _D | tval_ ) returns a tuple _tK ∈D_ that takes the _K_ -th position when ranked by similarity with the validation tuple _tval_ . Furthermore, tally( _D | tK, tval_ ) tallies up the class labels of all tuples + +5 + +in _D_ that have similarity with _tval_ higher or equal to _tK_ . It returns _γ_ , a label tally vector that is indexed by class labels (i.e. _γ_ : _Y →_ N). Note that the sum of all elements in _γ_ must be _K_ . Given a set of classes _Y_ , we define Γ _Y,K_ to be the set of all possible label tally vectors. Finally, assuming a standard majority voting scheme, argmax _y∈Y_ returns the predicted class label with the highest tally. **Additive Model Quality Metric.** We say that a model quality metric is _additive_ if there exists a tuple-wise metric _mT_ such that _m_ can be written as: + +**==> picture [338 x 23] intentionally omitted <==** + +Here, _w_ is a scaling factor that can depend only on _Dval_ . The tuple-wise metric _mT_ : ( _ypred, tval_ ) _�→_ [0 _,_ 1] takes a validation tuple _tval ∈Dval_ as well as a class label _ypred ∈Y_ predicted by the model for _tval_ . It is easy to see that some popular utilities, such as validation accuracy, are additive, e.g., the accuracy utility is simply defined by plugging _mT_ ( _ypred,_ ( _xval, yval_ )) := 1 _{ypred_ = _yval}_ and _w_ := 1 _/|Dval|_ into Equation 5. In subsection E.3, we show even more examples of such metrics. + +## 4.2 COMPUTING THE SHAPLEY VALUE + +We now outline our approach to computing the Shapley value of a training data tuple _ti ∈Dtr_ using our approximation described in subsection 3.2 and subsection 4.1. We start off from Equation 3 and plug in _u_ as defined in Equation 2. Next, since we assume that our model quality metric is additive, we plug in _m_ as defined in Equation 5. By rearranging the sums, we can write the Shapley formula as _φ_ ( _ti_ ) = _w ·_[�] _tval∈f_ ( _Dval_ ) _[φ]_[(] _[t][i][, t][val]_[)][, where] _[ φ]_[(] _[t][i][, t][val]_[)][ is a validation tuple-wise Shapley value.] Under the assumption that our model is KNN, we can plug in _A_ as defined in Equation 4, rearrange the sums, and arrive at the following definition of _φ_ ( _ti, tval_ ): + +**==> picture [383 x 15] intentionally omitted <==** + +We define _m_ ∆( _γ[′] , γ[′′] | tval_ ) := _mT_ (argmax _y∈Y γ[′′]_ ( _y_ ) _, tval_ ) _− mT_ (argmax _y∈Y γ[′]_ ( _y_ ) _, tval_ ) as the differential metric. + +**Counting Oracles.** The function _ω_ in Equation 6 is a _counting oracle_ which we introduce to help us isolate and analyze the exponential sum from Equation 3. We define it as: + +**==> picture [383 x 48] intentionally omitted <==** + +Intuitively, the counting oracle is a function that returns the number of value assignments with exactly _α_ variables set to 1, and the label tally of the top-K tuples will be exactly _γ[′′]_ when _ti_ is included in the training dataset, and _γ[′]_ when it is excluded. By looking at Equation 6 we can observe that all the sums are polynomial w.r.t. the size of data. Thus, we arrive at the following theorem (which we prove in Appendix E): + +**Theorem 4.1.** _If we can compute the counting oracle ω as defined in Equation 7 in time polynomial w.r.t. |Dtr| and |Dval|, then we can compute the Shapley value of a tuple ti ∈Dtr in time polynomial w.r.t. |Dtr| and |Dval|._ + +The above theorem outlines a solution of Problem 2, given that we can find a PTIME solution for computing the counting oracle. Next, we cover a solution that models the problem as a model counting problem by leveraging a data structure which we call Additive Decision Diagrams (ADD’s). **Counting Oracle as Model Counting over ADD’s.** We use Additive Decision Diagram (ADD) to compute the counting oracle _ωt,t′_ (Equation 7). An ADD represents a Boolean function _ϕ_ : _VA → E ∪{∞}_ that maps value assignments _v ∈VA_ to elements of some set _E_ or a special invalid element _∞_ (see Appendix C for more details). For our purpose, we define _E_ := _{_ 1 _, ..., |A|} ×_ Γ _Y,K ×_ Γ _Y,K_ . Then, we define a function over Boolean inputs _ϕ_ ( _v | ti, , tval, t[′] , t[′′]_ ) as follows: + +**==> picture [383 x 50] intentionally omitted <==** + +6 + +**==> picture [396 x 93] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult Pipeline: Random Augment + Missing Indicator + Standard Scaler + K-Means
(a) Target Model: XGBoost (b) Target Model: Logistic Regression
0.7 100%80% 10 [3] 611.28 0.7 100%80% 10 [3] 666.48
291.23
0.6 60% 10 [2] 55.11 0.6 60% 10 [2] 48.45 48.57
40% 31.07 40%
0.5 20% 10 [1] 0.5 20% 10 [1]
2.88
0% 50% 100% 0% 0% 50% 100% 1.52 0.4 0% 50% 100% 0% 0% 50% 100% 1.53
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random Datascope KNN TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100
Accuracy Accuracy
Compute Time [s] Compute Time [s]
Portion of Dirty Labels Found Portion of Dirty Labels Found
**----- End of picture text -----**
+ +Figure 4: Computing the Shapley value by using KNN as a proxy model can achieve comparable performance on a label repair task, with orders of magnitude faster runtime. + +If we can construct an ADD that computes _ϕ_ ( _v | ti, tval, t[′] , t[′′]_ ), then the model counting operation on that ADD exactly computes _ω_ ( _α, γ[′] , γ[′′] | ti, tval, t[′] , t[′′]_ ). As the complexity of model counting is _O_ ( _|N| · |E|_ ) (see Equation 12) and _|E|_ is polynomial in the data size, we have the following result: + +**Theorem 4.2.** _If we can represent the ϕt,t′_ ( _v_ ) _in Equation 8 with an ADD of size polynomial in |A| and |Dtr[f][|][, we can compute the counting oracle][ ω][t,t][′][in time polynomial of][ |][A][|][ and][ |D] tr[f][|][.]_ + +A proof is provided in Appendix E. For specific canonical pipelines, we have the following corollaries. **Corollary 4.1. (One-to-Many Join Pipelines)** _For the K-NN accuracy utility and a one-to-many_ join _pipeline, which takes as input two datasets, DF and DD, of total size |DF |_ + _|DD|_ = _N and outputs a joined dataset of size O_ ( _N_ ) _, the Shapley value can be computed in O_ ( _N_[4] ) _time._ + +**Corollary 4.2. (Fork Pipelines)** _For the K-NN accuracy utility and a_ fork _pipeline, which takes as input a dataset of size N and outputs a dataset of size M , the Shapley value can be computed in O_ ( _M_[2] _N_[2] ) _time._ + +**Corollary 4.3. (Map Pipelines)** _For the K-NN accuracy utility and a_ map _pipeline, which takes as input a dataset of size N , the Shapley value can be computed in O_ ( _N_[2] ) _time._ + +**Evaluation of Effectiveness.** We evaluate our method of computing the Shapley value by using KNN as a proxy model (Figure 4). We can see that its effectiveness is comparable even when applied to the task of label repair over pipelines that have different models. On the other hand, we can see that the computational cost is orders of magnitude lower when compared to MC methods. + +## 5 EXPERIMENTAL EVALUATION + +We evaluate the performance of our method by applying it to a common data debugging scenario – label repair. The goal of this empirical study was to validate that: (1) our approximations enable significantly faster computation of Shapley values, and (2) in spite of any inherent biases, these approximations still manage to enable effective data debugging. + +## 5.1 EXPERIMENTAL SETUP + +**Protocol.** We conduct a series of experimental runs that simulate a real-world importance-driven data debugging workflow. We developed a custom experimental infrastructure based on dcbench (Eyuboglu et al., 2022). In each experimental run, we select a dataset, pipeline, model, and data repair method. If a dataset does not already have human-generated label errors, we follow the protocol of Li et al. (2021) and Jia et al. (2021) and artificially inject 50% of label noise. We compute the importance using a _validation dataset_ and use it to prioritize our label repairs. We divide the range between 0% data examined and 100% data examined into 100 checkpoints. At each checkpoint, we measure the quality of the given model on a separate _test dataset_ using some metric (e.g. accuracy). We also measure the time spent on computing importance scores for the entire training dataset. We repeat each experiment 10 times and report the median as well as the 90-th percentile range (either shaded or with error bars). + +**Data Debugging Methods.** We apply various methods of computing data importance: + +- Random — Importance is a random number and thus we apply data repairs in random order. + +- TMC x10 / x100 — Shapley values computed using the Truncated Monte-Carlo (TMC) method (Ghorbani & Zou, 2019), with 10 and 100 Monte-Carlo iterations, respectively. + +- Datascope TMC x10 / x100 — This applies our method of approximating pipelines using data provenance over canonical pipelines to the TMC method of computing the Shapley value. + +7 + +**==> picture [394 x 70] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: XGBoostOptimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: XGBoostOptimize for: Equalized Odds Difference
0.80.6 0.40.2 1010 [2][0] 4.0698.765.67 5.4696.97 0.80.6 0.5 1010 [3][1] 547.265051.1413.33 55177.9138.88
0.0 0.04 0.0 0.24
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
Accuracy Difference Accuracy Difference
Equalized Odds Compute Time [s] Equalized Odds Compute Time [s]
**----- End of picture text -----**
+ +Figure 5: Under our framework it is possible to optimize for model quality metrics other than accuracy. Here we show a commonly used fairness metric – equalized odds difference (lower is better). Given that approximating this metric is more complex, optimal results are achieved by using KNN Interactive which recomputes the Shapley value after each data repair checkpoint. + +- Datascope KNN — This is our method for efficiently computing the Shapley value over ML pipelines by using the KNN as a proxy model. + +- Datascope KNN Interactive — While the above methods compute importance only once at the beginning of the repair process, the speed of our method allows us to _recompute_ the importance after _each_ data repair checkpoint. + +**Data Preprocessing Pipelines.** We obtained a dataset with about 500 _K_ machine learning workflow instances from internal Microsoft users (Psallidas et al., 2019). Each workflow consists of a dataset, a data preprocessing pipeline, and an ML model. We identified a handful of the most representative pipelines and translated them to sklearn pipelines. All pipelines used in our experiments are listed in Table 1 along with the operators they + +Table 1: Data preprocessing pipelines used in experiments. + +|**Pipeline**|**Dataset**
**Modality**
**Purely**
**Canonical**
**Operators**| +|---|---| +|Identity
Standard Scaler
Logarithmic Scaler
PCA
MissingIndicator+KMeans|tabular
true
_∅_
tabular
false
`StandardScaler`
tabular
false
`Log1P`_◦_`StandardScaler`
tabular
false
`PCA`
tabular
false
`MissingIndicator`_◦_`KMeans`| +|Gaussian Blur
Histogram of Oriented Gradients
ResNet18 Embedding Model
MobileViT Embedding (Mehta & Rastegari,2022)|image
true
`GaussBlur`
image
true
`HogTransform`
image
true
`ResNet18`
image
true
`MobileViT`| +|TFIDF
Tolower+URLRemove+TFIDF
MinLM Embedding(Wang et al., 2020)
ALBERT Embedding (Reimers & Gurevych,2019)|text
false
`CountVectorizer`
_◦_`TfidfTransformer`
text
false
`TextToLower`_◦_`UrlRemover`
_◦_`CountVectorizer`
_◦_`TfidfTransformer`
text
true
`MinLM`
text
true
`Albert`| + +are made up of. Some pipelines are purely canonical, while some involve a reduce operation. + +## 5.2 RESULTS + +In this section, we highlight some of the most interesting results of our empirical analysis and point out some key insights that we can draw. A more extensive experimental analysis is presented in Appendix G. We start off with three general scenarios: (1) accuracy-driven label repair; (2) fairnessdriven label repair to demonstrate usage of different model quality metrics; and (3) label repair in deep learning scenarios. In each one, we study the tradeoff between _computational cost_ of any data repair approach, and the _labor cost_ , which is measured as the amount of data repairs that need to be conducted to deliver the biggest improvement of model quality. Finally, we conduct a scalability analysis of our algorithm to showcase its potential for handling large datasets. + +**Improving Accuracy.** In this set of experiments, our goal is to improve model accuracy with targeted label repairs. In Figure 4 we show one example workflow for the FolkUCI Adult dataset and the pipeline from Figure 1 without the join operator. We evaluate our KNN-based method over pipelines that contain two different ML models: LogisticRegression and XGBoost. We can draw two key conclusions about our KNN-based algorithm. Firstly, given that our KNN-based method is able to achieve comparable performance to Monte Carlo-based methods, we can conclude that KNN can indeed serve as a good proxy model for computing the Shapley value. Secondly, it is able to achieve this performance at only a fraction of the computational cost which makes it even more compelling. + +**Improving Accuracy and Fairness.** Next, we explore the relationship between accuracy and fairness when performing label repairs. In these experiments, we use tabular datasets that have a ‘sex’ feature that we use to compute group fairness using _equalized odds difference_ (Hardt et al., 2016). In Figure 5 we explore the tradeoff between two data debugging goals – the left panel illustrates the behavior of optimizing for accuracy whereas the right panel illustrates the behavior of optimizing for fairness. We first notice that being able to debug specifically for fairness is important because for some datasets improving accuracy does not necessarily improve the fairness of the trained model. Secondly, we can see that even when we do optimize for fairness, not all methods will end up being successful. The best-performing method is Datascope KNN Interactive which is the only one that recomputes the Shapley value at each of the 100 checkpoints (due to the speed of our KNN-based method). It is likely that the complexity of the equalized odds difference as a metric makes it challenging to + +8 + +**==> picture [394 x 86] intentionally omitted <==** + +**----- Start of picture text -----**
+(a) ResNet as target Model (b) ResNet embedding as the preprocessing pipeline (c) Matching Network as target model
Dataset: FashionMNIST Dataset: FashionMNIST Dataset: FashionMNIST
Model: ResNet18 Pipeline: ResNet18 Embedding; Model: Logistic Regression Model: Matching Network
0.8 0.8 3 × 102 × 10 [2][2] 214.86 0.8 10 [4] 641.24
0.6 0.6 142.04 0.6 10 [2] 76.58
10 [2] 105.86 3.30
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random Datascope KNN Datascope TMC x10 Datascope TMC x100
Accuracy Accuracy Accuracy
Compute Time [s] Compute Time [s]
**----- End of picture text -----**
+ +Figure 6: The KNN proxy can offer effective data debugging in various deep-learning scenarios. + +compute the Shapley value. Especially since some interventions on the dataset might end up shifting the optimal path, and only by recomputing are we able to detect this shift. + +**Deep learning pipelines.** We also measured the effectiveness of our approximation methods in several scenarios that involve deep learning models. In Figure 6a we use a pre-trained ResNet-18 model as the target model. We fine-tune it for 5 epochs on a noisy label dataset and see that Datascope KNN fares favorably compared to random label repair. Figure 6b shows the result of applying a pre-trained embedding model and evaluating both the Datascope KNN and the Datascope TMC approximations, where the KNN proxy again shows good performance. Finally, in Figure 6c we show how our method can be used to repair labels of a dataset used as a _support set_ for a one-shot learning neural network. We use the matching networks model (Vinyals et al., 2016) which employs a learned “distance metric” between examples in the test set and those in the support set. This allows us to replace the standard Euclidean distance metric in our KNN proxy model with a custom one and achieve effective label repairs with efficiently computed Shapley values. + +**Scalability.** We evaluate the speed of our algorithm for larger training datasets. We test the runtime for various sizes of the training set (10 _k_ -1 _M_ ), the validation set (100-10 _k_ ), and the number of features (100-1 _k_ ). As expected, the impact of the training set size and validation set size is roughly linear (Figure 7). Even for large datasets, our method can compute Shapley scores in minutes. + +**==> picture [196 x 52] intentionally omitted <==** + +**----- Start of picture text -----**
+10 [2] 10 [2] 10 [2]
10 [1] 10 [1]
10 [0]
10k 100k 1M 100 1k 10k 10 100 1k
Training Set Size Validation Set Size Number of Features
[s] [s] [s]
Time Time Time
Compute Compute Compute
**----- End of picture text -----**
+ +Figure 7: Scalability analysis of our Datascope KNN Shapley algorithm over different training set, validation set, and feature vector sizes. + +## 6 RELATED WORK + +Targeted data repairs have been studied for some time now. Apart from the work mentioned in section 1, a notable piece of work is CleanLab which leverages confident learning to make targeted repairs of noisy labels (Northcutt et al., 2021). Our work focuses on the Shapley value given it was shown to be applicable to many scenarios (Jia et al., 2021). Apart from the data valuation scenario, the Shapley value has also been used for computing feature importance (Lundberg & Lee, 2017). On the other hand, the scope of our work is data importance over ML pipelines. + +Debugging data pipelines has started receiving some attention recently. Systems such as Data X-Ray can debug data processing pipelines by finding groups of data errors that might have the same cause (Wang et al., 2015). Another example is mlinspect which also uses data provenance as an abstraction for automatically analyzing data preprocessing pipelines and discovering data distribution errors (Grafberger et al., 2022). A system called Rain leverages influence functions as a method for analyzing pipelines comprising of a model and a post-processing query (Wu et al., 2020). Rain also uses data provenance as a key ingredient, but their focus is on queries that take as input predictions of a model that has been trained directly on the source data. + +## 7 CONCLUSION AND OUTLOOK + +In this paper, we propose ease.ml/datascope, a framework for representing a wide range of ML pipelines that appear in real-world scenarios with the end goal of efficiently computing the Shapley value of source data examples. We show how this framework can be leveraged to provide significant speed-ups to Monte Carlo-based methods for Shapley value computation. Furthermore, we provide PTIME algorithms for computing the Shapley value using the KNN proxy model for several classes of ML pipelines. Finally, we empirically demonstrate that our methods achieve significant speed-ups over previously developed baselines while demonstrating competitive performance in a downstream data debugging task. Our code is available at [URL removed] + +9 + +## REFERENCES + +- Sanjeev Arora and Boaz Barak. _Computational complexity: a modern approach_ . Cambridge University Press, 2009. + +- R Iris Bahar, Erica A Frohm, Charles M Gaona, Gary D Hachtel, Enrico Macii, Abelardo Pardo, and Fabio Somenzi. Algebric decision diagrams and their applications. _Formal methods in system design_ , 10(2):171–206, 1997. + +- Solon Barocas, Moritz Hardt, and Arvind Narayanan. _Fairness and Machine Learning_ . fairmlbook.org, 2019. [URL removed] . + +- Randal E Bryant. Graph-based algorithms for boolean function manipulation. _Computers, IEEE Transactions on_ , 100(8):677–691, 1986. + +Marco Cadoli and Francesco M Donini. A survey on knowledge compilation. _AI Communications_ , 10(3, 4):137–150, 1997. + +- James Cheney, Laura Chiticariu, and Wang-Chiew Tan. _Provenance in databases: Why, how, and where_ . Now Publishers Inc, 2009. + +- Frances Ding, Moritz Hardt, John Miller, and Ludwig Schmidt. Retiring adult: New datasets for fair machine learning. _arXiv preprint arXiv:2108.04884_ , 2021. + +- Sabri Eyuboglu, Bojan Karlaš, Christopher Ré, Ce Zhang, and James Zou. dcbench: a benchmark for data-centric ai systems, 2022. URL [URL removed] . + +- Amirata Ghorbani and James Zou. Data shapley: Equitable valuation of data for machine learning. In _International Conference on Machine Learning_ , pp. 2242–2251. PMLR, 2019. + +- Stefan Grafberger, Paul Groth, Julia Stoyanovich, and Sebastian Schelter. Data distribution debugging in machine learning pipelines. _The VLDB Journal_ , pp. 1–24, 2022. + +- Todd J Green, Grigoris Karvounarakis, and Val Tannen. Provenance semirings. In _Proceedings of the twenty-sixth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems_ , pp. 31–40, 2007. + +- Moritz Hardt, Eric Price, Eric Price, and Nati Srebro. Equality of opportunity in supervised learning. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 29. Curran Associates, Inc., 2016. URL [URL removed] neurips.cc/paper/2016/file/9d2682367c3935defcb1f9e247a97c0d-Paper.pdf . + +- Ihab F. Ilyas and Xu Chu. _Data Cleaning_ . Association for Computing Machinery, New York, NY, USA, 2019. ISBN 9781450371520. + +- Abhay Jha and Dan Suciu. Knowledge compilation meets database theory: Compiling queries to decision diagrams. In _ACM International Conference Proceeding Series_ , pp. 162–173, 2011. ISBN 9781450305297. doi: 10.1145/1938551.1938574. + +- Ruoxi Jia, David Dao, Boxin Wang, Frances Ann Hubis, Nezihe Merve Gurel, Bo Li, Ce Zhang, Costas J Spanos, and Dawn Song. Efficient Task-Specific data valuation for nearest neighbor algorithms. In _VLDB_ , 2019a. + +- Ruoxi Jia, David Dao, Boxin Wang, Frances Ann Hubis, Nick Hynes, Nezihe Merve Gürel, Bo Li, Ce Zhang, Dawn Song, and Costas J Spanos. Towards efficient data valuation based on the shapley value. In _The 22nd International Conference on Artificial Intelligence and Statistics_ , pp. 1167–1176. PMLR, 2019b. + +- Ruoxi Jia, Xuehui Sun, Jiacen Xu, Ce Zhang, Bo Li, and Dawn Song. Scalability vs. utility: Do we have to sacrifice one for the other in data importance quantification? _CVPR_ , 2021. + +- Thorsten Joachims. A probabilistic analysis of the rocchio algorithm with tfidf for text categorization. Technical report, Carnegie-mellon univ pittsburgh pa dept of computer science, 1996. + +10 + +- Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. _International conference on machine learning_ , 70:1885–1894, 2017. + +- Ron Kohavi et al. Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. In _Kdd_ , volume 96, pp. 202–207, 1996. + +- Sanjay Krishnan, Michael J Franklin, Ken Goldberg, and Eugene Wu. Boostclean: Automated error detection and repair for machine learning. _arXiv preprint arXiv:1711.01299_ , 2017. + +- Yung-Te Lai, Massoud Pedram, and Sarma B. K. Vrudhula. Formal verification using edge-valued binary decision diagrams. _IEEE Transactions on Computers_ , 45(2):247–255, 1996. + +- C. Y. Lee. Representation of switching circuits by binary-decision programs. _The Bell System Technical Journal_ , 38(4):985–999, 1959. doi: 10.1002/j.1538-7305.1959.tb01585.x. + +- Peng Li, Xi Rao, Jennifer Blase, Yue Zhang, Xu Chu, and Ce Zhang. CleanML: A study for evaluating the impact of data cleaning on ML classification tasks. In _36th IEEE International Conference on Data Engineering (ICDE 2020)(virtual)_ , 2021. + +- Weixin Liang, Girmaw Abebe Tadesse, Daniel Ho, L Fei-Fei, Matei Zaharia, Ce Zhang, and James Zou. Advances, challenges and opportunities in creating data for trustworthy ai. _Nature Machine Intelligence_ , 4(8):669–677, 2022. + +- Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), _Advances in Neural Information Processing Systems 30_ , pp. 4765–4774. Curran Associates, Inc., 2017. + +- Mark Mazumder, Colby Banbury, Xiaozhe Yao, Bojan Karlaš, William Gaviria Rojas, Sudnya Diamos, Greg Diamos, Lynn He, Douwe Kiela, David Jurado, et al. Dataperf: Benchmarks for data-centric ai development. _arXiv preprint arXiv:2207.10062_ , 2022. + +- Sachin Mehta and Mohammad Rastegari. Mobilevit: Light-weight, general-purpose, and mobilefriendly vision transformer. 2022. URL [URL removed] . + +- Curtis G. Northcutt, Lu Jiang, and Isaac L. Chuang. Confident learning: Estimating uncertainty in dataset labels. _Journal of Artificial Intelligence Research (JAIR)_ , 70:1373–1411, 2021. + +- Fotis Psallidas, Yiwen Zhu, Bojan Karlaš, Matteo Interlandi, Avrilia Floratou, Konstantinos Karanasos, Wentao Wu, Ce Zhang, Subru Krishnan, Carlo Curino, et al. Data science through the looking glass and what we found there. _arXiv preprint arXiv:1912.09536_ , 2019. + +- Nils Reimers and Iryna Gurevych. Sentence-bert: Sentence embeddings using siamese bert-networks. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing_ . Association for Computational Linguistics, 11 2019. URL [URL removed] . + +- Theodoros Rekatsinas, Xu Chu, Ihab F. Ilyas, and Christopher Ré. Holoclean: Holistic data repairs with probabilistic inference. _Proc. VLDB Endow._ , 10(11):1190–1201, aug 2017. ISSN 2150-8097. doi: 10.14778/3137628.3137631. URL [URL removed] . + +- Peter Ross. Generalized hockey stick identities and n-dimensional blockwalking. _The College Mathematics Journal_ , 28(4):325, 1997. + +- Scott Sanner and David McAllester. Affine algebraic decision diagrams (aadds) and their application to structured probabilistic inference. In _IJCAI_ , volume 2005, pp. 1384–1390, 2005. + +- Lloyd S. Shapley. _Notes on the N-Person Game II: The Value of an N-Person Game_ . RAND Corporation, Santa Monica, CA, 1951. doi: 10.7249/RM0670. + +- L G Valiant. The complexity of computing the permanent. _Theor. Comput. Sci._ , 8(2):189–201, January 1979. + +- Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. _Advances in neural information processing systems_ , 29, 2016. + +11 + +Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. Minilm: Deep selfattention distillation for task-agnostic compression of pre-trained transformers. _Advances in Neural Information Processing Systems_ , 33:5776–5788, 2020. + +- Xiaolan Wang, Xin Luna Dong, and Alexandra Meliou. Data x-ray: A diagnostic tool for data errors. In _Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data_ , SIGMOD ’15, pp. 1231–1245, New York, NY, USA, 2015. Association for Computing Machinery. ISBN 9781450327589. doi: 10.1145/2723372.2750549. URL [URL removed] 2723372.2750549 . + +- Jiaheng Wei, Zhaowei Zhu, Hao Cheng, Tongliang Liu, Gang Niu, and Yang Liu. Learning with noisy labels revisited: A study using real-world human annotations. In _International Conference on Learning Representations_ , 2022. URL [URL removed] . + +- Weiyuan Wu, Lampros Flokas, Eugene Wu, and Jiannan Wang. Complaint-driven training data debugging for query 2.0. In _Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data_ , pp. 1317–1334, 2020. + +- Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017. + +12 + +## A DISCUSSION ABOUT THE LIMITATIONS OF PRIOR WORK + +In this section, we provide a brief outline of the existing KNN approximation method for computing the Shapley value (Jia et al., 2019a) which was instrumental in laying the foundation for applying the KNN proxy model to Shapley computation. However, as we argue in this paper, this work is not directly applicable to ML pipelines as defined in this paper. Note that our goal here is to offer only intuition as to why it is the case, and thus we are leaving out many technical details. In Appendix F we present how the results in (Jia et al., 2019a) can be seen as a special case for computing Shapley values using the 1-NN proxy model. + +The polynomial time approximation to computing Shapley values using the KNN proxy model established by Jia et al. (2019a) relies on several assumptions that do not hold in the context of fork/join pipelines. The prediction of the KNN model (and by extension its accuracy) for any training data (sub)set is strictly dependent on the labels of the top- _K_ data examples that are most similar to some validation example _tval_ for which the KNN model is supposed to predict the label (and by extension result in a measurement of the accuracy of this prediction). To compute the Shapley value of a training data example _ti ∈Dtr_ , we need to know the accuracy difference (i.e. the marginal contribution) that occurs when adding that data example to every possible subset _D ⊆Dtr_ . In simple terms, the method in (Jia et al., 2019a) computes the Shapley value of an input data example by first sorting all data examples according to their similarity with _tval_ . After that, it relies on the observation that in order for _ti_ to end up in the top- _K_ (and thus have a chance of impacting the prediction accuracy of some subset _D ⊆Dtr_ ), of all data examples that are higher than _ti_ in the sorting order, at most ( _K −_ 1) can be present in _D_ . It then computes how many subsets _D ⊆Dtr_ of size _α_ satisfy this condition. Specifically, if _ti_ takes the _j_ -th position in the sorting order, then the number of such subsets is � _Kj−−_ 11�� _|Dαtr−|−K j_ �. Finally, it includes the Shapley weighing factor along with some combinatorial tricks to combine all this into a simple formula: + +**==> picture [276 x 33] intentionally omitted <==** + +As we can see, this method strictly expects that adding _ti_ to any subset of _Dtr_ will always result in either 0 or 1 data examples being added to the top- _K_ and that the choice between 0 and 1 strictly depends on the number of data examples that come before _ti_ in the sorting order. Two core assumptions lie behind this expectation: (1) adding _ti_ to a subset of _Dtr_ will always result in exactly one additional data example being passed to KNN, and (2) the presence of any data example in the KNN training set is caused by the presence of exactly one data example in _Dtr_ . The first assumption allows us to separate data examples into those that come before _ti_ in the sorting order and those that come after. The second assumption allows us to count subsets using binomial coefficients. If any of the two assumptions do not hold, then the simple combinatorial formula is no longer applicable because the data examples passed to KNN are no longer independent from each other. Map pipelines do not break these assumptions. On the other hand, fork pipelines break the first assumption, and join pipelines break both the first and the second assumption. + +In this work, we examine the broader setting of ML pipelines which comes with several open questions. If any single training data examples _ti ∈Dtr_ is associated with e.g. 10 data examples that are passed to KNN, and they are all intertwined in the sorting order, how do we efficiently compute the number of subsets _D ⊆Dtr_ where adding a specific data example _ti_ will result in altering the accuracy of the KNN prediction? If a data example that gets passed to KNN is the result of joining two data examples _t_ 1 _,_ 1 and _t_ 2 _,_ 1 from separate source datasets _D_ 1 and _D_ 2, but _t_ 1 _,_ 1 is also joined with other examples from _D_ 2 that make up even more output data examples, so removing _t_ 2 _,_ 1 from the training dataset will result in one data example not being passed to KNN but removing _t_ 1 _,_ 1 will result in more than one not being passed, how do we efficiently compute the number of subsets where adding _t_ 1 _,_ 1 will alter the KNN prediction? Do things change in the case of multi-class classification? Can we use model quality metrics other than accuracy? To answer these open questions, we employed all the theoretical components described in this paper, including provenance polynomials, ADD’s, and model counting oracles. The theoretical insight we would like to convey is that all these components are fundamental to solving this problem and that this is the correct level of abstraction for analyzing ML pipelines and developing PTIME algorithms. + +13 + +## B DISCUSSION ABOUT TYPES OF ML PIPELINE OPERATORS + +Here we provide an overview of types of pipeline operators that can be found in ML workflows. We base this discussion on operatos that can be found in the scikit-learn and ML.NET frameworks, as well as commonly used operators that can be found in real-world ML code. + +**Unary Map:** These are functions that map single value inputs to single value outputs. Examples include: + +- **Log** - Computes a logarithm of the input. + +- **Missing Value Indicator** - returns a Boolean that indicates if the input is a missing value or not (e.g. MissingIndicator in scikit-learn ). + +- **Stopword Remover** - takes an input list of string tokens and removes the ones that correspond to stop-words (e.g. "the", "and", etc); the list of stop words is specified as an additional argument (e.g. StopWordsRemovingTransformer in ML.NET ) + +**Binary Numerical and Logical Map:** These are common mathematical operators such as addition, subtraction, multiplication, division, logical and, logical or, equality test, etc. + +**Multi-Value Map:** Values containing multiple elements are taken as inputs and produced as outputs. A key example is a vector normalizing operator which maps a vector input to a vector output. + +**Tuple Filter Map:** These operators remove tuples from the dataset based on the result of some unary map operation. Since these operators map a single tuple to either a single output tuple or to nothing, they are categorized as map filters. Examples include: + +- **Missing Value Filter** - Removes tuples that contain missing values. + +• **Range Filter** - Removes tuples where values of a specified column are outside a given range. **Numerical Aggregate Reduce:** This operator takes an entire column and reduces it into a single numerical value. Examples include summation, counting, mean value, standard deviation, as well as minimal and maximal element selector operators. + +**Unary Map with Reduce Elements:** These operator function similarly to regular _unary map_ operators. However, their mapping operation is dependent on performing some _numerical aggregate reduce_ operation beforehand. Examples include: + +- **Min-Max Scaler** - Scales column values to a 0-1 range based on minimal and maximal element values which represent the pre-computed reduce element (e.g. MinMaxScaler in scikit-learn ). + +- **Standardization Scaler** - Same as the min-max scaler but transforms elements based on the pre-computed mean and standard deviation values (e.g. StandardScaler in scikit-learn ). + +- **One-Hot Encoder** - Encodes numerical features as a one-hot numerical array. Depends on a pre-computed list of unique column element values. + +- **TD-IDF Encoder** - Converts textual values into their Term Frequency - Inverse Document Frequency encodings. This operator depends on a pre-computed dictionary of token frequencies. + +**Data Augmentation Fork:** This can be any data augmentation operator that maps input tuples to some specified number of output tuples. Examples include: random noise injection, randomly shifting or rotating images, removing or replacing characters in text to simulate misspelling, etc. + +**One-to-Many Join:** Join operators compute a matching between two sets of tuples _DA_ and _DB_ , and for each pair of matched input tuples produce a single output tuple. In general there are no constraints on the kinds of matchings that can be performed. However, the specific type of join we describe here, referred to as one-to-many type join requires that tuples from one of the two sets (e.g. _DA_ ) can be matched with at most one tuple from the other set (e.g. _DB_ ). At the same time, tuples from _DB_ can be matched with multuple tuples from _DA_ . + +## C PRELIMINARY: ADDITIVE DECISION DIAGRAMS (ADD’S) + +In this section, we describe a type of decision diagram that we use as a tool for compact representation of functions over Boolean inputs. The process of translating functions into data structures for easier analysis is referred to as _knowledge compilation_ . We briefly describe this in the context of our work, and then go over the data structure we use in our methods – Additive Decision Diagrams. + +**Knowledge Compilation.** Our approach to computing the Shapley value will rely upon being able to construct functions over Boolean inputs _ϕ_ : _VA →E_ , where _E_ is some finite _value set_ . We require an elementary algebra with +, _−_ , _·_ and _/_ operations to be defined for this value set. Furthermore, we require this value set to contain a _zero element_ 0, as well as an _invalid element ∞_ representing + +14 + +an undefined result (e.g. a result that is out of bounds). We then need to count the number of value assignments _v ∈VA_ such that _ϕ_ ( _v_ ) = _e_ , for some specific value _e ∈E_ . This is referred to as the _model counting_ problem, which is #P complete for arbitrary logical formulas Valiant (1979); Arora & Barak (2009). For example, if _A_ = _{a_ 1 _, a_ 2 _, a_ 3 _}_ , we can define _E_ = _{_ 0 _,_ 1 _,_ 2 _,_ 3 _, ∞}_ to be a value set and a function _ϕ_ ( _v_ ) := _v_ ( _a_ 1) + _v_ ( _a_ 2) + _v_ ( _a_ 3) corresponding to the number of variables in _A_ that are set to 1 under some value assignment _v ∈VA_ . + +_Knowledge compilation_ Cadoli & Donini (1997) has been developed as a well-known approach to tackle this model counting problem. It was also successfully applied to various problems in data management Jha & Suciu (2011). One key result from this line of work is that, if we can construct certain polynomial-size data structures to represent our logical formula, then we can perform model counting in polynomial time. Among the most notable of such data structures are _decision diagrams_ , specifically binary decision diagrams Lee (1959); Bryant (1986) and their various derivatives Bahar et al. (1997); Sanner & McAllester (2005); Lai et al. (1996). For our purpose in this paper, we use the _additive decision diagrams_ (ADD), as detailed below. + +**Additive Decision Diagrams (ADD).** We define a simplified version of the _affine algebraic decision diagrams_ Sanner & McAllester (2005). An ADD is a directed acyclic graph defined over a set of nodes _N_ and a special _sink node_ denoted as ⊡. Each node _n ∈N_ is associated with a variable _a_ ( _n_ ) _∈ A_ . Each node has two outgoing edges, _cL_ ( _n_ ) and _cH_ ( _n_ ), that point to its _low_ and _high_ child nodes, respectively. For some value assignment _v_ , the low/high edge corresponds to _v_ ( _a_ ) = 0/ _v_ ( _a_ ) = 1. Furthermore, each low/high edge is associated with an increment _wL_ / _wH_ that maps edges to elements of _E_ . + +Note that each node _n ∈N_ represents the root of a subgraph and defines a Boolean function. Given some value assignment _v ∈VA_ we can evaluate this function by constructing a path starting from _n_ and at each step moving towards the low or high child depending on whether the corresponding variable is assigned 0 or 1. The value of the function is the result of adding all the edge increments together. Figure 8a presents an example ADD with one path highlighted in red. Formally, we can define the evaluation of the function defined by the node _n_ as follows: + +**==> picture [314 x 37] intentionally omitted <==** + +In our work, we focus specifically on ADD’s that are _full_ and _ordered_ . A diagram is full if every path from root to sink encounters every variable in _A_ exactly once. For example, in Figure 8a we see a full diagram over the set of variables _A_ = _{a_ 1 _,_ 1 _, a_ 1 _,_ 2 _, a_ 2 _,_ 1 _, a_ 2 _,_ 2 _, a_ 2 _,_ 3 _}_ . If any of the variables in _A_ has no node associated with it, then the diagram is not considered full. On the other hand, an ADD is ordered when on each path from root to sink variables always appear in the same order. For this purpose, we define _π_ : _A →{_ 1 _, ..., |A|}_ to be a permutation of variables that assigns each variable _a ∈ A_ an index. For example, in Figure 8a, the variable order is _π_ = _{a_ 1 _,_ 1 _�→_ 1 _, a_ 1 _,_ 2 _�→_ 4 _, a_ 2 _,_ 1 _�→_ 2 _, a_ 2 _,_ 2 _�→_ 3 _, a_ 2 _,_ 3 _�→_ 5 _}_ . It is possible, for example, to swap the two nodes on the left side that correspond to _a_ 2 _,_ 1 and _a_ 2 _,_ 2. This, however, makes the diagram unordered, which dramatically complicates certain operations (e.g. the diagram summation operation that we will describe shortly). + +**Diagram Diameter.** We define the diameter of an ADD as the maximum number of nodes associated with any single variable. Formally we can write: + +**==> picture [284 x 17] intentionally omitted <==** + +We can immediately notice that the size of any ADD with a set of nodes _N_ and variables _A_ is bounded by _O_ ( _|A| ·_ diam( _N_ )). + +**Model Counting.** We define a model counting operator + +**==> picture [304 x 19] intentionally omitted <==** + +where _A_ [ _≤ π_ ( _a_ ( _n_ ))] is the subset of variables in _A_ that include _a_ ( _n_ ) and all variables that come before it in the permutation _π_ . For an ordered and full ADD, count _e_ ( _n_ ) satisfies the following recursion: + +**==> picture [385 x 38] intentionally omitted <==** + +15 + +**==> picture [244 x 161] intentionally omitted <==** + +**----- Start of picture text -----**
+(a) ADD (b) Uniform ADD
a 1 , 1 a 1
+5
a 2 , 1 a 2
+1 +5
a 2 , 2 a 3
+5
+1
a 1 , 2 ·
a 2 , 3
+1
·
**----- End of picture text -----**
+ +Figure 8: (a) An ordered and full ADD for computing _ϕ_ ( _v_ ) := _v_ ( _a_ 1 _,_ 1) _·_ � _v_ ( _a_ 2 _,_ 1) + _v_ ( _a_ 2 _,_ 2)� + _v_ ( _a_ 1 _,_ 2) _· v_ ( _a_ 2 _,_ 3) _._ (b) A uniform ADD for computing _ϕ_ ( _v_ ) := 5 _·_ ( _v_ ( _a_ 1) + _v_ ( _a_ 2) + _v_ ( _a_ 3)). + +The above recursion can be implemented as a dynamic program with computational complexity _O_ ( _|N| · |E|_ ). + +Figure 8b shows a special case of a full and ordered ADD, which we call a _uniform_ ADD. It is structured as a chain with one node per variable, where all low increments equal zero and all high increments equal some constant _E ∈E_ . For this type of ADD, we can perform model counting in constant time, assuming that we have a precomputed table of factorials of size _O_ ( _|N|_ ) that allows us to compute binomial coefficients in constant time. The count _e_ operator for a uniform ADD can be defined as + +**==> picture [291 x 31] intentionally omitted <==** + +Intuitively, if we observe the uniform ADD shown in Figure 8b, we see that the result of an evaluation must be a multiple of 5. For example, to evaluate to 10, the evaluation path must pass a _high_ edge exactly twice. Therefore, in a 3-node ADD with root node _nR_ , the result of count10( _nR_ ) will be 3 exactly �2�. **Special Operations on ADD’s.** Given an ADD with node set _N_ , we define two operations that will become useful later on when constructing diagrams for our specific scenario: + +1. _Variable restriction_ , denoted as _N_ [ _ai ← V_ ], which restricts the domain of variables _A_ by forcing the variable _ai_ to be assigned the value _V_ . This operation removes every node _n ∈N_ where _a_ ( _n_ ) = _ai_ and rewires all incoming edges to point to the node’s high or low child, depending on whether _V_ = 1 or _V_ = 0. The resulting diagram will have between 1 and diam( _N_ ) nodes less than the original diagram, depending on the number of nodes associated with variable _ai_ . + +2. _Diagram summation_ , denoted as _N_ 1 + _N_ 2, where _N_ 1 and _N_ 2 are two ADD’s over the same (ordered) set of variables _A_ . ordered in the same way. It starts from the respective root nodes _n_ 1 and _n_ 2, and produces a new node _n_ := _n_ 1 + _n_ 2. We then apply the same operation to child nodes. Therefore, _cL_ ( _n_ 1 + _n_ 2) := _cL_ ( _n_ 1) + _cL_ ( _n_ 2) and _cH_ ( _n_ 1 + _n_ 2) := _cH_ ( _n_ 1) + _cH_ ( _n_ 2). Also, for the increments, we can define _wL_ ( _n_ 1 + _n_ 2) := _wL_ ( _n_ 1) + _wL_ ( _n_ 2) and _wH_ ( _n_ 1 + _n_ 2) := _wH_ ( _n_ 1)+ _wH_ ( _n_ 2). The size of the resulting diagram is bounded by _O_ ( _|A|·_ diam( _N_ 1) _·_ diam( _N_ 2)). A proof of this claim is presented in subsection E.2. + +## D CONSTRUCTING POLYNOMIAL-SIZE ADD’S FOR ML PIPELINES + +Algorithm 1 presents our main procedure COMPILEADD that constructs an ADD for a given dataset _D_ made up of tuples annotated with provenance polynomials. This is achieved by invoking the procedure COMPILEADD( _D_ , _A_ , _ti_ , _tval_ ) constructs an ADD with node set _N[′]_ that computes + +**==> picture [317 x 25] intentionally omitted <==** + +16 + +**Algorithm 1** Compiling a provenance-tracked dataset into ADD. + +1: **function** COMPILEADD 2: **inputs** 3: _D_ , provenance-tracked dataset; 4: _A_ , set of variables; 5: _ti_ , boundary tuple; 6: _tval_ , validation tuple; 7: **outputs** 8: _N_ , nodes of the compiled ADD; 9: **begin** 10: _N ←{}_ 11: _P ←{_ ( _a_ 1 _, a_ 2) _∈ A_ : _∃ti ∈D, a_ 1 _∈ p_ ( _ti_ ) _∧ a_ 2 _∈ p_ ( _ti_ ) _}_ 12: _AL ←_ GETLEAFVARIABLES( _P_ ) 13: **for** _AC ∈_ GETCONNECTEDCOMPONENTS( _P_ ) **do** 14: _A[′] ← AC \ AL_ 15: _N[′] ←_ CONSTRUCTADDTREE( _A[′]_ ) 16: _D[′] ←{t[′] ∈D_ : _p_ ( _t[′]_ ) _∪ AC_ = _∅}_ 17: **for** _v ∈VA′_ **do** 18: _NC ←_ CONSTRUCTADDCHAIN( _AC ∩ AL_ ) 19: **for** _n ∈NC_ **do** 20: _v[′] ← v ∪{a_ ( _n_ ) _→_ 1 _}_ 21: _wH_ ( _n_ ) _←|{t[′] ∈D[′]_ : eval _v′p_ ( _t[′]_ ) = 1 _∧ σ_ ( _t[′] , tval_ ) _≥ σ_ ( _ti, tval_ ) _}|_ 22: **end for** 23: _N[′] ←_ APPENDTOADDPATH( _N[′]_ , _NC_ , _v_ ) 24: **end for** 25: _N ←_ APPENDTOADDROOT( _N_ , _N[′]_ ) 26: **end for** 27: **for** _a[′] ∈ p_ ( _t_ ) **do** 28: **for** _n ∈N_ **where** _a_ ( _n_ ) = _a[′]_ **do** 29: _wL_ ( _n_ ) _←∞_ 30: **end for** 31: **end for** 32: **return** _N_ 33: **end function** + +We provide a more detailed description of Algorithm 1 in subsection D.1. + +To construct the function defined in Equation 8, we need to invoke COMPILEADD once more by passing _t[′′]_ instead of _t[′]_ in order to obtain another diagram _N[′′]_ . The final diagram is obtained as a result of _N[′]_ [ _ai ←_ 0] + _N[′′]_ [ _ai ←_ 1]. In other words, by performing a _diagram summation_ operation over diagrams _N[′]_ (with _variable restriction ai ←_ 0) and _N[′′]_ (with _variable restriction ai ←_ 1). The size of the resulting diagram will still be bounded by _O_ ( _|D|_ ). + +We can now examine different types of canonical pipelines and see how their structures are reflected onto the structure of ADD’s. In summary, we can construct an ADD with polynomial-size for canonical pipelines, and therefore, by Theorem 4.2, the computation of the corresponding counting oracles is in PTIME. + +**One-to-Many Join Pipeline.** In a _star_ database schema, this corresponds to a _join_ between a _fact_ table and a _dimension_ table, where each tuple from the dimension table can be joined with multiple tuples from the fact table. It can be represented by an ADD similar to the one in Figure 8a. + +**Corollary D.1.** _For the K-NN accuracy utility and a one-to-many_ join _pipeline, which takes as input two datasets, DF and DD, of total size |DF |_ + _|DD|_ = _N and outputs a joined dataset of size O_ ( _N_ ) _, the Shapley value can be computed in O_ ( _N_[4] ) _time._ + +_Proof._ This follows from the observation that in Algorithm 1, each connected component _AC_ will be made up of one variable corresponding to the dimension table and one or more variables corresponding to the fact table. Since the fact table variables will be categorized as "leaf variables", the expression _AC \ AL_ in Line 14 will contain only a single element – the dimension table variable. Consequently, the ADD tree in _N[′]_ will contain a single node. On the other side, the _AC ∩ AL_ expression will + +17 + +contain all fact table variables associated with that single dimension table variable. That chain will be added to the ADD tree two times for two outgoing branches of the single tree node. Hence, the ADD segment will be made up of two fact table variable chains stemming from a single dimension table variable node. There will be _O_ ( _|DD|_ ) partitions in total. Given that the fact table variables are partitioned, the cumulative size of their chains will be _O_ ( _|DF |_ ). Therefore, the total size of the ADD with all partitions joined together is bounded by _O_ ( _|DD|_ + _|DF |_ ) = _O_ ( _N_ ). + +Given fact and combining it with Theorem 4.2 we know that the counting oracle can be computed in time _O_ ( _N_ ) time. Finally, given Theorem 4.1 and the structure of Equation 6 we can observe that the counting oracle is invoked _O_ ( _N_[3] ) times. As a result, we can conclude that the total complexity of computing the Shapley value is _O_ ( _N_[4] ). Here, we assume that we have a precomputed table of factorials from 1 to _N_ that allows us to compute the binomial coefficient in constant time. + +**Fork Pipeline.** The key characteristic of a pipeline _f_ that contains only _fork_ or _map_ operators is that the resulting dataset _f_ ( _D_ ) has provenance polynomials with only a single variable. This is due to the absence of joins, which are the only operator that results in provenance polynomials with a combination of variables. + +**Corollary D.2.** _For the K-NN accuracy utility and a_ fork _pipeline, which takes as input a dataset of size N and outputs a dataset of size M , the Shapley value can be computed in O_ ( _M_[2] _N_[2] ) _time._ + +> _Proof._ The key observation here is that, since all provenance polynomials contain only a single variable, there is no interdependency between them, which means that the connected components returned in Line 13 of Algorithm 1 will each contain a single variable. Therefore, the size of the resulting ADD will be _O_ ( _N_ ). Consequently, similar to the proof of the previous corollary, the counting oracle can be computed in time _O_ ( _N_ ) time. In this case, the size of the output dataset is _O_ ( _M_ ) which means that Equation 6 will invoke the oracle _O_ ( _M_[2] _N_ ) times. Therefore, the total time complexity of computing the Shapley value will be _O_ ( _M_[2] _N_[2] ). Here, we assume that we have a precomputed table of factorials from 1 to _N_ that allows us to compute the binomial coefficient in constant time. + +**Map Pipeline.** A _map_ pipeline is similar to _fork_ pipeline in the sense that every provenance polynomial contains only a single variable. However, each variable now can appear in a provenance polynomial of _at most_ one tuple, in contrast to _fork_ pipeline where a single variable can be associated with _multiple_ tuples. This additional restriction results in the following corollary: + +**Corollary D.3.** _For the K-NN accuracy utility and a_ map _pipeline, which takes as input a dataset of size N , the Shapley value can be computed in O_ ( _N_[2] ) _time._ + +> _Proof._ There are two arguments we need to make which will result in the reduction of complexity compared to fork pipelines. The first argument is that given that each variable can appear in the provenance polynomial of at most one tuple, having its value set to 1 can result in either zero or one tuple contributing to the top- _K_ tally. It will be one if that tuple is more similar than the boundary tuple _t_ and it will be zero if it is less similar. Consequently, our ADD will have a chain structure with high-child increments being either 0 or 1. If we partition the ADD into two chains, one with all increments 1 and another with all increments 0, then we end up with two uniform ADD’s. As shown in Equation 13, model counting of uniform ADD’s can be achieved in constant time. The only difference here is that, since we have to account for the support size of each model, computing the oracle _ω_ ( _α, γ[′] , γ[′′] |ti, tval, t[′] , t[′′]_ ) for a given _α_ will require us to account for different possible ways to split _α_ across the two ADD’s. However, since the tuple _t_ needs to be the boundary tuple, which means it is the _K_ -th most similar, there need to be exactly _K −_ 1 variables from the ADD with increments 1 that can be set to 1. This gives us a single possible distribution of _α_ across two ADD’s. Hence, the oracle can be computed in constant time. + +As for the second argument, we need to make a simple observation. For map pipelines, given a boundary tuple _t[′]_ and a tally vector _γ[′]_ corresponding to the variable _ai_ being assigned the value 0, we know that setting this variable to 1 can introduce at most one tuple to the top- _K_ . That could only be the single tuple associated with _ai_ . If this tuple has a lower similarity score than _t[′]_ , there will be no change in the top- _K_ . On the other side, if it has a higher similarity, then it will become part of the top- _K_ and it will evict exactly _t[′]_ from it. Hence, there is a unique tally vector _γ[′′]_ resulting from _ai_ being assigned the value 1. This means that instead of computing the counting oracle _ω_ ( _α, γ[′] , γ[′′] |ti, tval, t[′] , t[′′]_ ), we can compute the oracle _ω_ ( _α, γ[′] |ti, tval, t[′]_ ). This means that, in Equation 6 we can eliminate the iteration over _t[′′]_ which saves us an order of _O_ ( _N_ ) in complexity. + +18 + +As a result, Equation 6 will make _O_ ( _N_[2] ) invocations to the oracle which can be computed in constant time. Here, we assume that we have a precomputed table of factorials from 1 to _N_ that allows us to compute the binomial coefficient in constant time. Hence, the final complexity of computing the Shapley value will be _O_ ( _N_[2] ). + +## D.1 DETAILS OF ALGORITHM 1 + +In this section, we examine the method of compiling a provenance-tracked dataset _f_ ( _Dtr_ ) that results from a pipeline _f_ . The crux of the method is defined in Algorithm 1 which is an algorithm that takes a dataset _f_ ( _Dtr_ ) with provenance tracked over a set of variables _A_ , a boundary tuple _t[′] ∈ f_ ( _Dtr_ ) and a validation tuple _tval ∈ f_ ( _Dval_ ). The result is an ADD that computes the following function: + +**==> picture [336 x 25] intentionally omitted <==** + +Assuming that all provenance polynomials are actually a single conjunction of variables and that the tally is always a sum over those polynomials, it tries to perform factoring by determining if there are any variables that can be isolated. This is achieved by first constructing the set of "leaf variables" _AL_ (Line 12). No pair of variables in _AL_ ever appears in the same provenance polynomial. In graph theory, this set is also known as the "independent set". We use a heuristic approach to construct this set that prioritizes the least frequently occurring variables and completes them in _O_ ( _N_ ) time. We then iterate over each "connected component" _AC_ (Line 13) where any two variables are "connected" if they are ever in the same provenance polynomial. Then we get the set _A[′]_ = _AC \ AL_ which contains variables that cannot be isolated (because they appear in polynomials in multiple tuples with multiple different variables). We form a group that will be treated as one binary vector and based on the value of that vector we would take a specific path in the tree. We thus take the group of variables and call the CONSTRUCTADDTREE function to construct an ADD tree (Line 15). + +Every path in this tree corresponds to one value assignment to the variables in that tree. Then, for every path we call the CONSTRUCTADDCHAIN to build a chain made up of the isolated variables and call APPENDTOADDPATH to append them to the leaf of that path (Line 23). For each variable in the chain, we also define an increment that is defined by the number of tuples that will be more similar than the boundary tuple _t[′]_ and also have their provenance polynomial "supported" by the path. We thus construct a segment of the final ADD made up of different components. We append this segment to the final ADD using the APPENDTOADDROOT function. We don’t explicitly define these functions but we illustrate their functionality in Figure 9. + +## E ADDITIONAL PROOFS AND DETAILS + +## E.1 PROOF OF THEOREM 4.1 + +_Proof._ This theorem can easily be proven by observing the structure of the Shapley value of a tuple _ti_ for a single validation tuple _tval_ , as we defined it in Equation 6: + +_φ_ ( _ti, tval_ ) = _|A_ 1 _|_ � _t[′] ,t[′′] ∈f_ ( _Dtr_ ) � _|αA_ =1 _|_ � _|Aα|−_ 1� _−_ 1 � _γ[′] ,γ[′′] ∈_ Γ _Y,K[m]_[∆][(] _[γ][′][, γ][′′][|][ t][val]_[)] _[ ·][ ω]_[(] _[α, γ][′][, γ][′′][|][ t][i][, t][val][, t][′][, t][′′]_[)] _[.]_ + +We can notice that it is made up of several sums: (1) the left-most one is a sum over _t[′] , t[′′] ∈ f_ ( _Dtr_ ) which for a canonical pipeline _f_ is a set of cardinality in _O_ ( _|Dtr|_ ); (2) the next one is a sum over _|A|_ elements which is _O_ ( _|Dtr|_ ) according to the definition of _A_ given in subsection 3.1; and finally (3) the right-most sum is over _γ[′] , γ[′′] ∈_ Γ _Y,K_ where Γ _Y,K_ is the set of all _|Y|_ -dimensional label tally vectors which can be defined as Γ _Y,K_ := _{γ ∈_ N _[|Y|]_ : _K ≥_[�] _i[γ][i][}]_[ and can be treated as constant] since it does not depend on _|Dtr|_ . As we can see, given that all sums in _φ_ ( _ti, tval_ ) are _O_ ( _|Dtr|_ ), then it is safe to conclude that if we can compute _ω_ ( _α, γ[′] , γ[′′] | ti, tval, t[′] , t[′′]_ ) in time polynomial w.r.t _|Dtr|_ , then we can also compute _φ_ ( _ti, tval_ ) in time polynomial in _|Dtr|_ . Finally, as mentioned in , the Shapley value for a tuple _ti_ can be computed as _φ_ ( _ti_ ) = _w ·_[�] _tval∈f_ ( _Dval_ ) _[φ]_[(] _[t][i][, t][val]_[)][ which] contains a sum over _O_ ( _|Dval|_ ) elements (given that the pipeline _f_ is canonical). Hence, we can see that the Shapley value can be computed in time polynomial in _|Dtr|_ and _|Dval|_ , which concludes our proof. + +## E.2 PROOF OF THEOREM 4.2 + +**Model Counting for ADD’s.** We start off by proving that Equation 12 correctly performs model counting. + +19 + +**==> picture [383 x 129] intentionally omitted <==** + +**----- Start of picture text -----**
+N 1 = CONSTRUCTADDTREE( {a 1 , a 2 , a 3 } ) N 2 = CONSTRUCTADDCHAIN( {a 4 , a 5 , a 6 } )
a 1 a 4
a 2 a 5
a 3 a 6
APPENDTOADDPATH( N 1 , N 2 , {a 1 → 1 , a 2 → 0 , a 3 → 1 } ) APPENDTOADDROOT( N 1 , N 2)
**----- End of picture text -----**
+ +**==> picture [244 x 159] intentionally omitted <==** + +**----- Start of picture text -----**
+a 1 a 1
a 2 a 2
a 3 a 3
a 4 a 4
a 5 a 5
a 6 a 6
**----- End of picture text -----**
+ +**==> picture [112 x 130] intentionally omitted <==** + +Figure 9: An example of ADD compilation functions. + +**Lemma E.1.** _For a given node n ∈N of an ADD and a given value e ∈E, Equation 12 correctly computes_ count _e_ ( _n_ ) _which returns the number of assignments v ∈VA such that_ eval _v_ ( _n_ ) = _e. Furthermore, when computing_ count _e_ ( _n_ ) _for any n ∈N , the number of computational steps is bounded by O_ ( _|N| · |E|_ ) _._ + +_Proof._ We will prove this by induction on the structure of the recursion. + +_(Base case.)_ Based on Equation 9, when _n_ = ⊡ we get eval _v_ ( _n_ ) = 0 for all _v_ . Furthermore, when _n_ = ⊡, the set _VA_ [ _a>π_ ( _a_ ( _n_ )) = 0] contains only one value assignment with all variables set to zero. Hence, the model count will equal to 1 only for _e_ = 0 and it will be 0 otherwise, which is reflected in the base cases of Equation 12. + +_(Inductive step.)_ Because our ADD is ordered and full, both _cL_ ( _n_ ) and _cH_ ( _n_ ) are associated with the same variable, which is the predecessor of _a_ ( _n_ ) in the permutation _π_ . Based on this and the induction hypothesis, we can assume that + +**==> picture [359 x 41] intentionally omitted <==** + +We would like to compute count _e_ ( _n_ ) as defined in Equation 11. It computes the size of a set defined over possible value assignments to variables in _A_ [ _≤ a_ ( _n_ )]. The set of value assignments can be partitioned into two distinct sets: one where _a_ ( _n_ ) _←_ 0 and one where _a_ ( _n_ ) _←_ 1. We thus obtain the following expression: + +**==> picture [320 x 42] intentionally omitted <==** + +20 + +Based on Equation 9, we can transform the eval _v_ ( _n_ ) expressions as such: + +**==> picture [333 x 41] intentionally omitted <==** + +Finally, we can notice that the set size expressions are equivalent to those in Equation 16. Therefore, we can obtain the following expression: + +count _e_ ( _n_ ) := count _e−wL_ ( _n_ )( _cL_ ( _n_ )) + count _e−wH_ ( _n_ )( _cH_ ( _n_ )) (19) + +which is exactly the recursive step in Equation 12. This concludes our inductive proof and we move onto proving the complexity bound. + +_(Complexity.)_ This is trivially proven by observing that since count has two arguments, we can maintain a table of results obtained for each _n ∈N_ and _e ∈E_ . Therefore, we know that we will never need to perform more than _O_ ( _|N| · |E|_ ) invocations of count _e_ ( _n_ ). + +**ADD Construction.** Next, we prove that the size of an ADD resulting from _diagram summation_ as defined in Appendix C is linear in the number of variables. + +The size of the diagram resulting from a sum of two diagrams with node sets _N_ 1 and _N_ 2 can be loosely bounded by _O_ ( _|N_ 1 _|·|N_ 2 _|_ ) assuming that its nodes come from a combination of every possible pair of operand nodes. However, given the much more narrow assumptions we made in the definition of the node sum operator, we can make this bound considerably tighter. As mentioned in Appendix C, the size of any ADD with set of nodes _N_ and variables _A_ is bounded by _O_ ( _|A| ·_ diam( _N_ )). We can use this fact to prove a tighter bound on the size of an ADD resulting from a sum operation: + +**Lemma E.2.** _Given two full ordered ADD’s with nodes N_ 1 _and N_ 2 _, noth defined over the set of variables A, the number of nodes in N_ 1 + _N_ 2 _is bounded by O_ ( _|A| ·_ diam( _N_ 1) _·_ diam( _N_ 2)) _._ + +_Proof._ It is sufficient to show that diam( _N_ 1 + _N_ 2) = _O_ (diam( _N_ 1) _·_ diam( _N_ 2)). This is a direct consequence of the fact that for full ordered ADD’s the node sum operator is defined only for nodes associated with the same variable. Since the only way to produce new nodes is by merging one node in _N_ 1 with one node in _N_ 2, and given that we can merge nodes associated with the same variable, the number of nodes associated with the same variable in the resulting ADD equals the product of the corresponding number of nodes in the constituent ADD’s. Since the diameter is simply the upper bound of the number of nodes associated with any single variable, the same upper bound in the resulting ADD cannot be larger than the product of the upper bounds of constituent nodes. + +**Computing the Oracle using ADD’s.** Finally, we prove the correctness of Theorem 4.2. + +**Lemma E.3.** _Given an Additive Decision diagram with root node n_ ( _ti, tval, t[′] , t[′′]_ ) _that computes the Boolean function ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) _as defined in Equation 8, the counting oracle ω_ ( _α, γ[′] , γ[′′] |ti, tval, t[′] , t[′′]_ ) _defined in Equation 7 can be computed as:_ + +**==> picture [323 x 13] intentionally omitted <==** + +_Proof._ Given a training dataset _Dtr_ and a data preprocessing pipeline _f_ , we have _f_ ( _Dtr_ ) as the output of that pipeline and input to an ML model. Let us define _f_ ( _Dtr_ )[ _≥σ_ ( _·,tval_ ) _t[′]_ ] _⊆ f_ ( _Dtr_ ) as a set of tuples in _f_ ( _Dtr_ ) with similarity to a validation tuple _tval_ higher or equal than that of _t[′]_ , formally _f_ ( _Dtr_ )[ _≥σ_ ( _·,tval_ ) _t[′]_ ] := _{t[′′] ∈ f_ ( _Dtr_ ) : _σ_ ( _t[′′] , tval_ ) _≥ σ_ ( _t[′] , tval_ ) _}_ . Similarly to _f_ ( _Dtr_ ), the semantics of _f_ ( _Dtr_ )[ _≥σ_ ( _·,tval_ ) _t[′]_ ] is also that of a set of possible candidate sets. Given a value assignment _v_ , we can obtain _f_ ( _Dtr_ [ _v_ ])[ _≥σ_ ( _·,tval_ ) _t[′]_ ] from _f_ ( _Dtr_ [ _v_ ]). For convenience, we also define _f_ ( _Dtr_ )[ _≥σ_ ( _·,tval_ ) _t[′]_ ][= _ℓ y_ ] as a subset of _f_ ( _Dtr_ )[ _≥σ_ ( _·,tval_ ) _t[′]_ ] with only tuples that have label _y_ . Given these definitions, we can define several equivalences. First, for top _K_ we have: + +_′_ � _t[′]_ = top _K_ � _f_ ( _Dtr_ [ _v_ ]) _| tval_ �[�] _⇐⇒_ � _t[′] ∈ f_ ( _Dtr_ [ _v_ ]) _∧_ �� _f_ ( _Dtr_ [ _v_ ])[ _≥σ_ ( _·,tval_ ) _t_ ]�� = _K_ � (21) In other words, for _t[′]_ to be the tuple with the _K_ -th highest similarity in _f_ ( _Dtr_ [ _v_ ]), it needs to be a member of _f_ ( _Dtr_ [ _v_ ]) and the number of tuples with similarity greater or equal to _t[′]_ has to be exactly _K_ . Similarly, we can define the equivalence for tally( _·|t[′] , tval_ ): + +**==> picture [387 x 19] intentionally omitted <==** + +21 + +This is simply an expression that partitions the set _f_ ( _Dtr_ [ _v_ ])[ _≥σ_ ( _·,tval_ ) _t[′]_ ] based on _y_ and tallies them up. The next step is to define an equivalence for ( _t[′]_ = top _K_ ( _f_ ( _Dtr_ [ _v_ ]) _| tval_ )) _∧_ ( _γ[′]_ = tally( _f_ ( _Dtr_ [ _v_ ]) _| t[′] , tval_ )). We can notice that since _|γ[′] |_ = _K_ , if we have ( _∀y ∈Y, γy[′]_[=] _|f_ ( _Dtr_ [ _v_ ])[ _≥σ_ ( _·,tval_ ) _t[′]_ ][= _ℓ y_ ] _|_ ) then we can conclude that ( _|f_ ( _Dtr_ [ _v_ ])[ _≥σ_ ( _·,tval_ ) _t[′]_ ] _|_ = _K_ ) is redundant. Hence, we can obtain: + +� _t[′]_ = top _K_ � _f_ ( _Dtr_ [ _v_ ]) _| tval_ �[�] _∧_ � _γ[′]_ = tally� _f_ ( _Dtr_ [ _v_ ]) _| t[′] , tval_ �[�] _⇐⇒_ � _t[′] ∈ f_ ( _Dtr_ [ _v_ ])� _∧_ � _∀y ∈Y, γy_ = �� _f_ ( _Dtr_ [ _v_ ])[ _≥σ t_ ][= _ℓ y_ ]��� (23) + +According to Equation 22, we can reformulate the right-hand side of the above equivalence as: + +� _t[′]_ = top _K_ � _f_ ( _Dtr_ [ _v_ ]) _| tval_ �[�] _∧_ � _γ[′]_ = tally� _f_ ( _Dtr_ [ _v_ ]) _| t[′] , tval_ �[�] _⇐⇒_ � _t[′] ∈ f_ ( _Dtr_ )[ _v_ ]� _∧_ � _γ[′]_ = tally� _f_ ( _Dtr_ [ _v_ ]) _| t[′] , tval_ �[�] (24) + +We can construct a similar expression for _t[′]_ and _v_ [ _ai_ = 1] so we cover four out of five predicates in Equation 7. The remaining one is simply the support of the value assignment _v_ which we will leave intact. This leaves us with the following equation for the counting oracle: + +**==> picture [397 x 64] intentionally omitted <==** + +We can use the Boolean function _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) in Equation 8 to simplify the above equation. Notice that the conditions _t[′] ∈ f_ ( _Dtr_ [ _v_ ; _ai ←_ 0]) and _t[′′] ∈ f_ ( _Dtr_ [ _v_ ; _ai ←_ 1]) are embedded in the definition of _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) which will return _∞_ if those conditions are not met. When the conditions are met, _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) returns exactly the same triple ( _α, γ[′] , γ[′′]_ ). Therefore it is safe to replace the five indicator functions in the above formula with a single one as such: + +**==> picture [353 x 26] intentionally omitted <==** + +Given our assumption that _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) can be represented by an ADD with a root node _n_ ( _ti, tval, t[′] , t[′′]_ ), the above formula is exactly the model counting operation: + +**==> picture [326 x 13] intentionally omitted <==** + +**Theorem E.1.** _If we can represent the Boolean function ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) _defined in Equation 8 with an Additive Decision Diagram of size polynomial in |Dtr| and |f_ ( _Dtr_ ) _|, then we can compute the counting oracle ω_ ( _· | ti, tval, t[′] , t[′′]_ ) _in time polynomial in |Dtr| and |f_ ( _Dtr_ ) _|._ + +_Proof._ This theorem follows from the two previously proved lemmas: Lemma E.1 and Lemma E.3. Namely, as a result of Lemma E.3 we claim that model counting of the Boolean function _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) is equivalent to computing the oracle result. On top of that, as a result of Lemma E.1 we know that we can perform model counting in time linear in the size of the decision diagram. Hence, if our function _ϕ_ ( _v|ti, tval, t[′] , t[′′]_ ) can be represented with a decision diagram of size polynomial in the size of data, then we can conclude that computing the oracle result can be done in time polynomial in the size of data. + +E.3 DETAILS ON ADDITIVE MODEL QUALITY METRICS + +**False Negative Rate** Apart from accuracy which represents a trivial example of an additive utility, we can show how some more complex utilities happen to be additive and can therefore be decomposed according to Equation 5. As an example, we use _false negative rate (FNR)_ which can be defined as such: + +**==> picture [354 x 26] intentionally omitted <==** + +22 + +In the above expression we can see that the denominator only depends on _Dval_ which means it can be interpreted as the scaling factor _w_ . We can easily see that the expression in the numerator neatly fits the structure of Equation 5 as long as we we define _mT_ as _mT_ ( _ypred,_ ( _xval, yval_ )) := 1 _{ypred_ = 0 _}_ 1 _{yval_ = 1 _}_ . Similarly, we are able to easily represent various other utilities, including: false positive rate, true positive rate (i.e. recall), true negative rate (i.e. specificity), etc. We describe an additional example in subsection 3.3. + +**Equalized Odds Difference** We show how slightly more complex utilities can also be represented as additive, with a little approximation, similar to the one described above. We will demonstrate this using the “equalized odds difference” utility, a measure of (un)fairness commonly used in research Hardt et al. (2016); Barocas et al. (2019) that we also use in our experiments. It can be defined as such: + +**==> picture [330 x 11] intentionally omitted <==** + +Here, _TPR_ ∆ and _FPR_ ∆ are _true positive rate difference_ and _false positive rate difference_ respectively. We assume that each tuple _ttr ∈ f_ ( _Dtr_ ) and _tval ∈ f_ ( _Dval_ ) have some sensitive feature _g_ (e.g. ethnicity) with values taken from some finite set _{G_ 1 _, G_ 2 _, ...}_ , that allows us to partition the dataset into _sensitive groups_ . We can define _TPR_ ∆ and _FPR_ ∆ respectively as + +**==> picture [365 x 38] intentionally omitted <==** + +For some sensitive group _Gi_ , we define _TPRGi_ and _FPRGi_ respectively as: + +**==> picture [398 x 53] intentionally omitted <==** + +For a given training dataset _Dtr_ , we can determine Equation 29 whether _TPR_ ∆ or _FPR_ ∆ is going to be the dominant metric. Similarly, given that choice, we can determine a pair of sensitive groups ( _Gmax, Gmin_ ) that would end up be selected as minimal and maximal in Equation 30. Similarly to the conversion shown in subsection 3.3, we can treat these two steps as a reduce operation over the whole dataset. Then, if we assume that this intermediate result will remain stable over subsets of _Dtr_ , we can approximatly represent the equalized odds difference utility as an additive utility. + +As an example, let us assume that we have determined that _TPR_ ∆ dominates over _FPR_ ∆, and similarly that the pair of sensitive groups ( _Gmax, Gmin_ ) will end up being selected in Equation 30. Then, our tuple-wise utility _uT_ and the scaling factor _w_ become + +**==> picture [296 x 25] intentionally omitted <==** + +where + +**==> picture [296 x 11] intentionally omitted <==** + +A similar approach can be taken to define _mT_ and _w_ for the case when _FPR_ ∆ dominates over _TPR_ ∆. Then, if we plug them into Equation 5, we obtain an approximate version of the equalized odds difference utility as defined in Equation 29. This approximation relies on the stability of the choices of min and max in Equation 30 and on the choice between _TPR_ and _FPR_ in Equation 29 (both of which can be precomputed). + +## F SPECIAL CASE: COMPUTING SHAPLEY FOR 1-NEAREST-NEIGHBOR CLASSIFIERS + +We can significantly reduce the time complexity for 1-NN classifiers, an important special case of _K_ -NN classifiers that is commonly used in practice. For each validation tuple _tval_ , there is always _exactly_ one tuple that is most similar to _tval_ . Below we illustrate how to leverage this observation to construct the counting oracle. In the following, we assume that _ai_ is the variable corresponding to the tuple for which we hope to compute the Shapley value. + +23 + +Let _ϕt_ represent the event when _t_ is the top-1 tuple: + +**==> picture [260 x 34] intentionally omitted <==** + +For Equation 31 to be _true_ (i.e. for tuple _t_ to be the top-1), all tuples _t[′]_ where _σ_ ( _t[′]_ ) _> σ_ ( _t_ ) need to be _absent_ from the pipeline output. Hence, for a given value assignment _v_ , all provenance polynomials that control those tuples, i.e., _p_ ( _t[′]_ ), need to evaluate to false. We now construct the event + +**==> picture [146 x 11] intentionally omitted <==** + +where _ϕt_ [ _ai/_ false] means to substitute all appearances of _ai_ in _ϕt_ to false. This event happens only if if _t_ is the top-1 tuple when _ai_ is false and _t[′]_ is the top-1 tuple when _ai_ is true. This corresponds to the condition that our counting oracle counts models for. Expanding _ϕt,t′_ , we obtain + +**==> picture [380 x 36] intentionally omitted <==** + +Note that _ϕt,t′_ can only be _true_ if _p_ ( _t[′]_ ) is true when _ai_ is true and _σ_ ( _t_ ) _< σ_ ( _t[′]_ ). As a result, all provenance polynomials corresponding to tuples with a higher similarity score than that of _t_ need to evaluate to false. Therefore, the only polynomials that can be allowed to evaluate to true are those corresponding to tuples with lower similarity score than _t_ . Based on these observations, we can express the counting oracle for different types of ML pipelines. + +**Map Pipeline.** In a _map_ pipeline, the provenance polynomial for each tuple _t[′] i[∈][f]_[(] _[D][tr]_[)][ is defined by] a single distinct variable _ai ∈ A_ . Furthermore, from the definition of the counting oracle (Equation 7), we can see that _ω_ ( _·|ti, tval, t[′] , t[′′]_ ) counts the value assignments that result in support size _α_ and label tally vectors _γ[′]_ and _γ[′′]_ . Given our observation about the provenance polynomials that are allowed to be set to true, we can easily construct an expression for counting valid value assignments. Namely, we have to choose exactly _α_ variables out of the set _{t[′] ∈ f_ ( _Dtr_ ) : _σ_ ( _t[′] , tval_ ) _< σ_ ( _ti, tval_ ) _}_ , which corresponds to tuples with a lower similarity score than that of _ti_ (measured by the similarity function _σ_ ). This can be constructed using a _binomial coefficient_ . Furthermore, when _K_ = 1, the label tally _γ[′]_ is entirely determined by the top-1 tuple _t[′]_ . The same observation goes for _γ[′′]_ and _t[′′]_ . To denote this, we define a constant Γ _L_ parameterized by some label _L_ . It represents a tally vector with all values 0 and only the value corresponding to label _L_ being set to 1. We thus need to fix _γ[′]_ to be equal to Γ _y_ ( _t_ ) (and the same for _γ[′′]_ ). Finally, as we observed earlier, when computing _ω_ ( _·|ti, tval, t[′] , t[′′]_ ) for _K_ = 1, the provenance polynomial of the tuple _t[′′]_ must equal _ai_ . With these notions, we can define the counting oracle as + +**==> picture [388 x 67] intentionally omitted <==** + +Note that we always assume � _ab_ � = 0 for all _a < b_ . Given this, we can prove the following corollary about _map_ pipelines: + +**Corollary F.1.** _For the_ 1 _-NN accuracy utility and a_ map _pipeline, which takes as input a dataset of size N , the Shapley value can be computed in O_ ( _N_ log _N_ ) _time._ + +24 + +_Proof._ We start off by plugging in the oracle definition from Equation 33 into the Shapley value computation Equation 6: + +**==> picture [397 x 111] intentionally omitted <==** + +As we can see, the oracle imposes hard constraints on the tuple _t[′′]_ and tally vectors _γ[′]_ and _γ[′′]_ . We will replace the tally vectors with their respective constants and the tuple _t[′′]_ we will denote as _ti_ because it is the only tuple associated with _ai_ . Because of this, we can remove the sums that iterate over them: + +**==> picture [397 x 40] intentionally omitted <==** + +We could significantly simplify this equation by assuming the tuples in _f_ ( _D_ ) are sorted by decreasing similarity. We then obtain: + +**==> picture [345 x 32] intentionally omitted <==** + +We shuffle the sums a little by multiplying _N_ 1[with] � _Nα−_ 1� _−_ 1 and we expand _m_ ∆ based on its definition in subsection E.1. We also alter the limit of the innermost sum because _α ≤ N − j_ . Thus, we obtain: + +**==> picture [357 x 32] intentionally omitted <==** + +The innermost sum in the above equation can be simplified by applying the so-called Hockey-stick identity Ross (1997). Specifically, � _Nα_ � _−_ 1� _Nα−j_ � becomes � _Nj_ � _−_ 1� _N −j α_ �. Then,[�] _[N] α_ =1 _[−][j]_ � _Nj_ � _−_ 1� _N −j α_ � becomes � _Nj_ � _−_ 1� _jN_ +1�. Finally, we obtain the following formula: + +**==> picture [330 x 32] intentionally omitted <==** + +As we can see, the above formula can be computed in _O_ ( _N_ ) iterations. Therefore, given that we still need to sort the dataset beforehand, the overall complexity of the entire Shapley value amounts to _O_ ( _N_ log _N_ ). Here, we assume that we have a precomputed table of factorials from 1 to _N_ that allows us to compute the binomial coefficient in constant time. + +**Computing the Shapley Value for the Entire Training Dataset.** Equation 38 represents a method for computing the Shapley value for a single data example _ti_ . When computing the Shapley value for every tuple in a training dataset, given that the tuples are sorted according to similarity to _tval_ , we can notice that the sum in Equation 38 exhibits the following recursive structure: + +**==> picture [308 x 24] intentionally omitted <==** + +If we take advantage of the above recursive structure, we can see that it is possible to compute the Shapley value for all data examples in a single pass that takes _O_ ( _N_ ) time. Hence, since the overall + +25 + +computation will still be dominated by the sorting procedure, the time to compute the Shapley value for all training tuples with respect to a single validation tuple _tval_ is _O_ ( _N_ log _N_ ). + +**Fork Pipeline.** As we noted, both _map_ and _fork_ pipelines result in polynomials made up of only one variable. The difference is that in _map_ pipeline each variable is associated with at most one polynomial, whereas in _fork_ pipelines it can be associated with multiple polynomials. However, for 1-NN classifiers, this difference vanishes when it comes to Shapley value computation: + +**Corollary F.2.** _For the_ 1 _-NN accuracy utility and a_ fork _pipeline, which takes as input a dataset of size N , the Shapley value can be computed in O_ ( _N_ log _N_ ) _time._ + +_Proof._ We will prove this by reducing the problem of Shapley value computation in fork pipelines to the one of computing it for map pipelines. Let us have two tuples _t[′] j,_ 1 _[, t][′] j,_ 2 _[∈][f]_[(] _[D]_[)][, both associated] with some variable _aj ∈ A_ . That means that _p_ ( _t[′] j,_ 1[) =] _[ p]_[(] _[t][′] j,_ 2[)][.][If we examine Equation 31, we notice] that it will surely evaluate to false if either _σ_ ( _t[′] j,_ 1[)] _[ > σ]_[(] _[t]_[)][ or] _[ σ]_[(] _[t][′] j,_ 2[)] _[ > σ]_[(] _[t]_[)][.][The same observation] holds for Equation 32. + +Without loss of generality, assume _σ_ ( _tj,_ 1) _> σ_ ( _tj,_ 2). Then, _σ_ ( _tj,_ 1) _> σ_ ( _t_ ) implies _σ_ ( _tj,_ 2) _> σ_ ( _t_ ). As a result, we only ever need to check the former condition without paying attention to the latter. The outcome of this is that for all sets of tuples associated with the same variable, it is safe to ignore all of them except the one with the highest similarity score, and we will nevertheless obtain the same oracle result. Since we transformed the problem to one where for each variable we have to consider only a single associated tuple, we have effectively reduced the problem to the one of computing Shapley value for map pipelines. Consequently, we can apply the same algorithm and will end up with the same time complexity. + +- G DETAILS ABOUT THE EXPERIMENTAL PROTOCOL AND ADDITIONAL EVALUATION RESULTS + +**Hardware and Platform.** All experiments were conducted on an AMD EPYC 7742 2.25GHz CPU. We ran each experiment in single-thread mode. All deep learning models were running on an NVIDIA A100 GPU. + +**Datasets.** We assemble a collection of widely used datasets with diverse modalities (i.e. tabular, textual, and image datasets). Table 2 summarizes the datasets that we used. In each experiment, we subsample the dataset to 1 _K_ training data examples by using different random seeds. + +Table 2: Datasets characteristics + +|**Dataset**|**Modality**|**# Examples**
**# Features**|**Label**
**Noise**| +|---|---|---|---| +|UCI Adult
(Kohavi et al., 1996)
FolkUCI Adult
(Ding et al., 2021)
FashionMNIST
(Xiao et al., 2017)
20NewsGroups
(Joachims,1996)|tabular
tabular
image
text|49_K_
14
1_._6_M_
10
14_K_
28_×_28
1_._9_K_
20_K_ after TF-IDF|injected
injected
injected
injected| +|DataPerf Vision(Mazumder et al., 2022)
CIFAR_−_N
(Wei et al., 2022)|tabular
image|1_._1
2048
50_K_
32_×_32_×_3|human
error
human
error| + +**Models.** We use three downstream ML models following the previous feature extraction pipelines: XGBoost, LogisticRegression, and KNearestNeighbor. We use the LogisticRegression and KNeighborsClassifier provided by the sklearn package. We set max_iter to 5,000 for LogisticRegression and set n_neighbors to 1 for KNearestNeighbor. + +**Protocol.** We conduct a series of experimental runs that simulate a real-world importance-driven data debugging workflow. In each experimental run, we select a dataset, pipeline, target model, and data repair method. If a dataset does not already have human-generated label errors, we follow the protocol of Li et al. (2021) and Jia et al. (2021) and artificially inject 50% of label noise. Label noise injection is performed by selecting a random subset representing 50% of training data examples, and replace the original label with some other valid label in a given dataset. Given the selected data repair method, we compute the importance using a _validation dataset_ . We use this computed iportance to sort the training dataset. Data repairs will be conducted using this sorting order. If the repair method is random, the data is sorted randomly. We divide the range between 0% data examined and 100% data examined into 100 checkpoints. Specifically, at each checkpoint, we select the next batch out + +26 + +**==> picture [396 x 234] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: UCI Adult; Pipeline: Identity; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Standard Scaler; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression
00 .. 86 1010 [2][0] 4.582.8838.932.7037.95 00 .. 86 1010 [1][0] 4.9 2 1.7015.911.1713.29 00 .. 86 1010 [1][0] 5.262.2420.341.1812.87
0 . 4 0.05 0 . 4 10 [−] [1] 0.05 0 . 4 10 [−] [1] 0.05
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: UCI Adult; Pipeline: PCA; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression Dataset: 20NewsGroups; Pipeline: TF-IDF; Model: Logistic Regression
00 .. 86 1010 [2][0] 5.022.3425.021.6218.01 0000 .... 8765 1010 [2][0] 8.347.68182.101.1117.86 00 .. 86 1010 [3][1] 5.36538 . 22167 .1947.0421 7.5563.80
0 . 4 0% 50% 100% 0.05 0% 50% 100% 0.14 0 . 4 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset:00 .. 20NewsGroups;86 Pipeline: ToLower + URLRemove10 [3] + TF-IDF;576.43Model:284 . 3061.5351Logistic53.48Regression 00 .. 86Dataset: FashionMNIST; Pipeline: Gaussian1010Blur; [3][1] Model:46.Logistic 3 20.191 Regression94.0119.3577.01 Dataset:00 .. 86FashionMNIST; Pipeline: Histogram of Oriented1010 [3][1] Gradients;39.98Model: [90.] [2] 1165.40 [9] Logistic 21.87Regression
0 . 4 0% 50% 100% 10 [1] 5.37 6.76 0% 50% 100% 0.45 0 . 4 0% 50% 100% 0.40 1.8 2
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: DataPerf Vision; Pipeline: PCA; Model: Logistic Regression Dataset: DataPerf Vision; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression Dataset: CifarN; Pipeline: Histogram of Oriented Gradients; Model: Logistic Regression
00 .. 7570 1010 [2][1] 105.48 18.71 14.06 00 .. 87 10 [2] 103.6624.68255.41 00 .. 4540 10 [3] 108.232546.8623353.28323.102854.83
0 . 65 3.05 2.01 10 [1] 4.63 0 . 35 10 [1]
0% 50% 100% 10 [0] 1.10 0 . 6 0% 50% 100% 10 [0] 1.13 1.35 0 . 30 0% 50% 100% 1.09
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
**----- End of picture text -----**
+ +Figure 10: Label Repair experiment results over various combinations of datasets (1k samples) and map pipelines. We optimize for accuracy. The model is logistic regression. + +of a 100 batches of data examples ordered based on the importance-based sorting order. We repair the labels in the given batch and we measure the quality of the given target model on a separate _test dataset_ using some metric (e.g. accuracy). We also measure the time spent on computing importance scores. At any given checkpoint, the _label effort_ represents the portion of data that was covered in all batches that were processed up to that checkpoint. We repeat each experiment 10 times with different random seeds and report the median as well as the 90-th percentile range (either shaded or with error bars). + +## G.1 ADDITIONAL LABEL REPAIR EXPERIMENTS + +We present the results of an array of experiments that were conducted for the label repair scenario. See section 5 for details on the experimental protocol. See Figure 10 to Figure 14 for experiments where we focus on improving accuracy. See Figure 15 to Figure 19 for experiments that explore the tradeoff between accuracy and fairness. Finally, in Figure 20 we show more results for the label repair experiments over deep learning embedding models for image and text data. + +_Note about Fork Variants_ : We create a “fork” version of the above pipelines, by prepending each with a `DataProvider` operator. It simulates distinct data providers, each providing a portion of the data. The original dataset is split into a given number of groups (100 in our experiments). We compute the importance of each group, and we conduct data repairs on entire groups all at once. + +## G.2 ADDITIONAL SCALABILITY EXPERIMENTS + +We provide results of additional experiments where we attempt to measure the trends of both the label repair efficiency and compute time, as a function of dataset size. To achieve this, instead of evaluating on synthetic data, we evaluate on CIFAR-N, a real-world dataset with human-generated label noise (Figure 23). We use logistic regression as a target model and the HOG transform pipeline for feature extraction. We keep the training and test set size to 5 _K_ data exaples and we vary the training set size from 1 _K_ to 32 _K_ . We can notice that for training set of size 32 _K_ , the TMC method requires around 1 day to complete with 10 Monte Carlo iterations and around 10 days with 100 iterations. At the same time we can notice that the KNN approximation is able to complete in a matter of minutes. + +27 + +**==> picture [397 x 562] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: UCI Adult; Pipeline: Identity; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor
10 [2] 59.33 56.32 0 . 8 10 [2] 71.16 60.43 0 . 8 10 [2] 67.90 63.95
0 . 7
4.70 [6.28] 5.22 4.6 8 [6.41] 5.79 0 . 7 4.7 3 [7.65] 5.77
0 . 6 10 [0] 0 . 6 10 [0] 0 . 6 10 [0]
0 . 5 0.05 0.05 0 . 5 0.05
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: UCI Adult; Pipeline: PCA; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor Dataset: 20NewsGroups; Pipeline: TF-IDF; Model: K-Nearest Neighbor
0 . 7 10 [2] 54.02 53.73 0 . 7 10 [2] 109.31 58.69 0 . 8 10 [4] 2061.40 1197.44
0 . 6 10 [0] 4.83 [6.10] 5.99 0 . 6 7.90 [9.48] 4.80 0 . 6 10 [2] 505.2979.61 125.96
10 [0]
0 . 5 0.05 0 . 5 0.14 0 . 4 5.39
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: 20NewsGroups; Pipeline: ToLower + URLRemove10 [4] + TF-IDF; Model: K-Nearest Neighbor 0 . 8Dataset: FashionMNIST; Pipeline: Gaussian10Blur; [2] Model: 45.88K-Nearest80.57Neighbor56.88 Dataset:0 . 8FashionMNIST; Pipeline: Histogram of Oriented10 [3] Gradients; Model: 597.56K-Nearest Neighbor
00 .. 86 10 [2] 529.0671.4516 6 9.66107.311275.37 0 . 6 10 [1] 8.45 7.02 00 .. 76 10 [1] 37. 3 [61.99] 9 8.0368.69
0 . 4 0% 50% 100% 5.17 0% 50% 100% 10 [0] 0.46 0 . 5 0% 50% 100% 0.40
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: DataPerf Vision; Pipeline: PCA; Model: K-Nearest Neighbor Dataset: DataPerf Vision; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor Dataset: CifarN; Pipeline: Histogram of Oriented Gradients; Model: K-Nearest Neighbor
00 .. 7065 1010 [2][1] 110.465.9056.314.8446.95 000 ... 757065 1010 [2][1] 102.7030.55300.864.3735.47 00 .. 3530 1010 [3][1] 111.611344.9811979.9960.85602.60
10 [0] 1.08 0 . 60 10 [0] 1.07 0 . 25 1.07
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
Figure 11: Label Repair experiment results over various combinations of datasets (1k samples) and
map pipelines. We optimize for accuracy. The model is K-nearest neighbor.
Dataset: UCI Adult; Pipeline: Identity; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Standard Scaler; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression
00 .. 86 10 [1] 47.94 22.45 20.70 0 . 8 10 [1] 51.93 13.24 11.37 0 . 8 10 [1] 50.64 13.97 10.01
2.47 2.23 0 . 6 0 . 6
0 . 4 10 [0] 10 [0] 1.33 1.12 10 [0] 1.22 0.89
0% 50% 100% 0.48 0 . 4 0% 50% 100% 0.49 0 . 4 0% 50% 100% 0.51
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: UCI Adult; Pipeline: PCA; Model: Logistic Regression Dataset: UCI Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression Dataset: 20NewsGroups; Pipeline: TF-IDF; Model: Logistic Regression
0 . 8 48.78 21.84 18.13 0 . 8 10 [2] 52.25 126.73 0 . 8 10 [3] 539.94 851.82
00 .. 64 0% 50% 100% 1010 [1][0] 0.49 1.81 1.47 00 .. 64 0% 50% 100% 1010 [1][0] 0.57 12.30 1.3012.86 0 . 6 0% 50% 100% 10 [1] 5.16 80.80 1.9017.68
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: FashionMNIST; Pipeline: Gaussian Blur; Model: Logistic Regression
Dataset:00 .. 20NewsGroups;86 Pipeline: ToLower + URLRemove1010 [3][1] + TF-IDF;5.45556.03Model:148.411502.17Logistic2.5821.71Regression 00 .. 86 1010 [3][1] 0.8993.0247.701305.8146.611230.24 Dataset:000 ... 864FashionMNIST; Pipeline: Histogram of Oriented1010 [3][1] Gradients;0.8478.Model: 9 659.26697.85Logistic1.7115.14Regression
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: DataPerf Vision; Pipeline: PCA; Model: Logistic Regression Dataset: DataPerf Vision; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression Dataset: CifarN; Pipeline: Histogram of Oriented Gradients; Model: Logistic Regression
00 .. 7570 1010 [2][1] 155.10 20.30 10.84 0 . 75 1010 [2][1] 155.1011.46137.89 00 .. 4540 10 [3] 160.09356.033131.0552.02487.42
0 . 65 1.43 2.22 1.53 0 . 70 10 [0] 1.45 1.203.08 0 . 35 10 [1] 1.56
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s]
Accuracy [s]Time Accuracy Time Accuracy [s]Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
**----- End of picture text -----**
+ +Figure 12: Label Repair experiment results over various combinations of datasets (1k samples) and fork pipelines. We optimize for accuracy. The model is logistic regression. + +28 + +**==> picture [397 x 564] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: UCI Adult; Pipeline: Identity; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor
0 . 7 49.09 26.54 25.57 0 . 8 51.89 34.59 30.96 0 . 8 52.03 33.68 30.86
0 . 6 10 [1] 2.57 2.69 00 .. 76 10 [1] 3.22 2.92 00 .. 76 10 [1] 3.63 3.40
0 . 5 10 [0] 0.47 0 . 5 10 [0] 0.50 0 . 5 10 [0] 0.51
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: UCI Adult; Pipeline: PCA; Model: K-Nearest Neighbor Dataset: UCI Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor Dataset: 20NewsGroups; Pipeline: TF-IDF; Model: K-Nearest Neighbor
00 .. 76 10 [1] 47.492.8527.002.5326.33 00 .. 76 1010 [2][1] 55.776.2562.192.4224.43 00 .. 86 1010 [3][2] 523.37253.482127.6183.46 1 1700.07
0 . 5 10 [0] 0.49 0 . 5 10 [0] 0.58 10 [1] 5.29
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: 20NewsGroups; Pipeline: ToLower + URLRemove + TF-IDF; Model: K-Nearest Neighbor 0 . 8Dataset: FashionMNIST; Pipeline: Gaussian10Blur; [2] Model: 87.27K-Nearest Neighbor Dataset: FashionMNIST; Pipeline: Histogram of Oriented Gradients; Model: K-Nearest Neighbor
00 .. 86 1010 [3][2] 563.76230.942402.8206.26 7 1769.45 00 .. 76 10 [1] 4.9350.213.7737.34 000 ... 876 1010 [2][1] 81.7433.71345.443.9134.29
0 . 4 0% 50% 100% 10 [1] 5.50 0 . 5 0% 50% 100% 10 [0] 0.91 0 . 5 0% 50% 100% 10 [0] 0.83
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: DataPerf Vision; Pipeline: PCA;10Model: [2] K-Nearest152.65Neighbor Dataset: DataPerf Vision; Pipeline: Missing Indicator10+ [2] K-Means; 143.54Model: K-Nearest118.61 Neighbor Dataset:0 . 35 CifarN; Pipeline: Histogram of Oriented 10Gradients; [3] Model: K-Nearest1824.77Neighbor
0 . 70 37.79 23.48 0 . 70 14 2 .07228.59 82.05
0 . 65 0% 50% 100% 10 [1] 1.56 4.56 2.76 0 . 65 0% 50% 100% 10 [1] 1.51 9.77 2.3713.99 00 .. 3025 0% 50% 100% 10 [1] 1.56 11.13
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
Figure 13: Label Repair experiment results over various combinations of datasets (1k samples) and
fork pipelines. We optimize for accuracy. The model is K-nearest neighbor.
Dataset: UCI Adult; Pipeline: Identity; Model: XGBoost Dataset: UCI Adult; Pipeline: Standard Scaler; Model: XGBoost Dataset: UCI Adult; Pipeline: Logarithmic Scaler; Model: XGBoost
0 . 8 10 [2] 51.04 95.66 105.69 0 . 8 10 [2] 49.92 102.99 106.68 0 . 8 10 [2] 51.70 102.17 103.91
10 [1] 8.29 8.53 10 [1] 9.88 8.76 10 [1] 12.26 11.36
0 . 6 0 . 6 0 . 6
10 [0] 0.51 10 [0] 0.51 10 [0] 0.48
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: UCI Adult; Pipeline: PCA; Model: XGBoost Dataset: UCI Adult; Pipeline: Missing Indicator + K-Means; Model: XGBoost Dataset: 20NewsGroups; Pipeline: TF-IDF; Model: XGBoost
00 .. 86 1010 [2][1] 51.0816.46187.2914.54157.60 00 .. 76 1010 [2][1] 54.1011.09112.597.4264.75 00 .. 86 1010 [4][2] 539.40199.712892.5226.01 7 3399.57
10 [0] 0.50 0 . 5 10 [0] 0.59 5.25
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: 20NewsGroups; Pipeline: ToLower + URLRemove + TF-IDF; Model: XGBoost Dataset: FashionMNIST; Pipeline: Gaussian Blur; Model: XGBoost Dataset: FashionMNIST; Pipeline: Histogram of Oriented Gradients; Model: XGBoost
00 .. 86 1010 [4][2] 569.25213.063066.8262.37 0 3159.65 00 .. 86 1010 [3][1] 89.93527.955870.9504.725 5654.36 00 .. 86 1010 [3][1] 83. 4 068.751003.231.54 9 587.45
5.34 0.89 0.84
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: DataPerf Vision; Pipeline: PCA; Model: XGBoost Dataset: DataPerf Vision; Pipeline: Missing Indicator + K-Means; Model: XGBoost Dataset: CifarN; Pipeline: Histogram of Oriented Gradients; Model: XGBoost
0000 .... 80757065 0% 50% 100% 101010 [3][2][1] 1.60153.8632.77370.4588.251068.30 000 ... 757065 0% 50% 100% 101010 [2][1][0] 1.57152.3917.92250.143.7036.36 0000 .... 45403530 0% 50% 100% 101010 [5][3][1] 1.50144.285633.447739. 0 5005.38 8 044448.9
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
Accuracy [s]Time Accuracy [s]Time Accuracy [s]Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
**----- End of picture text -----**
+ +Figure 14: Label Repair experiment results over various combinations of datasets (1k samples) and fork pipelines. We optimize for accuracy. The model is XGBoost. + +29 + +**==> picture [394 x 290] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Identity; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Identity; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 75 10 [1] 22.91 20.67 0 . 8 1 . 0 10 [2] 21.77211.8020.09183.17
0 . 6 0 . 50 10 [0] 4.092.14 1.86 0 . 6 0 . 5 4.93
0 . 25 10 [0]
0 . 4 0 . 00 10 [−] [1] 0.05 0 . 4 0 . 0 0.05
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: Logistic Regression; Optimize for: Equalized Odds Difference
00 .. 86 000 ... 755025 1010 [1][0] 4.531.7322.281.7315.97 00 .. 86 10 .. 05 1010 [2][0] 4.8 4 12.23103.936.9870.32
0 . 4 0% 50% 100% 0 . 00 0% 50% 100% 10 [−] [1] 0.05 0 . 4 0% 50% 100% 0 . 0 0% 50% 100% 0.05
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression; Optimize for: Equalized Odds Difference
00 .. 86 00 .. 7550 1010 [1][0] 4.342.0726.721.3617.65 00 .. 86 10 .. 05 1010 [2][0] 4.9313.48127.578.5978.77
0 . 25
0 . 4 0 . 00 10 [−] [1] 0.05 0 . 4 0 . 0 0.05
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: PCA; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: PCA; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 75 30.07 18.86 0 . 8 1 . 0 10 [2] 162.26 103.68
0 . 6 00 .. 5025 1010 [1][0] 4.502.67 2.28 0 . 6 0 . 5 10 [0] 5.3414.86 11.23
0 . 4 0% 50% 100% 0 . 00 0% 50% 100% 10 [−] [1] 0.05 0 . 4 0% 50% 100% 0 . 0 0% 50% 100% 0.05
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 7 0 . 4 10 [2] 118.29 0 . 7 0 . 4 821.56
0 . 6 20.59 0 . 6 10 [2] 79.78 69.66
00 .. 54 0 . 2 10 [0] 7.05 [7.90] 1.72 00 .. 54 0 . 2 10 [0] 7.11 7.69
0 . 0 0.13 0 . 0 0.13
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
**----- End of picture text -----**
+ +Figure 15: Label Repair experiment results over various combinations of datasets (1k samples) and map pipelines. We optimize for fairness. The model is logistic regression. + +30 + +**==> picture [394 x 290] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Identity; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Identity; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
00 .. 76 00 .. 21 1010 [2][0] 4.09 [4.69] 43.774.6746.74 00 .. 76 0 . 2 1010 [2][0] 6.0833.50326.6034.06325.78
0 . 5 0 . 0 0.04 0 . 5 0 . 0 0.07
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
000 ... 765 00 .. 42 1010 [2][0] 4.383.6445.114.2247.48 000 ... 765 000 ... 642 1010 [2][0] 6.4343.49438.4042.36409.07
0 . 0 0.05 0 . 0 0.07
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
00 .. 76 00 .. 42 1010 [2][0] 4.303.8453.624.0747.04 00 .. 76 000 ... 642 1010 [2][0] 6.6842.60473.0433.98362.17
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 0.05 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 0.07
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: PCA; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: PCA; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
00 .. 76 00 .. 21 1010 [1][0] 4.394.1944.853.8648.53 00 .. 76 0 . 2 1010 [2][0] 6.4933.83322.7031.17334.58
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [−] [1] 0.05 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 0.06
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
0 . 7 0 . 2 10 [2] 86.88 47.72 0 . 7 0 . 3 1068.64 285.65
0 . 6 6.87 [8.28] 4.61 0 . 6 0 . 2 10 [2] 92.26 25.61
0 . 1 7.84
0 . 5 10 [0] 0 . 5 0 . 1 10 [0]
0% 50% 100% 0 . 0 0% 50% 100% 0.13 0% 50% 100% 0 . 0 0% 50% 100% 0.15
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s]
Difference Time Difference Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Time Difference Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
**----- End of picture text -----**
+ +Figure 16: Label Repair experiment results over various combinations of datasets (1k samples) and map pipelines. We optimize for fairness. The model is K-nearest neighbor. + +31 + +**==> picture [394 x 288] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Identity; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Identity; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 75 47.05 0 . 8 0 . 75 49.84 50.15 48.71
00 .. 76 0 . 50 10 [1] 14.52 14.31 0 . 6 0 . 50 10 [1] 4.91 4.80
0 . 5 0 . 25 10 [0] 1.38 1.34 0 . 25 10 [0]
0% 50% 100% 0 . 00 0% 50% 100% 0.47 0% 50% 100% 0 . 00 0% 50% 100% 0.50
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 6 46.58 0 . 8 0 . 75 50.45 30.86 24.65
0 . 6 00 .. 42 1010 [1][0] 1.3310.321.048.19 0 . 6 00 .. 5025 1010 [1][0] 3.14 2.38
0 . 4 0.50 0 . 4 0.49
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 75 48.22 0 . 8 0 . 75 51.79 30.48 23.94
0 . 6 00 .. 5025 1010 [1][0] 1.4610.950.977.93 0 . 6 00 .. 5025 1010 [1][0] 3.20 2.37
0 . 4 0% 50% 100% 0% 50% 100% 0.51 0 . 4 0% 50% 100% 0 . 00 0% 50% 100% 0.50
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: PCA; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: PCA; Model: Logistic Regression; Optimize for: Equalized Odds Difference
0 . 8 0 . 6 49.47 0 . 8 0 . 75 50.52 44.51 33.93
0 . 6 0 . 4 10 [1] 13.03 10.54 0 . 6 0 . 50 10 [1] 4.50 3.58
0 . 2 10 [0] 1.82 1.18 0 . 25 10 [0]
0 . 4 0% 50% 100% 0% 50% 100% 0.50 0 . 4 0% 50% 100% 0 . 00 0% 50% 100% 0.52
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: Logistic Regression; Optimize for: Equalized Odds Difference
000 ... 765 00 .. 42 1010 [2][1] 51.569.57110.68 10.04 000 ... 765 00 .. 42 1010 [2][1] 54.0022.63228.922.7024.57
0 . 4 0 . 0 10 [0] 0.54 1.14 0 . 4 0 . 0 10 [0] 0.61
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
**----- End of picture text -----**
+ +Figure 17: Label Repair experiment results over various combinations of datasets (1k samples) and fork pipelines. We optimize for fairness. The model is logistic regression. + +32 + +**==> picture [394 x 290] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Identity; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Identity; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
0 . 7 0 . 2 49.94 24.78 22.29 0 . 7 0 . 2 10 [2] 52.05 153.66 147.50
0 . 6 0 . 1 10 [1] 2.61 2.69 0 . 6 0 . 1 10 [1] 15.09 14.67
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.50 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.50
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
0 . 7 0 . 3 51.66 25.10 24.92 0 . 7 0 . 3 10 [2] 51.83 186.52 187.28
0 . 6 0 . 2 10 [1] 0 . 6 0 . 2 10 [1] 17.18 16.60
0 . 5 00 .. 10 10 [0] 0.49 2.47 2.15 0 . 5 00 .. 10 10 [0] 0.54
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
0 . 7 0 . 4 50.70 26.90 23.17 0 . 7 0 . 4 10 [2] 50.38 180.17 172.59
0 . 6 0 . 2 10 [1] 2.73 2.41 0 . 6 0 . 2 10 [1] 18.34 15.62
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.48 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.52
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: PCA; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: PCA; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
0 . 7 0 . 2 47.18 24.03 24.22 0 . 7 0 . 2 10 [2] 51.80 155.05 146.79
0 . 6 10 [1] 0 . 6 10 [1] 15.96 15.30
0 . 1 2.65 2.45 0 . 1
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.49 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.51
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: K-Nearest Neighbor; Optimize for: Equalized Odds Difference
00 .. 76 0 . 2 10 [1] 52.39 59.48 24.37 00 .. 76 0 . 2 10 [2] 51.1837.36369.67 135.70
0 . 1 4.94 0 . 1 10 [1] 13.16
1.99
0 . 5 0 . 0 10 [0] 0.57 0 . 5 0 . 0 10 [0] 0.59
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
**----- End of picture text -----**
+ +Figure 18: Label Repair experiment results over various combinations of datasets (1k samples) and fork pipelines. We optimize for fairness. The model is K-nearest neighbor. + +33 + +**==> picture [395 x 291] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: Folktables Adult; Pipeline: Identity; Model: XGBoost; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Identity; Model: XGBoost; Optimize for: Equalized Odds Difference
00 .. 76 00 .. 32 1010 [2][1] 46.057.5566.217.5866.51 00 .. 76 00 .. 42 1010 [2][1] 58. 6 359.77611.1758.08627.03
0 . 5 0% 50% 100% 00 .. 10 0% 50% 100% 10 [0] 0.49 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.71
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: XGBoost; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Standard Scaler; Model: XGBoost; Optimize for: Equalized Odds Difference
0 . 4 10 [2] 48.90 76.78 61.48 0 . 4 10 [3] 632.32 634.02
00 .. 76 0 . 2 10 [1] 7.13 7.45 00 .. 76 0 . 2 10 [1] 60. 0 262.32 64.09
0 . 5 0 . 0 10 [0] 0.51 0 . 5 0 . 0 0.70
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: XGBoost; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Logarithmic Scaler; Model: XGBoost; Optimize for: Equalized Odds Difference
00 .. 76 00 .. 42 1010 [2][1] 47.937.4667.217.6970.83 00 .. 76 00 .. 32 1010 [3][1] 58. 6 [64.60] 9 592.0357.28595.24
0 . 1
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.50 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 0.70
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: PCA; Model: XGBoost; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: PCA; Model: XGBoost; Optimize for: Equalized Odds Difference
0 . 8 0 . 4 10 [3] 1076.8 5 1065.90
0 . 7 10 [2] 51.48 100.32 92.03 0 . 7 0 . 4 70. 4 [103.46] 3 110.23
0 . 6 0 . 2 10 [1] 7.36 8.11 0 . 6 0 . 2 10 [1]
0 . 5 0 . 0 10 [0] 0.50 0 . 5 0 . 0 0.78
0% 50% 100% 0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: XGBoost; Optimize for: Accuracy Dataset: Folktables Adult; Pipeline: Missing Indicator + K-Means; Model: XGBoost; Optimize for: Equalized Odds Difference
0 . 7 00 .. 32 10 [2] 52.39 107.53 71.09 0 . 7 0 . 2 10 [3] 69.3 [111.54] 4 1130.892.77 8 921.94
0 . 6 10 [1] 10.68 0 . 6
0 . 1 4.85 0 . 1 10 [1]
0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 10 [0] 0.57 0 . 5 0% 50% 100% 0 . 0 0% 50% 100% 0.82
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN Datascope KNN Interactive
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Difference
Time Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Time Difference Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
[s] [s]
Difference Time Difference Time
Accuracy Odds Accuracy Odds
Compute Compute
Equalized Equalized
**----- End of picture text -----**
+ +Figure 19: Label Repair experiment results over various combinations of datasets (1k samples) and fork pipelines. We optimize for fairness. The model is XGBoost. + +**==> picture [387 x 119] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: FashionMNIST; Pipeline: ResNet-18 Embedding; Model: K-Nearest Neighbor Dataset: FashionMNIST; Pipeline: ResNet-18 Embedding; Model: Logistic Regression Dataset: FashionMNIST; Pipeline: ResNet-18 Embedding; Model: XGBoost
0 . 8 211 ... 2862 × × × × 10 10 10 10 [2][2][2][2] 188.46 0 . 8 32 × × 10 10 [2][2] 214.86 0 . 8 10 [4]
0 . 6 11 .. 42 × × 10 10 [2][2] 127.53 0 . 6 142.04 0 . 6 10 [3]
0% 50% 100% 10 [2] 107.24 0% 50% 100% 10 [2] 105.86 0% 50% 100% 10 [2] 108.99 150.89 159.04
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: 20NewsGroups; Pipeline: MiniLM Embedding; Model: K-Nearest Neighbor Dataset: 20NewsGroups; Pipeline: MiniLM Embedding; Model: Logistic Regression Dataset: 20NewsGroups; Pipeline: MiniLM Embedding; Model: XGBoost
1 . 0 4 . 4 × 10 [2] 1 . 0 1 . 0
00 .. 86 0% 50% 100% 43333 ..... 248642 × × × × × × 10 10 10 10 10 10 [2][2][2][2][2][2] 353.94 369.48 413.91 000 ... 864 0% 50% 100% 64 × × 10 10 [2][2] 361.87 402.72 515.36 000 ... 864 0% 50% 100% 1010 [4][3] 358.60 952.79 4244.06
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random Datascope TMC x10 Datascope TMC x100 Datascope KNN
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
[s] [s] [s]
Accuracy Time Accuracy Time Accuracy Time
Compute Compute Compute
**----- End of picture text -----**
+ +Figure 20: Label repair experiment executed over pipelines based on deep learning embedding models: ResNet-18 for image data, and the transformer based MiniLM for text data. Even though pipeline was executed on a GPU, this execution time dominates the overall importance compute times. Due to the long compute time of these pipelines we omit the vanilla black-box TMC methods. + +34 + +**==> picture [383 x 109] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: FashionMNIST; Pipeline: MobileNetV2 Embedding; Model: K-Nearest Neighbor Dataset: FashionMNIST; Pipeline: MobileNetV2 Embedding; Model: Logistic Regression Dataset: FashionMNIST; Pipeline: MobileNetV2 Embedding; Model: XGBoost
0.8 10 [4] 9003.94 0.8 10 [4] 9497.48 0.8 10 [4]
0.70.60.5 10 [2] 14.24557.56 15.8631.56 0.6 1010 [3][2] 15.111086.9117. 8 54.516 0.6 10 [2] 14.17277.652603.5934. 1 44.290
0% 50% 100% 0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Dataset: 20NewsGroups; Pipeline: ALBERT Small; Model: K-Nearest Neighbor Dataset: 20NewsGroups; Pipeline: ALBERT Small; Model: Logistic Regression Dataset: 20NewsGroups; Pipeline: ALBERT Small; Model: XGBoost
0.80.6 1010 [4][2] 220.223579.2227.84 0.80.6 1010 [3][2] 316.063597.4252.50 0.80.6 1010 [4][2] 17 9 2893.56.24 45.67996.3
0% 50% 100% 4.41 6.04 0.40% 50% 100% 10 [1] 4.16 7.20 0.40% 50% 100% 4.73
Portion of Labels Examined Portion of Labels Examined Portion of Labels Examined
Random TMC x10 TMC x100 Datascope TMC x10 Datascope TMC x100 Datascope KNN
Accuracy Accuracy Accuracy
Compute Time [s] Compute Time [s] Compute Time [s]
Accuracy Accuracy Accuracy
Compute Time [s] Compute Time [s] Compute Time [s]
**----- End of picture text -----**
+ +Figure 21: Label repair experiment executed over pipelines based on smaller deep learning embedding models. This permitted us to run both the Canonpipe TMC and vanilla TMC methods, along with our Canonpipe KNN method which still performs favorably compared to other baselines. + +**==> picture [335 x 86] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: CifarN; Pipeline: Identity; Model: Matching Network Dataset: FashionMNIST; Pipeline: Identity; Model: Matching Network
10 [4] 1629 0.8 10 [4]
0.5
1750.57 641.24
0.4 10 [2] 0.6 10 [2] 76.58
3.36 3.30
0% 50% 100% 0% 50% 100%
Portion of Labels Examined Portion of Labels Examined
Random Datascope TMC x10 Datascope TMC x100 Datascope KNN
Accuracy Accuracy
Compute Time [s] Compute Time [s]
**----- End of picture text -----**
+ +Figure 22: Experiments where we use matching networks, a one-shot learning approach, as a target model which we evaluate over the CifarN and FashionMNIST datasets. + +**==> picture [238 x 111] intentionally omitted <==** + +**----- Start of picture text -----**
+Dataset: CIFAR-N; Pipeline: Histogram of Oriented Gradients
Target Model: Logistic Regression; Validation / Test Set Size: 5K
10 [6]
40%
10 [3]
20%
1k 3k 10k 32k 1k 3k 10k 32k
Training Set Size Training Set Size
Random Datascope TMC x10 Datascope TMC x100 Datascope KNN
Compute Time [s]
of Maximum Accuracy
Data Repaired to Get 50%
**----- End of picture text -----**
+ +Figure 23: Evaluating how the label repair efficiency and compute time of Datascope scale as a function of dataset size. On the left-hand side we show how many data examples need to be repaired in order to recover 1 _/_ 2 of the maximum possible accuracy on the given dataset. We can notice that the KNN approximation is able to consistently achieve comparative label repair efficiency with orders of magnitude less compute time. + +35 + diff --git a/open_review/iclr2024_8829.json b/open_review/iclr2024_8829.json new file mode 100644 index 0000000000000000000000000000000000000000..a0acb2230d6b64a441c9a21237ead67195e71972 --- /dev/null +++ b/open_review/iclr2024_8829.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8829", + "source": "iclr2024", + "source_year": 2024, + "title": "Meta-VBO: Utilizing Prior Tasks in Optimizing Risk Measures with Gaussian Processes", + "abstract": "Research on optimizing the risk measure of a blackbox function using Gaussian processes, especially Bayesian optimization (BO) of risk measures, has become increasingly important due to the inevitable presence of uncontrollable variables in real-world applications. Nevertheless, existing works on BO of risk measures start the optimization from scratch for every new task without considering the results of prior tasks. In contrast, its vanilla BO counterpart has received a thorough investigation on utilizing prior tasks to speed up the current task through the body of works on meta-BO which, however, have not considered risk measures. To bridge this gap, this paper presents the first algorithm for meta-BO of risk measures (i.e., value-at-risk (VaR) and the conditional VaR), namely meta-VBO, by introducing a novel adjustment to the upper confidence bound acquisition function. Our proposed algorithm exhibits two desirable properties: (i) invariance to scaling and vertical shifting of the blackbox function and (ii) robustness to prior harmful tasks. We provide a theoretical performance guarantee for our algorithm and empirically demonstrate its performance using several synthetic function benchmarks and real-world objective functions.", + "rebuttal": "### Appreciating Your Reviews and Humbly Ask For Feedback\nDear Reviewer,\n\nWe just want to express our appreciation for your assessment of both our paper and our rebuttal. If time allows during the remaining author-reviewer discussion period, we would appreciate your feedback on whether our response has sufficiently addressed your concerns about our paper. Thank you once more for your valuable insights and suggestions during the rebuttal process.\n\nKind regards,\n\nAuthors\n\n### Appreciating Your Reviews and Humbly Ask For Feedback\nDear Reviewer,\n\nDuring the remaining hours of the author-reviewer discussion period, it would be great if you could inform us whether our response has addressed your concerns regarding our paper. Your dedication to reviewing our work despite your busy schedule is genuinely appreciated. Lastly, we just want to say thank you for your evaluation of both our paper and our rebuttal.\n\nKind regards,\n\nAuthors\n\n### Response to Reviewer 25FF's Questions\nWe greatly appreciate your recognition of our innovative development of the no-regret query set and the careful consideration of the quality of knowledge from prior tasks to the current task.\n\nIn the following paragraphs, we would like to address your questions and concerns.\n\n> 1. The key contribution seems to be the introduction of the idea of a no-regret-query set (NQS). Maybe I missed it, but it feels like it is more generally applicable than the exact problem being considered in this work. If not, perhaps it would be beneficial to know what makes N [...]\n\n### Response to Reviewer 25FF's Questions (continued)\n> 5. If \\lambda goes near 0, then \\eta can go near infinity and the regret guarantee becomes vacuous. This results in two important hyper-parameters of the problem: \\eta and \\lambda, that would essentially control exploration-exploitation. While 3.3 gives one recommendation, how sensitive are the practical results to the choice of their values?\n\n We would like to thank the reviewer for the insightful question. While $\\eta$ can go near infinity when $\\lambda$ goes near $0$, from equation (7), note that the LHS is bounded from below by $\\mi [...]\n\n### Response to Reviewer 4GcU's Comments\nWe would like to thank you for acknowledging the quality of our writing, the motivation, the thorough literature review, and the elegance of the no-regret query set. We also value your acknowledgement of the importance of the priority assignment, the theoretical results, and the numerical experiments.\n\nWe provide the following clarifications to address your concerns and question.\n\n> + the distribution of Z is supposed to be known. Is it a parameterized distribution that is fitted in practice?\n\n We adopt this assumption from previous works on BO of risk [...]\n\n### Response to Reviewer 4GcU's Comments (continued)\n> Minor comments:\n> + titles of subsection 2.2 and Section 3 are the same.\n\n We have revised the titles of Subsection 2.2 and Section 3 to be 'Meta-BO of Risk Measures' and 'Our Proposed Solution to Meta-BO of Risk Measures', respectively.\n \n> + In my opinion, there is a lack of details about the transfer knowledge from previous tasks in the settings. For a reader who is not familiar with meta learning, it would have been helpful to know precisely (in the settings) what is the \"knowledge\" you extract from a previous task. In your case, thi [...]\n\n### Response to Reviewer 4GcU's Questions\n> 1. It seems that the construction of NQS basically relies on the upper and lower confidence bounds of the risk measure $\\rho_f$ in eq (3). In ordinary BO, the UCB and LCB of the unknown objective function f are the direct equivalence of these confidence bounds for risk measure when the goal is optimized f. Then, an NQS for ordinary meta-BO could be constructed in the same way and could incur a similar regret guarantee. Could the author comment on this extension of NQS in classic meta-BO?\n \nThis is a very insightful observation! As outlined by the r [...]\n\n### Response to Reviewer 4GcU's Weaknesses\nWe appreciate your acknowledgment of our novel development of NQS, the interpretability and motivation of our proposed algorithm. In addressing your inquiries, we would like to offer the following clarifications.\n\n> 1. It is unclear why $\\lambda$ and $\\eta$ are proposed to trade off the goals of NQS explicitly. The algorithm, by default, sets $\\lambda = 0$ and $\\eta = 1$ as discussed following the theorem 3.7.\n\n To assist readers in grasping the essence of our technical approach, we begin by presenting it in a way that starts with basic conceptual i [...]\n\n### Thank You for Your Continued Positive Support\nWe are delighted that the our responses have addressed your questions, and we appreciate your continued positive support for our paper.\nOnce again, thank you for the time and effort you invested in reviewing our paper and our response.\n\n### Thank You for Your Feedback and Review of Our Paper\nThank you for your timely response and for reviewing our paper. \nWe sincerely value the time and effort you dedicated to this extensive process.\n\n### Thank You for Your Valuable Feedback\nDear Reviewer,\n\nWe sincerely appreciate your prompt response and the increased score which hold great significance for us. We highly appreciate the commitment you have shown in carefully examining all the feedback and assessing our paper.\n\nKind regards,\n\nAuthors", + "initial_scores": [ + 6, + 6, + 8 + ], + "score_mean": 6.67, + "score_variance": 1.33, + "score_spread": 2, + "score_min": 6, + "score_max": 8, + "decision": "Accept (poster)", + "rebuttal_validity_ground_truth": true, + "meta_review": "All reviewers agree that this is a decent contribution to the literature on Bayesian optimization and shows how to incoprorate prior knowledge when optimizing risk scores. The paper offers new methodological insights.", + "forum_id": "ElykcDu5YK", + "primary_area": "probabilistic methods (Bayesian methods, variational inference, sampling, UQ, etc.)", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_25FF", + "review_id": "zUqeWBmkvp", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 3330, + "edit_detected": false, + "edit_delta_seconds": 0, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_4GcU", + "review_id": "oab7v9Aldt", + "scores": { + "rating": 6, + "soundness": 2, + "presentation": 1, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 2191, + "edit_detected": true, + "edit_delta_seconds": 1893189, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_ZY9Q", + "review_id": "Mc84O9N0ND", + "scores": { + "rating": 8, + "soundness": 4, + "presentation": 4, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 4429, + "edit_detected": true, + "edit_delta_seconds": 1306858, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8829.md b/open_review/iclr2024_8829.md new file mode 100644 index 0000000000000000000000000000000000000000..42720ec855793be31ddd128d7dc8107541915777 --- /dev/null +++ b/open_review/iclr2024_8829.md @@ -0,0 +1,273 @@ + + +## META-VBO: UTILIZING PRIOR TASKS IN OPTIMIZING RISK MEASURES WITH GAUSSIAN PROCESSES + +Authors withheld for review + +## ABSTRACT + +Research on optimizing the risk measure of a blackbox function using Gaussian processes, especially _Bayesian optimization_ (BO) of risk measures, has become increasingly important due to the inevitable presence of uncontrollable variables in real-world applications. Nevertheless, existing works on BO of risk measures start the optimization from scratch for every new task without considering the results of prior tasks. In contrast, its vanilla BO counterpart has received a thorough investigation on utilizing prior tasks to speed up the current task through the body of works on _meta-BO_ which, however, have not considered risk measures. To bridge this gap, this paper presents the first algorithm for _meta-BO of risk measures_ (i.e., _value-at-risk_ (VaR) and the _conditional VaR_ ), namely meta-VBO, by introducing a novel adjustment to the upper confidence bound acquisition function. Our proposed algorithm exhibits two desirable properties: (i) invariance to scaling and vertical shifting of the blackbox function and (ii) robustness to prior harmful tasks. We provide a theoretical performance guarantee for our algorithm and empirically demonstrate its performance using several synthetic function benchmarks and real-world objective functions. + +## 1 INTRODUCTION + +Real world optimization problems, such as maximizing the performance of a manufacturing line, the crop yield of a farm, and the performance of _machine learning_ (ML) models, often face with the challenge of dealing with blackbox objective functions (i.e., without closed-form expressions, convexity, or derivatives) and time-consuming or expensive noisy zeroth-order evaluations (Snoek et al., 2012; Nguyen et al., 2021b). These issues have attracted significant attention, particularly on the _Bayesian optimization_ (BO) framework (Srinivas et al., 2010; Snoek et al., 2012; Shahriari et al., 2015; Hernández-Lobato et al., 2014; Wang and Jegelka, 2017; Garnett, 2022). Recently, there has been an increasing interest in _BO of risk measures_ , driven by the need to address practical aspects related to uncontrollable variables referred to as _environmental random variables_ (Cakmak et al., 2020), e.g., random errors in sensors of the manufacturing line, weather conditions in farms (Nguyen et al., 2021b;a), and random perturbation in training data of ML models (Bogunovic et al., 2018). BO of risk measure algorithms specifically search for the controllable _decision variables_ (e.g., applied torque, input force, nutrient amounts, and ML model hyperparameters) that optimize a _risk measure_ of the blackbox function where the risk is induced by the environmental random variables. Risk measures investigated in existing works include the worst-case value (Bogunovic et al., 2018), _valueat-risk_ (VaR) and _conditional VaR_ (CVaR) (Cakmak et al., 2020; Nguyen et al., 2021b;a; Picheny et al., 2022), probability threshold robustness (Iwazaki et al., 2021a), and the variance (Iwazaki et al., 2021b; Makarova et al., 2021). + +While there is an extensive research on BO of risk measures, using learning experiences from _prior tasks_ to accelerate the optimization of the _current task_ has not been explored. In contrast, this approach has been shown to effectively reduce the number of costly observations required by the _vanilla BO_ counterpart through numerous works on _meta-BO_ . These works encompass a wide spectrum of methodologies, ranging from those that involve the transfer of the probabilistic models from prior tasks to the current one (Swersky et al., 2013), to more nuanced approaches centered on transferring the optimization result (Feurer et al., 2018; Wistuba et al., 2016; 2018; Perrone et al., + +1 + +2019; Ramachandran et al., 2019; Volpp et al., 2020; Dai et al., 2022). Although the former category, such as the multi-task _Gaussian processes_ (GP) (Swersky et al., 2013), is well-defined, it often suffers from computational challenges as discussed by Dai et al. (2022) and is not specifically tailored to the goal of optimization - the blackbox function’s maximizer. In contrast, the latter category, which attracts the majority of research attention, presents greater challenges and lacks a clearly defined framework. For example, Feurer et al. (2018) transfers the ranking of function evaluations. Perrone et al. (2019) narrows down the search space. Ramachandran et al. (2019) considers the distribution of the optima. Dai et al. (2022) considers a weighted average of the acquisition functions. + +In this paper, we focus on the challenge of transferring the optimization outcome. Specifically, we pioneer the first solution to the _meta-BO of risk measure_ problem, namely _meta-VBO_ . Our work accounts for the risk introduced by the environmental random variables - a crucial aspect not addressed in any existing meta-BO works. We focus on two well-known risk measures: _value-atrisk_ (VaR) and _conditional VaR_ (CVaR) (Cakmak et al., 2020; Torossian et al., 2020). Moreover, our solution also extends to the adversarially robust BO (Bogunovic et al., 2018) and applies to the meta-BO problem. We assume that the distribution of the environmental random variables is given, e.g., by estimating from historical data or domain knowledge. Additionally, we assume that during the optimization, noisy evaluations of the blackbox function can be acquired (queried) at any realizations of the environmental random variables. In the above examples, this can be achieved running simulations of manufacturing lines with controlled random errors or growing indoor plants in a laboratory environment where weather conditions are regulated. After the optimization is completed, we recommend implementing the best decision variable in the real-world environment where the environmental random variables are beyond our control.[1] These assumptions are commonly made in several BO works with risk measures (Cakmak et al., 2020; Nguyen et al., 2021b;a). + +Under the above settings, there are several major challenges in addressing meta-BO of risk measures. **First** , the choice of the information to be transferred from _prior tasks_ to the _current task_ should be tailored to the optimization goal of determining the optima’s locations. Since they are invariant under scaling and vertical-shifting (i.e., increasing or decreasing the function by a constant) of the blackbox function, it is crucial to ensure that the proposed meta-BO of risk measure solution maintains this invariance. Hence, it rules out the use of the function gap (i.e., the maximum difference between function evaluations) in the theoretical study of Dai et al. (2022) as a similarity measure between tasks. **Second** , as the number of prior tasks grows, the possibility of encountering a task that hampers the current optimization task arises (Feurer et al., 2018; Dai et al., 2022). Thus, it is essential to be resilient against such prior harmful tasks. + +Moreover, one cannot easily extend existing meta-BO solutions to address the BO problem with risk measures. While the posterior belief of the blackbox function follows a GP in the vanilla BO, many risk measures including VaR and CVaR do not follow any well-known stochastic process. Hence, it is challenging to adopt approaches based on the Gaussian posterior distribution in the works of Ramachandran et al. (2019) and Dai et al. (2022). Furthermore, risk measures are not directly observed. They are only estimated from noisy evaluations of the blackbox function. As a result, although Feurer et al. (2018) is able to discover and assign low weights to prior harmful tasks by proposing a ranking loss function, extending this loss function to tackle risk measures is not immediately obvious. Last, there are not any existing meta-BO works that possess both theoretical performance guarantees and robustness against scaling and vertical-shifting of the blackbox function and prior harmful tasks. + +To address the above problems, we introduce a new perspective in constructing our solution, namely _meta-VBO_ . Specifically, while the classic _Gaussian process - upper confidence bound_ (GP-UCB) algorithm (Srinivas et al., 2010) offers only one option of the input query at each BO iteration, we pursue a different approach of construcing a _versatile query set_ (V-set) in Sec. 3.1. Interestingly, we can obtain a no-regret algorithm by selecting any input in this set as the input query (Theorem 3.2). To the best of our knowledge, this characteristic has not been introduced in any BO algorithm. On one hand, it implies that by restricting the choice of the input query to V-set, the algorithm is no-regret regardless of prior harmful tasks. On the other hand, the flexibility in choosing the input query from a set (as opposed to one option in GP-UCB) allows us to transfer information from prior tasks to the current task by assigning different preferences/priorities to inputs in V-set (Sec. 3.2). Essentially, inputs that are likely to be local (or global) maximizers of many prior tasks are assigned high priorities. + +> 1The notion of the best decision variable is discussed in Sec. 3.3. + +2 + +The size of V-set can be tuned via two hyperparameters, which allows a trade-off between the amount of information to be incorporated from prior tasks and the cumulative regret bound of the current ask. This reflects the intuition that without knowing the similarity between prior tasks and the current task, utilizing more information from prior tasks may not benefit the current task. We justify the selected hyperparameters in the experiments based on the incurred regret. Furthermore, V-set is adaptively updated as observations are accumulated from one iteration to the next. This naturally adjusts the effect of prior tasks on the current task as discussed in Remark 3.4, ensuring meta-VBO’s robustness to prior harmful tasks. In Sec. 3.3, we propose a strategy to recommend an input that approximates the optimal solution at each iteration such that its instantaneous regret diminishes towards zero as the iteration progresses (Theorem 3.7). Last, we empirically evaluate the performance of meta-VBO in optimizing VaR and CVaR of several synthetic and real-world objective functions in Sec. 4. + +## 2 PRELIMINARY + +## 2.1 BO OF RISK MEASURES + +We are interested in maximizing a blackbox objective function _f_ (e.g., the performance of a system) that depends on both the _decision variable_ **x** _∈X_ and the _environmental variable_ **z** _∈Z_ , where _X_ and _Z_ are bounded subsets of R _[d]_ and R _[d][′]_ , respectively. We assume that _X_ and _Z_ are discrete for simplicity, though the results can be extended to continuous domains (Srinivas et al., 2010; Chowdhury and Gopalan, 2017). Furthermore, in the real-world environment, **x** is controllable while **z** (e.g., weather conditions and random errors) is not. Hence, the environmental variable is represented as a random variable, denoted as **Z** . We assume that the distribution of **Z** is known, e.g., by estimating from historical data or domain knowledge. These settings are adopted from the existing works of Cakmak et al. (2020); Nguyen et al. (2021b;a). + +Due to the randomness in **Z** , evaluating the blackbox function at a particular value of **x** can result in a high value under one realization of **Z** but leading to a low value under another realization of **Z** . In other words, the evaluation of _f_ at **x** is a random variable, denoted as _f_ ( **x** _,_ **Z** ), whose randomness is induced by **Z** . Therefore, to determine the “optimal” design variable **x** _∗_ , one cannot directly compare the function evaluations at different values of **x** . An alternative approach is to consider a risk measure of the distribution of _f_ ( **x** _,_ **Z** ) which accounts for the probability (or the risk) that _f_ ( **x** _,_ **Z** ) suffers from poor realizations. In this paper, we examine two risk measures for _f_ ( **x** _,_ **Z** ): _value-at-risk_ (VaR), denoted as _vf_ ( **x** ; _α_ ), and _conditional VaR_ (CVaR), denoted as _cf_ ( **x** ; _α_ ). Here, _α ∈_ (0 _,_ 1) represents a known _risk level_ . VaR and CVaR are defined as follows: + +**==> picture [369 x 24] intentionally omitted <==** + +While _vf_ ( **x** ; _α_ ) can be viewed as 100 _α_ %-percentile of _f_ ( **x** _,_ **Z** ) (i.e., the event that _f_ ( **x** _,_ **Z** ) suffers from realizations lower than _vf_ ( **x** ; _α_ ) happens with a probability of at most _α_ ), _cf_ ( **x** ; _α_ ) is the expected value of _f_ ( **x** _,_ **Z** ) in the worst 100 _α_ % of cases. To avoid unnecessary repetition, we unify the notations of both VaR and CVaR as _ρf_ ( **x** ; _α_ ). The notations _vf_ ( **x** ; _α_ ) and _cf_ ( **x** ; _α_ ) are only used when VaR and CVaR require distinct treatments. + +Given the risk measure _ρf_ ( **x** ; _α_ ) and the distribution of **Z** , the _BO of risk measure_ problem aims to search for the maximizer **x** _∗_ ≜ arg max **x** _∈X ρf_ ( **x** ; _α_ ) (Cakmak et al., 2020). Since _f_ is unknown, determining this maximizer typically involves iteratively observing noisy evaluations _y_ ( **x** _t,_ **z** _t_ ) ≜ _f_ ( **x** _t,_ **z** _t_ )+ _ϵ_ ( **x** _t,_ **z** _t_ ) for iteration _t ≥_ 1 where _ϵ_ ( **x** _t,_ **z** _t_ ) _∼N_ (0 _, σn_[2][)][ are i.i.d. Gaus-] sian noises.[2] Furthermore, it is often expensive to obtain these evaluations (e.g., requiring running expensive simulations). Thus, the crux of the problem lies in devising a selection strategy of the _input query_ ( **x** _t,_ **z** _t_ ) at iteration _t_ , considering observations in the previous _t −_ 1 iterations, denoted as **yD** _t_ ≜ ( _y_ ( **x** _t′,_ **z** _t′_ )) _[t] t[−][′]_ =1[1][where] **[ D]** _[t]_[≜][((] **[x]** _[t][′][,]_ **[ z]** _[t][′]_[))] _[t] t[−][′]_ =1[1][, to quickly discover] **[ x]** _[∗]_[.] + +We model _f_ with a _Gaussian process_ (GP) (Rasmussen and Williams, 2006). Specifically, we use a constant GP prior mean function _µ_ 0 and a squared exponential kernel _k_ ( **x** _,_ **z** ) _,_ ( **x** _′,_ **z** _′_ ) ≜ cov[ _f_ ( **x** _,_ **z** ) _, f_ ( **x** _[′] ,_ **z** _[′]_ )] = _σs_[2][exp][(] _[−]_[0] _[.]_[5(] **[x]** _[−]_ **[x]** _[′]_[)] _[⊤]_[Λ] _[−] x_[2][(] **[x]** _[−]_ **[x]** _[′]_[)] _[−]_[0] _[.]_[5(] **[z]** _[−]_ **[z]** _[′]_[)] _[⊤]_[Λ] _[−] z_[2][(] **[z]** _[−]_ **[z]** _[′]_[))][ where][ Λ] _[x]_[≜] + +> 2 We adopt the settings outlined in previous works of Cakmak et al. (2020); Nguyen et al. (2021a) such that **z** is controllable during the optimization (discussed in Sec. 1). + +3 + +diag( _l_ 1 _, . . . , ld_ ), Λ _z_ ≜ diag( _ld_ +1 _, . . . , ld_ + _d′_ ), and _σs_[2][are the lengthscales and the signal variance,] respectively. Given **yD** _t_ , the posterior belief of _f_ ( **x** _,_ **z** ) is a Gaussian distribution with the following mean and variance + +**==> picture [385 x 14] intentionally omitted <==** + +where Λ **D** _t_ ≜ � **KD** _t,_ **D** _t_ + _σn_[2] **[I]** � _−_ 1, **K** is the covariance matrix, and **I** is the identity matrix. The performance of a BO algorithm is often analyzed through the _cumulative regret_ , denoted as _RT_ ≜[�] _[T] t_ =1 _[r]_[(] **[x]** _[t]_[)][ where] _[ r]_[(] **[x]** _[t]_[)][ ≜] _[ρ][f]_[(] **[x]** _[∗]_[;] _[ α]_[)] _[ −][ρ][f]_[(] **[x]** _[t]_[;] _[ α]_[)][ is the] _[ instantaneous regret]_[ at the input] query **x** _t_ . The algorithm is _no-regret_ if its cumulative regret is sublinear, i.e., lim _T →∞ RT /T →_ 0. In such a case, the _simple regret ST_ ≜ min _t_ =1 _,...,T r_ ( **x** _t_ ) _≤ RT /T_ approaches 0. This suggests that one should recommend the best observed input so far as the outcome of the optimization, e.g., in the vanilla BO problem with a small noise. Unfortunately, in BO of risk measures, _ρf_ ( **x** _t_ ; _α_ ) is unobserved due to the unobserved _f_ ( **x** _t,_ **z** ) for ( **x** _t,_ **z** ) _∈/_ **D** _t_ . This prevents us from determining the best observed input. Therefore, we will design a recommendation strategy such that the instantaneous regret _r_ ( **x** _[⋆] t_[)][ at the recommended input] **[ x]** _[⋆] t_[approaches zero as] _[ t][ →∞]_[in Sec. 3.3.] + +## 2.2 META-BO OF RISK MEASURES + +Unlike existing works on BO of risk measures, our approach in this paper considers a set _T_ of prior tasks. Let _f_ : _X × Z →_ R denote the blackbox function of the _current task_ and _fτ_ : _X × Z →_ R denote the blackbox function in a prior task _τ ∈T_ . Furthermore, to facilitate later theoretical analysis, we follow the works of Chowdhury and Gopalan (2017) to assume that all blackbox functions belong to the _reproducing kernel Hilbert space_ (RKHS) associated with the kernel _k_ and a bounded RKHS norm, i.e., _∥f ∥k ≤ B_ and _∀τ ∈T , ∥fτ ∥k ≤ B_ . The optimization result of a� prior task _τ ∈T_ includes the GP posterior mean and variance of _fτ_ , denoted as _µτ_ : _X × Z →_ R and � _στ_[2][:] _[X][× Z][→]_[R][+][, respectively.][Meta-BO of the risk measure] _[ ρ]_[ aims to utilize][ (] _[µ]_[�] _[τ][,]_[ �] _[σ] τ_[2][)] _[τ][∈T]_ to improve the optimization of _ρf_ . However, the similarity between _f_ and _fτ_ (hence, between _ρf_ and _ρfτ_ ) is unknown for all _τ ∈T_ . In particular, if _ρfτ_ differs from _ρf_ , naively utilizing _µ_ � _τ ,_ � _στ_[2][to] optimize _ρf_ can deteriorate the optimization of _ρf_ . + +Under the assumption that blackbox functions belong to the RKHS space with a norm bounded by _B_ , we first revisit the well-known confidence bound of _f_ ( **x** _,_ **z** ) from the work of Chowdhury and Gopalan (2017). Let _γt_ denote the maximum information gain about _f_ that can be obtained from any set of _t −_ 1 observations. Choosing _δ ∈_ (0 _,_ 1), _βt_ = ( _B_ + _σn_ �2( _γt_ + 1 + log 1 _/δ_ ))[2] , then the event that _∀t ≥_ 1 _, ∀_ **x** _∈X , ∀_ **z** _∈Z, lt_ ( **x** _,_ **z** ) _≤ f_ ( **x** _,_ **z** ) _≤ ut_ ( **x** _,_ **z** ) holds with probability _≥_ 1 _− δ_ where the lower and upper confidence bounds are defined as + +_lt_ ( **x** _,_ **z** ) ≜ _µt_ ( **x** _,_ **z** ) _− βt_[1] _[/]_[2] _σt_ ( **x** _,_ **z** ) and _ut_ ( **x** _,_ **z** ) ≜ _µt_ ( **x** _,_ **z** ) + _βt_[1] _[/]_[2] _σt_ ( **x** _,_ **z** ) _,_ resp. (2) Leveraging on the above confidence bounds _lt_ and _ut_ , Nguyen et al. (2021b;a) propose the following confidence interval of the risk measure _ρf_ ( **x** ; _α_ ) (applicable to both VaR and CVaR): with probability _≥_ 1 _− δ_ , + +_∀t ≥_ 1 _, ∀_ **x** _∈X , ρf_ ( **x** ; _α_ ) _∈_ [ _ρlt_ ( **x** ; _α_ ) _, ρut_ ( **x** ; _α_ )] _._ (3) + +where _lt_ and _ut_ are defined in equation (2) and _ρf_ , _ρlt_ , _ρut_ can be replaced by _vf_ , _vlt_ , and _vut_ for VaR or by _cf_ , _clt_ , _cut_ for CVaR in equation (1). For a prior task _τ ∈T_ , we denote the confidence interval ofbelief ( _µ_ � _τ , f_ � _σττ_[2] ([)] **x**[ of] _,_ **z** _[ f]_ ) _[τ]_ as[and the index of the last optimization iteration of task] [[�] _lτ_ ( **x** _,_ **z** ) _,_ � _uτ_ ( **x** _,_ **z** )] which is defined in equation (2) using the GP posterior _[ τ]_[.][Then, the confidence] interval of the risk measure _ρfτ_ ( **x** ; _α_ ) of prior task _τ_ is [ _ρ_ � _lτ_ ( **x** ; _α_ ) _, ρu_ � _τ_ ( **x** ; _α_ )]. + +## 3 OUR PROPOSED SOLUTION TO META-BO OF RISK MEASURES + +Typically, at each iteration of the GP-UCB algorithm (Srinivas et al., 2010), there is only one option to select the input query from (assuming a unique maximizer of the GP-UCB acquisition function). Hence, in order to incorporate the information from prior tasks, the existing RM-GP-UCB (Dai et al., 2022) takes a weighted average of the GP-UCB acquisition functions of the current task and prior tasks. However, these weights depend on the maximum difference between _f_ and _fτ_ evaluations, + +4 + +**==> picture [377 x 93] intentionally omitted <==** + +**----- Start of picture text -----**
+ρut (x [+] t [;][ α][)] max max
x [′] ∈Vt [ρ][b][l][τ][ (][x][′][;][ α][)] x [′] ∈Vt [ρ][b][l][τ][ (][x][′][;][ α][)]
ρlt (x [−] t [;][ α][)] x [−] t x [+] t x1 ρρblubττ ( (xx; α; α) ) ρρblubτ (τ (xx; α; α) )
x2 Pτ |Vt Pτ |Vt
x0 x3 Vt Vt
(a) (b) (c)
**----- End of picture text -----**
+ +Figure 1: **(a)** Plot of _Vt_ = _{_ **x** 0 _,_ **x**[+] _t[,]_ **[ x]**[2] _[}]_[ with] _[ λ]_[ = 0][ and] _[ η]_[= 1][.][The dashed line shows the confidence] interval of _ρf_ ( **x** _∗_ ; _α_ ). While **x** _[−] t_[and] **[ x]**[1][violate UC,] **[ x]**[3][violates OC.] **[ (b)]**[ Plot of an informative prior] task _τ_ where _Vt \ Pτ |Vt_ = _∅_ . **(c)** Plot of an uninformative prior task _τ_ where _Pτ |Vt_ = _Vt_ . + +known as the _function gap_ , at observed inputs. Defining such a gap notion for risk measures is not obvious. Moreover, the function gap is susceptible to function transformations such as scaling and vertical-shifting. Last, in order to achieve theoretical performance guarantee, RM-GP-UCB requires the weights of prior tasks to decay to zero. + +In contrast, our meta-VBO approach tackles the problem from a different perspective that not only exhibits robustness against scaling and vertical-shifting transformations but also eliminates the explicit need for diminishing the effect of prior tasks via weight decay. Specifically, in the next section, we offer multiple choices of the input query in the form of a _versatile query set_ (V-set), denoted as _Vt_ (depending on iteration _t_ ), such that any input query sequence in the Cartesian product[�] _[T] t_ =1 _[V][t]_ incurs a sublinear cumulative regret, + +**==> picture [323 x 30] intentionally omitted <==** + +The flexibility of choosing any input query **x** _t ∈Vt_ grants us the opportunity to incorporate information from prior tasks into the current optimization task as elaborated in Sec. 3.2. + +## 3.1 VERSATILE QUERY SET + +Intuitively, the _versatile query set_ (V-set) _Vt_ should **(C1)** _contain those inputs that are likely to be the maximizer of ρf_ . Furthermore, we would like to avoid over-exploitation at inputs with well-estimated risk measures where gathering observations leads to a minimal progress towards discovering **x** _∗_ . This is done by introducing another criterion **(C2)** to _exclude inputs with well-estimated risk measures from Vt_ . These two key criteria (C1) and (C2) are formulated as follows. + +**(C1)** To determine whether an input is likely to be the maximizer of _ρf_ , we obtain the following confidence interval of _ρf_ ( **x** _∗_ ; _α_ ) in App. A. With probability _≥_ 1 _− δ_ , + +**==> picture [294 x 13] intentionally omitted <==** + +where **x** _[−] t_[≜][arg max] **x** _∈X[ρ][l] t_[(] **[x]**[;] _[ α]_[)][and] **[x]**[+] _t_[≜][arg max] **x** _∈X[ρ][u] t_[(] **[x]**[;] _[ α]_[)][.][It][is][noted][that] **[x]**[+] _t_[is][the] input query at iteration _t_ in V-UCB (Nguyen et al., 2021b) and CV-UCB (Nguyen et al., 2021a). For an input **x** _[′]_ to be the maximizer **x** _∗_ of _ρf_ (i.e., the above condition (C1)), the confidence interval of its risk measure _ρf_ ( **x** _[′]_ ; _α_ ) should overlap with that of the maximum risk measure _ρf_ ( **x** _∗_ ; _α_ ), i.e., _ρut_ ( **x** _[′]_ ; _α_ ) _≥ ρlt_ ( **x** _[−] t_[;] _[ α]_[)][ from equation (3) and equation (5).][Hence, we propose to formulate] (C1) as the following _overlapping condition_ (OC): For an input **x** _[′]_ to be in _Vt_ , _ρut_ ( **x** _[′]_ ; _α_ ) _≥ ρlt_ ( **x** _[−] t_[;] _[ α]_[) +] _[ λ]_ � _ρut_ ( **x**[+] _t_[;] _[ α]_[)] _[ −][ρ][l] t_[(] **[x]** _t[−]_[;] _[ α]_[)] � for _λ ∈_ [0 _,_ 1] _._ (6) + +As _λ →_ 1, _ρut_ ( **x** _[′]_ ; _α_ ) _→ ρut_ ( **x**[+] _t_[;] _[ α]_[)][, i.e., the overlap between the confidence interval of] _[ ρ][f]_[(] **[x]** _[′]_[;] _[ α]_[)] and that of _ρf_ ( **x** _∗_ ; _α_ ) at iteration _t_ increases. When _λ_ = 1, the set of inputs satisfying OC reduce to only the input query **x**[+] _t_[of V-UCB (Nguyen et al., 2021b) or CV-UCB (Nguyen et al., 2021a).] + +**(C2)** We would like to exclude inputs with well-estimated risk measures by ensuring that the uncertainty of their risk measures is relatively high compared to that of the maximum risk measure _ρf_ ( **x** _∗_ ; _α_ ). Specifically, we propose to formulate (C2) as the following _uncertainty condition_ + +5 + +(UC): For an input **x** _[′]_ to be in _Vt_ , + +**==> picture [352 x 33] intentionally omitted <==** + +If _η >_ 1 _/λ_ , OC implies UC since _ρlt_ ( **x** _[−] t_[;] _[ α]_[)] _[≥][ρ][l] t_[(] **[x]**[;] _[ α]_[)] _[∀]_ **[x]** _[∈X]_[(from][the][definition][of] **[x]** _[−] t_[).] Hence, we are only interested in UC when _η ≤_ 1 _/λ_ as specified in equation (7). + +To sum up, we define V-set _Vt_ as the set of inputs **x** _∈X_ that satisfy both OC in equation (6) and UC in equation (7) (illustrated in Fig. 1a). The conditions of _λ ≤_ 1 and _η ≥_ 1 ensure _Vt_ is always non-empty which follows from the following Lemma 3.1 (proved in App. B). **Lemma 3.1.** _For all t ≥_ 1 _, Vt contains_ **x**[+] _t[.]_ + +We note that the size of _Vt_ is non-decreasing when _λ_ decreases or _η_ increases. Specifically, _λ_ = 1 implies _η_ = 1 (since _η ∈_ [1 _,_ 1 _/λ_ ]) and OC implies UC. In this case, _Vt_ = _{_ **x**[+] _t[}]_[ (assuming] _[ ρ][u] t_[has a] unique maximizer), i.e., _Vt_ reduces to the UCB-typed input query such as those in V-UCB (Nguyen et al., 2021b) and CV-UCB (Nguyen et al., 2021a). There is not any flexibility in choosing **x** _t_ from _Vt_ = _{_ **x**[+] _t[}]_[, which prevents us from incorporating the information of prior tasks into the current] task. However, when _λ <_ 1 and _η ∈_ [1 _,_ 1 _/λ_ ], _Vt_ contains other inputs than the popular input query **x**[+] _t_ of UCB-typed algorithms. This is a trade-off between prior tasks (existing knowledge) and the current task (new knowledge). When _λ_ = 1 ( _Vt_ = _{_ **x**[+] _t[}]_[), we utilize only observations from the current] task. Conversely, decreasing _λ_ (increasing _|Vt|_ ) promotes the exploitation/utilization of prior tasks to select an input query in _Vt_ . This _task-specific_ trade-off is distinct from the conventional ( _functionevaluation-specific_ ) exploration-exploitation trade-off associated with estimating the maximizer in V-UCB (Nguyen et al., 2021b) and CV-UCB (Nguyen et al., 2021a) (pertaining to a particular task). + +Given the selected **x** _t ∈Vt_ , we adopt the choice of **z** _t_ in the existing works of Nguyen et al. (2021b;a). In particular, if the risk measure is VaR, then **z** _t_ is selected as a _lacing value_ (LV) w.r.t. **x** _t_ , _lt_ , _ut_ , and _α_ .[3] If the risk measure is CVaR, we first find the risk level _αt_ ≜ arg max _α′∈_ (0 _,α_ ] _vut_ ( **x** _t_ ; _α[′]_ ) _− vlt_ ( **x** _t_ ; _α[′]_ ). Then, **z** _t_ is selected as an LV w.r.t. **x** _t_ , _lt_ , _ut_ , and _αt_ . + +Interestingly, given the above choice of **z** _t_ , any choice of **x** _t_ in our proposed _Vt_ results in a sublinear cumulative regret as shown in the following Theorem 3.2 (proved in App. D). In other words, we achieve the goal of constructing _Vt_ that satisfies equation (4). + +**Theorem 3.2.** _Given the selection of_ **x** _t as any input in Vt and the selection of_ **z** _t from the works of Nguyen et al. (2021b;a), the algorithm achieves a sublinear cumulative regret:_ + +**==> picture [287 x 13] intentionally omitted <==** + +_holds with probability ≥_ 1 _− δ where C_ 1 ≜ 8 _/_ log(1+ _σn[−]_[2][)] _[;][ γ][T][,][ β][T][,][ δ][ are defined in equation (2);][ λ] and η are defined in equation (6) and equation (7), respectively._ + +Given the flexibility of choosing **x** _t_ in _Vt_ , we are now able to transfer the information from prior tasks to the current task by assigning different priorities to inputs in _Vt_ . + +3.2 ASSIGNING PRIORITY TO INPUTS IN VERSATILE QUERY SET _Vt_ + +Since selecting any input query **x** _t ∈Vt_ results in a no-regret algorithm (Theorem 3.2), we would like to exploit the results of prior tasks to assign varying degrees of importance (i.e., _priorities_ ) to inputs in _Vt_ . To be robust to scaling and vertical-shifting of the blackbox function, the priority is based on the location of the maximizer rather than the estimated risk measure value. Besides, to provide more opportunities for transferring information between tasks, we consider the case that the global maximizer of the current task is the local maximizer of a prior task. Hence, we assign higher priorities to inputs that have a higher chance of being a local maximizer (restricted to _Vt_ ) of prior tasks. For this reason, we propose the notion of _the probable local maximizer set_ , denoted as _Pτ |Vt_ , which contains inputs that are probably a local maximizer restricted to _Vt_ of _ρfτ_ : + +**==> picture [299 x 17] intentionally omitted <==** + +> 3 Lacing values **z** LV w.r.t. **x** , _lt_ , _ut_ , and _α_ satisfy _lt_ ( **x** _,_ **z** LV) _≤ vlt_ ( **x** ; _α_ ) _≤ vut_ ( **x** ; _α_ ) _≤ ut_ ( **x** _,_ **z** LV) (Nguyen et al., 2021b). + +6 + +An alternative assumption is that the global maximizer of the current task is close to that of a prior task, then we can consider _the probable global maximizer set_ , defined as _Pτ |X_ ≜ _{_ **x** _∈X| ρu_ � _τ_ ( **x** ; _α_ ) _≥_ max **x** _′∈X ρ_ � _lτ_ ( **x** _[′]_ ; _α_ ) _}_ . Since using _Pτ |X_ does not substantially change the implementation of metaVBO in comparison to using _Pτ |Vt_ , we only focus on the probable local maximizer set _Pτ |Vt_ in this paper. Figs. 1b and 1c show the set _Pτ |Vt_ of inputs **x** _∈Vt_ such that _ρu_ � _τ_ ( **x** ; _α_ ) is above the dash-dotted line representing max **x** _′∈Vt ρ_ � _lτ_ ( **x** _[′]_ ; _α_ )). Essentially, we transfer the information about the _local maximizer_ restricted to _Vt_ of prior tasks to the current task. This is an unexplored direction in the current meta-BO literature. + +Given the probable local maximizer set _Pτ |Vt_ , the priority of an input **x** _∈Vt_ , denoted as _πt_ ( **x** ), is measured by the number of the probable local maximizer sets that **x** belongs to, i.e., + +**==> picture [248 x 23] intentionally omitted <==** + +The higher _πt_ ( **x** ) is, the more likely that **x** is in the probable local maximizer set of a prior task. Hence, we select the input query **x** _t_ as + +**==> picture [351 x 18] intentionally omitted <==** + +_Remark_ 3.3 (Prior harmful tasks) _._ The local maximizers of _ρfτ_ in a prior harmful task restricted to _Vt_ are different from that of _ρf_ of the current task. Contrary to the intuition suggesting that prior harmful tasks may bias meta-VBO away from the desirable maximizer **x** _∗_ , Theorem 3.2 asserts that our algorithm maintains a sublinear cumulative regret by constraining the choice of **x** _t_ to the _Vt_ . However, one could reasonably anticipate a potential reduction in the convergence rate, as empirically shown in Sec. 4, due to the influence of prior harmful tasks. + +_Remark_ 3.4 (Informativeness of a prior task) _._ If _πt_ ( **x** ) is constant for all **x** _∈Vt_ , it results in _Vt,_ max = _Vt_ and **x** _t_ = **x**[+] _t_[.][This happens when there are not any prior tasks or when the BO results of prior] tasks are _uninformative_ in the local region _Vt_ , i.e., _Pτ |Vt_ = _Vt ∀τ ∈T_ . As **x** _t_ = **x**[+] _t_[in these cases,] our meta-VBO algorithm reduces to V-UCB (Nguyen et al., 2021b) or CV-UCB (Nguyen et al., 2021a). Fig. 1c illustrates an iteration _t_ where prior task _τ_ is uninformative as _Vt_ = _Pτ |Vt_ , while Fig. 1b shows the case that _τ_ is an informative task. It is noted that the informativeness of a prior task w.r.t. the current task depends on _Vt_ , hence, the iteration _t_ . A prior task may be informative when we have not gathered many observations on the current task ( _Vt_ is large such that _Pτ |Vt_ is a strict subset of _Vt_ ), but it may become uninformative when many observations are acquired ( _Vt_ is small such that _Pτ |Vt_ = _Vt_ ). When a prior task is uninformative, it does not influence the optimization of the current task in our meta-VBO algorithm (from the definition of _πt_ ( **x** ) in equation (39)). Hence, the effect of a prior task on the current task is adaptively controlled by _Vt_ as illustrated in Appendix I.1. This approach contrasts with that of Dai et al. (2022) that explicitly requires a schedule of the weight decay based on the function gap. + +_Remark_ 3.5 (Scaling and vertical-shifting of the blackbox functions) _._ Our proposed meta-VBO depends on _Vt_ and _Pτ |Vt_ . These sets rely on comparing risk measures at different inputs which remains unchanged under scaling or vertical-shifting of the blackbox function. Hence, our algorithm is robust to these transformations. + +_Remark_ 3.6 (Meta-VBO for vanilla BO and adversarially robust BO) _._ As our proposed meta-VBO depends on the upper and lower confidence bounds of function evaluations, it is sufficiently general to address the vanilla meta-BO problem (see Appendix F). Its potential applicability to the metalearning of other UCB-typed algorithms remains an area for future exploration. Furthermore, since adversarially robust BO is a special case of BO of VaR _α →_ 0[+] (Nguyen et al., 2021b), our proposed meta-VBO directly applies to adversarially robust BO (see App. G). + +## 3.3 DECISION VARIABLE RECOMMENDATION STRATEGY + +At iteration _t_ , we propose to recommend **x** _[⋆] t_[≜] **[x]** _[−] ζ_ ( _t_ )[where] _[ ζ]_[(] _[t]_[)][≜][arg max] _[t][′][∈{]_[1] _[,...,t][}][ρ][l] t[′]_[(] **[x]** _t[−][′]_[ ;] _[ α]_[)][.] We prove that its instantaneous regret approaches zero in App. E. + +**Theorem 3.7.** _Let ζ_ ( _t_ ) ≜ arg max _t′∈{_ 1 _,...,t} ρlt′_ ( **x** _[−] t[′]_[ ;] _[ α]_[)] _[, then, by recommending]_ **[ x]** _t[⋆]_[=] **[x]** _[−] ζ_ ( _t_ ) _[, the] instantaneous regret at_ **x** _[⋆] t[is bounded:][ r]_[(] **[x]** _[⋆] t_[)] _[ ≤][η]_ � _C_ 1 _βtγt/t with probability ≥_ 1 _−δ where η, C_ 1 _, βt, and γt are defined in Theorem 3.2._ + +7 + +As sublinear bounds of _γt_ are established for common kernels such as the SE kernel in the work of Srinivas et al. (2010), the instantaneous regret at **x** _[⋆] t_[≜] **[x]** _[−] ζ_ ( _t_ )[approaches zero as] _[ t][ →∞]_[.][Further-] more, we should choose _η_ = 1 to minimize the upper confidence bound of _r_ ( **x** _[⋆] t_[)][ in Theorem 3.7.] Given _η_ = 1, we choose _λ ∈_ [0 _,_ 1] to trade off between the flexibility in choosing **x** _t_ (i.e., the size of V-set) and the upper confidence bound of the cumulative regret _RT_ at the input queries in Theorem 3.2. In the experiments, as we want to exploit the solutions of prior tasks, we maximize the size of V-set by setting _λ_ = 0. In this case, the upper confidence bound of _RT_ is two times that of V-UCB (Nguyen et al., 2021b) and CV-UCB (Nguyen et al., 2021a): _RT ≤_ 2 _[√] C_ 1 _TβT γT_ . + +## 4 EXPERIMENTS + +Given the absence of prior research on meta-BO of risk measures, we compare the performance of our proposed algorithm under different sets of prior tasks to that of V-UCB (Nguyen et al., 2021b) which is equivalent to our proposed algorithm when there are not any prior tasks, i.e., _T_ = _∅_ . Recall that our emphasis in this paper is on transferring the optimization results, rather than transferring the surrogate model, as discussed in Sec. 1. Therefore, we exclusively focus on independent GPs. They are also more practical due to their lower computational overhead, while still enabling us to provide fair comparisons to empirically demonstrate our advantage over V-UCB.[4] Our goal is to empirically verify whether our proposed algorithm is (i) able to exploit the information from prior informative tasks to improve its converge rate in comparison to V-UCB even if harmful tasks exist in _T_ and (ii) robust to prior harmful tasks even if there are not any useful tasks in _T_ . To achieve this, we design different sets of prior tasks: _T_ useful-pos-scale (i.e., positive scaling of the blackbox function of the current task: _fτ_ ( **x** _,_ **z** ) = _af_ ( **x** _,_ **z** ) for _a >_ 0), _T_ useful-vshift (i.e., vertical-shifting _fτ_ ( **x** _,_ **z** ) = _f_ ( **x** _,_ **z** ) + _b_ for _b ∈_ R), _T_ harmful-neg-scale (i.e., negative scaling _fτ_ ( **x** _,_ **z** ) = _−f_ ( **x** _,_ **z** )), and _T_ harmful-hshift (i.e., horizontal-shifting _fτ_ ( **x** _,_ **z** ) = _f_ ( **x** + _ξ,_ **z** ) for _ξ ∈_ R _[d]_ ). Additionally, _T_ all is the union of the above 4 sets. We note that _T_ harmful-neg-scale contains the most harmful task as the function evaluations are negated. On the other hand, horizontal-shifting along the **x** dimensions in _T_ harmful-hshift moves the location of the maximizers away from that of the current task. As explained in Sec. 3.3, we set _λ_ = 0 and _η_ = 1. We present additional experimental results of meta-BO for CVaR in App. I. + +The experiments are performed on 6 synthetic functions: a Gaussian curve, the Branin-Hoo, the Goldstein-Price, the six-hump camel, the Hartmann-3D, and the Hartmann-6D (obtained from [URL removed]); and using 2 real-world datasets: the yacht hydrodynamics dataset (Dua and Graff, 2017) and a portfolio optimization dataset (obtained from the existing works of Cakmak et al. (2020); Nguyen et al. (2021a)). In the first 4 experiments, both the dimensions of **x** and **z** are set to _d_ = _d[′]_ = 1. In the Hartmann-3D experiment, _d_ = 2 and _d[′]_ = 1, while in the Hartmann-6D experiment, _d_ = 5 and _d[′]_ = 1. In the yacht hydrodynamics experiment, the optimization problem is to minimize VaR of the residuary resistance per unit weight of displacement of a yacht by controlling the its 5-dimensional hull geometry coefficients. The environmental random variable is the 1-dimensional Froude number. The blackbox function is generated by fitting a GP to the yacht hydrodynamics dataset (Dua and Graff, 2017). In the portfolio optimization experiment, we follow the work of (Cakmak et al., 2020) to optimize a portfolio by controlling _d_ = 3 decision variables subject to the randomness in the bid-ask spread and the borrow cost (i.e., _d[′]_ = 2). The blackbox function is generated by fitting a GP to the simulated portfolio dataset. The risk level is set at _α_ = 0 _._ 1 for all experiments. + +The average and the standard error of _r_ ( **x** _[⋆] t_[)][ (in Sec. 3.3) over][ 30][ random repetitions are shown in] Fig. 2. It is noted that the curves of useful-pos-scale, useful-vshift, and all overlap each other in Figs. 2a, 2e, and 2g. In these figures, we observe that when _T_ contains only prior useful tasks in _T_ useful-pos-scale and _T_ useful-vshift, our proposed meta-VBO outperforms V-UCB which does not utilize any prior tasks. Notably, even when _T_ contains both harmful and useful tasks in _T_ all, meta-VBO still outperforms V-UCB. In the extreme case when _T_ contains only harmful tasks in _T_ harmful-neg-scale and _T_ harmful-hshift, meta-VBO does not outperform V-UCB, but it still converges to a low-regret solution. In Fig. 2f, meta-VBO given the set _T_ harmful-neg-scale performs poorly probably due to the large input space and the function surface of the Hartmann-6D. We can 4When computation cost are affordable, one may combine a method that transfers the surrogate model with our algorithm by simply replacing independent GPs with a multitask GP because our algorithm only relies on upper and lower confidence bounds that are readily obtainable from a multitask GP model. + +8 + +**==> picture [385 x 181] intentionally omitted <==** + +**----- Start of picture text -----**
+V-UCB Useful-pos-scale Useful-vshift Harmful-neg-scale Harmful-hshift All
1.2
0.5 2.0 1.0 6
0.4
1.5 0.8
0.3 4
1.0 0.6
0.2
0.1 0.5 0.40.2 2
0.0 0.0 0
0 10 20 30 40 50 60 0 5 10 15 20 25 30 0 5 10 15 20 25 30 0 5 10 15 20 25 30
(a) (b) (c) (d)
1.50 0.30 0.6 4
1.25 0.25 0.5
3
1.00 0.20 0.4
0.75 0.15 0.3 2
0.50 0.10 0.2 1
0.25
0.05 0.1
0.00 0
0 10 20 30 40 50 0 10 20 30 40 50 60 0 10 20 30 40 0 10 20 30 40 50
(e) (f) (g) (h)
**----- End of picture text -----**
+ +Figure 2: Plots of the regret at the recommended input against the BO iteration in experiments with (a) a Gaussian curve, (b) the Branin-Hoo function, (c) the Goldstein-Price function, (d) the six-hump camel function, (e) the Hartmann-3D function, (f) the Hartmann-6D function, (g) the yacht hydrodynamics dataset, and (h) the portfolio optimization dataset. + +**==> picture [393 x 68] intentionally omitted <==** + +**----- Start of picture text -----**
+47.0% 13.2%9.3% 49.3% 8.2%7.5% 51.9% 6.9%3.1% 50.8% 3.1%1.5% Previous taskHarmful-hshiftHarmful-neg-scale
Useful-pos-scale
30.5% 35.1% 38.2% 44.6% Useful-vshift
t =5 t =20 t =30 t =40
**----- End of picture text -----**
+ +Figure 3: Percentage of prior tasks whose probable local maximizer sets contain the input query (grouped by the transformation) at different BO iterations in the experiment with the Gaussian curve and the set _Tall_ of prior tasks. The percentage is computed over 30 repeated experiments. + +also observe the percentage of prior tasks whose probable maximizer sets _Pτ |Vt_ containing **x** _t_ in Fig. 3. It shows that as we gather more observations, the percentage of harmful tasks whose _Pτ |Vt_ contains **x** _t_ reduces. + +## 5 CONCLUSION + +In this paper, we propose meta-VBO which is the first algorithm for meta-BO of risk measures by proposing a new concept of V-set and leveraging prior tasks to prioritize inputs in this set. Our algorithm offers a theoretical performance guarantee even when prior tasks are harmful. Furthermore, we propose a recommendation strategy that suggests an input as the result of the optimization, with a proof of its instantaneous regret approaching zero. The empirical performance of the proposed solution is demonstrated through several synthetic function benchmarks and real-world objective functions. In the future, we would like to study our meta-VBO approach to perform meta-learning for other BO variants such as federated BO (Dai et al., 2020), preferential BO (González et al., 2017; Nguyen et al., 2021c), BO for finding Nash equilibria (Tay et al., 2023), and BO with unknown constraints (Nguyen et al., 2023). + +## REPRODUCIBILITY STATEMENT + +To ensure the reproducibility of both the theoretical and experimental results in our paper, we have clearly elaborated on our assumptions, the proofs of the theoretical results, and provided the implementation of the experiments. In particular, our main assumptions are stated in the third paragraph in Sec. 1 and the first paragraph in Sec. 3. The details proofs of our theoretical results are shown in Appendices A, B, D, E, and G. + +9 + +## REFERENCES + +- I. Bogunovic, J. Scarlett, S. Jegelka, and V. Cevher. Adversarially robust optimization with Gaussian processes. In _Proc. NeurIPS_ , pages 5760–5770, 2018. + +- S. Cakmak, R. Astudillo, P. I. Frazier, and E. Zhou. Bayesian optimization of risk measures. In _Proc. NeurIPS_ , 2020. + +- S. R. Chowdhury and A. Gopalan. On kernelized multi-armed bandits. In _Proc. ICML_ , pages 844–853, 2017. + +- Z. Dai, B. K. H. Low, and P. Jaillet. Federated Bayesian optimization via Thompson sampling. In _Proc. NeurIPS_ , pages 9687–9699, 2020. + +- Z. Dai, Y. Chen, H. Yu, B. K. H. Low, and P. Jaillet. On provably robust meta-Bayesian optimization. In _Proc. UAI_ , pages 475–485, 2022. + +- Dheeru Dua and Casey Graff. UCI machine learning repository, 2017. URL [URL removed] ics.uci.edu/ml. + +- M. Feurer, B. Letham, and E. Bakshy. Scalable meta-learning for Bayesian optimization using ranking-weighted Gaussian process ensembles. In _AutoML Workshop at ICML_ , volume 7, 2018. + +- Roman Garnett. _Bayesian Optimization_ . Cambridge University Press, 2022. in preparation. + +- J. González, Z. Dai, A. Damianou, and N. D. Lawrence. Preferential Bayesian optimization. In _Proc. ICML_ , pages 1282–1291, 2017. + +- J. M. Hernández-Lobato, M. W. Hoffman, and Z. Ghahramani. Predictive entropy search for efficient global optimization of black-box functions. In _Proc. NIPS_ , pages 918–926, 2014. + +- S. Iwazaki, Y. Inatsu, and I. Takeuchi. Bayesian quadrature optimization for probability threshold robustness measure. _Neural Computation_ , 33(12):3413–3466, 2021a. + +- S. Iwazaki, Y. Inatsu, and I. Takeuchi. Mean-variance analysis in Bayesian optimization under uncertainty. In _Proc. AISTAT_ , pages 973–981, 2021b. + +- A. Makarova, I. Usmanova, I. Bogunovic, and A. Krause. Risk-averse heteroscedastic Bayesian optimization. In _Proc. NeurIPS_ , pages 17235–17245, 2021. + +- Q. P. Nguyen, Z. Dai, B. K. H. Low, and P. Jaillet. Optimizing conditional value-at-risk of black-box functions. In _Proc. NeurIPS_ , pages 4170–4180, 2021a. + +- Q. P. Nguyen, Z. Dai, B. K. H. Low, and P. Jaillet. Value-at-risk optimization with Gaussian processes. In _Proc. ICML_ , pages 8063–8072, 2021b. + +- Q. P. Nguyen, S. Tay, B. K. H. Low, and P. Jaillet. Top-k ranking Bayesian optimization. In _Proc. AAAI_ , volume 35, pages 9135–9143, 2021c. + +- Q. P. Nguyen, W. T. R. Chew, L. Song, B. K. H. Low, and P. Jaillet. Optimistic Bayesian optimization with unknown constraints. In _Proc. ICLR_ , 2023. + +- V. Perrone, H. Shen, M. W. Seeger, C. Archambeau, and R. Jenatton. Learning search spaces for Bayesian optimization: Another view of hyperparameter transfer learning. In _Proc. NeurIPS_ , volume 32, 2019. + +10 + +- V. Picheny, H. Moss, L. Torossian, and N. Durrande. Bayesian quantile and expectile optimisation. In _Proc. UAI_ , 2022. + +- A. Ramachandran, S. Gupta, S. Rana, and S. Venkatesh. Information-theoretic transfer learning framework for Bayesian optimisation. In _Proc. ECML/PKDD_ , pages 827–842, 2019. + +- C. E. Rasmussen and C. K. I. Williams. _Gaussian processes for machine learning_ . MIT Press, 2006. + +- B. Shahriari, K. Swersky, Z. Wang, R. Adams, and N. de Freitas. Taking the human out of the loop: A review of Bayesian optimization. _Proceedings of the IEEE_ , 104(1):148–175, 2015. + +- J. Snoek, H. Larochelle, and R. Adams. Practical Bayesian optimization of machine learning algorithms. In _Proc. NIPS_ , pages 2951–2959, 2012. + +- N. Srinivas, A. Krause, S. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In _Proc. ICML_ , pages 1015–1022, 2010. + +- K. Swersky, J. Snoek, and R. P. Adams. Multi-task Bayesian optimization. In _Proc. NeurIPS_ , volume 26, 2013. + +- S. S. Tay, Q. P. Nguyen, C. S. Foo, and B. K. H. Low. No-regret sample-efficient Bayesian optimization for finding Nash equilibria with unknown utilities. In _Proc. AISTATS_ , pages 3591–3619, 2023. + +- L. Torossian, V. Picheny, and N. Durrande. Bayesian quantile and expectile optimisation. _arXiv preprint arXiv:2001.04833_ , 2020. + +- M. Volpp, L. P. Fröhlich, K. Fischer, A. Doerr, S. Falkner, F. Hutter, and C. Daniel. Meta-learning acquisition functions for transfer learning in Bayesian optimization. In _Proc. ICLR_ , 2020. + +- Z. Wang and S. Jegelka. Max-value entropy search for efficient Bayesian optimization. In _Proc. ICML_ , pages 3627–3635, 2017. + +- M. Wistuba, N. Schilling, and L. Schmidt-Thieme. Two-stage transfer surrogate model for automatic hyperparameter optimization. In _Proc. ECML/PKDD_ , pages 199–214, 2016. + +- M. Wistuba, N. Schilling, and L. Schmidt-Thieme. Scalable Gaussian process-based transfer surrogates for hyperparameter optimization. _Machine Learning_ , 107(1):43–78, 2018. + +11 + diff --git a/open_review/iclr2024_8832.json b/open_review/iclr2024_8832.json new file mode 100644 index 0000000000000000000000000000000000000000..1d6365744e9fdadcedd799f978a1d7eda0207594 --- /dev/null +++ b/open_review/iclr2024_8832.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8832", + "source": "iclr2024", + "source_year": 2024, + "title": "VMFTransformer: An Angle-Preserving and Auto-Scaling Machine for Multi-horizon Probabilistic Forecasting", + "abstract": "Time series forecasting has historically been a key area of academic research and industrial applications. As deep learning develops, the major research methodologies of time series forecasting can be divided into two categories, i.e., iterative and direct methods. In the iterative methods, since a small amount of error is produced at each time step, the recursive structure can potentially lead to large error accumulations over longer forecasting horizons. Although the direct methods can avoid this puzzle involved in the iterative methods, it faces abuse of conditional independence among time points. This impractical assumption can also lead to biased models. To solve these challenges, we propose a direct approach for multi-horizon probabilistic forecasting, which can effectively characterize the dependence across future horizons. Specifically, we consider the multi-horizon target as a random vector. The direction of the vector embodies the temporal dependence, and the length of the vector measures the overall scale across each horizon. Therefore, we respectively apply the von Mises-Fisher (VMF) distribution and the truncated normal distribution to characterize the angle and the magnitude of the target vector in our model. We evaluate the performance of our framework on three benchmarks. Extensive results demonstrate the superiority of our framework over six state-of-the-art methods and show the remarkable versatility and extensibility for different time series forecasting tasks.", + "rebuttal": "### General response to all reviewers (part 1)\nWe deeply appreciate the reviewers taking the time to provide thoughtful feedback on our work. We are grateful that most reviewers saw the potential for this research to make a meaningful contribution. Carefully considering each comment, we have revised the paper to address the concerns raised. Our detailed responses below explain how we have enhanced the manuscript.\n\nIn particular, this revised draft incorporates extensive additional experiments, now encompassing the latest baseline models across varying and longer horizons. Every key result includes the mean and standard deviation to quantify uncertainty. \n\n\n\n| Horizon = 24 | | MAE| | | MSE | |\n| :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | \n|**Model** | Electricity | Solar | Traffic | Electricity | Solar | Traffic|\n|DeepAR | 0.0167 $\\pm$ 0.0004 | 0.2619 $\\pm$0.0030 | $\\underline{0.1667}$$\\pm$0.0086 | 0.0187$\\pm$0.0009 | 0.3243$\\pm$0.0091 | 0.2042$\\pm$0.0069 |\n|SimpleFeedForward | 0.0152 $\\pm$ 0.0007 | 0.3023 $\\pm$0.0026 | 0.2751 $\\pm$0.0028 | 0.0113$\\pm$0.0019 | 0.4213$\\pm$0.0101 | 0.3775$\\pm$0.0022 |\n|TFT | 0.0251 $\\pm$ 0.0010 | 0.2748 $\\pm$0.0064 | 0.2164 $\\pm$0.0069 | 0.0363$\\pm$0.0027 | 0.3189$\\pm$0.0056 | 0.2912$\\pm$0.0093 |\n|Transformer | 0.0138 $\\pm$ 0.0022 | 0.3031 $\\pm$0.0060 | 0.1796 $\\pm$0.0091 | 0.0144$\\pm$0.0006 | 0.4502$\\pm$0.0156 | 0.2050$\\pm$0.0031 |\n|Autoformer | 0.1236 $\\pm$ 0.0856 | 0.2106 $\\pm$0.0138 | 0.2612 $\\pm$0.0084 | 0.0252$\\pm$0.0899 | 0.1684$\\pm$0.0684 | $\\underline{0.1541}$$\\pm$0.0443 |\n|PatchTST | $\\underline{0.0610}$ $\\pm$ 0.0024 | **0.1938** $\\pm$0.0109 | 0.2746 $\\pm$0.0145 | $\\underline{0.0081}$$\\pm$0.0008 | **0.0936**$\\pm$0.0092 | 0.2251$\\pm$0.0050 |\n|Informer | 0.0844 $\\pm$ 0.0095 | 0.2607 $\\pm$0.0172 | 0.4620 $\\pm$0.0194 | 0.0144$\\pm$0.0226 | 0.1823$\\pm$0.0072 | 0.6446$\\pm$0.0074 |\n|DLinear | 0.1069 $\\pm$0.0004 | 0.2110 $\\pm$0.005 | 0.2317 $\\pm$0.0055 | 0.0309$\\pm$0.0003| 0.1336$\\pm$0.001 |0.2720$\\pm$0.0027|\n|**VMFTransformer** | **0.0116** $\\pm$0.0015 | $\\underline{0.2092}$ $\\pm$0.0074 |**0.1567** $\\pm$0.0008 |**0.0077**$\\pm$0.0147|$\\underline{0.1333}$$\\pm$0.0308 |**0.1185**$\\pm$0.0012|\n\n\n| Horizon = 168 | | MAE| | | MSE | |\n| :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | \n|**Model** | Electricity | Solar | Traffic | Electricity | Solar | Traffic|\n|DeepAR | 0.0224 $\\pm$ 0.0029 | 0.3076 $\\pm$0.0246 | 0.1712$\\pm$0.0088 | 0.0300$\\pm$0.0081 | 0.3806$\\pm$0.0400 | 0.2115$\\pm$0.0104 |\n|SimpleFeedForward | 0.0210 $\\pm$ 0.0004 | 0.3228 $\\pm$ 0.0058 | 0.2590 $\\pm$0.0037 | 0.0281$\\pm$0.0012 | 0.4122$\\pm$0.0196 | 0.2901$\\pm$0.0043 |\n|TFT | 0.0286 $\\pm$ 0.0016 | 0.3335 $\\pm$ 0.0039 | 0.1670 $\\pm$0.0053 | 0.0468$\\pm$0.0070 | 0.5125$\\pm$0.038 | 0.1952$\\pm$0.0070 |\n|Transformer | $\\underline{0.0198}$ $\\pm$ 0.0093 | 0.3463 $\\pm$ 0.0120 | 0.1918 $\\pm$0.0117 | 0.0295$\\pm$0.0121 | 0.4903$\\pm$0.0243 | 0.2081$\\pm$0.0234 |\n|Autoformer | 0.1197 $\\pm$ 0.0183 | 0.2784 $\\pm$ 0.0215 | 0.2231 $\\pm$0.0144 | 0.0241$\\pm$0.0078 | 0.1843$\\pm$0.0254 | 0.1746$\\pm$0.0622 |\n|PatchTST | 0.0957 $\\pm$ 0.0021 | **0.1836** $\\pm$ 0.0009 | **0.0898** $\\pm$0.0022 | **0.0169**$\\pm$0.0007 | **0.0942**$\\pm$0.0037 | **0.0179**$\\pm$0.0075 |\n|Informer | 0.1460 $\\pm$ 0.0230 | 0.2274 $\\pm$ 0.0079 | 0.5549 $\\pm$0.0024 | 0.0335$\\pm$0.0047 | 0.1616$\\pm$0.0137 | 0.8068$\\pm$0.0021 |\n|DLinear | 0.1559 $\\pm$ 0.0016 | $\\underline{0.2129}$ $\\pm$0.0026 | 0.2633 $\\pm$0.0085 | 0.0595$\\pm$0.0002 | $\\underline{0.1250}$$\\pm$0.0084 | 0.3096$\\pm$0.0022 |\n|**VMFTransformer** | **0.0128** $\\pm$0.0157 | 0.2136 $\\pm$0.0005 | $\\underline{0.1567}$ $\\pm$0.0019 |$\\underline{0.0204}$$\\pm$0.0373| 0.1390$\\pm$0.0017 |$\\underline{0.1185}$$\\pm$0.0029|\n\n### General response to all reviewers (part 2)\n| Horizon = 720 | | MAE| | | MSE | |\n| :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | \n|**Model** | Electricity | Solar | Traffic | Electricity | Solar | Traffic|\n|DeepAR | 0.0323 $\\pm$ 0.0067 | 0.2220 $\\pm$0.0059 | 0.2958$\\pm$0.0359 | 0.0897$\\pm$0.0301 | $\\underline{0.2004}$$\\pm$0.0002 | 0.4112$\\pm$0.0399 |\n|SimpleFeedForward | 0.0239 $\\pm$0.0006 [...]\n\n### General response to all reviewers (part 3)\n| Horizon = 168 | | q-50-loss| | | q-90-loss | |\n| :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | \n|**Model** | Electricity | Solar | Traffic | Electricity | Solar | Traffic|\n|DeepAR | 0.1463 $\\pm$0.0061 | 0.5613 $\\pm$0.0039 |0.1553$\\pm$0.0081 |0.0862$\\pm$0.0109|0.2349$\\pm$0.0162 |**0.1012**$\\pm$0.0018 |\n|SimpleFeedForward | 0.1\n[rebuttal truncated]", + "initial_scores": [ + 5, + 5, + 5, + 6 + ], + "score_mean": 5.25, + "score_variance": 0.25, + "score_spread": 1, + "score_min": 5, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "The reviewers raised multiple concerns, notably the experimental setups. After the rebuttal, the reviewers acknowledge that there is still room for improvement, and I agree with their expertise. Nevertheless, the angle and scaling idea is interesting, and the authors are encouraged to continue working towards this direction.", + "forum_id": "UK7Hs7f0So", + "primary_area": "general machine learning (i.e., none of the above)", + "n_reviews": 4, + "per_review": [ + { + "reviewer": "Reviewer_7TJV", + "review_id": "HIfCdP2HZs", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 3, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 2487, + "edit_detected": true, + "edit_delta_seconds": 208569, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_2Tuf", + "review_id": "gpw2M5Wwj7", + "scores": { + "rating": 5, + "soundness": 3, + "presentation": 3, + "contribution": 2, + "confidence": 4 + }, + "review_text_chars": 2512, + "edit_detected": true, + "edit_delta_seconds": 2445284, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_s4Yt", + "review_id": "3ojdDMe5t0", + "scores": { + "rating": 5, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 5 + }, + "review_text_chars": 4284, + "edit_detected": true, + "edit_delta_seconds": 888972, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_Abqw", + "review_id": "2yYYYEc16k", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 2, + "contribution": 3, + "confidence": 4 + }, + "review_text_chars": 2085, + "edit_detected": true, + "edit_delta_seconds": 2724723, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8832.md b/open_review/iclr2024_8832.md new file mode 100644 index 0000000000000000000000000000000000000000..edffe8744c39c9bcb1a0a71af159033d5553ebb1 --- /dev/null +++ b/open_review/iclr2024_8832.md @@ -0,0 +1,426 @@ + + +## VMFTRANSFORMER: AN ANGLE-PRESERVING AND - AUTO-SCALING MACHINE FOR MULTI HORIZON PROBABILISTIC FORECASTING + +Authors withheld for review + +## ABSTRACT + +Time series forecasting has historically been a key area of academic research and industrial applications. As deep learning develops, the major research methodologies of time series forecasting can be divided into two categories, i.e., iterative and direct methods. In the iterative methods, since a small amount of error is produced at each time step, the recursive structure can potentially lead to large error accumulations over longer forecasting horizons. Although the direct methods can avoid this puzzle involved in the iterative methods, it faces abuse of conditional independence among time points. This impractical assumption can also lead to biased models. To solve these challenges, we propose a direct approach for multihorizon probabilistic forecasting, which can effectively characterize the dependence across future horizons. Specifically, we consider the multi-horizon target as a random vector. The direction of the vector embodies the temporal dependence, and the length of the vector measures the overall scale across each horizon. Therefore, we respectively apply the von Mises-Fisher (VMF) distribution and the truncated normal distribution to characterize the angle and the magnitude of the target vector in our model. We evaluate the performance of our framework on three benchmarks. Extensive results demonstrate the superiority of our framework over six state-of-the-art methods and show the remarkable versatility and extensibility for different time series forecasting tasks. + +## 1 INTRODUCTION + +Time series forecasting has historically been a key area of academic research and industrial applications, such as climate modeling (Mudelsee, 2019), biological sciences (Stoffer & Ombao, 2012), medicine (Topol, 2019), detail decision making (B¨ose et al., 2017), and finance (Andersen et al., 2005). The common requirement of time series forecasting is measuring the uncertainty of the output by predicting its probability distribution, which is termed “probabilistic forecasting”. In addition, the practical use of probabilistic forecasting generally requires forecasting more than one step, i.e., multi-horizon forecasting. For example, in retail, multi-horizon probabilistic forecasting is used for optimal inventory management, staff scheduling, and topology planning (Simchi-Levi et al., 2008); in finance, it is used to prevent sudden flow abnormalities (Balb´as et al., 2005). Modern machine learning methods have been proposed for multi-horizon probabilistic forecasting, which can be divided into iterative and direct methods as follows. + +Iterative approaches typically make use of autoregressive deep learning architectures, which produce multi-horizon forecasts by recursively feeding samples of the target into future time steps. Iterative approaches generally make use of the “chain rule” in the training stage, which decomposes _p_ ( **y** _T_ +1: _T_ + _H |_ **y** 0: _T ,_ **x** ) as[�] _[T] t_ =[ +] _T[H]_ +1 _[p]_[(] _[y][t][|]_ **[y]**[0:] _[t][−]_[1] _[,]_ **[ x]**[)][(Sutskever][et][al.,][2014),][where] **[y]**[0:] _[T]_[=] ( _y_ 0 _, y_ 1 _, . . . , yT_ ) _[T]_ denotes a slice of the time series and **x** represents some external features. Due to the chain rule, iterative approaches transform the estimation of _p_ ( **y** _T_ +1: _T_ + _H |_ **y** 0: _T ,_ **x** ) into a onestep-ahead prediction in the training stage and feed the prediction of _yt−_ 1 back as ground truth to forecast _yt_ . However, as pointed out in (Bengio et al., 2015; Lamb et al., 2016; Wen et al., 2017), the discrepancy between actual data and estimates during prediction can lead to error accumulation. Since a small amount of error is produced at each time step, the recursive structure of iterative methods can potentially lead to large error accumulations over long forecasting horizons. Therefore, the + +1 + +iterative approaches are less robust and might lead to a biased model (Chevillon, 2007; Taieb & Atiya, 2016). + +For the direct methods (Wen et al., 2017; Lim et al., 2021; Fan et al., 2019), they can alleviate the above-mentioned issues involved in iterative methods, which can directly forecast all targets by using all available inputs. They typically use sequence-to-sequence architecture, a type of network structure mapping sequences directly to sequences. These methods commonly choose the quantile loss function as the training objective. They try to jointly minimize the quantile loss at each future horizon, where a decoder structure propagates encoded historical information and processes external features that can be acquired in advance. However, minimizing a loss function at each horizon, which is equivalent to transforming _p_ ( **y** _T_ +1: _T_ + _H |_ **y** 0: _T ,_ **x** ) into[�] _[H] h_ =1 _[p]_[(] _[y][T]_[ +] _[h][|]_ **[y]**[0:] _[T][ ,]_ **[ x]**[)][, is] somewhat abuse of conditional independence. The discrepancy between _p_ ( **y** _T_ +1: _T_ + _H |_ **y** 0: _T ,_ **x** ) and � _Hh_ =1 _[p]_[(] _[y][T]_[ +] _[h][|]_ **[y]**[0:] _[T][ ,]_ **[ x]** _[, h]_[)][ can also lead to biased models.] + +Taking all the aforementioned challenges into account, we propose a direct approach for multihorizon probabilistic forecasting which can effectively capture the characteristics of the dependence across future horizons. We consider the multi-horizon target **y** _T_ +1: _T_ + _H_ as a random vector in an _H_ - dimension vector space. When there exists a certain dependence mechanism among _yT_ + _h_ (1 _≤ h ≤ H_ ), **y** _T_ +1: _T_ + _H_ is likely to be distributed around a specific direction. The direction of **y** _T_ +1: _T_ + _H_ 1 can be defined by the cosine of its angles relative to the orthonormal basis _{eh}[H] h_ =1 of the vector space, which is an _H_ -dimension unit-vector defined as + +**==> picture [186 x 27] intentionally omitted <==** + +_H_ where _⟨, ⟩_ denotes the inner product and _||_ **y** _T_ +1: _T_ + _H ||_ 2 = �� _h_ =1 _[y] T_[2] + _h_[denotes][the][Euclidean] norm of **y** _T_ +1: _T_ + _H_ . Therefore, we apply the von Mises-Fisher (VMF) distribution, which is a probability distribution on the surface of a unit-sphere, to characterize the distribution of the direction of **y** _T_ +1: _T_ + _H_ . Once the direction of **y** _T_ +1: _T_ + _H_ is learned, and suppose _||_ **y** _T_ +1: _T_ + _H ||_ 2 is given, the forecast can be made by multiplying _||_ **y** _T_ +1: _T_ + _H ||_ 2 with its direction. Hence, we normalize **y** _T_ +1: _T_ + _H_ by dividing its length and adopt a prior distribution on _||_ **y** _T_ +1: _T_ + _H ||_ 2 to obtain a complete tractable likelihood function. Recall that the direction of **y** _T_ +1: _T_ + _H_ is defined via angles, and its length is determined by the scale of each _yT_ + _h_ , the similarity measurement of the attention module involved in our model is correspondingly modified, which is capable of evaluating the joint similarity between angles and scales, namely the “Angle&Scale” similarity. The key features of our method are to preserve the temporal dependence, or as we explained before, the angles of **y** _T_ +1: _T_ + _H_ , and automatically project _||_ **y** _T_ +1: _T_ + _H ||_ 2 to each _yT_ + _h_ to estimate its scale. We summarize these features as “angle-preserving” and “auto-scaling”, where auto-scaling is important for handling data with different magnitudes (Salinas et al., 2019). One remaining challenge is optimizing the likelihood function due to the Bessel function, an essential part of VMF distribution and commonly leading to underflow problems(Kumar & Tsvetkov, 2018). Without the sacrifice of accuracy, we estimate and alternatively optimize the upper bound of the Bessel function. + +Our contributions are three folds: (1) We propose a probabilistic forecasting model (VMFTransformer) based on Transformer and VMF distribution, which captures the temporal dependence of multi-horizon targets. We also demonstrate our model’s performance is state-of-the-art on realworld datasets; (2) We design a novel similarity measurement termed “Angle&Scale” similarity for the attention module; (3) We present a more efficient optimization method for the Bessel function in the VMF distribution without the sacrifice of accuracy. + +## 2 RELATED WORK + +**Time Series Forecasting.** Recent time series forecasting models based on deep learning (e.g., recurrent and convolutional neural networks) (Salinas et al., 2019; Rangapuram et al., 2018; Wen et al., 2017) provide a data-driven manner to deal with time series forecasting tasks and achieve great accuracy in most application fields. Due to complex dependencies over time of recurrent networks and the limits of convolutional filters, these methods have difficulties in modeling long-term and complex relations in the time series data. + +> 1 _eh_ = (0 _, . . . ,_ 1 _, . . . ,_ 0), the _h_ -th element is 1 while the rest are 0. + +2 + +**==> picture [219 x 137] intentionally omitted <==** + +Figure 1: Illustration of how a multi-horizon target can be viewed as a high-dimensional random vector and how the VMF distribution is applied to describe its distribution. As shown in Figure 1.a, the example shows when performing a 3-step forecasting, the target can be packed together into a 3-dimensional vector ( _yt, yt_ +1 _, yt_ +2) where its direction is a unit-vector, i.e. (cos _α,_ cos _β,_ cos _γ_ ), determined by its angles relative to the orthonormal basis _{e_ 1 _, e_ 2 _, e_ 3 _}_ in Figure 1.b. When there exists dependency among _yt_ , _yt_ +1, and _yt_ +2, the random vector ( _yt, yt_ +1 _, yt_ +2) is likely to be distributed around a certain direction, described by the VMF distribution for random vectors on unit-sphere in Figure 1.c. The scale or length of ( _yt, yt_ +1 _, yt_ +2) is equivalent to sphere radius, whose distribution is described by the Truncated Normal Distribution in Figure 1.c. A forecast can be made by multiplying a direction generated from the estimated VMF distribution with a length generated from the estimated Truncated Normal Distribution. + +Recently, Transformers (Vaswani et al., 2017) based on self-attention mechanism (Fan et al., 2019) show promising performance in time series forecasting (Li et al., 2020; Wu et al., 2021; Zhou et al., 2021; Kitaev et al., 2020). Considering the dependencies of each time point in a sequence, Transformer-based methods (Li et al., 2020) are proposed by assigning different importance to the different time points. Progresses have been made in reducing the computation complexity of the self-attention and enhancing the capacity of information extraction of the Encoder-Decoder structure(Zhou et al., 2021; Wu et al., 2021; Kitaev et al., 2020). In addition, Matrix factorization methods (Yu et al., 2016) and Bayesian methods that share information via hierarchical priors (Chapados, 2014) are used to learn multiple related time series by leveraging hierarchical structure (Hyndman et al., 2011). Despite the empirically extraordinary performance, these iterative and direct methods are all still facing the mentioned challenges in Introduction. + +**von Mises-Fisher (VMF) distribution.** The von Mises Fisher Distribution (VMF) is an important isotropic distribution for directional data that have direction as well as magnitude, such as gene expression data, wind current directions, or measurements taken from compasses (Dhillon & Sra, 2003). The von Mises–Fisher distribution is a probability distribution on directions in R _[p]_ . It can be regarded as a distribution on the ( _p−_ 1)-sphere of unit radius, which is on the surface of the D-ball of unit radius. If _p_ = 2, the distribution reduces to the von Mises distribution on the circle. Recently, it has been successfully used in numerous machine learning tasks, such as unsupervised learning (Banerjee et al., 2005; Gopal & Yang, 2014), supervised learning (Scott et al., 2021), contrastive learning (Wang & Isola, 2020), natural language processing (Kumar & Tsvetkov, 2018), computer vision (Hasnat et al., 2017; Zhang et al., 2021), and so on. Our work is the first to introduce the von Mises-Fisher distribution to the time series forecasting task. + +## 3 METHODOLOGY + +The core idea of this work is to consider a multi-horizon target as a vector in a high-dimensional space, where its direction or angle relative to the orthonormal basis characterizes the dependence structure, and its length is determined by the scale of the targets at each horizon. Therefore, performing probabilistic forecasting requires first evaluating the probability distribution of directions. For this purpose, we appeal to the VMF distribution. Recall that the VMF distribution only applies to vectors distributed on a unit sphere; we, therefore, adopt a probability distribution on the length of the vector representing the multi-horizon target. We choose the truncated normal distribution for vector length, which turns out to be a prior distribution. We visualize this idea in Figure 1. + +3 + +The rest of this section is organized into four subsections. We first derive the objective function for model training and introduce the attention module to suit our proposed objective function. We then propose a training trick to increase the stability of gradient descent while presenting a random sampling method for performing probabilistic forecasts. + +## 3.1 OBJECTIVE FUNCTION + +This section derives the log-likelihood function for maximum likelihood estimation (MLE) at the training stage. + +**VMF Distribution** . The VMF distribution is a probability distribution on the surface of a unitsphere. For a _d_ dimensional random unit vector **y** = ( _y_ 1 _, . . . , yd_ ) _[T]_ ( _||_ **y** _||_ 2 = 1), the probability density function of VMF distribution is defined as + +**==> picture [272 x 12] intentionally omitted <==** + +where _**µ**_ denotes the mean direction ( _||_ _**µ** ||_ 2 = 1), and _κ_ denotes the concentration parameter. In other words, _**µ**_ locates the most likely direction of **y** = ( _y_ 1 _, . . . , yd_ ) _[T]_ , and _κ_ controls the divergence of **y** = ( _y_ 1 _, . . . , yd_ ) _[T]_ from _**µ**_ . The greater the value of _κ_ , the stronger concentration of **y** = ( _y_ 1 _, . . . , yd_ ) _[T]_ around _**µ**_ . The normalization constant _Cd_ ( _κ_ ) in Equation equation 1 is defined as + +**==> picture [116 x 27] intentionally omitted <==** + +where _Id/_ 2 _−_ 1( _κ_ )[2] is the modified Bessel function of the first kind. **Conditional Density Function** . Let _σ_ denote the length of the multi-horizon target, i.e. _||_ **y** _T_ +1: _T_ + _H ||_ 2 = _σ_ , based on Equation equation 1, we define the conditional probability density function of **y** _T_ +1: _T_ + _H_ as + +**==> picture [320 x 20] intentionally omitted <==** + +**Prior on** _**σ**_ . We introduce a prior distribution on the scale parameter _σ_ to make Equation equation 2 tractable. For explicitness, we choose the truncated normal distribution (Burkardt, 2014). The truncated normal distribution is an extension of the normal distribution, which compress the range of a random variable from ( _−∞,_ + _∞_ ) into an open interval ( _a, b_ ) ( _−∞≤ a < b ≤_ + _∞_ ). A truncated normal distribution is determined by four parameters _m, γ, a, b_ . The parameters _m, γ_ denote the location and shape parameters, respectively, while _a, b_ denote the lower and upper bound of the random variable. In our case, _a_ = 0 and _b_ = + _∞_ . Technically, + +**==> picture [278 x 40] intentionally omitted <==** + +where Φ( _·_ ) denotes the cumulative distribution function of the standard normal distribution. **Likelihood Function** . Let _T_ denote the set of all forecast times selected for generating training data, and _I_ denote the set of indices of time series, the _H_ -horizon targets at time _t_ ( _t ∈T_ ) of the _i_ -th time series ( _i ∈I_ ) is then **y** _t[i]_ +1: _t_ + _H_[,][where] **[ y]** _a[i]_ : _b_[=][(] _[y] a[i][, y] a[i]_ +1 _[, . . . , y] b[i]_[)] _[T]_[denotes a slice of the] _i_ -th time series. Combining Equation equation 2 and equation 3, we can obtain the joint probability of the target set _**Y**_ = _{_ **y** _t[i]_ +1: _t_ + _H_[:] _[ t][ ∈T][ , i][ ∈I}]_[, which is] + +**==> picture [356 x 63] intentionally omitted <==** + +where Ω= _{{_ _**µ[i] t**[, κ][i] t[, m][i] t[, γ] t[i][}]_[ :] _[ t][ ∈T][ , i][ ∈I}]_[, and] _[ σ] t[i]_[=] _[ ||]_ **[y]** _t[i]_ +1: _t_ + _H[||]_[2][.] + +> 2 _In_ ( _z_ ) is defined as ( _z/_ 2) _n_[�] + _k_ =0 _∞ k_ !Γ(( _zn/_ 2+) _k_[2] +1) _[k]_[, where][ Γ(] _[·]_[)][ is the Gamma function.] + +4 + +Let Θ denote the parameters of a neural network, and _**µ** , κ, m, γ_ be functions of the network output given Θ, the history **y** 0: _[i] t_[,][and][external][features] **[x]** _[i]_[.][Based][on][Equation][equation][4,][the][likelihood] function of the model parameters Θ, is derived as follows: + +**==> picture [364 x 45] intentionally omitted <==** + +**Objective Function for MLE.** The log-likelihood function is obtained by taking the logarithm of Equation equation 6 as + +**==> picture [463 x 61] intentionally omitted <==** + +where _Cl_ represents the constant term. The training object is to maximize Equation equation 6 with respect to Θ, or equivalently, minimize the inverse _−l_ (Θ). + +## 3.2 MODEL + +**Transformer.** The seq2seq architecture is based on the Transformer (Li et al., 2020; Vaswani et al., 2017). The Transformer adopts an encoder-decoder structure and captures both long- and short-term dependencies via the multi-head self-attention mechanism. + +**Model Output.** Let **h** denote the output of the decoder. We apply a fully-connected layer to **h** to obtain _**µ**_ . + +_**µ**_ = _**Wµ**_ **h** + **b** _**µ** ._ + +For _κ, m, γ_ , we apply a fully-connected layer with soft-plus activation to ensure positivity. Specifically, + +_κ_ = log(1 + exp( **w** _κ_ **h** + _bκ_ )) _, m_ = log(1 + exp( **w** _m_ **h** + _bm_ )) _, γ_ = log(1 + exp( **w** _γ_ **h** + _bγ_ )) _._ + +**Self-Attention.** A self-attention function is to map a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors (Vaswani et al., 2017). In order to compute the attention function on a set of queries simultaneously, all queries are usually packed into a query matrix _**Q**_ . The keys and values are also packed into matrices _**K**_ and _**V**_ respectively(Vaswani et al., 2017). + +The conventional attention function measures the similarities between queries and keys, which are row vectors of _**Q**_ and _**K**_ respectively, by a ‘dot-product’ operation and feeds the similarities into a softmax function to normalize the similarities summing to 1 (Vaswani et al., 2017). Afterward, the output of the attention function is computed as the weighted average of the values, where the weights are the outputs of the softmax function. We adopt the multi-head convolutional self-attention mechanism, which has effectively enhanced awareness of local context, e.g. local shapes of time series(Li et al., 2020). + +We modify the similarity measurement between queries and keys to better suit our objective function. We measure the similarity between a query vector and a key vector by computing the cosine of the angle between them and multiplying it with the difference between the length. For the rest of this article, we refer to this similarity measurement as the “Angle&Scale” similarity. The softmax function is then applied to obtain the weights of the values. Technically, for each time series _i_ , let + +**z** _t_ +1: _t_ + _H_ = [ _yt ◦_ **x** _[T] t_ +1 _[◦][. . .][ ◦]_ **[x]** _[T] t_ + _H_[]] _[T][∈]_[R] _[H][∗][d]_[+1] _[,]_ _**[Z]**[t]_[= [] **[z]**[1:] _[H][, . . . ,]_ **[ z]** _[t]_[+1:] _[t]_[+] _[H]_[]] _[T][∈]_[R][(] _[t]_[+1)] _[×]_[(] _[H][∗][d]_[+1)] where [ _· ◦·_ ] represents concatenation, and **x** _t ∈_ R _[d]_ represents the known inputs. The self-attention module first transforms _**Z** t_ into the query matrices _**Q**_ , key matrices _**K**_ , and value matrices _**V**_ via + +> _**Q**_ = _**Z** t ∗_ _**W**[Q]_ = [ **q** 0 _, . . . ,_ **q** _t_ ] _[T] ∈_ R[(] _[t]_[+1)] _[×][d][k] ,_ _**K**_ = _**Z** t ∗_ _**W**[K]_ = [ **k** 0 _, . . . ,_ **k** _t_ ] _[T] ∈_ R[(] _[t]_[+1)] _[×][d][k] ,_ _**V**_ = _**Z** t ∗_ _**W**[V]_ = [ **v** 0 _, . . . ,_ **v** _t_ ] _[T] ∈_ R[(] _[t]_[+1)] _[×][d][v] ,_ + +5 + +where _**W**[K] ,_ _**W**[Q]_ and _**W**[V]_ are learnable parameters, and the symbol _∗_ represents the convolution operation (Li et al., 2020). The similarity between **q** _i_ and **k** _j_ is defined as + +**==> picture [303 x 25] intentionally omitted <==** + +It should be noted that in Equation equation 7, the difference between _||_ **q** _i||_ 2 and _||_ **k** _j||_ 2 is passed into a Gaussian kernel with a radial parameter of 1. This operation is to ensure the difference ranging from 0 to 1, such that the magnitude of the cosine and difference would be at the same level. + +Then, each row vector of the output matrices _**O**_ = [ **o** 1 _, . . . ,_ **o** _t_ ] _[T] ∈_ R _[t][×]_[(] _[d][v]_[+1)] , is defined as the normalized weighted average of the row vectors of the value matrices _**V**_ , concatenating its norm. By Equation equation 8, we formalize this definition as + +**==> picture [333 x 37] intentionally omitted <==** + +## 3.3 TRAINING + +The log-likelihood function is not directly differentiable because the Bessel function _Id_ ( _x_ ) cannot be written in a closed form (Kumar & Tsvetkov, 2018; Davidson et al., 2018). In addition, optimizing the Bessel function may cause an underflow problem when _d_ is large or _x_ is small (Kumar & Tsvetkov, 2018). Therefore, we alternatively optimize the upper bound of the logarithm of the Bessel function. + +**Bound of Bessel Function** . We evaluate the lower and upper bounds of the logarithm of _Id_ ( _x_ ) and summarize the result in Proposition 3.1, and the provide the proof in Appendix. We also visualize the difference between the upper and lower bounds in Figure 4, which vividly illustrates the range of the approximation error. + +**Proposition 3.1.** _Let Id_ ( _x_ ) _be the modified Bessel function of the first kind, and m_ = _d −⌊d⌋, then_ + +**==> picture [451 x 27] intentionally omitted <==** + +By Proposition 4, we use the following approximation of the logarithm of the Bessel function at the training stage, + +**==> picture [321 x 23] intentionally omitted <==** + +## 3.4 PREDICTION + +At the prediction stage, there is no closed-form solution for computing the quantiles of **y** _T[i]_ +1: _T_ + _H_[.] We alternatively draw random samples from the probability density function of **y** _T[i]_ +1: _T_ + _H_[and] estimate each quantile empirically. + +**Random sampling** . We first sample the scale parameter _σ_ according to Equation equation 3 and next, we draw a sample of **y** _T[i]_ +1: _T_ + _H_[according][to][Equation][equation][2.][Sampling] **[y]** _T[i]_ +1: _T_ + _H_ via Equation equation 2 is equivalent to first sampling a unit vector from a VMF distribution and multiplying it by _σ_ . An _H_ -dimensional random unit vector **y** subjecting to a VMF distribution with parameters _**µ** , κ_ , can be decomposed as + +**==> picture [244 x 13] intentionally omitted <==** + +where _**v**_ is a uniformly distributed unit tangent at _**µ**_ , and _t ∈_ [ _−_ 1 _,_ 1] subjects to + +**==> picture [274 x 31] intentionally omitted <==** + +Therefore, we respectively sample _t_ and _**v**_ , and construct a sample **y** by Equation equation 10. More details on the decomposition defined by Equation equation 10 can be referred to in (Mardia & Jupp, 2009). + +6 + +## 4 EXPERIMENT + +We analyze the approximation error of logarithm of Bessel function and evaluate the proposed methods on 3 datasets. + +- 4.1 BESSEL FUNCTION APPROXIMATION ERROR + +**==> picture [348 x 115] intentionally omitted <==** + +Figure 2: Upper (a) and lower (b) bounds of the logarithm of Bessel Function. The difference between the upper and lower bounds is shown in (c). We evaluate the approximation error of the logarithm of the Bessel function given by Equation equation 9. We compute both the upper and lower bounds on a grid where _κ_ ranges from 1 _×_ 10 _[−]_[7] to 100, and _d_ ranges from 2 to 100. We plot the result in Figure 4. Besides, we observe that the logarithm of the Bessel function is bounded in a range of (-2093.07, 97.77) on the grid. The minimum and maximum values are achieved at ( _κ, d_ ) = (1 _×_ 10 _[−]_[10] _,_ 100) and ( _κ, d_ ) = (100 _,_ 2) respectively. Recall that the underflow problem usually appears when _d_ is large (empirically larger than 5) and _κ_ is small; in our case, we avoid this problem via the approximation. Besides, the difference between the upper and lower bounds ranges from 0 to 0 _._ 72, and on about 95.7% of all grid points, the difference is smaller than 0.3. Since the absolute approximation error is smaller than the difference, we subsequently conclude that the upper bound of the absolute approximation error is smaller than 0.3. + +Table 1: Comparison of _q_ -risk of the VMFTransformer with competitive models on three public datasets. The prediction length (horizon) is set to H=24 and H=168. Best results are marked in bold (lower is better). + +|(lower is better).|||||||||| +|---|---|---|---|---|---|---|---|---|---| +|H=24|Electricity|||Solar energy|||Traffc||| +|Model|q=50|q=90|AVG|q=50|q=90|AVG|q=50|q=90|AVG| +|DeepAR|0.0734|0.0580|0.0657|0.4626|0.3097|0.3862|0.1526|0.1082|0.1304| +|FeedForward|0.0784|0.0433|0.0609|0.5341|0.3591|0.4466|0.2518|0.2011|0.2265| +|TFT|0.1107|0.0588|0.0848|0.4855|0.2471|0.3663|0.1981|0.1478|0.1730| +|Transformer|0.0789|0.0500|0.0645|0.5354|0.3502|0.4428|0.1644|0.1087|0.1366| +|Informer|0.1402|0.0729|0.1065|0.4722|0.2947|0.3834|0.6142|0.2947|0.4545| +|Autoformer|0.1224|0.0654|0.0939|0.2233|0.2113|0.2173|0.2157|0.1455|0.1806| +|**VMFTransformer**|**0.0722**|**0.0427**|**0.0575**|**0.2125**|**0.1371**|**0.1748**|**0.1490**|**0.0935**|**0.1213**| +|H=168|Electricity|||Solar energy|||Traffc||| +|Model|q=50|q=90|AVG|q=50|q=90|AVG|q=50|q=90|AVG| +|DeepAR|0.1464|0.0862|0.1163|0.5613|0.2349|0.3981|0.1553|**0.1013**|0.1283| +|FeedForward|0.1397|0.0730|0.1064|0.5891|0.2558|0.4224|0.2349|0.1360|0.1854| +|Transformer|0.1173|0.0670|0.0922|0.6319|0.3116|0.4717|0.1739|0.1063|0.1401| +|TFT|0.2243|0.1122|0.1682|0.6085|0.2030|0.4058|0.1514|0.1019|0.1267| +|Informer|0.1711|0.0749|0.1230|0.5434|0.2960|0.4197|0.7236|0.6800|0.7018| +|Autoformer|0.1342|0.0791|0.1066|0.2355|0.1589|0.1972|0.2559|0.1948|0.2254| +|**VMFTransformer**|**0.0840**|**0.0598**|**0.0719**|**0.2318**|**0.1473**|**0.1896**|**0.1225**|0.1099|**0.1162**| + +- 4.2 REAL-WORLD DATA EXPERIMENT + +## 4.2.1 DATASET. + +We evaluate the performance of VMFTransformer on three public datasets, which are electricity, solar energy, and traffic. Electricity contains hourly time series of the electricity consumption of 370 customers ranging from 2012-01-01 to 2014-08-31 (Salinas et al., 2019). Solar energy, ranging + +7 + +from 2006-01-01 to 2006-08-31, consists of 137 5-minute solar power time series obtained from the Monash Time Series Forecasting Repository (Godahewa et al., 2021). All solar power time series are aggregated to 1-hour granularity. Traffic, also used in (Salinas et al., 2019), contains the hourly measured occupancy rate, between 0 and 1, of 963 car lanes of San Francisco bay area freeways, ranging from 2008-01-02 to 2008-06-22. We follow the standard protocol and split all datasets into training, validation, and test sets in chronological order by the ratio of 7:1:2. + +## 4.2.2 IMPLEMENTATION DETAILS AND BASELINES. + +Our method is trained using the ADAM optimizer (Kingma & Ba, 2014) with an initial learning rate of 10 _[−]_[3] . The batch size is set to 256. The training process is early stopped within five epochs. All experiments are implemented in PyTorch (Paszke et al., 2019). + +We include a total number of 6 baseline methods. Specifically, we select four state-of- the-art transformer-based models: Informer (Zhou et al., 2021), Autoformer (Wu et al., 2021), Temporal Fusion Transformer (TFT) (Lim et al., 2021), the original Transformer (Vaswani et al., 2017)(Li et al., 2020), one RNN based method: DeepAR (Salinas et al., 2019), and one simple feed forward neural network. + +## 4.2.3 MAIN RESULTS. + +We fix the input length as 168 and evaluate models with two prediction lengths: 24 and 168, corresponding to one-day and one-week horizons, respectively. We use three metrics, i.e., mean absolute error (MAE), mean squared error (MSE), and _q_ -risk, to evaluate the performance of different methods. The first two measure the performance for forecasting the mean value, while the last quantifies the accuracy of a quantile _q_ of the predictive distribution (Salinas et al., 2019). We set _q_ = 50 and 90 (Salinas et al., 2019). + +We show in Table 1 and Table 2 that VMFTransformer achieves state-of-the-art performance. For _q_ -risk, as directed in Table 1, VMFTransformer performs best in almost every benchmark except for one, which is q=90 and H=168 on the traffic dataset (Table 1). Still, the average _q_ -risk is reduced (8.29%) by VMFTransformer relative to the second-best model (TFT). For MAE and MSE, we observe from Table 2 that VMFTransformer consistently outperforms all baselines. + +Table 2: Comparison of MAE and MSE of the VMFTransformer with competitive models on three public datasets. The prediction length (horizon) is set to H=24 and H=168. The best results are marked in bold (lower is better). + +|H=24|Electricity|Electricity|Electricity|Solar energy|Solar energy|Solar energy|Traffc|Traffc|Traffc| +|---|---|---|---|---|---|---|---|---|---| +|Model|MAE|MSE|AVG|MAE|MSE|AVG|MAE|MSE|AVG| +|DeepAR|0.0168|0.0188|0.0178|0.2619|0.3243|0.2931|0.1667|0.2042|0.1855| +|FeedForward|0.0153|0.0114|0.0133|0.3024|0.4213|0.3618|0.2751|0.3775|0.3263| +|TFT|0.0251|0.0363|0.0307|0.2749|0.3189|0.2969|0.2165|0.2912|0.2538| +|Transformer|0.0139|0.0144|0.0142|0.3031|0.4503|0.3767|0.1796|0.2050|0.1923| +|Informer|0.0845|0.0144|0.0494|0.2607|0.1824|0.2215|0.4620|0.6446|0.5533| +|Autoformer|0.1237|0.0253|0.0745|0.2106|0.1685|0.1895|0.2613|0.1542|0.2077| +|**VMFTransformer**|**0.0116**|**0.0078**|**0.0097**|**0.2092**|**0.1334**|**0.1713**|**0.1334**|**0.1185**|**0.1259**| +|H=168|Electricity|||Solar energy|||Traffc||| +|Model|MAE|MSE|AVG|MAE|MSE|AVG|MAE|MSE|AVG| +|DeepAR|0.0224|0.0301|0.0262|0.3077|0.3806|0.3442|0.1713|0.2115|0.1914| +|FeedForward|0.0211|0.0281|0.0246|0.3229|0.4122|0.3675|0.2590|0.2902|0.2746| +|TFT|0.0287|0.0469|0.0378|0.3336|0.5126|0.4231|0.1670|0.1952|0.1811| +|Transformer|0.0199|0.0296|0.0247|0.3464|0.4904|0.4184|0.1918|0.2081|0.2000| +|Informer|0.1461|0.0356|0.0908|0.2174|0.1562|0.1868|0.5591|0.8068|0.6829| +|Autoformer|0.1198|0.0242|0.0720|0.2785|0.1844|0.2314|0.2231|0.1747|0.1989| +|**VMFTransformer**|**0.0128**|**0.0205**|**0.0167**|**0.2136**|**0.1390**|**0.1763**|**0.1390**|**0.1185**|**0.1288**| + +## 4.2.4 ABLATION STUDIES. + +We use the solar energy dataset for the ablation study. + +**Sensitivity to Sampling Size.** Since the prediction is conducted by random sampling, we study + +8 + +Table 3: Comparison of the sensitivity of the VMFTransformer to the sampling size at the prediction step. The prediction length (horizon) is set to H=24 and H=168. Sample size (S) is set to 100, 1000, 10000, and 100000. The best results are marked in bold (lower is better). The stability of performance is measured by the average (AVG) divided by the standard deviation (STD). + +|**Samplesize**|**Samplesize**|**100**|**1000**|**10000**|**100000**|**AVG**|**STD**|**STD/AVG**| +|---|---|---|---|---|---|---|---|---| +|H=24|MAE|0.2341|**0.2339**|0.2424|0.2368|0.2368|0.0040|0.0168| +||MSE|0.1846|**0.1828**|0.1995|0.1924|0.1898|0.0077|0.0406| +||50-loss|0.3243|**0.3238**|0.3370|0.3274|0.3281|0.0061|0.0187| +||90-loss|**0.2435**|0.2667|0.2490|0.2823|0.2604|0.0177|0.0678| +|H=168|MAE|**0.2000**|0.2014|0.2005|0.2002|0.2005|0.0006|0.0030| +||MSE|0.1303|0.1307|**0.1286**|0.1305|0.1300|0.0010|0.0077| +||50-loss|**0.2830**|0.2848|0.2834|0.2833|0.2836|0.0008|0.0028| +||90-loss|0.1733|**0.1724**|0.1749|0.1772|0.1744|0.0021|0.0118| + +Table 4: Comparison of similarity measurements of attention module. The best results are in bold (lower is better). + +|**Similarity**|**Similarity**|**Angle&Scale**|**Dot-product**| +|---|---|---|---| +|H=24|MAE|**0.2339**|0.2389| +||MSE|0.1828|**0.1749**| +||50-loss|**0.3238**|0.3317| +||90-loss|**0.2667**|0.2707| +|H=168|MAE|**0.2014**|0.2082| +||MSE|**0.1307**|0.1316| +||50-loss|**0.2848**|0.2950| +||90-loss|**0.1724**|0.2250| + +if the model performance is sensitive to sampling size. The sampling size (S) is set as 100, 1000, 10000, and 100000. In table 3, we show that the performance of VMFTransformer is relatively stable, especially when the prediction length is 168 (STD/AVG _<_ 1.2%). When the prediction length is short (24), S=1000 tends to show the optimal performance. Therefore, we recommend S=1000 for practical use. + +**Attention Module.** We compare Angle&Scale similarity versus the original dot-product similarity for the attention module. We set the prediction length at H=24 and H=168. Table 4 shows that the Angle&Scale similarity outperforms the dot-product similarity in most cases (7 out of 8). **Time Complexity.** Our Angle&Scale similarity requires more computation than the original dotproduct similarity. The popular Transformer-based methods such as Reformer, Informer, and Autoformer have a theoretical time complexity of _O_ ( _L_ log _L_ ), while the vanilla Transformer is _O_ ( _L_[2] ), where _L_ is the encoding length. The theoretical time complexity of our VMFTransformer is still _O_ ( _L_[2] ), which is the same as the vanilla Transformer. + +## 5 CONCLUSION + +We propose a probabilistic forecasting model termed VMFTransformer, which captures the temporal dependence of multi-horizon targets. Extensive experiments demonstrate that our model’s performance is state-of-the-art on public datasets. The novel similarity measurement termed the “Angle&Scale” similarity is effective for multi-horizon time series forecasting. + +## REFERENCES + +Torben G Andersen, Tim Bollerslev, Peter Christoffersen, and Francis X Diebold. Volatility forecasting, 2005. + +- Alejandro Balb´as, Rosario Romera, and Esther Ruiz. An overview of probabilistic and time series models in finance. _Recent Advances in Applied Probability_ , pp. 27–63, 2005. + +9 + +- Arindam Banerjee, Inderjit S Dhillon, Joydeep Ghosh, Suvrit Sra, and Greg Ridgeway. Clustering on the unit hypersphere using von mises-fisher distributions. _Journal of Machine Learning Research_ , 6(9), 2005. + +- Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In _Proceedings of the 28th International Conference on Neural Information Processing Systems-Volume 1_ , pp. 1171–1179, 2015. + +- Joos-Hendrik B¨ose, Valentin Flunkert, Jan Gasthaus, Tim Januschowski, Dustin Lange, David Salinas, Sebastian Schelter, Matthias Seeger, and Yuyang Wang. Probabilistic demand forecasting at scale. _Proceedings of the VLDB Endowment_ , 10(12):1694–1705, 2017. + +- John Burkardt. The truncated normal distribution. _Department of Scientific Computing Website, Florida State University_ , 1:35, 2014. + +- Nicolas Chapados. Effective bayesian modeling of groups of related count time series. In _International conference on machine learning_ , pp. 1395–1403. PMLR, 2014. + +- Guillaume Chevillon. Direct multi-step estimation and forecasting. _Journal of Economic Surveys_ , 21(4):746–785, 2007. + +- Tim R Davidson, Luca Falorsi, Nicola De Cao, Thomas Kipf, and Jakub M Tomczak. Hyperspherical variational auto-encoders. _arXiv preprint arXiv:1804.00891_ , 2018. + +- Inderjit S Dhillon and Suvrit Sra. Modeling data using directional distributions. Technical report, Citeseer, 2003. + +- Chenyou Fan, Yuze Zhang, Yi Pan, Xiaoyue Li, Chi Zhang, Rong Yuan, Di Wu, Wensheng Wang, Jian Pei, and Heng Huang. Multi-horizon time series forecasting with temporal attention learning. In _Proceedings of the 25th ACM SIGKDD International conference on knowledge discovery & data mining_ , pp. 2527–2535, 2019. + +- Rakshitha Godahewa, Christoph Bergmeir, Geoffrey I. Webb, Rob J. Hyndman, and Pablo MonteroManso. Monash time series forecasting archive. In _Neural Information Processing Systems Track on Datasets and Benchmarks_ , 2021. + +Siddharth Gopal and Yiming Yang. Von mises-fisher clustering models. In _International Conference on Machine Learning_ , pp. 154–162. PMLR, 2014. + +- Md Hasnat, Julien Bohn´e, Jonathan Milgram, St´ephane Gentric, Liming Chen, et al. von misesfisher mixture model-based deep learning: Application to face verification. _arXiv preprint arXiv:1706.04264_ , 2017. + +- Rob J Hyndman, Roman A Ahmed, George Athanasopoulos, and Han Lin Shang. Optimal combination forecasts for hierarchical time series. _Computational statistics & data analysis_ , 55(9): 2579–2589, 2011. + +- Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _arXiv preprint arXiv:1412.6980_ , 2014. + +- Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. _arXiv preprint arXiv:2001.04451_ , 2020. + +- Sachin Kumar and Yulia Tsvetkov. Von mises-fisher loss for training sequence to sequence models with continuous outputs. In _International Conference on Learning Representations_ , 2018. + +- Alex Lamb, Anirudh Goyal, Ying Zhang, Saizheng Zhang, Aaron Courville, and Yoshua Bengio. Professor forcing: A new algorithm for training recurrent networks, 2016. + +- Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting, 2020. + +- Bryan Lim, Sercan O[¨] Arık, Nicolas Loeff, and Tomas Pfister. Temporal fusion transformers for interpretable multi-horizon time series forecasting. _International Journal of Forecasting_ , 2021. + +10 + +Kanti V Mardia and Peter E Jupp. _Directional statistics_ , volume 494. John Wiley & Sons, 2009. + +- Manfred Mudelsee. Trend analysis of climate time series: A review of methods. _Earth-science reviews_ , 190:310–322, 2019. + +- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. _Advances in neural information processing systems_ , 32, 2019. + +- Syama Sundar Rangapuram, Matthias W Seeger, Jan Gasthaus, Lorenzo Stella, Yuyang Wang, and Tim Januschowski. Deep state space models for time series forecasting. _Advances in neural information processing systems_ , 31:7785–7794, 2018. + +- David Salinas, Valentin Flunkert, Jan Gasthaus, and Tim Januschowski. DeepAR: Probabilistic forecasting with autoregressive recurrent networks. _International Journal of Forecasting_ , 2019. ISSN 0169-2070. + +- Tyler R Scott, Andrew C Gallagher, and Michael C Mozer. von mises-fisher loss: An exploration of embedding geometries for supervised learning. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 10612–10622, 2021. + +- David Simchi-Levi, Philip Kaminsky, Edith Simchi-Levi, and Ravi Shankar. _Designing and managing the supply chain: concepts, strategies and case studies_ . Tata McGraw-Hill Education, 2008. + +- David S Stoffer and Hernando Ombao. Special issue on time series analysis in the biological sciences, 2012. + +- Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In _Advances in neural information processing systems_ , pp. 3104–3112, 2014. + +- Souhaib Ben Taieb and Amir F. Atiya. A bias and variance analysis for multistep-ahead time series forecasting. _IEEE Transactions on Neural Networks and Learning Systems_ , 27(1):62–76, 2016. doi: 10.1109/TNNLS.2015.2411629. + +- Eric J Topol. High-performance medicine: the convergence of human and artificial intelligence. _Nature medicine_ , 25(1):44–56, 2019. + +- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In _NIPS_ . 2017. + +- Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In _International Conference on Machine Learning_ , pp. 9929–9939. PMLR, 2020. + +- Ruofeng Wen, Kari Torkkola, Balakrishnan Narayanaswamy, and Dhruv Madeka. A multi-horizon quantile recurrent forecaster. _arXiv preprint arXiv:1711.11053_ , 2017. + +- Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. _Advances in Neural Information Processing Systems_ , 34:22419–22430, 2021. + +- Hsiang-Fu Yu, Nikhil Rao, and Inderjit S Dhillon. Temporal regularized matrix factorization for high-dimensional time series prediction. In _NIPS_ . 2016. + +- Libby Zhang, Tim Dunn, Jesse Marshall, Bence Olveczky, and Scott Linderman. Animal pose estimation from video data with a hierarchical von mises-fisher-gaussian model. In _International Conference on Artificial Intelligence and Statistics_ , pp. 2800–2808. PMLR, 2021. + +- Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai Zhang. Informer: Beyond efficient transformer for long sequence time-series forecasting. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 11106–11115, 2021. + +11 + +## 6 APPENDIX + +**==> picture [375 x 230] intentionally omitted <==** + +Figure 3: Learning curve of VMFTransformer on Solar, where the x-axis corresponds to learning steps and y-axis corresponds to training loss. + +Table 5: Running time of different encoding length. + +|Encodinglength|Time(seconds)| +|---|---| +|12|85.352| +|48|122.309| +|72|249.441| +|120|444.464| +|168|1629.578| +|240|2699.469| +|360|6767.158| + +Table 6: Memory usage of different encoding length. + +|: Memoryusage of|different encoding| +|---|---| +|Encodinglength|Memory (Byte)| +|12|2498048| +|48|3061248| +|72|3462656| +|120|4314624| +|168|5248512| +|240|6776320| +|360|9700864| + +12 + +Table 7: Comparison of similarity measurements of attention module for both VMF-Loss and MSELoss. The best results are in bold (lower is better). + +||VMF-Loss|VMF-Loss|VMF-Loss| +|---|---|---|---| +|H|Similarity|Angle&Scale|Dot-product| +|24|MAE|**0.2339**|0.2389| +||MSE|0.1828|**0.1749**| +||50-loss|**0.3238**|0.3317| +||90-loss|**0.2667**|0.2707| +|168|MAE|**0.2014**|0.2389| +||MSE|**0.1307**|0.1316| +||50-loss|**0.2848**|0.2950| +||90-loss|**0.1724**|0.2250| +||MSE-Loss||| +|H|Similarity|Angle&Scale|Dot-product| +|24|MAE|0.7389|**0.7179**| +||MSE|**0.4792**|0.5061| +||50-loss|0.5059|**0.5010**| +||90-loss|**0.8153**|0.8650| +|168|MAE|0.7179|0.7179| +||MSE|0.5075|**0.5061**| +||50-loss|0.5010|0.5010| +||90-loss|**0.8631**|0.8685| + +**==> picture [355 x 231] intentionally omitted <==** + +Figure 4: Comparison of metrics corresponding to different H (the x-axis) where H ranges from 1 to 720. + +13 + diff --git a/open_review/iclr2024_8834.json b/open_review/iclr2024_8834.json new file mode 100644 index 0000000000000000000000000000000000000000..1316f3818b7c09a9842e227a94671c1db4ddf955 --- /dev/null +++ b/open_review/iclr2024_8834.json @@ -0,0 +1,83 @@ +{ + "paper_id": "iclr2024_8834", + "source": "iclr2024", + "source_year": 2024, + "title": "LLMZip: Lossless Text Compression using Large Language Models", + "abstract": "We design a lossless compression algorithm for compressing English text by using the large language model LLaMA-7B as a predictor for the next token given a window of past tokens. Specifically, the proposed LLMZip algorithm uses the conditional probabilities at the output of the large language model in conjunction with Arithmetic Coding. We show that our scheme outperforms state-of-the-art text compression schemes such as BSC, ZPAQ, and paq8h. We show that it is possible to marginally improve the compression performance further by first extracting a summary from the document and compressing the text by conditioning on the summary. Finally, we investigate the compression performance of LLMZip when the summary (side information) is available both at the encoder and decoder. We show that the LLM is able to exploit the available side information to significantly improve the compression performance. As an important byproduct, we provide new estimates of an asymptotic upper bound on the entropy of English which is significantly smaller than currently available estimates in \\cite{cover1978convergent}, \\cite{lutati2023focus}.", + "rebuttal": "Dear Reviewer,\nWe appreciate your time and effort in reviewing our work. We would like to address each point you have raised in the review.\n\n> 1. The novelty of the LLMZip method seems to be limited. As mentioned in the introduction, it seems the connection between compression and prediction has been developed decades ago. Using language models for compression has also been explored before, with LSTM and/or RNN being used. Therefore, it appears that the sole contribution of this paper is the substitution of previously explored smaller language models with large language models (LLMs)\n\nPrior to our research, the compression performance of pre-trained LLMs with Arithmetic Coding had not been reported. While there have been works that utilized LSTMs (Deepzip) and Transformers (NNCPv2) for text compression, LLaMA1 and LLaMA2 significantly outperform earlier results using LSTMs and Transformers. We believe it is necessary to bring this to the attention of the ML community since this may have important consequences for the practice of compression in some scenarios. The idea of using the summary as side information is new. \n\n> 2. Only Llama2 has been used as the language model in the experiment. It is unclear how the performance of LLMZip would vary when employing LLMs of different types and sizes.\n\nWe also report the performance of using LLaMa1, which is the older model, in Table 1, and we do see an improvement in performance when LLaMa2 is used. Using LLMs out of the box for LLMzip compression can be very computationally intensive. As the experiments involve processing 1M tokens for each context size , more gpus are needed for longer durations when using larger versions. Hence we limited our focus to just the 7B version of LLaMa.\n\n> 3. LLMs usually require GPUs for execution, whereas traditional compression algorithms can run on CPUs, which are more widely accessible and easier to democratize.\n\nThis is a valid point. Yet, the article points to a significant gap and a new approach warrants dissemination. The approach may not be ready for widespread dissemination; however, it is a significant step in a new direction.\n\n> 4. The LLMZip approach presented in this paper appears to be more suitable for submission to an information theory conference or journal, such as ISIT.\n\nThe aim of this work is to disseminate this information to the ML / LLM community that LLMs can do SOTA compression. We believe it is important to disseminate this to the ML community rather than the IT community, because additional work is required from the ML community to make these practical, and this may have a significant impact on the future of compression in many scenarios. As quantization and other techniques to accelerate LLM inference become better, we believe this complexity can be a lot more manageable. There is scope to engineer better solutions.\n\n> 5. How does the performance of LLMZip vary when using aligned LLMs, e.g., Vicuna or fine-tuned Llama2? \n6. How does the performance of LLMZip vary when using LLMs with various scales, e.g., 13B or 65/70B?\n\nWe haven’t tried LLMZip with LLMs other than LLaMa1 and LLaMa2, as we believe they suffice to show that pre-trained LLMs do indeed offer substantial compression improvements.\n\n> 7. What does the end-to-end running time of LLMZip look like when compared to Zlib?\n\nThe run times for 100K tokens is 10 hrs for 512 context length and 35 mins for a context length of 32, while zlib does it in less than a second. While these are clearly not impressive run times, these are just out-of-the-box applications, with a lot of scope to be improved. It is also worth noting that 32 context length LLM still significantly outperforms Zlib compression. We do not have runtime comparisons for the other SOTA algorithms like paq8h or bsc.\n\nWe hope this addresses your concerns and we look forward to your further feedback.\n\nDear Reviewer,\n\nThank you for your valuable feedback and insightful queries regarding our work. We would like to address each point you have raised in the review.\n\n> 1. What are the baseline results mentioned in Table 1? I would suggest the authors include more introductions about the baseline methods and their performances. \n\nIn Table 1, we presented results for different encoding schemes which have been explained in sections 2.1.1, 2.1.2, and 2.1.3, and the entropy bound was presented in section 2.2. We compare our results to ZPAQ and PAQ8h in the discussion of the results (section 4.1). The [...]\n\nDear Reviewer,\n\nWe are grateful for the time and effort you have invested in reviewing our work. However, we believe the reviewer has overlooked the main contributions of the paper and the significance of the results. \n\n> 1. The concept of compressing text with pre-trained language models is not groundbreaking. The paper's attempt to innovate using the advanced LLaMa2 as an LLM seems to lack strong novelty.\n\n“Groundbreaking” is a relative term and we cannot argue with the reviewer’s view of what is groundbreaking. There are two important results in this paper that need to be disseminated to th [...]", + "initial_scores": [ + 3, + 6, + 6 + ], + "score_mean": 5.0, + "score_variance": 3, + "score_spread": 3, + "score_min": 3, + "score_max": 6, + "decision": "Reject", + "rebuttal_validity_ground_truth": false, + "meta_review": "This paper presents LLMZip algorithm that uses arithmetic coding and LLM to do text compression. This is not surprising as the conditional probabilities produced by the LLM can be very informative. The authors also presents a new estimate of asymptotic upper bound for English.\n\nStrength:\n1. An important application of LLM for text compression.\n2. A new estimate of asymptotic upper bound for English.\n\nWeakness:\n1. Novelty is quite limited as it is well expected that LLM can provide very accurate predictive probabilities.\n2. It is computationally very expensive to do for the purpose of text compression using large language models. Unless it is significantly better than other approaches, the impact is limited as well.", + "forum_id": "jhCzPwcVbG", + "primary_area": "general machine learning (i.e., none of the above)", + "n_reviews": 3, + "per_review": [ + { + "reviewer": "Reviewer_fbKB", + "review_id": "A1Q5LpkhER", + "scores": { + "rating": 3, + "soundness": 2, + "presentation": 1, + "contribution": 1, + "confidence": 4 + }, + "review_text_chars": 1747, + "edit_detected": true, + "edit_delta_seconds": 992204, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_1ivF", + "review_id": "orMCeKaOjX", + "scores": { + "rating": 6, + "soundness": 3, + "presentation": 3, + "contribution": 3, + "confidence": 3 + }, + "review_text_chars": 1273, + "edit_detected": true, + "edit_delta_seconds": 1024243, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + }, + { + "reviewer": "Reviewer_o5QE", + "review_id": "efqsRW0UZR", + "scores": { + "rating": 6, + "soundness": 2, + "presentation": 2, + "contribution": 2, + "confidence": 3 + }, + "review_text_chars": 2143, + "edit_detected": true, + "edit_delta_seconds": 2267628, + "post_rebuttal_text_signal": false, + "score_mentions_in_text": [] + } + ], + "any_review_edit_detected": true, + "any_post_rebuttal_text_signal": false, + "review_score_dimensions": [ + "rating", + "soundness", + "presentation", + "contribution", + "confidence" + ] +} \ No newline at end of file diff --git a/open_review/iclr2024_8834.md b/open_review/iclr2024_8834.md new file mode 100644 index 0000000000000000000000000000000000000000..232216d3f3c7d3c960ac64a5b04264139c2db9ad --- /dev/null +++ b/open_review/iclr2024_8834.md @@ -0,0 +1,304 @@ + + +## LLMZIP: LOSSLESS TEXT COMPRESSION USING LARGE LANGUAGE MODELS + +Authors withheld for review + +## ABSTRACT + +We design a lossless compression algorithm for compressing English text by using the large language model LLaMA2-7B as a predictor for the next token given a window of past tokens. Specifically, the proposed LLMZip algorithm uses the conditional probabilities at the output of the large language model in conjunction with Arithmetic Coding. Our algorithm outperforms state-of-the-art text compression schemes such as BSC, ZPAQ, and paq8h. We show that it is possible to marginally improve the compression performance further by first extracting a summary from the document and compressing the text by conditioning on the summary. Finally, we investigate the compression performance of LLMZip when the summary (side information) is available both at the encoder and decoder. We show that the LLM is able to exploit the available side information to significantly improve the compression performance. As an important byproduct, we provide new estimates of an asymptotic upper bound on the entropy of English which is significantly smaller than currently available estimates. + +## 1 INTRODUCTION + +There are close connections between learning, prediction, and compression. The success of ChatGPT has captured the fascination of the general public and brought the connection between learning and prediction to the fore. The main advance brought about by large language models such as LLaMA and GPT-4 is that they excel at predicting the next token in a text corpus, conditioned on knowing the past tokens within the context window. + +The connection between prediction and compression was explored as early as 1951 by Shannon in order to estimate the entropy of the English language (Shannon (1951)). The idea that a good predictor for the _i_ th value in a time series based on the past values can be effectively converted to a good compression algorithm has played a prominent role in information theory. Many algorithms for speech, image, and video compression exploit this notion, either explicitly or implicitly. The performance of such a compression scheme depends substantially on the efficacy of the predictor and every time there is a major advance in the prediction capability, it behooves us to study its effect on the compression performance. For lossless text compression, the idea of combining a language model with arithmetic coding has been shown to be effective (MacKay (2003)). Indeed, the authors in Goyal et al. (2018) use recurrent neural networks (RNN) as predictors, and they report improved results for certain types of source. Their scheme still did not outperform state-of-the-art algorithms such as BSC and ZPAQ for text compression. + +Given the recent release of large language models such as the LLaMA models Touvron et al. (2023a),Touvron et al. (2023b), this is an opportune time to study whether one can obtain better compression results and sharper estimates of the entropy of the English language. This is the main goal of this paper. + +## 1.1 CONTRIBUTIONS + +We study the compression performance of using a foundational model (LLaMA2-7B) in conjunction with entropy coding for lossless text compression, and the resulting suite of compression algorithms are broadly termed as LLMZip. We refer to the combination of using a large language model for predictive modeling followed by using arithmetic coding for entropy coding as the LLM+AC algo- + +1 + +rithm. With the LLaMA2+AC algorithm, we obtain a compression ratio of 0.6936 bits/character on a 1MB section of the text8 dataset and a compression ratio of 0.7741 bits/character on a 200KB section of a text from a book that was released on Project Gutenberg after the release of LLaMA2 Cooke & Reed (2023). These compression ratios are significantly better than the compression ratio obtained using state-of-the-art text compressors such as BSC, ZPAQ and pq8h on the full 100MB of the text8 dataset. This paper is the first to demonstrate that excellent compression can be obtained using LLMs for compressing text that was not part of the training corpus. + +We show that when the LLaMA2-7B large language model is used as the predictor, the asymptotic upper bound on the entropy is 0.692 bits/character when estimated using a 1MB section of the text8 dataset. This is smaller than earlier estimates provided in Cover & King (1978) and (Lutati et al., 2023, Table 4). The estimate of the upper bound increases to 0.77 bits/character for a 200 KB section of the text from Cooke & Reed (2023), which is still lower than the estimates in Lutati et al. (2023). + +We introduce the idea of compressing text by first creating a summary and then conditioning on the summary to compress the text using the LLM+AC algorithm. We show that this provides marginal improvement to the compression ratio. + +Finally, we study the compression performance of LLM+AC when side information such as a short summary of the text is present both at the encoder and decoder, and we show that the LLM is able to exploit the presence of side information to improve the compression performance significantly compared to when the side information is absent. + +## 1.2 RELATED WORK + +There is a rich body of literature that combines predictive modeling with entropy coding for obtaining lossless compression MacKay (2003). In particular, the use of predictive modeling with arithmetic coding dates back to the 1980s Cleary & Witten (1984); Witten et al. (1987); Willems et al. (1995). Neural networks such as fully connected neural networks and LSTMs have been used for predictive modeling, and they have been used in conjunction with arithmetic coding for lossless text compression in Mahoney (2000); Goyal et al. (2018). Using transformers for obtaining general purpose compression was considered in Mao et al. (2022),Bellard (2021). Recently, work that appeared soon after our report[1] Del´etang et al. (2023) showed that a large language model Chinchilla can be used in conjunction with arithmetic coding to obtain similar compression performance to what is reported in this paper. They report the surprising result that a large language model trained on text data is also effective at compressing images and speech. Transformers have also been used in conjunction with arithmetic coding for compressing audio in D´efossez et al. (2022). + +## 2 PREDICTIVE MODELING AND COMPRESSION USING LLMS + +Let **s** denote a sentence from the English language composed of _Nc_ letters, where each letter is assumed to be from the alphabet _S_ . We assume that we have a dictionary _X_ = [1 _, D_ ] of _D_ tokens. We first parse **s** into a sequence of _NT_ tokens denoted by **x** = _x_ 1 _, x_ 2 _, . . . , xi−_ 1 _, xi, xi_ +1 _, . . . xNT_ , where _xi ∈X_ . There is a one-to-one mapping between **s** and **x** and hence, compressing **s** is the same as compressing **x** . In this context, token _xi_ can be thought of as realizations of the random variable denoted by the upper case letter _Xi_ . + +A language model with memory _M_ is a predictor that operates as follows. At epoch _i_ , it accepts tokens _xi−M , xi−M_ +1 _, . . . , xi−_ 1 and produces a probability mass function (PMF) for the next token in the sequence, conditioned on the past _M_ tokens; we denote the ensuing conditional distribution by _qi_ ( _xi_ ) := Pr( _Xi_ = _xi|xi−_ 1 _, xi−_ 2 _, . . . , xi−M_ ). The conditional PMF vector at epoch _i_ , namely **q** _i_ , is input to a lossless compression algorithm along with the actual sequence that needs to be compressed. The lossless compression algorithm produces a sequence of _Nb_ compressed bits. A schematic of this scheme is shown in Fig. 1. + +The main metric of interest is the compression ratio _ρ_ defined as + +**==> picture [94 x 22] intentionally omitted <==** + +> 1We are not citing our own technical report due to double-blind requirements. + +2 + +**==> picture [370 x 104] intentionally omitted <==** + +**----- Start of picture text -----**
+q i [= Pr(] [X][i] [=] [ j][|][x][i] i− [−][M] 1 [)] Losseless Nb bits
Tokens . . . , xi−M , . . . , xi− 1 LLM Compression
Tokenizer
Input sentence s with Nc characters
**----- End of picture text -----**
+ +Figure 1: Schematic showing the prediction at epoch _i_ . + +## 2.1 ENCODING SCHEMES + +We consider three schemes for the lossless compression block in Fig. 1. + +## 2.1.1 COMPRESSING THE RANKS USING ZLIB + +sorted PMF vector byFirst, the PMF vector **qq** ˜ _ii_ .:=Let[ _q γi_ (1) _i_ : _X, qi→X_ (2) _, . . . , q_ be a permutation on the integers from 1 to _i_ ( _D_ )][T] is sorted in descending order; we denote the _D_ such that + +## ˜ _qi_ ( _γi_ ( _j_ )) = _qi_ ( _j_ ) _, ∀j ∈X ._ + +That is, _γi_ ( _j_ ) is the rank of the token _j_ at epoch _i_ . We define the rank of the input sequence at epoch _i_ as the rank of the token _xi_ at epoch _i_ , _ri_ := _γi_ ( _xi_ ). The sequence _{ri}[N] i_ =1 _[T]_[is][compressed][by][a] lossless compression algorithm (such as zlib) to produce _Nb_ bits which are the final bit representation of the input sequence. The first scheme uses the zlib compression algorithm to encode the sequence of ranks. We refer to this scheme as LLaMA+zlib and denote the compression ratio of this scheme by _ρ_ LLM+zlib. + +## 2.1.2 TOKEN-BY-TOKEN COMPRESSION + +The second scheme uses a token-by-token lossless compression scheme which uses a time-varying codebook to encode the token _xi_ at epoch _i_ . The time-varying codebook is formed using a prefixfree code designed under the assumption that _qi_ is the true token distribution. A natural choice for the prefix-free code is a Huffman code. Instead, for simplicity, we adopt a prefix-free code where the codeword for the token _xi_ is of length _li_ = _⌈_ log2 _qi_ (1 _xi_ ) _[⌉]_[.][A prefix-free code with this length for] _xi_ is guaranteed to exist since this choice of lengths satisfies the Kraft inequality Cover & Thomas (1999). The compression ratio for this scheme, denoted by _ρ_ LLM+TbyT, is given by + +**==> picture [132 x 47] intentionally omitted <==** + +## 2.1.3 ARITHMETIC CODING + +The above two schemes are intuitive, but their performance can be improved. A very effective way to combine the output of the LLM with a lossless compression scheme is by using arithmetic coding Rissanen & Langdon (1979); Bell et al. (1989); Cleary & Witten (1984). Arithmetic coding is well suited to accept time-varying probabilities, and we use _qi_ ( _xi_ ) as the probability of token _xi_ at epoch _i_ in the arithmetic coding scheme. Figure 2 shows a schematic of how the encoding procedure works when using Arithmetic Coding. We denote **Q** _i_ as the conditional cumulative mass function (CMF) vector at epoch _i_ , with _Qi_ ( _j_ ) =[�] _[j] k_ =1 _[q][i]_[(] _[k]_[)][.][In][Arithmetic][Coding,][an][interval] _Bi_ := [ _Bi,min, Bi,max_ ) is maintained and updated at epoch _i_ . We start with the initial condition _B_ 0 = [0 _,_ 1) and during the _i_ th epoch, we update _Bi_ according to + +**==> picture [317 x 25] intentionally omitted <==** + +3 + +**==> picture [345 x 245] intentionally omitted <==** + +Figure 2: Schematic showing the working of LLM in conjunction with an Arithmetic coder for encoding a sequence of tokens in LLMZip. + +where _xi_ is the token in the input text at epoch _i_ that is to be encoded and _Qi_ (0) is set to zero _∀i_ . At the end of the token sequence, any real number _C_ that lies in the interval _BNT_ is selected and the binary representation of _C_ is selected as the compressed bit sequence corresponding to the sequence of input tokens. In the illustrative example shown in Fig. 2, the binary representations of _Bi,min_ and _Bi,max_ are shown in the figure. At the final stage the binary representations corresponding to _BNT ,min_ and _BNT ,max_ are 01100010001 and 01100010011, respectively and the final bit representation is 01100010010, which lies in _BNT_ . Note that in this example, encoding the first token fixes the first two bits of the final bit sequence, while encoding the second token fixes the next three bits. + +The decoder also uses the same LLM (with the same parameters) as the encoder. Decoding begins by inputting the start token to the LLM at time _i_ = 1 and computing **Q** 1. Then, the decoded symbol _x_ 1 is given by the _j_ for which _C ∈_ [ _Q_ 1( _j −_ 1) _, Q_ 1( _j_ )). We maintain an interval _B_ 1 at the decoder and update it using equation 1 and equation 2. Then, we add _x_ 1 to the context window and proceed to compute **Q** 2. Thus, the decoder can mimic the same operations of the encoder to produce _Qi_ during epoch _i_ and determine _xi_ as the symbol _j_ for which _C ∈_ [ _Bi−_ 1 _,min_ +( _Bi−_ 1 _,max −Bi−_ 1 _,min_ ) _Qi_ ( _j −_ 1) _, Bi−_ 1 _,min_ + ( _Bi−_ 1 _,max − Bi−_ 1 _,min_ ) _Qi_ ( _j_ )). The decoder then updates _Bi_ . The decoder can also work in a streaming fashion, but we don’t discuss this further. + +We refer to the compression ratio of this scheme as _ρ_ LLM+AC. It is known that arithmetic coding is nearly optimal as a compression scheme (MacKay, 2003, Page 115). Hence, the compression ratio for this scheme is expected to be + +**==> picture [257 x 47] intentionally omitted <==** + +Values _ρ_ LLM+zlib, _ρ_ LLM+TbyT, and _ρ_ LLM+AC provide upper bounds on _H_ ( **S** ). + +## 2.2 ENTROPY BOUNDS + +This section explores entropy bounds more rigorously. Let **S** _∈S[∞]_ be a random process that represents language input. The _n_ th character in the sequence is denoted by _Sn_ , whereas the string + +4 + +of characters from the beginning to the _n_ th character is expressed as **S** _n_ . The tokenizer parses the input string and maps it to a sequence of tokens **X** = _X_ 1 _, X_ 2 _, . . ._ using a variable-length mapping. In this sequence, _Xi_ is the _i_ th token. The number of characters employed to generate _Xi_ depends on the realization of the random process and, as such, we introduce random variable _Bi_ to identify the number of characters contained in the _i_ th token. Motivated by practical considerations, we only admit tokenizers for which _Bi ≥_ 1 and _Bi_ is uniformly bounded, with _Bi < B < ∞_ ; these are characteristics of commonly used tokenizers. An immediate consequence of this framework is that, as the number of tokens grows unbounded _NT →∞_ , the number of characters must also approach infinity _Nc →∞_ . Formally, consider the tokenizer function _T_ : _S_[N] _→X_[N] operating on infinite symbol sequences; that is, _T_ ( **s** ) = **x** where **s** is an infinite sequence in _S[∞]_ . For natural number, _i ∈_ N, define _mi_ : _S_[N] _→_ N to be the (time) index during which the tokenizer working sequentially on an input sequence **s** outputs its _i_ th token. Specifically, suppose **s** is given, then + +**==> picture [274 x 15] intentionally omitted <==** + +We note that, by construction, lim _n→∞_ length ( _T_ ( **s** _n_ )) = _∞_ and, as such, _mi_ ( _·_ ) is well-defined. It may be pertinent to stress that the tokenizer function applied to truncated sequences is not necessarily injective because multiple finite input series can map to the same output. This phenomenon is a consequence of the fact that, at any point in time, a tokenizer working sequentially may be waiting for an additional symbol before it can unambiguously select the next output token, i.e., there may be instances where _T_ ( **s** _n_ ) = _T_ ( **s** _n_ +1). However, if we restrict the input series to input indices when a new token is produced, then the restricted mapping becomes injective. That is, suppose _T_ ( **s** ) = **x** , then the only (finite) series of input symbols in the restricted set for which _T_ ( **y** _n_ ) = **x** _i_ is **s** _mi_ ( **s** ). Given a fixed sequence **s** , we can express the number of characters contained in a token as + +**==> picture [92 x 11] intentionally omitted <==** + +with initial condition _m−_ 1 = 0. Consequently, the number of characters embedded in the first _NT_ tokens for a random input becomes _Nc_ =[�] _[N] i_ =1 _[T][B][i]_[.] + +Having established these properties, we turn to the relation between _H_ ( **S** ) and _H_ ( **X** ). We make the assumption that _{Sk}[∞] k_ =1[,] _[{][B][i][}][∞] i_ =1[,][and] _[{][X][i][}][∞] i_ =1[are][stationary][and][ergodic][processes.][We][know] from the Shannon-McMillan-Breiman Theorem Cover & Thomas (1999) that + +**==> picture [347 x 22] intentionally omitted <==** + +Let Ω **S** be the collection of _ω ∈_ Ω for which this limit holds. In an analogous manner, the ShannonMcMillan-Breiman theorem implies + +**==> picture [348 x 21] intentionally omitted <==** + +Define Ω **X** as the collection of _ω ∈_ Ω for which this limit holds. Finally, by construction, we have + +**==> picture [275 x 22] intentionally omitted <==** + +Set Ω _B_ to be the set of _ω ∈_ Ω for which this limit holds. For any _ω ∈_ Ω **S** _∩_ Ω **X** _∩_ Ω _B_ , we deduce that + +**==> picture [216 x 101] intentionally omitted <==** + +The first equality follows from equation 5. The second equality is a consequence of the fact that _{li_ = _mi_ ( **S** ( _ω_ )) _|i ∈_ N _}_ is an infinite subset of the natural numbers. Since a subsequence of a convergent sequence must converge to the same limit, we immediately gather that this alternate form + +5 + +approaches _H_ ( **S** ). The third equality is a consequence of the equivalence between the following two events, + +_{ω ∈_ Ω _|_ **X** _i_ ( _ω_ ) = **x** _i}_ = _{ω ∈_ Ω _|T_ ( **S** _mi_ ( **S** ( _ω_ ))) = **x** _i}._ + +This is characteristic of the tokenization process, and it is a consequence of the correspondence described above. The last step holds because we are considering an _ω ∈_ Ω _B_ . The sets Ω **S** , Ω **X** , and Ω _B_ each have probability one; this implies that their intersection also has probability one, Thus, we must conclude that + +**==> picture [132 x 25] intentionally omitted <==** + +As a corollary to this result, any upper bound on _H_ ( **X** ) produces an upper bound on _H_ ( **S** ). This is the property we wish to exploit. + +Then, from the results of Cover & King (1978), we can see that + +**==> picture [302 x 31] intentionally omitted <==** + +where _qi_ ( _·_ ) is the output PMF from the language model. Therefore, an asymptotic upper bound on the entropy rate _H_ ( **S** ) is given by + +**==> picture [290 x 29] intentionally omitted <==** + +We refer to the expression in the right-hand side of equation 9 as the asymptotic upper bound on _H_ ( **S** ) and denote it by _Hub_ . The numerator in equation 9 represents the average number of bits required to represent the tokens **X** _NT_ , and the denominator in equation 9 is the average number of characters per token. Hence, the unit for _H_ ( **S** ) is bits/character. In Cover & King (1978), the authors offer 1.3 bits/character as an estimate of the asymptotic upper bound on _H_ ( **S** ). They also provide an extensive list of references and a discussion of the literature on estimating the entropy of English prior to 1976. Very recently, in (Lutati et al., 2023, Table 4), the performance of several language models have been evaluated on the text8 dataset using a metric called bits per character (bpc). The bpc metric in Lutati et al. (2023) is the same as the asymptotic upper bound in this paper. + +It is important to emphasize that _Hub_ , _ρ_ LLaMA+zlib, _ρ_ LLaMA+TbyT, and _ρ_ LLM+AC are estimated using a finite number of tokens; the statistical properties of such estimates should be kept in mind when interpreting the results, especially since the tokens are from a very large alphabet and the language model has a large memory. + +## 3 LLM-BASED COMPRESSION WITH SIDE INFORMATION + +In this section, we discuss the value of side information in the form of a summary of the text, when it is available either during compression alone, or both during compression and decoding. + +## 3.1 SUMMARY AVAILABLE AT THE ENCODER + +We first consider the case where the text is compressed by conditioning on a summary, which is generated at the encoder. Let **S** denote the text to be compressed and let _g_ ( **S** ) denote a function of the text such as, for example, a summary. The joint entropy of **S** and _g_ ( **S** ) can be decomposed in two different ways, + +**==> picture [323 x 25] intentionally omitted <==** + +Above, equation 11 follows from equation 10 because _g_ ( _·_ ) is a deterministic function and, hence, _H_ ( _g_ ( **S** ) _|_ **S** ) = 0. Intuitively, the implication of equation 11 is that it is (nearly) optimal to compress **S** by using _H_ ( _g_ ( **S** )) bits to compress _g_ ( **S** ) and using _H_ ( **S** _|g_ ( **S** )) bits to compress **S** by conditioning on _g_ ( **S** ). An optimal universal compression algorithm may implicitly leverage these notions and, when such an algorithm is available, there is no discernible benefit to explicitly taking this two-step + +6 + +approach. Yet, LLM-based compressors are not necessarily universally optimal – particularly for finite context window lengths and, therefore, their gap to optimality may be different depending on whether we compress **S** with or without conditioning on _g_ ( **S** ). Although the English language is often modeled as an ergodic random process, a finite length of English text may exhibit substantial variations in its statistical properties based on the underlying context. In this case, _g_ ( **S** ) can act as the hidden context, and, hence, the two-step approach can aid in the compression of **S** . + +We perform compression using the summary _g_ ( **S** ) as follows. The summary _g_ ( **S** ) is parsed into a sequence of tokens denoted by **y** . We first use LLM+AC to compress _g_ ( **S** ) and obtain _Ng_ compressed bits for the summary. Then, the LLM+AC algorithm is adapted to compress the text **S** such that at each epoch _i_ , we pass the summary tokens **y** , along with the past _M_ tokens to the LLM, to obtain PMF vectora conditional **q** ˜ _i_ PMFis then passed to the arithmetic coder, which produces a sequence of _q_ ˜ _i_ ( _xi_ ) := Pr( **X** _i_ = _xi|_ **y** _, xi−_ 1 _, xi−_ 2 _, . . . , xi−M_ ) _, ∀xi ∈X_ . The _Nb_ conditionalbits. At the decoder, the summary is first decoded and then added to the context window similar to what is done at the encoder. The compression ratio ( _ρ_ ˜) of this scheme is _ρ_ ˜ = _[N][g] N_[+] _c[N][b]_ , where _Nc_ is the number of characters in the text **s** alone. + +It should be noted that compressing _g_ ( **S** ) requires an additional _Ng ≥ H_ ( _g_ ( **S** )) bits. Therefore, the gain in compressing **S** by conditioning on _g_ ( **S** ) should exceed _Ng_ bits for the two-step approach to be beneficial. In Section 4, we show that this is indeed the case in some cases. + +## 3.2 SUMMARY AVAILABLE AT BOTH THE ENCODER AND DECODER + +We next consider the compression performance of LLM+AC when _g_ ( **S** ) is available as side information to both the encoder and the decoder. Since _H_ ( **S** _|g_ ( **S** )) _≤ H_ ( **S** ), we expect an improvement in the compression performance if LLM+AC can exploit the side information, . As in Sec. 3.1, the side information is added to the beginning of the context window for all _i_ . The difference from Sec. 3.1 lies in the fact that _g_ ( **S** ) does not have to be compressed since it is available at the decoder. + +## 4 RESULTS + +We used the two versions of the LLaMA foundation models, which are LLaMA-7B Touvron et al. (2023a) and LLaMA2-7B Touvron et al. (2023b) as the large language models for our results. We will refer to them as LLaMA and LLaMA2, respectively. + +It should be noted that the tokenizer and the model are trained on a large corpus of text which includes uppercase letters, special characters, etc. This is in contrast to many studies on estimating the entropy of English, where the input alphabet is restricted to lowercase letters such as in Shannon (1951); Cover & King (1978); Goyal et al. (2018). This makes it difficult to perform an entirely fair comparison between these models. By using a pre-trained LLM on an input consisting only of lowercase letters, we may be unfair to the LLM. We will show that LLM-based compression has excellent performance regardless of this issue. + +## 4.1 COMPRESSION PERFORMANCE WHEN USING LLAMA MODELS ON TEXT8 DATASET + +In our first experiment, we used the text8 dataset available from [URL removed] dc/text8.zip to benchmark the performance of LLaMA2 with compression against other stateof-the-art results for text compression. In Goyal et al. (2018), it is mentioned that the ZPAQ algorithm obtains the best compression ratio for the text8 dataset with a compression ratio of 1.4 bits/character. In Mahoney (2011), the paq8h algorithm provides a compression ratio of 1.2 bits/character. To the best of our knowledge, this appears to be the best performance reported. Therefore, we used these two algorithms as baselines. We did not independently run the ZPAQ or paq8h algorithms; we are quoting results from the existing literature. + +The performance of LLaMA2 is shown in Table 1 for various memory( _M_ ) lengths. It can be seen that using LLaMA2 with Arithmetic Coding and a memory of 511 results in a compression ratio of 0.6936 bits/character. This is substantially better than the state-of-the-art results mentioned in Goyal et al. (2018) or Mahoney (2011) and is very close to our computed upper bound. The performance with the LLaMA2+zlib algorithm and LLaMA2+TbyT compression is also better than that of the + +7 + +known state-of-the-art results. Table 1 also shows the upper bound in equation 9. It should be noted that the upper bound on the entropy is lower than that computed by Shannon in Shannon (1951), Cover and King in Cover & King (1978) and more recent estimates based on neural networks in Lutati et al. (2023). It can be seen that the compression performance improves with increasing _M_ . + +We included the performance of LLaMA+AC in the last column, and we can observe that using LLaMA2 indeed improves the performance across all memory lengths. We also observed that the inference time scaled approximately linearly with the input memory length, i.e., batches with a memory of 511 tokens ran about 16 times slower than batches with a memory of 31 tokens. + +Table 1: Compression performance of LLMZip on text8 dataset as a function of its memory ( _M_ ) + +|_M_|_Nc_|_Nt_|_H_ub
(bpc)|_ρ_LLaMA2+zlib
fle size (bits)|_ρ_LLaMA2+TbyT
(bpc)|_ρ_LLaMA2+AC
(bpc)|_ρ_LLaMA+AC
(bpc)| +|---|---|---|---|---|---|---|---| +|31|4_,_568_,_855|1_,_000_,_000|0_._8955|1_._2963|1_._0241|**0**_._**8962**|0_._9145| +|127|4_,_568_,_855|1_,_000_,_000|0_._7343|1_._1104|0_._8685|**0**_._**7352**|0_._752| +|255|4_,_568_,_855|1_,_000_,_000|0_._708|1_._0792|0_._8435|**0**_._**7089**|0_._725| +|511|4_,_568_,_855|1_,_000_,_000|0_._6927|1_._061|0_._8292|**0**_._**6936**|0_._7101| + +Note that we did not run the LLaMA models on the entire 100MB of the text8 dataset due to compute limitations. Hence, the comparison with the state-of-the-art corresponds to estimates obtained from different input sizes. Also, since the text8 dataset is derived from Wikipedia on which LLaMA models were trained, it is likely that our results for the text8 dataset are optimistic. We next test on a problem for which we are certain that the LLaMA models were not trained. + +## 4.2 COMPRESSION PERFORMANCE WHEN USING LLAMA2 ON A RECENT BOOK + +We study the performance of LLaMA2 on a recently released (Sep 20, 2023) book Cooke & Reed (2023) under Project Gutenberg, which appeared after LLaMA2 was published. We extracted text that corresponds to 50,000 tokens. We applied the same text pre-processing as used in the text8 dataset to clean the text from the book. The resulting text data contained only lowercase letters and space as in the text8 dataset. Table 2 shows the compression performance of the LLM on the book. It can be seen that the compression ratios and the entropy upper bound are slightly higher compared to the performance on the text8 dataset; nevertheless, the asymptotic upper bound on the entropy is lower than that of currently known models given in (Lutati et al., 2023, Table 4)). Similarly, the compression ratios of LLaMA2-based compressors are better than those of known state-of-the-art results for the text8 dataset. The compression ratio for LLaMA2 with arithmetic coding is only 0.7741 bits/character and is very close to the estimated upper bound on _H_ ( **S** ). + +Table 2: Compression performance of the LLaMa2 + AC on a recently published book in Project Gutenberg Cooke & Reed (2023), as a function of its memory ( _M_ ) + +|_Nc_|_Nt_|_H_ub
(bpc)|_ρ_LLaMA2+zlib
(bpc)|_ρ_LLaMA2+TbyT
(bpc)|_ρ_LLaMA2+AC
(bpc)|Standalone Zlib
(bpc)| +|---|---|---|---|---|---|---| +|210_,_682|48_,_921|1_._0974|1_._5571|1_._2296|1_._0977|2_._55| +|210_,_682|48_,_921|0_._8544|1_._2783|0_._9941|0_._8552|2_._55| +|210_,_682|48_,_921|0_._8047|1_._2213|0_._9474|0_._8054|2_._55| +|210_,_682|48_,_921|0_._7733|1_._1826|0_._9172|0_._7741|2_._55| + +To provide some insight into the comparative performance of LLaMA2 based compressors visa-vis standard text compressors, we also ran the zlib algorithm directly on the input text. The resulting compression ratio was 2.55 bits/character (shown in the last column). It is clear that the performance of LLaMA2 based compressors is substantially better than this. The zlib algorithm + +8 + +may not be optimized for compressing small text samples and hence, the compression ratio for the zlib algorithm and the LLaMA2+zlib will likely improve on longer texts. + +## 4.3 COMPRESSION PERFORMANCE OF LLAMA2 MODELS ON A RESEARCH PAPER BY USING A SUMMARY OF THE PAPER + +In Table 3, we report the compression performance of LLaMa2 + AC on a recently published research paper Li et al. (2023) in arXiv. We evaluate six different texts as summaries which include the paper’s abstract, the first paragraph in the introduction, and four summaries of varying lengths that were generated using GPT-4. We compress the Latex source code available for the paper and do not include the abstract as part of the compression. We observe that when the summary is available as side information at both the encoder and decoder, the compression ratio ( _ρLLaMa_ 2+ _AC_ ), always improves. It’s worth noting that Summary 3 and Summary 4 offer the maximum improvements compared to others, and yet Summary 3 is roughly half the size of that of Summary 4. We further noted that Summary 3 is less compressible than Summary 2, which suggests that it is more informative. It is also worth noting that Paragraph 1 offers the least improvement, indicating the improvements are indeed due to the conditioning of a valid summary, and conditioning on just a paragraph may not yield significant improvements. + +For the case when the summary is only available at the encoder, we only get a marginal improvement in the compression ratio denoted by _ρ_ ˜ _LLaMa_ 2+ _AC_ . Summary 3 offers the best compression ratio, while Summary 4 and Paragraph 1 have compression ratios worse than the no summary case. + +Conditioning on summaries is much less computationally expensive than using an LLM with a larger memory _M_ . This is because the summaries are fixed text, at a fixed position and hence the corresponding keys, queries, and values can be computed once and reused for the subsequent attention mechanisms in each epoch. This is not the case when the LLM has larger _M_ , as for every stride across the text, the positional encodings change and hence the keys and values of the tokens present in previous epochs cannot be reused. + +Table 3: Compression performance of LLaMa2 +AC with summary and M = 511 on a recently published paper in arXiv Li et al. (2023) + +|_Type_|Summary|Summary|Summary|Text|Text|Text|_Ng_+_Nb_|_ρLLaMa_2+_AC_
(bpc)|˜_ρLLaMa_2+_AC_
(bpc)| +|---|---|---|---|---|---|---|---|---|---| +||_Ntg_|_Ncg_|_Ng_|_Nt_|_Nc_|_Nb_|||| +|No Summary|0|0|0|12578|43787|26354|26354|0_._6019|0_._6019| +|Abstract|252|1312|662|12578|43787|25596|26258|0_._5846|0_._5997| +|Summary 1|219|1095|611|12578|43787|25612|26223|0_._5849|0_._5989| +|Summary 2|473|2233|1281|12578|43787|24836|26117|0_._5672|0_._5965| +|Summary 3|428|1918|1375|12578|43787|24370|25745|0_._5566|0_._5880| +|Summary 4|945|4919|2228|12578|43787|24328|26556|0_._5556|0_._6064| +|Paragraph 1|281|1255|931|12578|43787|26190|27121|0_._5981|0_._6194| + +## 5 CONCLUSION + +In this paper, we introduced a suite of lossless text compression algorithms that use an LLM (LLaMA2-7B) in conjunction with entropy coding. The LLM is used to predict the next token given a window of past tokens as memory. Our suite of algorithms outperforms state-of-the-art compression algorithms like BSC, ZPAQ and paq8h. We obtained our best result when using LLaMA2-7B with arithmetic coding and a memory of 512 tokens. We also observed that LLMs with greater memory length showed better performance. Additionally, we provided estimates of an asymptotic upper bound on the entropy of English, which are significantly smaller than those found in prior work. Finally, we showed that when using LLaMA2 + AC for compressing a document, a marginal performance improvement can be obtained by first extracting a summary of the document, and compressing the document by conditioning on this summary. We also show that when such a summary is available at both the encoder and decoder a significant performance improvement can be obtained. + +9 + +## REFERENCES + +- Timothy Bell, Ian H Witten, and John G Cleary. Modeling for text compression. _ACM Computing Surveys (CSUR)_ , 21(4):557–591, 1989. + +Fabrice Bellard. Nncp v2: Lossless data compression with transformer. 2021. URL https: //api.semanticscholar.org/CorpusID:231917764. + +John Cleary and Ian Witten. Data compression using adaptive coding and partial string matching. _IEEE transactions on Communications_ , 32(4):396–402, 1984. + +- Alfred Hands Cooke and Frederick Richard Cowper Reed. _The Cambridge natural history, Vol. 03 (of 10)_ . New York: MacMillan and Co., 1895.; Project Gutenberg, Sep 20, 2023, 2023. [URL removed] + +Thomas Cover and Roger King. A convergent gambling estimate of the entropy of english. _IEEE Transactions on Information Theory_ , 24(4):413–421, 1978. + +Thomas M Cover and Joy A Thomas. _Elements of Information Theory_ . Wiley, New York, 1999. + +- Gr´egoire Del´etang, Anian Ruoss, Paul-Ambroise Duquenne, Elliot Catt, Tim Genewein, Christopher Mattern, Jordi Grau-Moya, Li Kevin Wenliang, Matthew Aitchison, Laurent Orseau, Marcus Hutter, and Joel Veness. Language modeling is compression, 2023. + +- Alexandre D´efossez, Jade Copet, Gabriel Synnaeve, and Yossi Adi. High fidelity neural audio compression, 2022. + +- Mohit Goyal, Kedar Tatwawadi, Shubham Chandak, and Idoia Ochoa. Deepzip: Lossless data compression using recurrent neural networks. _arXiv preprint arXiv:1811.08162_ , 2018. + +- Cheng Li, Mingyang Zhang, Qiaozhu Mei, Yaqing Wang, Spurthi Amba Hombaiah, Yi Liang, and Michael Bendersky. Teach llms to personalize – an approach inspired by writing education, 2023. + +- Shahar Lutati, Itamar Zimerman, and Lior Wolf. Focus your attention (with adaptive IIR filters), 2023. + +- David JC MacKay. _Information theory, inference and learning algorithms_ . Cambridge university press, 2003. + +Matt Mahoney. text8 results. [URL removed] 2011. + +Matthew V Mahoney. Fast text compression with neural networks. In _FLAIRS conference_ , pp. 230–234, 2000. + +- Yu Mao, Yufei Cui, Tei-Wei Kuo, and Chun Jason Xue. Trace: A fast transformer-based generalpurpose lossless compressor. In _Proceedings of the ACM Web Conference 2022_ , pp. 1829–1838, 2022. + +- Jorma Rissanen and Glen G Langdon. Arithmetic coding. _IBM Journal of research and development_ , 23(2):149–162, 1979. + +- Claude E Shannon. Prediction and entropy of printed english. _Bell system technical journal_ , 30(1): 50–64, 1951. + +- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth´ee Lacroix, Baptiste Rozi`ere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023a. + +- 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, + +10 + +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, Xiaoqing 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. + +- Frans MJ Willems, Yuri M Shtarkov, and Tjalling J Tjalkens. The context-tree weighting method: Basic properties. _IEEE transactions on information theory_ , 41(3):653–664, 1995. + +- Ian H Witten, Radford M Neal, and John G Cleary. Arithmetic coding for data compression. _Communications of the ACM_ , 30(6):520–540, 1987. + +11 + diff --git a/open_review/iclr2024_8837.json b/open_review/iclr2024_8837.json new file mode 100644 index 0000000000000000000000000000000000000000..b34aae0ee16b1b7aed935d0b34497ddadede699c --- /dev/null +++ b/open_review/iclr2024_8837.json @@ -0,0 +1,100 @@ +{ + "paper_id": "iclr2024_8837", + "source": "iclr2024", + "source_year": 2024, + "title": "PACIA: Parameter-Efficient Adapter for Few-Shot Molecular Property Prediction", + "abstract": "Molecular property prediction (MPP) plays a crucial role in biomedical applications, but it often encounters challenges due to a scarcity of labeled data. Existing works commonly adopt gradient-based strategy to update a large amount of parameter for property-level adaptation. However, the increase of adaptive parameters can cause overfitting and lead to poor performance. Observing that graph neural network (GNN) performs well as both encoder and predictor, we propose PACIA, a parameter-efficient GNN adapter for few-shot MPP. We design a unified adapter to generate a few adaptive parameters to modulate the message passing process of GNN. We then adopt hierarchical adaptation mechanism to adapt the encoder on property-level and the predictor on molecule-level by the unified GNN adapter. Extensive results show that PACIA obtains the state-of-the-art performance in few-shot MPP problems, and our proposed hierarchical adaptation mechanism is rational and effective.", + "rebuttal": "**Q1. Lack of comparison to SOTA. In Tab. 1 and Tab. 2, the only previous works on few-shot MMP included are ADKF-IFT and PAR. The authors should compare the proposed methods with more existing SOTAs such as [a].**\n\n*Reply*. We compare PACIA with ADKF-IFT and PAR, which are recent baselines obtaining the best performance on MoleculeNet and FS-Mol respectively. We also mention MHNfs (Schimunek et al., 2023), which is not included as it uses additional reference molecules from external datasets. \nFor reference [a], could you please provide the paper title?\n\n\n**Q2. Lack of novelty. The core component is HyperNet. Based on HyperNet, the proposed PACIA makes no significant technical contribution.**\n\n*Reply*. Hypernetworks are a general concept involving neural networks that are trained to generate parameters for a main network. \nDesigning how a hypernetwork modulates the main network is a problem-specific and non-trivial challenge.\nOne cannot directly apply hypernetworks designed for other problems to a new problem. \nConsidering the few-shot MPP problem, existing works can be summarized within an encoder-predictor framework, where GNNs perform effectively, acting as both encoders and predictors. \nCorrespondingly, we have designed a unified GNN adapter that generates a few adaptive parameters. These parameters modulate the message passing process of the GNN in two key aspects: node embedding and propagation depth.\nAs a result, the encoder adapts at the property level, while the predictor adapts at the molecule level. \nOur proposed PACIA effectively addresses the few-shot MPP problem, achieving state-of-the-art performance on benchmark datasets.\nIn conclusion, PACIA contributes significantly to both the technological and empirical advancements in the field of few-shot MPP. \n\n**Q3. Poor writing. Many sentences are grammatically wrong.**\n\n*Reply*. We sincerely apologize for the grammatical issues. We have now carefully proofread the manuscript and marked the grammar corrections in the revised version.\n\n**Q4. The design in modulating propagation depth seems not fully reasonable. The design in modulating propagation depth seems not fully reasonable. According to Eqn. (8), $[p]_l$ measures the probability of the event that \"the $l$-th layer is in the model\". However, from Eqn. (7), the only constraint on $[p]_l$ is $\\sum_l [p]_l=1$. So it is likely that for some $1