Knowledge Distillation from Neural Networks to Differentiable Logic Networks
Organizations: Dept. of Electrical and Computer Engineering, Princeton University, Princeton, NJ
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.
Figures & tables
| Original | Knowledge Distillation | |||||
|---|---|---|---|---|---|---|
| Data set | MLP (teacher) | DLN | Joint HPO | Grid Search | Neuron Phase | Connection Phase |
| BankChurn | 85.20 | 78.64 | 78.13 | 77.48 | 75.91 | 79.03 |
| BreastCancer | 77.80 | 65.55 | 67.37 | 67.37 | 62.89 | 63.17 |
| Cardio | 99.20 | 97.72 | 99.07 | 97.88 | 97.30 | 97.80 |
| CKD | 99.00 | 100.0 | 98.65 | 98.39 | 98.33 | 100.0 |
| Cirrhosis | 58.80 | 45.62 | 47.20 | 51.49 | 47.97 | 53.99 |
| Original | Knowledge Distillation | |||||
|---|---|---|---|---|---|---|
| Data set | MLP (teacher) | DLN | Joint HPO | Grid Search | Neuron Phase | Connection Phase |
| BankChurn | 7.67M | 1.6K | 4.6K | 3.7K | 2.6K | 2.8K |
| BreastCancer | 93.7M | 358 | 1.3K | 358 | 211 | 1.8K |
| Cardio | 13.1M | 109.2K | 6.4K | 6.5K | 6.0K | 4.9K |
| CKD | 29.7M | 5.1K | 3.7K | 1.6K | 2.6K | 2.7K |
| Cirrhosis | 9.10M | 2.8K | 2.1K | 5.1K | 3.2K | 1.3K |
| Original | Knowledge Distillation | |||||
|---|---|---|---|---|---|---|
| Data set | MLP (teacher) | DLN | Joint HPO | Grid Search | Neuron Phase | Connection Phase |
| BankChurn | 12.4K | 44 | 162 | 99 | 58 | 70 |
| BreastCancer | 151.0K | 82 | 511 | 83 | 58 | 683 |
| Cardio | 21.1K | 1839 | 179 | 250 | 296 | 206 |
| CKD | 47.6K | 283 | 91 | 105 | 62 | 73 |
| Cirrhosis | 14.7K | 38 | 37 | 135 | 123 | 23 |
Knowledge Distillation
Knowledge distillation transfers useful behavior or representations from larger or specialized models into more compact or adaptable learners.
See all 862 papers