Knowledge Distillation from Neural Networks to Differentiable Logic Networks

Hee Yun Suh, Niraj K. JhaarXiv 2026

TL;DR

Researchers have successfully applied Knowledge Distillation (KD) to bridge the accuracy gap between "black-box" neural networks and "white-box" Differentiable Logic Networks (DLNs). By using a standard multi-layer perceptron (MLP) as a teacher, they boosted the accuracy of interpretable logic-based models by up to 15% without sacrificing their extreme inference efficiency or transparency.

What Problem Does This Paper Address?

In the quest for "interpretable by construction" machine learning, Differentiable Logic Networks (DLNs) have emerged as a powerful tool for tabular data. Unlike standard neural networks that use weighted sums, DLNs use actual logic gates (AND, OR, XOR), making their decision-making process easy to trace and incredibly fast on hardware.

However, DLNs face a major hurdle: they are notoriously difficult to train. To make discrete logic gates differentiable, researchers use "relaxations" (like Softmax). When you stack these layers, the gradient signal thins out—a classic vanishing gradient problem. This creates an accuracy ceiling where DLNs often trail behind conventional neural networks, even when given more capacity.

Methods

The authors propose a Knowledge Distillation framework to provide a richer training signal to the DLN student.

  1. The Teacher: A standard 3-layer MLP is trained to high accuracy on the target dataset.
  2. The Student: A DLN consisting of a ThresholdLayer (to binarize inputs), several LogicLayers (the gates), and a SumLayer (to produce class scores).
  3. The Distillation: Instead of training the student only on "hard" labels (0 or 1), they use a loss function that includes the "soft" probability distributions from the teacher. This "dark knowledge" provides a denser, better-scaled gradient that helps the DLN overcome its training pathologies.
Figure 1: A simple example of our DLN. The model takes binarized continuous variables and categorical variables through a ThresholdLayer. Then, the binary vectors are passed to the LogicLayers. We concatenate the inputs with a ThresholdLayer at every intermediate LogicLayer, i.e. except the first and last one. At the end, the SumLayer determines the input’s class.

The training happens in two alternating phases: Phase I optimizes the logic functions of the neurons, and Phase II optimizes the connections (the "wiring") between them. The authors explored four variants of this setup, including joint hyperparameter optimization and single-phase distillation.

Figure 2: KD flowchart for DLNs.

Datasets

The methodology was evaluated on 20 public tabular classification datasets, covering a wide range of domains (e.g., finance, healthcare, and general science). Notable datasets include:

  • Medical: BreastCancer, Diabetes, HeartFailure, HepatitisC, Liver.
  • Financial: BankChurn, CreditFraud.
  • General: Mushroom, AdultIncome (used for a training time case study).

Key Insights and Ideas

  • Overcoming the Ceiling: Distillation acts as a powerful regularizer. In several cases (like the EyeMovements and Heart datasets), the distilled DLN student actually surpassed the accuracy of its MLP teacher.
  • Wiring Matters: The "Connection Phase" (Phase II) appeared to benefit most from distillation. This suggests that the teacher's primary value is in guiding the student on how to "wire" its logic gates effectively.
  • Efficiency for Free: Because the teacher is discarded after training, the distilled DLN retains its "edge-friendly" nature. It performs inference using sparse Boolean logic, which is orders of magnitude cheaper than the floating-point math required by MLPs.
  • Faster Training: The authors found that using KD with a fixed, "good enough" architecture can be significantly faster than performing an exhaustive hyperparameter search for a baseline DLN, reducing total training time from 13 hours to just 3 hours on the AdultIncome dataset.

Key Results

The results demonstrate that distillation consistently improves DLN performance across diverse tasks:

  • Accuracy Boosts: Significant gains were observed, with the Liver dataset seeing a massive 15.55% improvement over the baseline DLN.
  • Competitive Performance: On many datasets, the distilled DLN reached or exceeded the performance of the MLP teacher while remaining fully interpretable.
  • Inference Cost: Distilled models maintained their efficiency advantage. For example, on the Diabetes dataset, distillation actually produced a model that was both more accurate and roughly 50% smaller in terms of gate count than the baseline.
Table 1: Balanced-class test accuracies for DLNs obtained using KD.

Limitations and Future Work

While highly effective, the benefits of distillation varied by dataset; for instance, the Stroke dataset saw no improvement. The authors also noted that they only utilized output-level distillation.

Future directions include: * Intermediate Matching: Aligning the internal representations of the teacher and student, rather than just the final output. * Specialized Objectives: Designing distillation losses specifically tailored to the discrete structure of logic networks. * Self-Distillation: Exploring "born-again" DLNs where a trained DLN acts as a teacher for a new DLN student.

Summary updated

Abstract

Differentiable logic networks (DLNs) are interpretable, edge-friendly classifiers that learn both their logic operators and their connections through gradient descent, achieving accuracy competitive with multi-layer perceptrons at orders-of-magnitude lower inference cost. Their accuracy, however, is bounded by the problems of vanishing gradients, scalability, and lack of an ecosystem, leaving a gap relative to conventional neural networks on several datasets. We introduce knowledge distillation for DLNs to narrow this gap. We distill from a trained multi-layer perceptron teacher into a DLN student, integrating the distillation objective into a two-phase training loop without altering the architecture or the inference procedure. The teacher is discarded after training. Hence, the distilled model retains the interpretability, sparsity, and inference cost of a conventionally trained DLN. We investigate this approach through four variants: a joint hyperparameter search that optimizes the distillation weight and temperature alongside the architecture, a grid search over these two hyperparameters with the architecture fixed, and two single-phase variants that employ distillation during only the neuron-function or only the connection phase. On 20 public tabular classification tasks, distillation improves balanced-class accuracy at negligible cost to gate-level operation counts and model size, though the benefit varies by dataset. Performance improvements of up to 15% are observed, in some cases surpassing the teacher itself.
BibTeX
@misc{suh2026knowledge,
  author = {Hee Yun Suh and Niraj K. Jha},
  title = {{Knowledge Distillation from Neural Networks to Differentiable Logic Networks}},
  year = {2026},
  eprint = {2611.09024},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09024},
}
Figure