---
title: "Ternary neural networks for resource-efficient AI applications"
description: "Ternary neural networks replace floating-point inference with discrete arithmetic through teacher–student training and purpose-built hardware."
canonical: "https://research.elamur.ai/free/en/papers/alemdar-2017-ternary-neural-networks-resource-efficient/"
---
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/alemdar-2017-ternary-neural-networks-resource-efficient/)

[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/) / Ternary neural networks for resource-efficient AI applications

# Ternary neural networks for resource-efficient AI applications

Paper · 2017 · Hande Ozgur Alemdar, Vincent Leroy, Adrien Prost-Boucle et al.

**Authors:** Hande Ozgur Alemdar, Vincent Leroy, Adrien Prost-Boucle and Frédéric Pétrot · **Year:** 2017 · **Venue:** arXiv:1609.00222 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**229** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2513302235) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1109/ijcnn.2017.7966166](https://doi.org/10.1109/ijcnn.2017.7966166)
- [arXiv 1609.00222](https://arxiv.org/abs/1609.00222)
- [OpenAlex](https://openalex.org/W2513302235)

## Deep dive: Ternary neural networks for resource-efficient AI applications

Ternary neural networks replace floating-point inference with discrete arithmetic through teacher–student training and purpose-built hardware. · about 33 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

A neural network can classify an image accurately and still be impractical for the device that needs to run it. Storing its weights requires memory, and repeatedly multiplying numerical values consumes computation and energy. These costs matter on phones, wearables, drones, and other devices with limited resources. This paper investigates a particularly strict form of [resource-efficient neural computation](https://md.research.elamur.ai/free/en/topics/efficient-models/): a deployed network whose weights and neuron outputs are restricted to −1, 0, and 1. The aim is to retain useful classification accuracy while replacing floating-point arithmetic and multiplication with much simpler operations.

The authors call the resulting systems ternary neural networks, or TNNs. They obtain them through a teacher–student procedure. A teacher first learns the classification task using conventional training methods, but its neurons emit stochastic ternary outputs. A student with the same architecture then learns to reproduce those neurons using ternary weights and deterministic thresholds. Conversion proceeds through the network layer by layer. Each student neuron receives its own weight thresholds and output thresholds, allowing different neurons to retain different amounts of connectivity. The zero value is important: it gives the conversion procedure a way to remove weak connections rather than forcing every connection to remain positive or negative.

The evaluation covers handwritten digits, small color images, street-number images, and traffic signs, using fully connected networks and convolutional networks. The paper reports an MNIST test error of 1.67% for a fully connected TNN and a CIFAR10 error of 12.11%. Its strongest classification result is on GTSRB, where the larger convolutional TNN reaches 0.98% error, compared with the cited human error of 1.16%. The results are uneven across tasks: TNN does not outperform TrueNorth on CIFAR100, and approaches retaining some real-valued computation can achieve better classification accuracy. The contribution is therefore a tradeoff between accuracy and a more restrictive, cheaper inference process.

The hardware is as important as the training method. The authors implement a dedicated architecture for FPGA and ASIC technologies, using compact integer arithmetic and threshold comparisons. Against TrueNorth, they report ASIC improvements ranging from 147× to 635× in area efficiency, 1.4× to 3.1× in energy efficiency, and 2.1× to 2.7× in throughput. These are comparisons between complete implementations, with different network architectures and operating conditions, rather than an isolated measurement of ternary arithmetic. Taken together, the experiments show that fully discrete networks can support competitive image classification and efficient specialized hardware. They do not establish that ternary computation is preferable for every task, architecture, or deployment environment.

### Ideas worth borrowing

Separate learning capacity from deployment arithmetic. The teacher can use training techniques that would be awkward to reproduce directly in a tiny inference engine. The student absorbs the resulting behavior into discrete weights and thresholds. This separation is useful whenever the environment used for training has more resources than the deployment device. It encourages an engineer to ask which computations are necessary for learning and which must actually remain in the final executable system.

Match internal behavior, not just final decisions. Each student neuron learns from its corresponding teacher neuron. That gives the conversion procedure a local target instead of asking a whole discrete network to recover the task from final labels alone. The output layer is treated separately because its ultimate responsibility is classification. More generally, intermediate behavior can provide supervision when replacing a complicated component with a cheaper approximation, provided that the correspondence between components is clear.

Treat zero as a computational choice. A ternary representation can preserve a positive contribution, preserve a negative contribution, or remove the contribution. This makes quantization and pruning parts of the same decision. The useful idea extends beyond neural weights: a compact representation can benefit from an explicit inactive state when some contributions are small enough to omit. The paper also shows why this must be considered alongside execution, since storing zeros does not automatically mean that hardware skips every operation involving them.

Choose sparsity locally. The weight thresholds belong to individual neurons instead of being controlled completely by a network-wide sparsity setting. This lets different neurons keep different subsets of their inputs. Such local adaptation is attractive when components vary in their sensitivity to approximation. The MNIST comparison also supplies a warning: extra local flexibility does not guarantee better generalization, and a shared constraint can sometimes provide useful regularization.

Use cheap search with selective verification. The authors replace exhaustive threshold search with a faster search and reserve exhaustive evaluation for neurons whose scores suggest a poor result. This is a reusable engineering pattern when an approximate optimizer works well on most cases but occasionally misses a better solution. Its value depends on having a diagnostic score that can identify the difficult cases; the paper studies that condition rather than assuming the approximate search always succeeds.

Design the representation and execution engine together. Restricting values to a small alphabet matters because the hardware can exploit the restriction throughout its memories, arithmetic units, and activation logic. The paper does not stop at producing a smaller weight file. It follows the representation into a concrete implementation. The broader lesson is to evaluate compression through the operations and data movement required at deployment, while distinguishing representational savings from savings that the execution engine actually realizes.

### How Mova uses it

For Mova, the small transparent language system written in Rust, this paper offers a possible design direction rather than evidence of an existing implementation. Nothing in the paper establishes that Mova contains a TNN, and its experiments concern image classification rather than language processing. The connection is therefore architectural: a system that values explicit computation and modest resource use could explore learned components whose stored values and decision rules remain compact and inspectable.

A plausible application would be a bounded classification component inside Mova. If such a component could be expressed as a neural network, a richer teacher could first learn the task, after which a ternary student could be evaluated as a deployment alternative. The paper supports investigating that conversion strategy. It does not support assuming that the image-classification results will carry over to linguistic decisions, or that any existing part of Mova would improve merely by becoming ternary.

The teacher–student division is particularly relevant to a system that wants a simple runtime. Training can involve real-valued parameters, stochastic behavior, and optimization machinery, while the deployed student uses discrete weights and threshold decisions. In a Rust implementation, the conceptual attraction would be a clear boundary between an offline learning process and a smaller inference component. Whether that boundary produces useful savings would need measurement in Mova’s own execution environment.

There is also a concrete transparency benefit worth testing. A converted neuron is described by which inputs contribute positively, which contribute negatively, which are ignored, and where its output thresholds lie. Those choices can be exposed directly for inspection. That is a narrower claim than saying the resulting network explains a linguistic decision: a readable parameter representation does not, by itself, reveal why a classification is correct. Still, it can make the arithmetic and the conversion decisions easier to audit.

The paper’s local imitation scores could become useful diagnostic artifacts. A Mova experiment could retain the conversion score for each neuron and examine components that require exhaustive search or lose agreement with their teacher. This would make approximation errors visible instead of hiding them behind a single final accuracy figure. Such an experiment would also need task-level evaluation, because successful imitation of intermediate behavior is not equivalent to successful language processing.

The hardware results should remain separate from that software proposal. The authors build dedicated circuits; they do not benchmark an ordinary Rust program. Compact integer operations in software might be useful, but the reported ASIC energy and area improvements cannot be assigned to Mova without a corresponding implementation and comparison. The practical borrowing is a disciplined experiment: identify a suitable learned component, train a teacher, convert it, inspect the resulting decisions, and measure accuracy, storage, and execution cost in the actual system.

### The problem and its context

#### Why inference cost becomes a deployment problem

The paper begins from a distinction between where a network learns and where it is used. Training can take place on powerful servers with GPU support. Classification may happen somewhere much more constrained. A device can therefore inherit a network whose learned behavior is valuable but whose memory requirements and arithmetic are poorly matched to the available hardware.

The authors describe growth along several connected dimensions: more layers, more weights, and more computation. A large collection of synaptic weights must be stored and accessed. Floating-point multiplications must be performed as inputs move through the network. Reducing either burden can help, but an approach that addresses only one may leave the other as a substantial cost.

Their objective is high classification throughput on low-power devices, with a tolerable loss of accuracy. Throughput means the rate at which classifications can be completed. It differs from latency, which concerns how long an individual classification takes. A pipeline can improve throughput by processing different inputs at different stages simultaneously, even though each input still passes through the full sequence.

This framing places the work within [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/), but its central question is not simply how to obtain the most accurate classifier. It asks what kind of classifier can be implemented efficiently when storage, power, and circuit area matter alongside predictive performance.

The introduction mentions successful deep-network applications in vision, speech, and [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/). The experiments in this paper, however, remain within image classification. Those broader applications motivate the deployment problem; they are not additional domains in which the proposed TNN training procedure is evaluated.

#### Compression while retaining numerical precision

The authors distinguish an approach that preserves floating-point computation while compressing the network. In their account, Deep Compression combines techniques including pruning and weight sharing. Pruning removes connections judged relatively unimportant. Weight sharing reduces the variety of values that must be stored.

These techniques can reduce memory use and energy consumption while preserving classification accuracy. Their limitation, as framed by this paper, is that floating-point operations remain. A network may become smaller and sparser without becoming fully discrete.

EIE, the Efficient Inference Engine, is important in this context because it connects compression to specialized execution. The paper describes EIE as exploiting quantization and sparsity, including the ability to avoid computations that would not contribute useful results. At the time covered by the authors’ discussion, its supported computation is limited to fully connected layers.

TNN takes a different route. Rather than retaining general numerical weights and making their storage more economical, it restricts the values allowed in the deployed network. The intended benefit reaches into the arithmetic unit itself. The comparison with EIE later in the paper therefore concerns different combinations of representation, sparsity handling, and circuit design.

#### Reducing precision without making everything discrete

A second research direction lowers numerical precision. BinaryConnect restricts weights while leaving inputs and activations real-valued. TernaryConnect and Ternary Weight Networks use ternary weights in a similar general setting. These methods show why the word “ternary” alone is insufficient to describe the computational demands of a complete network.

If weights are discrete but activations remain real-valued, the execution process still differs from an entirely discrete network. The paper’s objective requires following the representation through inputs, weights, neuron outputs, and any remaining scaling or normalization operations. A low-precision weight matrix does not by itself establish multiplication-free inference.

The authors describe Binarized Neural Networks as extending discretization to activations and using shift-based operations to improve efficiency. They nevertheless classify the approach, as discussed in their comparison, as retaining operations beyond the fully discrete regime sought by TNN. This is the paper’s account of the related method, instead of a universal statement about every possible implementation of binary networks.

XNOR-Net provides another example of the distinction. Its convolution calculations use bitwise operations, but real-valued scaling factors are applied afterward. The authors identify these factors as K and α. The discrete convolution is therefore only part of the complete computation.

DoReFa-Net and Quantized Neural Networks broaden the precision question to weights, activations, and gradients. Their purpose, in the paper’s discussion, includes efficiency during training as well as inference. TNN’s emphasis is different: it accepts a comparatively flexible training stage in order to obtain a strictly constrained deployed student.

#### Fully discrete alternatives

Expectation Backpropagation offers another route to constrained networks. The paper describes it as a variational Bayes method that can restrict weights to binary or ternary values without requiring the usual learning-rate tuning. Its intermediate neuron outputs are binary. The limitations identified by the authors are a real-valued bias and the absence of support for convolutional networks in the version they discuss.

Bitwise Neural Networks is a closer comparison to TNN’s deployment target. Its inputs, weights, and outputs are binary. According to the paper, it begins from a real-valued network constrained through tanh and then trains a binary network using that network together with a global sparsity parameter.

This comparison matters because TNN also separates an initial learning stage from a constrained deployment stage. Its distinctive choices include ternary activations, local threshold selection, and support for convolutional as well as fully connected architectures. The difference is not simply that one method uses a teacher and another does not.

TrueNorth supplies the other major fully discrete comparison. The authors discuss training methods adapted to its spiking architecture, including restrictions imposed by the chip and a mechanism that determines whether a synaptic connection exists. The sign of an existing connection supplies the corresponding weight direction. They also describe the extension of this line of work to convolutional networks.

Against this background, the TNN proposal has a specific position. It seeks a fully discrete network, retains a zero state in both weights and activations, uses a flexible teacher during training, and supplies its own execution architecture. The contribution is the combination of these decisions and their empirical evaluation, instead of the general discovery that reducing precision can save resources.

### The method, step by step

The conversion procedure is easiest to understand as a sequence of local approximation problems. First, a teacher learns the task. Next, a student with matching structure is constructed. For each neuron, the procedure chooses which teacher weights should become negative, inactive, or positive, then finds thresholds that make the student’s discrete output resemble the teacher’s output.

From a trained teacher to ternary inference The steps in order.

The diagram presents the general procedure. The convolutional experiments later use a shortcut: the teacher’s weights are already ternarized during its training, so the student conversion primarily needs to reproduce neuron outputs through threshold selection. That difference matters when interpreting both the training process and the conversion cost.

#### Keep the architecture, change the arithmetic

Teacher and student have the same architecture. A student neuron therefore has a direct counterpart in the teacher, with a corresponding set of incoming connections. This makes internal imitation well defined: the procedure does not need to discover which student component should stand in for a teacher component.

The numerical representations differ. Teacher weights can be real-valued, and the training process can use ordinary optimization techniques. Student weights are ternary. Student neuron outputs are also ternary, produced by a deterministic activation rule with a lower and an upper threshold.

The paper uses superscripts to distinguish teacher and student quantities and subscripts to identify neurons or samples. It also distinguishes discrete quantities typographically from real-valued ones. For clarity, the formulas below use the subscript T for a ternary weight vector where that distinction is needed.

The matching architecture is an advantage for conversion but also a constraint. This procedure is not presented as a way to replace a large teacher with an arbitrarily smaller student. Its main compression mechanism is the representation and the removal of connections through zero weights, instead of a different arrangement of layers.

#### Train a teacher that emits ternary signals

The teacher’s central restriction concerns neuron outputs. Before stochastic firing, an activation function produces a value in the interval between −1 and 1. The paper names tanh, hard tanh, and soft-sign as suitable choices.

A stochastic firing step then converts this activation into one of the allowed ternary outputs. The activation controls the output probabilities, so the teacher can be trained with ternary signals while retaining a richer numerical learning process around them.

This stochastic stage should not be confused with the student’s deployment behavior. The teacher uses probabilities to support training and to provide targets for conversion. The student ultimately uses fixed weights and fixed threshold decisions. The proposed inference engine does not need to reproduce the teacher’s stochastic firing process.

The authors emphasize that the teacher can benefit from dropout and batch normalization. Dropout is used during training to reduce overfitting. Batch normalization is another training technique they want to retain rather than exclude merely because the final network must be discrete.

They also allow restrictions on teacher weights when useful. The general method does not require weight discretization during teacher training, but the paper notes earlier findings that such restrictions can regularize learning. In the convolutional experiments, this flexibility becomes an explicit part of the chosen training setup.

The available definition table is named in the paper, but its detailed contents are not set out in the mathematical account. As a consequence, the method can be described in terms of probability-controlled stochastic firing without supplying an additional, unreported probability equation.

#### Convert each incoming weight vector

For a teacher neuron, the procedure chooses a negative-side threshold and a positive-side threshold. These thresholds determine which connections survive and with what sign.

```
min(Wᵢ) ≤ tᵢˡᵒ ≤ 0 ≤ tᵢʰⁱ ≤ max(Wᵢ)
```

Wᵢ is the real-valued vector of incoming weights for neuron i. The symbols min and max identify its smallest and largest entries. The lower threshold is tᵢˡᵒ, and the upper threshold is tᵢʰⁱ. Their permitted ranges keep the lower threshold on the nonpositive side and the upper threshold on the non-negative side.

The resulting ternary vector is written as a threshold-dependent transformation.

```
ternarize(Wᵢ | tᵢˡᵒ, tᵢʰⁱ) = Wᵢ,T = [wⱼ,T]
```

The function ternarize converts Wᵢ using the chosen thresholds. Wᵢ,T is the resulting discrete vector, and wⱼ,T is its entry for incoming connection j. The brackets indicate a vector containing those entries.

The intended behavior is straightforward: sufficiently negative weights become −1, sufficiently positive weights become 1, and weights in the central region become 0. This preserves the direction of retained connections while giving the procedure a way to discard smaller contributions.

There is a mathematical inconsistency in the printed piecewise expression. Its zero branch places the threshold inequalities in the reverse order from the surrounding explanation and threshold bounds. Written with the same inequality order, that expression is:

```
wⱼ,T = { −1 if wⱼ < tᵢˡᵒ; 0 if tᵢˡᵒ ≥ wⱼ ≥ tᵢʰⁱ; 1 if wⱼ > tᵢʰⁱ }
```

Here wⱼ is an original teacher weight, while wⱼ,T is the corresponding ternary weight. The thresholds retain their meanings from the preceding equations. Because the lower threshold cannot exceed the upper threshold under the stated bounds, the displayed central condition does not describe the intended interval in the usual case.

The method’s prose, sparsity discussion, and threshold construction consistently identify a central zero region. A careful reading should therefore distinguish that intended construction from the inequality ordering in the printed formula. The paper also leaves exact boundary handling insufficiently explicit in this expression; it should not be treated as a complete implementation specification for equality cases.

The conversion respects the ordering of teacher weights as well as their signs. A threshold cannot retain a smaller positive weight while discarding a larger positive weight on the same side. This restriction makes the search structured: it chooses cut points instead of an arbitrary ternary assignment for every connection.

#### Fit output thresholds for a candidate weight assignment

Weight conversion and activation conversion are coupled. Once a candidate ternary weight vector has been selected, the student neuron receives inputs and produces a weighted accumulation. The method then needs to decide how that accumulation should map to a ternary output.

The authors collect student accumulation values into groups according to the corresponding teacher output. The group y⁻ contains cases where the teacher emits −1. The group y⁰ contains cases where it emits 0, and y⁺ contains cases where it emits 1.

These groups reveal how well a simple threshold rule can recover the teacher’s behavior from the student’s cheaper computation. If the groups are well separated along the accumulation axis, suitable thresholds can reproduce many teacher responses. If they overlap, some disagreement is unavoidable for that candidate weight assignment.

The paper estimates the distributions using kernel density estimates. In this context, the density estimates describe how the collected accumulation values are distributed for each teacher-output group. A linear discriminant then supplies a boundary between the positive and zero groups, and another boundary between the negative and zero groups.

The resulting activation thresholds are bᵢˡᵒ and bᵢʰⁱ. They are different from the weight thresholds tᵢˡᵒ and tᵢʰⁱ. The weight thresholds operate on individual teacher weights during conversion; the activation thresholds operate on the student’s accumulated input during inference.

This distinction explains why the method does more than round weights. A weight assignment changes the distribution of student accumulations, which changes the most suitable output thresholds. Each candidate configuration must therefore be assessed together with the activation rule fitted for it.

#### Score agreement using teacher probabilities

The paper evaluates candidate threshold settings by accumulating a score across training inputs. The score uses the probability of a teacher output that agrees with the student’s deterministic response.

```
Sₜˡᵒ,ₜʰⁱ = Σ_d p(nᵗ = ±1 | xᵗ_d)^𝕀(nˢ = ±1 | xˢ_d) p(nᵗ = 0 | xᵗ_d)^𝕀(nˢ = 0 | xˢ_d)
```

Sₜˡᵒ,ₜʰⁱ is the score for the current lower and upper weight thresholds. The sum ranges over input samples indexed by d. The teacher output is nᵗ, the student output is nˢ, and p denotes a probability. The teacher and student inputs for sample d are xᵗ_d and xˢ_d. The indicator 𝕀 activates the factor associated with the student’s response.

The ±1 notation compresses the signed non-zero cases. The prose describes the intended score as rewarding matching teacher and student outputs. That explanation is necessary when reading the expression, since treating ±1 merely as an unsigned “active” event would lose the distinction between negative and positive agreement.

The use of probabilities is important. The teacher is stochastic, so its behavior on an input is not best described solely by a single sampled output. A student response can instead receive support according to the teacher’s probability of producing the same response.

The score is not the final dataset classification accuracy. It is a local imitation criterion for choosing a neuron’s conversion. A candidate can reproduce its teacher well at this local level without proving that the entire converted network will preserve every final decision.

The best-scoring conversion is selected through the threshold search.

```
W* = argmaxₜˡᵒ,ₜʰⁱ Sₜˡᵒ,ₜʰⁱ
```

W* denotes the selected ternary weight configuration. The argmax operation searches lower and upper threshold settings for the greatest score. Strictly, the optimizing arguments are threshold values; the notation uses W* for the ternary vector induced by those selected values.

#### Keep teacher and student input paths distinct

After the earliest layer, the teacher and student generally receive different internal signals.

```
xᵗ_d ≠ xˢ_d
```

The symbols identify the teacher and student inputs corresponding to training example d. Their inequality arises because earlier student layers have already been converted, while the teacher retains its own processing path.

The authors deliberately preserve the teacher’s original input path when computing its output probabilities. The teacher therefore remains a stable reference instead of being redefined by the student’s current approximation errors.

At the same time, the student neuron is assessed using the inputs it actually receives from the converted lower layers. This makes the local problem relevant to the deployed network. The procedure is not simply fitting a student neuron under ideal teacher inputs and assuming those inputs will remain available later.

This arrangement offers an opportunity for later layers to compensate for earlier approximation. It does not constitute a mathematical guarantee that errors cannot accumulate. The paper’s experiments investigate whether the resulting behavior remains close enough in practice.

#### Search efficiently, then inspect difficult neurons

Suppose a neuron has p positive weights and n negative weights. Under the sign and ordering constraints, the paper counts np possible threshold configurations. These candidates form a grid: one axis chooses the negative cut point and the other chooses the positive cut point.

The authors give the exhaustive procedure a worst-case quadratic complexity.

```
O(‖W‖²)
```

The symbol O describes asymptotic computational complexity. W represents the weight collection being searched, and ‖W‖ is used as its size measure in the paper’s complexity statement. The expression concerns conversion search, not the complexity of every stage of teacher training.

To accelerate conversion, the authors propose a greedy search that repeatedly contracts the candidate region. Along an axis, they select equally spaced pivot positions, evaluate the associated best scores along the other axis, and keep the region indicated by the better result. The retained region is two-thirds of the preceding search space.

The claimed complexity of the faster strategy is:

```
O(log² ‖W‖)
```

Here log denotes a logarithm, and the remaining symbols have the same roles as in the exhaustive-search expression. The paper’s guarantee of finding the optimum depends on the absence of local maxima that could misdirect the search.

When the score surface has multiple local extrema, the procedure can settle on a suboptimal region. The proposed safeguard is selective exhaustive search: inspect the imitation score and use the more expensive search for neurons that appear insufficiently well converted.

The parameter ε controls this tradeoff. The paper identifies ε=1 with exhaustive search throughout and ε=0 with the fully fast-search alternative. Intermediate settings combine the approaches. This makes conversion speed a tunable engineering decision rather than an all-or-nothing commitment.

#### Handle the classifier and optional retraining separately

The general account treats the output layer differently from hidden layers. For the softmax classifier described there, the conversion uses actual training labels rather than teacher neuron outputs. Output neurons are revisited in round-robin order, with convergence checked after successive passes.

This is a meaningful change of objective. Hidden layers are converted through local imitation, while the final classification stage is adjusted against the task’s known answers. The authors report that convergence occurs after a few passes over the output neurons.

Optional staggered retraining can occur before converting another layer. Already converted layers remain fixed, while the remaining teacher layers are updated. Early stopping limits this additional training, and the authors report that a few dozen iterations suffice in their experiments.

After such an update, the inputs used at the next conversion point can be aligned.

```
xᵗ_d = xˢ_d
```

The equality refers to teacher and student inputs for sample d following the optional update described by the authors. It should not be read as saying that both networks have identical internal signals throughout every stage of the procedure.

The convolutional experiments use a more specialized route. Their teacher training modifies the Binarized Neural Networks procedure so that weights are already ternarized during learning. Student construction then concentrates on fitting the threshold activation behavior. This reduces the remaining conversion work and, according to the authors, also improves teacher accuracy.

#### Connect the discrete network to hardware

The inference architecture represents ternary values with 2 bits using two’s-complement encoding. A connection can require an addition, a subtraction, or no numerical contribution, rather than a general multiplication.

For each neuron, the proposed computation uses an integer adder/subtractor and a register. Their width depends on the neuron’s input size.

```
width = ⌈log₂ k⌉ + 1 bits
```

The symbol k is the number of inputs to the neuron. The base-two logarithm appears as log₂, and the ceiling brackets round upward. The expression specifies the width used in the hardware description for the accumulator-related components.

Within a layer, neurons operate in parallel. Across layers, a pipeline allows different inputs to occupy different stages at the same time. Output ternarization is handled sequentially through stored thresholds, signed comparisons, and selection logic.

The implementation remains programmable within architectural limits. Weights and output thresholds can be loaded at runtime, but the number of layers and maximum layer dimensions are chosen during synthesis. The authors also report releasing training code and an FPGA demonstration design, making the work more than a conceptual proposal.

### Experiments and results

#### What the evaluation measures

The experiments address distinct questions. One is whether conversion preserves the teacher’s behavior. Another is whether the resulting fully discrete network classifies unseen inputs accurately. The hardware evaluation then asks how efficiently dedicated implementations execute those networks.

These questions require different metrics. Teacher–student accuracy gaps describe conversion loss. Test error describes task performance. Throughput, latency, energy efficiency, and area efficiency describe deployment behavior. A strong result on one does not automatically establish a strong result on the others.

The missing numerical bodies of several named tables limit how much of the comparison can be reconstructed from the paper’s running text. The account below therefore reports the explicit values and qualitative comparisons that the authors state, without supplying unstated entries.

#### Datasets and evaluation splits

MNIST contains grayscale digit images with dimensions of 28 × 28. The paper gives 60K training examples and 10K test examples. The final 10K examples in the training collection serve as validation data for early stopping and selection.

CIFAR-10 and CIFAR-100 contain RGB images with dimensions of 32 × 32. Each has 50K training images and 10K test images. Their classification difficulty differs partly through the label inventory: the paper specifies 10 classes for CIFAR-10 and 100 for CIFAR-100.

SVHN also uses RGB images with dimensions of 32 × 32, but its task concerns digits cropped from street-view imagery. The authors give a total training collection of 604K examples, including 531K less difficult examples available as extra data. The test collection contains 26K images.

GTSRB contains 51,839 traffic-sign images distributed across 43 classes. The authors emphasize variation in image size and illumination, together with unequal class frequencies. For validation, they randomly select 1 track per traffic sign, instead of describing a simple unrestricted image-level sample.

The resulting GTSRB split contains 37,919 training images, 1290 validation images, and 12,630 test images. The track-based choice matters because the images originate from video sequences, so selecting validation data requires attention to the way examples were collected.

#### Fully connected and convolutional setups

For fully connected experiments, the authors vary both depth and width. The candidate widths are 250, 500, 750, and 1000 neurons per layer. The depths considered are 2, 3, and 4 layers. MNIST is evaluated only with these fully connected networks.

The MNIST training objective is cross-entropy, optimized with stochastic gradient descent using mini-batches of 100. The authors train for 1000 epochs and report test performance from the checkpoint with the best validation error.

MNIST inputs receive threshold-based binarization without additional preprocessing. The training description also includes random rotations bounded by ±10 degrees. This detail should remain visible even though the later comparison discussion broadly emphasizes avoiding augmentation.

For the other datasets, the paper uses a VGG-like convolutional architecture.

```
(2 × nC3) − MP2 − (2 × 2nC3) − MP2 − (2 × 4nC3) − MP2 − (2 × 8nFC) − L2SVM
```

C3 denotes a convolutional layer with a 3 × 3 kernel. MP2 denotes max pooling over a 2 × 2 region. FC denotes a fully connected layer, and L2SVM identifies the output classifier used in these experiments. The parameter n controls the architecture’s channel and layer sizes.

The smaller version uses n=64 and is called CNN-Small. The larger version uses n=128 and is called CNN-Big. This output classifier differs from the softmax case described in the general conversion section, so the experimental architecture should not be silently rewritten as a softmax network.

For convolutional teacher training, the authors minimize squared hinge loss with Adam and use mini-batches of 200. Training lasts at most 1000 epochs, with the reported test error taken from the best validation epoch.

Input binarization follows the transduction-filter approach attributed to the TrueNorth convolutional work. The paper uses 12 filters, or 24 on CIFAR100. It reports no augmentation for these convolutional datasets.

#### MNIST classification

The reported TNN result on MNIST uses a fully connected network with 3 layers and 750 neurons in each layer. Its test error is 1.67%.

The relevant TrueNorth single-network result is substantially less accurate in the paper’s comparison. The chart keeps the comparison at the level of reported single-network error; it does not imply equal network sizes or identical hardware resources.

Reported single-network MNIST test error The ternary network has lower error than the cited single-network TrueNorth result.

**The numbers**

| System or setting | error % |
| --- | --- |
| TrueNorth single network | 7.30 |
| TNN, 3-layer MLP with 750 neurons per layer (this paper) | 1.67 |

Bitwise Neural Networks is a more competitive accuracy comparison. The authors report that its network with 1024 neurons in each of 3 layers performs slightly better than their selected TNN. They do not provide that error value in the running discussion, so it cannot be added to the chart.

The authors attribute the TNN’s worse behavior at a similar larger size to overfitting. Their locally chosen sparsity levels allow useful smaller networks, but do not regularize the larger MNIST network as effectively as Bitwise Neural Networks’ global sparsity parameter in this comparison.

Ensembling changes the interpretation of the TrueNorth result. The paper cites an error of 0.58% for a committee containing 64 networks. That result demonstrates a different operating point, with additional networks and associated resource demands. It is not the single-network baseline shown in the chart.

The authors also cite a best MNIST result of 0.21%, associated with 21 incorrect classifications, and explain that such performance is difficult to obtain without extensive augmentation. Their purpose is to locate the TNN result within the accuracy landscape, not to claim the best available digit recognition.

#### Convolutional classification

For CIFAR10, the paper gives a TNN error of 12.11%. It reports better accuracy than TrueNorth, while acknowledging that partially discrete approaches retain an accuracy advantage.

The information presented for SVHN is qualitative: the authors describe a similar advantage over TrueNorth with a smaller margin. An exact TNN error is not stated in that discussion. The result supports the direction of the comparison, but not an invented numerical reconstruction.

CIFAR100 is the exception to the favorable TrueNorth comparison. The TNN does not perform better there. The authors identify it as a more demanding setting for resource-efficient deep learning and note that fewer related studies report results on it.

The most favorable classification result is GTSRB. CNN-Big reaches 0.98% error, compared with the cited human error of 1.16%.

GTSRB classification error for CNN-Big and the cited human result The larger ternary convolutional network has lower error on this benchmark than the cited human result.

**The numbers**

| System or setting | error % |
| --- | --- |
| Human performance cited by the authors | 1.16 |
| TNN CNN-Big (this paper) | 0.98 |

This benchmark comparison has a precise scope. It concerns the reported GTSRB classification setting. It does not establish general superiority to human visual recognition, nor does it measure the broader demands of operating a traffic-sign system in an uncontrolled environment.

Across the convolutional datasets, the authors’ overall claim is that fully discrete computation can retain useful accuracy while supporting cheaper execution. They explicitly acknowledge that real-valued inputs in partially discrete systems preserve more information. The accuracy cost is therefore connected to a genuine representational restriction, instead of being dismissed as an incidental training defect.

#### FPGA implementation

The preliminary FPGA experiments use the Sakura-X board because it supports precise power measurement. Its Kintex-7 160T FPGA accommodates a fully connected network with 3 layers and 1024 neurons per layer. The paper reports 3082 neurons in total and FPGA utilization of 81%.

The authors give a clock frequency of 200 MHz for one reported operating point. Some neighboring throughput, power, and latency values appear without their measurement units in the running hardware account. Those values should not be converted into a new energy or timing comparison without the missing unit information.

A separate comparison describes a TNN operating point with 98.14% accuracy and a TrueNorth operating point with 95% accuracy. The associated speed and energy discussion favors the TNN implementation in that middle operating region.

This hardware accuracy is not the same number as the best MNIST classification result reported earlier. The hardware discussion uses a particular implementable architecture and operating point. Keeping those contexts separate prevents the article from combining the best accuracy from one experiment with resource measurements from another.

The paper also describes TrueNorth operating points at 92.7% and 99.4% accuracy, with the latter using a committee of 64 networks. The authors acknowledge that their hardware does not reproduce both extremes. Their claim concerns a favorable region of the accuracy–efficiency tradeoff, not complete dominance across every operating condition.

#### Larger FPGA and ASIC comparisons

The remaining FPGA experiments use the larger VC709 board with a Virtex-7 690T device. The authors also synthesize their architecture for STMicroelectronics 28 FDSOI ASIC technology.

The ASIC comparison includes TrueNorth and EIE. EIE uses 16-bit precision and exploits sparsity to skip computations. The authors attribute TNN’s favorable area and energy behavior to smaller memories and functional units made possible by ternarization.

The concluding comparison against TrueNorth reports area-efficiency improvements from 147× to 635×. Energy-efficiency improvements range from 1.4× to 3.1×, and throughput improvements range from 2.1× to 2.7×.

These ranges summarize different evaluated conditions. They should not be assembled into a hypothetical single configuration that simultaneously achieves every maximum, because the paper does not establish such a combined operating point.

For convolutional hardware, both CNN-Small and CNN-Big are implemented for FPGA and ASIC targets. The FPGA figures are described as worst-case results. The ASIC power estimates take account of dataset-specific zero activations, following the general sparsity-aware principle discussed in relation to EIE.

The authors report better accuracy than TrueNorth on three of the four convolutional datasets, together with favorable throughput, energy efficiency, and area efficiency. They also state that the architectures differ. This supports the claim that their complete approach is competitive, while limiting any attempt to assign the full advantage to ternary arithmetic alone.

### What the ablations show

The paper provides controlled analyses of conversion search, depth, and optional retraining, rather than a comprehensive factorial ablation of every training and hardware choice.

#### Search quality versus conversion cost

The clearest controlled comparison concerns ε, the parameter governing when exhaustive threshold search is used. At ε=1, conversion uses exhaustive search throughout. At ε=0, it relies on the faster search. Intermediate settings reserve exhaustive evaluation for selected neurons.

The authors compare the teacher–student accuracy gap on training and test data across search settings. Their general finding is that reducing exhaustive search slightly worsens conversion quality, but the effect is small. Some runs improve instead.

To study the tradeoff more cleanly, they perform a detailed sensitivity analysis without optional staggered retraining. This matters because retraining could otherwise change the teacher and obscure whether a difference came from search quality or an updated learning trajectory.

The reported preferred setting is ε=0.95. Under that setting, exhaustive search is needed for only 20% of neurons, while the expected accuracy gap is described as practically 0.

The interpretation is narrower than saying the fast search always finds the same thresholds as exhaustive search. It shows that a hybrid policy can preserve the measured network accuracy while avoiding exhaustive evaluation for most neurons in the studied setting.

The paper also reports conversion timings on a server with a 40-core Intel Xeon E5-2650 v3 processor at 2.30GHz and 128 GB RAM. The running text does not attach units to the conversion-time values, so those values cannot support a reliable timing ratio or a portable estimate of conversion duration.

#### Depth and compensation

The authors find better teacher–student conversion behavior in deeper networks. Their explanation is that later student layers can compensate for some earlier discrepancies while continuing to use the original teacher behavior as a reference.

This result is useful because a naive concern would be that every converted layer necessarily adds unrecoverable error. The experiment suggests a more favorable interaction in the networks studied.

It does not prove that increasing depth always improves a discrete student. Depth changes representational capacity and optimization conditions as well as the opportunities for correction. The paper reports the observed pattern and a plausible mechanism, without isolating every contributing factor.

#### Optional staggered retraining

Retraining the not-yet-converted layers before proceeding slightly improves conversion performance according to the authors. Already converted portions remain fixed, so the remaining teacher layers can adapt to the partially discrete network.

This intervention also helps explain why a less exhaustive search setting can occasionally produce better final performance. If retraining changes the learning trajectory, the resulting network can move away from a local minimum rather than merely reproduce the outcome of a more exact threshold search.

The comparison therefore cautions against treating threshold-search precision as the only determinant of final accuracy. Search, adaptation, and downstream classification interact.

#### Network size and sparsity

The MNIST architecture comparison supplies a different kind of analysis. A larger TNN, chosen to resemble the Bitwise Neural Networks configuration, performs worse through overfitting. The selected smaller TNN works better.

The authors connect this behavior to the distinction between local and global sparsity control. TNN grants individual neurons more freedom, while the competing method’s shared sparsity setting can impose stronger regularization.

This does not isolate local sparsity as the sole cause of the difference between the methods. Their training procedures also differ. It does show that neuron-specific flexibility has a cost as well as a benefit, and that reducing inference complexity does not remove ordinary generalization problems.

### Limitations

#### Limits the authors identify

The authors openly present accuracy as part of a tradeoff. Partially discrete networks can retain more information in their inputs and computations, and they can achieve better classification results. Fully eliminating floating-point operations is therefore not presented as a free improvement.

They also identify CIFAR100 as a weak point. TNN does not outperform TrueNorth there, and the paper does not claim uniform superiority across datasets. The stronger GTSRB result should be read alongside that exception.

The fast threshold search has a stated failure mode: local extrema can lead it toward a suboptimal solution. Selective exhaustive search is a practical safeguard, not a proof that the fast procedure is globally reliable on every neuron.

Larger networks can overfit. The MNIST discussion is particularly clear that more neurons do not automatically improve the TNN. Local sparsity selection makes the conversion flexible, but that flexibility does not replace appropriate architecture choice and validation.

The hardware also has structural limits. Layer count and maximum dimensions are fixed at synthesis. Runtime programmability covers weights and thresholds within that structure; it does not turn the circuit into an unrestricted executor for arbitrary future networks.

Finally, the authors acknowledge that their hardware does not cover both extremes of the TrueNorth accuracy–power range. Their favorable comparison concerns particular operating regions and implemented architectures.

#### Limits visible in the experimental design

The classification experiments are all visual. Although the introduction motivates efficiency through applications that include speech and language, the paper does not demonstrate TNN performance on either. Applying the method to Mova or another language system remains a research proposal.

The teacher and student share an architecture. Accordingly, the experiments do not show how well this local conversion procedure would work if the student had fewer layers, differently arranged components, or a substantially different internal organization. The neuron-by-neuron correspondence is central to the method.

Local imitation is also an incomplete measure of task preservation. A neuron’s agreement score provides a useful conversion target, but the final classifier must still be evaluated separately. The paper does this through classification experiments; it does not derive a general bound connecting local scores to final test error.

The hardware comparisons involve different network architectures. Their practical relevance is strong: an application designer cares about the accuracy and efficiency of an entire implementation. Their causal resolution is weaker: they cannot isolate exactly how much of the advantage comes from ternary values, network size, pipeline organization, or other architectural choices.

The treatment of sparsity varies across the hardware experiments. Dataset-specific zero activations are incorporated into ASIC convolutional power estimation, while FPGA convolutional figures are reported under worst-case conditions. These are reasonable but different accounting choices, so results should be interpreted with their stated conditions attached.

The reported synthesis results should also be distinguished from the preliminary board measurements. The paper describes power-measurement capabilities for the Sakura-X experiments and ASIC synthesis for the dedicated technology target. It does not establish that every reported hardware figure comes from a physically measured ASIC deployment.

#### Reporting details that constrain interpretation

Several tables are named without their numerical entries being available in the paper’s running account. This prevents a full reconstruction of classification results, teacher–student gaps, and hardware operating points from the explicit prose alone.

Some hardware and conversion-time values lack units in that account. Assigning likely units would create an unsupported claim. The same restriction prevents deriving additional speed, energy, or timing ratios from those isolated values.

The weight-ternarization equation contains the reversed central inequality discussed earlier. Its intended zero region is clear from the surrounding method, but exact boundary behavior is not fully specified by the displayed expression. An implementation should therefore require more than literal transcription of that formula.

There is also a difference between the broad statement that augmentation is avoided and the MNIST training description, which includes random rotations up to ±10 degrees. The appropriate reading preserves the concrete dataset-specific procedure instead of flattening all experiments into a single augmentation policy.

None of these issues erases the central evidence. They define its resolution: the paper supports a concrete method and favorable reported implementations, while leaving some numerical comparisons and implementation details insufficiently specified for independent reconstruction from the mathematical and narrative account alone.

### What came after

The paper does not establish a subsequent citation history within the works considered here. No later study is identified that can be described as extending, reproducing, or revising its results. It would therefore be misleading to assign a particular later development to this work or to present a speculative continuation as an observed outcome.

The authors do leave clear directions for further investigation. One concerns more demanding classification settings, illustrated by the weaker CIFAR100 comparison. Another concerns execution: the hardware discussion suggests that exploiting weight sparsity and zero activations more fully could improve efficiency beyond what every reported implementation already realizes.

A separate direction follows from the conversion procedure itself. The hybrid search works well empirically, but its difficult cases are precisely those where local score structure defeats the faster optimizer. Further work could investigate that boundary while preserving the useful distinction between local imitation quality and final task accuracy. That is a question opened by the method, not a later result established by the paper.

The enduring contribution is a concrete demonstration that training flexibility and deployment simplicity can be separated. A teacher learns with comparatively rich machinery; a student expresses the resulting computation through a small discrete alphabet; dedicated hardware turns that restriction into measurable resource savings. The paper makes that chain tangible, while its uneven dataset results and implementation conditions show what a subsequent evaluation would still need to test.

## Cite

Cite as Hande Ozgur Alemdar, Vincent Leroy, Adrien Prost-Boucle and Frédéric Pétrot. 2017. Ternary neural networks for resource-efficient AI applications. arXiv:1609.00222.

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

```bibtex
@misc{alemdar2017ternary,
  title = {{Ternary neural networks for resource-efficient AI applications}},
  author = {Hande Ozgur Alemdar, Vincent Leroy, Adrien Prost-Boucle and Frédéric Pétrot},
  year = {2017},
  doi = {10.1109/ijcnn.2017.7966166},
  eprint = {1609.00222},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/ijcnn.2017.7966166}
}
```

> 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)
