HyperLogic: Enhancing Diversity and Accuracy in Rule Learning with HyperNets

Yang Yang, Wendi Ren, Shuang Li

Introduction

Deep learning has revolutionized predictive modeling, but its inherent "black box" nature remains a major hurdle in high-stakes fields where decisions must be transparent and explainable—such as medical diagnoses, loan approvals, or legal sentencing. To bridge this gap, researchers often turn to differentiable rule learning, which utilizes neural networks to "learn" interpretable logic rules (e.g., IF income > 50k AND debt < 10k THEN approve).

However, there is a significant catch: to maintain interpretability, the architectures of these models must be kept very simple and shallow. This structural rigidity often prevents them from capturing complex, heterogeneous patterns in data, leading to a noticeable "performance gap" between interpretable models and their black-box counterparts.

This raises a critical question: How can we increase the flexibility of these models without sacrificing their clarity? HyperLogic is a novel framework designed to answer this by using hypernetworks to generate weights for interpretable rule-learning models. By learning a distribution of potential rule sets rather than a single static one, it achieves higher accuracy and more concise IF-THEN rules while maintaining strict transparency.

The HyperLogic Framework

HyperLogic separates the "learning" process from the "structure" by employing a Hypernetwork.

  1. The Main Network: This is a shallow, two-layer network designed specifically so that its weights can be directly translated into logic rules. The first layer acts as a "Rule Layer" (performing logical AND operations), and the second acts as an "OR Layer."
  2. The Hypernetwork: Instead of training the main network's weights directly, HyperLogic trains a separate, larger neural network (the hypernet) to generate those weights. The hypernet takes random noise as input and outputs a set of weights for the main network.
  3. Diversity and Sparsity: To ensure the generated rules are both useful and readable, the authors employ a custom loss function. It includes a diversity regularization term (ensuring the hypernet can generate many different valid rule sets) and a sparsity term (ensuring each rule set is concise and easy for a human to parse).
The HyperLogic framework: A hypernetwork generates weights for a rule-learning network, allowing for the extraction of clear IF-THEN rules.

Key Insights and Theoretical Grounding

  • Infinite Experts: HyperLogic can be viewed as a "mixture of experts" model with an infinite number of potential experts. By sampling different noise vectors, users can generate a vast library of candidate rule sets from a single trained model.
  • Theoretical Power: The authors provide mathematical proof showing that HyperLogic acts as a universal approximator in the Barron space. This means it is theoretically as powerful as standard neural networks while remaining fully interpretable.
  • Conciseness as a Side Effect: Interestingly, the added flexibility of the hypernetwork does not just make the model more accurate; it also makes the resulting rules simpler. By exploring a wider parameter space, the model finds more efficient ways to describe the data.
  • Ensemble Potential: Because the hypernet can generate multiple diverse rule sets, users can pick the single best one or use a "voting" ensemble of the top rule sets to further boost predictive performance.

Experimental Results

The framework was evaluated on four popular binary classification benchmarks: MAGIC (gamma telescope data), Adult (census income), FICO HELOC (credit applications), and House (home prices). It was also tested on high-dimensional synthetic data and large-scale biological datasets.

HyperLogic consistently outperformed baseline rule-learning methods like DR-Net, RIPPER, and BRS across all tested datasets.

  • Accuracy: On the MAGIC dataset, HyperLogic achieved 84.90% accuracy, significantly higher than the 83.69% of its closest neural competitor, DR-Net.
  • Complexity: HyperLogic produced rules that were both fewer in number (lower model complexity) and shorter in length (lower rule complexity) compared to DR-Net.
Comparison of model and rule complexity: HyperLogic consistently produces more concise rules than the baseline DR-Net across multiple datasets.
  • Scalability: In high-dimensional synthetic tests (up to 5,000 dimensions), HyperLogic showed an average 6% increase in F1 score over vanilla methods, proving it handles complex, noisy data better than traditional rule learners.

Limitations and Future Work

While HyperLogic is highly effective, it introduces new hyperparameters—such as the number of samples and the diversity coefficient—that require careful tuning. Furthermore, while the model generates many high-quality rule sets, selecting the absolute "best" one for a specific real-world application still benefits from human oversight.

Future research will focus on more stable ways to combine weights and applying the HyperLogic framework to non-binary classification tasks and broader, more complex datasets.

Summary updated

BibTeX
@inproceedings{yang2024hyperlogic,
  author = {Yang Yang and Wendi Ren and Shuang Li},
  title = {{HyperLogic: Enhancing Diversity and Accuracy in Rule Learning with HyperNets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=gJbZyKGfd6},
}
Figure