cs.AIOct 30, 2026

Efficient NPN Classification for Large Functions using Graph Neural Network

Authors: Chengdi Cao, Hanyu Wang, Wan-Hsuan Lin, Jason Cong

Organizations: University of California, Los Angeles, Los Angeles, CA, USA

Abstract

Two Boolean functions are considered NPN equivalent if one can be transformed into the other by negating inputs, permuting inputs, or negating the output. Efficient NPN classification is valuable in fields such as logic synthesis, quantum computing, and information theory. However, exact NPN classification demands exhaustive enumeration of all possible input permutations and negations. Its complexity grows exponentially, making it impractical for larger functions with more inputs. In this paper, we introduce the first learning-based formulation for NPN classification by recasting it as NPN action prediction. Our method represents Boolean functions as AND-Inverter Graphs (AIGs) and applies a bidirectional heterogeneous graph neural network to predict input negations, output negation, and input permutations. To mitigate the non-canonicity of logic networks, we further introduce graph rewriting techniques that reduce structural ambiguity and recover useful symmetries before prediction. Experimental results show that NPN action prediction is learnable, that the resulting canonicalization quality improves over heuristic baselines, and that on practical benchmarks our method approaches exact methods on tractable cases while scaling to functions with up to 16 inputs.

Figures & tables

Explore similar work

Mar 15, 2026

Scaling the Explanation of Multi-Class Bayesian Network Classifiers

We propose a new algorithm for compiling Bayesian network classifier (BNC) into class formulas. Class formulas are logical formulas that represent a classifier's input-output behavior, and are crucial in the recent line of work that uses logical reasoning to explain the decisions made by classifiers. Compared to prior work on compiling class formulas of BNCs, our proposed algorithm is not restricted to binary classifiers, shows significant improvement in compilation time, and outputs class formulas as negation normal form (NNF) circuits that are OR-decomposable, which is an important property when computing explanations of classifiers.
Aug 11, 2025

Neural Logic Networks for Interpretable Classification

Traditional neural networks have an impressive classification performance, but what they learn cannot be inspected, verified or extracted. Neural Logic Networks on the other hand have an interpretable structure that enables them to learn a logical mechanism relating the inputs and outputs with AND and OR operations. We generalize these networks with NOT operations and biases that take into account unobserved data and develop a rigorous logical and probabilistic modeling in terms of concept combinations to motivate their use. We also propose a novel factorized IF-THEN rule structure for the model as well as a modified learning algorithm. Our method improves the state-of-the-art in Boolean networks discovery and is able to learn relevant, interpretable rules in tabular classification, notably on examples from the medical and industrial fields where interpretability has tangible value.
Nov 10, 2026

DeNA-SGN: Deterministic Neighborhood Aggregation for Verified Spiking Graph Inference

Graph learning on neuromorphic substrates requires an explicit spiking realization of neighborhood aggregation, supporting control and classification. We propose DeNA-SGN, which combines fixed OR and tie-inclusive Majority aggregation of binary node features with a learned signed-weight threshold classifier. A degree-dependent inhibitory construction implements Majority through shared control neurons, enabling a complete circuit compilation into SuperNeuroMAT. Across seven datasets and 41 mapped classifiers, native simulation matches the exported ANN on every evaluated class decision and output-spike pattern. On the new confirmatory Amazon Photo dataset, DeNA-SGN achieves 83.93+-0.93% current-readout accuracy and 71.61+-2.22% strict output-spike accuracy; Wiki-CS reaches 75.99+-0.54% over 20 public masks. In the matched Cora study, we achieve 74.90+-2.67% on current-readout and 68.57+-2.94% strict spike accuracy. Complete circuit and activity accounting supports analytical energy comparisons and identifies the cost of clocking inactive neurons in large deployments. Current argmax is decoded on the host, and energy is modeled rather than measured on hardware. These findings establish a reproducible route to useful graph classification with decision-matched spiking execution and explicit implementation costs.