{'fraction_non_alphanumeric': 0.03168697883258499, 'fraction_numerical': 0.007594611930724824, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
BiTAT: Neural Network Binarization with Task-dependent Aggregated Transformation

Neural network quantization aims to transform high-precision weights and activations of a given neural network into low-precision weights/activations for reduced memory usage and computation, while preserving the performance of the original model. However, extreme quantization (1-bit weight/1-bit activations) of compactly-designed backbone architectures (e.g., MobileNets) often used for edge-device deployments results in severe performance degeneration. This paper proposes a novel Quantization-Aware Training (QAT) method that can effectively alleviate performance degeneration even with extreme quantization by focusing on the inter-weight dependencies, between the weights within each layer and across consecutive layers. To minimize the quantization impact of each weight on others, we perform an orthonormal transformation of the weights at each layer by training an input-dependent correlation matrix and importance vector, such that each weight is disentangled from the others. Then, we quantize the weights based on their importance to minimize the loss of the information from the original weights/activations. We further perform progressive layer-wise quantization from the bottom layer to the top, so that quantization at each layer reflects the quantized distributions of weights and activations at previous layers. We validate the effectiveness of our method on various benchmark datasets against strong neural quantization baselines, demonstrating that it alleviates the performance degeneration on ImageNet and successfully preserves the full-precision model performance on CIFAR-100 with compact backbone networks.


Introduction
Over the past decade, deep neural networks have achieved tremendous success in solving various real-world problems, such as image/text generation [6,15], unsupervised representation learning [11,4,38], and multi-modal training [32,37,28]. Recently, network architectures that aim to solve target tasks are becoming increasingly larger, based on the empirical observations of their improved performance. However, as the models become larger, it is increasingly difficult to deploy them on resource-limited edge devices with limited memory and computational power. Therefore, many recent works focus on building resource-efficient deep neural networks to bridge the gap between the scale of deep neural networks and actual permissible computational complexity/memory-bounds for on-device model deployments. Some of these works consider designing computation-and memoryefficient modules for neural architectures, while others focus on compressing a given neural network by either pruning its weights [7,12,19,36] or reducing the bits used to represent the weights and activations [3,8,18]. The last approach, neural network quantization, is beneficial for building ondevice AI systems since the edge devices oftentimes only support low bitwidth-precision parameters and/or operations. However, it inevitably suffers from the non-negligible forgetting of the encoded Quantized Training for ( ) Figure 1: Left: An Illustration of our proposed method. Weight elements in a layer is highly correlated to each other along with the weights in other layers. Our BiTAT sequentially obtains quantized weights of each layer based on the importance of disentangled weights to others using a trainable orthonormal rotation matrix and importance vector. Right: Categorization of relevant and strong quantization methods to ours.
information from the full-precision models. Such loss of information becomes worse with extreme quantization into binary neural networks with 1-bit weights and 1-bit activations [3,39,29,27].
How can we then effectively preserve the original model performance even with extremely lowprecision deep neural networks? To address this question, we focus on the somewhat overlooked properties of neural networks for quantization: the weights in a layer are highly correlated with each other and weights in the consecutive layers. Quantizing the weights will inevitably affect the weights within the same layer, since they together comprise a transformation represented by the layer. Thus, quantizing the weights and activations at a specific layer will adjust the correlation and relative importance between them. Moreover, it will also largely impact the next layer that directly uses the output of the layer, which together comprise a function represented by the neural network.
Despite their impact on neural network quantization, such inter-weight dependencies have been relatively overlooked. As shown in Figure 1 Right, although BRECQ [18] addresses the problem by considering the dependency between filters in each block, it is limited to the Post-Training Quantization (PTQ) problem, which suffers from inevitable information loss, resulting in inferior performance. The most recent Quantization-Aware Training (QAT) methods [8,21] are concerned with obtaining quantized weights by minimizing quantization losses with parameterized activation functions, disregarding cross-layer weight dependencies during training process. To the best of our knowledge, no prior work explicitly considers dependencies among the weights for QAT.
To tackle this challenging problem, we propose a new QAT method, referred to as Neural Network Binarization with Task-dependent Aggregated Transformation (BiTAT), as illustrated in Figure 1 Left. Our method sequentially quantizes the weights at each layer of a pre-trained neural network based on chunk-wise input-dependent weight importance by training orthonormal dependency matrices and scaling vectors. While quantizing each layer, we fine-tune the subsequent full-precision layers, which utilize the quantized layer as an input for a few epochs while keeping the quantized weights frozen. we aggregate redundant input dimensions for transformation matrices and scaling vectors, significantly reducing the computational cost of the quantization process. Such consideration of inter-weight dependencies allows our BiTAT algorithm to better preserve the information from a given high-precision network, allowing it to achieve comparable performance to the original full-precision network even with extreme quantization, such as binarization of both weights and activations. The main contributions of the paper can be summarized as follows: • We demonstrate that weight dependencies within each layer and across layers play an essential role in preserving the model performance during quantized training. • We propose an input-dependent quantization-aware training method that binarizes neural networks. We disentangle the correlation in the weights from across multiple layers by training rotation matrices and importance vectors, which guides the quantization process to consider the disentangled weights' importance. • We empirically validate our method on several benchmark datasets against state-of-the-art neural network quantization methods, showing that it significantly outperforms baselines with the compact neural network architecture.

Related Work
Minimizing the quantization error. Quantization methods for deep neural networks can be broadly categorized into several strategies [26]. We first introduce the methods by minimizing the quantization error. Many existing neural quantization methods aim to minimize the weight/activation discrepancy between quantized models and their high-precision counterparts. XNOR-Net [30] aims to minimize the least-squares error between quantized and full-precision weights for each output channel in layers. DBQ [8] and QIL [14] perform layerwise quantization with parametric scale or transformation functions optimized to the task. Yet, they quantize full-precision weight elements regardless of the correlation between other weights. While TSQ [33] and Real-to-Bin [22] propose to minimize the 2 distance between the quantized activations and the real-valued network's activations by leveraging intra-layer weight dependency, they do not consider cross-layer dependencies. Recently, BRECQ [18] and the work in a similar vein on post-training quantization [24] consider the interdependencies between the weights and the activations by using a Taylor series-based approach. However, calculating the Hessian matrix for a large neural network is often intractable, and thus they resort to strong assumptions such as small block-diagonality of the Hessian matrix to make them feasible. BiTAT solves this problem by training the dependency matrices alongside the quantized weights while grouping similar weights together to reduce the computational cost.
Modifying the task loss function. A line of methods aims to achieve better generalization performance during quantization by taking sophisticatedly-designed loss functions. BNN-DL [10] adds a distributional loss term that enforces the distribution of the weights to be quantization-friendly. Apprentice [23] uses knowledge distillation (KD) to preserve the knowledge of the full-precision teacher network in the quantized network. However, such methods only put a constraint on the distributional properties of the weights, not the dependencies and the values of the weight elements. CI-BCNN [34] parameterizes bitcount operations by exploring the interaction between output channels using reinforcement learning and quantizes the floating-point accumulation in convolution operations based on them. However, reinforcement learning is expensive, and it still does not consider cross-layer dependencies.
Reducing the gradient error. Bi-Real Net [20] devises a better gradient estimator for the sign function used to binarize the activations and a magnitude-aware gradient correction method. It further modifies the MobileNetV1's architecture to better fit the quantized operations. ReActNet [21] achieves state-of-the-art performance for binary neural networks by training a generalized activation function for compact network architecture used in [20]. However, the quantizer functions in these methods conduct element-wise unstructured compression without considering the change in other correlated weights during quantization training. This makes the search process converge to the suboptimal solutions since task loss is the only guide for finding the optimal quantized weights, which is often insufficient for high-dimensional and complex architectures. However, our proposed method can obtain a better-informed guide that compels the training procedure to spend more time searching in areas that are more likely to contain high-performing quantized weights.

Weight Importance for Quantization-aware Training
We first introduce the problem of Quantization-Aware Training (QAT) in Section 3.1 and show that the dependency among the neural network weights plays a crucial role in preserving the performance of a quantized model obtained with QAT in Section 3.2. We further show that the dependency between consecutive layers critically affects the performance of the quantized model in Section 3.3.

Problem Statement
We aim to quantize a full-precision neural network into a binary neural network (BNN), where the obtained quantized network is composed of binarized 1-bit weights and activations, which preserves the performance of the original full-precision model. Let f (·; W) be a L-layered neural network parameterized by a set of pre-trained weights W = {w (1) , . . . , w (L) }, where w (l) ∈ R d l−1 ×d l is the weight at layer l and d 0 is the dimensionality of the input. Given a training dataset X and corresponding labels Y, existing QAT methods [30,8,14,2,35,25] search for optimal quantized weights by solving for the optimization problem that can be generally described as follows: where L task is a standard task loss function, such as cross-entropy loss, and Q(·; φ) is the weight quantization function parameterized by φ which transforms a real-valued vector to a discrete, binary vector. The quantization function used in existing works typically minimize loss terms based on the Mean Squared Error (MSE) between the full-precision weights and the quantized weights at each layer:  where m is the dimensionality of the target weight. For inference, QAT methods use w q = Q(w) as the final quantized parameters. They iteratively search for the quantized weights based on the task loss with a stochastic gradient descent optimizer, where the model parameters converge into the ball-like region around the full-precision weights w.
However, the region around the optimal full-precision weights may contain suboptimal solutions with high errors. We demonstrate such inefficiency of the existing quantizer formulation through a simple experiment in Figure 2. Suppose we have three input points, x 1 , x 2 , and x 3 , and full-precision weights w. Quantized training of the weight using Equation 2 successfully reduces MSE between the quantized weight and the full-precision, but the task prediction loss using w q is nonetheless very high.
We hypothesize that the main source of error comes from the independent application of the quantization process to each weight element. However, neural network weights are not independent, but highly correlated and thus quantizing a set of weights will largely affect the others. Moreover, after quantization, the relative importance among weights could also largely change. Both factors lead to high quantization errors in the pre-activations. On the other hand, our proposed QAT method BiTAT, described in Section 4, achieves a quantized model with much smaller MSE. This results from the consideration of the inter-weights dependencies, which we describe in the next subsection.  How can we then find the low-precision subspace, which contains the best-performing quantized weights on the task, by exploiting the inter-weight dependencies? The properties in the input distribution give us some insights into this question. Let us consider a task composed of centered N training samples {x 1 , . . . , x N } = X ∈ R N ×d0 . We can obtain principal components of the training samples v 1 , . . . , v d0 ∈ R d0 and the corresponding coefficients λ 1 , . . . , λ d0 ≥ 0, in a descending order. Let us further suppose that we optimize a single-layered neural network parameterized by w (1) . Neurons corresponding to the columns of w (1) are oriented in a similar direction to the principal components with higher variances (i.e., v i than v j , where i < j) that is much more likely to get activated than the others. We apply a change of basis to the column space of the weight matrix w (1) with the bases (v 1 , . . . , v d0 ):

Disentangling Weight Dependencies via Input-dependent Orthornormal Transformation
is an orthonormal matrix. The top rows of the transformed weight matrix w (1) will contain more important weights, whereas the bottom rows will contain less important ones. Therefore, the accuracy of the model will be more affected by the perturbations of the weights at top rows than ones at the bottom rows. Note that this transformation can also be applied to the convolutional layer by "unfolding" the input image or feature map into a set of patches, which enables us to convert the convolutional weights into a matrix (The detailed descriptions of the orthonormal transformations for convolutional layers is provided in the supplementary file).
We can also easily generalize the method to multi-layer neural networks, by taking the inputs for the l-th layer as the "training set", assuming that all of the previous layer's weights are fixed, as follows: where σ(·) is the nonlinear transformation defined by both the non-linear activations and any layers other than linear transformation with the weights, such as a average-pooling or Batch Normalization. Then, we straightforwardly obtain the change-of-basis matrix V (l) and s (l) for layer l. The impact of transformed weights is shown in Figure 3. We compute the principal components of each layer in the initial pre-trained model and measure the test accuracy when adding the noise to the top-5 highest-variance (dashed red) or lowest-variance components (dashed blue) per layer. While a model with perturbed high-variance components degenerates the performance as the noise scale increases, a model with perturbed low-variance components consistently obtains high performance even with large perturbations. This shows that preserving the important weight components that correspond to high-variance input components is critically important for effective neural network quantization that can preserve the loss of the original model.

Cross-layer Weight Correlation Impacts Model Performance
So far, we only described the dependency among the weights within a single layer. However, dependencies between the weights across different layers also significantly impact the performance.
To validate that, we perform layerwise sequential training from the bottom layer to the top. At the training of each layer, the model computes the principal components of the target layer and adds noise to its top-5 high/low components. As shown in Figure 3, progressive training with the low-variance components (solid blue) achieves significantly improved accuracy over the end-to-end training counterpart (dashed blue) with a high noise scale, which demonstrates the beneficial effect of modeling weight dependencies in earlier layers. We describe further details in the supplementary file.

Task-dependent Weight Transformation for Neural Network Binarization
Our objective is to train binarized weights w q given pre-trained full-precision weights. We effectively mitigate performance degeneration from the loss of information incurred by binarization by focusing on the inter-weight dependencies within each layer and across consecutive layers. We first reformulate the quantization function Q in Equation 2 with the weight correlation matrix V and the importance vector s so that each weight is disentangled from the others while allowing larger quantization errors on the unimportant disentangled weights: where s ∈ R d0 is a scaling term that assigns different importance scores to each row ofŵ. We 1} din×dout } as the set of possible binarized values for w ∈ R din×dout with a scalar scaling factor for each output channel. The operation ⊗ denotes permuted matrix multiplication with index replacement, where we detail the computation in the following subsection. We additionally include 1 norm adjusted by a hyperparameter γ. At the same time, we want our quantized model to minimize the empirical task loss (e.g., cross-entropy loss) for a given dataset. Thus we formulate the full objective in the form of a bilevel optimization problem to find the best quantized weights which minimizes the task loss by considering the cross-layer weight dependencies and the relative importance among weights: After the quantized training, the quantized weights w * q are determined by w * q = Q(w * ; s * , V * ). In practice, directly solving the above bilevel optimization problem is impractical due to its excessive computational cost. We therefore instead consider the following relaxed problem:  Figure 4: Quantization-aware Training with BiTAT: We perform a sequential training process: quantization training of a layer -rapid finetuning for upper layers. At each layerwise quantization, we also train the importance vector and orthonormal correlation matrix, which are initialized by PCA components of the current and lower layer inputs in the target block, and guide the quantization to consider the importance of disentangled weights.
where λ is a hyperparameter to balance between the quantization objective and task loss. Since it is impossible to compute the gradients for discrete values in quantized weights, we adopt the straight-through estimator [1] that is broadly used across QAT methods: sgn(w) indicates the sign function applied elementwise to w. We follow [21] for the derivative of sgn(·). Finally, we obtain the desired quantized weights by w * q = sgn(w * ). In order to obtain the off-diagonal parts of the cross-layer dependency matrix V , we minimize Equation 8 with respect to s and V to dynamically determine the values (we omit X and Y from the arguments of L train (·) for readability): where Reg(s, V ) := V V − I 2 + |σ − i log(s i )| 2 is a regulariztion term which enforces V to be orthogonal and keeps the scale of s constant. Here, σ is the constant initial value of i log(s i ), which is a non-negative importance score.

Layer-progressive Quantization with Block-wise Weight Dependency
While we obtain the objective function in Equation 9, it is inefficient to perform quantization-aware training while considering the complete correlations of all weights in the given neural network. Therefore, we only consider cross-layer dependencies between only few consecutive layers (we denote it as a block), and initialize s and V using Principal Component Analysis (PCA) on the inputs to those layers within each block. Formally, we define a weight correlation matrix in a neural network block where k is the number of layers in a block, similarly to the block-diagonal formulation in [18] to express the dependencies between weights across layers in the off-diagonal parts. We initialize s (l) and in-diagonal parts V (l) by applying PCA on the input covariance matrix: where o (l) is the output of l-th layer and o (0) = x. This allows the weights at l-th layer to consider the dependencies on the weights from the earlier layers within the same neural block, and we refer to this method as sequential quantization. Then, instead of having one set of s and V for each layer, we can keep the previous layer's s and V and expand them. Specifically, when quantizing layer l which is a part of the block that starts with the layer m, we first apply PCA on the input covariance matrix to obtain λ (l) and U (l) . We then expand the existing s (m:l−1) and V (m:l−1) to obtain s ∈ R D+d l−1 and s ∈ R D+d l−1 as follows † : where D =  weights with the expanded s and V , we define the expanded block weights as follows ‡ : where PadCol(·, c) zero-pads the input matrix to the right by c columns. Then, our final objective from Equation 9 with cross-layer dependencies is given as follows: Given the backbone architecture with L layers, we minimize L train (w (l) , s (l) , V (l) ) with respect to w (l) , s (l) , and V (l) to find the desired binarized weights w * (l) q for layer l while keeping the other layers frozen. Next, we finetune the following layers using the task loss function a few epochs before performing QAT on following layers, as illustrated in Figure 4. This sequential quantization proceeds from the bottom layer to the top and the obtained binarized weights are frozen during the training.

Cost-efficient BiTAT via Aggregated Weight Correlation using Reduction Matrix
We derived a QAT formulation which focues on the cross-layer weight dependency by learning block-wise weight correlation matrices. Yet, as the number of inputs to higher layers is often large, the model constructs higher-dimensional V (l) on upper blocks, which is costly. In order to reduce the training memory footprint as well as the computational complexity, we aggregate the input dimensions into several small groups based on functional similarity using k-means clustering.
First, we take feature vectors, the outputs of the l-th layer o N ∈ R d l for each output dimension, to obtain d l points p 1 , p 2 , . . . , p d l ∈ R N , then aim to cluster the points to k groups using k-means clustering, each containing N/k points. Let g i ∈ {1, 2, . . . , k} indicate the group index of p i , for i = 1, . . . , d l . We construct the reduction matrix P ∈ R k×d l , where P ij = 1 N/k if g j = i, and 0 otherwise. Each group corresponds to a single row of the reduced V (l+1) ∈ R k×k instead of the original dimension d l × d l . In practice, this significantly reduces the memory consumption of the V (down to 0.07%). Now, we replace s and V in Equation 13 to s and V P , respectively, initializing s and V with the grouped input covariance 1
Baselines and training details. While our method aims to solve the QAT problem, we extensively compare our BiTAT against various methods; Post-training Quantization (PTQ) method: BRECQ [18], and Quantization-aware Training (QAT) methods: DBQ [8], EBConv [3], Bi-Real Net [20], Real-to-Bin [22], LCQ [35], MeliusNet [2], ReActNet [21]. Note that DBQ, LCQ, and MeliusNet, which keep some crucial layers, such as 1×1 downsampling layers, in full-precision, leading to inefficiency at evaluation time. Due to the page limit, we provide the details on baselines, and the training and inference phase during QAT including hyperparameter setups in the Supplementary file. We also discuss about the limitations and societal impacts of our work in the Supplementary file.

Quantitative Analysis
We compare our BiTAT against various PTQ and QAT-based methods in Table 1 on multiple datasets. BRECQ introduces an adaptive PTQ method by focusing on the weight dependency via hessian matrix computations, resulting in significant performance deterioration and excessive training time. DBQ and LCQ suggest QAT methods, but the degree of bitwidth compression for the weights and activations is limited to 2-to 8-bits, which is insufficient to meet our interest in achieving neural network binarization with 1-bits weights and activations. MeliusNet only suffers a small accuracy drop, but it has a high OP count. DBQ and LCQ restrict the bit-width compression to be higher at 4 bits so that they cannot enjoy the XNOR-Bitcount optimization for speedup. Although Bi-Real Net, Real-to-Bin, and EBConv successfully achieve neural network binarization, over-parameterized ResNet is adopted as backbone networks, resulting in higher OP count. Moreover, except EBConv, these works still suffer from a significant accuracy drop. ReActNet binarizes all of the weights and activations (except the first and last layer) in compact network architectures while preventing model convergence failure. Nevertheless, the method still suffers from considerable performance degeneration of the binarized model. On the other hand, our BiTAT prevents information loss during quantized training up to 1-bits, showing a superior performance than ReActNet, 0.37 % ↑ for ImageNet, 0.53% ↑ for CIFAR-10, and 2.31% ↑ for CIFAR-100. Note that BiTAT further achieves on par performance of the MobileNet backbone for CIFAR-100. The results support our claim on layer-wise quantization from the bottom layer to the top, reflecting the disentangled weight importance and correlation with the quantized weights at earlier layers.

Ablation study
We conduct ablation studies to analyze the effect of salient components in our proposed method in Figure 7 Left. BiTAT based on layer-wise sequential quantization without  Figure 7: Left: Ablation study for analyzing core components in our method. We report the averaged performance and 95% confidence interval across 3 independent runs and the complete BiTAT result is highlighted in gray background. Right: Visualization of the weight grouping during sequential quantization of BiTAT. Each 3×3 square represents a convolutional filter of the topmost layer (26 th , excluding the classifier) of our model, and each unique color represents each group to which weight elements belong.
weight transformation already surpasses the performance of ReActNet, demonstrating that layerwise progressive QAT through an implicit reflection of adjusted importance plays a critical role in preserving the pre-trained models during quantization. We adopt intra-layer weight transformation using the input-dependent orthonormal matrix, but no significant benefits are observed. Thus, we expect that only disentangling intra-layer weight dependency is insufficient to fully reflect the adjusted importance of each weight due to a binarization of earlier weights/activations. This is evident that BiTAT considering both intra-layer and cross-layer weight dependencies achieves improved performance than the case with only intra-layer dependency. Yet, this requires considerable additional training time to compute with a chunk-wise transformation matrix. In the end, BiTAT with aggregated transformations, which is our full method, outperforms our defective variants in both terms of model performance and training time by drastically removing redundant correlation through reduction matrices. We note that using k-means clustering for aggregated correlation is also essential, as another variant, BiTAT with filter-wise transformations, which filter-wisely aggregates the weights instead, results in deteriorated performance.

Qualitative Analysis
Visualization of Reduction Matrix We visualize the weight grouping for BiTAT in Figure 7 Right to analyze the effect of the reduction matrix, which groups the weight dependencies in each layer based on the similarity between the input dimensions. Each 3×3 square represents a convolutional filter, and each unique color in weight elements represents which group each weight is assigned to, determined by the k-means algorithm, as described in Section 4.2. We observe that weight elements in the same filter do not share their dependencies; rather, on average, they often belong to four-five different weight groups. Opposite to these observations, BRECQ regards the weights in each filter as the same group for computing the dependencies in different layers, which is problematic since weight elements in the same filter can behave differently from each other.
Visualization of Cross-layer Weight Dependency In Figure 6, we visualize learned transformation matrices V (top row), which shows that many weight elements at each layer are also dependent on other layer weights as highlighted in darker colors, verifying our initial claim. Further, we provide visualizations for their multiplications with corresponding importance vectors diag(s)V (bottom row). Here, the row of V is sorted by the relative importance in increasing order at each layer. We observe that important weights in a layer affect other layers, demonstrating that cross-layer weight dependency impacts the model performance during quantized training.

Conclusion
In this work, we explored long-overlooked factors that are crucial in preventing the performance degeneration with extreme neural network quantization: the inter-weight dependencies. That is, quantization of a set of weights affect the weights for other neurons within each layer, as well as weights in consecutive layers. Grounded by the empirical analyses of the node interdependency, we propose a Quantization-Aware Training (QAT) method for binarizing the weights and activations of a given neural network with minimal loss of performance. Specifically, we proposed orthonormal transformation of the weights at each layer to disentangle the correlation among the weights to minimize the negative impact of quantization on other weights. Further, we learned scaling term to allow varying degree of quantization error for each weight based on their measured importance, for layer-wise quantization. Then we proposed an iterative algorithm to perform the layerwise quantization in a progressive manner. We demonstrate the effectiveness of our method in neural network binarization on multiple benchmark datasets with compact backbone networks, largely outperforming state-of-the-art baselines.

Details for Problem Setups
Baselines. While our method aims to solve the QAT problem, we extensively compare our BiTAT against various Post-training Quantization (PTQ)-or QAT methods: BRECQ [18] is a PTQ method that considers weight dependencies using the Hessian of the task loss. DBQ [8] is a QAT method based on continuous relaxation of the quantizer function. EBConv [3] conditionally selects appropriate binarized weights based on the task information. Bi-Real Net [20] adds residual connections to propagate full-precision values, preventing information loss to activation quantization. Real-to-Bin [22] constrains a loss term at the end of each convolution to minimize the output discrepancy between the full-precision and the quantized model. LCQ [35] devises a trainable quantization function in order to reduce the quantization error. MeliusNet [2] proposes a new architecture that better propagates full-precision values throughout the network. ReActNet [21] is the state-of-the-art binary quantization method, which additionally adopts residual connections, and element-wise shift operations before/after the activation and the sign operation. Note that DBQ, LCQ, and MeliusNet keep some crucial layers of MobileNet in full-precision, leading to inefficiency at evaluation time.
Training. Following the setup from ReActNet [21], we quantize all layers' weights and activations except the initial and final layers. We use the Adam optimizer [16]. For the ImageNet experiment, a learning rate is 0.002 and 0.0002 for quantization training and the fine-tuning, respectively, with linear learning rate decay. We set batch size as 512 both the quantization phase and the fine-tuning phase is done for 5 epochs per layer. For the CIFAR-100 experiment, a learning rate is 3 × 10 −4 for quantization training and the fine-tuning with linear learning rate decay. We set batch size as 800 and both the quantization and fine-tuning are done with 40 epochs per layer. For all experiments, we set λ = 100, and γ = 10 −5 , which notes that simple choice of the hyperparameters for our regularization terms is sufficient to show impressive performance. The number of input dimension groups is set k = 256, applying the grouped weight correlation to layers with input dimensions smaller than k.
Inference. In deployment, the highly efficient XNOR-Bitcounting operations can be used for the convolutional layers, also used in existing neural network binarization works [5,30,21].

Extension to Convolutional Layers
Let us consider a convolutional layer of size n out × n in × k × k, where n in and n out are the number of input and output channels, respectively, and k is the kernel size. We define the set P x as the set of all patches of size n in × k × k extracted from the training image x. This patch-extracting operation is sometimes called im2col or F.unfold in PyTorch.
A convolutional layer applied to x can be thought of as a fully-connected layer individually applied to all patches in P x and then concatenated: where * denotes the convolution operation, Reshape shape (·) denotes the reshaping of the tensor into the specified shape, and vec(·) denotes the flattening operation. Each pixel of the output feature map corresponds to a matrix multiplication between a patch and the weight matrix. Therefore, we can analogically apply the same transformation as explained in Section 3 to convolutional layers.

Details on Cross-layer Dependency
In this section, we further explain the detailed experimental setting for Figure 3. We take the standard MobileNetV2 [31] model and train it to convergence on the CIFAR-100 dataset with standard SGD with a weight decay. Then, we add noise to the same pretrained model parameters before evaluating the test accuracy based on the following two different ways:  the model performance, which is shown in solid red lines. The same process is done but with the bottom five rows of each layer instead of the top five, shown in solid blue lines. 2. Layer-independent noise addition. Before adding noise to model parameters, we compute the covariance of the input values for all layers. Next, we perform PCA and compute w (l) with Equation 4 per layer using these initial covariance values. That is, a layer cannot reflect the weight change through noise addition in others layers, as different from the first approach. Independent gaussian noise with varying scales is added to the top five rows of w (l) for each layer, and then the performance of the model is evaluated, shown in red dashed lines. The same is done with the bottom five rows of w (l) , shown in blue dashed lines.

Additional Analysis
This paper suggests that the proposed quantization loss on disentangled weights is a better indicator for prediction accuracy than the general quantization loss (Equation 2), which is evident in multiple validation analyses and the superior model performance in our BiTAT as described in the main text. Here, we provide the quantitative analysis to show that ReActNet [21] fails to minimize the quantization loss on disentangled weights while our BiTAT successfully does. In Figure 8 Left, we show the Q orig (Equation 2) and Q ours (Equation 6 w/o 1 norm) between the initial full-precision weights of the pre-trained model and the obtained binarized weights from ReActNet and BiTAT. Q orig represents the naive MSE between the full-precision weights and the binarized weights. Q ours represents the dependency-weighted MSE between the full-precision weights and the binarized weights. Note that, in this analysis, we obtain s and V for each layer from the initial pre-trained model by Equation 10 to compute Q ours and neglect the weight dependency across different layers, which is hard to be computed analytically.
We observe that while the value of Q orig is lower in ReActNet than in BiTAT, Q ours is higher in ReActNet than in BiTAT. As shown in Figure 8 Right, the ratio r = Q ours /Q orig in ReActNet (Red) drastically increases at the beginning stage and is maintained in a high degree until the completion of the quantization-aware training, compared to the r value of the model obtained by BiTAT (Blue dashed). While disregarding the first few epochs of ReActNet training, where the accuracy is very low, ReActNet's r value dominates that of BiTAT. The value slowly decreases as the ReActNet training proceeds, but never reaches the level of BiTAT, demonstrating the inefficiency of the ReActNet training procedure compared to ours.

Limitations
We consider two limitations of our work in this section. First, our BiTAT framework is built based on a sequential quantization strategy, which progressively quantizes the layers from the bottom to the top. Therefore, the training time of our algorithm depends on the number of layers in the backbone network architecture. While we have already validated the cost-efficiency of our proposed method against ReActNet using MobileNet (26 stacked layers) in Figure 7 Left, we might spend more training time quantizing all layer weights for the backbones, composed of much more layers like ResNet-1001 (1001 stacked layers). Next, our method focuses on the cross-layer weight dependency within each neural block, including a few consecutive layers. We thereby avoid the excessive computational cost of obtaining the relationship across all layers in the backbone architecture, yet we consider it a tradeoff between accurate dependency and computation budgets.