arXiv(opens in a new tab)cs.LGNov 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2611.09024

Knowledge Distillation from Neural Networks to Differentiable Logic Networks

Hee Yun Suh, Niraj K. Jha

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.

1 Introduction

Interpretable machine learning has increasingly turned from explaining trained black-box models to building models that are interpretable by construction [Rudin, 2019]. Among the latter, networks built from logic gates have recently emerged as a compelling option for tabular classification. Deep differentiable logic gate networks (DDLGNs) [Petersen et al., 2022] and differentiable logic networks (DLNs) [Yue and Jha, 2024] replace the weighted sums of a conventional network with real Boolean operators, so that a trained model is a logic network whose decisions can be interpreted directly. These networks attain accuracy competitive with multi-layer perceptrons (MLPs) while executing as sparse Boolean computation at orders-of-magnitude lower inference cost [Yue and Jha, 2024] through training with differentiable relaxation, real-valued logic during optimization, and discretization to hard gates for inference.

The same works also document that the efficiency and transparency come at the cost of logic networks being difficult to train and quick to saturate. Because every layer in the logic network is relaxed through Softmax and sigmoid functions, the gradient signal attenuates as it propagates backward through the stack. This is a vanishing-gradient effect that both prior works identify as a central training obstacle. It limits the depth at which these networks remain trainable [Petersen et al., 2022, Yue and Jha, 2024]. The practical consequence is an accuracy ceiling reached early. In the results presented in [Yue and Jha, 2024], we observe that on several tabular datasets, a DLN trails a conventional neural network in performance and, unlike neural networks, additional capacity does not reliably close the gap. Neural networks, meanwhile, benefit from a large and mature ecosystem, such as architectural components [He et al., 2016], optimizers [Kingma and Ba, 2014], normalization schemes [Ioffe and Szegedy, 2015], and training infrastructure [Paszke et al.,

A PREPRINT

2019]. This ecosystem has made scaling to higher accuracy comparatively routine. The interpretable logic network is thus easier to trust but harder to improve.

We observe that this asymmetry is precisely the setting in which knowledge distillation (KD) is useful. KD was introduced as a means to compress the capability of a large model into a smaller one [Hinton et al., 2015]. Subsequent work has transferred teacher capability to students that are structurally constrained, such as quantized networks [Polino et al., 2018, Mishra and Marr, 2017], binary networks [Leroux et al., 2020], and decision trees [Frosst and Hinton, 2017]. A DLN is also a constrained student, as its expressiveness is bounded not by parameter count but by its discrete operators and sparse wiring. Prior work has translated trained networks to logic representations by fitting intermediate models to quantized activations and compiling to AND-Inverter graphs [Brudermueller et al., 2020]. However, this is a post-hoc translation of a fixed logic network rather than a distillation objective, and it inherits an accuracy loss during quantization and compilation. To our knowledge, distillation of neural networks into relaxation-trained logic networks has not been studied, and whether the soft-target signal that benefits conventional students transfers to a model so tightly constrained by discrete operators and sparse wiring is an open question.

In this article, we distill knowledge from a trained neural-network teacher into a DLN student, motivated by DLN's specific training pathology rather than by the need for compression. A one-hot label provides only a sparse error signal at the aggregation layer, where the DLN's backward pass originates. A teacher's softened distribution supplies a denser, better-scaled gradient at that layer. The teacher participates only during training and is discarded at inference; hence, the distilled DLN retains the interpretability, sparsity, and inference cost of a conventionally trained DLN while inheriting accuracy it cannot otherwise reach.

Our main contributions are as follows.

  • We formulate a KD methodology for DLNs, integrating the distillation objective into its two-phase training procedure without altering the architecture or the inference procedure.
  • We compare several distillation variants, including a dedicated grid search and distillation applied, respectively, to the neuron-function phase, the connection phase, or both, to determine which yields the most accurate distilled DLN.
  • We evaluate the methodology on 20 public tabular datasets, reporting accuracy alongside gate-level operation counts and model size, and show that distillation improves accuracy without increasing inference cost.

The remainder of this article is organized as follows. Section II discusses related work. Section III describes the distillation protocol, model training, and implementation details. Section IV presents experimental results. Section V provides concluding remarks and directions for future research.

References (36)