Datasets:
Add files using upload-large-folder tool
Browse files- parse/dev/BqxE86ufTzq/BqxE86ufTzq.md +416 -0
- parse/dev/BqxE86ufTzq/BqxE86ufTzq_content_list.json +0 -0
- parse/dev/BqxE86ufTzq/BqxE86ufTzq_model.json +0 -0
- parse/dev/Czsdv-S4-w9/Czsdv-S4-w9.md +460 -0
- parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_content_list.json +0 -0
- parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_middle.json +0 -0
- parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_model.json +0 -0
- parse/dev/S37hOerQLB/S37hOerQLB.md +0 -0
- parse/dev/S37hOerQLB/S37hOerQLB_content_list.json +0 -0
- parse/dev/S37hOerQLB/S37hOerQLB_model.json +0 -0
- parse/dev/ZWjEkv9rjo/ZWjEkv9rjo.md +341 -0
- parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_content_list.json +1740 -0
- parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_middle.json +0 -0
- parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_model.json +0 -0
- parse/dev/hFCUPkSSRE/hFCUPkSSRE_content_list.json +0 -0
- parse/dev/nL2lDlsrZU/nL2lDlsrZU.md +0 -0
- parse/dev/nL2lDlsrZU/nL2lDlsrZU_content_list.json +0 -0
- parse/dev/nL2lDlsrZU/nL2lDlsrZU_middle.json +0 -0
- parse/dev/nL2lDlsrZU/nL2lDlsrZU_model.json +0 -0
- parse/dev/zSeoDvsDCe/zSeoDvsDCe_middle.json +0 -0
parse/dev/BqxE86ufTzq/BqxE86ufTzq.md
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GRADIENT ESTIMATION FOR UNSEEN DOMAIN RISK MINIMIZATION WITH PRE-TRAINED MODELS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Domain generalization aims to build generalized models that perform well on unseen domains when only source domains are available for model optimization. Recent studies have demonstrated that large-scale pre-trained models could play an important role in domain generalization by providing their generalization power. However, large-scale pre-trained models are not fully equipped with target task-specific knowledge due to a discrepancy between the pre-training objective and the target task. Although the task-specific knowledge could be learned from source domains by fine-tuning, this hurts the generalization power of the pretrained models because of gradient bias toward the source domains. To address this issue, we propose a new domain generalization method that estimates unobservable gradients that reduce potential risks in unseen domains, using a largescale pre-trained model. Our proposed method allows the pre-trained model to learn task-specific knowledge further while preserving its generalization ability with the estimated gradients. Experimental results show that our proposed method outperforms baseline methods on DOMAINBED, a standard benchmark in domain generalization. We also provide extensive analyses to demonstrate that the estimated unobserved gradients relieve the gradient bias, and the pre-trained model learns the task-specific knowledge without sacrificing its generalization power.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Many machine learning studies assume that training and test data are independent and identically distributed (i.i.d). However, this i.i.d assumption does not always hold in real-world scenarios where distribution shifts between training and test data occur frequently. Thus, traditional machine learning models often show poor performance on unseen domains shifted from source (training) domains (Quinonero-Candela et al., 2008; Torralba & Efros, 2011). To tackle this problem, domain generalization has attracted much attention recently.
|
| 12 |
+
|
| 13 |
+
The main goal of domain generalization is to build generalized models that also perform the target task (e.g., classification) well on unseen domains (e.g., painted images) when only source domains (e.g., realistic images) are accessible during model optimization. Early domain generalization studies (Muandet et al., 2013; Ganin et al., 2016; Li et al., 2018b) have focused on learning domaininvariant representations across the source domains. However, Gulrajani & Lopez-Paz (2021) have recently shown that simple empirical risk minimization (ERM) (Vapnik, 1999) outperforms the previous methods on DOMAINBED, a benchmark for domain generalization, with pre-trained ResNet50 (He et al., 2016). Moreover, Yu et al. (2021) provide empirical evidence that large-scale pretrained models could play an important role in domain generalization by providing their generalization power.
|
| 14 |
+
|
| 15 |
+
Motivated by this, several studies have begun to leverage the generalization power of large-scale pre-trained models. Cha et al. (2022) employ a pre-trained model for regularization, considering it as an approximation of the oracle model on any domain, and Li et al. (2022) utilize a frozen pre-trained model as a feature extractor. These studies have proven the usefulness of pre-trained models in domain generalization. However, the pre-trained models used in those studies cannot learn task-specific knowledge further since they are frozen during model optimization to preserve their generalization ability. To learn the task-specific knowledge, one can choose fine-tuning that updates all the parameters of pre-trained models by optimizing the models on the source domains.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: (a): model optimization is influenced by the gradient $\mathbf { g }$ biased toward the source domains, neglecting the unobservable gradient $\mathbf { g } _ { u }$ that could minimize risks in the unseen domains. (b): Gradient “conflicts” (Yu et al., 2020; Mansilla et al., 2021) between $\mathbf { g }$ and $\mathbf { g } _ { u }$ (i.e., $\mathbf { g } \cdot \mathbf { g } _ { u } < 0 )$ constantly occur throughout the whole fine-tuning iterations due to the gradient bias. Our proposed method reduces the number of gradient conflicts by adding the estimated unobservable gradient $\tilde { \bf g } _ { u }$ to the biased gradient g. This observation indicates that the gradient bias is relieved with the estimated gradient during model optimization. The more details are described in $\ S \ 3 . 4$ .
|
| 19 |
+
|
| 20 |
+
However, Kumar et al. (2022) demonstrate that fine-tuning distorts generalized representations of the pre-trained models. Namely, fine-tuning hurts the generalization ability of pre-trained models.
|
| 21 |
+
|
| 22 |
+
In this paper, we interpret the above issue in terms of gradient bias during model optimization. As shown in Figure 1a, the gradient of naive fine-tuning is biased toward the source domains because it is computed by only the source domains, disregarding unseen domains. Although this biased gradient reduces empirical risks in the source domains with the learning of task-specific knowledge, it probably increases risks in the unseen domains. We argue that the gradient bias would be relieved if gradients that lower the risks in the unseen domains are observable.
|
| 23 |
+
|
| 24 |
+
To this end, we propose a new domain generalization method, called GESTUR, which estimates the unobservable gradients with a large-scale pre-trained model. GESTUR consists of two key components: a task expert (TE) and a generalization expert (GE). Based on ERM where gradients tend to be biased to the source domains, TE learns task-specific knowledge from source domains directly to transfer the knowledge to GE. Meanwhile, GE learns the task-specific knowledge from TE indirectly via exponential moving average (EMA) while preserving the generalization ability of a large-scale pre-trained model. Still, the gradient bias of TE might impair the generalization ability of GE. To mitigate this, GE is utilized to estimate the unobservable gradient that minimizes risks in unseen domains for TE based on the assumption that large-scale pre-trained models could act as a loose approximation of the oracle model of unseen domains $( \ S \ 2 )$ . As shown in Figure 1b, the biased gradient of TE is relieved by simply adding the estimated unobservable gradient to the biased gradient, improving domain generalization performance $( \ S \ 3 )$ . Extensive experiments and analyses demonstrate that GESTUR outperforms baseline methods by learning the task-specific knowledge appropriately from source domains while preserving the generalization ability of large-scale pretrained models.
|
| 25 |
+
|
| 26 |
+
Contributions: (1) We propose a simple yet effective domain generalization method that learns task-specific knowledge while preserving the generalization ability of large-scale pre-trained models. Our proposed method estimates the unobservable gradients that reduce potential risks in unseen domains to relieve the gradient bias toward source domains, based on the two experts, TE and GE. (2) We conduct extensive experiments to show the effectiveness of our proposed method in domain generalization. By providing careful analyses, we demonstrate that the unobservable gradients could be estimated with a large-scale pre-trained model, and it relieves the gradient bias. We also demonstrate that our proposed method learns task-specific knowledge without sacrificing the generalization ability of the large-scale pre-trained model.
|
| 27 |
+
|
| 28 |
+
# 2 METHODOLOGY
|
| 29 |
+
|
| 30 |
+
# 2.1 PRELIMINARIES
|
| 31 |
+
|
| 32 |
+
Problem formulation. Let $\mathcal { D } _ { s }$ and $\mathcal { D } _ { u }$ be sets of source domains and unseen domains, respectively. Each domain $\mathcal { D }$ contains the total number of $n _ { D }$ data samples, $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n _ { \mathcal { D } } } \sim \mathcal { D }$ , where each data sample $( x _ { i } , y _ { i } )$ consists of an input $x _ { i }$ and its target label $y _ { i }$ . The $n _ { D }$ data samples are i.i.d over some probability distribution. The main goal of domain generalization is to build a model $\theta$ that performs well on the unseen domains $\mathcal { D } _ { u }$ when the source domains $\mathcal { D } _ { s }$ are only available:
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { \mathcal { D } \sim \mathcal { D } _ { u } } \mathbb { E } _ { ( { x , y } ) \sim \mathcal { D } } [ \ell ( ( { x , y } ) ; { \theta } ) ] ,
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where $\ell ( ( x , y ) ; \theta )$ is the loss function defined for the model $\theta$ on the data sample $( x , y )$ . Note that this study focuses on solving classification tasks. Hence, we denote the model in detail as $\theta = \{ \theta ^ { f } ; \theta ^ { c } \}$ consisting of its feature extractor $\theta ^ { f }$ and classifier $\theta ^ { c }$ .
|
| 39 |
+
|
| 40 |
+
Motivation. With success in many downstream tasks, it has become a convention to initialize the feature extractor $\theta ^ { f }$ with a large-scale pre-trained model. Although pre-trained models provide better feature representations than randomly initialized parameters, they do not fully equip taskspecific knowledge yet. It is because there is a discrepancy between the pre-training objective and the target task. For example, CLIP (Radford et al., 2021) is pre-trained to match web-crawled imagecaption pairs, whereas the target task is to classify data into seven classes (e.g., horse and dog), in the case of PACS (Li et al., 2017). Therefore, many studies have adopted fine-tuning that updates all the parameters of the feature extractor $\theta ^ { f }$ to learn the task-specific knowledge by optimizing the model on source domains $\mathcal { D } _ { s }$ . However, Kumar et al. (2022) observe that fine-tuning impairs generalization ability of pre-trained models during the learning of task-specific knowledge.
|
| 41 |
+
|
| 42 |
+
We try to interpret this issue at the gradient level. Based on ERM (Vapnik, 1999), the gradient $\mathbf { g }$ of fine-tuning is computed for the model $\theta$ on the source domains $\mathcal { D } _ { s }$ , as follows:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\mathbf { g } = \nabla _ { \boldsymbol { \theta } } \mathbb { E } _ { ( \boldsymbol { x } , \boldsymbol { y } ) \sim \boldsymbol { B } } [ \ell ( ( \boldsymbol { x } , \boldsymbol { y } ) ; \boldsymbol { \theta } ) ] ,
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $\boldsymbol { B }$ is a mini-batch sampled from the source domains $\mathcal { D } _ { s }$ . The gradient $\mathbf { g }$ is influenced by only the source domains $\mathcal { D } _ { s }$ because the unseen domains $\mathcal { D } _ { u }$ are not accessible. Namely, the gradient is biased toward the source domains. We presume that this gradient bias degrades generalization performance in the unseen domains.
|
| 49 |
+
|
| 50 |
+
# 2.2 GESTUR: GRDIENT ESTIMATION FOR UNSEEN DOMAIN RISK MINIMIZATION WITH PRE-TRAINED MODELS
|
| 51 |
+
|
| 52 |
+
We hypothesize that the gradient bias mentioned above could be relieved if the unobservable gradient $\mathbf { g } _ { u }$ minimizing risks in the unseen domains is computable. To achieve this, we borrow the assumption of Cha et al. (2022) that large-scale pre-trained models are the approximation of the oracle model $\theta ^ { * }$ which is optimally generalized for any domain $\mathcal { D }$ . Since the unobservable gradient $\mathbf { g } _ { u }$ cannot be computed from the unseen domains $\mathcal { D } _ { u }$ directly, we consider the direction from the current model $\theta$ to the oracle model $\theta ^ { * }$ as the unobservable gradient $\mathbf { g } _ { u }$ . However, the oracle model is inaccessible in practice. Hence, we estimate the unobservable gradient using a large-scale pre-trained model as the approximation of the oracle model.
|
| 53 |
+
|
| 54 |
+
Note that we aim to estimate the unobservable gradient $\mathbf { g } _ { u }$ for the unseen domains $\mathcal { D } _ { u }$ to alleviate the gradient bias, so the above assumption needs to be more elaborate due to the following reasons. First, we intend to design the unobservable gradient for the unseen domains only rather than any domain. Second, pre-trained models do not have task-specific knowledge yet, as described in $\ S \ : 2 . 1$ . Therefore, we slightly modify the assumption as follows: pre-trained models are the loose approximation of the oracle model $\theta _ { u } ^ { * }$ of the unseen domains $\mathcal { D } _ { u }$ , and they could get closer to the oracle model by learning task-specific knowledge. Based on this assumption, we propose a simple yet effective domain generalization method, GESTUR, which estimates the unobservable gradient $\mathbf { g } _ { u }$ for unseen domain risk minimization with a large-scale pre-trained model.
|
| 55 |
+
|
| 56 |
+
Task expert and generalization expert. GESTUR consists of two classification models: a task expert (TE, $\theta _ { \mathrm { T E } } \mathrm { ~ , ~ }$ ) and a generalization expert (GE, $\theta _ { \mathrm { G E } } \mathrm { . }$ ), which are complementary to each other.
|
| 57 |
+
|
| 58 |
+
Their feature extractors are both initialized with a large-scale pre-trained model $\theta _ { 0 }$ , respectively. TE learns task-specific knowledge from the source domains $\mathcal { D } _ { s }$ directly to transfer the knowledge to GE. Meanwhile, GE also learns task-specific knowledge from TE via EMA, but it preserves the generalization ability of the pre-trained model deliberately. Here, the gradient bias of TE might hurt the generalization ability of GE because the knowledge of TE is injected into GE. To relieve the gradient bias, GE is used to estimate the unobservable gradient $\mathbf { g } _ { u }$ as the loose approximation of the oracle model $\theta _ { u } ^ { * }$ for the unseen domains $\mathcal { D } _ { u }$ . Our proposed GESTUR is summarized in Algorithm 1.
|
| 59 |
+
|
| 60 |
+
Gradient estimation. Using Equation 2, the gradient $\mathbf { g }$ for TE is computed as $\mathbf { g } = \nabla _ { \boldsymbol { \theta } } \mathbb { E } _ { ( \boldsymbol { x } , \boldsymbol { y } ) \sim \boldsymbol { B } } [ \ell ( ( \boldsymbol { x } , \boldsymbol { y } ) ; \boldsymbol { \theta } _ { \mathrm { T E } } ) ]$ while learning task-specific knowledge. The gradient $\mathbf { g }$ is biased toward the source domains $\mathcal { D } _ { s }$ . A gradient that minimizes risks in the unseen domains could relieve the gradient bias, but it is unobservable. When we have access to the oracle model $\theta _ { u } ^ { * }$ of the unseen domains $\mathcal { D } _ { u }$ , we can direct the current model to head to the oracle model instead of empirically calculating the unobservable gradient from the unseen domains. Hence, we treat the direction from the current model $\theta _ { \mathrm { T E } }$ to the oracle model $\theta _ { u } ^ { * }$ as the unobservable gradient $\mathbf { g } _ { u }$ :
|
| 61 |
+
|
| 62 |
+
# Algorithm 1 GESTUR
|
| 63 |
+
|
| 64 |
+
1: Input: task expert $\theta _ { \mathrm { T E } }$ , generalization expert $\theta _ { \mathrm { G E } }$ , gradient scale factor $\lambda$ , and moving average coefficient $m$ .
|
| 65 |
+
2: Init: initialize the feature extractors $\theta _ { \mathrm { T E } } ^ { f }$ and $\theta _ { \mathrm { G E } } ^ { f }$ with a pre-trained model $\theta _ { 0 }$ and randomly initialize the classifiers $\theta _ { \mathrm { T E } } ^ { c }$ and $\theta _ { \mathrm { G E } } ^ { c }$ .
|
| 66 |
+
3: Output: the updated generalization expert $\theta _ { \mathrm { G E } }$
|
| 67 |
+
4: for sampled mini-batch $\boldsymbol { B }$ from the source domains $\mathcal { D } _ { s }$ do
|
| 68 |
+
5: $\begin{array} { r l } & { \mathbf { g } \stackrel { } { = } \nabla _ { \theta } \mathbb { E } _ { ( x , y ) \sim \mathcal { B } } [ \ell ( ( x , y ) ; \theta _ { \mathrm { T E } } ) ] } \\ & { \tilde { \mathbf { g } } _ { u } ^ { f } = \theta _ { \mathrm { G E } } ^ { f } - \theta _ { \mathrm { T E } } ^ { f } } \\ & { \tilde { \mathbf { g } } _ { u } ^ { f } = \lambda \| \mathbf { g } ^ { f } \| _ { 2 } \cdot \frac { \tilde { \mathbf { g } } _ { u } ^ { f } } { \| \tilde { \mathbf { g } } _ { u } ^ { f } \| _ { 2 } } } \\ & { \mathbf { g } ^ { f } = ( \mathbf { g } ^ { f } + \tilde { \mathbf { g } } _ { u } ^ { f } ) / 2 } \end{array}$
|
| 69 |
+
6:
|
| 70 |
+
7:
|
| 71 |
+
8:
|
| 72 |
+
9: update $\theta _ { \mathrm { T E } } ^ { f }$ with $\mathbf { g } ^ { f }$ and update $\theta _ { \mathrm { T E } } ^ { c }$ with $\mathbf { g } ^ { c }$
|
| 73 |
+
10: update $\theta _ { \mathrm { G E } } = m \theta _ { \mathrm { G E } } + ( 1 - m ) \theta _ { \mathrm { T E } }$
|
| 74 |
+
11: end for
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\mathbf { g } _ { u } = \boldsymbol { \theta } _ { u } ^ { * } - \boldsymbol { \theta } _ { \mathrm { T E } } .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
In fact, it is infeasible to access the oracle model. Thus, we estimate the unobservable gradient using GE that approximates the oracle model loosely, as follows:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { r } { \tilde { \mathbf { g } } _ { u } = \theta _ { \mathrm { G E } } - \theta _ { \mathrm { T E } } . } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
This estimated gradient $\tilde { \bf g } _ { u }$ is used to relieve the gradient bias during the parameter optimization.
|
| 87 |
+
|
| 88 |
+
Parameter optimization. We want to emphasize again that GESTUR leverages the generalization power of large-scale pre-trained models to relieve the gradient bias which distorts the generalized feature representations of the feature extractor $\theta ^ { f }$ . Hence, we limit the scope of usage of the estimated unobservable gradient $\tilde { \bf g } _ { u }$ only to the feature extractor $\theta ^ { f }$ , not the classifier $\theta ^ { c }$ .
|
| 89 |
+
|
| 90 |
+
For TE, the estimated gradient $\tilde { \mathbf { g } } _ { u } ^ { f }$ for the feature extractor $\theta _ { \mathrm { T E } } ^ { f }$ is added to the biased gradient $\mathbf { g } ^ { f }$ for the same feature extractor, as follows:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\mathbf { g } ^ { f } = \frac { 1 } { 2 } \Big ( \mathbf { g } ^ { f } + \lambda \| \mathbf { g } ^ { f } \| _ { 2 } \cdot \frac { \tilde { \mathbf { g } } _ { u } ^ { f } } { \| \tilde { \mathbf { g } } _ { u } ^ { f } \| _ { 2 } } \Big ) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\lambda$ is a gradient scale factor that controls the influence of the normalized $\tilde { \mathbf { g } } _ { u } ^ { f }$ . The feature extractor $\theta _ { \mathrm { T E } } ^ { f }$ is updated with the gradient $\mathbf { g } ^ { f }$ adjusted by $\tilde { \mathbf { g } } _ { u } ^ { f }$ . On the other hand, the classifier $\theta _ { \mathrm { T E } } ^ { c }$ of TE is updated with its original gradient $\mathbf { g } ^ { c }$ .
|
| 97 |
+
|
| 98 |
+
As our assumption, GE can get closer to the oracle model $\theta ^ { * }$ by learning task-specific knowledge. However, the generalization ability of GE decreases when we optimize GE on the source domains $\mathcal { D } _ { s }$ directly to learn the task-specific knowledge. Therefore, we inject the learned task-specific knowledge of TE into GE delicately via EMA:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\theta _ { \mathrm { G E } } = m \theta _ { \mathrm { G E } } + ( 1 - m ) \theta _ { \mathrm { T E } } ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $m$ is the moving average coefficient. By encouraging the parameters of GE to change slowly, EMA is helpful in preserving the generalization ability of GE. Since the goal of domain generalization is to build a model that minimizes the risk of the unseen domains, we choose GE, designed to approximate the oracle model of the domains, as our final model $\theta$ .
|
| 105 |
+
|
| 106 |
+
Table 1: Evaluation results $( \% )$ on the five datasets with the three different pre-trained models.
|
| 107 |
+
|
| 108 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>DomainNet</td><td>Avg.</td></tr><tr><td colspan="7">Using ResNet-50 pre-trained on ImageNet.</td></tr><tr><td>ERM SagNet</td><td>84.2 ±0.1 86.3 ±0.2</td><td>77.3 ±0.1</td><td>67.6 ±0.2</td><td>47.8 ±0.6</td><td>44.0 ±0.1</td><td>64.2</td></tr><tr><td>SelfReg</td><td>85.6 ±0.4</td><td>77.8 ±0.5 77.8 ±0.9</td><td>68.1 ±0.1 67.9 ±0.7</td><td>48.6 ±1.0 47.0 ±0.3</td><td>40.3 ±0.1 42.8 ±0.0</td><td>64.2 64.2</td></tr><tr><td>CORAL</td><td>86.2 ±0.3</td><td>78.8 ±0.6</td><td>68.7 ±0.3</td><td>47.6 ±1.0</td><td>41.5 ±0.1</td><td>64.5</td></tr><tr><td>mDSDI</td><td>86.2 ±0.2</td><td>79.0 ±0.3</td><td>69.2 ±0.4</td><td>48.1 ±1.4</td><td>42.8 ±0.1</td><td>65.1</td></tr><tr><td>GVRT</td><td>85.1 ±0.3</td><td>79.0 ±0.2</td><td></td><td></td><td></td><td>65.2</td></tr><tr><td>MIRO</td><td>85.4 ±0.4</td><td></td><td>70.1 ±0.1</td><td>48.0 ±1.4</td><td>44.1 ±0.1</td><td>65.9</td></tr><tr><td>SMA</td><td></td><td>79.0 ±0.0</td><td>70.5 ±0.4</td><td>50.4 ±1.1</td><td>44.3 ±0.2</td><td></td></tr><tr><td>SWAD</td><td>87.5 ±0.2</td><td>78.2 ±0.2</td><td>70.6 ±0.1</td><td>50.3 ±0.5</td><td>46.0 ±0.1</td><td>66.5</td></tr><tr><td>GESTUR</td><td>88.1 ±0.1</td><td>79.1 ±0.1</td><td>70.6 ±0.2</td><td>50.0 ±0.3</td><td>46.5 ±0.1</td><td>66.9</td></tr><tr><td></td><td>88.0 ±0.2</td><td>80.1 ±0.2</td><td>71.1 ±0.0</td><td>51.3 ±0.2</td><td>46.3 ±0.1</td><td>67.4</td></tr><tr><td colspan="7">Using ViT-B/16 with CLIP.</td></tr><tr><td>ERM</td><td>83.4 ±0.5</td><td>75.9 ±1.3</td><td>66.4 ±0.5</td><td>35.3 ±0.8</td><td>44.4 ±0.6</td><td>61.1</td></tr><tr><td>SWAD</td><td>91.3 ±0.1</td><td>79.4 ±0.4</td><td>76.9 ±0.1</td><td>45.4 ±0.5</td><td>51.7 ±0.8</td><td>68.9</td></tr><tr><td>MIRO</td><td>95.6 ±0.8</td><td>82.2 ±0.3</td><td>82.5 ±0.1</td><td>54.3 ±0.4</td><td>54.0 ±0.3</td><td>73.7</td></tr><tr><td>GESTUR</td><td>96.0 ±0.0</td><td>82.8 ±0.1</td><td>84.2 ±0.1</td><td>55.7 ±0.2</td><td>58.9 ±0.1</td><td>75.5</td></tr><tr><td colspan="7">Using RegNetY-16GF with SWAG.</td></tr><tr><td>ERM</td><td>89.6 ±0.4</td><td>78.6 ±0.3</td><td>71.9 ±0.6</td><td>51.4 ±1.8</td><td>48.5 ±0.6</td><td>68.0</td></tr><tr><td>SWAD</td><td>94.7 ±0.2</td><td>79.7 ±0.2</td><td>80.0 ±0.1</td><td>57.9 ±0.7</td><td>53.6 ±0.6</td><td>73.2</td></tr><tr><td>MIRO</td><td>97.4 ±0.2</td><td>79.9 ±0.6</td><td>80.4 ±0.2</td><td>58.9 ±1.3</td><td>53.8 ±0.1</td><td>74.1</td></tr><tr><td>SMA</td><td>95.5 ±0.0</td><td>80.7 ±0.1</td><td>82.0 ±0.0</td><td>59.7 ±0.0</td><td>60.0 ±0.0</td><td>75.6</td></tr><tr><td>GESTUR</td><td>96.9 ±0.1</td><td>83.5 ±0.1</td><td>83.1 ±0.0</td><td>61.1 ±0.4</td><td>60.1 ±0.0</td><td>76.9</td></tr></table>
|
| 109 |
+
|
| 110 |
+
# 3 EXPERIMENTS
|
| 111 |
+
|
| 112 |
+
# 3.1 EXPERIMENTAL SETUP
|
| 113 |
+
|
| 114 |
+
Datasets. We conduct experiments using five popular domain generalization benchmark datasets: PACS (Li et al., 2017) (4 domains & 7 classes), VLCS (Fang et al., 2013) (4 domains & 5 classes), OfficeHome (Venkateswara et al., 2017) (4 domains & 65 classes), TerraIncognita (Beery et al., 2018) (4 domains & 10 classes), and DomainNet (Peng et al., 2019) (6 domains & 345 classes).
|
| 115 |
+
|
| 116 |
+
Pre-trained models. GESTUR heavily relies on pre-trained models. Therefore, we employ three pre-trained models of different sizes to verify that the proposed method performs well with various pre-trained models generally: ResNet-50 (He et al., 2016) pre-trained on ImageNet (Deng et al., 2009) (RN50), ViT-B/16 (Dosovitskiy et al., 2021) with CLIP (Radford et al., 2021) (CLIP), and RegNetY-16GF (Radosavovic et al., 2020) with SWAG (Singh et al., 2022) (SWAG).
|
| 117 |
+
|
| 118 |
+
Evaluation protocol. We adopt the experimental protocol of DOMAINBED, which enforces fair and realistic evaluations (e.g., same model selection criterion) across competitors. We divide the data from each domain into $80 \%$ and $20 \%$ splits and follow training-domain validation set strategy for the model selection and the hyperparameter search in every experiment. We also repeat every experiment three times to reduce the randomness in dataset splits and parameter initialization, similar to Gulrajani & Lopez-Paz (2021), and report the mean and standard error of the experimental results.
|
| 119 |
+
|
| 120 |
+
Implementation details. Our implementation is built on the codebase of Cha et al. (2022). We use Adam optimizer (Kingma & Ba, 2015) for parameter optimization. GESTUR has two hyperparameters, the gradient scale factor $( \lambda )$ and the moving average coefficient $( m )$ . In every experiment, we search the optimal $\lambda$ from $\{ 0 . 0 1 , 0 . 0 5 , 0 . 1 , 0 . 5 \}$ and fix $m$ as 0.999. Other hyperparameters such as learning rate, weight decay, and dropout are searched in the same way as Cha et al. (2022). We explain more details of implementation in Appendix A.
|
| 121 |
+
|
| 122 |
+
Table 2: Evaluation results $( \% )$ on the four datasets with the three different pre-trained models. We separate the cases where GESTUR uses TE and GE as the final model, respectively.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc|Avg.</td><td></td></tr><tr><td colspan="6">Using ResNet-50 pre-trained on ImageNet.</td></tr><tr><td>ERM</td><td>84.2 ±0.1</td><td>77.3 ±0.1</td><td>67.6±0.2</td><td>47.8 ±0.6</td><td>69.2</td></tr><tr><td>GESTUR w/ TE</td><td>84.9 ±0.1</td><td>79.2 ±0.5</td><td>66.3 ±0.2</td><td>45.6 ±1.3</td><td>69.0</td></tr><tr><td>GESTUR w/ GE</td><td>88.0 ±0.2</td><td>80.1 ±0.2</td><td>71.1 ±0.0</td><td>51.3 ±0.2</td><td>72.6</td></tr><tr><td colspan="6">Using ViT-B/16with CLIP.</td></tr><tr><td>ERM</td><td>83.4 ±0.5</td><td>75.9 ±1.3</td><td>66.4 ±0.5</td><td>35.3±0.8</td><td>65.3</td></tr><tr><td>GESTUR w/ TE</td><td>90.7 ±0.9</td><td>82.4 ±0.4</td><td>76.9 ±0.5</td><td>50.4 ±0.2</td><td>75.1</td></tr><tr><td>GESTUR w/ GE</td><td>96.0 ±0.1</td><td>82.8 ±0.1</td><td>84.2 ±0.1</td><td>55.7 ±0.2</td><td>79.7</td></tr><tr><td colspan="6">Using RegNetY-16GF with SWAG.</td></tr><tr><td>ERM</td><td>89.6 ±0.4</td><td>78.6 ±0.3</td><td>71.9 ±0.6</td><td>51.4 ±1.8</td><td>72.9</td></tr><tr><td>GESTUR w/ TE</td><td>94.8±0.5</td><td>82.5 ±0.4</td><td>77.7 ±0.2</td><td>54.7 ±2.0</td><td>77.4</td></tr><tr><td>GESTUR w/GE</td><td>96.9 ±0.1</td><td>83.5 ±0.1</td><td>83.1 ±0.0</td><td>61.1 ±0.4</td><td>81.2</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Baselines. We exhaustively compare our proposed method with various baseline methods in the experiment. For simplicity, we report only the experimental results of baseline methods that show the higher performance than ERM (Vapnik, 1999), the simplest baseline method. We describe the baseline methods and report the full version of the results in Appendix B.1.
|
| 127 |
+
|
| 128 |
+
# 3.2 MAIN RESULTS
|
| 129 |
+
|
| 130 |
+
Results on RN50. The first part of Table 1 shows the experimental results where RN50 is used to initialize the feature extractor. GESTUR achieves the best performance for all the datasets except DomainNet. In detail, the proposed method outperforms ERM by an average of $3 . 2 \% p$ . Furthermore, our proposed method improves the runner-up by: $1 . 0 \% p$ in VLCS, $0 . 5 \% p$ in OfficeHome, and $1 . 3 \% p$ in TerraIncognita. Especially, the proposed method outperforms the state-of-the-art method (SWAD (Cha et al., 2021)) by an average of $0 . 5 \% p$ .
|
| 131 |
+
|
| 132 |
+
Results on CLIP and SWAG. In the second and third parts of Table 1, we show the experimental results where the larger pre-trained models, CLIP and SWAG, are used to initialize the feature extractor, respectively. In summary, GESTUR achieves the best performance in all the datasets. In detail, the proposed method outperforms MIRO that also leverages generalization power of large-scale pretrained models by $1 . 8 \% p$ and $2 . 8 \% p$ on CLIP and SWAG, respectively. From this, we verify that the proposed method successfully leverages the generalization ability of pre-trained models compared to other baseline methods. Interestingly, we observe that the performance gap between the proposed method and ERM increases as the size of the pre-trained model increases.
|
| 133 |
+
|
| 134 |
+
# 3.3 COMPARISON BETWEEN THE TASK EXPERT AND THE GENERALIZATION EXPERT
|
| 135 |
+
|
| 136 |
+
Setup. GESTUR consists of two essential components: the task expert (TE) and the generalization expert (GE). In this paper, we use GE as the final model based on the assumption that GE is set as the approximation of the oracle model of unseen domains. Nevertheless, TE is also designed to preserve the generalization ability of pre-trained models since it also considers the estimated unobservable gradient in every update to relieve its gradient bias. Therefore, we compare the performance of ERM, GESTUR w/ GE, and its variant GESTUR w/ TE based on the hyperparameters searched in $\ S 3 . 2$ to show that they preserve the generalization ability of large-scale pre-trained models.
|
| 137 |
+
|
| 138 |
+
Results. As shown in Table 2, GESTUR w/ GE achieves the best performance in all experiments. Also, GESTUR w/ TE outperforms ERM by averages of $9 . 8 \% p$ and $4 . 5 \% p$ when using CLIP and SWAG, respectively. The performance of GESTUR w/ TE is higher when the larger pre-trained models are given, similar to the observation in $\ S \ 3 . 2$ . These observations demonstrate that GESTUR w/
|
| 139 |
+
|
| 140 |
+
TE could preserve the generalization ability of the pre-trained models with the estimated unobservable gradient, i.e., the gradient bias of TE is relieved. Moreover, GESTUR w/ GE shows a higher performance than GESTUR w/ TE, which indicates that EMA ensures the model preserves generalization ability during the learning of task-specific knowledge stable. From these, we reaffirm the justification for our choice of GE as the final model.
|
| 141 |
+
|
| 142 |
+
# 3.4 COMPARISON WITH ERM IN TERMS OF GRADIENT BIAS
|
| 143 |
+
|
| 144 |
+
Setup. As described in $\ S \ O 1$ , we suspect that the gradient bias degrades the domain generalization performance. We further conduct analysis to check how much gradient bias occurs during the fine-tuning and how much gradient bias is alleviated by our proposed method. To quantify the gradient bias, we borrow the concept of gradient conflict (Yu et al., 2020; Mansilla et al., 2021): there is a conflict between two gradients $\mathbf { g } _ { i }$ and $\mathbf { g } _ { j }$ if $\mathbf { g } _ { i } \cdot \mathbf { g } _ { j } < 0$ . For every iteration, we first sample two mini-batches from both source domains and an unseen domain, respectively. We then compute losses of the mini-batches, and calculate gradients $\mathbf { g }$ and $\mathbf { g } _ { u }$ from the losses, respectively. Finally, we count the
|
| 145 |
+
|
| 146 |
+
Table 3: The percentage $( \% )$ of gradient conflicts between $\mathbf { g }$ and $\mathbf { g } _ { u }$ to the whole training iterations.
|
| 147 |
+
|
| 148 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OH</td><td>TI</td><td>Avg.</td></tr><tr><td colspan="6">Using ResNet-50 pre-trained on l ImageNet.</td></tr><tr><td>ERM GESTUR</td><td>28.6 26.2</td><td>37.3 29.8</td><td>20.3 21.0</td><td>35.4 30.7</td><td>30.4 26.9</td></tr><tr><td colspan="6">Using ViT-B/16 with ( CLIP.</td></tr><tr><td>ERM</td><td>35.3</td><td>43.1</td><td>33.4</td><td>42.6</td><td>38.6</td></tr><tr><td>GESTUR</td><td>28.7</td><td>37.4</td><td>25.0</td><td>30.8</td><td>30.5</td></tr><tr><td colspan="6">Using RegNetY-16GF with SWAG.</td></tr><tr><td>ERM</td><td>31.7</td><td>39.7</td><td>30.0</td><td>37.5</td><td>34.7</td></tr><tr><td>GESTUR</td><td>24.5</td><td>34.8</td><td>16.5</td><td>23.7</td><td>24.9</td></tr></table>
|
| 149 |
+
|
| 150 |
+
number of iterations where the gradient conflict $( { \bf g } \cdot { \bf g } _ { u } < 0 )$ ) occurs, for ERM and GESTUR. Here, we update the model using only the gradient $\mathbf { g }$ since unseen domains are inaccessible in practice.
|
| 151 |
+
|
| 152 |
+
Results. As shown in Table 3, GESTUR reduces the gradient conflicts of ERM by around $1 1 . 5 \%$ , $21 \%$ , and $2 8 . 2 \%$ for the pre-trained models, respectively. From this, we verify that our proposed method relieves gradient bias by estimating unobservable gradients with the pre-trained model. We observe that gradient conflicts occur more often in GESTUR than ERM on only the experimental setup (OfficeHome w/ RN50), which is consistent with the performance in Table 2 where ERM outperforms GESTUR w/ TE. This observation indicates that the domain generalization performance is affected by the gradient bias represented as the gradient conflicts in this analysis. Additional analysis on the similarity of the true and estimated unobservable gradients is provided in Appendix C.3.
|
| 153 |
+
|
| 154 |
+
# 3.5 TASK-SPECIFIC KNOWLEDGE LEARNED BY THE GENERALIZATION EXPERT
|
| 155 |
+
|
| 156 |
+
Table 4: Linear probing performance $( \% )$ with the two different pre-trained feature extractors: frozen pre-trained model $\theta _ { 0 }$ and the feature extractor $\theta _ { \mathrm { G E } } ^ { f }$ of GE.
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Model</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc|Avg.</td><td></td></tr><tr><td colspan="6">Using ViT-B/16 with CLIP.</td></tr><tr><td>frozen</td><td>98.5 ±0.1</td><td>88.5 ±0.2</td><td>89.3 ±0.1</td><td>83.4 ±0.2</td><td>89.9</td></tr><tr><td>GE</td><td>98.7 ±0.1</td><td>90.0 ±0.6</td><td>89.4 ±0.3</td><td>88.3 ±0.1</td><td>91.6</td></tr><tr><td colspan="6">Using RegNetY-16GF with SWAG.</td></tr><tr><td>frozen</td><td>98.9 ±0.1</td><td>87.1 ±0.2</td><td>89.6±0.0</td><td>89.3 ±0.0</td><td>91.2</td></tr><tr><td>GE</td><td>98.7 ±0.1</td><td>88.8 ±0.2</td><td>90.1 ±0.2</td><td>90.2 ±0.1</td><td>92.0</td></tr></table>
|
| 159 |
+
|
| 160 |
+
Setup. We conduct additional experiments to show that the feature extractor $\theta _ { \mathrm { G E } } ^ { f }$ of GE learns taskspecific knowledge successfully. Linear probing that updates parameters of only the classifier while freezing those of the feature extractor is common practice for assessing representation quality. We assume that the more task-specific knowledge the feature extractor learns, the better linear probing performance it exhibits in unseen domains targeting the same task. In detail, we first train GE on source domains and then evaluate linear probing performance on an unseen domain with the trained feature extractor of GE. We compare it with the case that a frozen pre-trained model is used as the feature extractor. For linear probing, we simply train a logistic regression classifier on the output feature representations of each feature extractor using the unseen domain only. Note that, in this analysis, we use CLIP and SWAG which are pre-trained with objectives significantly different from the target task to demonstrate the effectiveness of the newly learned task-specific knowledge clearly.
|
| 161 |
+
|
| 162 |
+
Results. As shown in Table 4, GE outperforms frozen in all benchmark datasets except the one case where the two models reach the near $9 9 \%$ performance. This shows that GE is learning task-specific knowledge further during training, which makes it a better approximation of the oracle model. The result supports our claim that pre-trained models are not fully equipped with target task-specific knowledge, and injecting the knowledge further increases performance.
|
| 163 |
+
|
| 164 |
+
# 3.6 RELATIONSHIP BETWEEN $\lambda$ AND THE SIZE OF THE PRE-TRAINED MODEL
|
| 165 |
+
|
| 166 |
+
Table 5: Evaluation results $( \% )$ on PACS with the three different pre-trained models varying $\lambda$
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan="2">Dataset (size)</td><td rowspan="2"> Pre-training</td><td rowspan="2"> Architecture</td><td colspan="4">入</td></tr><tr><td>0.01</td><td>0.05</td><td>0.1</td><td>0.5</td></tr><tr><td>ImageNet (1.3M)</td><td>ERM</td><td>ResNet-50</td><td>88.0 ±0.2</td><td>86.0 ±0.2</td><td>82.1 ±0.2</td><td>73.4 ±0.4</td></tr><tr><td>CLIP (400M)</td><td>CLIP</td><td>ViT-B/16</td><td>94.8±0.2</td><td>96.0±0.0</td><td>96.2 ±0.1</td><td>96.0 ±0.0</td></tr><tr><td>Instagram (3.6B)</td><td>SWAG</td><td>RegNetY-16GF</td><td>96.3 ±0.2</td><td>96.9 ±0.1</td><td>97.6 ±0.1</td><td>97.9 ±0.1</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Setup. Our proposed GESTUR controls the scale of the estimated unobservable gradients that reduce risks in unseen domains using the gradient scale factor $\lambda$ . To verify the effect of the scale factor, we observe the performance change varying the scale factor.
|
| 171 |
+
|
| 172 |
+
Results. In Table 5, RN50 achieves the best performance with $\lambda = 0 . 0 1$ . On the other hand, the larger pre-trained models, CLIP and SWAG achieve the best performance with the relatively larger $\lambda = 0 . 1$ and $\lambda = 0 . 5$ , respectively. We summarize more results on other datasets (i.e., VLCS, OfficeHome, and TerraIncognita) in Appendix C.1, and they show the similar pattern as in PACS.
|
| 173 |
+
|
| 174 |
+
Intuitively, the larger pre-trained models act as a better approximation of the oracle model than the small one because they are likely to encounter various domains from the huge web-crawled datasets during pre-training. They help to estimate unobservable gradients more accurately. The larger gradient scale factor, gradients $\mathbf { g }$ of TE is more affected by the estimated unobservable gradients $\tilde { \bf g } _ { u }$ while optimizing the model on source domains. From this, we can conclude that the larger scale factor improves the generalization performance when larger pre-trained models are given.
|
| 175 |
+
|
| 176 |
+
# 4 RELATED WORK
|
| 177 |
+
|
| 178 |
+
# 4.1 DOMAIN GENERALIZATION
|
| 179 |
+
|
| 180 |
+
Domain alignment. Domain alignment is to learn domain-invariant feature representations by removing domain-specific knowledge in the representations. Adversarial training is widely adopted to learn domain invariant features through a min-max game between a feature extractor and a domain discriminator (Ganin et al., 2016; Li et al., 2018c; Matsuura & Harada, 2020; Zhu et al., 2022). On the other hand, several studies (Muandet et al., 2013; Sun & Saenko, 2016; Li et al., 2018b) aim to minimize feature divergence across source domains. Recently, contrastive learning-based algorithms (Kim et al., 2021; Yao et al., 2022) have been proposed to minimize distances between feature representations of samples in the same class, regardless their domains.
|
| 181 |
+
|
| 182 |
+
Data augmentation. Many studies have employed data augmentation techniques to improve domain generalization performance. For example, Gulrajani & Lopez-Paz (2021) apply simple data augmentation techniques as a default setup in DOMAINBED and some studies (Wang et al., 2020; Xu et al., 2020; Yan et al., 2020) utilize Mixup (Zhang et al., 2017). Recently, a few works (Zhou et al., 2021; Nam et al., 2021; Kang et al., 2022) focus on image style, based on the idea that domain gap is closely related to image style. On the other side, some works on single domain generalization introduce adversarial data augmentation (Volpi et al., 2018; Fan et al., 2021; Qiao et al., 2020) to generate hard samples adversarially while assuring their reliability.
|
| 183 |
+
|
| 184 |
+
Gradient-based. Recently, several studies utilize gradients to build generalized models, especially by aligning gradients from different domains. Mansilla et al. (2021) exploit gradient agreement for gradient surgery, based on the hypothesis that conflicting gradients contain domain-specific information. Shi et al. (2022) propose a training method that maximizes inner product between source domain gradients to match optimization paths across domains. Similarly, Rame et al. (2022) try to match domain-level Hessian to align loss landscapes across domains. As another line of work, Huang et al. (2020) introduce the self-challenging algorithm that iteratively masks dominant features, which are selected by the scale of the gradients.
|
| 185 |
+
|
| 186 |
+
Meta-learning-based. Since simulating domain shift by dividing source domains into meta-train and meta-test domains was first introduced in MLDG (Li et al., 2018a), several approaches have been proposed in a similar setting. For example, Balaji et al. (2018) propose to learn a regularizer for classifier weights and Zhang et al. (2021a) bring the idea of Reptile (Nichol et al., 2018) to MLDG to further increase performance with a multi-view framework. On the other hand, Zhang et al. (2021b) employ meta-learning to adaptively predict model parameters from a batch of inputs.
|
| 187 |
+
|
| 188 |
+
Others. Some of the works bring concepts of causality (Lv et al., 2022), optimize the worst-case performance (Sagawa et al., 2019; Krueger et al., 2021), utilize text labels (Min et al., 2022), or average model weights from different epochs (Cha et al., 2021; Arpit et al., 2022).
|
| 189 |
+
|
| 190 |
+
Our work differs from aforementioned approaches in that we mainly concentrate on effectively utilizing large-scale pre-trained models.
|
| 191 |
+
|
| 192 |
+
# 4.2 DOMAIN GENERALIZATION WITH PRE-TRAINED MODELS
|
| 193 |
+
|
| 194 |
+
Recently, Gulrajani & Lopez-Paz (2021) empirically show that simple ERM (Vapnik, 1999) outperforms most of early methods with pre-trained ResNet-50 (He et al., 2016). Yu et al. (2021) show that using large-scale models pre-trained on massive datasets improves out-of-distribution performance. Kumar et al. (2022) find that fine-tuning distorts pre-trained features and propose the linear-probing then fine-tuning to mitigate the feature distortion. Wortsman et al. (2022) find that linearly interpolating the zero-shot and fine-tuned parameters of a pre-trained model improves performance in both source and unseen domains. Although GESTUR’s EMA (Equation 6) looks similar to their interpolation, GESTUR updates the pre-trained model to inject task-specific knowledge. Li et al. (2022) propose a method to efficiently leverage a pool of large-scale pre-trained models through specialtyaware ensemble learning. Cha et al. (2022) propose MIRO, a regularization method that targets to minimize mutual information with pre-trained models which approximate the oracle model. In this work, we share similar motivation with MIRO in that we initially approximate the oracle model with a large-scale pre-trained model. However, we iteratively inject task-specific knowledge into the approximation of the oracle model, resulting in a better approximation.
|
| 195 |
+
|
| 196 |
+
# 5 CONCLUSION AND FUTURE WORK
|
| 197 |
+
|
| 198 |
+
In this paper, we propose a new domain generalization method that learns task-specific knowledge while preserving the generalization ability of large-scale pre-trained models. We point out that gradient bias toward source domains hurts the generalization ability of pre-trained models during finetuning. To alleviate the gradient bias, our proposed method estimates unobservable gradients that minimize risk in unseen domains based on two key components: a task expert and a generalization expert. Experimental results on DOMAINBED show that our proposed method outperforms baseline methods in domain generalization. Through extensive analyses, we also demonstrate that the estimated unobservable gradients effectively reduce gradient bias, thereby helping to learn task-specific knowledge without hurting the generalization power of large-scale pre-trained models.
|
| 199 |
+
|
| 200 |
+
Although we verify the effectiveness of our proposed method, it heavily relies on the capability of pre-trained models. When unseen domains that pre-trained models did not encounter are given (e.g. ResNet trained on ImageNet does not see medical images), the pre-trained models might not act as an approximation of the oracle model of the domains. We will address this issue in future work.
|
| 201 |
+
|
| 202 |
+
# REPRODUCIBILITY STATEMENT
|
| 203 |
+
|
| 204 |
+
We provide the source code for reproduction in the supplementary materials. See Appendix A for the hyperparameters used for the experiments.
|
| 205 |
+
|
| 206 |
+
# REFERENCES
|
| 207 |
+
|
| 208 |
+
Martin Arjovsky, Leon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. ´ arXiv preprint arXiv:1907.02893, 2019.
|
| 209 |
+
|
| 210 |
+
Devansh Arpit, Huan Wang, Yingbo Zhou, and Caiming Xiong. Ensemble of averages: Improving model selection and boosting performance in domain generalization. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=peZSbfNnBp4.
|
| 211 |
+
|
| 212 |
+
Yogesh Balaji, Swami Sankaranarayanan, and Rama Chellappa. Metareg: Towards domain generalization using meta-regularization. Advances in neural information processing systems, 31, 2018.
|
| 213 |
+
|
| 214 |
+
Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. In Proceedings of the European conference on computer vision (ECCV), pp. 456–473, 2018.
|
| 215 |
+
|
| 216 |
+
Gilles Blanchard, Aniket Anand Deshmukh, Urun Dogan, Gyemin Lee, and Clayton Scott. Domain ¨ generalization by marginal transfer learning. The Journal of Machine Learning Research, 22(1): 46–100, 2021.
|
| 217 |
+
|
| 218 |
+
Manh-Ha Bui, Toan Tran, Anh Tran, and Dinh Phung. Exploiting domain-specific features to enhance domain generalization. Advances in Neural Information Processing Systems, 34:21189– 21201, 2021.
|
| 219 |
+
|
| 220 |
+
Junbum Cha, Sanghyuk Chun, Kyungjae Lee, Han-Cheol Cho, Seunghyun Park, Yunsung Lee, and Sungrae Park. Swad: Domain generalization by seeking flat minima. In Advances in Neural Information Processing Systems (NeurIPS), 2021.
|
| 221 |
+
|
| 222 |
+
Junbum Cha, Kyungjae Lee, Sungrae Park, and Sanghyuk Chun. Domain generalization by mutualinformation regularization with pre-trained models. arXiv preprint arXiv:2203.10789, 2022.
|
| 223 |
+
|
| 224 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255, 2009. doi: 10.1109/CVPR.2009.5206848.
|
| 225 |
+
|
| 226 |
+
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. URL https: //openreview.net/forum?id $=$ YicbFdNTTy.
|
| 227 |
+
|
| 228 |
+
Xinjie Fan, Qifei Wang, Junjie Ke, Feng Yang, Boqing Gong, and Mingyuan Zhou. Adversarially adaptive normalization for single domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8208–8217, 2021.
|
| 229 |
+
|
| 230 |
+
Chen Fang, Ye Xu, and Daniel N Rockmore. Unbiased metric learning: On the utilization of multiple datasets and web images for softening bias. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1657–1664, 2013.
|
| 231 |
+
|
| 232 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The journal of machine learning research, 17(1):2096–2030, 2016.
|
| 233 |
+
|
| 234 |
+
Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum? id $=$ lQdXeXDoWtI.
|
| 235 |
+
|
| 236 |
+
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.
|
| 237 |
+
|
| 238 |
+
Zeyi Huang, Haohan Wang, Eric P Xing, and Dong Huang. Self-challenging improves cross-domain generalization. In European Conference on Computer Vision, pp. 124–140. Springer, 2020.
|
| 239 |
+
|
| 240 |
+
Juwon Kang, Sohyun Lee, Namyup Kim, and Suha Kwak. Style neophile: Constantly seeking novel styles for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7130–7140, 2022.
|
| 241 |
+
|
| 242 |
+
Daehee Kim, Youngjun Yoo, Seunghyun Park, Jinkyu Kim, and Jaekoo Lee. Selfreg: Selfsupervised contrastive regularization for domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9619–9628, 2021.
|
| 243 |
+
|
| 244 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR (Poster), 2015.
|
| 245 |
+
|
| 246 |
+
David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex). In International Conference on Machine Learning, pp. 5815–5826. PMLR, 2021.
|
| 247 |
+
|
| 248 |
+
Ananya Kumar, Aditi Raghunathan, Robbie Matthew Jones, Tengyu Ma, and Percy Liang. Finetuning can distort pretrained features and underperform out-of-distribution. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum? id $=$ UYneFzXSJWh.
|
| 249 |
+
|
| 250 |
+
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference on computer vision, pp. 5542–5550, 2017.
|
| 251 |
+
|
| 252 |
+
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy Hospedales. Learning to generalize: Meta-learning for domain generalization. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018a.
|
| 253 |
+
|
| 254 |
+
Haoliang Li, Sinno Jialin Pan, Shiqi Wang, and Alex C Kot. Domain generalization with adversarial feature learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5400–5409, 2018b.
|
| 255 |
+
|
| 256 |
+
Ya Li, Xinmei Tian, Mingming Gong, Yajing Liu, Tongliang Liu, Kun Zhang, and Dacheng Tao. Deep domain generalization via conditional invariant adversarial networks. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 624–639, 2018c.
|
| 257 |
+
|
| 258 |
+
Ziyue Li, Kan Ren, Xinyang Jiang, Bo Li, Haipeng Zhang, and Dongsheng Li. Domain generalization using pretrained models without fine-tuning. arXiv preprint arXiv:2203.04600, 2022.
|
| 259 |
+
|
| 260 |
+
Fangrui Lv, Jian Liang, Shuang Li, Bin Zang, Chi Harold Liu, Ziteng Wang, and Di Liu. Causality inspired representation learning for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8046–8056, 2022.
|
| 261 |
+
|
| 262 |
+
Lucas Mansilla, Rodrigo Echeveste, Diego H Milone, and Enzo Ferrante. Domain generalization via gradient surgery. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 6630–6638, 2021.
|
| 263 |
+
|
| 264 |
+
Toshihiko Matsuura and Tatsuya Harada. Domain generalization using a mixture of multiple latent domains. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 11749– 11756, 2020.
|
| 265 |
+
|
| 266 |
+
Seonwoo Min, Nokyung Park, Siwon Kim, Seunghyun Park, and Jinkyu Kim. Grounding visual representations with texts for domain generalization. arXiv preprint arXiv:2207.10285, 2022.
|
| 267 |
+
|
| 268 |
+
Krikamol Muandet, David Balduzzi, and Bernhard Scholkopf. Domain generalization via invariant ¨ feature representation. In International Conference on Machine Learning, pp. 10–18. PMLR, 2013.
|
| 269 |
+
|
| 270 |
+
Hyeonseob Nam, HyunJae Lee, Jongchan Park, Wonjun Yoon, and Donggeun Yoo. Reducing domain gap by reducing style bias. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8690–8699, 2021.
|
| 271 |
+
|
| 272 |
+
Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018.
|
| 273 |
+
|
| 274 |
+
Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 1406–1415, 2019.
|
| 275 |
+
|
| 276 |
+
Fengchun Qiao, Long Zhao, and Xi Peng. Learning to learn single domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12556– 12565, 2020.
|
| 277 |
+
|
| 278 |
+
Joaquin Quinonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. Dataset shift in machine learning. Mit Press, 2008.
|
| 279 |
+
|
| 280 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pp. 8748–8763. PMLR, 2021.
|
| 281 |
+
|
| 282 |
+
Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollar. Designing ´ network design spaces. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10428–10436, 2020.
|
| 283 |
+
|
| 284 |
+
Alexandre Rame, Corentin Dancette, and Matthieu Cord. Fishr: Invariant gradient variances for out-of-distribution generalization. In International Conference on Machine Learning, pp. 18347– 18377. PMLR, 2022.
|
| 285 |
+
|
| 286 |
+
Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08731, 2019.
|
| 287 |
+
|
| 288 |
+
Yuge Shi, Jeffrey Seely, Philip Torr, Siddharth N, Awni Hannun, Nicolas Usunier, and Gabriel Synnaeve. Gradient matching for domain generalization. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ vDwBW49HmO.
|
| 289 |
+
|
| 290 |
+
Mannat Singh, Laura Gustafson, Aaron Adcock, Vinicius de Freitas Reis, Bugra Gedik, Raj Prateek Kosaraju, Dhruv Mahajan, Ross Girshick, Piotr Dollar, and Laurens van der Maaten. Revisiting ´ weakly supervised pre-training of visual perception models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 804–814, June 2022.
|
| 291 |
+
|
| 292 |
+
Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European conference on computer vision, pp. 443–450. Springer, 2016.
|
| 293 |
+
|
| 294 |
+
Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1521–1528. IEEE, 2011.
|
| 295 |
+
|
| 296 |
+
Vladimir Vapnik. The nature of statistical learning theory. Springer science & business media, 1999.
|
| 297 |
+
|
| 298 |
+
Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5018–5027, 2017.
|
| 299 |
+
|
| 300 |
+
Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John C Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation. Advances in neural information processing systems, 31, 2018.
|
| 301 |
+
|
| 302 |
+
Yufei Wang, Haoliang Li, and Alex C Kot. Heterogeneous domain generalization via domain mixup. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3622–3626. IEEE, 2020.
|
| 303 |
+
|
| 304 |
+
Mitchell Wortsman, Gabriel Ilharco, Jong Wook Kim, Mike Li, Simon Kornblith, Rebecca Roelofs, Raphael Gontijo Lopes, Hannaneh Hajishirzi, Ali Farhadi, Hongseok Namkoong, and Ludwig Schmidt. Robust fine-tuning of zero-shot models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 7959–7971, June 2022.
|
| 305 |
+
|
| 306 |
+
Minghao Xu, Jian Zhang, Bingbing Ni, Teng Li, Chengjie Wang, Qi Tian, and Wenjun Zhang. Adversarial domain adaptation with domain mixup. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 6502–6509, 2020.
|
| 307 |
+
|
| 308 |
+
Shen Yan, Huan Song, Nanxiang Li, Lincan Zou, and Liu Ren. Improve unsupervised domain adaptation with mixup training. arXiv preprint arXiv:2001.00677, 2020.
|
| 309 |
+
|
| 310 |
+
Xufeng Yao, Yang Bai, Xinyun Zhang, Yuechen Zhang, Qi Sun, Ran Chen, Ruiyu Li, and Bei Yu. Pcl: Proxy-based contrastive learning for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7097–7107, 2022.
|
| 311 |
+
|
| 312 |
+
Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsea Finn. Gradient surgery for multi-task learning. Advances in Neural Information Processing Systems, 33:5824–5836, 2020.
|
| 313 |
+
|
| 314 |
+
Yaodong Yu, Heinrich Jiang, Dara Bahri, Hossein Mobahi, Seungyeon Kim, Ankit Singh Rawat, Andreas Veit, and Yi Ma. An empirical study of pre-trained vision models on out-of-distribution generalization. In NeurIPS 2021 Workshop on Distribution Shifts: Connecting Methods and Applications, 2021.
|
| 315 |
+
|
| 316 |
+
Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
|
| 317 |
+
|
| 318 |
+
Jian Zhang, Lei Qi, Yinghuan Shi, and Yang Gao. Mvdg: A unified multi-view framework for domain generalization, 2021a.
|
| 319 |
+
|
| 320 |
+
Marvin Zhang, Henrik Marklund, Nikita Dhawan, Abhishek Gupta, Sergey Levine, and Chelsea Finn. Adaptive risk minimization: Learning to adapt to domain shift. Advances in Neural Information Processing Systems, 34:23664–23678, 2021b.
|
| 321 |
+
|
| 322 |
+
Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Domain generalization with mixstyle. In International Conference on Learning Representations, 2021. URL https://openreview. net/forum?id ${ . } = { }$ 6xHJ37MVxxp.
|
| 323 |
+
|
| 324 |
+
Wei Zhu, Le Lu, Jing Xiao, Mei Han, Jiebo Luo, and Adam P Harrison. Localized adversarial domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7108–7118, 2022.
|
| 325 |
+
|
| 326 |
+
# APPENDIX
|
| 327 |
+
|
| 328 |
+
# A IMPLEMENTATION DETAILS
|
| 329 |
+
|
| 330 |
+
Hyperparameter search strategy. Similar to Cha et al. (2022), the hyperparameter tuning strategy differs depending on which pre-trained model is used. In the experiments of this work, we use three different pre-trained models: ResNet-50 (He et al., 2016) pre-trained on ImageNet (Deng et al., 2009) (RN50), ViT-B/16 (Dosovitskiy et al., 2021) with CLIP (Radford et al., 2021) (CLIP), and RegNetY-16GF (Radosavovic et al., 2020) with SWAG (Singh et al., 2022) (SWAG).
|
| 331 |
+
|
| 332 |
+
Table 6: Hyperparameters used for RN50 in the experiments.
|
| 333 |
+
|
| 334 |
+
<table><tr><td>Hyperparameter</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>DomainNet</td></tr><tr><td>入</td><td>0.01</td><td>0.05</td><td>0.01</td><td>0.01</td><td>0.01</td></tr><tr><td>Learning rate</td><td>5e-5</td><td>5e-5</td><td>5e-5</td><td>5e-5</td><td>5e-5</td></tr><tr><td>Weight decay</td><td>0.0</td><td>1e-4</td><td>1e-6</td><td>0.0</td><td>1e-4</td></tr><tr><td>Dropout</td><td>0.0</td><td>0.5</td><td>0.5</td><td>0.0</td><td>0.1</td></tr></table>
|
| 335 |
+
|
| 336 |
+
A two-stage hyperparameter search strategy is used for experiments with $\mathtt { R N S O }$ . Here, the batch size and the moving average coefficient $( m )$ are fixed as 32 and 0.999 in the entire search procedure, respectively. In the first stage, we search the gradient scale factor $( \lambda )$ from $\{ 0 . 0 1 , 0 . 0 5 , 0 . 1 , 0 . 5 \}$ . In this stage, we fix the learning rate as 5e-5 and do not use weight decay and dropout (i.e., weight decay and dropout are equal to 0). In the second stage, we fix $\lambda$ as the one searched in the first stage. Then, we search the learning rate from $\{ 1 \mathrm { e } { - } 5 , 3 \mathrm { e } { - } 5 , 5 \mathrm { e } { - } 5 \}$ , weight decay from $\{ 0 , 1 { \mathrm { e } } { - } 6 , 1 { \mathrm { e } } { - } 4 \}$ , and dropout from $\{ 0 , 0 . 1 , 0 . 5 \}$ . We provide the hyperparameters we use for RN50 in Table 6.
|
| 337 |
+
|
| 338 |
+
Table 7: $\lambda$ used for CLIP and SWAG in the experiments.
|
| 339 |
+
|
| 340 |
+
<table><tr><td>Pre-trained Model</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>DomainNet</td></tr><tr><td>CLIP</td><td>0.05</td><td>0.1</td><td>0.05</td><td>0.05</td><td>0.05</td></tr><tr><td>SWAG</td><td>0.05</td><td>0.1</td><td>0.05</td><td>0.05</td><td>0.05</td></tr></table>
|
| 341 |
+
|
| 342 |
+
Unlike the experiments with RN50, we apply single-stage hyperparameter search strategy to CLIP and SWAG. Here, we only search $\lambda$ from $\left\{ 0 . 0 1 , \mathrm { { \bar { 0 } } } . 0 5 , 0 . 1 , \mathrm { { \bar { 0 . 5 } } } \right\}$ with hyperparameters such as the batch size, learning rate, weight decay, and dropout fixed. In particular, we fix the learning rate, weight decay, and dropout as the first stage of the hyperparameter search of RN50. For the batch size, we fix the batch size as 32 except for the experiments with DomainNet (Peng et al., 2019) where the batch size is fixed as 24 for the experiments with CLIP. For SWAG, we fix the batch size as 16 for all experiments. In Table 7, we show what $\lambda$ we use for CLIP and SWAG. Similar to Cha et al. (2022), we fix the number of iterations as 15,000 for DomainNet and 5,000 for the others regardless of pre-trained models.
|
| 343 |
+
|
| 344 |
+
# B ADDITIONAL RESULTS
|
| 345 |
+
|
| 346 |
+
# B.1 MAIN RESULTS
|
| 347 |
+
|
| 348 |
+
Table 8: Domain generalization accuracy $( \% )$ on the five domain generalization benchmark datasets with the three different pre-trained models. We mark $* , \dagger$ , and $\ddagger$ for the results from Gulrajani & Lopez-Paz (2021), Cha et al. (2021) and Cha et al. (2022) respectively. We use the reported numbers from each paper for Fish, Fishr, SelfReg, mDSDI, GVRT, and SMA.
|
| 349 |
+
|
| 350 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>DomainNet</td><td>Avg.</td></tr><tr><td colspan="7">Using ResNet-50 pre-trained on ImageNet.</td></tr><tr><td>MMD*</td><td>84.7 ±0.5</td><td>77.5 ±0.9</td><td>66.3 ±0.1</td><td>42.2 ±1.6</td><td>23.4 ±9.5</td><td>58.8</td></tr><tr><td>MixStyle†</td><td>85.2 ±0.3</td><td>77.9 ±0.5</td><td>60.4 ±0.3</td><td>44.0 ±0.7</td><td>34.0 ±0.1</td><td>60.3</td></tr><tr><td>GroupDRO*</td><td>84.4 ±0.8</td><td>76.7 ±0.6</td><td>66.0 ±0.7</td><td>43.2 ±1.1</td><td>33.3 ±0.2</td><td>60.7</td></tr><tr><td>IRM*</td><td>83.5 ±0.8</td><td>78.5 ±0.5</td><td>64.3 ±2.2</td><td>47.6 ±0.8</td><td>33.9 ±2.8</td><td>61.6</td></tr><tr><td>ARM*</td><td>85.1 ±0.4</td><td>77.6 ±0.3</td><td>64.8 ±0.3</td><td>45.5 ±0.3</td><td>35.5 ±0.2</td><td>61.7</td></tr><tr><td>VREx*</td><td>84.9 ±0.6</td><td>78.3 ±0.2</td><td>66.4 ±0.6</td><td>46.4 ±0.6</td><td>33.6 ±2.9</td><td>61.9</td></tr><tr><td>CDANN*</td><td>82.6 ±0.9</td><td>77.5 ±0.1</td><td>65.8 ±1.3</td><td>45.8 ±1.6</td><td>38.3 ±0.3</td><td>62.0</td></tr><tr><td>DANN*</td><td>83.6 ±0.4</td><td>78.6 ±0.4</td><td>65.9 ±0.6</td><td>46.7 ±0.5</td><td>38.3 ±0.1</td><td>62.6</td></tr><tr><td>RSC*</td><td>85.2 ±0.9</td><td>77.1 ±0.5</td><td>65.5 ±0.9</td><td>46.6 ±1.0</td><td>38.9 ±0.5</td><td>62.7</td></tr><tr><td>MTL*</td><td>84.6 ±0.5</td><td>77.2 ±0.4</td><td>66.4 ±0.5</td><td>45.6 ±1.2</td><td>40.6 ±0.1</td><td>62.9</td></tr><tr><td>Mixup*</td><td>84.6±0.6</td><td>77.4 ±0.6</td><td>68.1 ±0.3</td><td>47.9 ±0.8</td><td>39.2 ±0.1</td><td>63.4</td></tr><tr><td>MLDG*</td><td>84.9 ±1.0</td><td>77.2 ±0.4</td><td>66.8 ±0.6</td><td>47.7 ±0.9</td><td>41.2 ±0.1</td><td>63.6</td></tr><tr><td>Fish</td><td>85.5 ±0.3</td><td>77.8 ±0.3</td><td>68.6 ±0.4</td><td>45.1 ±1.3</td><td>42.7 ±0.2</td><td>63.9</td></tr><tr><td>Fishr</td><td>85.5 ±0.4</td><td>77.8 ±0.1</td><td>67.8 ±0.1</td><td>47.4 ±1.6</td><td>41.7 ±0.0</td><td>64.0</td></tr><tr><td>ERM+</td><td>84.2 ±0.1</td><td>77.3 ±0.1</td><td>67.6 ±0.2</td><td>47.8 ±0.6</td><td>44.0 ±0.1</td><td>64.2</td></tr><tr><td>SagNet*</td><td>86.3 ±0.2</td><td>77.8 ±0.5</td><td>68.1 ±0.1</td><td>48.6 ±1.0</td><td>40.3 ±0.1</td><td>64.2</td></tr><tr><td>SelfReg</td><td>85.6 ±0.4</td><td>77.8 ±0.9</td><td>67.9 ±0.7</td><td>47.0 ±0.3</td><td>42.8 ±0.0</td><td>64.2</td></tr><tr><td>CORAL*</td><td>86.2 ±0.3</td><td>78.8 ±0.6</td><td>68.7 ±0.3</td><td>47.6 ±1.0</td><td>41.5 ±0.1</td><td>64.5</td></tr><tr><td>mDSDI GVRT</td><td>86.2 ±0.2</td><td>79.0 ±0.3</td><td>69.2 ±0.4</td><td>48.1 ±1.4</td><td>42.8 ±0.1</td><td>65.1</td></tr><tr><td>MIRO</td><td>85.1 ±0.3</td><td>79.0 ±0.2</td><td>70.1 ±0.1</td><td>48.0 ±1.4</td><td>44.1 ±0.1</td><td>65.2</td></tr><tr><td></td><td>85.4 ±0.4</td><td>79.0 ±0.0</td><td>70.5 ±0.4</td><td>50.4 ±1.1</td><td>44.3 ±0.2</td><td>65.9</td></tr><tr><td>SMA</td><td>87.5 ±0.2</td><td>78.2 ±0.2</td><td>70.6 ±0.1</td><td>50.3 ±0.5</td><td>46.0 ±0.1</td><td>66.5</td></tr><tr><td>SWAD+</td><td>88.1 ±0.1</td><td>79.1 ±0.1</td><td>70.6 ±0.2</td><td>50.0 ±0.3</td><td>46.5 ±0.1</td><td>66.9</td></tr><tr><td>GESTUR</td><td>88.0 ±0.2</td><td>80.1 ±0.2</td><td>71.1 ±0.0</td><td>51.3 ±0.2</td><td>46.3 ±0.1</td><td>67.4</td></tr><tr><td colspan="7">Using ViT-B/16 with CLIP.</td></tr><tr><td>ERM</td><td>83.4 ±0.5</td><td>75.9 ±1.3</td><td>66.4 ±0.5</td><td>35.3 ±0.8</td><td>44.4 ±0.6</td><td>61.1</td></tr><tr><td>SWAD</td><td>91.3 ±0.1</td><td>79.4 ±0.4</td><td>76.9 ±0.1</td><td>45.4 ±0.5</td><td>51.7 ±0.8</td><td>68.9</td></tr><tr><td>MIROt</td><td>95.6 ±0.8</td><td>82.2 ±0.3</td><td>82.5 ±0.1</td><td>54.3 ±0.4</td><td>54.0 ±0.3</td><td>73.7</td></tr><tr><td>GESTUR</td><td>96.0 ±0.0</td><td>82.8 ±0.1</td><td>84.2 ±0.1</td><td>55.7 ±0.2</td><td>58.9 ±0.1</td><td>75.5</td></tr><tr><td colspan="7">Using RegNetY-16GF with SWAG.</td></tr><tr><td>ERM</td><td>89.6 ±0.4</td><td>78.6 ±0.3</td><td>71.9 ±0.6</td><td>51.4 ±1.8</td><td>48.5 ±0.6</td><td>68.0</td></tr><tr><td>SWAD</td><td>94.7 ±0.2</td><td>79.7 ±0.2</td><td>80.0 ±0.1</td><td>57.9 ±0.7</td><td>53.6 ±0.6</td><td>73.2</td></tr><tr><td>MIRO</td><td>97.4 ±0.2</td><td>79.9 ±0.6</td><td>80.4 ±0.2</td><td>58.9 ±1.3</td><td>53.8 ±0.1</td><td>74.1</td></tr><tr><td>SMA</td><td>95.5 ±0.0</td><td>80.7 ±0.1</td><td>82.0 ±0.0</td><td>59.7 ±0.0</td><td>60.0±0.0</td><td>75.6</td></tr><tr><td>GESTUR</td><td>96.9 ±0.1</td><td>83.5 ±0.1</td><td>83.1 ±0.0</td><td>61.1 ±0.4</td><td>60.1 ±0.0</td><td>76.9</td></tr></table>
|
| 351 |
+
|
| 352 |
+
In $\ S 3 . 2$ , we only compare baselines superior to ERM (Vapnik, 1999) with GESTUR for simplicity.
|
| 353 |
+
Here, we provide the entire results of the main experiment in Table 8.
|
| 354 |
+
|
| 355 |
+
Baselines. In the main experiment, we compare GESTUR against a number of baselines: MMD (Li et al., 2018b), MixStyle (Zhou et al., 2021), GroupDRO (Sagawa et al., 2019), IRM (Arjovsky et al., 2019), ARM (Zhang et al., 2021b), VREx (Krueger et al., 2021), CDANN (Li et al., 2018c), DANN (Ganin et al., 2016), RSC (Huang et al., 2020), MTL (Blanchard et al., 2021), Mixup (Wang et al., 2020; Xu et al., 2020; Yan et al., 2020), MLDG (Li et al., 2018a), Fish (Shi et al., 2022), Fishr (Rame et al., 2022), ERM (Vapnik, 1999), SagNet (Nam et al., 2021), Self
|
| 356 |
+
|
| 357 |
+
Reg (Kim et al., 2021), CORAL (Sun & Saenko, 2016), mDSDI (Bui et al., 2021), GVRT (Min et al., 2022), MIRO (Cha et al., 2022), SWAD (Cha et al., 2021), and SMA (Arpit et al., 2022).
|
| 358 |
+
|
| 359 |
+
B.2 APPLICABILITY OF SWAD (CHA ET AL., 2021) TO GESTUR
|
| 360 |
+
|
| 361 |
+
Table 9: Evaluation results $( \% )$ of combination of SWAD and GESTUR on the four datasets with the three different pre-trained models.
|
| 362 |
+
|
| 363 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc|Avg.</td><td></td></tr><tr><td colspan="6">Using ResNet-50 pre-trained on ImageNet.</td></tr><tr><td>GESTUR</td><td>88.0 ±0.2</td><td>80.1 ±0.2</td><td>71.1 ±0.0</td><td>51.3 ±0.2</td><td>72.6</td></tr><tr><td>GESTUR + SWAD</td><td>88.3 ±0.1</td><td>80.1 ±0.1</td><td>71.0 ±0.0</td><td>51.2 ±0.2</td><td>72.7</td></tr><tr><td colspan="6">Using ViT-B/16 with CLIP.</td></tr><tr><td>GESTUR</td><td>96.0 ±0.0</td><td>82.8 ±0.1</td><td>84.2 ±0.1</td><td>55.7 ±0.2</td><td>79.7</td></tr><tr><td>GESTUR + SWAD</td><td>95.9 ±0.0</td><td>82.8 ±0.1</td><td>84.3 ±0.0</td><td>55.3 ±0.6</td><td>79.6</td></tr><tr><td colspan="6">Using RegNetY-16GF with SWAG.</td></tr><tr><td>GESTUR</td><td>96.9 ±0.1</td><td>83.5 ±0.1</td><td>83.1 ±0.0</td><td>61.1 ±0.4</td><td>81.2</td></tr><tr><td>GESTUR + SWAD</td><td>96.8 ±0.0</td><td>83.0±0.1</td><td>83.4 ±0.1</td><td>60.6 ±0.8</td><td>81.0</td></tr></table>
|
| 364 |
+
|
| 365 |
+
Setup. The recent study (Cha et al., 2022) has observed that SWAD (Cha et al., 2021) that seeks the flat minima is a good optimizer for domain generalization, improving the generalization performance of several baselines by applying it to the baselines as a optimizer. Motivated by this observation, we evaluate the performance of our GESTUR applied with SWAD as a optimizer to verify whether GESTUR and SWAD are orthogonal directions to each other.
|
| 366 |
+
|
| 367 |
+
Results. Table 9 shows that SWAD does not improve the performance of GESTUR. We conjecture that it is because EMA used to transfer the knowledge of TE to GE has a similar effect as SWAD to find a flat minima by averaging the model’s weights.
|
| 368 |
+
|
| 369 |
+
# B.3 COMPARISON WITH CLIP-BASED BASELINES
|
| 370 |
+
|
| 371 |
+
Table 10: Evaluation results $( \% )$ on the four datasets with CLIP. Here, we compare GESTUR with CLIP-based baelines, CILP Zero-shot and WiSE-FT (Wortsman et al., 2022).
|
| 372 |
+
|
| 373 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>Avg.</td></tr><tr><td>CLIP Zero-shot</td><td>96.8 ±0.0</td><td>81.7 ±0.3</td><td>83.0±0.3</td><td>31.3 ±0.2</td><td>73.2</td></tr><tr><td>WiSE-FT (α = 0.5)</td><td>94.5 ±0.0</td><td>83.9 ±0.3</td><td>83.9 ±0.2</td><td>47.5 ±1.2</td><td>77.5</td></tr><tr><td>GESTUR</td><td>96.0 ±0.0</td><td>82.8 ±0.1</td><td>84.2 ±0.1</td><td>55.7 ±0.2</td><td>79.7</td></tr></table>
|
| 374 |
+
|
| 375 |
+
Setup. CLIP (Radford et al., 2021) is pre-trained on the huge web-crawled image-caption pair dataset and has been widely adopted in various computer vision tasks due to its generalization ability. CLIP-based methods could be strong baselines in domain generalization because the text content they used in pre-training could act as a robust anchor to the domain shift of images. Therefore, we conduct additional experiments using CLIP-based methods, CLIP Zero-shot and WiSE-FT (Wortsman et al., 2022). The CLIP-based methods require text-based queries to output text-based representations of target classes. Following the previous study, we obtain the 80 text-based queries from the official repository1 of CLIP and compute the final text-based representation of each target class by averaging the text-based representations of the queries. Finally, the model predictions are computed with the text-based representations and the representations of input images. For WiSE-FT, an ensemble of the fine-tuned and zero-shot models, we set the balance factor $\alpha$ as 0.5 following its original paper since target unseen domains are inaccessible in the domain generalization setting.
|
| 376 |
+
|
| 377 |
+
Results. Table 10 shows the evaluation results where GESTUR achieves the best averaged performance. In detail, GESTUR outperforms CLIP Zero-shot on VLCS, OfficeHome, and TerraInc, and shows comparable performance on PACS. Likewise, GESTUR achieves better performance on PACS, OfficeHome, and TerraInc than WiSE-FT and comparable performance on VLCS.
|
| 378 |
+
|
| 379 |
+
Interestingly, the CLIP-based methods exhibit severe performance degradation on TerraInc. We conjecture that their performance is sensitive to pre-defined text-based queries. For example, the query “a sketch of a $\{ \} ^ { , , }$ is helpful for the “Sketch” domain of PACS. On the other hand, the queries “a plastic $\{ \} ^ { \ast }$ and “a $\{ \}$ in a video game” are not helpful for TerraInc, which is composed of animal images taken from the wild. These observations indicate that the CLIP-based methods require hard prompt engineering for each target dataset. Moreover, the CLIP-based methods solely depend on CLIP, which cannot be extended to other architecture or learning methods trained on only visual modality, such as ResNet with ImageNet and RegNet with SWAG. Considering these, our GESTUR achieves a meaningful performance.
|
| 380 |
+
|
| 381 |
+
# C FURTHER ANALYSIS
|
| 382 |
+
|
| 383 |
+
C.1 RELATIONSHIP BETWEEN $\lambda$ AND THE TYPES OF THE PRE-TRAINED MODEL
|
| 384 |
+
|
| 385 |
+
Table 11: Evaluation results $( \% )$ on VLCS with the three different pre-trained models varying $\lambda$
|
| 386 |
+
|
| 387 |
+
<table><tr><td rowspan="2">Dataset (size)</td><td rowspan="2">Pre-training</td><td rowspan="2"> Architecture</td><td colspan="4">入</td></tr><tr><td>0.01</td><td>0.05</td><td>0.1</td><td>0.5</td></tr><tr><td>ImageNet (1.3M)</td><td>ERM</td><td>ResNet-50</td><td>78.9 ±0.3</td><td>80.1 ±0.2</td><td>80.0 ±0.1</td><td>77.6 ±0.1</td></tr><tr><td>CLIP (400M)</td><td>CLIP</td><td>ViT-B/16</td><td>81.3 ±0.4</td><td>82.7 ±0.1</td><td>82.8 ±0.1</td><td>82.1 ±0.3</td></tr><tr><td>Instagram (3.6B)</td><td>SWAG</td><td>RegNetY-16GF</td><td>81.7 ±0.0</td><td>82.7 ±0.2</td><td>83.5 ±0.1</td><td>82.4 ±0.2</td></tr></table>
|
| 388 |
+
|
| 389 |
+
Table 12: Evaluation results $( \% )$ on OfficeHome with the three different pre-trained models varying λ.
|
| 390 |
+
|
| 391 |
+
<table><tr><td rowspan="2">Dataset (size)</td><td rowspan="2"> Pre-training</td><td rowspan="2"> Architecture</td><td colspan="4">入</td></tr><tr><td>0.01</td><td>0.05</td><td>0.1</td><td>0.5</td></tr><tr><td>ImageNet (1.3M)</td><td>ERM</td><td>ResNet-50</td><td>71.1 ±0.0</td><td>71.1 ±0.1</td><td>70.4 ±0.2</td><td>68.9 ±0.1</td></tr><tr><td>CLIP (400M)</td><td>CLIP</td><td>ViT-B/16</td><td>82.5±0.2</td><td>84.2 ±0.1</td><td>84.4 ±0.0</td><td>84.7 ±0.0</td></tr><tr><td>Instagram (3.6B)</td><td>SWAG</td><td>RegNetY-16GF</td><td>81.5 ±0.2</td><td>83.1 ±0.0</td><td>83.5±0.0</td><td>81.1 ±0.1</td></tr></table>
|
| 392 |
+
|
| 393 |
+
Table 13: Evaluation results $( \% )$ on TerraIncognita with the three different pre-trained models varying $\lambda$ .
|
| 394 |
+
|
| 395 |
+
<table><tr><td rowspan="2">Dataset (size)</td><td rowspan="2"> Pre-training</td><td rowspan="2">Architecture</td><td colspan="4">入</td></tr><tr><td>0.01</td><td>0.05</td><td>0.1</td><td>0.5</td></tr><tr><td>ImageNet (1.3M)</td><td>ERM</td><td>ResNet-50</td><td>51.3 ±0.2</td><td>50.0 ±0.4</td><td>45.5 ±0.2</td><td>31.2 ±0.1</td></tr><tr><td>CLIP (400M)</td><td>CLIP</td><td>ViT-B/16</td><td>51.3±0.2</td><td>55.7 ±0.2</td><td>54.0±0.3</td><td>42.3 ±0.9</td></tr><tr><td>Instagram (3.6B)</td><td>SWAG</td><td>RegNetY-16GF</td><td>57.6±0.9</td><td>61.1 ±0.4</td><td>62.1 ±0.3</td><td>54.9 ±0.1</td></tr></table>
|
| 396 |
+
|
| 397 |
+
In $\ S \ 3 . 6$ , we analyze the relationship between $\lambda$ and the size of the pre-trained model. However, we only present the results from PACS (Li et al., 2017) in Table 5 for simplicity. Here, we provide the additional results from VLCS (Fang et al., 2013), OfficeHome (Venkateswara et al., 2017), and TerraIncognita (Beery et al., 2018) in Table 11, Table 12, and Table 13, respectively.
|
| 398 |
+
|
| 399 |
+
# C.2 PERFORMANCE ON SOURCE DOMAINS
|
| 400 |
+
|
| 401 |
+
Table 14: Evaluation results $( \% )$ on the four datasets with RN50. Here, we average the performances in the source domains, not the performance in the unseen target domain.
|
| 402 |
+
|
| 403 |
+
<table><tr><td>Method</td><td>PACS</td><td>VLCS</td><td>OfficeHome</td><td>TerraInc</td><td>Avg.</td></tr><tr><td>ERM</td><td>97.4 ±0.2</td><td>86.7 ±0.1</td><td>82.9 ±0.3</td><td>92.2 ±0.1</td><td>89.8</td></tr><tr><td>GESTUR w/ TE</td><td>97.1 ±0.1</td><td>86.9 ±0.2</td><td>81.7 ±0.2</td><td>89.4 ±0.1</td><td>88.8</td></tr><tr><td>GESTUR w/ GE</td><td>98.2 ±0.1</td><td>87.4 ±0.2</td><td>84.8 ±0.3</td><td>91.4 ±0.1</td><td>90.5</td></tr></table>
|
| 404 |
+
|
| 405 |
+
Setup. Domain generalization aims to improve the generalization performance on unseen domains shifted from source domains. Thus, domain generalization studies often do not consider situations where the source domains and the target domains are similar. To verify whether estimated unobservable gradients are useful when the unseen domains are similar to the source domains, we report the performance on the training-domain validation set, simulating the situations when the testing domains are exactly the same as the training domains.
|
| 406 |
+
|
| 407 |
+
Results. The evaluation results are summarized in Table 14. GESTUR w/ TE shows worse performance than ERM, indicating that the estimated unobservable gradients act as noisy gradients. Namely, gradients biased toward the source domains are more helpful than estimated unobservable gradients when the source domains and the target domains are similar. Nonetheless, GESTUR w/ GE performs better than ERM, demonstrating that our two-expert architecture is robust to various situations even when source domains and unseen domains are similar or not.
|
| 408 |
+
|
| 409 |
+
# C.3 SIMILARITY BETWEEN TRUE UNOBSERVABLE GRADIENTS $\mathbf { g } _ { u }$ AND ESTIMATED UNOBSERVABLE GRADIENTS $\tilde { \bf g } _ { u }$ OF GESTUR
|
| 410 |
+
|
| 411 |
+
Setup. In this paper, we argue that gradient bias is a major culprit in degrading domain generalization performance (Figure 1a) and our proposed method relieves the gradient bias by estimating unobservable gradients. To support this argument, we reported the number of iterations where gradient conflicts exist in Figure 1b and Table 3. To examine whether the estimated unobservable gradients $\tilde { \bf g } _ { u }$ are similar to the true unobservable gradients $\mathbf { g } _ { u }$ , we add the analysis calculating the cosine similarity of the true and estimated unobservable gradients. Note that the true unobservable gradients are computed by cross-entropy loss using true labels of unseen domain datasets $\mathcal { D } _ { u }$ . On the other hand, the estimated unobservable gradients are just computed as the parameter difference between GE and TE $( \theta _ { G E } - \theta _ { T E } )$ .
|
| 412 |
+
|
| 413 |
+
Results. Figure 2 shows that our estimated gradients display positive similarity scores with the true gradients. This trend demonstrates that the estimated gradients reduce the number of gradient conflicts, leading models to reduce the risks of unseen domains without accessing unseen domain data.
|
| 414 |
+
|
| 415 |
+

|
| 416 |
+
Figure 2: Cosine similarity between the true unobservable gradients $\mathbf { g } _ { u }$ and the estimated unobservable gradients $\tilde { \bf g } _ { u }$
|
parse/dev/BqxE86ufTzq/BqxE86ufTzq_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/BqxE86ufTzq/BqxE86ufTzq_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Czsdv-S4-w9/Czsdv-S4-w9.md
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENERATING VIDEOS WITH DYNAMICS-AWARE IMPLICIT GENERATIVE ADVERSARIAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Sihyun $\mathbf { V } \mathbf { u } ^ { * , 1 }$ , Jihoon Tack $^ { * , 1 }$ , Sangwoo $\mathbf { M _ { 0 } } { ^ { * , 1 } }$ , Hyunsu $\mathbf { K i m ^ { 2 } }$ , Junho $\mathbf { K i m ^ { 2 } }$ , Jung-Woo $\mathbf { H } \mathbf { a } ^ { 2 }$ , Jinwoo Shin1 1Korea Advanced Institute of Science and Technology (KAIST), 2NAVER AI Lab {sihyun.yu, jihoontack, swmo, jinwoos}@kaist.ac.kr, {hyunsu1125.kim, jhkim.ai, jungwoo.ha}@navercorp.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In the deep learning era, long video generation of high-quality still remains challenging due to the spatio-temporal complexity and continuity of videos. Existing prior works have attempted to model video distribution by representing videos as 3D grids of RGB values, which impedes the scale of generated videos and neglects continuous dynamics. In this paper, we found that the recent emerging paradigm of implicit neural representations (INRs) that encodes a continuous signal into a parameterized neural network effectively mitigates the issue. By utilizing INRs of video, we propose dynamics-aware implicit generative adversarial network (DIGAN), a novel generative adversarial network for video generation. Specifically, we introduce (a) an INR-based video generator that improves the motion dynamics by manipulating the space and time coordinates differently and (b) a motion discriminator that efficiently identifies the unnatural motions without observing the entire long frame sequences. We demonstrate the superiority of DIGAN under various datasets, along with multiple intriguing properties, e.g., long video synthesis, video extrapolation, and non-autoregressive video generation. For example, DIGAN improves the previous state-of-the-art FVD score on UCF-101 by $3 0 . 7 \%$ and can be trained on 128 frame videos of $1 2 8 \times 1 2 8$ resolution, 80 frames longer than the 48 frames of the previous state-of-the-art method.1\*
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep generative models have successfully synthesized realistic samples on various domains, including image (Brock et al., 2019; Karras et al., 2020b; 2021; Dhariwal & Nichol, 2021), text (Adiwardana et al., 2020; Brown et al., 2020), and audio (Dhariwal et al., 2020; Lakhotia et al., 2021). Recently, video generation has emerged as the next challenge of deep generative models, and thus a long line of work has been proposed to learn the video distribution (Vondrick et al., 2016; Kalchbrenner et al., 2017; Saito et al., 2017; 2020; Tulyakov et al., 2018; Acharya et al., 2018; Clark et al., 2019; Weissenborn et al., 2020; Rakhimov et al., 2020; Tian et al., 2021; Yan et al., 2021).
|
| 12 |
+
|
| 13 |
+
Despite their significant efforts, a substantial gap still exists from large-scale real-world videos. The difficulty of video generation mainly stems from the complexity of video signals; they are continuously correlated across spatio-temporal directions. Specifically, most prior works interpret the video as a 3D grid of RGB values, i.e., a sequence of 2D images, and model them with discrete decoders such as convolutional (Tian et al., 2021) or autoregressive (Yan et al., 2021) networks. However, such discrete modeling limits the scalability of generated videos due to the cubic complexity (Saito et al., 2020) and ignores the inherent continuous temporal dynamics (Gordon & Parde, 2021).
|
| 14 |
+
|
| 15 |
+
Meanwhile, implicit neural representations (INRs; Sitzmann et al. (2020); Tancik et al. (2020)) have emerged as a new paradigm for representing continuous signals. INR encodes a signal into a neural network that maps input coordinates to corresponding signal values, e.g., 2D coordinates of images to RGB values. Consequently, INR amortizes the signal values of arbitrary coordinates into a compact neural representation instead of discrete grid-wise signal values, requiring a large memory proportional to coordinate dimension and resolution. In this respect, INRs have shown to be highly effective at modeling complex signals such as 3D scenes (Mildenhall et al., 2020; Li et al., 2021a). Furthermore, INR has intriguing properties from its compactness and continuity, e.g., reduced data memory (Dupont et al., 2021a) and upsampling to arbitrary resolution (Chen et al., 2021b).
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: 128 frame video of $1 2 8 \times 1 2 8$ resolution generated by DIGAN on the Tai-Chi-HD dataset. DIGAN can train these videos with 4 NVIDIA V100 GPUs, while the prior state-of-the-art method, DVD-GAN, uses more than 32 (up to 512) TPUs for training 48 frame videos of the same resolution.
|
| 19 |
+
|
| 20 |
+
Several works utilize INRs for generative modeling, i.e., samples are generated through INRs (Chan et al., 2021; Dupont et al., 2021b; Kosiorek et al., 2021). In particular, Skorokhodov et al. (2021a) and Anokhin et al. (2021) exposed that INR-based image generative adversarial networks (GANs; Goodfellow et al. (2014)), which generate images as INRs, show impressive generation performance. Interestingly, they further merit various advantages of INRs, e.g., natural inter- and extra-polation, anycost inference (i.e., control the trade-off of quality and cost), and parallel computation, which needs a non-trivial modification to apply under other generative model architectures.
|
| 21 |
+
|
| 22 |
+
Inspired by this, we aim to design an INR-based (or implicit) video generation model by interpreting videos as continuous signals. This alternative view is surprisingly effective as INRs compactly encode the videos without 3D grids and naturally model the continuous spatio-temporal dynamics. While na¨ıvely applying INRs for videos is already fairly effective, we found that a careful design of separately manipulating space and time significantly improves the video generation.
|
| 23 |
+
|
| 24 |
+
Contribution. We introduce dynamics-aware implicit generative adversarial network (DIGAN), a novel INR-based GAN architecture for video generation. Our idea is two-fold (see Figure 2):
|
| 25 |
+
|
| 26 |
+
• Generator: We propose an INR-based video generator that decomposes the motion and content (image) features, and incorporates the temporal dynamics into the motion features.2 To be specific, our generator encourages the temporal coherency of videos by regulating the variations of motion features with a smaller temporal frequency and enhancing the expressive power of motions with an extra non-linear mapping. Moreover, our generator can create videos with diverse motions sharing the initial frame by conditioning a random motion vector to the content vector. • Discriminator: We propose a motion discriminator that efficiently detects unnatural motions from a pair of images (and their time difference) instead of a long sequence of images. Specifically, DIGAN utilizes a 2D convolutional network for the motion discriminator, unlike prior works that utilize computationally heavier 3D convolutional networks to handle the entire video at once. Such an efficient discriminating scheme is possible since INRs of videos can nonautoregressively synthesize highly correlated frames at arbitrary times.
|
| 27 |
+
|
| 28 |
+
We demonstrate the superiority of DIGAN on various datasets, including UCF-101 (Soomro et al., 2012), Tai-Chi-HD (Siarohin et al., 2019), Sky Time-lapse (Xiong et al., 2018), and a food class subset of Kinetics-600 (Carreira et al., 2018) datasets, e.g., it improves the state-of-the-art results of Frechet video distance (FVD;´ Unterthiner et al. (2018), lower is better) on UCF-101 from 833 to 577 $( + 3 0 . 7 \% )$ . Furthermore, DIGAN appreciates various intriguing properties, including,
|
| 29 |
+
|
| 30 |
+
• Long video generation: synthesize long videos of high-resolution without demanding resources on training, e.g., 128 frame video of $1 2 8 \times 1 2 8$ resolution (Figure 1)
|
| 31 |
+
• Time interpolation and extrapolation: fill in the interim frames to make videos transit smoother, and synthesize the out-of-frame videos (Figure 4, Table 2)
|
| 32 |
+
• Non-autoregressive generation: generate arbitrary time frames, e.g., previous scenes (Figure 5), and fast inference via parallel computing of multiple frames (Table 3)
|
| 33 |
+
• Diverse motion sampling: sample diverse motions from the shared initial frames (Figure 6)
|
| 34 |
+
• Space interpolation and extrapolation: upsample the resolution of videos (Figure 7, Table 4) and create zoomed-out videos while preserving temporal consistency (Figure 8)
|
| 35 |
+
|
| 36 |
+
To the best of our knowledge, we are the first to leverage INRs for video generation. We hope that our work would guide new intriguing directions for both video generation and INRs in the future.
|
| 37 |
+
|
| 38 |
+
# 2 RELATED WORK
|
| 39 |
+
|
| 40 |
+
Image generation. Image generation has achieved remarkable progress, with the advance of various techniques, including generative adversarial networks (GANs; Goodfellow et al. (2014)), autoregressive models (Ramesh et al., 2021), and diffusion models (Dhariwal & Nichol, 2021). In particular, GANs have been considered as one of the common practices for image generation, due to the fast inference at synthesizing high-resolution images (Brock et al., 2019; Karras et al., 2020b; 2021). Inspired by recent GAN architectures (Karras et al., 2020b; Skorokhodov et al., 2021a) and training techniques, (Zhao et al., 2020; Karras et al., 2020a), we extend these methods for video generation.
|
| 41 |
+
|
| 42 |
+
Video generation. Following the success of GANs on images, most prior works on video generation considered the temporal extension of image GANs (Vondrick et al., 2016; Saito et al., 2017; 2020; Tulyakov et al., 2018; Acharya et al., 2018; Clark et al., 2019; Yushchenko et al., 2019; Kahembwe & Ramamoorthy, 2020; Gordon & Parde, 2021; Tian et al., 2021; Fox et al., 2021; Munoz et al., 2021). Another line of works (Kalchbrenner et al., 2017; Weissenborn et al., 2020; Rakhimov et al., 2020; Yan et al., 2021) train autoregressive models over pixels or discretized embeddings. Despite their significant achievement, a large gap still exists between generated results and large-scale realworld videos. We aim to move towards longer video generation by exploiting the power of implicit neural representations. We provide more discussion on related fields in Appendix C.
|
| 43 |
+
|
| 44 |
+
Implicit neural representations. Implicit neural representations (INRs) have recently gained considerable attention, observing that high-frequency sinusoidal activations significantly improve continuous signal modeling (Sitzmann et al., 2020; Tancik et al., 2020). In particular, INR has proven its efficacy in modeling complex signals such as static (Chen et al., 2021b; Park et al., 2021; MartinBrualla et al., 2021) and dynamic (Li et al., 2021a;b; Pumarola et al., 2021; Xian et al., 2021) 3D scenes, and 2D videos (Chen et al., 2021a). Unlike prior works on INRs focusing on modeling a single signal, we learn a generative model over 2D videos. Moreover, while prior works focus more on rendering visually appealing 3D scenes, we aim to learn the diverse motion dynamics of videos.
|
| 45 |
+
|
| 46 |
+
Generative models with INRs. Following the success of single signals, several works utilize INRs for generative modeling. One line of works synthesizes the INR weights correspond to the signals via hypernetwork (Skorokhodov et al., 2021a; Anokhin et al., 2021; Chan et al., 2021; Dupont et al., 2021b). The other line of works controls the generated signals via input condition, i.e., concatenate the latent code corresponding to the signal to the input coordinates (Schwarz et al., 2020; Kosiorek et al., 2021). In particular, Skorokhodov et al. (2021a) and Anokhin et al. (2021) have demonstrated the effectiveness of INR-based generative models for image synthesis. We extend the applicability of INR-based GANs for video generation by incorporating temporal dynamics.
|
| 47 |
+
|
| 48 |
+
# 3 DYNAMICS-AWARE IMPLICIT GENERATIVE ADVERSARIAL NETWORK
|
| 49 |
+
|
| 50 |
+
The goal of video generation is to learn the model distribution $p _ { G } ( \mathbf { v } )$ to match with the data distribution $p _ { \mathrm { d a t a } } ( \mathbf { v } )$ , where a video $\mathbf { v }$ is defined as a continuous function of images $\mathbf { i } _ { t }$ for time $t \in \mathbb { R }$ , and an image $\mathbf { i } _ { t }$ is a function of spatial coordinates $( x , y ) \in \mathbb { R } ^ { 2 }$ . To this end, most prior works considered videos as the discretized sequence of images, i.e., 3D grid of RGB values of size $H \times W \times T$ , and generated videos with discrete decoders such as convolutional (Tian et al., 2021) or autoregressive (Yan et al., 2021) networks. However, the discretization limits video generation hard to scale due to the cubic complexity of generated videos and ignores the continuous dynamics.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
Figure 2: Illustration of the (a) generator and (b) discriminator of DIGAN. The generator creates a video INR weight from random content and motion vectors, which produces an image that corresponds to the input 2D grids $\{ ( x , y ) \}$ and time $t$ . Two discriminators determine the reality of each image and motion (from a pair of images and their time difference), respectively.
|
| 54 |
+
|
| 55 |
+
Our key idea is to directly model the videos as continuous signals using implicit neural representations (INRs; Sitzmann et al. (2020); Tancik et al. (2020)). Specifically, we propose dynamics-aware implicit generative adversarial network (DIGAN), an INR-based generative adversarial network (GAN; Goodfellow et al. (2014)) for video generation. Inspired by the success of INR-based GANs for image synthesis (Skorokhodov et al., 2021a; Anokhin et al., 2021), DIGAN extends the implicit image GANs for video generation by incorporating temporal dynamics. We briefly review INRs and INR-based GANs in Section 3.1 and then introduce our method DIGAN in Section 3.2.
|
| 56 |
+
|
| 57 |
+
# 3.1 GENERATIVE MODELING WITH IMPLICIT NEURAL REPRESENTATIONS
|
| 58 |
+
|
| 59 |
+
Consider a signal $\mathbf { v } ( \cdot ) : \mathbb { R } ^ { m } \mathbb { R } ^ { n }$ of a coordinate mapping to the corresponding signal values, e.g., videos as ${ \bf v } ( x , y , t ) = ( r , g , b )$ with $m , n = 3$ , where $( x , y , t )$ are space-time coordinates and $( r , g , b )$ are RGB values. Without loss of generality, we assume that the range of coordinates for signals are $[ 0 , 1 ]$ , e.g., $[ 0 , 1 ] ^ { 3 }$ for videos. INR aims to directly model the signal with a neural network $\mathbf { v } ( \cdot ; \boldsymbol { \phi } ) : \mathbb { R } ^ { m } \to \mathbb { R } ^ { n }$ parametrized by $\phi , e . g .$ , using a multi-layer perceptron (MLP). Recently, Tancik et al. (2020) and Sitzmann et al. (2020) found that sinusoidal activations with a high-frequency input $\sigma x$ , i.e., $\sin ( \sigma x )$ for $\sigma \gg 1$ , significantly improve the modeling of complex signals like 3D scenes (Mildenhall et al., 2020) when applied on the first layer (or entire layers). Here, one can decode the INR $\mathbf { v } ( \cdot ; \phi )$ as a standard discrete grid interpretation of signals by computing the values of predefined grid of input coordinates, e.g., $\textstyle { \bar { \left\{ \left( { \frac { i - 1 } { H - 1 } } , { \frac { \bar { j } - 1 } { W - 1 } } , { \frac { k - 1 } { T - 1 } } \right) \right\} } } \subset [ 0 , 1 ] ^ { 3 }$ for videos of size $H \times W \times T$
|
| 60 |
+
|
| 61 |
+
Leveraging the power of INRs, several works utilize them for generative models, i.e., the generator $G ( \cdot )$ maps a latent $z \sim p ( z )$ from a given prior distribution $p ( z )$ to an INR parameter $\phi = G ( z )$ that corresponds to the generated signal $\mathbf { v } ( \cdot ; \phi )$ , e.g., Chan et al. (2021). Remark that INR-based generative models synthesize the function of coordinates, unlike previous approaches that directly predict the outputs of such a function, e.g., 2D grid of RGB values for image synthesis. Hence, INR-based generative models only need to synthesize a fixed size parameter $\phi$ , which reduces the complexity of the generated outputs for complicated signals. It is especially important for higherdimensional signals than 2D images, e.g., video synthesis of grids require cubic complexity.
|
| 62 |
+
|
| 63 |
+
Specifically, Skorokhodov et al. (2021a) and Anokhin et al. (2021) propose GAN frameworks for training INR-based (or implicit) model for image generation, i.e., joint training of the discriminator $D ( \cdot )$ to distinguish the real and generated samples, while the generator $G ( \cdot )$ aims to fool the discriminator.3 In particular, they present a new generator to synthesize weights of INRs and employ conventional convolutional GAN discriminator architectures to identify the fake images decoded from INRs. Remarkably, they have shown comparable results with state-of-the-art GANs while meriting intriguing properties, e.g., inter- and extra-polation and fast inference (Skorokhodov et al., 2021a).
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 3: Generated video results of DIGAN on UCF-101 and Kinetics-food datasets.
|
| 67 |
+
|
| 68 |
+
# 3.2 INCORPORATING TEMPORAL DYNAMICS FOR IMPLICIT GANS
|
| 69 |
+
|
| 70 |
+
Our method, DIGAN, is an INR-based video GAN that incorporates the temporal dynamics into the INRs. Recall that the video INRs only differ from the image INRs by an extra time coordinate, i.e., an input becomes a 3D coordinate $( x , y , t )$ from a 2D coordinate $( x , y )$ ; hence, one can utilize the implicit image GANs for video generation by only expanding the input dimension of INRs by one (for the time coordinate). However, we found that a careful generator and discriminator design notably improves the generation quality and training efficiency. We provide the overall illustration of DIGAN in Figure 2, and explain the details of DIGAN in the remaining section.
|
| 71 |
+
|
| 72 |
+
Generator. A na¨ıve extension of implicit image GANs for synthesizing video INRs $\mathbf { v } ( x , y , t ; \phi )$ is to utilize them intactly, only modifying the first layer of INRs to handle the extra time coordinate (we assume that the INRs follow the MLP structure). This approach synthesizes the entire INR parameter $\phi$ at once, which overlooks the difference in space and time of videos, e.g., the smooth change of frames over the time direction. To alleviate this issue, we first notice that the spatial and temporal terms of video INRs can be easily decomposed. Specifically, the output of the first layer (without sinusoidal activations) of video INRs can be interpreted as $\sigma _ { x } \pmb { w } _ { x } x + \sigma _ { y } \pmb { w } _ { y } y + \sigma _ { t } \pmb { w } _ { t } t + \pmb { b } .$ , where ${ \pmb w } _ { x } , { \pmb w } _ { y } , { \pmb w } _ { t } , { \pmb b }$ are weights and biases of the first layer and $\sigma _ { x } , \sigma _ { y } , \sigma _ { t } > 0$ are frequencies of coordinates $x , y , t$ . Here, note that only the term $\sigma _ { t } \mathbf { \boldsymbol { w } } _ { t } t$ differs from the image INRs, so the outputs (of the first layer) of video INRs can be viewed as a continuous trajectory over time $t$ from the initial frame (at $t = 0$ ) determined by the content parameter $\phi _ { I } : = \phi \setminus \overline { { \{ } w _ { t } \} }$ . Inspired by this space-time decomposition view, we incorporate the temporal dynamics into the motion parameter ${ \pmb w } _ { t }$ .
|
| 73 |
+
|
| 74 |
+
To be specific, we propose three components to improve the motion parameter ${ \pmb w } _ { t }$ considering the temporal behaviors. First, we use a smaller time-frequency $\sigma _ { t }$ than space-frequencies $\sigma _ { x } , \sigma _ { y }$ since the video frames change relatively slowly over time compared to the spatial variations covering diverse objects in images. It encourages the videos to be coherent over time. Second, we sample a latent vector for motion diversity $z _ { M } \sim p _ { M } ( z _ { M } )$ in addition to the original content (image) latent vector $z _ { I } \sim p _ { I } ( z _ { I } )$ . Here, the content parameter $\phi _ { I } = G _ { I } ( z _ { I } )$ is generated as the prior implicit image GANs, but the motion parameter ${ \pmb w } _ { t } = G _ { M } ( \pmb { z } _ { I } , \pmb { z } _ { M } )$ is conditioned on both content and motion vectors; since possible motions of a video often depend on the content. Finally, we apply a non-linear mapping $f _ { M } ( \cdot )$ on top of the motion features at time $t$ to give more freedoms to motions, i.e., $f _ { M } ( \pmb { w } _ { t } t )$ . These simple modifications further improves the generation quality (Section 4.1) while creates diverse motions (Section 4.2).
|
| 75 |
+
|
| 76 |
+
Table 1: IS, FVD, and KVD values of video generation models on (a) UCF-101, (b) Sky, (c) TaiChi, and (d) Kinetics-food datasets. $\uparrow$ and $\downarrow$ imply higher and lower values are better, respectively. Subscripts denote standard deviations, and bolds indicate the best results. “Train split” and “Train+test split” denote whether the model is trained with the train split (following the setup in Saito et al. (2020)) or with the full dataset (following the setup in Tian et al. (2021)), respectively.
|
| 77 |
+
|
| 78 |
+
<table><tr><td colspan="3">(a) UCF-101</td></tr><tr><td>Method</td><td>IS (↑)</td><td>FVD (↓)</td></tr><tr><td colspan="3">Train split</td></tr><tr><td>VGAN</td><td>8.31±.09</td><td></td></tr><tr><td>TGAN</td><td>11.85±.07</td><td></td></tr><tr><td>MoCoGAN</td><td>12.42±.07</td><td></td></tr><tr><td>ProgressiveVGAN</td><td>14.56±.05</td><td></td></tr><tr><td>LDVD-GAN</td><td>22.91±.19</td><td></td></tr><tr><td>VideoGPT</td><td>24.69±.30</td><td>=</td></tr><tr><td>TGANv2</td><td>28.87±.67</td><td>1209±28</td></tr><tr><td>DIGAN (ours)</td><td>29.71±.53</td><td>655±22</td></tr><tr><td colspan="3">Train+test split</td></tr><tr><td>DVD-GAN</td><td>27.38±.53</td><td>=</td></tr><tr><td>MoCoGAN-HD DIGAN (ours)</td><td>32.36 32.70±.35</td><td>838 577±21</td></tr></table>
|
| 79 |
+
|
| 80 |
+
<table><tr><td colspan="3">(b) Sky</td></tr><tr><td>Method</td><td>FVD (↓)</td><td>KVD (↓)</td></tr><tr><td>MoCoGAN-HD DIGAN (ours)</td><td>183.6±5.2 114.6±4.3</td><td>13.9±0.7 6.8±0.5</td></tr><tr><td colspan="3">(c) TaiChi</td></tr><tr><td colspan="3">Method FVD (↓)</td></tr><tr><td colspan="3">MoCoGAN-HD 144.7±6.0 DIGAN (ours) 128.1±4.9</td></tr><tr><td colspan="3">(d) Kinetics-food</td></tr><tr><td colspan="3">Method FVD (↓)</td></tr><tr><td colspan="3">MoCoGAN-HD 430.4±29.9 DIGAN (ours) 313.3±36.9</td></tr></table>
|
| 81 |
+
|
| 82 |
+
Discriminator. As the generated videos should be natural in both images and motions, prior works on video GANs are commonly equipped with two discriminators: an image discriminator $D _ { I }$ and a motion (or video) discriminator $D _ { M }$ (Clark et al., 2019; Tian et al., 2021).4 For the image discriminator, one can utilize the well-known 2D convolutional architectures from the image GANs. However, the motion discriminator needs an additional design, e.g., 3D convolutional networks, where inputs are a sequence of images (e.g., the entire videos). The 3D convolutional motion discriminators are the main computational bottleneck of video GANs, and designing an efficient video discriminator has been widely investigated (Saito et al., 2020; Kahembwe & Ramamoorthy, 2020).
|
| 83 |
+
|
| 84 |
+
Instead of the computationally expensive 3D architectures, we propose an efficient 2D convolutional video discriminator. Here, we emphasize that video INRs can efficiently generate two frames of arbitrary times $t _ { 1 } , t _ { 2 }$ unlike autoregressive models which require generating the entire sequence. Utilizing this unique property of INRs, we adopt the image discriminator to distinguish the triplet consists of a pair of images and their time difference $( \mathbf { i } _ { t _ { 1 } } , \mathbf { i } _ { t _ { 2 } } , \Delta t )$ for $\Delta t : = | t _ { 1 } - t _ { 2 } |$ , by expanding the input channel from 3 to 7. Intriguingly, this discriminator can learn the dynamics without observing the whole sequence (Section 4.1). Moreover, we note that the two frames of INRs are highly correlated due to their continuity; the discriminator can focus on the artifacts in the motion.
|
| 85 |
+
|
| 86 |
+
# 4 EXPERIMENTS
|
| 87 |
+
|
| 88 |
+
We present the setups and main video generation results in Section 4.1. We then exhibit the intriguing properties of DIGAN in Section 4.2. Finally, we conduct ablation studies in Section 4.3.
|
| 89 |
+
|
| 90 |
+
# 4.1 VIDEO GENERATION
|
| 91 |
+
|
| 92 |
+
Model. We implement DIGAN upon the INR-GAN (Skorokhodov et al., 2021a) architecture, an INR-based GAN for image generation. The content generator $G _ { I }$ is identical to the INR-GAN gen-√ erator, but the motion generator $G _ { M }$ is added. We set the spatial frequencies $\sigma _ { x } = \sigma _ { y } = \sqrt { 1 0 }$ following the original configuration of INR-GAN, but we found that using a smaller value for the temporal frequency $\sigma _ { t }$ performs better; we use $\sigma _ { t } = 0 . 2 5$ for all experiments ff We use the same discriminator of INR-GAN for both image and motion discriminators but only differ for the input channels: 3 and 7. See Appendix A.1 for details.
|
| 93 |
+
|
| 94 |
+
Table 2: FVD values of generated videos inter- and extra-polated over time. All models are trained on 16 frame videos of $1 2 8 \times 1 2 8$ resolution. The videos are interpolated to 64 frames (i.e., $4 \times$ finer) and extrapolated 16 more frames. We measure FVD with 512 samples for Sky, since the test data size becomes less than 2,048.
|
| 95 |
+
|
| 96 |
+
<table><tr><td></td><td colspan="3">Interpolation</td><td colspan="3">Extrapolation</td></tr><tr><td>Method</td><td>Sky</td><td>TaiChi</td><td>Kinetics-food</td><td>Sky</td><td>TaiChi</td><td>Kinetics-food</td></tr><tr><td>MoCoGAN-HD</td><td>402.2±18.9</td><td>249.0±12.7</td><td>1029.8±28.4</td><td>303.2±4.3</td><td>337.8±3.7</td><td>877.8±22.6</td></tr><tr><td>DIGAN (ours)</td><td>324.2±20.5</td><td>241.6±7.5</td><td>722.2±20.1</td><td>224.3±6.2</td><td>289.3±15.6</td><td>693.7±14.1</td></tr></table>
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 4: Generated videos of MoCoGAN-HD and DIGAN, trained on 16 frame videos of $1 2 8 \times 1 2 8$ resolution on the Sky dataset. Yellow box indicates the extrapolated results until 64 frames.
|
| 102 |
+
Figure 5: Forward and backward prediction results of DIGAN. Yellow box indicates the given frame.
|
| 103 |
+
|
| 104 |
+
Table 3: Time (sec) for generating a $1 2 8 \times 1 2 8$ video for VideoGPT, MoCoGAN-HD, and DIGAN. Bolds indicate the best results.
|
| 105 |
+
|
| 106 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">Video length</td></tr><tr><td>16</td><td>32</td><td>64</td></tr><tr><td>VideoGPT</td><td>~40</td><td>~80</td><td>~170</td></tr><tr><td>MoCoGAN-HD</td><td>0.154</td><td>0.303</td><td>0.612</td></tr><tr><td>DIGAN (ours)</td><td>0.069</td><td>0.132</td><td>0.260</td></tr></table>
|
| 107 |
+
|
| 108 |
+
Datasets and evaluation. We conduct the experiments on UCF-101 (Soomro et al., 2012), Tai-ChiHD (TaiChi; Siarohin et al. (2019)), Sky Time-lapse (Sky; Xiong et al. (2018)), and a food class subset of Kinetics-600 (Kinetics-food; Carreira et al. (2018)) datasets. All models are trained on 16 frame videos of $1 2 8 \times 1 2 8$ resolution unless otherwise specified. Specifically, we use the consecutive 16 frames for UCF-101, Sky, and Kinetics-food, but stride 4 (i.e., skip 3 frames after the chosen frame) for TaiChi to make motion more dynamic. Following prior works, we report the Inception score (IS; Salimans et al. (2016)), Frechet video distance (FVD; ´ Unterthiner et al. (2018)), and kernel video distance (KVD; Unterthiner et al. (2018)). We average 10 runs for main results and 5 runs for analysis with standard deviations. See Appendix A.2 for more details.
|
| 109 |
+
|
| 110 |
+
Baselines. We mainly compare DIGAN with prior works on UCF-101, a commonly used benchmark dataset for video generation. Specifically, we consider VGAN (Vondrick et al., 2016), TGAN (Saito et al., 2017), MoCoGAN (Tulyakov et al., 2018), ProgressiveVGAN (Acharya et al., 2018), LDVDGAN (Kahembwe & Ramamoorthy, 2020), VideoGPT (Yan et al., 2021), TGANv2 (Saito et al., 2020), DVD-GAN (Clark et al., 2019), and MoCoGAN-HD (Tian et al., 2021), where the values are collected from the references. For other experiments, we compare DIGAN with the state-of-the-art method, MoCoGAN-HD, tested using the official code. See Appendix B for details.
|
| 111 |
+
|
| 112 |
+
Main results. Figure 3 and Table 1 present the qualitative and quantitative video generation results of DIGAN, respectively. DIGAN can model various video distributions, including unimodal videos like Sky and TaiChi and multimodal videos like UCF-101 and Kinetics-food. In particular, Figure 3 presents that DIGAN produces reasonably good videos for challenging multimodal videos. Also, Table 1 exhibits that DIGAN significantly outperforms the prior work on all datasets, e.g., improves the FVD of MoCoGAN-HD from 833 to 577 $( + 3 0 . 7 \% )$ on UCF-101. We remark that the Frechet ´ inception distance (FID; Heusel et al. (2017)), a metric for image quality, of DIGAN is similar to the MoCoGAN-HD. Thus, the FVD gains of DIGAN come from better dynamics modeling.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 6: Videos sampled from two random motion vectors. The first two rows are generated videos, and the third row is the pixel difference between the two videos (yellow implies more differences).
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 7: Videos upsampled from $1 2 8 \times 1 2 8$ to $5 1 2 \times 5 1 2$ resolution $4 \times$ larger) on TaiChi dataset.
|
| 119 |
+
|
| 120 |
+
Table 4: FVD values of videos upsampled from $1 2 8 \times 1 2 8$ to $2 5 6 \times 2 5 6$ resolution $2 \times$ larger) on TaiChi dataset.
|
| 121 |
+
|
| 122 |
+
<table><tr><td>Method</td><td>FVD (↓)</td></tr><tr><td>Nearest</td><td>180.6±5.1</td></tr><tr><td>Bilinear</td><td>236.7±6.7</td></tr><tr><td>Bicubic</td><td>175.9±5.4</td></tr><tr><td>DIGAN (ours)</td><td>156.7±6.2</td></tr></table>
|
| 123 |
+
|
| 124 |
+
# 4.2 INTRIGUING PROPERTIES
|
| 125 |
+
|
| 126 |
+
Long video generation. The primary advantage of DIGAN is an effective generation of long and high-quality videos, leveraging the compact representations of INRs. We also remark that DIGAN can be efficiently trained on the long videos, as the motion discriminator of DIGAN only handles a pair of images instead of long image sequences. To verify the efficacy of DIGAN, we train a model using 128 frame videos of $1 2 8 \times 1 2 8$ resolution from the TaiChi dataset. Figure 1 shows that DIGAN produces a long and natural motion with reasonable visual quality. To our best knowledge, we are the first to report 128 frame videos of this quality. See Appendix F for more results.
|
| 127 |
+
|
| 128 |
+
Time interpolation and extrapolation. DIGAN can easily interpolate (i.e., fill in interim frames) or extrapolate (i.e., create out-of-frame videos) videos over time by controlling input coordinates. The videos inter- or extra-polated by DIGAN are more natural than those from discrete generative models, as INRs model videos continuously. Table 2 shows that DIGAN outperforms MoCoGAN-HD on all considered inter- and extra-polation scenarios. In particular, DIGAN is remarkably effective for time extrapolation as INRs regularize the videos smoothly follow the scene flows defined by previous dynamics. Figure 4 shows that DIGAN can even extrapolate to $4 \times$ longer frames while MoCoGAN-HD fails on the Sky dataset. See Appendix G for more results.
|
| 129 |
+
|
| 130 |
+
Non-autoregressive generation. DIGAN can generate samples of arbitrary time: it enables DIGAN to infer the past or interim frames from future frames or parallelly compute the entire video at once. It is impossible for many prior video generation approaches that sample the next frame conditioned on the previous frames in an autoregressive manner. Figure 5 visualizes the forward and backward prediction results of DIGAN on the TaiChi dataset, conditioned on the initial frame indicated by the yellow box. Here, we find the content and motion latent codes by projecting the initial frames of $i = \{ 6 , 7 , 8 \}$ and predict the frames of $t \in \{ 3 , \ldots , 1 1 \}$ . DIGAN well predicts both past and future motions, e.g., slowly lowering arms. DIGAN can also infer the interim frames from past and future frames, as shown in Appendix E.2. On the other hand, Table 3 shows the generation speed of DIGAN is much faster than its competitors, VideoGPT and MoCoGAN-HD. Different from prior works, we remark that DIGAN can compute multiple frames in parallel; generation can be $N$ times further faster under $N$ number of GPUs. For more analysis about the efficiency, see Appendix I.
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 8: Zoomed-out samples. Red boxes indicate the original frames.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 9: Samples of linearly interpolated INR weights $\phi _ { i }$ over $\lambda$ , i.e., $( 1 - \lambda ) \phi _ { 1 } + \lambda \phi _ { 2 }$ on TaiChi dataset.
|
| 137 |
+
|
| 138 |
+
Table 5: Ablation study of the generator components: smaller frequency $\sigma _ { t }$ , motion vector $z _ { M }$ , and non-linearity by MLP $f _ { M } ( \cdot )$ .
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Freq. Ot</td><td>Motion zM</td><td>MLP fm(-)</td><td>FVD (↓)</td></tr><tr><td>-</td><td></td><td></td><td>686±25</td></tr><tr><td>√</td><td>=</td><td></td><td>640±22</td></tr><tr><td>√</td><td>√</td><td></td><td>585±27</td></tr><tr><td>√</td><td>√</td><td>厂</td><td>577±21</td></tr></table>
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 10: Discriminator logits for a far image pair $( i _ { 0 } , i _ { 1 } )$ , conditioned over different $\Delta t$ .
|
| 144 |
+
|
| 145 |
+
Diverse motion sampling. DIGAN can generate diverse videos from the initial frame by controlling the motion vectors. Figure 6 shows the videos from two random motion vectors on the Sky dataset. Note that the shape of clouds moves differently, but the tree in the left below stays. The freedom of variations conditioned on the initial frame depends on datasets, as discussed in Appendix D.
|
| 146 |
+
|
| 147 |
+
Space interpolation and extrapolation. DIGAN can also inter- and extra-polate videos in the space directions. Figure 7 and Table 4 show the qualitative and quantitative results for space interpolation (i.e., upsampling) on the TaiChi dataset. DIGAN produces $4 \times$ higher resolution videos without ad-hoc training tricks, outperforming na¨ıve heuristics such as bicubic interpolation. Figure 8 visualizes the space extrapolation (i.e., zoom-out) results on various datasets. DIGAN creates out-of-box scenes while preserving temporal consistency. See Appendix H for more results.
|
| 148 |
+
|
| 149 |
+
INR weight interpolation. Interpolation of INR parameter sampled from DIGAN produces semantically meaningful videos. Figure 9 visualizes the videos from the linearly interpolated INR parameters on the TaiChi dataset. The videos smoothly vary over interpolation, e.g., cloth color changes from white to blue. It is not obvious as the INR weights lie in a structured, high-dimensional space.
|
| 150 |
+
|
| 151 |
+
# 4.3 ABLATION STUDIES
|
| 152 |
+
|
| 153 |
+
We conduct the ablation studies on the components of DIGAN. Table 5 shows that all the proposed generator components: smaller frequency $\sigma _ { t }$ , motion vector $z _ { M }$ , and non-linear MLP mapping $f _ { M } ( \cdot )$ contribute to the generation performance measured by FVD scores on the UCF-101 dataset. We note that the motion vector $z _ { M }$ and MLP $f _ { M } ( \cdot )$ remarkably affect FVD when applied solely, but the allcombination result is saturated. On the other hand, Figure 10 verifies that the motion discriminator considers the time difference $\Delta t$ of a given pair of images. Specifically, we provide a far image pair $( i _ { 0 } , i _ { 1 } )$ , i.e., the first and the last frames, with the time difference $\Delta t$ . The motion discriminator thinks the triplet $( i _ { 0 } , i _ { 1 } , \Delta t )$ is fake if $\Delta t \approx 0$ and real if $\Delta t \approx 1$ , as the real difference is $\Delta t = 1$ . Namely, the discriminator leverages $\Delta t$ to identify whether the input triplets are real or fake.
|
| 154 |
+
|
| 155 |
+
# 5 CONCLUSION
|
| 156 |
+
|
| 157 |
+
We proposed DIGAN, an implicit neural representation (INR)-based generative adversarial network (GAN) for video generation, incorporating the temporal dynamics of videos. Extensive experiments verified the superiority of DIGAN with multiple intriguing properties. We believe our work would guide various directions in video generation and INR research in the future.
|
| 158 |
+
|
| 159 |
+
# ETHICS STATEMENT
|
| 160 |
+
|
| 161 |
+
Video generation has potential threats of creating videos for unethical purposes, e.g., fake propaganda videos of politicians or sexual videos of any individuals. The generated videos, often called DeepFake, have arisen as an important social problem (Westerlund, 2019). To tackle the issue, there have been enormous efforts in detecting fake videos (e.g., Guera & Delp (2018)). Here, we claim that the generation and detection techniques should be developed in parallel, rather than prohibiting the generation research itself. This is because the advance of technology is inevitable, and such prohibition only promotes the technology hide in the dark, making them hard to pick out.
|
| 162 |
+
|
| 163 |
+
In this respect, the generative adversarial network (GAN) is a neat solution as it naturally trains both generator and discriminator (or detector). Notably, the discriminator trained by GAN can effectively detect the fake samples created by other generative models (Wang et al., 2020). Our proposed video generation method, DIGAN, is also built upon the GAN framework. In particular, we introduced a discriminator that identifies the fake videos without observing long sequences. We believe our proposed discriminator would be a step towards designing an efficient DeepFake detector.
|
| 164 |
+
|
| 165 |
+
# REPRODUCIBILITY STATEMENT
|
| 166 |
+
|
| 167 |
+
We describe the implementation details of the model in Appendix A.1, and details of the datasets and evaluation in Appendix A.2. We also provide our code in the supplementary material.
|
| 168 |
+
|
| 169 |
+
# ACKNOWLEDGMENTS AND DISCLOSURE OF FUNDING
|
| 170 |
+
|
| 171 |
+
SY thanks Jaeho Lee, Younggyo Seo, Minkyu Kim, Soojung Yang, Seokhyun Moon, Jin-Hwa Kim, and anonymous reviewers for their helpful feedbacks on the early version of the manuscript. SY also acknowledges Ivan Skorokhodov for providing the implementation of INR-GAN. This work was mainly supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.2021-0-02068, Artificial Intelligence Innovation Hub; No.2019-0-00075, Artificial Intelligence Graduate School Program (KAIST)). This work was partly experimented on the NAVER Smart Machine Learning (NSML) platform (Sung et al., 2017; Kim et al., 2018). This work was partly supported by KAIST-NAVER Hypercreative AI Center.
|
| 172 |
+
|
| 173 |
+
# REFERENCES
|
| 174 |
+
|
| 175 |
+
Dinesh Acharya, Zhiwu Huang, Danda Pani Paudel, and Luc Van Gool. Towards high resolution video generation with progressive growing of sliced Wasserstein GANs. arXiv preprint arXiv:1810.02419, 2018.
|
| 176 |
+
Daniel Adiwardana, Minh-Thang Luong, David R So, Jamie Hall, Noah Fiedel, Romal Thoppilan, Zi Yang, Apoorv Kulshreshtha, Gaurav Nemade, Yifeng Lu, et al. Towards a human-like opendomain chatbot. arXiv preprint arXiv:2001.09977, 2020.
|
| 177 |
+
Ivan Anokhin, Kirill Demochkin, Taras Khakhulin, Gleb Sterkin, Victor Lempitsky, and Denis Korzhenkov. Image generators with conditionally-independent pixel synthesis. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 178 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. ´ In International Conference on Machine Learning, 2017.
|
| 179 |
+
Mohammad Babaeizadeh, Chelsea Finn, Dumitru Erhan, Roy H Campbell, and Sergey Levine. Stochastic variational video prediction. In International Conference on Learning Representations, 2018.
|
| 180 |
+
Mohammad Babaeizadeh, Mohammad Taghi Saffar, Suraj Nair, Sergey Levine, Chelsea Finn, and Dumitru Erhan. FitVid: Overfitting in pixel-level video prediction. arXiv preprint arXiv:2106.13195, 2021.
|
| 181 |
+
|
| 182 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In International Conference on Learning Representations, 2019.
|
| 183 |
+
|
| 184 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D 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 Ziegler, Jeffrey Wu, Clemens Winter, Chris 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. In Advances in Neural Information Processing Systems, 2020.
|
| 185 |
+
|
| 186 |
+
Joao Carreira, Eric Noland, Andras Banki-Horvath, Chloe Hillier, and Andrew Zisserman. A short note about Kinetics-600. arXiv preprint arXiv:1808.01340, 2018.
|
| 187 |
+
|
| 188 |
+
Eric R Chan, Marco Monteiro, Petr Kellnhofer, Jiajun Wu, and Gordon Wetzstein. Pi-GAN: Periodic implicit generative adversarial networks for 3D-aware image synthesis. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 189 |
+
|
| 190 |
+
Hao Chen, Bo He, Hanyu Wang, Yixuan Ren, Ser Nam Lim, and Abhinav Shrivastava. NeRV: Neural representations for videos. Advances in Neural Information Processing Systems, 34, 2021a.
|
| 191 |
+
|
| 192 |
+
Yinbo Chen, Sifei Liu, and Xiaolong Wang. Learning continuous image representation with local implicit image function. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021b.
|
| 193 |
+
|
| 194 |
+
Aidan Clark, Jeff Donahue, and Karen Simonyan. Adversarial video generation on complex datasets. arXiv preprint arXiv:1907.06571, 2019.
|
| 195 |
+
|
| 196 |
+
Emily Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. In Advances in Neural Information Processing Systems, 2017.
|
| 197 |
+
|
| 198 |
+
Emily Denton and Rob Fergus. Stochastic video generation with a learned prior. In International Conference on Machine Learning, 2018.
|
| 199 |
+
|
| 200 |
+
Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with Cutout. arXiv preprint arXiv:1708.04552, 2017.
|
| 201 |
+
|
| 202 |
+
Prafulla Dhariwal and Alex Nichol. Diffusion models beat GANs on image synthesis. arXiv preprint arXiv:2105.05233, 2021.
|
| 203 |
+
|
| 204 |
+
Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, and Ilya Sutskever. Jukebox: A generative model for music. arXiv preprint arXiv:2005.00341, 2020.
|
| 205 |
+
|
| 206 |
+
Emilien Dupont, Adam Golinski, Milad Alizadeh, Yee Whye Teh, and Arnaud Doucet. COIN: ´ Compression with implicit neural representations. arXiv preprint arXiv:2103.03123, 2021a.
|
| 207 |
+
|
| 208 |
+
Emilien Dupont, Yee Whye Teh, and Arnaud Doucet. Generative models as distributions of functions. arXiv preprint arXiv:2102.04776, 2021b.
|
| 209 |
+
|
| 210 |
+
Chelsea Finn, Ian Goodfellow, and Sergey Levine. Unsupervised learning for physical interaction through video prediction. In Advances in Neural Information Processing Systems, 2016.
|
| 211 |
+
|
| 212 |
+
Gereon Fox, Ayush Tewari, Mohamed Elgharib, and Christian Theobalt. StyleVideoGAN: A temporal generative model using a pretrained StyleGAN. arXiv preprint arXiv:2107.07224, 2021.
|
| 213 |
+
|
| 214 |
+
Jean-Yves Franceschi, Edouard Delasalles, Mickael Chen, Sylvain Lamprier, and Patrick Gallinari. ¨ Stochastic latent residual video prediction. In International Conference on Machine Learning, 2020.
|
| 215 |
+
|
| 216 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 2014.
|
| 217 |
+
|
| 218 |
+
Cade Gordon and Natalie Parde. Latent neural differential equations for video generation. In NeurIPS 2020 Workshop on Pre-registration in Machine Learning, 2021.
|
| 219 |
+
|
| 220 |
+
David Guera and Edward J. Delp. Deepfake video detection using recurrent neural networks. IEEE International Conference on Advanced Video and Signal Based Surveillance, 2018.
|
| 221 |
+
|
| 222 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, 2017.
|
| 223 |
+
|
| 224 |
+
Jun-Ting Hsieh, Bingbin Liu, De-An Huang, Li Fei-Fei, and Juan Carlos Niebles. Learning to decompose and disentangle representations for video prediction. In Advances in Neural Information Processing Systems, 2018.
|
| 225 |
+
|
| 226 |
+
Emmanuel Kahembwe and Subramanian Ramamoorthy. Lower dimensional kernels for video discriminators. Neural Networks, 132:506–520, 2020.
|
| 227 |
+
|
| 228 |
+
Nal Kalchbrenner, Aaron Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and ¨ Koray Kavukcuoglu. Video pixel networks. In International Conference on Machine Learning, 2017.
|
| 229 |
+
|
| 230 |
+
Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li FeiFei. Large-scale video classification with convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2014.
|
| 231 |
+
|
| 232 |
+
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. International Conference on Learning Representations, 2017.
|
| 233 |
+
|
| 234 |
+
Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In Advances in Neural Information Processing Systems, 2020a.
|
| 235 |
+
|
| 236 |
+
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In IEEE Conference on Computer Vision and Pattern Recognition, 2020b.
|
| 237 |
+
|
| 238 |
+
Tero Karras, Miika Aittala, Samuli Laine, Erik Hark ¨ onen, Janne Hellsten, Jaakko Lehtinen, and ¨ Timo Aila. Alias-free generative adversarial networks. arXiv preprint arXiv:2106.12423, 2021.
|
| 239 |
+
|
| 240 |
+
Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017.
|
| 241 |
+
|
| 242 |
+
Hanjoo Kim, Minkyu Kim, Dongjoo Seo, Jinwoong Kim, Heungseok Park, Soeun Park, Hyunwoo Jo, KyungHyun Kim, Youngil Yang, Youngkwan Kim, et al. Nsml: Meet the MLaaS platform with a real-world case study. arXiv preprint arXiv:1810.09957, 2018.
|
| 243 |
+
|
| 244 |
+
Adam R Kosiorek, Heiko Strathmann, Daniel Zoran, Pol Moreno, Rosalia Schneider, Sona Mokr ˇ a,´ and Danilo J Rezende. NeRF-VAE: A geometry aware 3D scene generative model. International Conference on Machine Learning, 2021.
|
| 245 |
+
|
| 246 |
+
Manoj Kumar, Mohammad Babaeizadeh, Dumitru Erhan, Chelsea Finn, Sergey Levine, Laurent Dinh, and Durk Kingma. Videoflow: A conditional flow-based model for stochastic video generation. In International Conference on Learning Representations, 2020.
|
| 247 |
+
|
| 248 |
+
Kushal Lakhotia, Evgeny Kharitonov, Wei-Ning Hsu, Yossi Adi, Adam Polyak, Benjamin Bolte, Tu-Anh Nguyen, Jade Copet, Alexei Baevski, Adelrahman Mohamed, et al. Generative spoken language modeling from raw audio. arXiv preprint arXiv:2102.01192, 2021.
|
| 249 |
+
|
| 250 |
+
Alex X Lee, Richard Zhang, Frederik Ebert, Pieter Abbeel, Chelsea Finn, and Sergey Levine. Stochastic adversarial video prediction. arXiv preprint arXiv:1804.01523, 2018.
|
| 251 |
+
|
| 252 |
+
Wonkwang Lee, Whie Jung, Han Zhang, Ting Chen, Jing Yu Koh, Thomas Huang, Hyungsuk Yoon, Honglak Lee, and Seunghoon Hong. Revisiting hierarchical approach for persistent long-term video prediction. In International Conference on Learning Representations, 2021.
|
| 253 |
+
|
| 254 |
+
Tianye Li, Mira Slavcheva, Michael Zollhoefer, Simon Green, Christoph Lassner, Changil Kim, Tanner Schmidt, Steven Lovegrove, Michael Goesele, and Zhaoyang Lv. Neural 3D video synthesis. arXiv preprint arXiv:2103.02597, 2021a.
|
| 255 |
+
|
| 256 |
+
Zhengqi Li, Simon Niklaus, Noah Snavely, and Oliver Wang. Neural scene flow fields for spacetime view synthesis of dynamic scenes. In IEEE Conference on Computer Vision and Pattern Recognition, 2021b.
|
| 257 |
+
|
| 258 |
+
Yuchen Liu, Zhixin Shu, Yijun Li, Zhe Lin, Federico Perazzi, and Sun-Yuan Kung. Content-aware GAN compression. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 259 |
+
|
| 260 |
+
Pauline Luc, Aidan Clark, Sander Dieleman, Diego de Las Casas, Yotam Doron, Albin Cassirer, and Karen Simonyan. Transformation-based adversarial video prediction on large-scale data. arXiv preprint arXiv:2003.04035, 2020.
|
| 261 |
+
|
| 262 |
+
Ricardo Martin-Brualla, Noha Radwan, Mehdi SM Sajjadi, Jonathan T Barron, Alexey Dosovitskiy, and Daniel Duckworth. NeRF in the wild: Neural radiance fields for unconstrained photo collections. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 263 |
+
|
| 264 |
+
Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In International Conference on Machine Learning, 2018.
|
| 265 |
+
|
| 266 |
+
Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In European Conference on Computer Vision, 2020.
|
| 267 |
+
|
| 268 |
+
Andres Munoz, Mohammadreza Zolfaghari, Max Argus, and Thomas Brox. Temporal shift GAN for large scale video generation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 2021.
|
| 269 |
+
|
| 270 |
+
Keunhong Park, Utkarsh Sinha, Jonathan T Barron, Sofien Bouaziz, Dan B Goldman, Steven M Seitz, and Ricardo Martin-Brualla. Deformable neural radiance fields. In IEEE International Conference on Computer Vision, 2021.
|
| 271 |
+
|
| 272 |
+
Albert Pumarola, Enric Corona, Gerard Pons-Moll, and Francesc Moreno-Noguer. D-NeRF: Neural radiance fields for dynamic scenes. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 273 |
+
|
| 274 |
+
Ruslan Rakhimov, Denis Volkhonskiy, Alexey Artemov, Denis Zorin, and Evgeny Burnaev. Latent video transformer. arXiv preprint arXiv:2006.10704, 2020.
|
| 275 |
+
|
| 276 |
+
Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021.
|
| 277 |
+
|
| 278 |
+
Masaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal generative adversarial nets with singular value clipping. In IEEE International Conference on Computer Vision, 2017.
|
| 279 |
+
|
| 280 |
+
Masaki Saito, Shunta Saito, Masanori Koyama, and Sosuke Kobayashi. Train sparsely, generate densely: Memory-efficient unsupervised training of high-resolution temporal GAN. International Journal of Computer Vision, 128:2586–2606, 2020.
|
| 281 |
+
|
| 282 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. Advances in Neural Information Processing Systems, 2016.
|
| 283 |
+
|
| 284 |
+
Katja Schwarz, Yiyi Liao, Michael Niemeyer, and Andreas Geiger. GRAF: Generative radiance fields for 3D-aware image synthesis. In Advances in Neural Information Processing Systems, 2020.
|
| 285 |
+
|
| 286 |
+
Aliaksandr Siarohin, Stephane Lathuili ´ ere, Sergey Tulyakov, Elisa Ricci, and Nicu Sebe. First order \` motion model for image animation. In Advances in Neural Information Processing Systems, 2019.
|
| 287 |
+
|
| 288 |
+
Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. Advances in Neural Information Processing Systems, 2020.
|
| 289 |
+
|
| 290 |
+
Ivan Skorokhodov, Savva Ignatyev, and Mohamed Elhoseiny. Adversarial generation of continuous images. In IEEE Conference on Computer Vision and Pattern Recognition, 2021a.
|
| 291 |
+
|
| 292 |
+
Ivan Skorokhodov, Sergey Tulyakov, and Mohamed Elhoseiny. StyleGAN-V: A continuous video generator with the price, image quality and perks of StyleGAN2. arXiv preprint arXiv:2112.14683, 2021b.
|
| 293 |
+
|
| 294 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
|
| 295 |
+
|
| 296 |
+
Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using LSTMs. In International Conference on Machine Learning, 2015.
|
| 297 |
+
|
| 298 |
+
Nako Sung, Minkyu Kim, Hyunwoo Jo, Youngil Yang, Jingwoong Kim, Leonard Lausen, Youngkwan Kim, Gayoung Lee, Donghyun Kwak, Jung-Woo Ha, and Sunghun Kim. NSML: A machine learning platform that enables you to focus on your models. In arXiv, 2017.
|
| 299 |
+
|
| 300 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 301 |
+
|
| 302 |
+
Matthew Tancik, Pratul P Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan T Barron, and Ren $\mathrm { N g }$ . Fourier features let networks learn high frequency functions in low dimensional domains. arXiv preprint arXiv:2006.10739, 2020.
|
| 303 |
+
|
| 304 |
+
Yu Tian, Jian Ren, Menglei Chai, Kyle Olszewski, Xi Peng, Dimitris N Metaxas, and Sergey Tulyakov. A good image generator is what you need for high-resolution video synthesis. In International Conference on Learning Representations, 2021.
|
| 305 |
+
|
| 306 |
+
Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3D convolutional networks. In IEEE International Conference on Computer Vision, 2015.
|
| 307 |
+
|
| 308 |
+
Sergey Tulyakov, Ming-Yu Liu, Xiaodong Yang, and Jan Kautz. MoCoGAN: Decomposing motion and content for video generation. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
|
| 309 |
+
|
| 310 |
+
Thomas Unterthiner, Sjoerd van Steenkiste, Karol Kurach, Raphael Marinier, Marcin Michalski, and Sylvain Gelly. Towards accurate generative models of video: A new metric & challenges. arXiv preprint arXiv:1812.01717, 2018.
|
| 311 |
+
|
| 312 |
+
Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In Advances in Neural Information Processing Systems, 2017.
|
| 313 |
+
|
| 314 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, 2017.
|
| 315 |
+
|
| 316 |
+
Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In International Conference on Learning Representations, 2017.
|
| 317 |
+
|
| 318 |
+
Ruben Villegas, Arkanath Pathak, Harini Kannan, Dumitru Erhan, Quoc V Le, and Honglak Lee. High fidelity video prediction with large stochastic recurrent neural networks. In Advances in Neural Information Processing Systems, 2019.
|
| 319 |
+
|
| 320 |
+
Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In Advances in Neural Information Processing Systems, 2016.
|
| 321 |
+
|
| 322 |
+
Sheng-Yu Wang, Oliver Wang, Richard Zhang, Andrew Owens, and Alexei A Efros. CNN-generated images are surprisingly easy to spot... for now. In IEEE Conference on Computer Vision and Pattern Recognition, 2020.
|
| 323 |
+
|
| 324 |
+
Dirk Weissenborn, Oscar Tackstr ¨ om, and Jakob Uszkoreit. Scaling autoregressive video models. In ¨ International Conference on Learning Representations, 2020.
|
| 325 |
+
|
| 326 |
+
Mika Westerlund. The emergence of deepfake technology: A review. Technology Innovation Management Review, 9:40–53, 11/2019 2019.
|
| 327 |
+
|
| 328 |
+
Wenqi Xian, Jia-Bin Huang, Johannes Kopf, and Changil Kim. Space-time neural irradiance fields for free-viewpoint video. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
|
| 329 |
+
|
| 330 |
+
Wei Xiong, Wenhan Luo, Lin Ma, Wei Liu, and Jiebo Luo. Learning to generate time-lapse videos using multi-stage dynamic generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
|
| 331 |
+
|
| 332 |
+
Wilson Yan, Yunzhi Zhang, Pieter Abbeel, and Aravind Srinivas. VideoGPT: Video generation using VQ-VAE and transformers. arXiv preprint arXiv:2104.10157, 2021.
|
| 333 |
+
|
| 334 |
+
Vladyslav Yushchenko, Nikita Araslanov, and Stefan Roth. Markov decision process for video generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, 2019.
|
| 335 |
+
|
| 336 |
+
Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient GAN training. In Advances in Neural Information Processing Systems, 2020.
|
| 337 |
+
|
| 338 |
+
# A IMPLEMENTATION DETAILS
|
| 339 |
+
|
| 340 |
+
# A.1 MODEL DETAILS
|
| 341 |
+
|
| 342 |
+
Following the original configuration of INR-GAN (Skorokhodov et al., 2021a), we set the same spatial frequencies $\sigma _ { x } = \sigma _ { y } = \sqrt { 1 0 }$ and StyleGAN2 (Karras et al., 2020b) discriminator. We use a small temporal frequency $\sigma _ { t } = 0 . 2 5$ to encourage temporal coherence. Here, we remark that the number of frames used in most experiments (16) is much smaller than the image resolution (128), which also affects choosing the $\sigma _ { t }$ . In this respect, choosing a larger $\sigma _ { t }$ (but still smaller than $\sigma _ { x } , \sigma _ { y } )$ can boost the performance for longer videos, e.g., we use $\sigma _ { t } = 0 . 5$ for training on 128 frame videos.
|
| 343 |
+
|
| 344 |
+
In all experiments, we sample $\Delta t : = | t _ { 1 } - t _ { 2 } |$ by subtracting the values from two different beta distributions $t _ { 1 } \sim \tt B e t a ( 2 , 1 )$ , $t _ { 2 } \sim \tt B e t a ( 1 , 2 )$ for both real and generated videos. Such distributions can sample $\Delta t$ diversely (e.g., measured with 10,000 samples, $3 6 . 5 \%$ , $4 2 . 7 \%$ , and $2 0 . 8 \%$ of $\Delta t$ is in the interval of $[ 0 , { \frac { 1 } { 3 } } ] , [ { \frac { 1 } { 3 } } , { \frac { 2 } { 3 } } ]$ , and $[ \tilde { \frac { 2 } { 3 } } , 1 ]$ , respectively), and indeed worked well in our experiments.
|
| 345 |
+
|
| 346 |
+
Like in INR-GAN, we also use a progressive multi-layer perception (MLP) with a factorized multiplicative modulation layers as implicit neural representation architecture. For non-linear mapping ${ \bar { f _ { M } } } ( \cdot )$ , we use the 2-layer MLP with leaky ReLU activation and, no bias are applied for motion vectors. We also apply DiffAug (Zhao et al., 2020) to mitigate overfitting from the limited number of videos like in Tian et al. (2021). Specifically, we use all augmentations proposed from DiffAug except CutOut (DeVries & Taylor, 2017), and use the same augmentation to the same video. All other hyperparameters are identical to StyleGAN2 except for $R _ { 1 }$ regularization coefficient $\gamma$ : we use $\gamma = 1$ in all experiments. With these setups, all the experiments are processed with 4 NVIDIA V100 32GB GPUs where it takes at most ${ \sim } 4 . 4$ days to complete.
|
| 347 |
+
|
| 348 |
+
We note that standard generative adversarial networks (GANs; Goodfellow et al. (2014)) and implicit GANs are in a dual relation as the former samples the input latent while the latter samples the network parameters, which are combined to compute the final outputs. However, the generator of implicit GAN resembles the one of StyleGAN2 in practice since StyleGAN2 injects the input latent to the intermediate layers through the mapping network and modulates the weights with them.
|
| 349 |
+
|
| 350 |
+
# A.2 DATASET AND EVALUATION DETAILS
|
| 351 |
+
|
| 352 |
+
Datasets. In what follows, we describe datasets that we used for the evaluation of our method. All videos are first pre-processed to video clips of consecutive 16 frames, unless otherwise specified.
|
| 353 |
+
|
| 354 |
+
• UCF-101 (Soomro et al., 2012) is a 101-class video action dataset total of 13,320 videos with $3 2 0 \times 2 4 0$ resolution. Each video clip is center-cropped to $2 4 0 \times 2 4 0$ and resized into $1 2 8 \times 1 2 8$ resolution. We conducted two different experiments for a fair comparison: training the model with the train split of 9,357 videos or with all 13,320 videos without the split (following the setup of prior state-of-the-art baselines (Clark et al., 2019; Tian et al., 2021)).
|
| 355 |
+
|
| 356 |
+
• Tai-Chi-HD (Siarohin et al., 2019) is a video dataset total of 280 long videos of people doing Tai-Chi. We use the official link for downloading and cropping the dataset as the rectangle videos of $1 2 8 \times 1 2 8$ resolution.5 We use 16 frame video clips of stride 4 (i.e., skip 3 frames after the chosen frame) for dynamic motion. We use all data without the split on training. We exclude the following videos due to the broken link: 8xSkbMUpegs, RCiy2FYViEg, iFMbu9-Mejc, ceoe2fz648U, 6jHyn4z0KLk, VMSqvTE90hk, xmwGBXYofEE, Dn0mNZmAh2k, VhprHat04dk, KYdyIdusD0g, EaEZVfhn07o, L745tFFmCQ, ytT4iU7h-A8, 5ujMzSyHO 8, JdiIQg47Wc4, aAwbJ9MO91I, and XRyc2kiTlM.
|
| 357 |
+
|
| 358 |
+
• Sky Time-lapse (Xiong et al., 2018) is a collection of sky time-lapse total of 5,000 videos. We use the same data pre-processing following the official link.6 We use the train split for training the model and test split for the evaluation, following the setups in prior works.
|
| 359 |
+
|
| 360 |
+
• Kinetics-600 (Carreira et al., 2018) is a large-scale 600-class video action dataset, consists of a total of 495,547 videos. We sub-sampled a food subclass in the dataset to train the model, where we follow the list of such a subclass from Weissenborn et al. (2020), namely: (baking, barbequing, breading, cooking, cutting, pancake, vegetables, meat, cake, sandwich, pizza, sushi, tea, peeling, fruit, eggs, and salad. We use train split for the model training and use the validation set for the evaluation. Note that we only use these classes, different from Weissenborn et al. (2020) to train the model with the whole dataset.
|
| 361 |
+
|
| 362 |
+
Evaluation metrics. We follow the prior setups for evaluation for a fair comparison. We use the C3D network (Tran et al., 2015) pre-trained on Sports-1M (Karpathy et al., 2014) and fine-tuned on UCF-101 datasets for the Inception score (IS; Salimans et al. (2016)). We use the official TGAN (Saito et al., 2017) implementation for computing IS: the score is evaluated over 10,000 generated videos.7 We note this metric does not use the Inception network (Szegedy et al., 2016) have been used in evaluating IS in image generation, but only the formula for evaluation is identical.
|
| 363 |
+
|
| 364 |
+
For Frechet video distance (FVD; ´ Unterthiner et al. (2018)), and kernel video distance (KVD; Unterthiner et al. (2018)), we use the I3D network trained on Kinetics-400 (Kay et al., 2017). All evaluations are done by averaging 10 runs of scores computed from 2,048 sampled real and generated videos, following the setup in TGANv2 (Saito et al., 2020).
|
| 365 |
+
|
| 366 |
+
Forward and backward prediction. For the forward and backward prediction in Figure 5, one should project the given frame into the latent code. To this end, we follow StyleGAN2 projection procedure Karras et al. (2020a) and optimize for 20,000 iteration.
|
| 367 |
+
|
| 368 |
+
Generation time. To fairly compare the generation time with the baselines in Table 3, we utilize the same machine and stop other processes. We used Intel(R) Xeon(R) CPU E5-2630 v4 $@$ 2.20GHz and a Titan XP GPU for the measurement.
|
| 369 |
+
|
| 370 |
+
Space extrapolation. We generate the video by 2D grid of range $[ - 0 . 2 5 , 1 . 2 5 ] ^ { 2 }$
|
| 371 |
+
|
| 372 |
+
# B BASELINES
|
| 373 |
+
|
| 374 |
+
In this section, we explain video generation baselines we used for evaluating DIGAN at a high level.
|
| 375 |
+
|
| 376 |
+
• VGAN (Vondrick et al., 2016) extends image generative adversarial network (GAN; (Goodfellow et al., 2014)) by replacing 2D spatial architecture with 3D spatio-temporal architecture.
|
| 377 |
+
• TGAN (Saito et al., 2017) separates the spatial (image) generator and temporal (latent dynamics) build on Wasserstein GAN (Arjovsky et al., 2017) model for image generation.
|
| 378 |
+
• MoCoGAN (Tulyakov et al., 2018) proposes GAN to disentangle videos by the content of single latent and motion of stochastic latent trajectory and generate these two components.
|
| 379 |
+
• ProgressiveVGAN (Acharya et al., 2018) progressively generates videos both in spatial and temporal directions, like pregressive image generation in ProgressiveGAN (Karras et al., 2017).
|
| 380 |
+
• LDVD-GAN (Kahembwe & Ramamoorthy, 2020) proposes a efficient video discriminator for training video GANs by considering its kernel dimension to be low.
|
| 381 |
+
• VideoGPT (Yan et al., 2021) compresses videos as a sequence of discrete latent vectors via vector-quantized variational auto-encoder (van den Oord et al., 2017), then trains autoregressive Transformer model (Vaswani et al., 2017) with these latent sequences.
|
| 382 |
+
• TGANv2 (Saito et al., 2020) designs a new video GAN of computationally efficient generator and discriminator by proposing sub-modules on each component.
|
| 383 |
+
• DVD-GAN (Clark et al., 2019) uses spatial and temporal discriminators, where the input of the temporal discriminator is spatially down-sampled to reduce the computational bottleneck.
|
| 384 |
+
• MoCoGAN-HD (Tian et al., 2021) leverages a pre-trained image generator to additionally train a motion generator on the image latent space to synthesize the video with those two generators.
|
| 385 |
+
|
| 386 |
+
# C ADDITIONAL RELATED WORK
|
| 387 |
+
|
| 388 |
+
Video prediction. A related but distinct area, video prediction, aims to forecast future video frames from early frames (Srivastava et al., 2015; Finn et al., 2016; Denton & Birodkar, 2017; Babaeizadeh et al., 2018; Denton & Fergus, 2018; Lee et al., 2018; Villegas et al., 2019; Kumar et al., 2020; Franceschi et al., 2020; Luc et al., 2020; Lee et al., 2021). By restricting the distribution conditioned on initial frames, video prediction models often show better visual quality than video generation (Babaeizadeh et al., 2021). Also, video prediction models employ image-to-image architectures as they only need to modify the initial frames regarding the motion, while video generation models use latent-to-image architectures. While our primary focus is video generation, one can utilize our model for video prediction by projecting initial frames into the corresponding latent codes.
|
| 389 |
+
|
| 390 |
+
Video synthesis with motion and content decomposition. For better video generation or prediction with controllability, several works have proposed methods to decompose the motion and contents. Specifically, they model videos with a content vector and a sequence of motion vectors from different subspaces, incorporating distinct motion and content encoders for a prediction (Villegas et al., 2017; Hsieh et al., 2018) or generators for a generation (Tulyakov et al., 2018; Tian et al., 2021; Munoz et al., 2021). Similarly, we utilize two generators, but the motion is represented as a single vector of the weight of implicit neural representations rather than a sequence of latents.
|
| 391 |
+
|
| 392 |
+
Concurrent work. A concurrent work, StyleGAN-V (Skorokhodov et al., 2021b), also focuses on generative modeling of videos by interpreting videos as continuous signals. Moreover, it shares many similar ideas with DIGAN, e.g., a motion discriminator without 3D convolution networks. However, it has a core difference to DIGAN; DIGAN treats videos as spatiotemporally continuous signals, while StyleGAN-V extends StyleGAN2 (Karras et al., 2020b) by interpreting videos as temporally continuous signals (but not spatially continuous), i.e., video frames are discrete 2D grids.
|
| 393 |
+
|
| 394 |
+

|
| 395 |
+
Figure 11: Latent trajectories of the motion features on UCF-101, Sky, and TaiChi datasets. Resolution denotes the location of motion features injected into the progressive generator; lower-resolution controls the high-level semantics, and higher-resolution controls the low-level variations. Dot colors gradually changes from blue $( t = 0$ ) to red $\mathit { t } = 1 \mathit { i }$ ), and 5 random motion vectors are sampled. The features are projected onto 2D space via principal component analysis (PCA) for visualization.
|
| 396 |
+
|
| 397 |
+
Figure 11 visualizes the latent dynamics of motion features on various datasets. Note that the freedom of motion features vary for different datasets: UCF-101 allows high-level (resolution 32) and low-level (resolution 128) variations, Sky only allows low-level variations, and TaiChi does not permit the variations much. Intuitively, the next move of TaiChi is mostly determined by the prior frames: the movement follows the pre-defined gestures. Sky permits some variations as shown in Figure 6, but the wind direction determines the global motion. UCF-101 has the largest freedom of motion as the dataset contains videos of various actions and diverse objects.
|
| 398 |
+
|
| 399 |
+
# E.1 MORE BACKWARD PREDICTION
|
| 400 |
+
|
| 401 |
+

|
| 402 |
+
Figure 12: More examples on forward and backward prediction results of DIGAN. Yellow box indicates the given frame.
|
| 403 |
+
|
| 404 |
+
# E.2 INTERMEDIATE SCENE PREDICTION
|
| 405 |
+
|
| 406 |
+

|
| 407 |
+
Figure 13: Intermediate scene (i.e., frame) prediction results of our method, DIGAN. The yellow boxes indicate the given initial and last frames.
|
| 408 |
+
|
| 409 |
+
We show that our proposed method, DIGAN, can predict the intermediate frames between the two frames of the different time steps. To this end, we find the inverse content and motion latent codes by projecting two given frames into the generator (we follow the StyleGAN2 projection procedure (Karras et al., 2020b) and optimize 20,000 iteration for the projection). As shown in Figure 13, DIGAN can well predict the intermediate dynamics even the given frames are somewhat far apart. This result implies that DIGAN indeed has learned the dynamics of the ground truth distribution.
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
Figure 14: Comparison of intermediate scene (i.e., frame) prediction results by StyleGAN2 and our method, DIGAN. The yellow boxes indicate the given initial and last frames.
|
| 413 |
+
|
| 414 |
+
Table 6: SSIM of intermediate scenes predicted by StyleGAN2 and our method, DIGAN.
|
| 415 |
+
|
| 416 |
+
<table><tr><td></td><td>SSIM (↑)</td></tr><tr><td>StyleGAN2 latent interpolation</td><td>0.5639</td></tr><tr><td>DIGAN (ours)</td><td>0.6753</td></tr></table>
|
| 417 |
+
|
| 418 |
+
We also report structural similarity index measure (SSIM) to quantitatively compare predicted videos from DIGAN and linearly interpolated image sequences in StyleGAN2 latent space. For StyleGAN2, we use the official StyleGAN2 inversion method, namely, we project each of the initial and final frames to the StyleGAN2 latent space trained on the Taichi dataset. After that, we linearly interpolate on these two projected latent vectors. As shown in Table 6, DIGAN shows better prediction than StyleGAN2 interpolation. Moreover, as shown in Figure 14, one can observe that DIGAN preserves semantics like background across the temporal direction, while the StyleGAN2 latent interpolation cannot.
|
| 419 |
+
|
| 420 |
+
# F MORE EXAMPLES FOR LONG VIDEO GENERATION
|
| 421 |
+
|
| 422 |
+
Follow the arrow direction, and move to the next line at the end
|
| 423 |
+
|
| 424 |
+

|
| 425 |
+
Figure 15: Additional 128 frame videos of $1 2 8 \times 1 2 8$ resolution by DIGAN, on the TaiChi dataset.
|
| 426 |
+
|
| 427 |
+

|
| 428 |
+
Figure 16: Additional time extrapolation videos of MoCoGAN-HD and DIGAN, trained on 16 frame videos of $1 2 8 \times 1 2 8$ resolution on the Sky dataset. Yellow box indicates the extrapolated frames.
|
| 429 |
+
|
| 430 |
+
# H MORE EXAMPLES FOR SPACE EXTRAPOLATION
|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
Figure 17: Additional zoomed-out samples. Red boxes indicate the original frames.
|
| 434 |
+
|
| 435 |
+
# I EFFICIENCY OF DIGAN
|
| 436 |
+
|
| 437 |
+
In addition to the computational efficiency on inference (in Table 3), we provide the analysis of our method on efficiencies of diverse aspects, including computation, energy, memory, and time efficiency. Here, we mainly compare our method with MoCoGAN-HD (Tian et al., 2021), which is an energy-efficient (i.e., shorter GPU days for training) and state-of-the-art method on the generation quality. All experiments are performed under the same machine (NVIDIA V100 32GB GPUs).
|
| 438 |
+
|
| 439 |
+
• Computational efficiency. We report floating point operations per second (FLOPS)8 of video GAN generators (following Liu et al. (2021)). The DIGAN generator requires 147.9 GFLOPS to generate a 16 frame video of $1 2 8 \times 1 2 8$ resolution, 4.6 times smaller than 682.3 GFLOPS of the MoCoGAN-HD generator.
|
| 440 |
+
• Energy efficiency on training (GPU days for training). The FVD value of DIGAN trained on UCF-101 for 8 GPU days achieves $6 8 9 \pm 2 4$ , which is better than 838 of MoCoGAN-HD trained for 16 GPU days. This implies that DIGAN is (at least 2 times) more energy-efficient than MoCoGAN-HD.
|
| 441 |
+
• Memory efficiency on training. We report the memory size per GPU to load 16 frame videos of $1 2 8 \times 1 2 8$ resolution of batch size 4 for training video GANs. DIGAN allocates 9.7GB memory, 2.9 times smaller than 28.0GB of MoCoGAN-HD.
|
| 442 |
+
• Time efficiency on inference. Per each GPU, DIGAN discriminators can (forward) compute 195.6 video clips/sec, 3.2 times larger than 60.3 video clips/sec of MoCoGAN-HD discriminators with 128 frame videos of $1 2 8 \times 1 2 8$ resolution and a batch size of 16. It confirms that both the generator and discriminator of our method are much more time-efficient; recall that we already demonstrated that our generator is ${ \sim } 2 . 3$ times faster per each GPU in Table 3.
|
| 443 |
+
|
| 444 |
+
In summary, DIGAN is more computation-efficient $> 4 . 6$ times), energy-efficient on training $( > 2$ times), memory-efficient on training $> 2 . 9$ times), and time-efficient on inference $( > 3 . 2$ times) under each machine setup above. Such gaps stem from the fact that our method utilizes: (a) INR-based generator without time-consuming autoregressive modeling and (b) 2D convolutional discriminator rather than computationally heavy 3D convolutional discriminator. Finally, we emphasize that DIGAN can synthesize multiple frames of a video in parallel (which is impossible under prior autoregressive or convolutional network-based methods), resulting in $N$ times improved time-efficiency to generate a single video under $N$ number of GPUs. It can be particularly important for synthesizing extremely long videos; since it requires tremendous time if utilizing prior methods that are impossible to compute frames in parallel. Like this, the superiority of computational efficiency of DIGAN can be further dramatically improved in the presence of multiple GPUs.
|
| 445 |
+
|
| 446 |
+
# J EFFECT OF CONTENT VECTOR FOR GENERATING MOTION
|
| 447 |
+
|
| 448 |
+
Table 7: Effect of the motion vector $z _ { I }$ for generating the motion. We report the mean and standard deviation of the FVD values over 10 runs.
|
| 449 |
+
|
| 450 |
+
<table><tr><td></td><td>UCF-101</td><td>TaiChi</td></tr><tr><td>Motion only</td><td>596±26</td><td>147.9±4.9</td></tr><tr><td>Motion + content (ours)</td><td>577±21</td><td>128.1±4.9</td></tr></table>
|
| 451 |
+
|
| 452 |
+
We provide the result when only the motion vector is used as input (i.e., without the content vector); we report the FVD values of the models on the UCF-101 and the TaiChi dataset. The result in Table 7 confirms that the consideration of content vectors improves the result, as video motions often depend on the content (i.e., initial frame determines the possible future motions).
|
| 453 |
+
|
| 454 |
+
# K CLASS-CONDITIONAL GENERATION OF DIGAN
|
| 455 |
+
|
| 456 |
+
Table 8: IS, FVD, and KVD values of video generation models on the UCF-101 dataset. $\uparrow$ and $\downarrow$ imply higher and lower values are better, respectively. Subscripts denote standard deviations, and bolds indicate the best results.
|
| 457 |
+
|
| 458 |
+
<table><tr><td>Method</td><td>IS (↑)</td><td>FVD (↓)</td><td>KVD (↓)</td></tr><tr><td>DVD-GAN</td><td>32.97±1.7</td><td>=</td><td></td></tr><tr><td>TSB</td><td>42.79±0.63</td><td>-</td><td>1</td></tr><tr><td>DIGAN (ours)</td><td>59.68±0.45</td><td>465±12</td><td>39.6±2.9</td></tr></table>
|
| 459 |
+
|
| 460 |
+
We provide both qualitative and quantitative results of DIGAN on a class-conditional setup to compare several recent works on video synthesis that reported class-conditional generation results, such as DVD-GAN (Clark et al., 2019) and TSB (Munoz et al., 2021). Specifically, we report classconditional generation results trained on UCF-101 in Table 8 and the project page,9 which demonstrate the superiority of DIGAN even on the conditional setup compared to existing baselines.
|
parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Czsdv-S4-w9/Czsdv-S4-w9_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/S37hOerQLB/S37hOerQLB.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/S37hOerQLB/S37hOerQLB_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/S37hOerQLB/S37hOerQLB_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/ZWjEkv9rjo/ZWjEkv9rjo.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LATTICE QUANTIZATION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Low bit quantization of weights in increasingly large deep convolutional neural networks (DCNNs) can be critical for their implementation in memory constrained hardware systems. Post-training quantization consists in quantizing a model without retraining, which is user-friendly, fast and data frugal. In this paper, we propose LatticeQ, a new post-training weight quantization method designed for DCNNs. Instead of the standard scalar rounding widely used in state-of-theart quantization methods, LatticeQ uses a quantizer based on lattices - discrete algebraic structures - which we show are able to exploit the inner correlations between the model parameters. LatticeQ allows us to achieve state-of-the-art results in post-training quantization, enabling us to approach full precision accuracies for bitwidths previously not accessible to post-training quantization methods in similar experimental settings. In particular, we achieve ImageNet classification results close to full precision on the popular Resnet-18/50, with only $1 \%$ and $3 \%$ accuracy drop for the 4-bit weights and 3-bit weights model architectures respectively.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Complex tasks such as image recognition on large datasets (Krizhevsky et al., 2017; He et al., 2015) and speech recognition (Hinton et al., 2012) are very efficiently solved by deep convolutional neural networks. To improve precision, deep learning models have become continually larger, more memory demanding and computationally heavier. Popular models like ResNet (He et al., 2015) use millions of parameters (Resnet-50 uses 25Mio of them, which represents a storage of almost 100MB of data). However, for embedded systems applications, storing such quantities of information is often impossible in practice. Some architectures are specifically designed to reduce this memory footprint like MobileNet (Howard et al., 2017; Sandler et al., 2018) (Mobilenet-v2 requires just 14MB of memory). But compressing existing architectures is easier than inventing new ones for specific needs. Therefore, various methods were designed to improve memory efficiency and reduce computational complexity of these models, in order to be able to use DCNNs for low power and/or low memory applications.
|
| 12 |
+
|
| 13 |
+
There are two major ways of reducing the size of a deep neural network :
|
| 14 |
+
|
| 15 |
+
• Reducing the total number of parameters, through pruning (Blalock et al., 2020), weight sharing, low-rank factorization.
|
| 16 |
+
• Reducing the memory footprint of its parameters and operation complexity, mainly through quantization (Krishnamoorthi, 2018).
|
| 17 |
+
|
| 18 |
+
Recently, quantization of popular models down to 4 and even 3-bit has been made possible, with little to no degradation of task performance (Esser et al., 2020; Jin et al., 2019). These breakthroughs often rely on retraining the model from scratch with stochastic gradient descent, using the full training dataset. This class of methods is known as quantization-aware training, and leads to the best performance in DCNNs quantization. However, using these methods can sometimes be impractical. The first drawback is the need for the full dataset. In some cases we only have access to a trained full precision network, and for confidentiality reasons, it may be impossible to access the full training dataset of this network. A second drawback is their practicality: training a quantized network from scratch can be extremely demanding in computation resources, last generation GPUs, which might not be available for the developer.
|
| 19 |
+
|
| 20 |
+
To overcome these constraints, several methods have been suggested that do not rely on retraining a network from scratch. This framework is called post-training quantization. It is commonly acknowledged that post-training methods do not lead to task performance as good as quantization aware training (Krishnamoorthi, 2018), especially when dealing with bitwidths 4 or lower, but they do solve the aforementioned problems, and can be critical for rapid deployment.
|
| 21 |
+
|
| 22 |
+
Inspired by Nagel et al. (2019), we propose a classification of quantization methods given their level of complexity and data requirements, which extends their own classification. We will use this framework to help the reader compare our method with those of other authors.
|
| 23 |
+
|
| 24 |
+
• Level 1a No data and no finetuning of the network’s parameters. “As simple as an API call”. The required inputs are only the model definition and its weights. (Nagel et al., 2019).
|
| 25 |
+
• Level 1b No data and no finetuning of the network’s parameters. Limited data can be used to calibrate activation quantization thresholds. Per-channel quantization is widely used. (Banner et al., 2019; Zhao et al., 2019).
|
| 26 |
+
• Level 2a Some samples of application data are needed, no finetuning of the network’s parameters. Data determines the quantization function (i.e. step, threshold, channel splitting, mixed precision), or updates batch normalization statistics. Per-channel and per-layer quantization coexist in the state of the art. (Choukroun et al., 2019; Liu et al., 2021).
|
| 27 |
+
• Level 2b Some samples of application data are needed, restricted finetuning pipeline for the network’s parameters. Data is used for layerwise optimization (Nagel et al., 2020; Wang et al., 2020) or blockwise optimization (Li et al., 2021) to improve quantization locally. From this level on, per-layer quantization is standard.
|
| 28 |
+
• Level 3 Quantization aware training. Requires the full dataset and parameter optimization, needs finetuning and hyperparameter tuning to achieve good performance.
|
| 29 |
+
|
| 30 |
+
In this paper, we introduce a new level 1b post-training quantization technique for deep convolutional neural networks, which achieves level 1b state-of-the-art classification performance on ImageNet down to 4-bit weights on Resnet architectures, with less than $1 \%$ accuracy drop compared to full precision models. We also show good performance for 3-bit quantization with $3 \%$ accuracy drop compared to full precision. Our method relies on a new quantizer that uses linear correlations between the parameters of convolution layers to minimize its error. The goal of this paper is not to show absolute best performance among all post-training quantization methods, but rather to show some improvement over the scalar quantizer is a standard and simple experimental setting.
|
| 31 |
+
|
| 32 |
+
# Our contributions
|
| 33 |
+
|
| 34 |
+
1. We introduce a new quantizer, based on the structure of lattices, to allow for more flexible and adaptive quantization of weights, contrary to most other techniques that rely on uniform quantizers.
|
| 35 |
+
2. We explore the impact of combining parameter and activation quantization for our quantizer, to allow for faster inference and low complexity computation.
|
| 36 |
+
3. We provide insights and analysis of how our quantizer works, and its memory overhead.
|
| 37 |
+
|
| 38 |
+
This paper is organized as follows: section 2 presents previous work on post-training quantization as well as quantization-aware training. Section 3 analyzes the parameter correlations inside DCNNs and introduces the intuition behind our approach. In section 4, we detail our approach and compare it to existing state-of-the art methods. In section 5, we give additional results of our quantizer without enhancements as an ablation study. Finally, in section 6, we provide analysis of the characteristics of our quantizer, including its quantization error, its distribution, and its memory overhead.
|
| 39 |
+
|
| 40 |
+
# 2 RELATED WORK
|
| 41 |
+
|
| 42 |
+
The performance of DCNN quantization schemes depends heavily on hypotheses: availability of training data, computation time and hardware capacities. The best results are currently achieved by quantization-aware training, which is the least restrictive: unlimited access to training data, unlimited computation time and resources, heavy hyperparameter finetuning and human expertise. Recently, promising results in this area have been achieved by Esser et al. (2020), Jin et al. (2019), which both used uniform quantizers for weights and activations. Non uniform quantizers, including vector quantizers relying on clustering techniques, have also been successfully employed (Han et al., 2016; Stock et al., 2020).
|
| 43 |
+
|
| 44 |
+
Post-training quantization meets stricter specifications than quantization-aware training. Nagel et al. (2019) for example assumed that no data is available at all for quantization. Banner et al. (2019) introduced bias correction and per-channel bit allocation. Choukroun et al. (2019) specifically designed a quantizer to minimize the MSE loss of the quantization operation. Other approaches that use a few samples of data have been proposed (Nagel et al., 2020), which used data in order to learn whether to round the weights up or down. Wang et al. (2020) proceeded by bit optimization, and Liu et al. (2021) exploited multipoint quantization to approximate full precision weight vectors with a linear combination of low bit vectors.
|
| 45 |
+
|
| 46 |
+
# 3 PRELIMINARY OBSERVATIONS
|
| 47 |
+
|
| 48 |
+
Most post-training schemes try to optimize task performance by adapting their quantizer to better fit the typically bell-shaped density function of the model weights. Moreover, these scalar methods do not pay attention to potential correlations between these parameters. As can be seen on Figure 1, correlations may exist between the weight values of trained DCNNs.
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 1: Left : Weight scalar distribution in layer 4.0 conv2 of an ImageNet pretrained Resnet50. Right : 2D plot of $( w _ { 1 } , w _ { 2 } )$ in the same layer, where $w _ { i }$ is the $i$ th coordinate of filter $w$ .
|
| 52 |
+
|
| 53 |
+
Figure 2 is the correlation matrix of the 9 distributions of filter parameters in a $3 \times 3$ convolution layer. The first distribution is the one of weights located in the upper left corner of a filter, the second distribution is the one of weights located in the upper center of a filter, etc. Formally, we plot in line $i$ and column $j$ the points $( w _ { i } , w _ { j } )$ for each filter $f = ( w _ { 1 } , . . . , w _ { 9 } )$ in a chosen layer. On the long diagonal, we plot the histogram of $w _ { i }$ . We notice that filters tend to have correlated coordinates, with quite high correlation coefficients. The same observation can be made in other $3 \times 3$ layers. From this observation, we justify the main assumption of our method: a quantizer “shaped as a parallelogram” is more data efficient than a uniform quantizer “shaped as a square”.
|
| 54 |
+
|
| 55 |
+
# 4 METHODS
|
| 56 |
+
|
| 57 |
+
Many state-of-the-art quantization methods rely on scalar uniform quantizers, which require only a few additional parameters: step size, bitwidth, and/or threshold. Other approaches use vector quantization, which may either be scalar or multidimensional, leading to more flexible quantization sets (Han et al., 2016; Stock et al., 2020) but are often limited by the need to use codebooks. LatticeQ takes the best of both approaches. It adds a limited number of additional parameters to encode quantization bases, and offers a broader variety of possible quantization sets than scalar uniform quantizers.
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 2: Left : Correlation diagram of filters in layer 4.0 conv2 (Conv2d $3 \times 3 ,$ ). Right : Uniform $\mathop { \left. \sum \right.} \left( \mathrm { \frac { \partial } { \partial \phi } } \right) =$ square) quantization and lattice $\overleftarrow { }$ parallelogram) quantization
|
| 61 |
+
|
| 62 |
+
# 4.1 LATTICE BASED WEIGHT QUANTIZER
|
| 63 |
+
|
| 64 |
+
In order to quantize the weights, LatticeQ uses lattices, which are algebraic structures that discretize the notion of vector space (see APPENDIX A for more details). Each lattice has a basis, meaning that each point of the lattice can be written as an integer linear combination of the vectors of this basis. This integer linear combination is the encoding of our quantization. A lattice has infinite cardinality. In order to use this structure as our quantizer we need a finite number of quantization points. We truncate our lattice in the following fashion $:$ let $\Lambda$ be a lattice, and $B = ( \mathbf { b _ { i } } ) _ { 1 \leq i \leq n } \in \mathbb { R } ^ { n }$ a basis of $\Lambda$ . Given $b$ the bitwidth, our quantization set is $\begin{array} { r } { Q = \{ q \in \mathbb { R } ^ { n } , q = \sum _ { i = 1 } ^ { n } \bar { \mu } _ { i } \bar { \mathbf { b _ { i } } } } \end{array}$ , $\forall i \in$ $\{ 1 , . . . , n \}$ , $- 2 ^ { b - 1 } \leq \mu _ { i } \leq 2 ^ { b - 1 } - 1 \}$ .
|
| 65 |
+
|
| 66 |
+
In memory, each quantized block is represented by its coordinates in the quantization basis. Let us suppose $\dot { \vec { B } } = ( \mathbf { b _ { 1 } } , \mathbf { \dot { b } _ { 2 } } , \mathbf { b _ { 3 } } ) = ( ( b _ { 1 , 1 } , \dot { b _ { 1 , 2 } } , b _ { 1 , 3 } ) , ( \dot { b _ { 2 , 1 } } , b _ { 2 , 2 } , b _ { 2 , 3 } ) , ( b _ { 3 , 1 } , \dot { b _ { 3 , 2 } } , \dot { b } _ { 3 , 3 } ) )$ is our quantization basis (with each $b _ { i , j }$ a scalar, possibly quantized with a uniform min/max quantizer), and:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
F ^ { q } = { \binom { f _ { 1 } } { f _ { 4 } } } \quad f _ { 2 } \quad f _ { 3 } \\ { f _ { 7 } } \quad f _ { 8 } \quad f _ { 9 } \quad
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
is a $3 \times 3$ quantized filter. It consists in 3 quantized blocks: $( f _ { 1 } , f _ { 2 } , f _ { 3 } )$ , $( f _ { 4 } , f _ { 5 } , f _ { 6 } )$ and $( f _ { 7 } , f _ { 8 } , f _ { 9 } )$ The convolution represented by $F ^ { q }$ is the concatenation of three $1 \times 3$ vectors:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
F = D e q u a n t ( F ^ { q } ) = \binom { \left( f _ { 1 } \mathbf { b _ { 1 } } + f _ { 2 } \mathbf { b _ { 2 } } + f _ { 3 } \mathbf { b _ { 3 } } \right) } { \left( f _ { 4 } \mathbf { b _ { 1 } } + f _ { 5 } \mathbf { b _ { 2 } } + f _ { 6 } \mathbf { b _ { 3 } } \right) }
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
Note that if we choose $\boldsymbol { B }$ as a uniform scaling of an orthonormal basis $( B = \lambda \times I _ { n } )$ ), the quantization set is exactly the one of classic scalar quantization (we call this simplified version “Cubic LatticeQ”).
|
| 79 |
+
|
| 80 |
+
The quantization process for a $3 \times 3$ layer is simple: we flatten the weights and group them by blocks of 3. Then, using the quantization basis, we search for the quantization point nearest to this block. The vector found is the quantization point for this block. In practice, we can use Dequant to calculate the convolution in the quantized network. However, for per-layer quantization, we propose an optimized way of dealing with the inference in a LatticeQ-quantized network in APPENDIX E.
|
| 81 |
+
|
| 82 |
+
Quantizing literally means defining a function from an infinite set to a finite set. In the scalar model, the quantization operation relies on a simple round function. In order to quantize on a lattice, we need to use a more complex algorithm. Actually, the problem of finding the closest lattice point to a real vector is known to be NP-hard (Micciancio, 1998), and is called Closest Vector Problem (CVP):
|
| 83 |
+
|
| 84 |
+
“Given $x \in \mathbb { R } ^ { n }$ and $\Lambda$ a lattice of $\mathbb { R } ^ { n }$ , find $\lambda \in \Lambda$ such that $d ( x , \lambda ) = m i n \{ d ( x , l ) , l \in \Lambda \}$ .”
|
| 85 |
+
|
| 86 |
+
<table><tr><td>Algorithm1Nearest plane algorithm</td></tr><tr><td>1:function BABAI(Basis B,Vector t) 2: B*=GramSchmidt(B)</td></tr><tr><td>3: b←t</td></tr><tr><td>4: for j ∈{n,...,1} do</td></tr><tr><td><b,b> 5: uj←<b></td></tr><tr><td>6: b←b-[ujlbj</td></tr><tr><td>7: end for</td></tr><tr><td>8: return x = ∑=1luj]bj =t-b 9: end function</td></tr></table>
|
| 87 |
+
|
| 88 |
+
<table><tr><td>Algorithm 2 Gram-Schmidt algorithm</td></tr><tr><td>1: function GRAMSCHMIDT(Basis B)</td></tr><tr><td>2: b←b1</td></tr><tr><td>3: for j ∈ {2,..,n} do</td></tr><tr><td>4: <bj,b*>b</td></tr><tr><td>5: end for</td></tr><tr><td>return B* = (b*)1≤j≤n 6:</td></tr><tr><td>7: end function</td></tr></table>
|
| 89 |
+
|
| 90 |
+
In order to solve the closest vector problem, we use the nearest plane algorithm (Babai, 1986). It is fairly easy to understand and implement, computationally light, and still provides good approximations in low dimension. We detail the implementation in algorithms 1 and 2.
|
| 91 |
+
|
| 92 |
+
Now that we have an algorithm to quantize on a lattice, we want to find a good lattice. For the data free approach, we opt for a simple random search with restart as described in algorithm 3. Restarts simply consist in running the algorithm several times in a row and keeping the best result of all the runs. We look for a lattice that reduces the mean cube error loss (MCE) between the full precision weights of the layer (or channel), and their quantized version. We chose this loss rather than MSE because it performed slightly better (Table 1). We assume this is because the MCE loss gives more importance to larger weights that are far away from any quantization point compared to the MSE.
|
| 93 |
+
|
| 94 |
+
# Algorithm 3 FindBasis
|
| 95 |
+
|
| 96 |
+
<table><tr><td colspan="2">1: function FINDBAsIs(Weight tensor W,Basis dimension dim, Bitwidth bits,Temperatures T)</td></tr><tr><td>2:</td><td>B←Idim</td></tr><tr><td>3:</td><td>for0≤s≤|T|do</td></tr><tr><td>4:</td><td>B'← B'+Sample(g(0,σ= T(s), |BI))</td></tr><tr><td>5:</td><td> if MCELoss(W, Wxg) < MCELoss(W, Wx) then</td></tr><tr><td>6:</td><td>B←B'</td></tr><tr><td>7:</td><td>end if</td></tr><tr><td>8: end for</td><td></td></tr><tr><td>9:</td><td>return B</td></tr><tr><td>10: end function</td><td></td></tr></table>
|
| 97 |
+
|
| 98 |
+
The random transformation we use is a multivariate gaussian noise addition with standard deviation $T ( s )$ , where $T$ is a sequence of temperature steps, that can be adjusted as a hyperparameter, see APPENDIX B. In order to perform low bit computations, we may want to quantize the basis itself to integer values, which we did in all our experiments, by adding a simple $\operatorname* { m i n } / \operatorname* { m a x }$ quantizer for $B ^ { \prime }$ between line 4 and line 5 in algorithm 3.
|
| 99 |
+
|
| 100 |
+
Since the approximation factor of the nearest plane algorithm grows in square root in the basis dimension $n$ (Babai, 1986), there is no interest in choosing high dimensional bases. Moreover, it increases the storage requirements, since an n-dimensional basis requires $n ^ { 2 }$ entries in memory. Experimentally, we notice that the most accurate dimension for the quantization basis is 3 for $3 \times 3$ layers (Table 2), and 2 for $1 \times 1$ layers.
|
| 101 |
+
|
| 102 |
+
Table 1: Comparison between MSE loss and MCE loss for Resnet-18 with weights quantized to 4-bit.
|
| 103 |
+
|
| 104 |
+
<table><tr><td colspan="3">Top-1 accuracy</td></tr><tr><td>Network</td><td>MSELoss</td><td>MCELoss</td></tr><tr><td>Resnet-18</td><td>67.85</td><td>67.94</td></tr></table>
|
| 105 |
+
|
| 106 |
+
Table 2: Impact of the choice of the basis dimension in $3 \times 3$ layers on final accuracy with weights quantized to 4-bit.
|
| 107 |
+
|
| 108 |
+
<table><tr><td colspan="3">Top-1 accuracy</td></tr><tr><td>Network</td><td>dim=3</td><td>dim=9</td></tr><tr><td>Resnet-18</td><td>67.94</td><td>61.90</td></tr></table>
|
| 109 |
+
|
| 110 |
+
# 4.2 ACTIVATION QUANTIZATION
|
| 111 |
+
|
| 112 |
+
As typically done in post-training scenario, we chose to perform activation quantization on one batch of data right before testing the quantized network. In real life, this can be done right before deployment on one batch of application data. We can either quantize activations per layer or per channel. In case we quantize the activations in a layer-wise fashion, the performance drops significantly below the 8-bit setting. In case we quantize the activations in a channel-wise fashion, it is possible to reach an activation precision down to 4-bit without much loss of accuracy by using a quantile trick similar to McKinstry et al. (2019). Let $C$ be an activation channel to quantize. Let $\alpha _ { C }$ be the quantile 0.9997 of $C$ ’s distribution, which means $p _ { c \in C } ( c \leq \alpha _ { C } ) = 0 . 9 9 9 7$ . We estimate $\alpha _ { C }$ by running a forward pass with one batch of data. Then we use $\alpha _ { C }$ as our activation threshold for the channel $C$ . We chose different quantiles depending on the network and activation bitwidths, see APPENDIX C.
|
| 113 |
+
|
| 114 |
+
# 4.3 EXPERIMENTAL SETUP
|
| 115 |
+
|
| 116 |
+
We evaluate our method on the ImageNet (Russakovsky et al., 2015) classification task. All experiments are made using PyTorch (Paszke et al., 2019), and the pretrained models used all come from the torchvision.models library. The basis is always quantized with the same bitwitdh as the activations. Based on experiments, we set bases dimension to 3 for $3 \times 3$ convolution layers, 2 for $1 \times 1$ layers and linear layers, and 1 for the first layer (since we did not notice any advantage in increasing the dimension for this particular layer). To quantize activations, we use a calibration batch of 512 images. As it is common practice in such applications, we quantize the pooling layers, first layer and last layer to 8-bit, and we do not quantize layer biases (only VGG (Simonyan & Zisserman, 2015) has biases). We report bitwidths settings and top-1 accuracy for each model tested, and we also provide the results from Banner et al. (2019) and Choukroun et al. (2019) for comparison. In part 4.4, we report the results of per-channel LatticeQ with data free enhancements in Table 3. In part 5, we report the results of per-channel LatticeQ without bias correction (refered to as our baseline) in Table 4 and the results of per-layer LatticeQ without bias correction in Table 5. Finally, in APPENDIX F, we report the results of weights-only quantization.
|
| 117 |
+
|
| 118 |
+
# 4.4 DATA FREE PER-CHANNEL ENHANCEMENT
|
| 119 |
+
|
| 120 |
+
Table 3: LatticeQ with bias correction on ImageNet. For 8-bits activations we use naive per-layer activation quantization. For 4-bit activations, we use our quantile per-channel approach. For weights, we use per-channel quantization and bias correction. We compare our results with results that we generated from the source code of Banner et al. (2019), using per-channel quantization and bias correction. We also compare with paper results from OMSE (Choukroun et al., 2019).
|
| 121 |
+
|
| 122 |
+
<table><tr><td colspan="3"></td><td colspan="3"> Top-1 accuracy</td><td rowspan="2">W3A3</td><td rowspan="2">W2A8</td></tr><tr><td>Network</td><td>Method</td><td>FP32</td><td>W4A8</td><td>W4A4</td><td>W3A8</td></tr><tr><td rowspan="3">Resnet-18</td><td>LatticeQ (Ours)</td><td>69.6</td><td>68.9</td><td>67.3</td><td>66.2</td><td>56.9</td><td>38.5</td></tr><tr><td>Banner et al.</td><td>69.6</td><td>67.4</td><td>64.3</td><td>43.4</td><td>28.6</td><td>1.3</td></tr><tr><td>OMSE+opt1</td><td>69.6</td><td>67.1</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="3">Resnet-50</td><td>LatticeQ (Ours)</td><td>76.0</td><td>75.3</td><td>70.9</td><td>73.1</td><td>55.0</td><td>45.6</td></tr><tr><td>Banner et al.</td><td>76.0</td><td>74.8</td><td>70.3</td><td>67.5</td><td>38.4</td><td>0.4</td></tr><tr><td>OMSE+opt1</td><td>76.0</td><td>74.7</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="3">VGG-16bn</td><td>LatticeQ (Ours)</td><td>73.4</td><td>73.0</td><td>70.6</td><td>70.8</td><td>61.9</td><td>35.8</td></tr><tr><td>Banner et al.</td><td>73.4</td><td>71.6</td><td>70.4</td><td>65.9</td><td>59.7</td><td>0.1</td></tr><tr><td>OMSE+opt1</td><td>73.4</td><td>72.3</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="3">Densenet</td><td>LatticeQ (Ours)</td><td>74.4</td><td>71.5</td><td>69.5</td><td>65.9</td><td>54.2</td><td>9.6</td></tr><tr><td>Banner et al.</td><td>74.4</td><td>70.2</td><td>63.0</td><td>53.8</td><td>18.7</td><td>0.4</td></tr><tr><td>OMSE+opt1</td><td>74.4</td><td>71.7</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="2">Mobilenet-v2</td><td>LatticeQ (Ours)</td><td>71.9</td><td>66.5</td><td>46.0</td><td>46.9</td><td>0.3</td><td>0.3</td></tr><tr><td>Banner et al.</td><td>71.9</td><td>61.1</td><td>36.3</td><td>10.2</td><td>0.3</td><td>0.1</td></tr></table>
|
| 123 |
+
|
| 124 |
+
For this part, we rely on the work of Banner et al. (2019). First, we use per-channel quantization, to allow for more accurate quantization in each channel. We then add bias correction. Quantization operations tend to alter the moments (mean and variance) of the weight distribution in each channel, which is taken into account by bias correction. In our case, bias correction is also computed during the execution of F indBasis for bitwidths lower than 4, so that the quantization basis found takes bias correction into account. Line 5 of F indBasis is, in this case, replaced by :
|
| 125 |
+
|
| 126 |
+
$\begin{array} { c } { { { \bf i f } M C E L o s s ( W , b i a s c o r r e c t i o n ( W _ { \Lambda _ { B ^ { \prime } } } ^ { q } ) ) < M C E L o s s ( W , b i a s c o r r e c t i o n ( W _ { \Lambda _ { B } } ^ { q } ) ) \ { \bf i f } } } \\ { { { \cal B } B ^ { \prime } } } \end{array}$ hen end if
|
| 127 |
+
|
| 128 |
+
The results in Table 3 show the substantial improvement of LatticeQ over state-of-the-art approaches. Our method outperforms Banner et al. (2019) with similar hypotheses, and even the level 2a OMSE $^ +$ opt method, in almost all settings for all presented models.
|
| 129 |
+
|
| 130 |
+
As we read the Table 3 from left to right, quantization is more and more aggressive. We find that LatticeQ manages to stay within $1 \%$ of full precision model accuracy on Resnets and VGG in 4- bit weights and 8-bit activation, and within $3 \%$ in 3-bit weights and 8-bit activation. As expected, compact models like Densenet (Huang et al., 2018) and Mobilenet-V2 (Sandler et al., 2018) are less resilient to quantization than Resnets (He et al., 2015) and VGG (Simonyan & Zisserman, 2015). It is noticeable that our method reaches a top-1 accuracy of $5 4 . 2 \%$ for Densenet in 3-bit weights and 3-bit activation setting while the method proposed by Banner et al. (2019) only achieved $1 8 . 7 \%$ .
|
| 131 |
+
|
| 132 |
+
# 5 ABLATION STUDY
|
| 133 |
+
|
| 134 |
+
In this section, we present an ablation study which objective is twofold. First, we provide the results of our per-channel quantizer without bias correction (Table 4). It is noticeable that our results remain close to full precision accuracy on Resnets and VGG (within $2 \%$ in per-channel W4A8, and within $10 \%$ in W3A8 for instance). Bias correction increases our method’s accuracy, but our baseline significantly outperforms baselines of other scalar quantization methods (Banner et al., 2019; Choukroun et al., 2019). Based on those results, we want to emphasize that lattice quantization is indeed the cornerstone of the quantization process.
|
| 135 |
+
|
| 136 |
+
Table 4: LatticeQ per-channel baseline quantization of weights and activations.
|
| 137 |
+
|
| 138 |
+
<table><tr><td colspan="6">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W4A8</td><td>W4A4</td><td>W3A8</td><td>W3A3</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>67.2</td><td>66.0</td><td>59.6</td><td>40.2</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>74.6</td><td>70.6</td><td>69.3</td><td>47.6</td></tr><tr><td>VGG-16bn</td><td>73.4</td><td>72.4</td><td>70.4</td><td>64.3</td><td>57.0</td></tr><tr><td>Densenet</td><td>74.4</td><td>70.5</td><td>66.5</td><td>54.9</td><td>33.9</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>58.0</td><td>31.7</td><td>21.5</td><td>0.1</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Next, we provide the results of our per-layer quantizer (Table 5). Quantizing per layer in W8A8 does not impact performance on Resnets. Although it remains challenging to quantize weights per layer under our assumptions (no calibration data for weights), we show promising accuracy that lays the foundations of potential level 2 applications.
|
| 141 |
+
|
| 142 |
+
Table 5: LatticeQ per-layer baseline quantization of weights and activations.
|
| 143 |
+
|
| 144 |
+
<table><tr><td></td><td colspan="3">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W8A8</td><td>W4A8 W3A8</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>69.5</td><td>59.5 23.8 70.2</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>75.9</td><td>41.9</td></tr><tr><td>VGG-16bn Densenet</td><td>73.4</td><td>73.3</td><td>68.5 42.5 59.4</td></tr><tr><td></td><td>74.4</td><td>71.3</td><td>11.4</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>70.6</td><td>12.9 0.2</td></tr></table>
|
| 145 |
+
|
| 146 |
+
# 6 ANALYSIS
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Figure 3: Resnet18 per-layer quantization error comparison between LatticeQ and Cubic LatticeQ (scalar quantization). Vertical axis is MCE.
|
| 150 |
+
|
| 151 |
+
Table 6: Comparison between baseline perchannel LatticeQ and baseline per-channel Cubic LatticeQ (scalar quantization).
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Network</td><td>Method</td><td>FP32</td><td>W4A8</td></tr><tr><td rowspan="2">Resnet-18</td><td>LatticeQ</td><td>69.6</td><td>67.2</td></tr><tr><td>Cubic LatticeQ</td><td>69.6</td><td>57.6</td></tr></table>
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 4: Left : Cubic LatticeQ quantization points (red) and $1 \times 3$ filter blocks (blue), Right : LatticeQ quantization points (red) and $1 \times 3$ filter blocks (blue). These are the 2-bit quantization points for visualization.
|
| 157 |
+
|
| 158 |
+
We have demonstrated experimentally the advantages, both in quantization error - as can be seen in Figure 3 - and task loss (Table 6), in using a deformable lattice for quantization rather than a cubic lattice (which is equivalent to uniform scalar quantization). This confirms our hypothesis that the inner correlations of the parameters of a neural network can be exploited for the purpose of quantization. We also show how the distribution of the quantization points indeed fits the multidimensional distribution of the network’s parameters thanks to our method (Figure 4). On this figure, each full precision filter block is represented by a blue dot in the 3D space, and each quantization point of our method is represented by a red dot in the 3D space. LatticeQ increases the concentration of quantization points in the most critical areas of the filters’ multidimensional distribution.
|
| 159 |
+
|
| 160 |
+
# 6.2 MEMORY OVERHEAD
|
| 161 |
+
|
| 162 |
+
In this section, we compute the memory overhead due to using our method, both in per-channel and per-layer settings. Each time a basis is used to quantize either a channel or a layer, we need to store $3 \dot { 2 } + n ^ { 2 } . b$ bits where $n$ is the dimension of the basis and $b$ is the number of quantization bits used for basis elements. 32 comes from the scaling factor. See Table 7 for a few examples among the networks we experimented with in this paper. We report the compression ratios of the full models. The compression rate penalty due to quantization bases is negligible in the per-layer setting, and always less than $1 \%$ in the per-channel setting. The compression that can be achieved by descending to lower bitwidths therefore largely offsets the memory overhead.
|
| 163 |
+
|
| 164 |
+
Table 7: Baseline LatticeQ memory cost. Scalar compression rate is the compresion rate of a scalar quantization method with the same bitwidth, such as Cubic LatticeQ.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Type</td><td>Network</td><td>W4A8 memory total</td><td>Compression rate</td><td> Scalar comp. rate</td></tr><tr><td rowspan="4">Per layer</td><td>Resnet-18</td><td>6.100 MB</td><td>13.06%</td><td>13.06%</td></tr><tr><td>Resnet-50</td><td>13.78 MB</td><td>13.51%</td><td>13.51%</td></tr><tr><td>Densenet</td><td>4.465 MB</td><td>14.14%</td><td>14.14%</td></tr><tr><td>Mobilenet-v2</td><td>2.376 MB</td><td>17.12%</td><td>17.12%</td></tr><tr><td rowspan="4">Per channel</td><td>Resnet-18</td><td>6.158 MB</td><td>13.18%</td><td>13.10%</td></tr><tr><td>Resnet-50</td><td>14.01 MB</td><td>13.74%</td><td>13.61%</td></tr><tr><td>Densenet</td><td>4.555MB</td><td>14.43%</td><td>14.27%</td></tr><tr><td>Mobilenet-v2</td><td>2.547 MB</td><td>18.35%</td><td>17.60 %</td></tr></table>
|
| 167 |
+
|
| 168 |
+
# 7 DISCUSSION AND FUTURE WORK
|
| 169 |
+
|
| 170 |
+
In this paper, we introduced LatticeQ, a new post-training method which exploits the flexibility of lattice quantizers for the purpose of DCNN quantization. LatticeQ is particularly useful in cases where we want to deploy deep learning models trained in floating point precision on lightweight architectures without requiring a single training sample (which could happen for confidentiality, safety reasons, or for the sake of simplicity). We showed that our quantizer significantly outperforms the scalar quantizer for 3-bit quantization on several well-known architectures, and by up to $20 \%$ on Resnet-18, with less than $1 \%$ additional memory costs. LatticeQ does not require any finetuning or hyperparameter optimization, which makes it simple to use in practice.
|
| 171 |
+
|
| 172 |
+
Since lattice quantizers are a generalization of uniform quantizers, every uniform quantization method has a lattice extension. Therefore, we believe that lattice quantizers could have a high potential under other experimental hypotheses, like quantization-aware training. Using limited calibration data in order to perform parameter optimization after quantization could also improve performance, which we leave for future work.
|
| 173 |
+
|
| 174 |
+
# 8 REPRODUCIBILITY STATEMENT
|
| 175 |
+
|
| 176 |
+
We want to make sure our results are reproducible. As suggested in the author guide, we will make a comment directed to the reviewers and area chairs and put a link to an anonymous repository to submit our code. Due to the randomness of our optimization strategy and the choice of calibration data, results may slightly vary. We mitigated this issue by adding restarts to our random search.
|
| 177 |
+
|
| 178 |
+
# REFERENCES
|
| 179 |
+
|
| 180 |
+
L Babai. Nearest lattice point problem. 1986.
|
| 181 |
+
|
| 182 |
+
Ron Banner, Yury Nahshan, Elad Hoffer, and Daniel Soudry. Post-training 4-bit quantization of convolution networks for rapid-deployment. NeurIPS, 2019.
|
| 183 |
+
|
| 184 |
+
Davis Blalock, Jose Javier Gonzalez Ortiz, Jonathan Frankle, and John Guttag. What is the State of Neural Network Pruning? 2020.
|
| 185 |
+
|
| 186 |
+
Yoni Choukroun, Eli Kravchik, Fan Yang, and Pavel Kisilev. Low-bit Quantization of Neural Networks for Efficient Inference. arXiv:1902.06822, 2019.
|
| 187 |
+
|
| 188 |
+
Steven K. Esser, Jeffrey L. McKinstry, Deepika Bablani, Rathinakumar Appuswamy, and Dharmendra S. Modha. Learned Step Size Quantization. arXiv:1902.08153, 2020.
|
| 189 |
+
|
| 190 |
+
Song Han, Huizi Mao, and William J. Dally. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. arXiv:1510.00149, 2016.
|
| 191 |
+
|
| 192 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. arXiv:1512.03385, 2015.
|
| 193 |
+
|
| 194 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara Sainath, and Brian Kingsbury. Deep Neural Networks for Acoustic Modeling in Speech Recognition: The Shared Views of Four Research Groups. IEEE Signal Processing Magazine, 2012.
|
| 195 |
+
|
| 196 |
+
Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv:1704.04861, 2017.
|
| 197 |
+
|
| 198 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely Connected Convolutional Networks. arXiv:1608.06993, 2018.
|
| 199 |
+
|
| 200 |
+
Qing Jin, Linjie Yang, and Zhenyu Liao. Towards Efficient Training for Neural Network Quantization. arXiv:1912.10207, 2019.
|
| 201 |
+
|
| 202 |
+
Raghuraman Krishnamoorthi. Quantizing deep convolutional networks for efficient inference: A whitepaper. arXiv:1806.08342, 2018.
|
| 203 |
+
|
| 204 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. Communications of the ACM, 2017.
|
| 205 |
+
|
| 206 |
+
Lenstra. Lattices. In Algorithmic number theory, volume 44 of MSRI publications. 2008.
|
| 207 |
+
|
| 208 |
+
Yuhang Li, Ruihao Gong, Xu Tan, Yang Yang, Peng Hu, Qi Zhang, Fengwei Yu, Wei Wang, and Shi Gu. BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction. ICLR, 2021.
|
| 209 |
+
|
| 210 |
+
Xingchao Liu, Mao Ye, Dengyong Zhou, and Qiang Liu. Post-training Quantization with Multiple Points: Mixed Precision without Mixed Precision. AAAI, 2021.
|
| 211 |
+
|
| 212 |
+
Jeffrey L. McKinstry, Steven K. Esser, Rathinakumar Appuswamy, Deepika Bablani, John V. Arthur, Izzet B. Yildiz, and Dharmendra S. Modha. Discovering Low-Precision Networks Close to FullPrecision Networks for Efficient Embedded Inference. arXiv:1809.04191, 2019.
|
| 213 |
+
|
| 214 |
+
Daniele Micciancio. On the Hardness of the Shortest Vector Problem. 1998.
|
| 215 |
+
|
| 216 |
+
Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-Free Quantization Through Weight Equalization and Bias Correction. ICCV, 2019.
|
| 217 |
+
|
| 218 |
+
Markus Nagel, Rana Ali Amjad, Mart Van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? Adaptive rounding for post-training quantization. PMLR, 2020.
|
| 219 |
+
|
| 220 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An Imperative Style, High-Performance Deep Learning Library. NeurIPS, 2019.
|
| 221 |
+
|
| 222 |
+
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. arXiv:1409.0575, 2015.
|
| 223 |
+
|
| 224 |
+
Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. MobileNetV2: Inverted Residuals and Linear Bottlenecks. IEEE, 2018.
|
| 225 |
+
|
| 226 |
+
Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv:1409.1556, 2015.
|
| 227 |
+
|
| 228 |
+
Pierre Stock, Armand Joulin, Remi Gribonval, Benjamin Graham, and Herve Jegou. And the bit goes down: Revisiting the quantization of neural networks. ICLR, 2020.
|
| 229 |
+
|
| 230 |
+
Peisong Wang, Qiang Chen, Xiangyu He, and Jian Cheng. Towards Accurate Post-training Network Quantization via Bit-Split and Stitching. ICML, 2020.
|
| 231 |
+
|
| 232 |
+
Ritchie Zhao, Yuwei Hu, Jordan Dotzel, Christopher De Sa, and Zhiru Zhang. Improving Neural Network Quantization without Retraining using Outlier Channel Splitting. PMLR, 2019.
|
| 233 |
+
|
| 234 |
+
# APPENDIX A
|
| 235 |
+
|
| 236 |
+
# Lattices
|
| 237 |
+
|
| 238 |
+
The following part is a very synthetic introduction to the (very rich) theory of lattices. It states only what the reader needs to know to understand how our quantization method works. If the reader wants to know more about lattices, they are welcome to start with Lenstra (2008).
|
| 239 |
+
|
| 240 |
+
# Definition 1
|
| 241 |
+
|
| 242 |
+
A lattice $\Lambda$ of $\mathbb { R } ^ { n }$ is a discrete additive subgroup of $\mathbb { R } ^ { n }$ , such that $s p a n ( \Lambda ) \ = \ \mathbb { R } ^ { n }$ , where $s p a n ( \Lambda )$ is the set of linear combinations of the vectors of $\Lambda$ .
|
| 243 |
+
|
| 244 |
+
# Example
|
| 245 |
+
|
| 246 |
+
$\mathbb { Z } ^ { n }$ is a lattice. It is called the cubic lattice.
|
| 247 |
+
|
| 248 |
+
# Property 1
|
| 249 |
+
|
| 250 |
+
Let $\Lambda$ be a lattice of $\mathbb { R } ^ { n }$ , there is a sequence $\boldsymbol { B }$ of cardinality $n$ of lattice vectors such that any vector that belongs to $\Lambda$ can be uniquely expressed as an integer linear combination of the elements of $\boldsymbol { B }$ . Such a sequence is called basis of $\Lambda$ .
|
| 251 |
+
|
| 252 |
+
# Examples
|
| 253 |
+
|
| 254 |
+
$$
|
| 255 |
+
\begin{array} { r l } & { \bullet \ ( ( 1 , 0 ) , ( 0 , 1 ) ) \mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \mathbb { Z } ^ 2 ~ } } \\ & { \bullet \ ( ( 1 , 0 ) , ( 1 , 1 ) ) \mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \mathbb { Z } ^ 2 ~ } } \\ & { \bullet \ ( \delta _ { i , i } ) _ { 1 \leq i \leq n } \mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \mathbb { Z } ^ n ~ } } \end{array}
|
| 256 |
+
$$
|
| 257 |
+
|
| 258 |
+
# Observation
|
| 259 |
+
|
| 260 |
+
The knowledge of a basis of a lattice $\Lambda$ is sufficient to know every point of the lattice. Given that we want to use this type of structure to quantize a weight distribution, this observation allows us to avoid keeping the whole lattice stored as a codebook in memory.
|
| 261 |
+
|
| 262 |
+
# Important observation
|
| 263 |
+
|
| 264 |
+
We shall emphasize that the uniform scalar quantization scheme widely used for neural networks quantization is nothing else but a cubic lattice quantization scheme. Therefore, lattice quantization is nothing else but a generalization of scalar techniques.
|
| 265 |
+
|
| 266 |
+
# APPENDIX B
|
| 267 |
+
|
| 268 |
+
# Heuristic details
|
| 269 |
+
|
| 270 |
+
This paragraph is dedicated to providing the details of our heuristic FindBasis (algorithm 3). Let $\begin{array} { r } { s c = \frac { et { } { . } { \sum } } { 2 ^ { b - 1 } } } \end{array}$ where $b$ is the bitwidth of the channel, or layer, to be quantized. Basis $\boldsymbol { B }$ is ini${ \frac { s c } { 1 0 ^ { 4 } } } \ * \ I _ { n }$ $T$ ists in a sequence of 800 steps at each of these deviation values :. We apply this algorithm with 5 restarts and keep the best basis at $[ \frac { s c } { 1 0 ^ { 4 } } , s c , \frac { s c } { 2 } , \frac { s c } { 3 } , \frac { s c } { 5 } , \frac { s c } { 7 } , \frac { s c } { 9 } , \frac { s c } { 1 5 } , \frac { s c } { 3 0 } ]$
|
| 271 |
+
each restart. Note that it is possible to reduce the number of steps and hence shrink computation time.
|
| 272 |
+
|
| 273 |
+
# APPENDIX C
|
| 274 |
+
|
| 275 |
+
# Quantile tables
|
| 276 |
+
|
| 277 |
+
Table 8: Quantiles chosen for Resnet and Densenet activation quantization.
|
| 278 |
+
|
| 279 |
+
<table><tr><td>Bitwidth</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>Quantile</td><td>0.97</td><td>0.992</td><td>0.9991</td><td>0.9997</td><td>0.9998</td><td>0.99995</td><td>0.99999</td><td>1</td></tr></table>
|
| 280 |
+
|
| 281 |
+
Table 9: Quantiles chosen for VGG activation quantization.
|
| 282 |
+
|
| 283 |
+
<table><tr><td>Bitwidth</td><td>3</td><td>4</td><td>8</td></tr><tr><td>Quantile</td><td>0.9999</td><td>0.9999</td><td>1</td></tr></table>
|
| 284 |
+
|
| 285 |
+
Table 10: Quantiles chosen for Mobilenet activation quantization.
|
| 286 |
+
|
| 287 |
+
<table><tr><td>Bitwidth</td><td>3</td><td>4</td><td>8</td></tr><tr><td>Quantile</td><td>0.986</td><td>0.998</td><td>1</td></tr></table>
|
| 288 |
+
|
| 289 |
+
# APPENDIX D
|
| 290 |
+
|
| 291 |
+
# Intuition on vector quantization
|
| 292 |
+
|
| 293 |
+
We know for a fact that correlated distributions share mutual information, in the sense of Shannon information theory. Shannon’s mutual information between continuous random variables $X$ and $Y$ is calculated as a double integral :
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
I ( X ; Y ) = \int _ { \mathcal { V } } \int _ { \mathcal { X } } p ( X = x , Y = y ) l o g _ { 2 } ( \frac { p ( X = x , Y = y ) } { p ( X = x ) p ( Y = y ) } ) d x d y
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
If $X$ and $Y$ are independant, $I ( X ; Y ) = 0$ , they share no mutual information. When $X = Y$ , $I ( X ; Y ) = H ( X ) = { \overset { \cdot } { H } } ( Y )$ . Now, we model the pairs of correlated weights of the layer we want to quantize with $( w _ { 1 } , w _ { 2 } )$ which follows a bivariate normal distribution with location $\mu = ( 0 , 0 )$ and covariance matrix :
|
| 300 |
+
|
| 301 |
+
$$
|
| 302 |
+
\Sigma = \left( \begin{array} { c c } { { \sigma _ { 1 } ^ { 2 } } } & { { \rho \sigma _ { 1 } \sigma _ { 2 } } } \\ { { \rho \sigma _ { 1 } \sigma _ { 2 } } } & { { \sigma _ { 2 } ^ { 2 } } } \end{array} \right)
|
| 303 |
+
$$
|
| 304 |
+
|
| 305 |
+
where $\sigma _ { 1 } , \sigma _ { 2 }$ are the standard deviations of $w _ { 1 }$ and $w _ { 2 }$ and $\rho$ their correlation coefficient. This yields:
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
I ( w _ { 1 } ; w _ { 2 } ) = - \frac { 1 } { 2 } l o g _ { 2 } ( 1 - \rho ^ { 2 } )
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
Therefore, the more $w _ { 1 }$ and $w _ { 2 }$ are correlated, the more information they share, which means that an independent coding of $w _ { 1 }$ and $w _ { 2 }$ scalars is suboptimal, because of information redundancy. This is the idea behind our approach and behind vector quantization in general.
|
| 312 |
+
|
| 313 |
+
# APPENDIX E
|
| 314 |
+
|
| 315 |
+
# Optimized inference for LatticeQ networks
|
| 316 |
+
|
| 317 |
+
In this section, we suppose that we have a $3 \times 3$ convolution layer $\Lambda$ quantized using our per-layer method, with in input channels and out output channels. We want to compute a forward pass through this layer. Let $( C _ { i } ^ { i n } ) _ { 1 \leq i \leq i n }$ the set of input channels and $( C _ { j } ^ { o u t } ) _ { 1 \leq j \leq o u t }$ the set of output channels. We want to compute $C _ { j } ^ { o u t }$ for each $j$ . Let $W ^ { q }$ the tensor of quantized weights. Let the quantization basis $\begin{array} { r } { \mathcal { B } = ( \mathbf { b _ { 1 } } , \mathbf { b _ { 2 } } , \mathbf { b _ { 3 } } , \mathbf { b _ { 4 } } , \mathbf { b _ { 5 } } , \mathbf { b _ { 6 } } , \mathbf { b _ { 7 } } , \mathbf { b _ { 8 } } , \mathbf { b _ { 9 } } ) . } \end{array}$ . Note that in this notation, our basis has dimension 9, which is not the choice we made in the paper. This is not a big deal, since we can choose to fill coordinates with zeros: $\mathbf { b _ { 1 } } = \left( b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } , 0 , 0 , 0 , 0 , 0 , 0 \right)$ , $\mathbf { b _ { 4 } } = ( 0 , 0 , 0 , b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } , 0 , 0 , 0 )$ , $\mathbf { b _ { 7 } } = ( 0 , 0 , 0 , 0 , 0 , 0 , b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } )$ . In this manner, our 3D bases can be expanded in 9D bases.
|
| 318 |
+
|
| 319 |
+
Usually, in a full precision network, $C _ { j } ^ { o u t }$ is computed as :
|
| 320 |
+
|
| 321 |
+
$$
|
| 322 |
+
C _ { j } ^ { o u t } = \sum _ { i = 1 } ^ { i n } C o n v ( W _ { i , j } ; C _ { i } ^ { i n } )
|
| 323 |
+
$$
|
| 324 |
+
|
| 325 |
+
In our case, we change the order of operations :
|
| 326 |
+
|
| 327 |
+
$$
|
| 328 |
+
C _ { j } ^ { o u t } = \sum _ { k = 1 } ^ { 9 } \sum _ { i = 1 } ^ { i n } W _ { i , j , k } ^ { q } C o n v ( \mathbf { b _ { k } } ; C _ { i } ^ { i n } )
|
| 329 |
+
$$
|
| 330 |
+
|
| 331 |
+
Since $C o n v ( \mathbf { b _ { k } } ; C _ { i } ^ { i n } )$ does not depend on the output channel, we can start by computing $C o n v ( \mathbf { b _ { 1 } } ; C _ { i } ^ { i n } )$ for each $i$ (in convolutions). $\mathbf { b _ { 1 } }$ is uniformly quantized using a simple $\operatorname* { m i n } / \operatorname* { m a x }$ quantizer, therefore we can use low-bit operators to compute these convolutions. Then, we only need to multiply the result by $W _ { i , j , 1 } ^ { q }$ (which is an integer) for each $j$ , and store the result in the corresponding output channel. Then, we reiterate the process with $\mathbf { b _ { 2 } } , \mathbf { b _ { 3 } }$ , etc.
|
| 332 |
+
|
| 333 |
+
With this method, the complexity of the forward pass through $\Lambda$ is $9 \times i n$ low-bit convolutions and $9 \times i n \times o u t$ scalar multiplications and additions.
|
| 334 |
+
|
| 335 |
+
# APPENDIX F
|
| 336 |
+
|
| 337 |
+
# Weight-only quantization
|
| 338 |
+
|
| 339 |
+
Table 11: LatticeQ per-channel weight-only quantization with bias correction.
|
| 340 |
+
|
| 341 |
+
<table><tr><td colspan="4">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W4</td><td>W3</td><td>W2</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>69.0</td><td>66.7</td><td>41.7</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>75.5</td><td>73.6</td><td>44.3</td></tr><tr><td>Densenet</td><td>74.4</td><td>73.2</td><td>68.9</td><td>6.4</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>66.7</td><td>48.9</td><td>0.3</td></tr></table>
|
parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_content_list.json
ADDED
|
@@ -0,0 +1,1740 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "LATTICE QUANTIZATION ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
99,
|
| 9 |
+
473,
|
| 10 |
+
121
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
148,
|
| 20 |
+
398,
|
| 21 |
+
176
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
213,
|
| 32 |
+
544,
|
| 33 |
+
228
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Low bit quantization of weights in increasingly large deep convolutional neural networks (DCNNs) can be critical for their implementation in memory constrained hardware systems. Post-training quantization consists in quantizing a model without retraining, which is user-friendly, fast and data frugal. In this paper, we propose LatticeQ, a new post-training weight quantization method designed for DCNNs. Instead of the standard scalar rounding widely used in state-of-theart quantization methods, LatticeQ uses a quantizer based on lattices - discrete algebraic structures - which we show are able to exploit the inner correlations between the model parameters. LatticeQ allows us to achieve state-of-the-art results in post-training quantization, enabling us to approach full precision accuracies for bitwidths previously not accessible to post-training quantization methods in similar experimental settings. In particular, we achieve ImageNet classification results close to full precision on the popular Resnet-18/50, with only $1 \\%$ and $3 \\%$ accuracy drop for the 4-bit weights and 3-bit weights model architectures respectively. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
243,
|
| 43 |
+
764,
|
| 44 |
+
438
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
463,
|
| 55 |
+
336,
|
| 56 |
+
478
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Complex tasks such as image recognition on large datasets (Krizhevsky et al., 2017; He et al., 2015) and speech recognition (Hinton et al., 2012) are very efficiently solved by deep convolutional neural networks. To improve precision, deep learning models have become continually larger, more memory demanding and computationally heavier. Popular models like ResNet (He et al., 2015) use millions of parameters (Resnet-50 uses 25Mio of them, which represents a storage of almost 100MB of data). However, for embedded systems applications, storing such quantities of information is often impossible in practice. Some architectures are specifically designed to reduce this memory footprint like MobileNet (Howard et al., 2017; Sandler et al., 2018) (Mobilenet-v2 requires just 14MB of memory). But compressing existing architectures is easier than inventing new ones for specific needs. Therefore, various methods were designed to improve memory efficiency and reduce computational complexity of these models, in order to be able to use DCNNs for low power and/or low memory applications. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
494,
|
| 66 |
+
825,
|
| 67 |
+
661
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "There are two major ways of reducing the size of a deep neural network : ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
674,
|
| 77 |
+
650,
|
| 78 |
+
689
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "• Reducing the total number of parameters, through pruning (Blalock et al., 2020), weight sharing, low-rank factorization. \n• Reducing the memory footprint of its parameters and operation complexity, mainly through quantization (Krishnamoorthi, 2018). ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
217,
|
| 87 |
+
699,
|
| 88 |
+
825,
|
| 89 |
+
760
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Recently, quantization of popular models down to 4 and even 3-bit has been made possible, with little to no degradation of task performance (Esser et al., 2020; Jin et al., 2019). These breakthroughs often rely on retraining the model from scratch with stochastic gradient descent, using the full training dataset. This class of methods is known as quantization-aware training, and leads to the best performance in DCNNs quantization. However, using these methods can sometimes be impractical. The first drawback is the need for the full dataset. In some cases we only have access to a trained full precision network, and for confidentiality reasons, it may be impossible to access the full training dataset of this network. A second drawback is their practicality: training a quantized network from scratch can be extremely demanding in computation resources, last generation GPUs, which might not be available for the developer. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
771,
|
| 99 |
+
825,
|
| 100 |
+
910
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "To overcome these constraints, several methods have been suggested that do not rely on retraining a network from scratch. This framework is called post-training quantization. It is commonly acknowledged that post-training methods do not lead to task performance as good as quantization aware training (Krishnamoorthi, 2018), especially when dealing with bitwidths 4 or lower, but they do solve the aforementioned problems, and can be critical for rapid deployment. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
103,
|
| 110 |
+
825,
|
| 111 |
+
174
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Inspired by Nagel et al. (2019), we propose a classification of quantization methods given their level of complexity and data requirements, which extends their own classification. We will use this framework to help the reader compare our method with those of other authors. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
176,
|
| 120 |
+
186,
|
| 121 |
+
825,
|
| 122 |
+
229
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "• Level 1a No data and no finetuning of the network’s parameters. “As simple as an API call”. The required inputs are only the model definition and its weights. (Nagel et al., 2019). \n• Level 1b No data and no finetuning of the network’s parameters. Limited data can be used to calibrate activation quantization thresholds. Per-channel quantization is widely used. (Banner et al., 2019; Zhao et al., 2019). \n• Level 2a Some samples of application data are needed, no finetuning of the network’s parameters. Data determines the quantization function (i.e. step, threshold, channel splitting, mixed precision), or updates batch normalization statistics. Per-channel and per-layer quantization coexist in the state of the art. (Choukroun et al., 2019; Liu et al., 2021). \n• Level 2b Some samples of application data are needed, restricted finetuning pipeline for the network’s parameters. Data is used for layerwise optimization (Nagel et al., 2020; Wang et al., 2020) or blockwise optimization (Li et al., 2021) to improve quantization locally. From this level on, per-layer quantization is standard. \n• Level 3 Quantization aware training. Requires the full dataset and parameter optimization, needs finetuning and hyperparameter tuning to achieve good performance. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
217,
|
| 131 |
+
256,
|
| 132 |
+
825,
|
| 133 |
+
508
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "In this paper, we introduce a new level 1b post-training quantization technique for deep convolutional neural networks, which achieves level 1b state-of-the-art classification performance on ImageNet down to 4-bit weights on Resnet architectures, with less than $1 \\%$ accuracy drop compared to full precision models. We also show good performance for 3-bit quantization with $3 \\%$ accuracy drop compared to full precision. Our method relies on a new quantizer that uses linear correlations between the parameters of convolution layers to minimize its error. The goal of this paper is not to show absolute best performance among all post-training quantization methods, but rather to show some improvement over the scalar quantizer is a standard and simple experimental setting. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
174,
|
| 142 |
+
555,
|
| 143 |
+
825,
|
| 144 |
+
666
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "Our contributions ",
|
| 151 |
+
"text_level": 1,
|
| 152 |
+
"bbox": [
|
| 153 |
+
174,
|
| 154 |
+
680,
|
| 155 |
+
302,
|
| 156 |
+
694
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "1. We introduce a new quantizer, based on the structure of lattices, to allow for more flexible and adaptive quantization of weights, contrary to most other techniques that rely on uniform quantizers. \n2. We explore the impact of combining parameter and activation quantization for our quantizer, to allow for faster inference and low complexity computation. \n3. We provide insights and analysis of how our quantizer works, and its memory overhead. ",
|
| 163 |
+
"bbox": [
|
| 164 |
+
202,
|
| 165 |
+
707,
|
| 166 |
+
825,
|
| 167 |
+
806
|
| 168 |
+
],
|
| 169 |
+
"page_idx": 1
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "This paper is organized as follows: section 2 presents previous work on post-training quantization as well as quantization-aware training. Section 3 analyzes the parameter correlations inside DCNNs and introduces the intuition behind our approach. In section 4, we detail our approach and compare it to existing state-of-the art methods. In section 5, we give additional results of our quantizer without enhancements as an ablation study. Finally, in section 6, we provide analysis of the characteristics of our quantizer, including its quantization error, its distribution, and its memory overhead. ",
|
| 174 |
+
"bbox": [
|
| 175 |
+
174,
|
| 176 |
+
819,
|
| 177 |
+
825,
|
| 178 |
+
902
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 1
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "2 RELATED WORK ",
|
| 185 |
+
"text_level": 1,
|
| 186 |
+
"bbox": [
|
| 187 |
+
176,
|
| 188 |
+
102,
|
| 189 |
+
339,
|
| 190 |
+
117
|
| 191 |
+
],
|
| 192 |
+
"page_idx": 2
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"type": "text",
|
| 196 |
+
"text": "The performance of DCNN quantization schemes depends heavily on hypotheses: availability of training data, computation time and hardware capacities. The best results are currently achieved by quantization-aware training, which is the least restrictive: unlimited access to training data, unlimited computation time and resources, heavy hyperparameter finetuning and human expertise. Recently, promising results in this area have been achieved by Esser et al. (2020), Jin et al. (2019), which both used uniform quantizers for weights and activations. Non uniform quantizers, including vector quantizers relying on clustering techniques, have also been successfully employed (Han et al., 2016; Stock et al., 2020). ",
|
| 197 |
+
"bbox": [
|
| 198 |
+
174,
|
| 199 |
+
132,
|
| 200 |
+
825,
|
| 201 |
+
244
|
| 202 |
+
],
|
| 203 |
+
"page_idx": 2
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"type": "text",
|
| 207 |
+
"text": "Post-training quantization meets stricter specifications than quantization-aware training. Nagel et al. (2019) for example assumed that no data is available at all for quantization. Banner et al. (2019) introduced bias correction and per-channel bit allocation. Choukroun et al. (2019) specifically designed a quantizer to minimize the MSE loss of the quantization operation. Other approaches that use a few samples of data have been proposed (Nagel et al., 2020), which used data in order to learn whether to round the weights up or down. Wang et al. (2020) proceeded by bit optimization, and Liu et al. (2021) exploited multipoint quantization to approximate full precision weight vectors with a linear combination of low bit vectors. ",
|
| 208 |
+
"bbox": [
|
| 209 |
+
174,
|
| 210 |
+
251,
|
| 211 |
+
825,
|
| 212 |
+
362
|
| 213 |
+
],
|
| 214 |
+
"page_idx": 2
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"type": "text",
|
| 218 |
+
"text": "3 PRELIMINARY OBSERVATIONS ",
|
| 219 |
+
"text_level": 1,
|
| 220 |
+
"bbox": [
|
| 221 |
+
178,
|
| 222 |
+
382,
|
| 223 |
+
452,
|
| 224 |
+
397
|
| 225 |
+
],
|
| 226 |
+
"page_idx": 2
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"type": "text",
|
| 230 |
+
"text": "Most post-training schemes try to optimize task performance by adapting their quantizer to better fit the typically bell-shaped density function of the model weights. Moreover, these scalar methods do not pay attention to potential correlations between these parameters. As can be seen on Figure 1, correlations may exist between the weight values of trained DCNNs. ",
|
| 231 |
+
"bbox": [
|
| 232 |
+
174,
|
| 233 |
+
412,
|
| 234 |
+
825,
|
| 235 |
+
468
|
| 236 |
+
],
|
| 237 |
+
"page_idx": 2
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "image",
|
| 241 |
+
"img_path": "images/0ec6b355fa53a5be8ef2a16b1b1e088e7c04ff740e53b742dca68a4907738b85.jpg",
|
| 242 |
+
"image_caption": [
|
| 243 |
+
"Figure 1: Left : Weight scalar distribution in layer 4.0 conv2 of an ImageNet pretrained Resnet50. Right : 2D plot of $( w _ { 1 } , w _ { 2 } )$ in the same layer, where $w _ { i }$ is the $i$ th coordinate of filter $w$ . "
|
| 244 |
+
],
|
| 245 |
+
"image_footnote": [],
|
| 246 |
+
"bbox": [
|
| 247 |
+
258,
|
| 248 |
+
482,
|
| 249 |
+
738,
|
| 250 |
+
602
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "Figure 2 is the correlation matrix of the 9 distributions of filter parameters in a $3 \\times 3$ convolution layer. The first distribution is the one of weights located in the upper left corner of a filter, the second distribution is the one of weights located in the upper center of a filter, etc. Formally, we plot in line $i$ and column $j$ the points $( w _ { i } , w _ { j } )$ for each filter $f = ( w _ { 1 } , . . . , w _ { 9 } )$ in a chosen layer. On the long diagonal, we plot the histogram of $w _ { i }$ . We notice that filters tend to have correlated coordinates, with quite high correlation coefficients. The same observation can be made in other $3 \\times 3$ layers. From this observation, we justify the main assumption of our method: a quantizer “shaped as a parallelogram” is more data efficient than a uniform quantizer “shaped as a square”. ",
|
| 257 |
+
"bbox": [
|
| 258 |
+
173,
|
| 259 |
+
664,
|
| 260 |
+
825,
|
| 261 |
+
776
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 2
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "4 METHODS ",
|
| 268 |
+
"text_level": 1,
|
| 269 |
+
"bbox": [
|
| 270 |
+
174,
|
| 271 |
+
795,
|
| 272 |
+
290,
|
| 273 |
+
811
|
| 274 |
+
],
|
| 275 |
+
"page_idx": 2
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"type": "text",
|
| 279 |
+
"text": "Many state-of-the-art quantization methods rely on scalar uniform quantizers, which require only a few additional parameters: step size, bitwidth, and/or threshold. Other approaches use vector quantization, which may either be scalar or multidimensional, leading to more flexible quantization sets (Han et al., 2016; Stock et al., 2020) but are often limited by the need to use codebooks. LatticeQ takes the best of both approaches. It adds a limited number of additional parameters to encode quantization bases, and offers a broader variety of possible quantization sets than scalar uniform quantizers. ",
|
| 280 |
+
"bbox": [
|
| 281 |
+
173,
|
| 282 |
+
825,
|
| 283 |
+
825,
|
| 284 |
+
924
|
| 285 |
+
],
|
| 286 |
+
"page_idx": 2
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"type": "image",
|
| 290 |
+
"img_path": "images/704c139b5d9537a59d71bf5221b75e28c93218c19619357e3353282a40061357.jpg",
|
| 291 |
+
"image_caption": [
|
| 292 |
+
"Figure 2: Left : Correlation diagram of filters in layer 4.0 conv2 (Conv2d $3 \\times 3 ,$ ). Right : Uniform $\\mathop { \\left. \\sum \\right.} \\left( \\mathrm { \\frac { \\partial } { \\partial \\phi } } \\right) =$ square) quantization and lattice $\\overleftarrow { }$ parallelogram) quantization "
|
| 293 |
+
],
|
| 294 |
+
"image_footnote": [],
|
| 295 |
+
"bbox": [
|
| 296 |
+
189,
|
| 297 |
+
98,
|
| 298 |
+
751,
|
| 299 |
+
306
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 3
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "4.1 LATTICE BASED WEIGHT QUANTIZER",
|
| 306 |
+
"text_level": 1,
|
| 307 |
+
"bbox": [
|
| 308 |
+
176,
|
| 309 |
+
390,
|
| 310 |
+
470,
|
| 311 |
+
404
|
| 312 |
+
],
|
| 313 |
+
"page_idx": 3
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"type": "text",
|
| 317 |
+
"text": "In order to quantize the weights, LatticeQ uses lattices, which are algebraic structures that discretize the notion of vector space (see APPENDIX A for more details). Each lattice has a basis, meaning that each point of the lattice can be written as an integer linear combination of the vectors of this basis. This integer linear combination is the encoding of our quantization. A lattice has infinite cardinality. In order to use this structure as our quantizer we need a finite number of quantization points. We truncate our lattice in the following fashion $:$ let $\\Lambda$ be a lattice, and $B = ( \\mathbf { b _ { i } } ) _ { 1 \\leq i \\leq n } \\in \\mathbb { R } ^ { n }$ a basis of $\\Lambda$ . Given $b$ the bitwidth, our quantization set is $\\begin{array} { r } { Q = \\{ q \\in \\mathbb { R } ^ { n } , q = \\sum _ { i = 1 } ^ { n } \\bar { \\mu } _ { i } \\bar { \\mathbf { b _ { i } } } } \\end{array}$ , $\\forall i \\in$ $\\{ 1 , . . . , n \\}$ , $- 2 ^ { b - 1 } \\leq \\mu _ { i } \\leq 2 ^ { b - 1 } - 1 \\}$ . ",
|
| 318 |
+
"bbox": [
|
| 319 |
+
173,
|
| 320 |
+
415,
|
| 321 |
+
826,
|
| 322 |
+
530
|
| 323 |
+
],
|
| 324 |
+
"page_idx": 3
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "text",
|
| 328 |
+
"text": "In memory, each quantized block is represented by its coordinates in the quantization basis. Let us suppose $\\dot { \\vec { B } } = ( \\mathbf { b _ { 1 } } , \\mathbf { \\dot { b } _ { 2 } } , \\mathbf { b _ { 3 } } ) = ( ( b _ { 1 , 1 } , \\dot { b _ { 1 , 2 } } , b _ { 1 , 3 } ) , ( \\dot { b _ { 2 , 1 } } , b _ { 2 , 2 } , b _ { 2 , 3 } ) , ( b _ { 3 , 1 } , \\dot { b _ { 3 , 2 } } , \\dot { b } _ { 3 , 3 } ) )$ is our quantization basis (with each $b _ { i , j }$ a scalar, possibly quantized with a uniform min/max quantizer), and: ",
|
| 329 |
+
"bbox": [
|
| 330 |
+
174,
|
| 331 |
+
535,
|
| 332 |
+
825,
|
| 333 |
+
579
|
| 334 |
+
],
|
| 335 |
+
"page_idx": 3
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"type": "equation",
|
| 339 |
+
"img_path": "images/29121b9609501af29536dfd379ed3098147665a56dd4440602184c63d4caf7ed.jpg",
|
| 340 |
+
"text": "$$\nF ^ { q } = { \\binom { f _ { 1 } } { f _ { 4 } } } \\quad f _ { 2 } \\quad f _ { 3 } \\\\ { f _ { 7 } } \\quad f _ { 8 } \\quad f _ { 9 } \\quad\n$$",
|
| 341 |
+
"text_format": "latex",
|
| 342 |
+
"bbox": [
|
| 343 |
+
423,
|
| 344 |
+
587,
|
| 345 |
+
575,
|
| 346 |
+
631
|
| 347 |
+
],
|
| 348 |
+
"page_idx": 3
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "is a $3 \\times 3$ quantized filter. It consists in 3 quantized blocks: $( f _ { 1 } , f _ { 2 } , f _ { 3 } )$ , $( f _ { 4 } , f _ { 5 } , f _ { 6 } )$ and $( f _ { 7 } , f _ { 8 } , f _ { 9 } )$ The convolution represented by $F ^ { q }$ is the concatenation of three $1 \\times 3$ vectors: ",
|
| 353 |
+
"bbox": [
|
| 354 |
+
171,
|
| 355 |
+
638,
|
| 356 |
+
821,
|
| 357 |
+
669
|
| 358 |
+
],
|
| 359 |
+
"page_idx": 3
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "equation",
|
| 363 |
+
"img_path": "images/1120d4a864ef12f481395dda31939140a62380a8d9d8cafdc35615a3a21e8e5c.jpg",
|
| 364 |
+
"text": "$$\nF = D e q u a n t ( F ^ { q } ) = \\binom { \\left( f _ { 1 } \\mathbf { b _ { 1 } } + f _ { 2 } \\mathbf { b _ { 2 } } + f _ { 3 } \\mathbf { b _ { 3 } } \\right) } { \\left( f _ { 4 } \\mathbf { b _ { 1 } } + f _ { 5 } \\mathbf { b _ { 2 } } + f _ { 6 } \\mathbf { b _ { 3 } } \\right) }\n$$",
|
| 365 |
+
"text_format": "latex",
|
| 366 |
+
"bbox": [
|
| 367 |
+
330,
|
| 368 |
+
675,
|
| 369 |
+
666,
|
| 370 |
+
720
|
| 371 |
+
],
|
| 372 |
+
"page_idx": 3
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"type": "text",
|
| 376 |
+
"text": "Note that if we choose $\\boldsymbol { B }$ as a uniform scaling of an orthonormal basis $( B = \\lambda \\times I _ { n } )$ ), the quantization set is exactly the one of classic scalar quantization (we call this simplified version “Cubic LatticeQ”). ",
|
| 377 |
+
"bbox": [
|
| 378 |
+
173,
|
| 379 |
+
728,
|
| 380 |
+
823,
|
| 381 |
+
757
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 3
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "text",
|
| 387 |
+
"text": "The quantization process for a $3 \\times 3$ layer is simple: we flatten the weights and group them by blocks of 3. Then, using the quantization basis, we search for the quantization point nearest to this block. The vector found is the quantization point for this block. In practice, we can use Dequant to calculate the convolution in the quantized network. However, for per-layer quantization, we propose an optimized way of dealing with the inference in a LatticeQ-quantized network in APPENDIX E. ",
|
| 388 |
+
"bbox": [
|
| 389 |
+
173,
|
| 390 |
+
762,
|
| 391 |
+
825,
|
| 392 |
+
833
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 3
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Quantizing literally means defining a function from an infinite set to a finite set. In the scalar model, the quantization operation relies on a simple round function. In order to quantize on a lattice, we need to use a more complex algorithm. Actually, the problem of finding the closest lattice point to a real vector is known to be NP-hard (Micciancio, 1998), and is called Closest Vector Problem (CVP): ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
174,
|
| 401 |
+
839,
|
| 402 |
+
825,
|
| 403 |
+
897
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 3
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "“Given $x \\in \\mathbb { R } ^ { n }$ and $\\Lambda$ a lattice of $\\mathbb { R } ^ { n }$ , find $\\lambda \\in \\Lambda$ such that $d ( x , \\lambda ) = m i n \\{ d ( x , l ) , l \\in \\Lambda \\}$ .” ",
|
| 410 |
+
"bbox": [
|
| 411 |
+
196,
|
| 412 |
+
909,
|
| 413 |
+
800,
|
| 414 |
+
924
|
| 415 |
+
],
|
| 416 |
+
"page_idx": 3
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "table",
|
| 420 |
+
"img_path": "images/0453d5609c33da3b95a509140620ad325fd10e87a3ed690a775b776fa662005d.jpg",
|
| 421 |
+
"table_caption": [],
|
| 422 |
+
"table_footnote": [],
|
| 423 |
+
"table_body": "<table><tr><td>Algorithm1Nearest plane algorithm</td></tr><tr><td>1:function BABAI(Basis B,Vector t) 2: B*=GramSchmidt(B)</td></tr><tr><td>3: b←t</td></tr><tr><td>4: for j ∈{n,...,1} do</td></tr><tr><td><b,b> 5: uj←<b></td></tr><tr><td>6: b←b-[ujlbj</td></tr><tr><td>7: end for</td></tr><tr><td>8: return x = ∑=1luj]bj =t-b 9: end function</td></tr></table>",
|
| 424 |
+
"bbox": [
|
| 425 |
+
176,
|
| 426 |
+
117,
|
| 427 |
+
473,
|
| 428 |
+
275
|
| 429 |
+
],
|
| 430 |
+
"page_idx": 4
|
| 431 |
+
},
|
| 432 |
+
{
|
| 433 |
+
"type": "table",
|
| 434 |
+
"img_path": "images/037dfa7d9c89d6efeb78a9e7fd9959693101f9d3ddfe7931bccb720066d4c0a2.jpg",
|
| 435 |
+
"table_caption": [],
|
| 436 |
+
"table_footnote": [],
|
| 437 |
+
"table_body": "<table><tr><td>Algorithm 2 Gram-Schmidt algorithm</td></tr><tr><td>1: function GRAMSCHMIDT(Basis B)</td></tr><tr><td>2: b←b1</td></tr><tr><td>3: for j ∈ {2,..,n} do</td></tr><tr><td>4: <bj,b*>b</td></tr><tr><td>5: end for</td></tr><tr><td>return B* = (b*)1≤j≤n 6:</td></tr><tr><td>7: end function</td></tr></table>",
|
| 438 |
+
"bbox": [
|
| 439 |
+
522,
|
| 440 |
+
135,
|
| 441 |
+
821,
|
| 442 |
+
257
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 4
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "In order to solve the closest vector problem, we use the nearest plane algorithm (Babai, 1986). It is fairly easy to understand and implement, computationally light, and still provides good approximations in low dimension. We detail the implementation in algorithms 1 and 2. ",
|
| 449 |
+
"bbox": [
|
| 450 |
+
174,
|
| 451 |
+
281,
|
| 452 |
+
825,
|
| 453 |
+
324
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 4
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "Now that we have an algorithm to quantize on a lattice, we want to find a good lattice. For the data free approach, we opt for a simple random search with restart as described in algorithm 3. Restarts simply consist in running the algorithm several times in a row and keeping the best result of all the runs. We look for a lattice that reduces the mean cube error loss (MCE) between the full precision weights of the layer (or channel), and their quantized version. We chose this loss rather than MSE because it performed slightly better (Table 1). We assume this is because the MCE loss gives more importance to larger weights that are far away from any quantization point compared to the MSE. ",
|
| 460 |
+
"bbox": [
|
| 461 |
+
173,
|
| 462 |
+
329,
|
| 463 |
+
825,
|
| 464 |
+
428
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 4
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "Algorithm 3 FindBasis ",
|
| 471 |
+
"text_level": 1,
|
| 472 |
+
"bbox": [
|
| 473 |
+
174,
|
| 474 |
+
449,
|
| 475 |
+
330,
|
| 476 |
+
463
|
| 477 |
+
],
|
| 478 |
+
"page_idx": 4
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "table",
|
| 482 |
+
"img_path": "images/363794673145995eef908e366c6c4d6f4c0cb73288cb7f317375f4814edfc37a.jpg",
|
| 483 |
+
"table_caption": [],
|
| 484 |
+
"table_footnote": [],
|
| 485 |
+
"table_body": "<table><tr><td colspan=\"2\">1: function FINDBAsIs(Weight tensor W,Basis dimension dim, Bitwidth bits,Temperatures T)</td></tr><tr><td>2:</td><td>B←Idim</td></tr><tr><td>3:</td><td>for0≤s≤|T|do</td></tr><tr><td>4:</td><td>B'← B'+Sample(g(0,σ= T(s), |BI))</td></tr><tr><td>5:</td><td> if MCELoss(W, Wxg) < MCELoss(W, Wx) then</td></tr><tr><td>6:</td><td>B←B'</td></tr><tr><td>7:</td><td>end if</td></tr><tr><td>8: end for</td><td></td></tr><tr><td>9:</td><td>return B</td></tr><tr><td>10: end function</td><td></td></tr></table>",
|
| 486 |
+
"bbox": [
|
| 487 |
+
178,
|
| 488 |
+
465,
|
| 489 |
+
823,
|
| 490 |
+
611
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 4
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "text",
|
| 496 |
+
"text": "The random transformation we use is a multivariate gaussian noise addition with standard deviation $T ( s )$ , where $T$ is a sequence of temperature steps, that can be adjusted as a hyperparameter, see APPENDIX B. In order to perform low bit computations, we may want to quantize the basis itself to integer values, which we did in all our experiments, by adding a simple $\\operatorname* { m i n } / \\operatorname* { m a x }$ quantizer for $B ^ { \\prime }$ between line 4 and line 5 in algorithm 3. ",
|
| 497 |
+
"bbox": [
|
| 498 |
+
173,
|
| 499 |
+
632,
|
| 500 |
+
825,
|
| 501 |
+
702
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 4
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "Since the approximation factor of the nearest plane algorithm grows in square root in the basis dimension $n$ (Babai, 1986), there is no interest in choosing high dimensional bases. Moreover, it increases the storage requirements, since an n-dimensional basis requires $n ^ { 2 }$ entries in memory. Experimentally, we notice that the most accurate dimension for the quantization basis is 3 for $3 \\times 3$ layers (Table 2), and 2 for $1 \\times 1$ layers. ",
|
| 508 |
+
"bbox": [
|
| 509 |
+
174,
|
| 510 |
+
709,
|
| 511 |
+
825,
|
| 512 |
+
779
|
| 513 |
+
],
|
| 514 |
+
"page_idx": 4
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "table",
|
| 518 |
+
"img_path": "images/0abcda0a02bafc4a7c9be679adefe21f83d7e90be5c6abe54b0c4b9f79b7681f.jpg",
|
| 519 |
+
"table_caption": [
|
| 520 |
+
"Table 1: Comparison between MSE loss and MCE loss for Resnet-18 with weights quantized to 4-bit. "
|
| 521 |
+
],
|
| 522 |
+
"table_footnote": [],
|
| 523 |
+
"table_body": "<table><tr><td colspan=\"3\">Top-1 accuracy</td></tr><tr><td>Network</td><td>MSELoss</td><td>MCELoss</td></tr><tr><td>Resnet-18</td><td>67.85</td><td>67.94</td></tr></table>",
|
| 524 |
+
"bbox": [
|
| 525 |
+
200,
|
| 526 |
+
863,
|
| 527 |
+
460,
|
| 528 |
+
921
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 4
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "table",
|
| 534 |
+
"img_path": "images/cabfd0cd90b4a81850b9790c17f5d4fd17352c905609c971df099a389ff72051.jpg",
|
| 535 |
+
"table_caption": [
|
| 536 |
+
"Table 2: Impact of the choice of the basis dimension in $3 \\times 3$ layers on final accuracy with weights quantized to 4-bit. "
|
| 537 |
+
],
|
| 538 |
+
"table_footnote": [],
|
| 539 |
+
"table_body": "<table><tr><td colspan=\"3\">Top-1 accuracy</td></tr><tr><td>Network</td><td>dim=3</td><td>dim=9</td></tr><tr><td>Resnet-18</td><td>67.94</td><td>61.90</td></tr></table>",
|
| 540 |
+
"bbox": [
|
| 541 |
+
549,
|
| 542 |
+
863,
|
| 543 |
+
795,
|
| 544 |
+
921
|
| 545 |
+
],
|
| 546 |
+
"page_idx": 4
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "text",
|
| 550 |
+
"text": "4.2 ACTIVATION QUANTIZATION ",
|
| 551 |
+
"text_level": 1,
|
| 552 |
+
"bbox": [
|
| 553 |
+
176,
|
| 554 |
+
103,
|
| 555 |
+
411,
|
| 556 |
+
117
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 5
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "As typically done in post-training scenario, we chose to perform activation quantization on one batch of data right before testing the quantized network. In real life, this can be done right before deployment on one batch of application data. We can either quantize activations per layer or per channel. In case we quantize the activations in a layer-wise fashion, the performance drops significantly below the 8-bit setting. In case we quantize the activations in a channel-wise fashion, it is possible to reach an activation precision down to 4-bit without much loss of accuracy by using a quantile trick similar to McKinstry et al. (2019). Let $C$ be an activation channel to quantize. Let $\\alpha _ { C }$ be the quantile 0.9997 of $C$ ’s distribution, which means $p _ { c \\in C } ( c \\leq \\alpha _ { C } ) = 0 . 9 9 9 7$ . We estimate $\\alpha _ { C }$ by running a forward pass with one batch of data. Then we use $\\alpha _ { C }$ as our activation threshold for the channel $C$ . We chose different quantiles depending on the network and activation bitwidths, see APPENDIX C. ",
|
| 563 |
+
"bbox": [
|
| 564 |
+
174,
|
| 565 |
+
131,
|
| 566 |
+
825,
|
| 567 |
+
270
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 5
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "text",
|
| 573 |
+
"text": "4.3 EXPERIMENTAL SETUP ",
|
| 574 |
+
"text_level": 1,
|
| 575 |
+
"bbox": [
|
| 576 |
+
176,
|
| 577 |
+
289,
|
| 578 |
+
372,
|
| 579 |
+
303
|
| 580 |
+
],
|
| 581 |
+
"page_idx": 5
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
"type": "text",
|
| 585 |
+
"text": "We evaluate our method on the ImageNet (Russakovsky et al., 2015) classification task. All experiments are made using PyTorch (Paszke et al., 2019), and the pretrained models used all come from the torchvision.models library. The basis is always quantized with the same bitwitdh as the activations. Based on experiments, we set bases dimension to 3 for $3 \\times 3$ convolution layers, 2 for $1 \\times 1$ layers and linear layers, and 1 for the first layer (since we did not notice any advantage in increasing the dimension for this particular layer). To quantize activations, we use a calibration batch of 512 images. As it is common practice in such applications, we quantize the pooling layers, first layer and last layer to 8-bit, and we do not quantize layer biases (only VGG (Simonyan & Zisserman, 2015) has biases). We report bitwidths settings and top-1 accuracy for each model tested, and we also provide the results from Banner et al. (2019) and Choukroun et al. (2019) for comparison. In part 4.4, we report the results of per-channel LatticeQ with data free enhancements in Table 3. In part 5, we report the results of per-channel LatticeQ without bias correction (refered to as our baseline) in Table 4 and the results of per-layer LatticeQ without bias correction in Table 5. Finally, in APPENDIX F, we report the results of weights-only quantization. ",
|
| 586 |
+
"bbox": [
|
| 587 |
+
173,
|
| 588 |
+
315,
|
| 589 |
+
825,
|
| 590 |
+
510
|
| 591 |
+
],
|
| 592 |
+
"page_idx": 5
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "text",
|
| 596 |
+
"text": "4.4 DATA FREE PER-CHANNEL ENHANCEMENT ",
|
| 597 |
+
"text_level": 1,
|
| 598 |
+
"bbox": [
|
| 599 |
+
176,
|
| 600 |
+
530,
|
| 601 |
+
508,
|
| 602 |
+
544
|
| 603 |
+
],
|
| 604 |
+
"page_idx": 5
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"type": "table",
|
| 608 |
+
"img_path": "images/03b7e482e9b109f3629bf6f0ffbee3b3d7cdbe914d6ab7764ad5d0780394937d.jpg",
|
| 609 |
+
"table_caption": [
|
| 610 |
+
"Table 3: LatticeQ with bias correction on ImageNet. For 8-bits activations we use naive per-layer activation quantization. For 4-bit activations, we use our quantile per-channel approach. For weights, we use per-channel quantization and bias correction. We compare our results with results that we generated from the source code of Banner et al. (2019), using per-channel quantization and bias correction. We also compare with paper results from OMSE (Choukroun et al., 2019). "
|
| 611 |
+
],
|
| 612 |
+
"table_footnote": [],
|
| 613 |
+
"table_body": "<table><tr><td colspan=\"3\"></td><td colspan=\"3\"> Top-1 accuracy</td><td rowspan=\"2\">W3A3</td><td rowspan=\"2\">W2A8</td></tr><tr><td>Network</td><td>Method</td><td>FP32</td><td>W4A8</td><td>W4A4</td><td>W3A8</td></tr><tr><td rowspan=\"3\">Resnet-18</td><td>LatticeQ (Ours)</td><td>69.6</td><td>68.9</td><td>67.3</td><td>66.2</td><td>56.9</td><td>38.5</td></tr><tr><td>Banner et al.</td><td>69.6</td><td>67.4</td><td>64.3</td><td>43.4</td><td>28.6</td><td>1.3</td></tr><tr><td>OMSE+opt1</td><td>69.6</td><td>67.1</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"3\">Resnet-50</td><td>LatticeQ (Ours)</td><td>76.0</td><td>75.3</td><td>70.9</td><td>73.1</td><td>55.0</td><td>45.6</td></tr><tr><td>Banner et al.</td><td>76.0</td><td>74.8</td><td>70.3</td><td>67.5</td><td>38.4</td><td>0.4</td></tr><tr><td>OMSE+opt1</td><td>76.0</td><td>74.7</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"3\">VGG-16bn</td><td>LatticeQ (Ours)</td><td>73.4</td><td>73.0</td><td>70.6</td><td>70.8</td><td>61.9</td><td>35.8</td></tr><tr><td>Banner et al.</td><td>73.4</td><td>71.6</td><td>70.4</td><td>65.9</td><td>59.7</td><td>0.1</td></tr><tr><td>OMSE+opt1</td><td>73.4</td><td>72.3</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"3\">Densenet</td><td>LatticeQ (Ours)</td><td>74.4</td><td>71.5</td><td>69.5</td><td>65.9</td><td>54.2</td><td>9.6</td></tr><tr><td>Banner et al.</td><td>74.4</td><td>70.2</td><td>63.0</td><td>53.8</td><td>18.7</td><td>0.4</td></tr><tr><td>OMSE+opt1</td><td>74.4</td><td>71.7</td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"2\">Mobilenet-v2</td><td>LatticeQ (Ours)</td><td>71.9</td><td>66.5</td><td>46.0</td><td>46.9</td><td>0.3</td><td>0.3</td></tr><tr><td>Banner et al.</td><td>71.9</td><td>61.1</td><td>36.3</td><td>10.2</td><td>0.3</td><td>0.1</td></tr></table>",
|
| 614 |
+
"bbox": [
|
| 615 |
+
196,
|
| 616 |
+
648,
|
| 617 |
+
802,
|
| 618 |
+
915
|
| 619 |
+
],
|
| 620 |
+
"page_idx": 5
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"type": "text",
|
| 624 |
+
"text": "For this part, we rely on the work of Banner et al. (2019). First, we use per-channel quantization, to allow for more accurate quantization in each channel. We then add bias correction. Quantization operations tend to alter the moments (mean and variance) of the weight distribution in each channel, which is taken into account by bias correction. In our case, bias correction is also computed during the execution of F indBasis for bitwidths lower than 4, so that the quantization basis found takes bias correction into account. Line 5 of F indBasis is, in this case, replaced by : ",
|
| 625 |
+
"bbox": [
|
| 626 |
+
174,
|
| 627 |
+
103,
|
| 628 |
+
825,
|
| 629 |
+
188
|
| 630 |
+
],
|
| 631 |
+
"page_idx": 6
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"type": "text",
|
| 635 |
+
"text": "$\\begin{array} { c } { { { \\bf i f } M C E L o s s ( W , b i a s c o r r e c t i o n ( W _ { \\Lambda _ { B ^ { \\prime } } } ^ { q } ) ) < M C E L o s s ( W , b i a s c o r r e c t i o n ( W _ { \\Lambda _ { B } } ^ { q } ) ) \\ { \\bf i f } } } \\\\ { { { \\cal B } B ^ { \\prime } } } \\end{array}$ hen end if ",
|
| 636 |
+
"bbox": [
|
| 637 |
+
187,
|
| 638 |
+
200,
|
| 639 |
+
794,
|
| 640 |
+
246
|
| 641 |
+
],
|
| 642 |
+
"page_idx": 6
|
| 643 |
+
},
|
| 644 |
+
{
|
| 645 |
+
"type": "text",
|
| 646 |
+
"text": "The results in Table 3 show the substantial improvement of LatticeQ over state-of-the-art approaches. Our method outperforms Banner et al. (2019) with similar hypotheses, and even the level 2a OMSE $^ +$ opt method, in almost all settings for all presented models. ",
|
| 647 |
+
"bbox": [
|
| 648 |
+
176,
|
| 649 |
+
257,
|
| 650 |
+
823,
|
| 651 |
+
299
|
| 652 |
+
],
|
| 653 |
+
"page_idx": 6
|
| 654 |
+
},
|
| 655 |
+
{
|
| 656 |
+
"type": "text",
|
| 657 |
+
"text": "As we read the Table 3 from left to right, quantization is more and more aggressive. We find that LatticeQ manages to stay within $1 \\%$ of full precision model accuracy on Resnets and VGG in 4- bit weights and 8-bit activation, and within $3 \\%$ in 3-bit weights and 8-bit activation. As expected, compact models like Densenet (Huang et al., 2018) and Mobilenet-V2 (Sandler et al., 2018) are less resilient to quantization than Resnets (He et al., 2015) and VGG (Simonyan & Zisserman, 2015). It is noticeable that our method reaches a top-1 accuracy of $5 4 . 2 \\%$ for Densenet in 3-bit weights and 3-bit activation setting while the method proposed by Banner et al. (2019) only achieved $1 8 . 7 \\%$ . ",
|
| 658 |
+
"bbox": [
|
| 659 |
+
173,
|
| 660 |
+
306,
|
| 661 |
+
825,
|
| 662 |
+
405
|
| 663 |
+
],
|
| 664 |
+
"page_idx": 6
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"type": "text",
|
| 668 |
+
"text": "5 ABLATION STUDY ",
|
| 669 |
+
"text_level": 1,
|
| 670 |
+
"bbox": [
|
| 671 |
+
176,
|
| 672 |
+
443,
|
| 673 |
+
354,
|
| 674 |
+
459
|
| 675 |
+
],
|
| 676 |
+
"page_idx": 6
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"type": "text",
|
| 680 |
+
"text": "In this section, we present an ablation study which objective is twofold. First, we provide the results of our per-channel quantizer without bias correction (Table 4). It is noticeable that our results remain close to full precision accuracy on Resnets and VGG (within $2 \\%$ in per-channel W4A8, and within $10 \\%$ in W3A8 for instance). Bias correction increases our method’s accuracy, but our baseline significantly outperforms baselines of other scalar quantization methods (Banner et al., 2019; Choukroun et al., 2019). Based on those results, we want to emphasize that lattice quantization is indeed the cornerstone of the quantization process. ",
|
| 681 |
+
"bbox": [
|
| 682 |
+
173,
|
| 683 |
+
486,
|
| 684 |
+
825,
|
| 685 |
+
584
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 6
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "table",
|
| 691 |
+
"img_path": "images/609848ed31ceb1858a2ebb64ed3ae039b4662bfa7461f53c8e25d8b4b5778785.jpg",
|
| 692 |
+
"table_caption": [
|
| 693 |
+
"Table 4: LatticeQ per-channel baseline quantization of weights and activations. "
|
| 694 |
+
],
|
| 695 |
+
"table_footnote": [],
|
| 696 |
+
"table_body": "<table><tr><td colspan=\"6\">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W4A8</td><td>W4A4</td><td>W3A8</td><td>W3A3</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>67.2</td><td>66.0</td><td>59.6</td><td>40.2</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>74.6</td><td>70.6</td><td>69.3</td><td>47.6</td></tr><tr><td>VGG-16bn</td><td>73.4</td><td>72.4</td><td>70.4</td><td>64.3</td><td>57.0</td></tr><tr><td>Densenet</td><td>74.4</td><td>70.5</td><td>66.5</td><td>54.9</td><td>33.9</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>58.0</td><td>31.7</td><td>21.5</td><td>0.1</td></tr></table>",
|
| 697 |
+
"bbox": [
|
| 698 |
+
290,
|
| 699 |
+
645,
|
| 700 |
+
709,
|
| 701 |
+
762
|
| 702 |
+
],
|
| 703 |
+
"page_idx": 6
|
| 704 |
+
},
|
| 705 |
+
{
|
| 706 |
+
"type": "text",
|
| 707 |
+
"text": "Next, we provide the results of our per-layer quantizer (Table 5). Quantizing per layer in W8A8 does not impact performance on Resnets. Although it remains challenging to quantize weights per layer under our assumptions (no calibration data for weights), we show promising accuracy that lays the foundations of potential level 2 applications. ",
|
| 708 |
+
"bbox": [
|
| 709 |
+
174,
|
| 710 |
+
809,
|
| 711 |
+
825,
|
| 712 |
+
866
|
| 713 |
+
],
|
| 714 |
+
"page_idx": 6
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"type": "table",
|
| 718 |
+
"img_path": "images/34da7a9dd115f864c3cd1663cac652e900a54c70424b3a26feb2202efb5de8ad.jpg",
|
| 719 |
+
"table_caption": [
|
| 720 |
+
"Table 5: LatticeQ per-layer baseline quantization of weights and activations. "
|
| 721 |
+
],
|
| 722 |
+
"table_footnote": [],
|
| 723 |
+
"table_body": "<table><tr><td></td><td colspan=\"3\">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W8A8</td><td>W4A8 W3A8</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>69.5</td><td>59.5 23.8 70.2</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>75.9</td><td>41.9</td></tr><tr><td>VGG-16bn Densenet</td><td>73.4</td><td>73.3</td><td>68.5 42.5 59.4</td></tr><tr><td></td><td>74.4</td><td>71.3</td><td>11.4</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>70.6</td><td>12.9 0.2</td></tr></table>",
|
| 724 |
+
"bbox": [
|
| 725 |
+
321,
|
| 726 |
+
131,
|
| 727 |
+
676,
|
| 728 |
+
248
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 7
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "6 ANALYSIS ",
|
| 735 |
+
"text_level": 1,
|
| 736 |
+
"bbox": [
|
| 737 |
+
173,
|
| 738 |
+
332,
|
| 739 |
+
292,
|
| 740 |
+
347
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 7
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "image",
|
| 746 |
+
"img_path": "images/211ba4091b987a9a81336cddea584bd0fb08cd81f7f8f4c5e95a62ea696c6e64.jpg",
|
| 747 |
+
"image_caption": [
|
| 748 |
+
"Figure 3: Resnet18 per-layer quantization error comparison between LatticeQ and Cubic LatticeQ (scalar quantization). Vertical axis is MCE. "
|
| 749 |
+
],
|
| 750 |
+
"image_footnote": [],
|
| 751 |
+
"bbox": [
|
| 752 |
+
210,
|
| 753 |
+
411,
|
| 754 |
+
470,
|
| 755 |
+
579
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 7
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "table",
|
| 761 |
+
"img_path": "images/d3df53bc086e99cf028dc33c4e91549270ae3411c5cc5b25aa6ba2f8b7e633be.jpg",
|
| 762 |
+
"table_caption": [
|
| 763 |
+
"Table 6: Comparison between baseline perchannel LatticeQ and baseline per-channel Cubic LatticeQ (scalar quantization). "
|
| 764 |
+
],
|
| 765 |
+
"table_footnote": [],
|
| 766 |
+
"table_body": "<table><tr><td>Network</td><td>Method</td><td>FP32</td><td>W4A8</td></tr><tr><td rowspan=\"2\">Resnet-18</td><td>LatticeQ</td><td>69.6</td><td>67.2</td></tr><tr><td>Cubic LatticeQ</td><td>69.6</td><td>57.6</td></tr></table>",
|
| 767 |
+
"bbox": [
|
| 768 |
+
522,
|
| 769 |
+
530,
|
| 770 |
+
848,
|
| 771 |
+
589
|
| 772 |
+
],
|
| 773 |
+
"page_idx": 7
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"type": "image",
|
| 777 |
+
"img_path": "images/d47bd8ebfcd3b7cf602ea80b94b3be3369a1f0e3f6c95355554618cd4fe5fe05.jpg",
|
| 778 |
+
"image_caption": [
|
| 779 |
+
"Figure 4: Left : Cubic LatticeQ quantization points (red) and $1 \\times 3$ filter blocks (blue), Right : LatticeQ quantization points (red) and $1 \\times 3$ filter blocks (blue). These are the 2-bit quantization points for visualization. "
|
| 780 |
+
],
|
| 781 |
+
"image_footnote": [],
|
| 782 |
+
"bbox": [
|
| 783 |
+
243,
|
| 784 |
+
669,
|
| 785 |
+
761,
|
| 786 |
+
838
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 7
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"text": "We have demonstrated experimentally the advantages, both in quantization error - as can be seen in Figure 3 - and task loss (Table 6), in using a deformable lattice for quantization rather than a cubic lattice (which is equivalent to uniform scalar quantization). This confirms our hypothesis that the inner correlations of the parameters of a neural network can be exploited for the purpose of quantization. We also show how the distribution of the quantization points indeed fits the multidimensional distribution of the network’s parameters thanks to our method (Figure 4). On this figure, each full precision filter block is represented by a blue dot in the 3D space, and each quantization point of our method is represented by a red dot in the 3D space. LatticeQ increases the concentration of quantization points in the most critical areas of the filters’ multidimensional distribution. ",
|
| 793 |
+
"bbox": [
|
| 794 |
+
174,
|
| 795 |
+
103,
|
| 796 |
+
825,
|
| 797 |
+
229
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 8
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "6.2 MEMORY OVERHEAD ",
|
| 804 |
+
"text_level": 1,
|
| 805 |
+
"bbox": [
|
| 806 |
+
176,
|
| 807 |
+
246,
|
| 808 |
+
361,
|
| 809 |
+
260
|
| 810 |
+
],
|
| 811 |
+
"page_idx": 8
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
"type": "text",
|
| 815 |
+
"text": "In this section, we compute the memory overhead due to using our method, both in per-channel and per-layer settings. Each time a basis is used to quantize either a channel or a layer, we need to store $3 \\dot { 2 } + n ^ { 2 } . b$ bits where $n$ is the dimension of the basis and $b$ is the number of quantization bits used for basis elements. 32 comes from the scaling factor. See Table 7 for a few examples among the networks we experimented with in this paper. We report the compression ratios of the full models. The compression rate penalty due to quantization bases is negligible in the per-layer setting, and always less than $1 \\%$ in the per-channel setting. The compression that can be achieved by descending to lower bitwidths therefore largely offsets the memory overhead. ",
|
| 816 |
+
"bbox": [
|
| 817 |
+
174,
|
| 818 |
+
271,
|
| 819 |
+
825,
|
| 820 |
+
383
|
| 821 |
+
],
|
| 822 |
+
"page_idx": 8
|
| 823 |
+
},
|
| 824 |
+
{
|
| 825 |
+
"type": "table",
|
| 826 |
+
"img_path": "images/5b0006ecd247cf58d5db7873ea107b1b624dfbab200bc6800ac8924bf5229a3e.jpg",
|
| 827 |
+
"table_caption": [
|
| 828 |
+
"Table 7: Baseline LatticeQ memory cost. Scalar compression rate is the compresion rate of a scalar quantization method with the same bitwidth, such as Cubic LatticeQ. "
|
| 829 |
+
],
|
| 830 |
+
"table_footnote": [],
|
| 831 |
+
"table_body": "<table><tr><td>Type</td><td>Network</td><td>W4A8 memory total</td><td>Compression rate</td><td> Scalar comp. rate</td></tr><tr><td rowspan=\"4\">Per layer</td><td>Resnet-18</td><td>6.100 MB</td><td>13.06%</td><td>13.06%</td></tr><tr><td>Resnet-50</td><td>13.78 MB</td><td>13.51%</td><td>13.51%</td></tr><tr><td>Densenet</td><td>4.465 MB</td><td>14.14%</td><td>14.14%</td></tr><tr><td>Mobilenet-v2</td><td>2.376 MB</td><td>17.12%</td><td>17.12%</td></tr><tr><td rowspan=\"4\">Per channel</td><td>Resnet-18</td><td>6.158 MB</td><td>13.18%</td><td>13.10%</td></tr><tr><td>Resnet-50</td><td>14.01 MB</td><td>13.74%</td><td>13.61%</td></tr><tr><td>Densenet</td><td>4.555MB</td><td>14.43%</td><td>14.27%</td></tr><tr><td>Mobilenet-v2</td><td>2.547 MB</td><td>18.35%</td><td>17.60 %</td></tr></table>",
|
| 832 |
+
"bbox": [
|
| 833 |
+
181,
|
| 834 |
+
443,
|
| 835 |
+
815,
|
| 836 |
+
590
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 8
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "7 DISCUSSION AND FUTURE WORK ",
|
| 843 |
+
"text_level": 1,
|
| 844 |
+
"bbox": [
|
| 845 |
+
176,
|
| 846 |
+
622,
|
| 847 |
+
478,
|
| 848 |
+
638
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 8
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "text",
|
| 854 |
+
"text": "In this paper, we introduced LatticeQ, a new post-training method which exploits the flexibility of lattice quantizers for the purpose of DCNN quantization. LatticeQ is particularly useful in cases where we want to deploy deep learning models trained in floating point precision on lightweight architectures without requiring a single training sample (which could happen for confidentiality, safety reasons, or for the sake of simplicity). We showed that our quantizer significantly outperforms the scalar quantizer for 3-bit quantization on several well-known architectures, and by up to $20 \\%$ on Resnet-18, with less than $1 \\%$ additional memory costs. LatticeQ does not require any finetuning or hyperparameter optimization, which makes it simple to use in practice. ",
|
| 855 |
+
"bbox": [
|
| 856 |
+
173,
|
| 857 |
+
654,
|
| 858 |
+
825,
|
| 859 |
+
766
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 8
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "text",
|
| 865 |
+
"text": "Since lattice quantizers are a generalization of uniform quantizers, every uniform quantization method has a lattice extension. Therefore, we believe that lattice quantizers could have a high potential under other experimental hypotheses, like quantization-aware training. Using limited calibration data in order to perform parameter optimization after quantization could also improve performance, which we leave for future work. ",
|
| 866 |
+
"bbox": [
|
| 867 |
+
174,
|
| 868 |
+
772,
|
| 869 |
+
825,
|
| 870 |
+
842
|
| 871 |
+
],
|
| 872 |
+
"page_idx": 8
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"type": "text",
|
| 876 |
+
"text": "8 REPRODUCIBILITY STATEMENT ",
|
| 877 |
+
"text_level": 1,
|
| 878 |
+
"bbox": [
|
| 879 |
+
176,
|
| 880 |
+
102,
|
| 881 |
+
464,
|
| 882 |
+
118
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 9
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "We want to make sure our results are reproducible. As suggested in the author guide, we will make a comment directed to the reviewers and area chairs and put a link to an anonymous repository to submit our code. Due to the randomness of our optimization strategy and the choice of calibration data, results may slightly vary. We mitigated this issue by adding restarts to our random search. ",
|
| 889 |
+
"bbox": [
|
| 890 |
+
174,
|
| 891 |
+
133,
|
| 892 |
+
825,
|
| 893 |
+
189
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 9
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "REFERENCES ",
|
| 900 |
+
"text_level": 1,
|
| 901 |
+
"bbox": [
|
| 902 |
+
174,
|
| 903 |
+
102,
|
| 904 |
+
287,
|
| 905 |
+
118
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 10
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "text",
|
| 911 |
+
"text": "L Babai. Nearest lattice point problem. 1986. ",
|
| 912 |
+
"bbox": [
|
| 913 |
+
174,
|
| 914 |
+
126,
|
| 915 |
+
473,
|
| 916 |
+
142
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 10
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "text",
|
| 922 |
+
"text": "Ron Banner, Yury Nahshan, Elad Hoffer, and Daniel Soudry. Post-training 4-bit quantization of convolution networks for rapid-deployment. NeurIPS, 2019. ",
|
| 923 |
+
"bbox": [
|
| 924 |
+
169,
|
| 925 |
+
151,
|
| 926 |
+
825,
|
| 927 |
+
180
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 10
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "text",
|
| 933 |
+
"text": "Davis Blalock, Jose Javier Gonzalez Ortiz, Jonathan Frankle, and John Guttag. What is the State of Neural Network Pruning? 2020. ",
|
| 934 |
+
"bbox": [
|
| 935 |
+
171,
|
| 936 |
+
189,
|
| 937 |
+
825,
|
| 938 |
+
219
|
| 939 |
+
],
|
| 940 |
+
"page_idx": 10
|
| 941 |
+
},
|
| 942 |
+
{
|
| 943 |
+
"type": "text",
|
| 944 |
+
"text": "Yoni Choukroun, Eli Kravchik, Fan Yang, and Pavel Kisilev. Low-bit Quantization of Neural Networks for Efficient Inference. arXiv:1902.06822, 2019. ",
|
| 945 |
+
"bbox": [
|
| 946 |
+
171,
|
| 947 |
+
228,
|
| 948 |
+
823,
|
| 949 |
+
258
|
| 950 |
+
],
|
| 951 |
+
"page_idx": 10
|
| 952 |
+
},
|
| 953 |
+
{
|
| 954 |
+
"type": "text",
|
| 955 |
+
"text": "Steven K. Esser, Jeffrey L. McKinstry, Deepika Bablani, Rathinakumar Appuswamy, and Dharmendra S. Modha. Learned Step Size Quantization. arXiv:1902.08153, 2020. ",
|
| 956 |
+
"bbox": [
|
| 957 |
+
173,
|
| 958 |
+
267,
|
| 959 |
+
823,
|
| 960 |
+
297
|
| 961 |
+
],
|
| 962 |
+
"page_idx": 10
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"type": "text",
|
| 966 |
+
"text": "Song Han, Huizi Mao, and William J. Dally. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. arXiv:1510.00149, 2016. ",
|
| 967 |
+
"bbox": [
|
| 968 |
+
173,
|
| 969 |
+
306,
|
| 970 |
+
821,
|
| 971 |
+
337
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 10
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "text",
|
| 977 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. arXiv:1512.03385, 2015. ",
|
| 978 |
+
"bbox": [
|
| 979 |
+
173,
|
| 980 |
+
345,
|
| 981 |
+
821,
|
| 982 |
+
376
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 10
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara Sainath, and Brian Kingsbury. Deep Neural Networks for Acoustic Modeling in Speech Recognition: The Shared Views of Four Research Groups. IEEE Signal Processing Magazine, 2012. ",
|
| 989 |
+
"bbox": [
|
| 990 |
+
173,
|
| 991 |
+
385,
|
| 992 |
+
825,
|
| 993 |
+
441
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 10
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv:1704.04861, 2017. ",
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
176,
|
| 1002 |
+
452,
|
| 1003 |
+
823,
|
| 1004 |
+
494
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 10
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely Connected Convolutional Networks. arXiv:1608.06993, 2018. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
171,
|
| 1013 |
+
505,
|
| 1014 |
+
823,
|
| 1015 |
+
534
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 10
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "Qing Jin, Linjie Yang, and Zhenyu Liao. Towards Efficient Training for Neural Network Quantization. arXiv:1912.10207, 2019. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
173,
|
| 1024 |
+
542,
|
| 1025 |
+
823,
|
| 1026 |
+
573
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 10
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "Raghuraman Krishnamoorthi. Quantizing deep convolutional networks for efficient inference: A whitepaper. arXiv:1806.08342, 2018. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
173,
|
| 1035 |
+
582,
|
| 1036 |
+
823,
|
| 1037 |
+
612
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 10
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "text",
|
| 1043 |
+
"text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. Communications of the ACM, 2017. ",
|
| 1044 |
+
"bbox": [
|
| 1045 |
+
173,
|
| 1046 |
+
621,
|
| 1047 |
+
823,
|
| 1048 |
+
651
|
| 1049 |
+
],
|
| 1050 |
+
"page_idx": 10
|
| 1051 |
+
},
|
| 1052 |
+
{
|
| 1053 |
+
"type": "text",
|
| 1054 |
+
"text": "Lenstra. Lattices. In Algorithmic number theory, volume 44 of MSRI publications. 2008. ",
|
| 1055 |
+
"bbox": [
|
| 1056 |
+
169,
|
| 1057 |
+
660,
|
| 1058 |
+
758,
|
| 1059 |
+
676
|
| 1060 |
+
],
|
| 1061 |
+
"page_idx": 10
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
"type": "text",
|
| 1065 |
+
"text": "Yuhang Li, Ruihao Gong, Xu Tan, Yang Yang, Peng Hu, Qi Zhang, Fengwei Yu, Wei Wang, and Shi Gu. BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction. ICLR, 2021. ",
|
| 1066 |
+
"bbox": [
|
| 1067 |
+
174,
|
| 1068 |
+
685,
|
| 1069 |
+
826,
|
| 1070 |
+
728
|
| 1071 |
+
],
|
| 1072 |
+
"page_idx": 10
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"type": "text",
|
| 1076 |
+
"text": "Xingchao Liu, Mao Ye, Dengyong Zhou, and Qiang Liu. Post-training Quantization with Multiple Points: Mixed Precision without Mixed Precision. AAAI, 2021. ",
|
| 1077 |
+
"bbox": [
|
| 1078 |
+
173,
|
| 1079 |
+
738,
|
| 1080 |
+
823,
|
| 1081 |
+
768
|
| 1082 |
+
],
|
| 1083 |
+
"page_idx": 10
|
| 1084 |
+
},
|
| 1085 |
+
{
|
| 1086 |
+
"type": "text",
|
| 1087 |
+
"text": "Jeffrey L. McKinstry, Steven K. Esser, Rathinakumar Appuswamy, Deepika Bablani, John V. Arthur, Izzet B. Yildiz, and Dharmendra S. Modha. Discovering Low-Precision Networks Close to FullPrecision Networks for Efficient Embedded Inference. arXiv:1809.04191, 2019. ",
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
176,
|
| 1090 |
+
777,
|
| 1091 |
+
823,
|
| 1092 |
+
820
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 10
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"text": "Daniele Micciancio. On the Hardness of the Shortest Vector Problem. 1998. ",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
174,
|
| 1101 |
+
830,
|
| 1102 |
+
676,
|
| 1103 |
+
847
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 10
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-Free Quantization Through Weight Equalization and Bias Correction. ICCV, 2019. ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
171,
|
| 1112 |
+
856,
|
| 1113 |
+
823,
|
| 1114 |
+
886
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 10
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Markus Nagel, Rana Ali Amjad, Mart Van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? Adaptive rounding for post-training quantization. PMLR, 2020. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
174,
|
| 1123 |
+
895,
|
| 1124 |
+
821,
|
| 1125 |
+
924
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 10
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An Imperative Style, High-Performance Deep Learning Library. NeurIPS, 2019. ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
174,
|
| 1134 |
+
103,
|
| 1135 |
+
825,
|
| 1136 |
+
172
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 11
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "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. arXiv:1409.0575, 2015. ",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
176,
|
| 1145 |
+
183,
|
| 1146 |
+
820,
|
| 1147 |
+
226
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 11
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. MobileNetV2: Inverted Residuals and Linear Bottlenecks. IEEE, 2018. ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
173,
|
| 1156 |
+
234,
|
| 1157 |
+
820,
|
| 1158 |
+
262
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 11
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv:1409.1556, 2015. ",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
173,
|
| 1167 |
+
271,
|
| 1168 |
+
823,
|
| 1169 |
+
300
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 11
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "Pierre Stock, Armand Joulin, Remi Gribonval, Benjamin Graham, and Herve Jegou. And the bit goes down: Revisiting the quantization of neural networks. ICLR, 2020. ",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
173,
|
| 1178 |
+
309,
|
| 1179 |
+
823,
|
| 1180 |
+
338
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 11
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "Peisong Wang, Qiang Chen, Xiangyu He, and Jian Cheng. Towards Accurate Post-training Network Quantization via Bit-Split and Stitching. ICML, 2020. ",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
173,
|
| 1189 |
+
347,
|
| 1190 |
+
823,
|
| 1191 |
+
376
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 11
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "Ritchie Zhao, Yuwei Hu, Jordan Dotzel, Christopher De Sa, and Zhiru Zhang. Improving Neural Network Quantization without Retraining using Outlier Channel Splitting. PMLR, 2019. ",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
173,
|
| 1200 |
+
385,
|
| 1201 |
+
825,
|
| 1202 |
+
414
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 11
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"type": "text",
|
| 1208 |
+
"text": "APPENDIX A ",
|
| 1209 |
+
"text_level": 1,
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
176,
|
| 1212 |
+
102,
|
| 1213 |
+
282,
|
| 1214 |
+
118
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 12
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "Lattices ",
|
| 1221 |
+
"text_level": 1,
|
| 1222 |
+
"bbox": [
|
| 1223 |
+
173,
|
| 1224 |
+
131,
|
| 1225 |
+
243,
|
| 1226 |
+
148
|
| 1227 |
+
],
|
| 1228 |
+
"page_idx": 12
|
| 1229 |
+
},
|
| 1230 |
+
{
|
| 1231 |
+
"type": "text",
|
| 1232 |
+
"text": "The following part is a very synthetic introduction to the (very rich) theory of lattices. It states only what the reader needs to know to understand how our quantization method works. If the reader wants to know more about lattices, they are welcome to start with Lenstra (2008). ",
|
| 1233 |
+
"bbox": [
|
| 1234 |
+
174,
|
| 1235 |
+
161,
|
| 1236 |
+
825,
|
| 1237 |
+
204
|
| 1238 |
+
],
|
| 1239 |
+
"page_idx": 12
|
| 1240 |
+
},
|
| 1241 |
+
{
|
| 1242 |
+
"type": "text",
|
| 1243 |
+
"text": "Definition 1 ",
|
| 1244 |
+
"text_level": 1,
|
| 1245 |
+
"bbox": [
|
| 1246 |
+
174,
|
| 1247 |
+
223,
|
| 1248 |
+
258,
|
| 1249 |
+
238
|
| 1250 |
+
],
|
| 1251 |
+
"page_idx": 12
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"type": "text",
|
| 1255 |
+
"text": "A lattice $\\Lambda$ of $\\mathbb { R } ^ { n }$ is a discrete additive subgroup of $\\mathbb { R } ^ { n }$ , such that $s p a n ( \\Lambda ) \\ = \\ \\mathbb { R } ^ { n }$ , where $s p a n ( \\Lambda )$ is the set of linear combinations of the vectors of $\\Lambda$ . ",
|
| 1256 |
+
"bbox": [
|
| 1257 |
+
173,
|
| 1258 |
+
251,
|
| 1259 |
+
823,
|
| 1260 |
+
280
|
| 1261 |
+
],
|
| 1262 |
+
"page_idx": 12
|
| 1263 |
+
},
|
| 1264 |
+
{
|
| 1265 |
+
"type": "text",
|
| 1266 |
+
"text": "Example ",
|
| 1267 |
+
"text_level": 1,
|
| 1268 |
+
"bbox": [
|
| 1269 |
+
174,
|
| 1270 |
+
292,
|
| 1271 |
+
238,
|
| 1272 |
+
308
|
| 1273 |
+
],
|
| 1274 |
+
"page_idx": 12
|
| 1275 |
+
},
|
| 1276 |
+
{
|
| 1277 |
+
"type": "text",
|
| 1278 |
+
"text": "$\\mathbb { Z } ^ { n }$ is a lattice. It is called the cubic lattice. ",
|
| 1279 |
+
"bbox": [
|
| 1280 |
+
176,
|
| 1281 |
+
320,
|
| 1282 |
+
452,
|
| 1283 |
+
335
|
| 1284 |
+
],
|
| 1285 |
+
"page_idx": 12
|
| 1286 |
+
},
|
| 1287 |
+
{
|
| 1288 |
+
"type": "text",
|
| 1289 |
+
"text": "Property 1 ",
|
| 1290 |
+
"text_level": 1,
|
| 1291 |
+
"bbox": [
|
| 1292 |
+
174,
|
| 1293 |
+
348,
|
| 1294 |
+
250,
|
| 1295 |
+
363
|
| 1296 |
+
],
|
| 1297 |
+
"page_idx": 12
|
| 1298 |
+
},
|
| 1299 |
+
{
|
| 1300 |
+
"type": "text",
|
| 1301 |
+
"text": "Let $\\Lambda$ be a lattice of $\\mathbb { R } ^ { n }$ , there is a sequence $\\boldsymbol { B }$ of cardinality $n$ of lattice vectors such that any vector that belongs to $\\Lambda$ can be uniquely expressed as an integer linear combination of the elements of $\\boldsymbol { B }$ . Such a sequence is called basis of $\\Lambda$ . ",
|
| 1302 |
+
"bbox": [
|
| 1303 |
+
174,
|
| 1304 |
+
376,
|
| 1305 |
+
825,
|
| 1306 |
+
417
|
| 1307 |
+
],
|
| 1308 |
+
"page_idx": 12
|
| 1309 |
+
},
|
| 1310 |
+
{
|
| 1311 |
+
"type": "text",
|
| 1312 |
+
"text": "Examples ",
|
| 1313 |
+
"text_level": 1,
|
| 1314 |
+
"bbox": [
|
| 1315 |
+
174,
|
| 1316 |
+
431,
|
| 1317 |
+
245,
|
| 1318 |
+
446
|
| 1319 |
+
],
|
| 1320 |
+
"page_idx": 12
|
| 1321 |
+
},
|
| 1322 |
+
{
|
| 1323 |
+
"type": "equation",
|
| 1324 |
+
"img_path": "images/2a64e8813dd774fd042662eb9747bf70327002f48c94ddcc3a90f6a21d88e995.jpg",
|
| 1325 |
+
"text": "$$\n\\begin{array} { r l } & { \\bullet \\ ( ( 1 , 0 ) , ( 0 , 1 ) ) \\mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \\mathbb { Z } ^ 2 ~ } } \\\\ & { \\bullet \\ ( ( 1 , 0 ) , ( 1 , 1 ) ) \\mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \\mathbb { Z } ^ 2 ~ } } \\\\ & { \\bullet \\ ( \\delta _ { i , i } ) _ { 1 \\leq i \\leq n } \\mathrm { ~ i s ~ a ~ b a s i s ~ o f ~ \\mathbb { Z } ^ n ~ } } \\end{array}\n$$",
|
| 1326 |
+
"text_format": "latex",
|
| 1327 |
+
"bbox": [
|
| 1328 |
+
214,
|
| 1329 |
+
455,
|
| 1330 |
+
431,
|
| 1331 |
+
513
|
| 1332 |
+
],
|
| 1333 |
+
"page_idx": 12
|
| 1334 |
+
},
|
| 1335 |
+
{
|
| 1336 |
+
"type": "text",
|
| 1337 |
+
"text": "Observation ",
|
| 1338 |
+
"text_level": 1,
|
| 1339 |
+
"bbox": [
|
| 1340 |
+
174,
|
| 1341 |
+
522,
|
| 1342 |
+
263,
|
| 1343 |
+
536
|
| 1344 |
+
],
|
| 1345 |
+
"page_idx": 12
|
| 1346 |
+
},
|
| 1347 |
+
{
|
| 1348 |
+
"type": "text",
|
| 1349 |
+
"text": "The knowledge of a basis of a lattice $\\Lambda$ is sufficient to know every point of the lattice. Given that we want to use this type of structure to quantize a weight distribution, this observation allows us to avoid keeping the whole lattice stored as a codebook in memory. ",
|
| 1350 |
+
"bbox": [
|
| 1351 |
+
174,
|
| 1352 |
+
550,
|
| 1353 |
+
825,
|
| 1354 |
+
592
|
| 1355 |
+
],
|
| 1356 |
+
"page_idx": 12
|
| 1357 |
+
},
|
| 1358 |
+
{
|
| 1359 |
+
"type": "text",
|
| 1360 |
+
"text": "Important observation ",
|
| 1361 |
+
"text_level": 1,
|
| 1362 |
+
"bbox": [
|
| 1363 |
+
174,
|
| 1364 |
+
599,
|
| 1365 |
+
333,
|
| 1366 |
+
613
|
| 1367 |
+
],
|
| 1368 |
+
"page_idx": 12
|
| 1369 |
+
},
|
| 1370 |
+
{
|
| 1371 |
+
"type": "text",
|
| 1372 |
+
"text": "We shall emphasize that the uniform scalar quantization scheme widely used for neural networks quantization is nothing else but a cubic lattice quantization scheme. Therefore, lattice quantization is nothing else but a generalization of scalar techniques. ",
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
174,
|
| 1375 |
+
627,
|
| 1376 |
+
823,
|
| 1377 |
+
669
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 12
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "APPENDIX B ",
|
| 1384 |
+
"text_level": 1,
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
176,
|
| 1387 |
+
689,
|
| 1388 |
+
282,
|
| 1389 |
+
705
|
| 1390 |
+
],
|
| 1391 |
+
"page_idx": 12
|
| 1392 |
+
},
|
| 1393 |
+
{
|
| 1394 |
+
"type": "text",
|
| 1395 |
+
"text": "Heuristic details ",
|
| 1396 |
+
"text_level": 1,
|
| 1397 |
+
"bbox": [
|
| 1398 |
+
174,
|
| 1399 |
+
718,
|
| 1400 |
+
313,
|
| 1401 |
+
736
|
| 1402 |
+
],
|
| 1403 |
+
"page_idx": 12
|
| 1404 |
+
},
|
| 1405 |
+
{
|
| 1406 |
+
"type": "text",
|
| 1407 |
+
"text": "This paragraph is dedicated to providing the details of our heuristic FindBasis (algorithm 3). Let $\\begin{array} { r } { s c = \\frac { et { } { . } { \\sum } } { 2 ^ { b - 1 } } } \\end{array}$ where $b$ is the bitwidth of the channel, or layer, to be quantized. Basis $\\boldsymbol { B }$ is ini${ \\frac { s c } { 1 0 ^ { 4 } } } \\ * \\ I _ { n }$ $T$ ists in a sequence of 800 steps at each of these deviation values :. We apply this algorithm with 5 restarts and keep the best basis at $[ \\frac { s c } { 1 0 ^ { 4 } } , s c , \\frac { s c } { 2 } , \\frac { s c } { 3 } , \\frac { s c } { 5 } , \\frac { s c } { 7 } , \\frac { s c } { 9 } , \\frac { s c } { 1 5 } , \\frac { s c } { 3 0 } ]$ \neach restart. Note that it is possible to reduce the number of steps and hence shrink computation time. ",
|
| 1408 |
+
"bbox": [
|
| 1409 |
+
174,
|
| 1410 |
+
742,
|
| 1411 |
+
825,
|
| 1412 |
+
825
|
| 1413 |
+
],
|
| 1414 |
+
"page_idx": 12
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"type": "text",
|
| 1418 |
+
"text": "APPENDIX C ",
|
| 1419 |
+
"text_level": 1,
|
| 1420 |
+
"bbox": [
|
| 1421 |
+
176,
|
| 1422 |
+
102,
|
| 1423 |
+
284,
|
| 1424 |
+
118
|
| 1425 |
+
],
|
| 1426 |
+
"page_idx": 13
|
| 1427 |
+
},
|
| 1428 |
+
{
|
| 1429 |
+
"type": "text",
|
| 1430 |
+
"text": "Quantile tables ",
|
| 1431 |
+
"text_level": 1,
|
| 1432 |
+
"bbox": [
|
| 1433 |
+
174,
|
| 1434 |
+
131,
|
| 1435 |
+
303,
|
| 1436 |
+
148
|
| 1437 |
+
],
|
| 1438 |
+
"page_idx": 13
|
| 1439 |
+
},
|
| 1440 |
+
{
|
| 1441 |
+
"type": "table",
|
| 1442 |
+
"img_path": "images/0f0b36a816a38940ec14c776fa3db04fa9b3380eb18f34887b104e63acd4eea1.jpg",
|
| 1443 |
+
"table_caption": [
|
| 1444 |
+
"Table 8: Quantiles chosen for Resnet and Densenet activation quantization. "
|
| 1445 |
+
],
|
| 1446 |
+
"table_footnote": [],
|
| 1447 |
+
"table_body": "<table><tr><td>Bitwidth</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>Quantile</td><td>0.97</td><td>0.992</td><td>0.9991</td><td>0.9997</td><td>0.9998</td><td>0.99995</td><td>0.99999</td><td>1</td></tr></table>",
|
| 1448 |
+
"bbox": [
|
| 1449 |
+
223,
|
| 1450 |
+
194,
|
| 1451 |
+
774,
|
| 1452 |
+
238
|
| 1453 |
+
],
|
| 1454 |
+
"page_idx": 13
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"type": "table",
|
| 1458 |
+
"img_path": "images/34438792c9f9b6da3cca96e9d40d273d032d4fcbd0095df29ff1dde5ffecc1a3.jpg",
|
| 1459 |
+
"table_caption": [
|
| 1460 |
+
"Table 9: Quantiles chosen for VGG activation quantization. "
|
| 1461 |
+
],
|
| 1462 |
+
"table_footnote": [],
|
| 1463 |
+
"table_body": "<table><tr><td>Bitwidth</td><td>3</td><td>4</td><td>8</td></tr><tr><td>Quantile</td><td>0.9999</td><td>0.9999</td><td>1</td></tr></table>",
|
| 1464 |
+
"bbox": [
|
| 1465 |
+
380,
|
| 1466 |
+
304,
|
| 1467 |
+
617,
|
| 1468 |
+
348
|
| 1469 |
+
],
|
| 1470 |
+
"page_idx": 13
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"type": "table",
|
| 1474 |
+
"img_path": "images/db7a42cc54b8f7f41f0d48edcdff9dc824d8d64ff6f472a38affb03f1f92cf43.jpg",
|
| 1475 |
+
"table_caption": [
|
| 1476 |
+
"Table 10: Quantiles chosen for Mobilenet activation quantization. "
|
| 1477 |
+
],
|
| 1478 |
+
"table_footnote": [],
|
| 1479 |
+
"table_body": "<table><tr><td>Bitwidth</td><td>3</td><td>4</td><td>8</td></tr><tr><td>Quantile</td><td>0.986</td><td>0.998</td><td>1</td></tr></table>",
|
| 1480 |
+
"bbox": [
|
| 1481 |
+
387,
|
| 1482 |
+
415,
|
| 1483 |
+
609,
|
| 1484 |
+
459
|
| 1485 |
+
],
|
| 1486 |
+
"page_idx": 13
|
| 1487 |
+
},
|
| 1488 |
+
{
|
| 1489 |
+
"type": "text",
|
| 1490 |
+
"text": "APPENDIX D ",
|
| 1491 |
+
"text_level": 1,
|
| 1492 |
+
"bbox": [
|
| 1493 |
+
176,
|
| 1494 |
+
492,
|
| 1495 |
+
284,
|
| 1496 |
+
508
|
| 1497 |
+
],
|
| 1498 |
+
"page_idx": 13
|
| 1499 |
+
},
|
| 1500 |
+
{
|
| 1501 |
+
"type": "text",
|
| 1502 |
+
"text": "Intuition on vector quantization ",
|
| 1503 |
+
"text_level": 1,
|
| 1504 |
+
"bbox": [
|
| 1505 |
+
173,
|
| 1506 |
+
522,
|
| 1507 |
+
442,
|
| 1508 |
+
539
|
| 1509 |
+
],
|
| 1510 |
+
"page_idx": 13
|
| 1511 |
+
},
|
| 1512 |
+
{
|
| 1513 |
+
"type": "text",
|
| 1514 |
+
"text": "We know for a fact that correlated distributions share mutual information, in the sense of Shannon information theory. Shannon’s mutual information between continuous random variables $X$ and $Y$ is calculated as a double integral : ",
|
| 1515 |
+
"bbox": [
|
| 1516 |
+
174,
|
| 1517 |
+
545,
|
| 1518 |
+
825,
|
| 1519 |
+
588
|
| 1520 |
+
],
|
| 1521 |
+
"page_idx": 13
|
| 1522 |
+
},
|
| 1523 |
+
{
|
| 1524 |
+
"type": "equation",
|
| 1525 |
+
"img_path": "images/442c154fedb6253d4151ebef770a2f8ed50182752f9dff21c9fc857731950d9e.jpg",
|
| 1526 |
+
"text": "$$\nI ( X ; Y ) = \\int _ { \\mathcal { V } } \\int _ { \\mathcal { X } } p ( X = x , Y = y ) l o g _ { 2 } ( \\frac { p ( X = x , Y = y ) } { p ( X = x ) p ( Y = y ) } ) d x d y\n$$",
|
| 1527 |
+
"text_format": "latex",
|
| 1528 |
+
"bbox": [
|
| 1529 |
+
266,
|
| 1530 |
+
593,
|
| 1531 |
+
733,
|
| 1532 |
+
628
|
| 1533 |
+
],
|
| 1534 |
+
"page_idx": 13
|
| 1535 |
+
},
|
| 1536 |
+
{
|
| 1537 |
+
"type": "text",
|
| 1538 |
+
"text": "If $X$ and $Y$ are independant, $I ( X ; Y ) = 0$ , they share no mutual information. When $X = Y$ , $I ( X ; Y ) = H ( X ) = { \\overset { \\cdot } { H } } ( Y )$ . Now, we model the pairs of correlated weights of the layer we want to quantize with $( w _ { 1 } , w _ { 2 } )$ which follows a bivariate normal distribution with location $\\mu = ( 0 , 0 )$ and covariance matrix : ",
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
173,
|
| 1541 |
+
642,
|
| 1542 |
+
825,
|
| 1543 |
+
699
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 13
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "equation",
|
| 1549 |
+
"img_path": "images/39809a64fa6f093d05b10ae16f59556bf948fcff7b7819543ae4b65116e0d649.jpg",
|
| 1550 |
+
"text": "$$\n\\Sigma = \\left( \\begin{array} { c c } { { \\sigma _ { 1 } ^ { 2 } } } & { { \\rho \\sigma _ { 1 } \\sigma _ { 2 } } } \\\\ { { \\rho \\sigma _ { 1 } \\sigma _ { 2 } } } & { { \\sigma _ { 2 } ^ { 2 } } } \\end{array} \\right)\n$$",
|
| 1551 |
+
"text_format": "latex",
|
| 1552 |
+
"bbox": [
|
| 1553 |
+
418,
|
| 1554 |
+
715,
|
| 1555 |
+
580,
|
| 1556 |
+
751
|
| 1557 |
+
],
|
| 1558 |
+
"page_idx": 13
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"type": "text",
|
| 1562 |
+
"text": "where $\\sigma _ { 1 } , \\sigma _ { 2 }$ are the standard deviations of $w _ { 1 }$ and $w _ { 2 }$ and $\\rho$ their correlation coefficient. This yields: ",
|
| 1563 |
+
"bbox": [
|
| 1564 |
+
173,
|
| 1565 |
+
758,
|
| 1566 |
+
826,
|
| 1567 |
+
786
|
| 1568 |
+
],
|
| 1569 |
+
"page_idx": 13
|
| 1570 |
+
},
|
| 1571 |
+
{
|
| 1572 |
+
"type": "equation",
|
| 1573 |
+
"img_path": "images/38a752227369c52affa1b906d1bea76beec6fa6ee23a75d31d5713ed44d02ad0.jpg",
|
| 1574 |
+
"text": "$$\nI ( w _ { 1 } ; w _ { 2 } ) = - \\frac { 1 } { 2 } l o g _ { 2 } ( 1 - \\rho ^ { 2 } )\n$$",
|
| 1575 |
+
"text_format": "latex",
|
| 1576 |
+
"bbox": [
|
| 1577 |
+
398,
|
| 1578 |
+
785,
|
| 1579 |
+
599,
|
| 1580 |
+
815
|
| 1581 |
+
],
|
| 1582 |
+
"page_idx": 13
|
| 1583 |
+
},
|
| 1584 |
+
{
|
| 1585 |
+
"type": "text",
|
| 1586 |
+
"text": "Therefore, the more $w _ { 1 }$ and $w _ { 2 }$ are correlated, the more information they share, which means that an independent coding of $w _ { 1 }$ and $w _ { 2 }$ scalars is suboptimal, because of information redundancy. This is the idea behind our approach and behind vector quantization in general. ",
|
| 1587 |
+
"bbox": [
|
| 1588 |
+
173,
|
| 1589 |
+
824,
|
| 1590 |
+
826,
|
| 1591 |
+
867
|
| 1592 |
+
],
|
| 1593 |
+
"page_idx": 13
|
| 1594 |
+
},
|
| 1595 |
+
{
|
| 1596 |
+
"type": "text",
|
| 1597 |
+
"text": "APPENDIX E ",
|
| 1598 |
+
"text_level": 1,
|
| 1599 |
+
"bbox": [
|
| 1600 |
+
176,
|
| 1601 |
+
102,
|
| 1602 |
+
282,
|
| 1603 |
+
118
|
| 1604 |
+
],
|
| 1605 |
+
"page_idx": 14
|
| 1606 |
+
},
|
| 1607 |
+
{
|
| 1608 |
+
"type": "text",
|
| 1609 |
+
"text": "Optimized inference for LatticeQ networks ",
|
| 1610 |
+
"text_level": 1,
|
| 1611 |
+
"bbox": [
|
| 1612 |
+
174,
|
| 1613 |
+
131,
|
| 1614 |
+
537,
|
| 1615 |
+
148
|
| 1616 |
+
],
|
| 1617 |
+
"page_idx": 14
|
| 1618 |
+
},
|
| 1619 |
+
{
|
| 1620 |
+
"type": "text",
|
| 1621 |
+
"text": "In this section, we suppose that we have a $3 \\times 3$ convolution layer $\\Lambda$ quantized using our per-layer method, with in input channels and out output channels. We want to compute a forward pass through this layer. Let $( C _ { i } ^ { i n } ) _ { 1 \\leq i \\leq i n }$ the set of input channels and $( C _ { j } ^ { o u t } ) _ { 1 \\leq j \\leq o u t }$ the set of output channels. We want to compute $C _ { j } ^ { o u t }$ for each $j$ . Let $W ^ { q }$ the tensor of quantized weights. Let the quantization basis $\\begin{array} { r } { \\mathcal { B } = ( \\mathbf { b _ { 1 } } , \\mathbf { b _ { 2 } } , \\mathbf { b _ { 3 } } , \\mathbf { b _ { 4 } } , \\mathbf { b _ { 5 } } , \\mathbf { b _ { 6 } } , \\mathbf { b _ { 7 } } , \\mathbf { b _ { 8 } } , \\mathbf { b _ { 9 } } ) . } \\end{array}$ . Note that in this notation, our basis has dimension 9, which is not the choice we made in the paper. This is not a big deal, since we can choose to fill coordinates with zeros: $\\mathbf { b _ { 1 } } = \\left( b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } , 0 , 0 , 0 , 0 , 0 , 0 \\right)$ , $\\mathbf { b _ { 4 } } = ( 0 , 0 , 0 , b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } , 0 , 0 , 0 )$ , $\\mathbf { b _ { 7 } } = ( 0 , 0 , 0 , 0 , 0 , 0 , b _ { 1 , 1 } , b _ { 1 , 2 } , b _ { 1 , 3 } )$ . In this manner, our 3D bases can be expanded in 9D bases. ",
|
| 1622 |
+
"bbox": [
|
| 1623 |
+
173,
|
| 1624 |
+
155,
|
| 1625 |
+
825,
|
| 1626 |
+
272
|
| 1627 |
+
],
|
| 1628 |
+
"page_idx": 14
|
| 1629 |
+
},
|
| 1630 |
+
{
|
| 1631 |
+
"type": "text",
|
| 1632 |
+
"text": "Usually, in a full precision network, $C _ { j } ^ { o u t }$ is computed as : ",
|
| 1633 |
+
"bbox": [
|
| 1634 |
+
173,
|
| 1635 |
+
276,
|
| 1636 |
+
555,
|
| 1637 |
+
292
|
| 1638 |
+
],
|
| 1639 |
+
"page_idx": 14
|
| 1640 |
+
},
|
| 1641 |
+
{
|
| 1642 |
+
"type": "equation",
|
| 1643 |
+
"img_path": "images/8f0bc5f9da760f6d5fcd1d1b00281040432ede54efb2b843c09ef4d7b8f75756.jpg",
|
| 1644 |
+
"text": "$$\nC _ { j } ^ { o u t } = \\sum _ { i = 1 } ^ { i n } C o n v ( W _ { i , j } ; C _ { i } ^ { i n } )\n$$",
|
| 1645 |
+
"text_format": "latex",
|
| 1646 |
+
"bbox": [
|
| 1647 |
+
398,
|
| 1648 |
+
301,
|
| 1649 |
+
599,
|
| 1650 |
+
344
|
| 1651 |
+
],
|
| 1652 |
+
"page_idx": 14
|
| 1653 |
+
},
|
| 1654 |
+
{
|
| 1655 |
+
"type": "text",
|
| 1656 |
+
"text": "In our case, we change the order of operations : ",
|
| 1657 |
+
"bbox": [
|
| 1658 |
+
173,
|
| 1659 |
+
358,
|
| 1660 |
+
485,
|
| 1661 |
+
372
|
| 1662 |
+
],
|
| 1663 |
+
"page_idx": 14
|
| 1664 |
+
},
|
| 1665 |
+
{
|
| 1666 |
+
"type": "equation",
|
| 1667 |
+
"img_path": "images/1b9b1201065d523aeeee4fb89d788054907cd7c3384d319b696ee1f8e0df980d.jpg",
|
| 1668 |
+
"text": "$$\nC _ { j } ^ { o u t } = \\sum _ { k = 1 } ^ { 9 } \\sum _ { i = 1 } ^ { i n } W _ { i , j , k } ^ { q } C o n v ( \\mathbf { b _ { k } } ; C _ { i } ^ { i n } )\n$$",
|
| 1669 |
+
"text_format": "latex",
|
| 1670 |
+
"bbox": [
|
| 1671 |
+
369,
|
| 1672 |
+
388,
|
| 1673 |
+
627,
|
| 1674 |
+
433
|
| 1675 |
+
],
|
| 1676 |
+
"page_idx": 14
|
| 1677 |
+
},
|
| 1678 |
+
{
|
| 1679 |
+
"type": "text",
|
| 1680 |
+
"text": "Since $C o n v ( \\mathbf { b _ { k } } ; C _ { i } ^ { i n } )$ does not depend on the output channel, we can start by computing $C o n v ( \\mathbf { b _ { 1 } } ; C _ { i } ^ { i n } )$ for each $i$ (in convolutions). $\\mathbf { b _ { 1 } }$ is uniformly quantized using a simple $\\operatorname* { m i n } / \\operatorname* { m a x }$ quantizer, therefore we can use low-bit operators to compute these convolutions. Then, we only need to multiply the result by $W _ { i , j , 1 } ^ { q }$ (which is an integer) for each $j$ , and store the result in the corresponding output channel. Then, we reiterate the process with $\\mathbf { b _ { 2 } } , \\mathbf { b _ { 3 } }$ , etc. ",
|
| 1681 |
+
"bbox": [
|
| 1682 |
+
174,
|
| 1683 |
+
443,
|
| 1684 |
+
825,
|
| 1685 |
+
515
|
| 1686 |
+
],
|
| 1687 |
+
"page_idx": 14
|
| 1688 |
+
},
|
| 1689 |
+
{
|
| 1690 |
+
"type": "text",
|
| 1691 |
+
"text": "With this method, the complexity of the forward pass through $\\Lambda$ is $9 \\times i n$ low-bit convolutions and $9 \\times i n \\times o u t$ scalar multiplications and additions. ",
|
| 1692 |
+
"bbox": [
|
| 1693 |
+
173,
|
| 1694 |
+
521,
|
| 1695 |
+
825,
|
| 1696 |
+
550
|
| 1697 |
+
],
|
| 1698 |
+
"page_idx": 14
|
| 1699 |
+
},
|
| 1700 |
+
{
|
| 1701 |
+
"type": "text",
|
| 1702 |
+
"text": "APPENDIX F ",
|
| 1703 |
+
"text_level": 1,
|
| 1704 |
+
"bbox": [
|
| 1705 |
+
176,
|
| 1706 |
+
570,
|
| 1707 |
+
281,
|
| 1708 |
+
587
|
| 1709 |
+
],
|
| 1710 |
+
"page_idx": 14
|
| 1711 |
+
},
|
| 1712 |
+
{
|
| 1713 |
+
"type": "text",
|
| 1714 |
+
"text": "Weight-only quantization ",
|
| 1715 |
+
"text_level": 1,
|
| 1716 |
+
"bbox": [
|
| 1717 |
+
176,
|
| 1718 |
+
599,
|
| 1719 |
+
388,
|
| 1720 |
+
617
|
| 1721 |
+
],
|
| 1722 |
+
"page_idx": 14
|
| 1723 |
+
},
|
| 1724 |
+
{
|
| 1725 |
+
"type": "table",
|
| 1726 |
+
"img_path": "images/227a1d7360f95bbc90e48065b6852f3532422b3570da561b8aab85c9b93ee8c5.jpg",
|
| 1727 |
+
"table_caption": [
|
| 1728 |
+
"Table 11: LatticeQ per-channel weight-only quantization with bias correction. "
|
| 1729 |
+
],
|
| 1730 |
+
"table_footnote": [],
|
| 1731 |
+
"table_body": "<table><tr><td colspan=\"4\">Top-1 accuracy</td></tr><tr><td>Network</td><td>FP32</td><td>W4</td><td>W3</td><td>W2</td></tr><tr><td>Resnet-18</td><td>69.6</td><td>69.0</td><td>66.7</td><td>41.7</td></tr><tr><td>Resnet-50</td><td>76.0</td><td>75.5</td><td>73.6</td><td>44.3</td></tr><tr><td>Densenet</td><td>74.4</td><td>73.2</td><td>68.9</td><td>6.4</td></tr><tr><td>Mobilenet-v2</td><td>71.9</td><td>66.7</td><td>48.9</td><td>0.3</td></tr></table>",
|
| 1732 |
+
"bbox": [
|
| 1733 |
+
344,
|
| 1734 |
+
662,
|
| 1735 |
+
653,
|
| 1736 |
+
765
|
| 1737 |
+
],
|
| 1738 |
+
"page_idx": 14
|
| 1739 |
+
}
|
| 1740 |
+
]
|
parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/ZWjEkv9rjo/ZWjEkv9rjo_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/hFCUPkSSRE/hFCUPkSSRE_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/nL2lDlsrZU/nL2lDlsrZU.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/nL2lDlsrZU/nL2lDlsrZU_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/nL2lDlsrZU/nL2lDlsrZU_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/nL2lDlsrZU/nL2lDlsrZU_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/zSeoDvsDCe/zSeoDvsDCe_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|