---
title: "Deep Learning with Low Precision by Half-Wave Gaussian"
description: "How half-wave Gaussian quantization combines low-bit activations with stable training, and what its image-classification experiments establish."
canonical: "https://research.elamur.ai/free/en/papers/cai-2017-deep-learning-low-precision-half/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/cai-2017-deep-learning-low-precision-half/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2017](https://md.research.elamur.ai/free/en/papers/2017/) / Deep Learning with Low Precision by Half-Wave Gaussian Quantization

# Deep Learning with Low Precision by Half-Wave Gaussian Quantization

Paper · 2017 · Zhaowei Cai, Xiaodong He, Jian Sun et al.

**Authors:** Zhaowei Cai, [Xiaodong He](https://md.research.elamur.ai/free/en/authors/xiaodong-he/), [Jian Sun](https://md.research.elamur.ai/free/en/authors/jian-sun/) and Nuno M. Vasconcelos · **Year:** 2017 · **Venue:** IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**489** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2586654419) · [IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings](https://openalex.org/S4210176548) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1702.00953)
- [DOI 10.1109/cvpr.2017.574](https://doi.org/10.1109/cvpr.2017.574)
- [arXiv 1702.00953](https://arxiv.org/abs/1702.00953)
- [OpenAlex](https://openalex.org/W2586654419)

Citations: OpenAlex, 2026-10-14.

## Deep dive: Deep Learning with Low Precision by Half-Wave Gaussian Quantization

How half-wave Gaussian quantization combines low-bit activations with stable training, and what its image-classification experiments establish. · about 32 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Making a neural network smaller does not automatically make its main computations cheap. Storing each weight with very little precision can reduce memory use, but a network still performs expensive arithmetic if the values flowing between its layers remain full precision. This paper studies the harder companion problem: reducing the precision of those intermediate activations while preserving useful classification accuracy. Its central proposal is half-wave Gaussian quantization, or HWGQ, which approximates the behavior of a rectified linear unit, usually called a ReLU. The resulting network uses a small collection of activation values during forward computation and a different, continuous approximation during training.

The distinction between those forward and backward functions is the paper’s main organizing idea. A quantizer maps a range of inputs onto a single output value. Its response therefore resembles a staircase, whose derivative is zero almost everywhere. Directly using that derivative would remove the gradient signals needed to train earlier layers. Previous binary networks addressed this by substituting a continuous function during back-propagation, the procedure that carries learning signals backward through a network. The authors argue that the choice of substitute matters as much as the quantizer itself. A useful forward approximation can still train poorly when its backward companion assigns misleading gradients, especially to unusually large inputs.

HWGQ exploits an empirical regularity in convolutional networks. After batch normalization, the weighted input sums entering activation functions are approximately Gaussian, with zero mean and unit variance. Rather than repeatedly fitting a different quantizer to every unit, the authors design a shared quantizer using samples from a standard Gaussian distribution. Negative inputs become zero, following the ReLU’s rectifying behavior; positive inputs are assigned to discrete levels. For backward computation, the paper compares an ordinary ReLU, a clipped ReLU, and a ReLU with a logarithmically growing tail. The latter alternatives reduce the influence of large inputs whose forward outputs have already saturated at the quantizer’s highest level.

The experiments combine this activation scheme with binary weights and evaluate several convolutional architectures on ImageNet, with additional experiments on CIFAR-10. The final ImageNet configuration uses 1-bit weights, 2-bit uniform activations, and the clipped backward approximation, while retaining full precision in the first and last layers. It substantially narrows the reported top-1 accuracy gap relative to earlier low-precision approaches. For AlexNet, the signed gap from the corresponding full-precision reference is -5.8 points for HWGQ-Net, compared with -12.4 for XNOR-Net and -8.2 for DoReFa-Net. For ResNet-18, the reported gaps are -7.7 for HWGQ-Net and -18.1 for XNOR-Net. These are meaningful improvements, but they leave a remaining accuracy cost. The paper establishes a practical training strategy across several image-classification architectures; its roughly 32× memory and convolutional-computation savings are theoretical estimates, rather than measured deployment results.

### Ideas worth borrowing

Choose the continuous behavior first. The authors begin by asking which familiar activation function a low-precision design should approximate. This exposes a weakness in binary sign activations: their usual forward and backward functions resemble approximations to a saturating hyperbolic tangent, whereas the networks under study benefit from the stronger positive-side gradients of a ReLU. The reusable idea is to identify the behavior worth preserving before choosing a discrete representation. In another compression problem, this means examining the operation’s functional role, rather than treating a small alphabet of values as sufficient justification for the design.

Design the forward and backward functions together. HWGQ’s staircase is suitable for limited-precision forward computation, but its literal derivative is unsuitable for learning. A continuous substitute solves that immediate problem while introducing another: its gradients may describe behavior that the forward computation does not exhibit. The paper therefore treats the quantizer and its learning surrogate as a pair. This perspective applies whenever training must pass through a discrete operation. The question becomes both whether the approximation supplies gradients and whether those gradients remain useful for the computation actually being optimized.

Use normalization to simplify a statistical design. An optimal quantizer ordinarily depends on the distribution of its inputs. If those distributions differ throughout a network and change during training, repeatedly estimating them can make quantizer construction expensive. Here, batch normalization makes a shared distributional approximation plausible enough to reuse one quantizer. The broader engineering lesson is that normalization can reduce the number of separate components an algorithm needs to maintain. A complicated collection of local estimation problems may become a manageable global design problem when the inputs are brought into a common statistical range.

Examine the tail, not just typical inputs. An ordinary ReLU and HWGQ can be reasonably close over common positive inputs while diverging badly for very large ones. The quantizer stops increasing; the ReLU continues. The authors connect this discrepancy to unstable learning and investigate backward functions that suppress its influence. This suggests a useful diagnostic for approximate computation: inspect where an approximation’s error can grow without bound. Average fidelity around the center of a distribution may conceal a small set of inputs that exert disproportionate influence on optimization.

Separate storage precision from arithmetic precision. A non-uniform quantizer can store an activation compactly as an index, yet its reconstruction values can require more precision when used in arithmetic. Uniform spacing permits a shared scale to be factored out, changing what can be computed with the same representation budget. This distinction is useful well beyond this particular quantizer. A compact encoding should be assessed at the point where values are consumed, because the cheapest stored representation does not necessarily produce the cheapest inner computation.

Use controlled comparisons to locate the failure. The paper does not stop at comparing a final compressed network with a full-precision reference. It separately examines continuous activations, weight binarization, activation quantization, backward approximations, and quantization levels. Those comparisons reveal that a forward design can look promising in a shallower architecture yet fail in deeper ones because of optimization instability. The reusable practice is to keep enough intermediate configurations to distinguish representation error from training failure. That makes a negative result informative and helps identify which part of a proposed method actually needs revision.

### How Mova uses it

For Mova, the small transparent language system written in Rust, HWGQ is a possible design reference rather than an established implementation feature. There is no basis for claiming that Mova already uses the quantizer, its Gaussian assumptions, or its backward approximations. The paper’s experiments concern convolutional image classification, so applying the method to language processing would require a separate investigation. Its most immediate value for Mova is the way it separates questions that are easy to conflate: compact storage, inexpensive arithmetic, accurate approximation, and stable learning.

A concrete exploratory use would begin with an operation in Mova that repeatedly combines numerical weights and intermediate values. If such an operation dominates memory use or computation, the paper suggests examining both sides of it. Reducing the precision of stored weights alone may leave most of the arithmetic unchanged when the accompanying activations remain full precision. A candidate implementation would therefore need an explicit account of how the intermediate values are represented and how the Rust computation consumes that representation. The paper’s distinction between quantization indices and reconstruction values would be especially useful in reviewing that design.

The Gaussian assumption would need evidence from Mova’s own computations. HWGQ is economical because a shared quantizer can be designed around approximately standardized input distributions. It would be premature to carry that assumption directly from image networks into a language system. A transparent experiment could inspect the relevant numerical distributions, identify whether normalization brings them into a similar range, and compare a shared quantizer with a more locally adapted alternative. This is a possible research procedure, not a claim that Mova currently has these measurements or normalization stages.

If a proposed Mova component were trained through quantized operations, the backward approximation would deserve its own evaluation. The paper offers a concrete warning against choosing a convenient gradient substitute and treating the problem as solved. A substitute that continues passing strong gradients for values whose forward outputs are already saturated can alter learning in unhelpful ways. Clipping or gradually suppressing those gradients would be candidates to compare, with the choice determined by Mova’s task and observed training behavior.

The transparency requirement also changes what would count as a satisfactory implementation. A quantized component should expose its levels, thresholds, scaling conventions, and precision exceptions clearly enough to inspect. The paper’s final configuration keeps the boundary layers at full precision, which is an example of a consequential exception that should remain visible in an implementation description. For Mova, any similar exception would belong in the explanation of the component’s actual arithmetic and memory use.

The strongest transferable lesson is methodological. Mova could borrow the paper’s habit of testing a compact representation together with the procedure that makes it usable. That would mean comparing the original computation, the quantized computation without adaptation, and any trained or adjusted version under the same relevant evaluation. It would also mean reporting measured resource use separately from theoretical savings. None of the ImageNet accuracy gaps can be transferred to Mova as an expected outcome; they motivate experiments, rather than establish benefits for language processing.

### The problem and its context

#### Why weight compression leaves work unfinished

The paper belongs to research on [efficient networks and compression](https://md.research.elamur.ai/free/en/topics/efficient-models/), where the practical goal is to make useful neural computation fit limited resources. Its introduction describes a deployment problem with two connected parts. Large networks require substantial memory for their parameters, and evaluating them requires many numerical operations. A design can improve one part without resolving the other.

The basic operation is a weighted sum followed by a nonlinear activation. A convolutional network repeats this structure across locations, channels, and layers. Even when an individual operation is simple, repetition makes its representation and arithmetic consequential. Storing weights in floating-point form contributes to memory demand, while multiplying those weights by incoming values contributes to computational cost.

The earlier compression approaches discussed by the authors attack different sources of that cost. Low-rank factorization replaces a large matrix with smaller factors. Pruning removes connections judged unimportant and then retrains the resulting network. Architectural changes reduce the amount of computation or the number of parameters by construction. Quantization restricts numerical values to a smaller collection of possibilities. These strategies share an efficiency goal, but they do not necessarily change the same operations.

Weight binarization is an especially aggressive form of quantization. Instead of storing an arbitrary value for every weight, the network uses a sign and, in the approach adopted here, a shared scale associated with a filter. The paper cites [BinaryConnect](https://md.research.elamur.ai/free/en/papers/courbariaux-2015-binaryconnect-training-deep-neural-networks/) as evidence that binary filter weights can work well on CIFAR-10. It also describes earlier ternary schemes and methods for selecting fixed-point precision across layers.

The remaining problem is the incoming activation vector. A binary weight can simplify multiplication, but the operation still interacts with a full-precision value if activations have not also been quantized. Restricting both weights and activations makes logical operations and bit counting possible. That is the computational motivation for studying activations rather than treating parameter compression as the endpoint.

Activation precision also matters during training. Back-propagation uses intermediate activations, and caching those values consumes memory. The authors therefore identify a second potential benefit beyond forward computation: smaller activation representations can reduce the storage needed for training intermediates. This is a motivation for the method, although the experimental evidence centers on classification accuracy rather than measured training-memory reductions.

#### Why activations are harder to quantize

The paper presents activation quantization as a more difficult learning problem than weight binarization. Every quantized activation layer inserts a discontinuous operation into the path through which gradients must travel. If the training algorithm simply differentiates that operation, it receives almost no useful signal.

The difficulty is easy to see with a sign function. Positive inputs map to one output, negative inputs to another. Moving the input slightly typically changes nothing about the output. A derivative therefore cannot describe a useful local direction for improving the network over most of the input range. The same issue occurs with a quantizer that has more levels: between thresholds, its response remains constant.

Earlier approaches retained the discrete function for forward evaluation and substituted a continuous function during backward computation. The paper discusses this strategy in relation to [Binarized Neural Networks](https://md.research.elamur.ai/free/en/papers/courbariaux-2016-binarized-neural-networks-training-deep/) and [XNOR-Net](https://md.research.elamur.ai/free/en/papers/rastegari-2016-xnor-net-imagenet-classification-using/). It also cites [DoReFa-Net](https://md.research.elamur.ai/free/en/papers/zhou-2016-dorefa-net-training-low-bitwidth/) among work addressing limited-precision training, including the possibility of quantizing gradients.

A substitute derivative permits learning, but it does not make the forward and backward computations identical. The backward pass describes how a continuous approximation would change, while the forward pass uses a staircase. The authors call the resulting discrepancy gradient mismatch. Their contribution is to make that discrepancy central to the design and evaluation of the activation scheme.

#### From binary signs to rectification

The paper interprets the familiar sign function and its hard-tanh backward companion as approximations to a hyperbolic tangent. This provides a way to ask whether the continuous behavior underlying the binary design is itself well chosen.

A hyperbolic tangent saturates for sufficiently large positive or negative inputs. Its slope becomes small in those regions, weakening the gradients available for learning. A ReLU behaves differently: negative inputs are suppressed, while positive inputs pass through a linear response. In the positive region, its derivative remains active instead of fading as the input grows.

The authors connect this distinction to the success of rectifiers in the deep-learning literature they review. Their question is therefore not simply whether a sign quantizer can be improved. They ask whether quantization should approximate ReLU behavior in the first place, preserving a pattern already useful in the full-precision networks under consideration.

The earlier architectures named in the paper establish the setting for that question. [AlexNet](https://md.research.elamur.ai/free/en/papers/krizhevsky-2012-imagenet-classification-deep-convolutional/) provides a prominent classification architecture used throughout the experiments. [Very Deep Convolutional Networks](https://md.research.elamur.ai/free/en/papers/simonyan-2014-very-deep-convolutional-networks-large/) and [Deep Residual Learning](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/) supply deeper families against which the authors test the method. Detection work, including [Faster R-CNN](https://md.research.elamur.ai/free/en/papers/ren-2015-faster-r-cnn-towards-real/), appears in the introduction as part of the broader motivation for efficient vision systems; object detection itself is not evaluated here.

This context matters for interpreting novelty. The paper does not introduce weight binarization, normalization, quantization by squared error, or surrogate gradients individually. It combines an activation-distribution argument with a ReLU-oriented quantizer and a study of backward approximations. The scientific claim concerns how those pieces work together when training low-precision networks.

### The method, step by step

The method separates a statistical design problem from an optimization problem. First, choose a small set of values that approximates positive, normalized inputs well. Then choose how learning signals should pass through that discrete computation. Binary weights provide the accompanying parameter representation.

Building and training HWGQ-Net The steps in order.

#### Start with the unit being approximated

The paper writes a processing unit as:

```
z = g(wᵀx)
```

Here, z is the unit’s output, w is its weight vector, x is the incoming vector, and g is the nonlinear activation function. The superscript T indicates transposition, so wᵀx is the dot product: the weighted sum entering the activation.

For convolutional filters, the paper describes the weight tensor using a channel dimension c, a spatial width w, and a spatial height h. In that notation, the scalar width w is distinct from the weight vector used in the unit equation. Together, these dimensions determine how many incoming values contribute to a filter response.

The method changes the precision of both the weights and the activation outputs. Those changes have different roles. Weight binarization reduces the values used to describe filters; activation quantization reduces the values passed between successive computations. Combining them creates the possibility of inexpensive arithmetic inside the network.

#### Approximate a filter with signs and a scale

The adopted weight representation comes from XNOR-Net:

```
W ≈ αB
```

W is the full-precision filter tensor, B is a tensor whose entries are +1 or -1, and α is a positive scaling factor. The approximation retains the pattern of signs in the filter while using the scale to represent its overall magnitude.

The corresponding convolution is expressed as:

```
I ∗ W ≈ α(I ⊕ B)
```

I is the input to the convolution, ∗ denotes ordinary convolution, and ⊕ denotes the multiplication-free convolution described for binary weights. The outer factor α rescales the result. This expression does not by itself imply that all arithmetic is binary, because I may still contain full-precision activations.

The binary tensor is selected by:

```
B* = sign(W)
```

B* denotes the chosen binary approximation, and sign acts on each entry of W. It records whether each weight is non-negative or negative.

The associated optimal scale is:

```
α* = ‖W‖₁ / (cwh)
```

α* is the selected scaling factor. The expression ‖W‖₁ denotes the sum of absolute weight values, and cwh is the number of entries determined by the filter’s channels, width, and height. The scale is therefore based on the filter’s average absolute magnitude.

These equations explain why the paper can adopt an existing weight method while focusing its contribution on activations. The binary filter representation already supplies a concrete compression mechanism. The unresolved question is how to make the incoming values equally amenable to limited-precision computation.

#### Understand the binary activation baseline

For comparison, the binary forward activation is:

```
sign(x) = { +1 if x ≥ 0; −1 otherwise }
```

Here, x is the scalar input to the activation. The function collapses all non-negative inputs onto +1 and all negative inputs onto -1.

Learning a network requires gradients of its cost. For the unit introduced above, the paper uses the chain rule:

```
∂C/∂w = (∂C/∂z) g′(wᵀx) x
```

C is the training cost, ∂C/∂w is its gradient with respect to the weight vector, and ∂C/∂z is the learning signal arriving from later computation. The term g′ is the derivative of the activation, evaluated at the weighted sum. Multiplication by x completes the gradient for the weights.

If g is the sign function, the middle term vanishes almost everywhere. The problem is therefore not that the network lacks a cost or a backward procedure. The activation derivative blocks the signal that the procedure needs.

The hard-tanh surrogate uses this derivative instead:

```
sigñ′(x) = { 1 if |x| ≤ 1; 0 otherwise }
```

sigñ′ denotes the derivative used in the backward pass, and |x| is the absolute value of x. The backward computation passes a gradient through a central interval and suppresses it outside that interval.

The paper relates this forward-and-backward pair to:

```
g(x) = tanh(x) = (eˣ − e⁻ˣ) / (eˣ + e⁻ˣ)
```

tanh is the hyperbolic tangent, and e is the base of the exponential function. The expression shows the smooth, saturating activation that the authors use to interpret the binary design.

Their objection has two parts. The underlying continuous behavior is saturating, and the forward and backward approximations differ. Replacing the underlying activation with a ReLU addresses the first issue, but the second still needs explicit attention.

#### Define the continuous target

The target activation is:

```
g(x) = max(0, x)
```

g is now a ReLU, x is its scalar input, and max selects the larger argument. Nonpositive inputs yield zero, while positive inputs retain their value.

HWGQ preserves this division of the input range. It assigns zero to the negative side and quantizes the positive side. Its name reflects both features: “half-wave” refers to suppressing the negative part, and “Gaussian” identifies the distribution used to design the positive quantization levels.

The paper introduces a general scalar quantizer as:

```
Q(x) = qᵢ when x ∈ (tᵢ, tᵢ₊₁]
```

Q is the quantization function, qᵢ is the reconstruction value for interval i, and tᵢ and tᵢ₊₁ are that interval’s lower and upper thresholds. The notation excludes the lower endpoint and includes the upper endpoint.

In the general definition, i ranges over the available levels. The outer intervals extend to negative and positive infinity. This partitions the input range into regions that each produce a constant output.

A uniform quantizer adds the constraint:

```
qᵢ₊₁ − qᵢ = Δ
```

Δ is a constant spacing between neighboring reconstruction values. Uniformity therefore concerns the levels’ spacing, rather than simply the number of levels.

That distinction affects computation. With a non-uniform quantizer, storing an index identifies a reconstruction value, but arithmetic may need to recover a value with greater precision. A uniform quantizer permits a common scale to be separated from the encoded values, which can simplify arithmetic as well as storage.

The paper expresses the storage requirement for m indexed levels as:

```
bits per activation = log₂(m)
```

m is the number of reconstruction levels, and log₂ is the base-two logarithm. This expression describes the index representation. It does not establish that a non-uniform reconstruction value can be used in arithmetic at the same precision.

#### Choose levels by approximation error

The quantizer is designed to minimize expected squared reconstruction error:

```
Q* = argmin_Q Eₓ[(Q(x) − x)²]
```

Q* is the selected quantizer, argmin identifies the choice of Q that minimizes the objective, and Eₓ denotes expectation over the distribution of x. The squared term measures how far the reconstructed value is from the original input.

The same objective can be written using a density:

```
Q* = argmin_Q ∫ p(x)(Q(x) − x)² dx
```

p(x) is the probability density of x, and the integral averages the squared error over possible inputs. This version makes the statistical dependence explicit: a good quantizer depends on which inputs are common.

The paper uses Lloyd’s algorithm to obtain quantization parameters from samples. It describes the procedure as related to k-means. The important practical issue is that it is iterative. Repeating it for every unit, while the distribution changes throughout training, would be an unattractive design.

A uniform version can be obtained by retaining the equal-spacing constraint during optimization. The unconstrained squared-error solution will generally be non-uniform. The authors investigate both because approximation quality and arithmetic convenience do not necessarily favor the same choice.

#### Make one quantizer reusable

The authors’ simplification begins with the distributions of the weighted sums entering activations. They describe these as approximately symmetric and Gaussian-like, drawing on earlier work and their own illustrated distributions.

A half-wave Gaussian quantizer has the form:

```
Q(x) = { qᵢ if x ∈ (tᵢ, tᵢ₊₁]; 0 if x ≤ 0 }
```

The positive reconstruction values qᵢ approximate positive inputs. The thresholds tᵢ define their intervals, with the positive range beginning at zero and the final interval extending to infinity. Nonpositive inputs are mapped to zero, matching the ReLU’s negative-side behavior.

A Gaussian assumption alone would not provide a universal quantizer, because different means and variances would still require different parameters. Batch normalization supplies the additional step. Applied before quantization, it brings the weighted sums towards zero mean and unit variance.

The paper illustrates distributions from different AlexNet layers using 100 randomly selected images. The authors do not claim perfect Gaussianity. Their argument is that the normalized distributions are similar enough for approximately shared optimal parameters across units, layers, and training iterations.

This converts a repeated fitting problem into an offline construction. The implementation draws 10^6 samples from a standard Gaussian distribution and applies Lloyd’s algorithm to those samples. The resulting thresholds and reconstruction levels define the shared HWGQ used after normalization.

“Requires no learning,” in this context, concerns the activation quantizer’s parameters. The network itself is still trained. The saving is that its quantization levels are not repeatedly estimated as separate learned components throughout the architecture.

The distinction also clarifies the status of optimality. The levels optimize a squared-error objective under a distributional approximation. That does not make them globally optimal for classification accuracy, and it does not solve the problem of training through the resulting staircase. The backward approximation remains a separate design decision.

#### Try the ordinary ReLU backward pass

The first backward choice uses the ordinary ReLU derivative:

```
Q̃′(x) = { 1 if x > 0; 0 otherwise }
```

Q̃′ is the derivative substituted during back-propagation. It passes the arriving gradient unchanged for positive inputs and suppresses it elsewhere.

This is an exact derivative for the continuous target activation, but the forward computation uses Q instead of the ReLU. As a result, an exact derivative of the target is still a surrogate for the implemented computation.

The discrepancy is especially visible in the final positive interval. Every sufficiently large input produces the same largest reconstruction value qₘ, while the ReLU would continue increasing with x. The paper expresses the forward approximation error on positive inputs as:

```
error(x) = |Q(x) − x|
```

error(x) is the absolute difference between the quantized output and the original positive value. The vertical bars denote absolute value.

For the finite intervals, the paper gives an upper-bound expression involving the next threshold:

```
error(x) ≤ tᵢ₊₁ − qᵢ
```

tᵢ₊₁ is the upper threshold of the interval and qᵢ is its reconstruction level. The tail interval has no finite upper threshold, so the same reasoning does not provide a bounded tail discrepancy.

The authors interpret large positive inputs as outliers relative to the quantizer’s statistical design. Their response follows a robust-estimation intuition: reduce the influence of observations whose mismatch can otherwise keep growing.

#### Clip the backward activation

The clipped alternative is:

```
Q̃c(x) = { qₘ if x > qₘ; x if 0 < x ≤ qₘ; 0 otherwise }
```

Q̃c is the clipped backward approximation, and qₘ is the largest positive reconstruction value of the forward quantizer. Up to that value, the function behaves like a ReLU. Beyond it, the function remains constant.

During back-propagation, this means that positive inputs within the unclipped interval can transmit gradients, while inputs above the clipping boundary do not. The backward function therefore stops implying continued growth far into a region where the forward quantizer is already saturated.

This does not make the two functions equal everywhere. The forward computation still has discrete steps in the positive range, whereas the backward function is continuous there. Clipping specifically addresses the tail behavior that the ordinary ReLU leaves uncontrolled.

The cost is lost learning signal beyond the boundary. The authors therefore investigate another function that reduces, rather than immediately removes, the influence of large inputs.

#### Suppress the tail gradually

The log-tailed approximation is:

```
Q̃l(x) = { qₘ + log(x − τ) if x > qₘ; x if 0 < x ≤ qₘ; 0 if x ≤ 0 }
```

Q̃l is the log-tailed backward function. It retains the ReLU response through qₘ and uses logarithmic growth above that boundary. The parameter τ positions the logarithmic section.

The paper sets that parameter as:

```
τ = qₘ − 1
```

τ is therefore determined by the largest reconstruction value. This choice joins the tail to the central linear portion at the intended boundary.

Its derivative is:

```
Q̃l′(x) = { 1/(x − τ) if x > qₘ; 1 if 0 < x ≤ qₘ; 0 if x ≤ 0 }
```

Q̃l′ is the gradient multiplier used in back-propagation. On the tail, the reciprocal term decreases as x grows. The function consequently gives large inputs progressively less influence while continuing to pass some signal.

The clipped and log-tailed versions embody different compromises. Clipping aligns the far-tail behavior more directly with saturation. The logarithmic alternative retains information about tail inputs at the cost of a continuing forward-backward discrepancy. Their relative value is determined experimentally.

#### Train the resulting network

The implementation uses [Caffe](https://md.research.elamur.ai/free/en/papers/jia-2014-caffe-convolutional-architecture-fast-feature/), and the authors identify an official HWGQ source-code release. All evaluated networks are trained from scratch with stochastic gradient descent. Batch normalization precedes every quantization layer.

For binarized weights, the implementation omits a bias term. Networks with quantized activations place max-pooling before batch normalization, a change the paper calls layer re-ordering. The first and final layers retain full precision, following the comparison methods.

The regularization settings also depend on the precision configuration. Binary-weight networks with full-precision activations use a dropout ratio of 0.1. Networks with quantized activations use no dropout, regardless of weight precision. The paper motivates the reduced dropout by the regularizing effect of weight binarization. The earlier [dropout work](https://md.research.elamur.ai/free/en/papers/hinton-2012-improving-neural-networks-preventing-co/) supplies the background for this training component.

The final configuration combines binary weights, a uniform HWGQ forward function, and the clipped ReLU backward function. Earlier experiments deliberately use other combinations to establish why those final choices were made.

### Experiments and results

#### Tasks, metrics, and image processing

The main evaluation uses [ImageNet](https://md.research.elamur.ai/free/en/papers/russakovsky-2014-imagenet-large-scale-visual-recognition/), specifically ILSVRC2012. The paper describes approximately 1.2M training images, 1K categories, and 50K validation images. It reports top-1 and top-5 classification accuracy.

Top-1 accuracy checks whether the highest-ranked category is correct. Top-5 accuracy checks whether the correct category occurs among the highest-ranked alternatives allowed by that metric. These measures assess recognition quality; they do not directly measure latency, memory traffic, or energy use.

Training images are resized to 256×256. A random crop is then selected from the image or its horizontal reflection. The crop is 224×224 for the general setup and 227×227 for AlexNet. The ImageNet training procedure uses flipping and cropping without additional augmentation. Evaluation uses a central 224×224 crop.

This is a deliberately specified evaluation regime. The results concern networks learned and evaluated under those preprocessing choices. They should not be interpreted as measurements over arbitrary image transformations or a broad robustness benchmark.

The main architecture families are AlexNet, ResNet, VGG-Variant, and GoogLeNet. The ablations focus on AlexNet, ResNet-18, and VGG-Variant. The wider final comparison adds deeper residual configurations and GoogLeNet to test whether the same quantization approach remains useful beyond the initial diagnostic experiments.

#### Architecture and training settings

AlexNet uses a mini-batch size of 256, weight decay of 0.0005, and an initial learning rate of 0.01. The ResNet settings follow the cited residual-network work, while the paper supplies shared schedule details for its experiments.

VGG-Variant is a smaller adaptation of the referenced architecture. It uses 3 convolutional layers at input sizes of 56, 28, and 14, and removes the spatial-pyramid-pooling layer identified as “spp.” Its mini-batch size is 128, with an initial learning rate of 0.01. This is an important naming distinction: the reported VGG-Variant experiments concern that adaptation, rather than every configuration associated with the VGG family.

The GoogLeNet implementation also changes the referenced architecture. Side-loss branches are removed. Within inception layers, max-pooling is removed, and the “reduce” 1×1 convolutions use the channel counts of their following 3×3 and 5×5 convolutions. Weight decay is 0.0002, and the learning strategy follows the ResNet-style setup described by the authors.

Across the tested networks, momentum is 0.9 and batch normalization is used. With mini-batches of 256, the learning rate is divided by 10 at intervals of 50K iterations, for 160K iterations overall. With mini-batches of 128, the corresponding schedule uses 100K intervals and 320K iterations overall.

The final HWGQ-Net comparisons modify that schedule. Training runs for twice as many iterations as in the earlier experiments, and polynomial learning-rate annealing uses power 1. The authors report a slight improvement from that schedule relative to step-wise annealing.

These details constrain how the final results should be read. The final system includes the selected quantizer and backward function together with an extended training procedure. Its reported accuracy is the outcome of that complete configuration.

#### How close the final system gets on ImageNet

The final ImageNet system uses 1-bit binary weights and a 2-bit uniform activation quantizer, with clipped ReLU for the backward approximation. Precision exceptions remain at the first and last layers.

Across the architecture comparison, the paper describes top-1 accuracy drops in the range 5∼9 points relative to full precision. This supports the claim that the same low-precision procedure can be applied across several network families. It also establishes that the approximation has a visible recognition cost.

The comparison with earlier low-precision methods is especially informative when expressed as each system’s signed gap from its corresponding full-precision reference. A less negative value means that more of the reference accuracy is retained.

AlexNet on ImageNet validation, signed top-1 accuracy gap HWGQ-Net has the smallest reported gap from its corresponding full-precision reference.

**The numbers**

| System or setting | top-1 accuracy gap in points |
| --- | --- |
| XNOR-Net | -12.4 |
| DoReFa-Net | -8.2 |
| HWGQ-Net (this paper) | -5.8 |

The DoReFa-Net configuration in this comparison uses binary weights, 2-bit activations, full-precision gradients, and no pretraining. That description matters because a method’s name alone does not identify its precision budget or training conditions.

The AlexNet result supports the paper’s argument that low-bit activations can be trained more effectively than with the earlier alternatives considered. However, the signed gaps refer to corresponding references, so they should be understood as retention of each reference’s accuracy. They are not a substitute for a controlled comparison of every implementation choice.

ResNet-18 on ImageNet validation, signed top-1 accuracy gap HWGQ-Net retains more of its full-precision reference accuracy than XNOR-Net.

**The numbers**

| System or setting | top-1 accuracy gap in points |
| --- | --- |
| XNOR-Net | -18.1 |
| HWGQ-Net (this paper) | -7.7 |

The ResNet-18 comparison is important because the earlier ablations show that a naive ReLU backward approximation can behave poorly in deeper networks. The final result therefore reflects more than selecting a different forward activation alphabet. It follows the experiments that identify and reduce training instability.

The paper does not report a DoReFa-Net result for ResNet-18 in this comparison. Its claim against that method is consequently supported by AlexNet, while the residual-network comparison is with XNOR-Net.

#### What the wider architecture evaluation establishes

The final experiments include GoogLeNet, ResNet-34, and ResNet-50 in addition to the architectures explored earlier. The authors interpret the broadly similar full-to-low-precision gaps as evidence that HWGQ-Net is not limited to a single network structure.

That is a useful breadth result. A procedure that only works after extensive architecture-specific redesign would provide weaker evidence for a general quantization strategy. Here, the same basic forward quantizer and clipped backward function remain the organizing components across the evaluated families.

The architecture-specific implementation changes still matter. GoogLeNet and VGG-Variant are adapted configurations, and the paper’s own residual implementations do not match the external reference performance. The authors suggest that fewer iterations and the absence of further augmentation explain their weaker ResNet results.

The experiments therefore support portability across the tested configurations under the stated training regime. They do not establish that quantization quality is independent of all architectural choices, nor that the reported precision gap will remain constant for any future architecture.

#### Additional evidence from CIFAR-10

The paper also evaluates VGG-Small on CIFAR-10. This network resembles the structure used in the cited binary-network work, but it uses cross-entropy loss and omits two fully connected layers.

Its training follows the VGG-Variant strategy with task-specific changes. The mini-batch size is 100. The learning rate is divided by 10 after each 40K iterations, and training runs for 100K iterations. Data augmentation follows the cited residual-network procedure, and the low-precision network uses polynomial learning-rate decay.

The authors report that low-precision VGG-Small loses 0.67 points relative to its full-precision counterpart. They also describe it as outperforming several earlier full-precision and low-precision systems in their comparison.

The matched VGG-Small comparison is the clearest evidence for the effect of precision in that experiment, because it relates the low-precision network to its own full-precision counterpart. Comparisons with differently structured systems provide broader context but combine architecture and precision differences.

CIFAR-10 extends the empirical setting beyond ImageNet, yet it does not erase the larger ImageNet gaps. Together, the tasks show that the cost of low precision depends on the evaluation setting and architecture. The paper’s own results therefore favor task-specific measurement over a universal claim about negligible accuracy loss.

### What the ablations show

#### The continuous activation matters before quantization

The first diagnostic comparison removes activation quantization entirely. AlexNet is trained with hard tanh or ReLU under matching settings, using either full-precision or binary weights.

This comparison isolates the continuous activation from the discontinuities introduced later. Because the forward and backward activation functions agree in this setting, gradient mismatch from activation quantization is absent.

ReLU performs substantially better in both weight configurations. The result supports the decision to approximate rectification rather than retain a binary design whose continuous companion is hard tanh.

The authors describe these continuous results as indicating the performance ceiling associated with the activation choice. A careful interpretation is that they establish a stronger starting point for ReLU under the tested procedure. They do not constitute a mathematical upper bound on every possible quantized training method.

This distinction matters because quantization also changes regularization and optimization. The experiment is strongest as evidence about a design direction: when the continuous parent already performs poorly, its discrete approximation begins from an unfavorable position.

#### Weight and activation precision affect different difficulties

The next comparison changes weight precision and activation precision separately before combining them. This shows whether the main accuracy loss enters through the filters, the intermediate values, or their interaction.

The paper reports a relatively small degradation from weight binarization and a more substantial loss from activation quantization. The proposed explanation follows the gradient path: activation-quantized training must propagate learning signals through discontinuous functions throughout the network.

When both restrictions are applied, recognition deteriorates further. On AlexNet, HWGQ with an ordinary ReLU backward pass performs better than sign activations with hard tanh backward computation. Its training error is also lower, supporting the claim that the ReLU-oriented scheme is easier to fit in that setting.

The deeper configurations reveal the limitation of that initial success. For ResNet-18 and VGG-Variant, HWGQ with the ordinary ReLU backward function performs worse than the sign-based alternative. A favorable forward approximation is therefore insufficient by itself.

There is also a procedural complication in reading these comparisons. Layer re-ordering changes the baseline behavior, and the paper explicitly notes its effect on AlexNet. This is a reminder that a label such as “binary weights only” does not identify every relevant implementation detail.

#### The backward tail is a consequential design choice

The strongest controlled comparison keeps binary weights and the HWGQ forward function fixed while varying the backward approximation. This directly tests the paper’s central diagnosis.

The ordinary ReLU allows gradients to remain active for arbitrarily large positive inputs even after the forward quantizer has saturated. Its training curves show instability, with the problem more pronounced in the deeper architectures.

Both clipping and logarithmic tail growth make training more stable and lead to better outcomes. The evidence therefore supports the claim that managing the backward tail helps, rather than merely showing that another forward quantizer is preferable.

The alternatives do not have a universal ranking across the tested networks. Log-tailed ReLU performs slightly better on AlexNet, while clipped ReLU performs slightly better on ResNet-18 and VGG-Variant. The authors choose clipping for subsequent experiments to keep the remaining comparisons consistent.

That pattern supports a restrained conclusion. The broad principle is to control the influence of large positive inputs. The experiments do not prove that a single detailed suppression function is best for every architecture or precision budget.

#### Training with quantization differs from adding it afterward

The “no-opt” comparison takes networks trained with binary weights and full-precision activations, then quantizes their activations without optimizing them through the discrete computation.

The authors recompute means and variances in the batch-normalization layers to reduce the accumulation of errors. This is a meaningful adjustment: quantization can change the statistics seen by subsequent layers, so retaining the original normalization statistics would introduce an additional source of mismatch.

Even after that correction, the post-training quantized networks have substantially worse accuracy than their full-precision-activation counterparts. Training activation-quantized networks from scratch provides substantial improvements.

This comparison supports the importance of adaptation under the actual quantized computation. It does not show that every possible post-training quantization procedure must fail. The tested alternative is the paper’s particular “no-opt” procedure, including its normalization-statistic correction.

The result also helps explain why the backward function deserves so much attention. If training through quantization improves the outcome, the surrogate used to make that training possible becomes part of the method instead of an incidental implementation detail.

#### More levels help, but the representation budget matters

The bit-width study uses binary weights and varies activation quantization. Increasing the number of levels improves performance, with diminishing benefit.

The default non-uniform configuration contains two positive reconstruction levels and zero. The table labels this configuration “2,” so the label refers to the positive-level count rather than a direct statement of total reconstruction values or arithmetic precision.

For AlexNet, the authors report that seven non-uniform levels recover the performance associated with full-precision activations. ResNet-18 retains a more noticeable gap under low-bit activation settings.

The paper reports that configuration “3” improves over “2” by 3.1 points for ResNet-18 and by 2.1 points for AlexNet. These stated comparisons show that the benefit from additional activation levels depends on the architecture.

Uniform quantization is slightly worse when compared at the same number of levels. At the same arithmetic bit width, however, the uniform alternative is better in the comparison between “2” and “3*,” both requiring a 2-bit arithmetic representation.

This is a particularly useful ablation because it changes the basis of comparison. Counting reconstruction levels answers a statistical approximation question. Matching the representation used by the arithmetic answers an implementation question. The paper’s final uniform configuration reflects the latter consideration as well as the former.

### Limitations

#### Limits the authors acknowledge

The statistical foundation is approximate. The authors explicitly describe the normalized activation-input distributions as close to Gaussian, with remaining differences across layers and units. Batch normalization standardizes important moments, but the observed distributions are not claimed to be identical.

The final low-precision networks retain an accuracy gap. The paper presents the reduced gap as an improvement over previous approaches, not as evidence that precision can be removed without consequence. Its ImageNet results still show meaningful losses relative to full precision.

The authors also acknowledge weaker residual-network implementations than the external references. They suggest that shorter training and restricted augmentation are responsible. This qualifies comparisons involving those references and shows that optimization settings affect the measured gap.

Clipped ReLU has a stated tradeoff: removing tail gradients can discard information. The log-tailed alternative is introduced specifically to preserve some signal in that region. The selected final backward function therefore resolves instability through a compromise rather than eliminating every source of approximation error.

The paper’s computational benefits are presented theoretically. The roughly 32× estimates concern memory and convolutional computation under the cited accounting. They should not be read as measured end-to-end speedups on a particular device.

#### Limits visible in the experimental setup

The experiments establish image-classification performance. Although the introduction motivates efficient vision more broadly and cites detection systems, the evaluation does not establish object-detection accuracy. It also provides no direct evidence for language processing, which is why any application to Mova remains prospective.

The first and last layers stay full precision. Describing HWGQ-Net only by its low-bit interior would conceal an important part of the actual network. These exceptions matter for storage, arithmetic, and the interpretation of a fully quantized deployment claim.

The quantizer minimizes squared reconstruction error under a Gaussian assumption. Classification accuracy is a different objective. The method’s success shows that this statistical design can be useful in the tested training procedure; it does not show that minimum reconstruction error always produces the best task result.

Batch normalization aligns mean and variance without proving Gaussian shape. A shared quantizer is therefore an empirical simplification whose adequacy depends on the distributions encountered. The AlexNet illustrations support the simplification, but they do not provide a comprehensive characterization of every unit throughout training.

The backward-approximation experiments support the importance of tail control, yet they do not directly quantify every proposed causal step. Training curves and final recognition results connect clipping or suppression with improved stability. They do not establish that tail mismatch is the sole cause of all observed optimization problems.

Several practical details accompany the final method: normalization, pooling order, dropout choices, architecture adaptations, and an extended learning schedule. The ablations isolate important components, but the final cross-method comparison still concerns complete training systems. Attributing every advantage exclusively to the forward quantizer would overstate what those comparisons separate.

The reported evaluation also gives no direct measurement of actual inference latency, energy consumption, or peak training memory. Logical operations may be cheaper in principle, while a full implementation must also handle normalization, scaling, data movement, and precision exceptions. The paper motivates that implementation opportunity without measuring its complete deployment outcome.

Finally, the generalization claim is bounded by the tested architecture families and tasks. Similar accuracy gaps across the evaluated networks make the method more credible than a single successful example would. They do not guarantee the same behavior for any later architecture, different activation distribution, or new numerical pipeline.

### What came after

The later citation record includes [Efficient Processing of Deep Neural Networks: A Tutorial and Survey](https://md.research.elamur.ai/free/en/papers/sze-2017-efficient-processing-deep-neural-networks/), dated 2017. Its title places it in the broader effort to explain efficient neural computation. HWGQ contributes a relevant example to that subject: reducing parameter precision is only part of the problem, because intermediate activations determine whether the main arithmetic can also become inexpensive.

The available citation information does not identify which parts of HWGQ the survey discusses or endorses. It would therefore be too strong to claim that the survey adopts this quantizer, validates its speed estimates, or recommends its backward approximation over alternatives. The supported connection is that the survey cites the work within the literature on efficient processing.

A later citation appears in [FrugalGPT](https://md.research.elamur.ai/free/en/papers/chen-2023-frugalgpt-use-large-language-models/), dated 2023. Its title identifies cost reduction and improved performance as its concern. That places it alongside HWGQ at the level of a broad engineering objective: using computation economically while retaining useful results.

The citation alone does not show that FrugalGPT uses half-wave quantization, binary weights, Gaussian activation statistics, or clipped backward functions. Those would be specific methodological claims requiring evidence beyond the citation relationship. The connection can be stated without importing an implementation lineage that has not been established.

Taken together, these later citations show that HWGQ remained part of the discussion around efficient neural computation across different contexts. The paper’s most reusable contribution is the relationship it makes explicit between representation and learning. A small numerical alphabet is useful only when the surrounding computation can exploit it and the training procedure can reliably adapt to it.

The experiments give that relationship a concrete form. A distribution-aware forward quantizer reduces activation precision; normalization makes its parameters reusable; a tail-controlled backward function makes learning more stable. Later efficiency work can engage with any of those ideas, but direct adoption should be distinguished from a shared motivation or a bibliographic citation.

## Cite

Cite as Zhaowei Cai, Xiaodong He, Jian Sun and Nuno M. Vasconcelos. 2017. Deep Learning with Low Precision by Half-Wave Gaussian Quantization. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1109/cvpr.2017.574](https://doi.org/10.1109/cvpr.2017.574) · [arXiv 1702.00953](https://arxiv.org/abs/1702.00953)

```bibtex
@inproceedings{cai2017deep,
  title = {{Deep Learning with Low Precision by Half-Wave Gaussian Quantization}},
  author = {Zhaowei Cai, Xiaodong He, Jian Sun and Nuno M. Vasconcelos},
  booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
  year = {2017},
  doi = {10.1109/cvpr.2017.574},
  eprint = {1702.00953},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/cvpr.2017.574}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
