Logical Neural Unit: Order-Statistic Neuron
Abstract
The core primitives of modern networks (inner products, attention, and gating) all aggregate by weighted sums, and a weighted sum responds to every input at once. So they are a poor fit for sparse logical structure: a target whose label is set by a few of many features through AND/OR/threshold logic. On such targets the relevant signal is diluted by the irrelevant ones, and the samples needed to recover it grow with the feature count, the regime where decision trees and rule learners still outperform deep networks on scientific data. But logic is not built from sums: AND and OR are extrema (min and max), each decided by a single coordinate, and with negation they form the complete basis for such targets. No dominant neural primitive computes an extremum; the networks that do implement logic directly (logic-gate and lookup-table nets) require binarized inputs and target hardware cost, and tree and rule learners are not differentiable. We introduce Logical Neural Units (LNUs)}: differentiable order-statistic neurons that compute soft AND (softmin) and OR (softmax) over , with a sharpness knob from averaging to exact logic. Their gradient concentrates on a single coordinate with sensitivity independent of ; we prove a PAC sample-complexity separation: LNU's sample requirement grows only logarithmically with the feature count, versus linearly for MLPs, Transformers, and prior differentiable-logic neurons ( versus ). Empirically, under one matched protocol, LNU reaches 92–100% on non-parity canonical Boolean formulas (neural baselines below 79% at ), loses 0.6pp under distractors (versus 21.8pp for an MLP), beats DWN by –pp on continuous logical tasks, and outperforms tree ensembles and MLPs on real-world few-shot scientific data (DNA splice sites: pp over XGBoost, pp over MLP). LNU is a drop-in structural inductive bias, useful when the target is Boolean-structured; we report where it is not.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.