---
title: "Fast inference of deep neural networks in FPGAs for particle"
description: "How hls4ml turns trained neural networks into FPGA circuits, balancing precision, hardware resources and latency for particle physics."
canonical: "https://research.elamur.ai/free/en/papers/duarte-2018-fast-inference-deep-neural-networks/"
---
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/duarte-2018-fast-inference-deep-neural-networks/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2018](https://md.research.elamur.ai/free/en/papers/2018/) / Fast inference of deep neural networks in FPGAs for particle physics

# Fast inference of deep neural networks in FPGAs for particle physics

Paper · 2018 · J. Duarte, S. Han, P. Harris et al.

**Authors:** J. Duarte, S. Han, P. Harris, S. Jindariani, E. Kreinar, B. Kreis, Jennifer Ngadiuba, Maurizio Pierini B, R. Rivera, N. Tran and Z. Wu · **Year:** 2018 · **Venue:** Journal of Instrumentation · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

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

- [DOI 10.1088/1748-0221/13/07/p07027](https://doi.org/10.1088/1748-0221/13/07/p07027)
- [arXiv 1804.06913](https://arxiv.org/abs/1804.06913)
- [OpenAlex](https://openalex.org/W2798084934)

## Deep dive: Fast inference of deep neural networks in FPGAs for particle physics

How hls4ml turns trained neural networks into FPGA circuits, balancing precision, hardware resources and latency for particle physics. · 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

Particle detectors must decide which collisions deserve further study before the incoming data overwhelms their processing systems. At the Large Hadron Collider, this decision begins in custom electronics, where an algorithm has far less time than ordinary scientific software typically receives. A useful classifier must therefore do more than distinguish interesting events from background: it must finish within a strict timing budget, accept new inputs often enough, and fit into the available hardware. This paper investigates whether trained neural networks can meet those conditions on field-programmable gate arrays, or FPGAs, using a compiler called hls4ml.

An FPGA is a device whose computing circuitry can be configured for a particular calculation. Independent operations can occupy separate hardware resources and run concurrently. That makes very short inference times possible, but it also creates a design problem: parallel arithmetic consumes physical resources, and those resources are finite. The authors make this tradeoff accessible through high-level synthesis, which converts a higher-level algorithm description into a hardware implementation. Their hls4ml software translates a trained network’s structure, weights, and biases into a synthesis project, allowing researchers to explore hardware designs without writing the entire implementation directly in a hardware description language.

The case study is jet classification. A jet is a concentrated spray of particles, and its internal structure provides clues about the particle that produced it. The authors train a fully connected network to distinguish jets associated with light quarks, gluons, W bosons, Z bosons, and top quarks. They then examine how inference changes when they remove unnecessary connections, reduce numerical precision, and vary the amount of arithmetic hardware shared between calculations. These choices affect different aspects of the implementation: pruning mainly removes arithmetic work, reduced precision makes individual operations cheaper, and hardware reuse trades throughput and latency for lower resource use.

The original network contains 4389 parameters. Iterative pruning removes 3051 weights, producing the reported 70% compression without a significant deterioration in classification performance. Fixed-point arithmetic with about 16 bits in total reproduces the floating-point classification results with negligible loss. For the studied implementation choices, the paper reports inference latency of roughly 75–150 ns at 200 MHz, with DSP use around 10% of the selected FPGA’s capacity, depending on the initiation interval. These results establish that a compact, useful classifier can fit within the timing and resource constraints relevant to early particle-physics triggering.

The strongest conclusion concerns feasibility and design tradeoffs, instead of a completed detector application. The reported inference time starts from already calculated network inputs; it excludes the potentially expensive construction of the jet features. The authors also distinguish rapid synthesis estimates from a final hardware implementation. In their implementation checks, resource estimates are generally conservative, but the requested clock timing is sometimes too ambitious. The paper therefore offers both a practical compilation approach and a careful demonstration of why accuracy, arithmetic precision, hardware capacity, throughput, and final timing must be assessed together.

### Ideas worth borrowing

Treat deployment constraints as design variables. The authors do not regard hardware deployment as a final conversion performed after scientific development has ended. They expose precision and arithmetic reuse as settings that researchers can explore alongside classification quality. This works because a useful network is defined partly by the environment in which it must operate. The same approach applies whenever a prediction must arrive before a deadline or fit within a limited device: evaluate candidate designs against operational requirements while changes are still inexpensive.

Separate compression from numerical precision. Removing connections and shortening number representations both reduce implementation cost, but they act on different parts of the calculation. Pruning reduces the number of useful products, while quantization changes the resources needed for each product and its associated signals. Studying them separately makes their effects easier to interpret, then allows them to be combined. This is a reusable experimental pattern in [efficient computation and compression](https://md.research.elamur.ai/free/en/topics/efficient-models/): distinguish mechanisms before deciding how to assemble them.

Measure numerical range before fractional detail. A fixed-point representation must accommodate the values encountered during inference before extra fractional precision can help. The authors first investigate the integer portion of the representation and then examine fractional bits. That ordering prevents an apparent precision problem from concealing an inadequate numerical range. Elsewhere, the same reasoning can guide compact arithmetic for scientific processing: inspect the scale of parameters, activations, and intermediate results, then determine how much detail is necessary within that range.

Make sparsity visible to the execution system. A zero-valued weight saves hardware here because the synthesis tools can remove its multiplication from a circuit whose parameters are already known. The benefit comes from the relationship between the compressed network and its implementation, not from sparsity in isolation. Engineers can borrow this principle by asking whether their execution path actually eliminates work associated with removed parameters. A compact parameter file and a cheaper running calculation are related objectives, but achieving the former does not automatically establish the latter.

Distinguish response time from input capacity. The paper tracks both latency, meaning the time required for an inference to finish, and initiation interval, meaning the spacing between accepted inputs. A pipeline can still be processing earlier inputs when it admits another. This distinction matters wherever work arrives continuously: satisfying a deadline for an isolated input does not establish that a system can sustain the incoming stream. Measuring both quantities gives a clearer account of operational feasibility than reporting inference time alone.

Use fast estimates to explore, then verify implementation. High-level synthesis provides resource and latency estimates quickly enough to support repeated design changes. The authors use those estimates to discover broad trends, but they also compare them with a placed-and-routed implementation. That comparison exposes optimistic timing and conservative resource predictions. The transferable lesson is to use an inexpensive approximation for exploration while reserving final claims for the stage that captures the relevant physical constraints.

### How Mova uses it

For Mova, the small transparent language system written in Rust, the most direct connection is a way of reasoning about constrained computation. The paper offers no evidence of an existing Mova integration, so the applications here are prospective. Its contribution is a concrete example of making execution cost an explicit part of a learned component’s design. A small language system could apply that perspective when deciding whether a learned scorer, classifier, or other numerical component is worth including.

One possible use would be to keep the boundary around such a component narrow and inspectable. The authors begin inference from a defined vector of expert features and produce a defined set of output scores. Mova could adopt a similarly explicit interface for a compact learned component: document what information enters, what each output means, and which surrounding computation is required. This would support transparency at the system level even when a component contains trained numerical parameters. The paper itself does not establish how a language task should be represented, so choosing those inputs and outputs would remain separate work.

A second application concerns arithmetic representation. Rust implementation does not by itself imply that fixed-point inference would be useful, and the FPGA resource savings cannot be transferred directly to software. Even so, the authors’ measurement procedure is relevant. Mova could compare a candidate component’s task behavior under different numerical representations, checking that its value range is preserved before reducing fractional detail. Any benefit would need to be measured in Mova’s actual execution environment. The paper supplies a method for asking the question, rather than a software performance result that answers it.

The pruning procedure also suggests a disciplined way to investigate unnecessary connections. A candidate network could be trained, pruned, and evaluated again while previously removed weights remain absent. For Mova, the important follow-through would be to confirm that the implementation actually avoids the corresponding arithmetic or storage cost. The FPGA study is unusually favorable in this respect because synthesis knows the constant weights and can remove zero-weight products. A Rust implementation would need its own representation and execution strategy to obtain an analogous benefit.

The separation between inference and preprocessing is especially relevant to a transparent language system. A numerical component can appear cheap if its measurements begin after all difficult representation work has finished. Mova could use this paper as a reminder to account separately for input preparation, scoring, and downstream decisions, then measure their combined cost when assessing an application. In a language pipeline, the exact preparation steps would depend on the task; the paper does not evaluate them. The transferable point is that a component’s timing boundary must be stated clearly.

The treatment of latency and initiation interval offers another useful distinction. If Mova processes independent requests or streams inputs through several stages, the time until a particular answer appears and the rate at which new work can enter may impose different constraints. The authors demonstrate this distinction through multiplier reuse in hardware. Mova could adopt the same clarity in its measurements without adopting the FPGA architecture itself.

A literal hls4ml deployment would be a more substantial extension. The paper describes a route from trained neural networks to FPGA circuitry through high-level synthesis, with support for Keras and PyTorch-based implementations. It does not describe a Rust compilation route or a language-processing deployment. Using that route for a Mova component would therefore require additional integration and validation. The immediate, defensible use is methodological: specify the task boundary, preserve a reference behavior, explore compact representations, and verify the resulting execution cost before claiming an improvement.

### The problem and its context

#### Why a fast decision changes the physics

A particle detector cannot preserve every collision in its fullest form and postpone all decisions until later. The paper describes incoming data rates at the major LHC experiments on the scale of hundreds of terabytes per second. Proton bunches cross at 40 MHz, creating a continuous processing demand. Triggering is the process that selects events for subsequent analysis and reduces the data stream to a manageable size.

This makes selection quality scientifically consequential. An interesting event that fails the early selection cannot benefit from a more capable analysis later. The authors motivate their work with signatures whose background rates make simple energy-based decisions restrictive. Internal jet structure could help distinguish useful events at an earlier stage, allowing the trigger to retain signals that would otherwise be difficult to preserve.

The paper gives low-mass hidden hadronic resonances and highly boosted Higgs production as motivating examples. Both can be overwhelmed by more common processes. A trigger that considers only the jet’s energy leaves potentially useful structural information unused. The proposed opportunity is to exploit that information early enough to influence event selection.

This motivation should be separated from the actual classification experiment. The benchmark distinguishes several jet categories; it does not directly demonstrate a new discovery search or quantify a gain in Higgs measurements. The physics examples explain why better early classification could matter. The hardware study investigates whether one relevant kind of classification can be performed within the necessary constraints.

#### Trigger stages have different computing budgets

The paper describes a staged trigger system, using CMS as an example with a hardware Level-1 stage followed by a software High Level Trigger. The early stage must cope with the original input rate and finite buffering. Its algorithms operate within a budget measured in microseconds, with individual computations taking hundreds of nanoseconds.

The later trigger receives a filtered stream and runs on commercial CPUs. Its overall processing can take hundreds of milliseconds. These are different computing environments: a technique suitable for the later stage may still be unusable at the earlier stage, even if it offers excellent classification quality.

Within the early-stage setting examined here, the authors regard CPU and GPU solutions as incompatible with the severe latency requirement. That is a claim about this application’s timing conditions. The paper does not present a general argument that those processors are unsuitable for scientific learning or for all real-time decisions.

FPGAs are attractive because their circuitry can implement a calculation with substantial parallelism and predictable pipelining. But the ability to express parallel work does not remove resource limits. A design that gives every multiplication its own arithmetic unit may finish quickly while consuming too much of the device. A design that shares arithmetic units may fit comfortably while failing the input-rate requirement.

#### Why neural networks were difficult to place in the trigger

The authors describe [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/) as already effective across particle-physics processing, including calibration, classification, and later analysis. The barrier was therefore not simply a lack of promising algorithms. Moving them into early selection hardware required specialized implementation work and careful control of hardware resources.

Traditional firmware development involves hardware description languages such as VHDL and Verilog. Translating a scientific algorithm into that form can require scarce engineering support and a long development cycle. This slows experimentation: a physicist may have a useful classifier but lack a quick way to determine whether it could fit in the trigger.

High-level synthesis changes that workflow by accepting a higher-level description and producing a hardware implementation. The authors use it to make network deployment more configurable and repeatable. Their goal is to let researchers explore feasibility before committing to a lengthy bespoke firmware effort.

The hls4ml compiler is the concrete outcome of that approach. It does not eliminate hardware constraints or the need for implementation checks. Instead, it gives researchers a faster route to candidate circuits and exposes settings that determine the resource–timing tradeoff.

#### What earlier FPGA work had already explored

The paper places hls4ml within an existing field of FPGA neural-network acceleration. It draws directly on the RFNoC Neural Network Library and discusses several other compilation and accelerator approaches. Its claimed distinction is the combination of relatively compact networks with exceptionally strict particle-physics latency requirements.

Snowflake is described as a convolutional-network accelerator using Torch specifications and a sequential input/output architecture. Caffeine targets convolutional networks described in Caffe and uses a host connection through PCIe. These examples show that translating trained computation to FPGA hardware was already an active engineering problem.

The paper also discusses fpgaConvNet, which generates Vivado HLS code with a streaming architecture, and FP-DNN, which combines register-transfer-level and high-level-synthesis templates. DNNWeaver provides another route using optimized Verilog templates. The authors do not reproduce their experimental results or establish a comparative ranking against hls4ml.

Within particle physics, the paper identifies earlier trigger use of a boosted decision tree for muon momentum measurement and an early attempt to place convolutional networks on FPGAs. These precedents matter because they qualify the novelty claim. The authors are presenting a general-purpose study tailored to a particular latency regime, rather than claiming the first use of learned computation in trigger electronics.

#### Why jet substructure is a suitable benchmark

Jets carry correlated information about their origins in the spatial and energetic arrangement of their constituent particles. The paper notes that a jet can contain roughly the order of 100 particles, creating a rich classification problem. Various earlier studies had represented jets as images, particle sequences, or collections of physics-derived observables.

The authors choose expert-level observables. These are quantities already designed to summarize relevant aspects of a jet’s structure. That choice produces a compact input representation suitable for a fully connected network and allows the study to concentrate on inference implementation.

The benchmark is not selected to establish the best possible jet classifier. The authors explicitly acknowledge more sophisticated approaches. Their objective is to take an effective classifier and determine how its implementation behaves as compression, precision, and parallelism change.

This gives the paper a useful division of labor. Existing jet-substructure knowledge supplies a meaningful scientific task and informative inputs. The new study examines the hardware consequences of evaluating the resulting network under demanding timing constraints.

### The method, step by step

#### Start with a trained calculation

The workflow begins with ordinary network development in software. Researchers choose a task, prepare its inputs, train a network, and assess its predictive behavior. Compression can be included before the final network description is passed to hls4ml.

The compiler receives the architecture together with its trained weights and biases. It then produces a high-level-synthesis project that can be synthesized and implemented for an FPGA. The calculations remain tied to the trained parameters; the configurable choices concern how those calculations are represented and scheduled in hardware.

The complete process is therefore iterative. A candidate may have adequate classification quality but require excessive resources. Another may fit the device but admit inputs too slowly. The workflow allows these findings to inform changes in the trained network or its hardware settings.

From a scientific classifier to FPGA inference The steps in order.

The implemented inference circuit is only one part of a possible application. The event generation and feature calculation belong to the study’s preparation procedure, while a real trigger would need its own means of supplying equivalent inputs at the required rate.

#### Generate the jet-classification data

The simulated collisions use a center-of-mass energy of 13 TeV. The authors generate parton-level processes corresponding to the jet categories under study using MadGraph5_aMC_at_NLO, version 2.3.1, together with the NNPDF23LO1 parton distributions.

The initial generation focuses on a narrow kinematic region. Parton transverse momenta and undecayed gauge-boson transverse momenta are centered at 1 TeV, with a relative spread of 0.01. Transverse momentum describes the component of momentum perpendicular to the beam direction. Restricting its generated range helps concentrate the benchmark on a particular regime instead of mixing widely separated scales.

The generated events are then processed with Pythia8, version 8.212, using the Monash 2013 tune. This step handles decays and particle showers and includes the underlying event. For each final state, the study generates 200,000 events.

The narrow generation window does not imply an equally narrow reconstructed-jet distribution. Showering and the movement of energy into or out of the jet region broaden the reconstructed spectrum. The authors therefore keep reconstructed jets only within the stated transverse-momentum window, from 0.8 TeV to 1.6 TeV.

Jets are clustered with the anti-kT algorithm using a distance parameter of 0.8. The study uses FastJet 3.1.3 and FastJet contrib 1.027 for clustering and substructure calculations. These packages produce the expert observables supplied to the classifier.

The paper refers to a collection of observables, but the available numerical description does not enumerate their complete definitions. The central methodological point is their role: they summarize the radiation pattern before inference begins. They are not raw detector readouts, and their calculation is not included in the network’s reported inference latency.

#### Train the reference classifier

The data are randomly partitioned into training, validation, and testing sets with proportions of 60%, 20%, and 20%. These subsets support different decisions. Training adjusts the weights, validation monitors development, and testing provides a separate assessment of predictive behavior.

Each input feature is standardized by subtracting its mean and scaling it to unit variance. This places different observables on a more comparable numerical scale before training. It also makes the later discussion of representable ranges important: standardized inputs still lead to internal sums whose values depend on the learned weights and network structure.

The main classifier has three hidden layers, with full connectivity between adjacent layers. Hidden units use the rectified linear activation, ReLU. The output uses softmax to produce scores interpreted as class probabilities for the jet categories.

Training minimizes categorical cross-entropy using Adam. The initial learning rate is 10⁻⁴, and the minibatch size is 1024. If validation loss does not improve over 10 epochs, the learning rate is halved. The paper considers training both with and without an L₁ penalty on the weights.

The training environment uses Keras on an AWS EC2 P2 GPU instance. That is distinct from the later inference target: training is performed in the software environment, while hls4ml translates the resulting trained calculation for FPGA execution.

#### Understand the layer computation

A fully connected layer takes the preceding layer’s outputs, forms weighted sums, adds biases, and applies an activation function.

```
x⃗ₘ = gₘ(Wₘ,ₘ₋₁ x⃗ₘ₋₁ + b⃗ₘ)
```

Here, m identifies the current layer. The vector x⃗ₘ contains that layer’s output values, while x⃗ₘ₋₁ contains the preceding layer’s outputs. Wₘ,ₘ₋₁ is the matrix of connection weights, b⃗ₘ is the bias vector, and gₘ is the activation function.

If the current layer contains Nₘ neurons and the preceding layer contains Nₘ₋₁ neurons, the weight matrix has a corresponding product of dimensions. Before pruning, evaluating the dense layer requires a multiplication for every connection between these adjacent layers.

```
Nₘ × Nₘ₋₁
```

Nₘ is the neuron count in the current layer, and Nₘ₋₁ is the neuron count in the previous layer. The expression describes the layer’s dense multiplication count, not its hardware resource requirement under every implementation. Sharing multipliers can reduce the number of physical arithmetic units, while pruning can eliminate products entirely.

The paper also gives a network-wide sum.

```
N_multiplications = ∑ₘ₌₁ᴹ Nₘ₋₁ × Nₘ
```

N_multiplications denotes the total multiplication count, and M denotes the number of layers in the network description. Each summand represents connections between adjacent layers. There is a small indexing inconsistency in the printed expression: the prose identifies the input as layer N₁, whereas the sum reaches N₀. Operationally, the intended count covers the connections entering each computed layer.

hls4ml evaluates layer calculations in sequence while pipelining successive inferences. The activation implementation depends on the function. ReLU uses programmable logic, whereas more involved functions, including softmax and sigmoid, use precomputed values stored in block RAM.

That distinction affects the resource balance. Multiplications tend to consume arithmetic blocks, while activation tables use memory resources. A network’s hardware cost therefore cannot be understood solely by counting its trained parameters.

#### Remove connections through iterative pruning

The compression procedure begins with regularization that encourages small weights. The training objective is augmented by an L₁ term.

```
Lλ(w⃗) = L(w⃗) + λ ‖w⃗‖₁
```

The vector w⃗ contains the weights. L(w⃗) is the original training loss, λ controls the penalty strength, and ‖w⃗‖₁ is the sum of the weights’ absolute values. Lλ is the combined objective used for regularized training.

The authors use λ = 10⁻⁴. After training, they compare each weight’s absolute magnitude with the largest absolute weight in its layer. This relative comparison keeps the ranking tied to the scale of that layer rather than applying one unqualified magnitude threshold everywhere.

The weight distribution develops a group of small values and another group of larger values. The procedure removes weights below a selected percentile associated with the small-value group, then retrains. During retraining, connections already removed remain fixed at zero.

The cycle continues for seven iterations. The stopping description combines a weight-distribution observation with a compression result: the summed contribution associated with the pruned population reaches 3% of the original summed population, and the network reaches the reported 70% compression.

The authors report that 3051 weights are pruned from the original collection of 4389 weights and biases. Those quantities should retain their stated roles. The original total includes biases, while the removed items are described as weights; the paper does not require a newly calculated remaining-parameter total to explain the result.

This procedure preserves the network’s layered organization. It removes connections instead of reducing the number of hidden stages. Consequently, it can substantially reduce arithmetic hardware without producing a comparable reduction in pipeline depth.

#### Choose fixed-point representations

Ordinary training and reference inference use floating-point arithmetic. The FPGA implementation instead uses fixed-point values, with a configurable allocation of bits around the binary point. Fixed-point arithmetic allows the circuit to be tailored more closely to the precision actually needed.

The paper writes a representation as ⟨X,Y⟩. X is the total bit width, while Y specifies the signed integer portion. The remaining part represents fractional detail. Inputs, weights, biases, sums, and layer outputs all require suitable representations.

The authors do not choose the allocation solely from the weight values. Their compressed-weight distribution suggests that at least three bits above the binary point are necessary for the weights themselves, including the sign. But activations and intermediate signals can require a broader range.

The procedure therefore scans classification behavior while changing the integer allocation. After selecting enough integer bits to avoid the observed range problems, it scans fractional precision. The detailed resource study uses representations of the form ⟨X,6⟩, varying total width while keeping the signed integer allocation fixed.

This is post-training precision reduction in the reported study. The authors discuss incorporating quantized arithmetic during retraining as a promising alternative, but they do not evaluate it here. The achieved precision should therefore be read as a result for their chosen workflow, instead of a lower limit on what the task could support.

#### Allocate multipliers through reuse

A trained layer specifies a collection of products, but it does not dictate how many physical multipliers must exist. hls4ml controls that decision through a reuse factor, R.

With reuse set to 1, the calculation is maximally parallel: multiplications are assigned hardware so that they need not wait for repeated use of the same multiplier. Increasing R schedules more products through shared arithmetic resources. This saves multipliers while extending the time required to complete the work.

The paper approximates a layer’s latency as follows.

```
Lₘ = L_mult + (R − 1) × II_mult + L_activ
```

Lₘ is the latency of layer m. L_mult is a multiplier’s latency, II_mult is the spacing at which that multiplier can begin another operation, R is its reuse factor, and L_activ is the activation-function latency.

The multiplier can itself be pipelined, so its total operation time and its ability to accept another operation are different quantities. Reuse adds scheduling steps rather than necessarily waiting for the entire multiplier latency after every product.

The expression is approximate. The authors note that routing and the addition of product results can impose further delay. The full network latency also includes the layer latencies and the connections between them.

Reuse affects input capacity as well as response time. In the intended schedule, the network cannot accept the next independent input until shared multipliers have completed the necessary products for the current scheduling interval. The initiation interval therefore generally follows the reuse factor.

#### Translate, synthesize, and implement

The hardware study uses Vivado HLS 2017.2 and targets a Xilinx Kintex Ultrascale FPGA identified as xcku115-flvb2104-2-i. The main synthesis scans request a clock frequency of 200 MHz.

The authors monitor DSPs, flip-flops, lookup tables, latency, and initiation interval. DSPs are arithmetic resources used prominently for multiplication. Flip-flops provide registers, and lookup tables implement programmable logic. These categories expose different pressures on the device.

Block RAM is used for activation tables, but its usage is not scanned in the reported resource analysis. The design also avoids storing and repeatedly retrieving network weights from block RAM for the earliest trigger setting, because the associated latency conflicts with the target application.

Finally, the authors compare synthesis estimates with implementation results. Their deliberately minimal wrapper connects the inference block to external pins so that unused logic is not removed. This provides a way to inspect resource and timing behavior beyond the rapid synthesis stage, while introducing practical input/output limits that shape the implementation experiment.

### Experiments and results

#### What the comparisons measure

The study combines predictive evaluation with implementation evaluation. For prediction, the reference is the trained network evaluated using 32-bit floating-point arithmetic. Fixed-point inference is compared against that reference while precision changes.

For hardware, the principal comparisons vary pruning, fixed-point width, and multiplier reuse. The authors examine DSP, flip-flop, and lookup-table usage alongside latency and initiation interval. They also inspect power trends in the implemented designs.

These are mainly comparisons between different realizations of the same scientific classifier. The paper does not present a benchmark contest against a collection of competing jet-tagging algorithms. Nor does it supply a direct experimental ranking of CPU, GPU, and FPGA inference for the same task.

The held-out testing portion belongs to the simulated jet data, whose split reserves 20% for testing. The task’s restricted generation and reconstructed-momentum selection remain part of the conditions under which the results should be understood.

#### Classification quality and its reference

The classification metric is area under the receiver operating characteristic curve, abbreviated AUC. A receiver operating characteristic curve follows the tradeoff obtained by moving a decision threshold over a classifier’s output.

For a chosen jet category, signal efficiency measures how often jets from that category pass the threshold. Background consists of an equal mixture of the other categories. The paper’s performance description uses background rejection, which increases as fewer background jets are accepted.

```
background rejection = 1 − background efficiency
```

Background efficiency is the fraction of background examples passing the selection. Background rejection is its complement. The constant 1 represents the full fraction of background examples.

The authors call the floating-point result the Expected AUC and evaluate how closely fixed-point inference reproduces it.

```
AUC / Expected AUC = 1
```

AUC is the fixed-point implementation’s area under the curve, and Expected AUC is the floating-point reference value. A ratio of 1 indicates agreement on this metric.

The paper describes stronger separation for top-quark jets than for the other categories, associating it with their mass and multi-prong structure. W and Z jets have similar performance characteristics, while distinguishing quark and gluon jets remains difficult.

The numerical prose does not report class-specific AUC values. It therefore supports the qualitative ordering and the precision-agreement conclusions, but not a newly reconstructed list of classification scores.

#### Pruning and precision preserve the reference behavior

The compression procedure reaches 70% while producing no significant classification degradation relative to the original network. This is the important joint result: the removed connections reduce implementation cost while the evaluation remains close to the reference.

In the precision scans, sufficient fixed-point width reproduces the floating-point AUC with negligible loss. The paper places the useful operating point at about 16 bits in total. The detailed resource scans use six integer bits and vary the total width.

The compressed and uncompressed networks reach agreement with their reference behavior at roughly the same precision. This indicates that the reported pruning procedure does not introduce a conspicuous additional precision requirement in this benchmark.

That conclusion is narrower than saying every prediction is unchanged. Agreement in AUC concerns the measured discrimination behavior. It does not establish identical scores for every jet or identical decisions under every possible threshold.

#### Synthesis shows a compact and fast classifier

For the fully parallel case, zero-weight products are eliminated by the synthesis process. DSP savings follow the reported compression level, making pruning particularly effective in this constant-weight circuit.

Latency changes little between compressed and uncompressed versions because the sequence of layers remains the same. The paper describes total inference as approximately 15 clock cycles, corresponding to 75 ns at the requested 200 MHz clock.

Across the reported configurations, the concluding latency range is roughly 75–150 ns. The authors also report that the compressed network can use approximately 10% of the selected device’s DSP resources, with the exact result depending on the initiation interval.

These figures describe a combination of design choices instead of an invariant property of hls4ml. More precision can require more resources. More reuse can save arithmetic units while increasing latency and reducing throughput.

The resource curves also contain discontinuities. Increasing numerical width does not always add a small, smooth cost. A multiplication can cross a hardware boundary and require a different arrangement of DSP blocks and logic.

#### Final implementation reveals a timing gap

The implementation experiment tests whether the synthesized design can meet its requested timing after placement and routing. For the pruned network with three hidden layers at 32-bit precision, the authors need an 8 ns clock period even though the HLS design requested 5 ns.

Pruned jet classifier at 32-bit precision: requested and achieved clock period Final implementation requires a longer clock period than the synthesis target.

**The numbers**

| System or setting | clock period, ns |
| --- | --- |
| HLS target | 5 |
| Timing-compliant implementation (this paper) | 8 |

This comparison concerns clock period rather than total inference latency. It should not be interpreted as a comparison between separate classifiers or as a measured speed improvement. Its purpose is to show that a target accepted during high-level design is not automatically achievable in the final circuit.

The timing difficulty grows with network complexity and device occupancy. The authors observe this issue across reuse settings for the stated three-hidden-layer case. They also report better success meeting requested timing with Vivado 2016.4 than with Vivado 2017.2.

The implementation checks therefore qualify the synthesis timing claims. The study demonstrates promising latency estimates and practical hardware realizations, while also showing that implementation can require a slower clock.

#### Resource estimates are generally conservative

The direct-pin wrapper limits the amount of input and output data that can be connected in the bare implementation. To accommodate this, the authors study a smaller top-identification network with ten input neurons, one hidden layer, and one output neuron.

The remaining implementation comparisons use an 8 ns clock. The authors also test the larger pruned network where pin availability permits and report similar broad conclusions in that regime.

Implemented DSP use is below the HLS estimate in the examined cases. Agreement is particularly close for multiplications below 24 bits, while larger widths allow implementation tools to redistribute work between DSPs and programmable logic.

Flip-flop estimates are often high by factors of 2–4, with larger discrepancies above 32 bits. Lookup-table estimates are also generally conservative. Spikes appearing in the synthesis estimates at 22 bits and 38 bits disappear during implementation.

The authors identify an exception involving the 26-bit lookup-table implementation. This matters because “conservative” describes the broad pattern, not an absolute guarantee for every resource and precision setting.

Power follows the expected direction in the implementation study: wider numerical representations consume more, while greater reuse lowers power as throughput decreases. The paper describes these trends without providing a numerical power table in its prose, so the defensible conclusion concerns direction instead of a particular wattage saving.

### What the ablations show

#### Removing connections reduces arithmetic demand

The pruning comparison isolates an important architectural fact. The network retains its sequence of hidden layers while many individual connections disappear. Under maximally parallel implementation, the compiler can omit the corresponding zero-weight multiplications.

DSP use falls in line with the compression, whereas latency remains approximately unchanged. This shows why parameter reduction and faster response should not be treated as interchangeable outcomes. Pruning can make a circuit much easier to fit without shortening the chain of dependent layer computations.

The comparison also depends on how weights are represented. They are known constants in programmable logic, so synthesis can act on their zero values directly. The experiment does not establish that an arbitrary sparse representation, especially one involving runtime memory access, would obtain the same savings.

Predictive behavior is evaluated alongside this hardware change. The absence of significant classification loss shows that the removed connections were dispensable under the benchmark’s evaluation. It does not establish that every connection selected by the procedure lacks meaning in other data conditions.

#### Integer and fractional scans diagnose different failures

The precision experiments distinguish insufficient range from insufficient numerical detail. That distinction is essential because both can lower classification quality while requiring different remedies.

The integer-bit scan asks whether values can be represented without the range problems observed in the study. Once that allocation is adequate, the fractional scan asks how much detail is needed to reproduce the reference discrimination.

The resulting operating point around 16 total bits is therefore supported by an empirical task-level check. It is not selected only because weights look small or because a particular bit width is convenient for the device.

Comparing compressed and uncompressed networks adds a further control. Both reach floating-point agreement at approximately the same precision, suggesting that this compression procedure and this degree of numerical reduction can coexist without an obvious conflict.

The analysis remains specific to the chosen arithmetic configuration and task. It does not establish that all layers need identical precision or that the selected allocation is the smallest possible under alternative training methods. The paper leaves quantization during training for further investigation.

#### Reuse exposes the price of shared arithmetic

Varying multiplier reuse changes the hardware schedule while preserving the intended network calculation. This makes it a particularly clear analysis of implementation cost.

Higher reuse lowers DSP demand because fewer physical multipliers serve more products. At the same time, the work takes more scheduling steps. In the reported network, each increment in reuse adds 4 clocks to latency, reflecting the computed layers through which the signal must pass.

The initiation interval generally matches reuse by construction. This connects a circuit-level choice directly to the incoming data stream: a smaller implementation may require more time before it can accept the next input.

The low-precision regime reveals an exception. There, synthesis can implement multiplications through lookup tables and flip-flops rather than DSPs, and the observed initiation interval can fall below the nominal reuse factor.

This exception shows that reuse is not a complete physical description of the resulting circuit. It is a design setting interpreted by synthesis, whose optimizations depend on arithmetic width and available hardware resources.

#### Fully parallel designs receive distinctive optimizations

The authors notice that reuse set to 1 sometimes departs from trends observed at greater reuse. They suggest that synthesis has more freedom when a multiplier serves a single operation than when it must accommodate several.

This is an interpretation offered by the authors, instead of a separately proven compiler mechanism. It nonetheless explains why simple extrapolation can fail. A resource estimate at one reuse setting may not predict another setting through a perfectly smooth scaling rule.

The same caution applies to precision. DSP blocks support particular operand dimensions, so crossing a precision boundary can change the implementation abruptly. The paper illustrates this with a DSP48E1 block: multiplying a 25-bit operand by an 18-bit operand fits within one block, while using a 19-bit operand on the latter side requires two.

These analyses encourage scanning the relevant settings rather than assuming proportional behavior everywhere. The broad tradeoff is predictable, but its detailed shape depends on the device and synthesis decisions.

#### Placement and routing test the reliability of estimates

The final implementation comparisons act as a check on the rapid exploration method. If HLS estimates were treated as exact measurements, both timing and resource conclusions could be misleading.

Resource estimates tend to err on the conservative side, especially for flip-flops and lookup tables. Implementation can eliminate apparent spikes and use logic to reduce DSP demand. This means a design that initially looks expensive may become smaller after further optimization.

Timing shows the opposite concern. A design can require a longer period than the target used during synthesis. Resource headroom therefore does not establish timing closure, and an attractive synthesis latency does not settle the final response time.

The bare wrapper makes this check practical, but it is not a complete trigger system. Its pin limitations motivate a smaller network, and it omits the broader environment in which a detector algorithm would operate. The analysis establishes useful relationships between estimation and implementation while leaving full system integration open.

### Limitations

#### The inference boundary excludes feature construction

An explicit limitation identified by the authors is the omission of input-feature computation. The jet classifier receives expert observables that have already been calculated. Constructing those observables may itself require considerable time and hardware resources.

This matters directly to the physics motivation. An early trigger would need both the features and the classification result before its deadline. Demonstrating a short network inference does not demonstrate that the complete jet-processing chain fits that deadline.

The authors recognize that other applications may have simpler inputs, including relatively raw detector information. But that observation does not solve preprocessing for the jet benchmark. It indicates that the omitted cost is application dependent and must be assessed separately.

A careful system-level interpretation is therefore that the paper validates a candidate inference block. It does not validate every upstream operation needed to supply that block or every downstream operation needed to turn its scores into trigger decisions.

#### The task covers a restricted simulated regime

A limitation visible in the setup is the restricted kinematic range. Events are generated around a selected transverse-momentum scale, followed by a reconstructed-jet selection. This helps define a manageable benchmark but limits the breadth of the demonstrated classification result.

The evaluation uses simulated events generated through the specified software chain. The paper does not establish performance across all detector conditions or demonstrate a deployed classifier operating on live trigger inputs.

The choice of expert observables is another scope condition. Their scientific usefulness supports the benchmark, but it means the study is not an end-to-end demonstration from raw detector measurements. The burden of obtaining the representation has been placed outside the timed inference.

The Higgs boson is also excluded from the classification categories. The authors explain that distinguishing it from W and Z jets is difficult without track-vertex information, which is frequently unavailable in the hardware-trigger setting they discuss. Consequently, the Higgs motivation should not be mistaken for a demonstrated Higgs-identification output.

#### Classification preservation has a defined meaning

The authors report negligible or insignificant loss under the comparisons they perform. This supports the practical claim that pruning and fixed-point arithmetic preserve useful discrimination in the benchmark.

A careful reader should still distinguish the evaluated metric from stronger forms of equivalence. Similar AUC does not establish identical probability calibration, identical behavior on every example, or unchanged performance under a different background composition.

The paper’s reference is also the trained floating-point classifier, instead of an unattainable ideal. Reproducing that reference shows successful implementation of its behavior. It does not establish optimal jet classification.

The authors themselves make this distinction by explaining that better classification approaches exist and that pursuing the strongest tagger is not their objective. The study’s value lies in characterizing implementation feasibility for an effective network.

#### Architectural and training choices remain limited

The demonstrated framework focuses on fully connected networks. Convolutional and recurrent architectures appear in the outlook as extensions, rather than as completed demonstrations within this study.

This matters because different architectures can introduce different storage, scheduling, and data-movement requirements. The basic ideas of pruning, reduced precision, and arithmetic reuse may remain relevant, but the measured resource and timing behavior cannot simply be assigned to other structures.

The compression method is deliberately simplified. The authors discuss alternatives including low-rank decomposition and distillation, but they do not compare their hardware outcomes experimentally here. The reported pruning result therefore does not identify a universally best compression procedure.

Likewise, quantized training is deferred. The observed useful precision does not establish the smallest representation achievable if training were designed around reduced precision from the beginning.

#### Resource coverage is incomplete

The paper monitors arithmetic blocks, registers, programmable logic, latency, and initiation interval, but does not scan block-RAM use. Activation values are stored there, while the chosen weight implementation avoids runtime weight retrieval from that memory.

This is an explicit scope limitation. A design that stores a larger network in memory or serves a longer-latency application could have a different bottleneck. The present resource balance is tied to the early-trigger strategy.

The bare implementation’s input/output arrangement adds another constraint. Connecting individual bits directly to pins is useful for preserving logic during characterization, but it limits the feasible interface width. The authors do not use high-speed transceivers in this setup.

Consequently, the detailed implementation comparisons shift to a smaller network. The authors offer supporting checks on the larger network where possible, but the complete evidence is not an unrestricted implementation sweep of the original classifier.

#### Timing depends on tools and physical implementation

The authors explicitly observe sensitivity to synthesis-tool version and to the difficulty of the physical design. A requested clock period can become unattainable after placement and routing, especially for more complex designs.

This limits how directly the headline latency can be transferred to another deployment. A different FPGA, tool version, surrounding circuit, or timing target may require renewed synthesis and implementation checks.

The study’s main scans target a particular Xilinx device and use a specified clock frequency. Although the authors argue that the general methods extend more broadly, their numerical results characterize that investigated environment.

The difference between conservative resource estimates and optimistic timing also prevents a simple overall verdict on estimate quality. HLS is useful for exploration, but confidence in one kind of estimate does not automatically transfer to another.

#### Broader benefits are proposals, not measured outcomes

The paper motivates FPGA use partly through low power and discusses possible advantages for larger reconstruction tasks. Its implementation analysis shows directional power trends, but the work does not provide a comprehensive measured energy comparison against CPUs or GPUs for the benchmark.

The authors explicitly leave more detailed cross-hardware comparisons to future work. Their discussion of FPGA coprocessors draws on cited efforts and potential applications, instead of a completed evaluation of the proposed trigger integration.

The same boundary applies to scientific gains. Better early selection could preserve otherwise difficult signals, but this paper does not measure an improvement in discovery reach, event yield, or a Higgs observable caused by deploying its classifier.

The defensible result is substantial without those broader claims: an effective compact network can be translated into configurable FPGA inference, and the resulting design space can be explored systematically under a demanding latency requirement.

### What came after

The paper establishes a starting point for several extensions, but it does not document their later completion. Its outlook is therefore best read as a research agenda. There is no identified later citing study to assess here, and no basis for attributing subsequent results to that agenda.

One proposed direction is broader architectural support. The authors envisage extending hls4ml to convolutional networks and recurrent structures, including long short-term memory units. They connect convolutional processing with image-like detector tasks and recurrent processing with variable-length collections of particle information. These proposals build on the existing translation workflow while requiring additional computational structures.

Another direction is more aggressive precision reduction. The paper identifies retraining with quantized arithmetic as a way that might preserve classification with smaller weight representations. That would shift precision from being primarily an implementation choice after training to being part of the training procedure itself. The reported experiments do not determine how much further that route could reduce hardware cost.

The authors also propose targeting other FPGA vendors and synthesis environments. Their concrete example is an extension toward Intel devices through Quartus HLS. The underlying ambition is to preserve the accessible workflow while broadening the hardware targets; the paper’s measurements remain tied to its Xilinx implementation.

A different application regime would relax the earliest-trigger deadline. The outlook discusses using FPGAs as coprocessors for the High Level Trigger, where more time is available for each inference. In that setting, greater arithmetic reuse could accommodate larger calculations. The authors point to reconstruction tasks such as tracking as possible beneficiaries, without presenting a completed implementation.

The lasting technical proposition is the combination of an accessible compiler with explicit control over compression, numerical representation, and parallel execution. The paper demonstrates that combination for a compact jet classifier. Its proposed successors would need to show, for each new architecture and application, that the same controls preserve predictive usefulness while satisfying the full system’s timing, resource, and data-delivery requirements.

## Cite

Cite as J. Duarte, S. Han, P. Harris, S. Jindariani, E. Kreinar, B. Kreis, Jennifer Ngadiuba, Maurizio Pierini B, R. Rivera, N. Tran and Z. Wu. 2018. Fast inference of deep neural networks in FPGAs for particle physics. Journal of Instrumentation.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1088/1748-0221/13/07/p07027](https://doi.org/10.1088/1748-0221/13/07/p07027) · [arXiv 1804.06913](https://arxiv.org/abs/1804.06913)

```bibtex
@article{duarte2018fast,
  title = {{Fast inference of deep neural networks in FPGAs for particle physics}},
  author = {J. Duarte, S. Han, P. Harris, S. Jindariani, E. Kreinar, B. Kreis, Jennifer Ngadiuba, Maurizio Pierini B, R. Rivera, N. Tran and Z. Wu},
  journal = {Journal of Instrumentation},
  year = {2018},
  doi = {10.1088/1748-0221/13/07/p07027},
  eprint = {1804.06913},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1088/1748-0221/13/07/p07027}
}
```

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