What Do Differentiable Rule Learners Need? FLARE: Fuzzy Rules with Additive Evidence
Organizations: School of Computer Science and Electronic Engineering, University of Essex, Colchester, United Kingdom
Abstract
Rule learners are used where transparency and accountability are required, because they give practitioners patterns they can read. Learning rules is a discrete problem, so neurosymbolic pipelines that use rules as explanations rely on relaxations such as the straight-through estimator. However, these differentiable rule learners often lag behind both classical rule learners and black-box classifiers in terms of performance. We study which parts of a rule-based classifier affect performance, and how well gradient-based training learns each of them. We found that most of the performance comes from how the rules are weighted: random rules with learned weights are already more accurate than every published differentiable rule learner we tested. Based on our results, we propose FLARE (Fuzzy Learned-Antecedent Rule Evidence), a differentiable rule learner that learns simple rules that combine to make the final decision. We also propose a learned encoding for variables with thousands of categories. We test FLARE on tabular data, using 42 datasets of OpenML-CC18 and the 38 classification tasks of TabArena. On CC18, FLARE exceeds the compared rule learners by 7.69 to 12.38 macro-F1 points and performs comparably to random forests, while remaining 1.00 to 1.11 points below tuned gradient-boosted trees. On TabArena it ranks at the same level as random forests and ahead of the other rule learners. As the concept-to-label head of a concept bottleneck model, FLARE is the best rule-based head in five of six settings. On graphs, it is competitive on PubMed and EMOGI but falls behind graph neural networks on Cora and Citeseer. Our code is available at https://github.com/Fuminides/FLARE
Figures & tables
| CC18 | TabArena | |||||
| Method | Macro-F1 | Rank | ROC AUC | Log-loss | Rank | |
| FLARE | 77.67 0.11 | 5.29 | 0.825 | 0.348 | 6.63 [6.18, 7.11] | |
| -explainability | 74.00 0.11 | 10.48 | 0.794 | 0.379 | 9.79 [9.26, 10.29] | |
| Rule and tree | RuleFit | 74.40 0.21 | 9.79 | 0.817 | 0.461 | 7.97 [7.26, 8.66] |
| baselines | CART | 73.48 0.21 | 10.74 | 0.668 | 4.215 | 16.24 [15.63, 16.87] |
| FIGS | 72.64 0.23 | 10.67 | 0.774 | 0.817 | 11.18 [10.50, 11.84] | |
| As | Refitted weights | Other estimator | |||
|---|---|---|---|---|---|
| Method | published | Own | Random | Best | Gain |
| RRL | 67.00 | 71.34 | 66.26 | Soft | |
| RL-Net | 63.53 | 66.64 | 52.49 | Grafting | |
| DR-Net | 57.89 | 59.49 | 51.16 | Grafting | |
| GradTree | 60.76 | 61.51 | 51.82 | ST-id | |
| Random trees | – | – | 72.24 | – | – |
| CUB | SUN | Derm7pt | ||||
| Head | GT | Pred. | GT | Pred. | GT | Pred. |
| FLARE | 44.27 | 43.93 | 12.73 | 12.44 | 35.06 | 45.35 |
| 1.27 | 0.76 | 0.64 | 0.84 | 2.06 | 2.81 | |
| Logistic regression | 45.53 | 43.58 | 12.69 | 10.89 | 39.53 | 36.52 |
| 0.72 | 0.60 | 0.82 | 0.24 | 4.21 | 0.17 | |
| LogicCBM | 40.41 | 38.50 | 8.35 | 7.06 | 32.97 | 28.77 |
| Method | EMOGI | Cora | Citeseer | PubMed |
|---|---|---|---|---|
| FLARE | 76.21 | 76.60 | 57.00 | 78.03 |
| 0.80 | 0.79 | 1.56 | 1.94 | |
| Logistic regression | 71.42 | 64.80 | 53.70 | 66.50 |
| 0.00 | 0.00 | 0.00 | 0.00 | |
| SGC | 67.84 | 75.50 | 65.20 | 73.30 |
| 0.32 | 0.00 | 0.00 | 0.00 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Name | What is run |
|---|---|
| As published | The method as it is trained and deployed. |
| Refitted weights | The rules learned by the method (for a tree, its leaves) become 0/1 features of a class-balanced logistic regression, whose regularisation strength is chosen by cross-validation on the training rows. |
| Random structure | Use randomly-selected rules instead of the searched rules from the models. Rule class weights fitted as above. |
| No search | FLARE trained with no gradient to the selectors: the rules keep their random initial conditions and only the points and biases are learned. |
| Enumeration | FLARE with one rule for every pair of variable and label, so that no one-condition rule has to be searched for; only the points and biases are learned. |
| As | Own rules, | Gain from | Random rules, | Own | W/T/L | |
|---|---|---|---|---|---|---|
| Method | published | refitted weights | refitting | refitted weights | random | (own vs. random) |
| RRL | 67.00 | 71.34 | 66.26 | 37/2/3 | ||
| RL-Net | 63.53 | 66.64 | 52.49 | 41/0/1 | ||
| DR-Net | 57.89 | 59.49 | 51.16 | 32/6/4 | ||
| GradTree | 60.76 | 61.51 | 51.82 | 39/1/2 | ||
| Random trees | – | – | – | 72.24 | – | – |
| Comparison (A against B) | A | B | A B | W/T/L | |
| Searched rules against no search | |||||
| Single model | 73.62 | 71.26 | 24/9/9 | ||
| Mixed rule base | 74.06 | 71.61 | 27/8/7 | ||
| Bagged single model | 75.70 | 74.79 | 19/15/8 | 0.03 | |
| FLARE-simple | 76.75 | 74.98 | 27/11/4 | ||
| Enumeration of every one-condition rule against the searched single model | |||||
| CC18 | TabArena | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Learner | ST | ST-id | ST-clip | Grafting | Soft | ST | ST-id | ST-clip | Grafting | Soft |
| RRL | 31.10 ∗ | = | 31.10 ∗ | 66.84 | 58.80 ∗ | 37.40 ∗ | = | 37.38 ∗ | 62.79 | 56.05 ∗ |
| RL-Net | 63.65 | 32.56 ∗ | = | 58.54 ∗ | 55.11 ∗ | 63.96 | 38.81 ∗ | = | 58.46 ∗ | 53.73 ∗ |
| DR-Net | 57.98 | 34.80 ∗ | = | 63.21 ∗ | 41.26 ∗ | 60.79 | 41.04 ∗ | = | 62.08 ∗ | 47.89 ∗ |
| GradTree | 60.71 | 61.54 | 54.85 ∗ | 59.59 | 57.07 ∗ | 60.23 | 63.62 ∗ | 52.92 ∗ | 58.33 ∗ | 56.41 ∗ |
| NeuRules | 59.55 ∗ | 52.62 ∗ | 53.02 ∗ | 62.90 | 63.96 | 60.29 ∗ | 53.84 ∗ | 49.11 ∗ | 60.31 ∗ | 63.70 |
| Single model | Mixed rule base | |||||
|---|---|---|---|---|---|---|
| Estimator | F1 | Difference | F1 | Difference | ||
| CC18 | ||||||
| Gradient grafting ( lowered during training) | 73.60 | – | – | 74.17 | – | – |
| Straight-through ( fixed at 1) | 73.02 | 0.54 | 74.16 | 0.96 | ||
| Straight-through, identity | 73.71 | 0.78 | 74.29 | 0.85 | ||
| Straight-through, clipped | 69.78 | 69.99 | ||||
| Configuration | F1 | Gain | W/T/L | |
|---|---|---|---|---|
| Single model with 100 searched one-condition rules | 73.62 | – | – | – |
| 20 rules of up to two conditions (mixed rule base) | 74.06 | 16/15/11 | 0.12 | |
| eight bags merged into one rule base | 76.48 | 36/6/0 | ||
| slower steps for selectors and interaction rules (FLARE-simple) | 76.77 | 13/25/4 | 0.03 | |
| “at most” and “at least” conditions, up to three conditions in the interaction rules, learned crossings (FLARE) | 77.24 | 17/21/4 |
| Dataset | Rows | Variables | Classes | Dataset | Rows | Variables | Classes |
|---|---|---|---|---|---|---|---|
| adult | 48,842 | 14 | 2 | ilpd | 583 | 10 | 2 |
| analcatdata_authorship | 841 | 70 | 4 | jm1 | 10,885 | 21 | 2 |
| analcatdata_dmft | 797 | 4 | 6 | jungle_chess_2pcs_raw_endgame_complete | 44,819 | 6 | 3 |
| balance-scale | 625 | 4 | 3 | kc1 | 2,109 | 21 | 2 |
| bank-marketing | 45,211 | 16 | 2 | kc2 | 522 | 21 | 2 |
| banknote-authentication | 1,372 | 4 | 2 | kr-vs-kp | 3,196 | 36 | 2 |
| Task | Train. rows | Var. | Cl. | Splits | Task | Train. rows | Var. | Cl. | Splits |
|---|---|---|---|---|---|---|---|---|---|
| Amazon_employee_access | 21,846 | 9 | 2 | 9 | hiva_agnostic | 2,563 | 1,617 | 3 | 9 |
| anneal | 599 | 38 | 5 | 30 | HR_Analytics_Job_Change_of_Data_Scientists | 12,772 | 12 | 2 | 9 |
| APSFailure | 50,667 | 170 | 2 | 9 | in_vehicle_coupon_recommendation | 8,456 | 24 | 2 | 9 |
| bank-marketing | 30,141 | 13 | 2 | 9 | Is-this-a-good-customer | 1,149 | 13 | 2 | 30 |
| Bank_Customer_Churn | 6,667 | 10 | 2 | 9 | jm1 | 7,257 | 21 | 2 | 9 |
| Bioresponse | 2,501 | 1,776 | 2 | 9 | kddcup09_appetency | 33,333 | 212 | 2 | 9 |
| Dataset | Concepts | Classes | Split | Notes |
|---|---|---|---|---|
| CUB, per image | 112 | 200 | 4,794 / 1,200 / 5,794 | annotations of each image |
| SUN Attribute | 102 | 717 | 11,472 / 1,434 / 1,434 | attribute votes cut at 0.5 |
| Derm7pt | 12 | 5 | 413 / 203 / 395 | split of Kawahara et al. (2019) |
| Synthetic (4 tasks) | 10 | 5 | 2,000 / 500 / 1,000 | known conjunctions for each class |
| Graph | Variables | Classes | Split | Nodes and metric |
| Cora | 1,433 | 7 | 140 / 500 / 1,000 | 2,708 nodes, accuracy |
| Configuration | Partitions | |||
|---|---|---|---|---|
| FLARE | 8 | 3 | learned | |
| pair limit | 8 | 3 | learned | |
| one model | 1 | 3 | learned | |
| FLARE-explainability | 1 | 3 | learned | |
| 20 rules | 1 | 3 | learned | |
| FLARE-simple | 8 | 2 | fixed |
| Hyperparameter | Value | Tuned in |
|---|---|---|
| Labels per real variable | 7 | |
| Rules per model | 120 | |
| Share of one-condition rules | ||
| Slots of an interaction rule | 3 | |
| Averaged models | 8 | |
| Temperature of the selectors | 5 |
| Method | Implementation | Tuned hyperparameters |
|---|---|---|
| XGBoost | xgboost , histogram trees | trees log; depth ; learning rate log; row and column subsampling ; minimum child weight log; L2 penalty log; class weights on or off |
| LightGBM | lightgbm | trees log; leaves log; learning rate log; row and column subsampling ; minimum rows per leaf log; L2 penalty log; class weights on or off |
| CatBoost | catboost | trees log; depth ; learning rate log; L2 penalty of the leaves log; class weights on or off |
| RIPPER | wittgenstein | optimisation runs ; share of pruning rows ; description length allowance log; bins |
| CORELS | corels , 100,000 iterations | regularisation log; maximum conditions per rule ; bins ; minimum support log |
| CLASSY | rulelist | maximum conditions per rule ; beam width ; cut points ; maximum rules |
| CC18 | TabArena | |||||||
|---|---|---|---|---|---|---|---|---|
| Method | W/T/L | rank | W/L | rank | ||||
| -explainability | 42 | 38/4/0 | 38 | 36/2 | ||||
| GRANDE | 36 | 17/13/6 | 0.007 | 37 | 18/19 | 0.521 | ||
| CART | 42 | 31/8/3 | 38 | 38/0 | ||||
| FIGS | 42 | 36/3/3 | 38 | 38/0 | ||||
| RuleFit | 42 | 33/5/4 | 38 | 26/12 | 0.003 | |||
| Rule | Points | Rule | Points |
|---|---|---|---|
| capital-gain is very high | age is mature | ||
| capital-gain is high | fnlwgt is very low | ||
| relationship is Own-child | race is Black | ||
| relationship is Unmarried and sex is Female | education-num is fairly low or lower | ||
| age is very young and capital-gain is medium or lower | relationship is Unmarried | ||
| relationship is Not-in-family | age is young adult |
| Method | Median | Mean | Method | Median | Mean |
|---|---|---|---|---|---|
| FLARE | 34.5 | 121.8 | RRL | 8.3 | 87.9 |
| FLARE-explainability | 7.3 | 11.6 | RL-Net | 333.9 | 511.3 |
| XGBoost | 0.2 | 0.7 | NeuRules | 35.4 | 378.5 |
| LightGBM | 0.2 | 0.6 | DR-Net | 95.0 | 616.0 |
| CatBoost | 7.6 | 19.7 | GradTree | 4.4 | 17.7 |
| RIPPER † | 2.2 | 66.2 | GRANDE † | 672.6 | 2255.5 |
| Models rules | Budget | Macro-F1 | Rules kept | Time (s) | GPU memory (GiB) |
|---|---|---|---|---|---|
| 20 | 72.04 | 18.3 | 9.8 | – | |
| 40 | 74.00 | 32.8 | 11.6 | – | |
| 120 | 74.94 | 67.2 | 19.2 | – | |
| 250 | 75.03 | 106.0 | 33.6 | 5.9 | |
| 500 | 75.06 | 162.8 | 62.0 | 10.0 | |
| 40 | 71.72 | 26.3 | 21.1 | 2.6 |
| Method | EMOGI | Cora | Citeseer | PubMed |
|---|---|---|---|---|
| FLARE | 76.21 0.80 | 76.60 0.79 | 57.00 1.56 | 78.03 1.94 |
| FIGS | 65.38 0.00 | 57.70 1.23 | 46.83 0.21 | 59.57 1.10 |
| CART | 40.34 0.15 | 65.13 1.00 | 46.83 2.10 | 59.97 1.05 |
| CLASSY | 44.98 0.00 | 47.70 0.00 | 45.70 0.00 | 49.90 0.00 |
| RIPPER | 42.67 1.85 | 49.07 3.11 | 35.67 1.72 | 44.27 3.50 |
| RL-Net | 55.03 1.83 | 16.13 9.40 | 17.40 1.21 | 41.97 1.70 |