A logic-gate network is a classifier built entirely from two-input Boolean gates such as AND, XOR, or NAND, where training picks which gate each neuron should be. When the trained network is compiled for an FPGA, the synthesis tool simplifies it for free. Gates whose outputs are always 0 or always 1 get folded away, and so does every gate that only feeds them. That folding is where most of the hardware savings come from. Training never sees it, though. Networks are trained for accuracy and then handed to the tool, and any compression is added afterward by a greedy pass. We propose to move the simplification inside training. On each forward pass we run a cheap copy of what the synthesis tool does to the sampled discrete netlist: propagate constants, delete dead logic, and pack the survivors into 6-input lookup tables (LUTs). On the backward pass, a smooth probabilistic version of that same simplification supplies the gradient. This is the straight-through trick applied to the synthesis step itself, not only to the gate choice.
The opportunity is concrete. LogicNets found that Vivado's Boolean minimization shrank neuron-as-truth-table circuits up to 39× below analytical predictions, yet training could not steer that effect. Two-Stage Unit Tying showed that forcing chosen gates to constants after training triggers cascading pruning worth up to 48.3% fewer LUTs. Its authors name layer-by-layer greediness and reliance on calibration data as limitations. We ask whether a network trained to anticipate the synthesis tool's own simplification reaches a better accuracy-versus-LUT trade-off. We also ask whether that advantage survives placement and routing, the physical layout step where the literature warns that logic-level savings often evaporate.
Core Claim
The quantity that matters for hardware cost is the number of LUTs that survive constant propagation, dead-logic removal, and packing. Raw gate count is a poor stand-in for it. This quantity is a deterministic, cheaply computable function of the hard gate choices, so it can sit in the forward pass. Its relaxed counterpart can be computed from the gate probabilities that the Gumbel-softmax estimator already maintains. The Gumbel-softmax estimator samples a hard choice from noisy softmax probabilities in the forward pass and backpropagates through the soft probabilities. The relaxed cost is built from two quantities: the probability that each gate's output is constant, and the probability that it is live, meaning it still reaches an output.
The training objective is
$$ \mathcal{L}(\theta) = \mathrm{CE}\big(f_{z}(x), y\big) + \lambda\, C_{\text{hard}}(z), \qquad \nabla_\theta C_{\text{hard}} := \nabla_\theta C_{\text{soft}}(p_\theta). $$
Here $\theta$ are the gate logits, $z$ is the hard netlist sampled from them, and $f_z$ is that netlist run as a classifier. $C_{\text{hard}}(z)$ is the surviving packed-LUT count of $z$. $C_{\text{soft}}(p_\theta)$ is the expected surviving cost under the gate probabilities $p_\theta$, obtained by pushing constant-probabilities forward and liveness-probabilities backward through the fixed wiring. $\lambda$ trades accuracy against hardware.
The new ingredient is that credit for a deletion flows to every gate whose choice enables it, including cascades several layers deep. A per-gate penalty cannot express this, and a post-hoc greedy search can only approximate it layer by layer.
Relation to Prior Work
The method builds directly on Mind the Gap. Its Gumbel Logic Gate Networks use straight-through Gumbel-softmax to pick one of 16 gates per neuron, which cut the accuracy drop at discretization by 98%. That paper evaluates only accuracy and never compiles a netlist. We reuse its estimator and add a cost term that depends on synthesis behaviour. Its underlying model, Deep Differentiable Logic Gate Networks, defines the architecture and its fixed random wiring.
Light Differentiable Logic Gate Networks instead parameterizes each gate by its truth-table entries, which makes 6-input gates matching FPGA 6-LUTs trainable. It rounds at the end and reports no synthesis numbers. We use it as a second setting, in which LUT packing is trivial and the cost reduces to surviving non-constant LUTs.
Two lines of work motivate the proposal. Unit Tying supplies the evidence that constant-tying cascades are valuable, and its Gauss-Newton screening plus binary-split refinement is our strongest competitor. We replace its post-hoc greedy selection with end-to-end selection, and we never force a gate to a constant by fiat; the optimizer may choose the FALSE and TRUE gates, or wire-like gates, when that pays off. LogicNets motivates the same direction from the truth-table side.
The physical-design literature constrains the proposal. DAG-aware Synthesis Orchestration and the full-stack accelerator study report that structural simplification can worsen area, power, or delay after technology mapping and layout. ARITH-DAS stops its optimization loop at the post-synthesis netlist and names unmodeled placement and routing effects as a limitation. PigMAP shows that placement-aware mapping recovers 14% post-routing delay on fixed netlists. These papers make it unsafe to claim hardware wins from synthesized LUT counts alone, so post-route metrics are a required outcome in our design, not an optional extra.
Research Program
We will build three components and test one hypothesis about them.
The first component is a GPU-batched forward simplifier that runs on each sampled netlist $z$. It propagates constants through the 16 gate types, resolves wire-like gates (pass A, NOT B, and so on) into wires, marks gates that reach no output as dead, and estimates packed 6-LUT count with a fast cut-based cover. Because we report Vivado numbers anyway, this cover only needs to rank netlists correctly, not match Vivado exactly.
The second component is the relaxed cost $C_{\text{soft}}$. It computes, for each gate, the probability that its output is constant from its own gate distribution and its inputs' constant-probabilities, assuming inputs are independent. Liveness is then propagated backward through consumer gates. An approximate per-gate LUT share converts liveness into cost.
The third component is the training loop. It anneals $\lambda$ in from zero after the accuracy loss stabilizes, which avoids collapsing the network into constants early. It reuses the GLGN temperature schedule.
The analysis then tests where the cost reduction appears. We check whether $C_{\text{hard}}$ predicts Vivado post-synthesis LUTs better than gate count or tied-unit count. We also check whether reductions in synthesized LUTs carry through to post-route LUTs, routing utilization, and maximum clock frequency, or whether they create the congestion the physical-design literature predicts. If post-route delay degrades, a pre-planned extension weights each live gate's cost by the fanout span of its wiring. We report this as a separate variant rather than folding it in silently.
Baselines
The naive reference point is a Gumbel Logic Gate Network trained only for accuracy, compiled directly in Vivado for a Kintex-7 410T and a Virtex-7 2000T. Its post-synthesis and post-route LUTs, routing utilization, and clock frequency show how much the tool simplifies unaided. We found no reported Vivado LUT result on Lacuna for GLGNs, so we will measure it ourselves.
The strongest existing method is Two-Stage Unit Tying applied to that same trained GLGN, with its recommended fine-tuning. It is the only published method that directly optimizes post-synthesis LUTs of logic-gate networks through constant propagation. Its reported numbers are up to 48.3% post-synthesis LUT reduction on CIFAR-10 and 42.9% on MNIST at a 50% tied ratio, with 0.35% accuracy loss on MNIST (Two-Stage Unit Tying).
For fairness, all methods share the architecture, wiring seed, and number of training epochs. Unit Tying additionally gets its calibration data and fine-tuning, plus extra Stage-B evaluations equal to our simplifier's added training compute. We sweep its tied ratio and our $\lambda$ to trace full accuracy-versus-post-route-LUT curves. Beating it means a higher hypervolume on that curve with non-overlapping seed intervals, and no worse post-route clock frequency at matched accuracy.
Two ablations isolate the key ingredient. The first is a per-gate penalty: the same training with a cost equal to the summed probability of non-trivial gates. It rewards constant and wire gates but gives no credit for downstream cascades. The second is a fully relaxed variant that uses $C_{\text{soft}}$ in both passes, which tests whether evaluating the true hard netlist in the forward pass matters. This mirrors the discretization-gap finding of Mind the Gap.
For the low-latency setting, LogicNets serves as the reference. It reports 71.8% accuracy at 13 ns latency for JSC-L and 91.30% for NID-M on UNSW-NB15.
Why not just…?
Why not just add a per-gate sparsity penalty pushing gates toward constants? This is the real threat, and it is the first ablation. A per-gate penalty prices every gate independently. It therefore cannot see that making one gate constant can kill a whole subtree, nor that a gate is free once all its consumers ignore it. Those cascades are where Unit Tying's large savings come from. If the per-gate penalty matches our curve, the cascade-aware cost has not earned its complexity, and we will report that.
Why not just run Unit Tying with a bigger search budget? Its authors attribute its limits to layer-wise greediness and calibration dependence, not to budget. Moreover, a post-hoc search cannot change gate choices upstream to create new tying opportunities without breaking accuracy, whereas training can. The matched-compute comparison above tests this directly.
Why not just let Vivado and a physical-aware mapper like PigMAP do the work? Vivado already propagates constants. Our point is that an accuracy-only network gives it few constants to propagate. PigMAP-style mapping improves delay on a fixed netlist but cannot change what logic exists. The two are complementary, and the naive baseline measures what tools achieve alone.
Why not just use reinforcement learning against Vivado rewards, as ARITH-DAS does? Networks have tens of thousands of gates, and each reward costs a full synthesis run. Deep Differentiable Logic Gate Networks notes that non-gradient search historically failed to scale to deep logic models. We do not plan to run this baseline.
Proposed Experiments
We will train 2-input GLGNs on MNIST and CIFAR-10, 6-input input-wise-parameterized networks on CIFAR-10, and small networks on JSC and UNSW-NB15. Each is compiled through Vivado synthesis and full place-and-route on both Xilinx parts.
The first decisive check is predictive. Across hundreds of sampled netlists, we compare the rank correlation between $C_{\text{hard}}$ and Vivado post-synthesis LUTs against that of gate count. If $C_{\text{hard}}$ is not clearly better, the method has no basis.
The second check is the Pareto comparison against Unit Tying and the per-gate ablation, using post-route LUTs.
The third check addresses the tension in the literature. It asks whether post-route clock frequency and routing utilization hold steady as LUTs fall, or degrade the way the physical-design work warns.
A useful secondary readout is whether a CIFAR-10 model that needs the Virtex-7 fits the Kintex-7 at higher accuracy than Unit Tying achieves.
References
- High-Throughput DNN Inference with LogicNets
- Two-Stage Unit Tying for Simplifying Differentiable Logic Gate Networks
- Mind the Gap: Removing the Discretization Gap in Differentiable Logic Gate Networks
- Deep Differentiable Logic Gate Networks
- Light Differentiable Logic Gate Networks
- DAG-aware Synthesis Orchestration
- An Open-Source ML-Based Full-Stack Optimization Framework for Machine Learning Accelerators
- High-Performance Arithmetic Circuit Optimization via Differentiable Architecture Search
- Physically Aware Synthesis Revisited: Guiding Technology Mapping with Primitive Logic Gate Placement