F LE XOR: T RAINABLE F RACTIONAL Q UANTIZATION
Anonymous authors
Paper under double-blind review
A BSTRACT
Parameter quantization is a popular model compression technique due to its regular form and high compression ratio.
In particular, quantization based on binary codes is gaining attention because each quantized bit can be directly utilized for computations without dequantization using look-up tables.
Previous attempts, however, only allow for integer numbers of quantization bits, which ends up restricting the search space for compression ratio and accuracy.
Moreover, quantization bits are usually obtained by minimizing quantization loss in a local manner that does not directly correspond to minimizing the loss function.
In this paper, we propose an encryption algorithm/architecture to compress quantized weights in order to achieve fractional numbers of bits per weight and new compression conﬁgurations further optimize accuracy/compression trade-offs.
Decryption is implemented using XOR gates added into the neural network model and described as tanh( x ) , which enable gradient calculations superior to the straight-through gradient method.
We perform experiments using MNIST, CIFAR-10, and ImageNet to show that inserting XOR gates learns quantization/encrypted bit decisions through training and obtains high accuracy even for fractional sub 1-bit weights.
I NTRODUCTION
Deep Neural Networks (DNNs) demand larger number of parameters and more computations to support various task descriptions all while adhering to ever-increasing model accuracy requirements.
Because of abundant redundancy in DNN models (Han et al., 2016; Frankle & Carbin, 2019; Courbariaux et al., 2015) and limited scaling technology of integrated circuits due to physical challenges, numerous model compression techniques are being aggressively studied to expedite inference of
DNNs across a range of device scales.
As a practical model compression scheme, parameter quantization is a popular choice because compression ratio is high and regular formats after compression enable full memory bandwidth utilization that is crucial in highly parallel computing systems.
Quantization schemes based on binary codes are gaining increasing attention since quantized weights follow speciﬁc constraints to allow simpler computations during inference. Speciﬁcally, using binary codes, a weight vector is represented as (cid:80) qi
{+=
 ( α i (cid:80) vj = 1 b i,j ) , where q is the number of quantization bits, v is the vector size, α is a scaling factor ( α ∈ R ) ,+} and b i,j is a binary code ( b i,j ∈ {− 1 , +1 } ) . Then, a dot product with activations is conducted as (cid:80) qi
{+=
 ( α i (cid:80) vj =1+} a j b i,j ) , where a j is a full-precision activation. Then, the number of multiplications is reduced from v to q (expensive ﬂoating-point multipliers are less required for inference). Moreover, even though we do not discuss a new activation quantization method in this paper, if activations are also quantized by using binary codes, then most computations are replaced with bit-wise operations (using XNOR logic and population counts)
(Xu et al., 2018; Rastegari et al., 2016). Consequently, even though representation space is constrained compared with quantization methods based on look-up tables, various inference accelerators can be designed to exploit advantages of binary codes (Rastegari et al., 2016; Xu et al., 2018).
Since a successful 1-bit weight quantization method has been demonstrated in BinaryConnect (Courbariaux et al., 2015), advances in compression-aware training algorithms in the form of binary codes (e.g., binary weight networks (Rastegari et al., 2016) and LQ-Nets (Zhang et al., 2018)) produce 1-3 bits for quantization while accuracy drop is modest or negligible.
Fundamental investigations on DNN training mechanisms using fewer quantization bits have also been actively reported to improve quantization quality (Li et al., 2017). [Figure]
Previously, binary-coding-based quantization has only permitted integer numbers of quantization bits, limiting the compression/accuracy trade-off search space, especially in the range of very low quantization bits.
In this paper, we propose a ﬂexible encryption algorithm/architecture (called “FleXOR”) to enable fractional sub 1-bit numbers to represent each weight while quantizated bits are trained by gradient descent.
Even though vector quntization is also a well-known scheme with high compression ratio (Stock et al., 2019), we assume the form of binary codes. Note that the number of quantization bits can be different for each layer (e.g., Wang et al. to allow fractional quantization bits on average. FleXOR implies fractional quantization bits for each layer that can be quantized with different bits.
The main contributions of this paper are as follows:
XOR-based encryption of quantized bits enhances compression ratio: We encrypt quantized weights to further compress quantized DNNs applying basic principles from cryptography and digital communication.
XOR-aware training algorithm learns encrypted weights: A binary model of XOR gates is used for forward propagation and model inference.
We suggest calculating gradients of XOR gates using tanh functions instead of using a straight-through estimator (STE) (Bengio et al., 2013) for efﬁcient compression-aware training.
High model accuracy with sub bit quantization:
To the best of our knowledge, our work is the ﬁrst to explore model accuracy under 1 bit/weight when weights are quantized based on binary codes.
Such an exploration plays a signiﬁcant role for mobile devices where it may be possible to sacriﬁce modest amounts of accuracy drop in exchange for improved energy efﬁciency.
E NCRYPTING Q UANTIZED B ITS USING XOR G ATES
The main purpose of FleXOR is to compress quantized bits into encrypted bits that can be reconstructed by XOR gates as shown in Figure 1.
Suppose that N out bits are to be compressed into N in bits ( N out > N in ).
The role of an XOR-gate network is to produce various N out -bit combinations using N in bits.
In other words, in order to maximize the chance of generating a desirable set of quantized bits, the encryption scheme is designed to seek a particular property where all possible 2 N in outcomes through decryption are evenly distributed in 2 N out space.
A linear Boolean function, f ( x ) , maps f : { 0 , 1 } N in → { 0 , 1 } and has the form of a 1 x 1 ⊕ a 2 x 2 ⊕ · · · ⊕ a N in x N in where a j ∈ { 0 , 1 } ( 1 ≤ j ≤ N in ) and ⊕ indicates bitwise modulo-2 addition.
In
Figure 1, six binary outputs are generated through six Boolean functions using four binary inputs.
Let f 1 ( x ) and f 2 ( x ) be two such linear Boolean functions using x = ( x 1 , x 2 , ..., x N in ) ∈ { 0 , 1 } N in .
The Hamming distance between f 1 ( x ) and f 2 ( x ) is the number of inputs on which f 1 ( x ) and f 2 ( x ) differ, and deﬁned as
[Equation]
1) where w H ( f ) =
# { x ∈ { 0 , 1 } N in | f ( x ) = 1 } is the Hamming weight of a function and # {} corresponds to the size of a set (Kahn et al., 1988).
The Hamming distance is a well-known method to express non-linearity between two Boolean functions (Kahn et al., 1988) and increased Hamming
N in bits
N out bits N out bits
N out bits N out bits
N out bits
One XOR-gate Network is Temporally- or Spatially-Shared
Slices of Encrypted Weights
Scaling Factor (for Binary-Code Dequantization)
Full-Precision Weights
1D Encrypted Weight Vector
Slicing
Reshaping (2D for FC, 4D for Conv)
Slices of Quantized Weights
N in bits
N in bits N in bits
N in bits distance between a pair of two Boolean functions results in a variety of outputs produced by XOR gates.
Increasing Hamming distance is a required feature for cryptography to derive complicated encryption structure such that inverting encrypted data becomes difﬁcult.
For digital communication, the Hamming distance between encoded signals is closely related to the amount of error correction possible.
In Figure 1, y 1 is represented as x 1 ⊕ x 3 ⊕ x 4 , or equivalently a vector [1 0 1 1] denoting which inputs are selected.
Concatenating such vectors, a XOR-gate network in Figure 1 can be described as a binary matrix M ⊕ ∈ { 0 , 1 } N out × N in (e.g., the second row of M ⊕ is [1 1 0 0] and the third row is [1 1 1 0] ).
Then, decryption through XOR gates is simply represented as y =
M ⊕ x where x and y are the binary inputs and binary outputs of XOR gates, and addition is ‘XOR’ and multiplication is ‘AND’ (see Appendix for more details and examples).
Encrypted weight bits are stored in 1-dimensional vector format and sliced into blocks of N in -bit size as shown in Figure 2.
Then, decryption of each slice is performed by a XOR-gate network that is shared by all slices (temporally- or spatially-shared).
Depending on the quantization scheme and characteristics of layers, quantized bits may need to be scaled by a scaling factor and/or reshaped.
[-=
-]
F LE XOR T RAINING A LGORITHM FOR Q UANTIZATION B ITS D ECISION
Once the structure of XOR gates has been pre-determined and ﬁxed to increase the Hamming distance of XOR outputs, we ﬁnd quantized and encrypted bits by adding XOR gates into the model.
In other words, we want an optimizer that understands the XOR-gate network structure so as to compute encrypted bits and scaling factors via gradient descent.
Note that for inference, we store binary encrypted weights (converted from real number encrypted weights) in memory and generate binary quantized weights through Boolean XOR operations.
Activation quantization is not discussed in this paper.
Similar to the STE method introduced in (Courbariaux et al., 2015), Boolean functions need to be described in a differentiable manner to obtain gradients in backward propagation.
For two real number inputs x 1 and x 2 ( x 1 , x 2 ∈ R to be used as encrypted weights), the Boolean version of a
XOR gate for forward propagation is described as (note that 0 is replaced with − 1 )
[Equation]
For inference, we store sign( x 1 ) and sign( x 2 ) instead of x 1 and x 2 .
On the other hand, a differentiable XOR gate for backward propagation is presented as
[Equation]
where S tanh is a scaling factor for FleXOR.
Note that tanh functions are widely used to approximate
Heaviside step functions (i.e., y ( x )
=
if x > 0 or 0 , otherwise) in digital signal processing and S tanh can control the steepness (as explained in Appendix).
In the case of consecutive XOR operations, the order of inputs to be fed into XOR gates should not affect the computation of partial gradients for XOR inputs.
Therefore, as a simple extension of Eq.
(3), a differentiable XOR gate network with n inputs can be described as
[Equation]
Then, a partial derivative of f ⊕ with respect to x
i (an encrypted weight) is given as
[Equation]
Note that increasing the Hamming distance is associated with more tanh multiplications for each
XOR-gate network output.
Then, from Eq.
(5), we may suffer from the vanishing gradient problem since | tanh( x ) | ≤ 1 .
To resolve this problem, we also consider a simpliﬁed alternative partial derivative expressed as
[Equation]
Eq.
(6) shows that when we compute a partial derivative, all XOR inputs other than x i are assumed to be binary, i.e., the magnitude of a partial derivative is then only determined by x i .
We use Eq.
(6) in this paper to calculate custom gradients of encrypted weights due to fast training computations and convergence, and use Eq.
(2) for forward propagation.
[Equation]
(cid:46) Encrypted weights
M ⊕ ∈ { 0 , 1 } N out × N in (cid:46) XOR gates (shared) α ∈ R C out (cid:46) Scaling factors for each output channel
Function FleXOR Conv( input , stride , padding ) : for i ← 0 to (cid:100) ( k · k · C in · C out ) /N out (cid:101) − 1 do for j ← 1 to N out do w qi · N out + j ← ( − 1) ·  
N [Equation] (cid:89) [Equation]
[Equation]
[Equation]   (cid:46) Eq.
W q ← Reshape ( w q , [ k, k, C in , C out ] ) return Conv ( input , W q , α , stride , padding ) (cid:46) Convolution operation for binary codes
Forward Function Sign c ( x ) : return sign( x )
Gradient Function Sign c (x, ∇ ) : return ∇ · (1 − tanh 2 ( x · S tanh ))
· S tanh (cid:46) Eq.
By training the whole network including FleXOR components with using custom gradient computation methods described above, encrypted and quantized weights are obtained in a holistic manner.
FleXOR operations for convolutional layers are described in Algorithm 1, where encrypted weights (inputs of a XOR-gate network) and quantized weights (outputs of a XOR-gate network) are w e and W q .
We ﬁrst verify basic training principles of FleXOR using LeNet-5 on the MNIST dataset.
LeNet-5 consists of two convolutional layers and two fully-connected layers (speciﬁcally, 32C5MP2-64C5-MP2-512FC-10SoftMax), and each layer is accompanied by an XOR-gate network with
N in binary inputs and N out binary outputs.
The quantization scheme follows 1-bit binary code with full-precision scaling factors that are shared across weights for the same output channel number (for conv layers) or output neurons (for FC layers).
Encrypted weights are randomly initialized with N ( µ =0 , σ 2 =0 .
All scaling factors for quantization are initialized to be 0 .
1 (note that if batch normalization layers are immediately followed, then scaling factors for quantization are redundant). [Figure]
Using the Adam optimizer with an initial learning rate of 10 -4 and batch size of 50 without dropout,
Figure 3 shows training loss and test accuracy when S tanh =100 , elements of M ⊕ are randomly ﬁlled with 1 or 0, and for two values of N out – 10 and 20 .
Using the 1-bit internal quantization method and ( N in , N out ) encryption scheme, one weight can be represented by ( N in /N out ) bits.
Hence, Figure 3 represents training results for 0.4, 0. [Figure] and 0.8 bits per weight.
Note that as for a randomly ﬁlled M ⊕ , increasing N out (and N in correspondingly for the same compression ratio) increases the Hamming distance for a pair of any two rows of M ⊕ and, hence, offers the chance to produce more diversiﬁed outputs.
Indeed, as shown in Figure 3, the results for N out =20 present improved test accuracy and less variation compared with N out =10.
See Appendix for the distribution of encrypted weights at different training steps.
P RACTICAL F LE XOR T RAINING T ECHNIQUES
In this section, we present practical training techniques for FleXOR using ResNet-32 (He et al., 2016) on the CIFAR-10 dataset (Krizhevsky et al., 2009).
As shown in Figure 4, since FleXOR decouples the number of bits to represent weights from the quantization scheme used, various tradeoffs between memory footprint and model accuracy are possible.
We show compression results for
ResNet-32 using fractional numbers as effective quantization bits, such as 0.4 and 1.2, that have not been available previously.
All layers, except the ﬁrst and the last layers, are followed by FleXOR components sharing the same
M ⊕ structure (thus, storage foorprint of M ⊕ is ignorable).
SGD optimizer is used with momentum of 0.9 and a weight decay factor of 10 − 5 .
Initial learning rate is 0.1, which is decayed by 0.5 at the 150 th and 175 th epoch.
As learning rate decays, S tanh is empirically multiplied by 2 to cancel [Figure] XOR Training Method STE
AnalogXOR
FleXOR Forward sign tanh sign Backward Identity ∂ (tanh) ∂ (tanh)
XOROutput
Binary − 1 or +
R ( − 1 , +1)
Binary − 1 or +
[Figure]
out the effects of weight decay on encrypted weights.
Batch size is 128 and scaling factors of α are randomly initialized between 0.01 and 0.19.
q is the number of bits to represent binary codes for quantization.
We provide some useful training insights below with relevant experimental results.
1) Use small N tap (such as 2): FleXOR should be able to select the best out of 2 N in possible outputs that are randomly selected from larger 2 N out search space.
Encryption performance of XOR gates is determined by randomness of 2 N in output candidates, and is enhanced by increasing Hamming distance that is basically achieved by large N out .
Now, let N tap be the number of 1’s in a row of M ⊕ .
Another method to enhance encryption performance is to increase N tap so as to increase the number of shufﬂes (through more XOR operations) using encrypted bits to generate quantized bits such that correlation between quantized bits is reduced.
Large N tap , however induces vanishing gradient problems in Eq.
(5) or increased approximation error in Eq.
Hence, in practice, FleXOR training with small N tap converges well with high test accuracy.
Studying a training algorithm to understand a complex XOR-gate network with large N tap would be an interesting research topic that is beyond the scope of this work.
Subsequently, we show experimental results using N tap =in the remainder of this paper.
2) Use ‘ tanh ’ rather than STE: Since forward propagation for a XOR gate only needs a sign function, the STE method is also applicable to XOR-gate gradient calculations.
Another alternative method to model an XOR gate is to use Eq.
(3) for both forward and backward propagation as if the XOR is modeled in an analog manner (then, real number XOR outputs are quantized through
STE).
We compare three different XOR modeling schemes in Figure 5 with test accuracy measured when encrypted weights and XOR gates are converted to be binary for inference.
FleXOR training method shows the best result because a) sign function for forward propagation enables estimating the impact of binary XOR computations on the loss function and b) ∂ (tanh) for backward propagation approximates the Heaviside step function better compared to STE.
Note that limited gradients from the tanh function eliminate the need for weight clipping, which is often required for quantizationaware training schemes (Courbariaux et al., 2015; Xu et al., 2018).
3) Optimize S tanh : S tanh controls the smoothness of the tanh function for near-zero inputs.
Large
S tanh employs large gradient for small inputs and, hence, results in well-clustered encrypted weight [Figure] [Table] values as shown in Figure 6.
Too large of a S tanh , however, hinders encrypted weights from being ﬁnely-tuned through training.
For FleXOR, S tanh is a hyper-parameter to be optimized.
4) Learning rate and S tanh warmup:
Learning rate starts from 0 and linearly increases to reach the initial learning rate at a certain epoch as a warmup.
Learning rate warmup is a heuristic scheme, but being widely accepted to improve generalization capability mainly by avoiding large learning rate in the initial phase (He et al., 2018; Gotmare et al., 2019).
Similarly, S tanh starts from 5 to linearly increases to 10 using the same warmup schedule of the learning rate.
5) Try various q , N in , and N out : Using a warmup scheme for 100 epochs and learning rate decay by 50% at the 350 th , 400 th , and 450 th epoch, Figure 7 presents test accuracy of ResNetwith various q , N in , and N out .
For q> 1 , different M ⊕ conﬁgurations are constructed and then shared across all layers.
Note that even for the 0.4bit/weight conﬁguration (using q =1 , N in =8 , and
N out =20 ), high accuracy close to 89% is achieved.
0.8bit/weight can be achieved by two different conﬁgurations (as shown on the right side of Figure 7) using ( q =1 , N in =8 , N out =10 ) or ( q =2 , N in =8 , N out =20 ).
Interestingly, those two conﬁgurations show almost the same test accuracy, which implies that FleXOR is able to provide a linear relationship between the amount of encrypted weights and model accuracy (regardless of internal conﬁgurations).
In general, lowering q reduces the amount of computations with quantized weights and a high N out value is necessary for very low number of bits per weight since N in also needs to be high enough to increase the Hamming distance.
We compare quantization results of ResNet-20 and ResNet-32 on CIFAR-10 using different compression schemes in Table 1 (with full-precision activation).
BWN (Rastegari et al., 2016), BinaryRelax (Yin et al., 2018), and LQ-Net (Zhang et al., 2018) propose different training algorithms
[Table]
for the same quantization scheme (i
[Table]
e., binary codes).
The main idea of these methods is to minimize quantization error and to obtain gradients from full-precision weights while the loss function is aware of quantization.
Because all of quantization schemes in Table 1 uses q =1 and binary codes
[Table]
the amount of computations using quantized weights is the same.
FleXOR, however, allows reduced memory footprint and bandwidth which are critical to improve energy efﬁciency of inference engine designs (Han et al., 2016;
Ahn et al., 2019). Note that even though achieving the best accuracy for 1.0bit/weight is not the main purpose of FleXOR (e.g., XOR gate may be redundant for N in = N out ), FleXOR shows the minimum accuracy drop for ResNet-20 and ResNet-32 as shown in Table 1, probably because a) FleXOR enables model optimization integrated with quantization and encyption units instead of considering the local quantization error and b) FleXOR calculates gradients for encrypted weights by employing ‘ tanh ’ (instead of STE) that approximates a Heaviside step function.
E XPERIMENTAL R ESULTS ON I MAGE N ET
In order to show that FleXOR principles can be extended to larger models, we choose ResNeton ImageNet (Russakovsky et al., 2015).
We use SGD optimizer with momentum of 0.9 and initial learning rate of 0.1.
Batch size is 128, weight decay factor is 10 − 5 , and S tanh is 10.
Learning rate is reduced by half at the 70 th , 100 th , and 130 th .
For warmup, during initial ten epochs, S tanh and learning rate increase linearly from 5 and 0.0, respectively, to initial values.
Table 2 shows the comparison on model accuracy of ResNet-18 when weights are compressed by quantization (and additional encryption by FleXOR) while activations maintain full precision.
Training the entire model for ImageNet including FleXOR components is successfully performed.
In
Table 2, BinaryRelax and BWN do not modify the underlying model architecture, while ABC-Net introduces a new block structure of the convolution for quantized network designs.
FleXOR achieves the best top-1 accuracy even with only 0.8bit/weight and demonstrates improvement of model accuracy as the number of bits per weight increases.
Refer to Appendix for the accuracy graph with q = and more results with q =2 .
C ONCLUSION
This paper proposes an encryption algorithm/architecture, FleXOR, as a framework to further compress quantized weights.
Encryption is designed to produce more outputs than inputs by increasing the Hamming distance of output functions when output functions are linear functions of inputs.
Output functions are implemented as a combination of XOR gates which are included in the model to ﬁnd encrypted and quantized weights through gradient descent while using the tanh function for backward propagation.
FleXOR is able to provide fractional numbers of bits for weights and, thus, much wider trade-offs between weight storage and model accuracy.
Experimental results show that
ResNet on CIFAR-10 and ImageNet
A A PPENDIX A. E XAMPLE OF A XOR- GATE N ETWORK S TRUCTURE R EPRESENTATION
In Figure 1, outputs of a XOR-gate network are given as
[Equation]
Equivalently, the same structure as above can be represented in a matrix as
[Equation]
Note that elements of M ⊕ are matched with coefﬁcients of y i (1 ≤ i ≤ 6) .
For two vectors y = { y 1 , y 2 , y 3 , y 4 , y 5 , y 6 } and x = { x 1 , x 2 , x 3 , x 4 } , the following equation holds:
[Equation]
where element-wise addition and multiplication are performed by ‘XOR’ and ‘AND’ function, respectively.
In Eq.
(7), N tap (i.e., the number of ‘1’s in a row) is 2 or 3.
A. S UPPLEMENTARY D ATA FOR B ASIC F LE XOR T RAINING P RINCIPLES
A Boolean XOR gate can be modeled as F ⊕ ( x 1 , x 2 ) =
( − 1) sign( x 1 ) sign( x 2 ) if 0 is replaced with − 1 as shown in Table 3. sign
[Equation]
[Equation]
In Eq.
(7), forward propagation for y 3 is expressed as
[Equation]
while partial derivative of y 3 with respect to x 1 is given as (not derived from Eq.
[Equation]
or as
[Equation]
We choose Eq.
(11), instead of Eq.
(10), as explained in Section 3.
As shown in Figure 8, large S tanh yields sharp transitions for near-zero inputs.
Such a sharp approximation of the Heaviside step function produces large gradient values for small inputs and encourages encrypted weights to be separated into negative or positive values.
Too large S tanh , however, has the same isseus of a too large learning rate.
[-Compared with Figure 3, N tap = 2 presents improved accuracy for the cases of high compression conﬁgurations (e.g., N in = 
-]
- -    y = tanh( x · S tanh ) -1.
S tanh = S tanh =
S tanh = S tanh =
S tanh
= - -    y = S tanh (1 − tanh 2 ( x · S tanh ))
S tanh =
S tanh = S tanh = S tanh =
S tanh =
Figure 9 presents training loss and test accuracy when N tap = 2 and N out is 10 or 20. Compared with Figure 3, N tap = 2 presents improved accuracy for the cases of high compression conﬁgurations (e.g., N in = {+
 and N out = 10 ). We use N tap = 2 for CIFAR-10 and ImageNet, since low+}
N tap avoids gradient vanishing problems or high approximation errors in Eq.(5) or Eq.(6). Figure 10 plots the distribution of encrypted weights at different training steps when each row of M ⊕ is randomly assigned with { 0 , 1 } (i.e., N tap is N in / 2 on average) or assigned with only two 1’s ( N tap =2). Due to gradient calculations based on tanh and high S tanh , encrypted weights tend to be clustered on the the left or right (near-zero encrypted weights become less as N tap increases) even without weight clipping.
A. S UPPLEMENTARY E XPERIMENTAL R ESULTS OF CIFAR-10 AND I MAGE N ET
In this subsection, we additionally provide various graphs and accuracy tables for ResNet models on CIFAR10 and ImageNet.
We also present experimental results from wider hyper-parameters searches including q = 2 with two separate M ⊕ conﬁgurations (with the same N in and N out for two M ⊕ matrices).
[Figure]
[Figure]
[Figure]
lr=0.
lr=0.
lr=0.
lr=0.
[Figure] [Figure]
[Figure]
T e s t
A cc u r a c y ( % ) ( q =1, N in =8, N out =20) ( q =1, N in =12, N out =20) ( q =1, N in =16, N out =20) ( q =1, N in =20, N out =20)
[Figure]
q = 1 .
[Figure]
T e s t
A cc u r a c y ( % ) ( q =2, N in =8, N out =20) ( q =2, N in =12, N out =20) ( q =2, N in =16, N out =20) ( q =2, N in =20, N out =20) (b
13a
Bits/
[Table]
ResNet
[Table]
ResNet
[Table]
Comp.
Ratio
FP [Table] [Table] [Table]
N in
[Table]
[Table]
[Table]
[Table]
[Table] [Table] [Table] 95 ×
N in
[Table]
[Table]
[Table]
[Table] [Table] [Table] [Table]
×
N in [Table] [Table] [Table]
[Table] [Table] [Table] ×
N in [Table] [Table] N
[Table]
[Table] [Table] [Table] [Table]
+ [Table] LQ-Net (2 bit) 92.10% [Table]
[Table]
FleXOR( q = 2 , N out = 20 )
N in =20, 2.0 bit/weight 91.87% [Table] [Table] [Table]
[Table] [Table] N in =18, 1.8 bit/weight [Table]
[Table]
[Table] [Table] [Table] N in =16, 1.6 bit/weight
[Table] N in =14, 1.4 bit/weight
[Table] N in =12, 1.2 bit/weight [Table]
FleXOR( q = 2 , N out = 10 )
N in =10, 2.0 bit/weight [Table]
N in =9, 1.8 bit/weight [Table]
N in =8, 1.6 bit/weight [Table] N in =7, 1.4 bit/weight
[Table]
N in =6, 1.2 bit/weight
[Table]
and two different M ⊕ structures achieve full-precision accuracy when both N in and
N out are 10.
[Figure]
[Table]