NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From MNIST to ImageNet: Understanding the Scalability Boundaries of Differentiable Logic Gate Networks

Sven Brändle, Till Aczel, Andreas Plesner, Roger Wattenhofer · Submission to ICLR 2026 · Withdrawn

TL;DR

Differentiable Logic Gate Networks (DLGNs) offer ultra-fast, energy-efficient inference by replacing conventional matrix arithmetic with discrete Boolean operations, but they have historically been limited to small, 10-class benchmarks. This paper presents the first systematic study of DLGN scalability up to 2,000 classes, demonstrating that the standard Group-Sum output layer can scale effectively when the temperature parameter ($\tau$) is tuned to balance neuron utilization and output representation.

What Problem Does This Paper Address?

While standard deep neural networks deliver state-of-the-art accuracy, their high compute and energy footprints restrict edge deployment. DLGNs tackle this by training continuous relaxations of Boolean logic operators (like AND, OR, XOR) with gradient descent, which are then discretized into pure logic circuits for ultra-fast, low-power inference.

However, DLGNs have typically relied on a Group-Sum classification layer, where the final layer is partitioned into fixed subsets of neurons that are summed to produce logits for each class. Prior works hypothesized that this layer causes an architectural bottleneck—requiring tens of thousands of dedicated neurons per class—rendering DLGNs impractical for large multi-class tasks. This paper tests those scalability boundaries and investigates how to design and tune output mechanisms for many-class regimes.

Methods

  • Differentiable Logic Gate Networks (DLGNs): Layers where each neuron takes two inputs and computes a softmax-weighted sum over 16 real-valued binary Boolean operations during training, switching to the single argmax discrete gate during inference.
  • Group-Sum Layer & Temperature Scaling ($\tau$): The output layer splits $n$ final neurons into $k$ segments (one per class). Summed activations are scaled by $\frac{1}{\tau}$ before applying softmax: $$\mathbf{p} = \text{softmax}\left(\frac{1}{\tau} \left[\sum o_j, \dots\right]\right)$$
  • Output Layer Variations & Regularization:
  • Group-Sum Dropout: Applying dropout directly to the output layer neurons ($p \in \{0.1, \dots, 0.9\}$) during training.
  • Codebook-Based Prediction: Mapping classes to fixed binary codes and classifying via nearest Hamming distance rather than dedicating specific neuron clusters per class.
  • Fully-Connected and Tree-Based Layers: Testing dense linear layers (trained end-to-end or post-hoc) and hierarchical tree reductions.
  • Convolutional Differentiable Logic Gate Networks (CLGNs): Evaluated to determine whether conclusions generalize to convolutional logic architectures.

Datasets

  • Synthetic Dataset (New): Binary vectors of length 784 where each class is defined by a fixed random pattern across 5–40 positions, while remaining positions vary randomly. Supports cleanly scaling class counts from 2 to 2,000 without confounding feature extraction limits.
  • Combined MNIST Benchmarks: A combined 67-class suite merging MNIST, Fashion-MNIST, Kuzushiji-MNIST (K-MNIST), and E-MNIST (Balanced/Letters).
  • Natural Image Benchmarks: CIFAR-10, CIFAR-100, and ImageNet-32 (downsampled $32 \times 32$ RGB images across 1,000 classes), binarized using multi-threshold slicing.

Key Insights and Ideas

  • Optimal Temperature ($\tau$) Scales with Neurons-per-Class, Not Total Network Size: The optimal $\tau$ depends directly on how many neurons represent each class ($n/k$). When classes have many neurons (small $k$), larger $\tau$ is essential to prevent overconfident logit explosions. When classes have few neurons (large $k$), smaller $\tau$ produces the sharper gradients needed for confident predictions.
  • High $\tau$ Promotes Uniform Neuron Utilization: At low $\tau$ (e.g., $\tau=1$), neurons polarize into 0%, 50%, or 100% activation rates ("dead" or saturated). Higher $\tau$ yields smooth, differentiated activation distributions across neurons, functioning like an ensemble and enabling up to 70%+ network pruning with negligible accuracy loss.
  • Backbone Capacity Limits Accuracy More Than Output Dimension: Expanding output neuron counts from 16,000 to 256,000 while keeping the 6-layer backbone fixed had virtually no impact on accuracy. In contrast, widening the backbone gates from 64,000 to 256,000 improved performance significantly across large class counts.

Key Results

  • Synthetic Scaling (up to 2,000 classes): A large DLGN (256k gates/layer, $\tau=10$) consistently outperformed a 3-layer MLP baseline (512 hidden units) across all class counts up to 2,000 classes, retaining $\sim 65\%$ accuracy at 1,000 classes where the MLP dropped to $\sim 50\%$.
  • Combined MNIST (67 classes): CLGNs reached 88.29% accuracy and DLGN reached 83.42%, matching or exceeding the baseline MLP (83.53%).
  • Group-Sum Dropout Boost: Introducing output dropout ($p=0.1$ to $0.3$) substantially improved generalization on the 2,000-class synthetic task (e.g., boosting performance from $5.8\%$ to $41.0\%$ at $\tau=0.40$) and widened the range of workable $\tau$ values.
  • Codebook Alternatives: Using random binary codebooks and Hamming distance boosted CIFAR-10 accuracy from $50.7\%$ to $54.8\%$ and proved less sensitive to $\tau$ tuning.

Limitations and Future Work

  • Natural Image Complexity (ImageNet-32): While competitive up to $\sim 67$ classes, DLGNs lagged behind MLPs on ImageNet-32 as class counts grew toward 1,000.
  • Receptive Field Bottleneck: In a 6-layer 2-input gate network, an output neuron only receives information from $2^6 = 64$ inputs ($\sim 0.7\%$ of a 9,216-dimensional flattened ImageNet-32 input), causing an acute receptive-field limitation for high-dimensional, complex visual patterns.
  • Training Times & Depth: Adding deeper layers to expand the receptive field currently triggers severe vanishing gradients and excessively long training times. Future research must focus on better gradient flow mechanisms and specialized architectures for rich continuous-data domains.

Summary updated

BibTeX
@misc{brandle2025from,
  author = {Sven Brändle and Till Aczel and Andreas Plesner and Roger Wattenhofer},
  title = {{From MNIST to ImageNet: Understanding the Scalability Boundaries of Differentiable Logic Gate Networks}},
  year = {2025},
  eprint = {2509.25933},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.25933},
}
Figure