# An Interpretable Rule Creation Method for Black-Box Models based on
Surrogate Trees - SRules

Mario Parrón Verdasco  and  Esteban García-Cuesta  Departamento de
Inteligencia Artificial, Universidad Politécnica de MadridMadridSpain.
Corresponding author<EMAIL_ADDRESS>
###### Abstract.

As artificial intelligence (AI) systems become increasingly integrated into
critical decision-making processes, the need for transparent and interpretable
models has become paramount. In this article we present a new ruleset creation
method based on surrogate decision trees (SRules), designed to improve the
interpretability of black-box machine learning models. SRules balances the
accuracy, coverage, and interpretability of machine learning models by
recursively creating surrogate interpretable decision tree models that
approximate the decision boundaries of a complex model. We propose a
systematic framework for generating concise and meaningful rules from these
surrogate models, allowing stakeholders to understand and trust the AI
system’s decision-making process. Our approach not only provides interpretable
rules, but also quantifies the confidence and coverage of these rules. The
proposed model allows to adjust its parameters to counteract the lack of
interpretability by precision and coverage by allowing a near perfect fit and
high interpretability of some parts of the model . The results show that
SRules improves on other state-of-the-art techniques and introduces the
possibility of creating highly interpretable specific rules for specific sub-
parts of the model.

XAI, black-box, decision trees, rule extraction, feature importance

††ccs: Computing methodologies Machine learning approaches

##  1\. Introduction

Although the origins of artificial intelligence (AI) can be traced back
several decades, there is presently a widely held agreement that intelligent
machines equipped with abilities to learn, reason and adapt hold paramount
importance. Recently, the sophistication of AI-powered systems has advanced to
a degree where the need for human intervention in their design and deployment
has become almost negligible.

Over the past few years, non-interpretable techniques such as deep learning
neural networks or ensemble methods, commonly referred to as black-box
techniques (Castelvecchi, 2016), have emerged. Despite their lack of
interpretability, these methods have demonstrated remarkable efficacy in
solving intricate problems.

Conversely in fields such as medicine (González-Alday et al., 2023), law, or
defense, where decisions resulting from AI methodologies ultimately impact
human lives, there is a growing need for comprehending how such decisions are
generated. Explainable AI (XAI) aims to bridge the gap between the remarkable
predictive capabilities of complex machine learning models and the human need
for understanding and trust. (Gunning, 2017; Barredo Arrieta et al., 2020).
Based on the definition given by Barredo et al.(Barredo Arrieta et al., 2020)
” Given an audience, an explainable Artificial Intelligence is one that
produces details or reasons to make its functioning clear or easy to
understand.”

Our proposed method addresses the issues inherent in ensemble models like
random forest (Breiman, 2001a) or deep neural networks, although it can be
extended to any black-box model. A black-box model can be formulated as
$b:X\to y,b(x)=y$ with $b\in B$, where $B\subset H$ gives the model’s
hypothesis space (Ali et al., 2023). For instance, $B=$ random forest with 100
estimators. Such models lose the ability to provide explanations for their
results as a decision tree or a system of rules does. Supervised ML is aimed
at minimizing a given error metric (usually RMSE or hinge loss for binary
classification)

$h^{*}=arg\,min_{h\in H}\frac{1}{|n|}\sum_{x\in X}^{n}L(h(x_{i}),y_{i})$

, where $h^{*}$ is the optimized model with the samllest loss.

Thus, our proposition advocates for a post-hoc approach that commences with a
black-box machine learning and subsequently generates a surrogate
interpretable rule-based classifier based on the most important features
obtained for that black-box. Separating a black-box model from its
explanation, according to (Tulio Ribeiro et al., 2016), provides better
accuracy, flexibility, and usability. Surrogate models may be classified as
global or local and it can be supervised by fitting

$S^{*}=arg\,min_{w\in I}\frac{1}{|X|}\sum_{x\in X}^{n}FS(F(x),B(x))$

being $w$ the hyperparameters of the surrogate model $S^{*}$, and
$X=\\{x_{1},x_{2},\ldots,x_{n}\\}$ a subset of the entire training dataset
$D$, or unsupervised assuming some inherent structure or patterns that can be
explored and extracted from the black-box model to construct an interpretable
model. In this paper we present an unsupervised and local method that focus on
ensembles (e.g. random forest) and has inherent capabilities for obtaining
feature importances (e.g. gini impurity o permutation test in random
forest(Breiman, 2001b)) but other XAI post-hoc model agnostic techniques (e.g.
SHAP(Lundberg and Lee, 2017) or LIME (Tulio Ribeiro et al., 2016)) can also be
used to obtain the feature importance for other ML models that doesn’t have an
specific feature importance extraction method.

There are other approaches that can obtain a global set of rules from random
forest combining the individual set of rules somehow. Examples of these type
of methods are RuleFit (RF+RFIT) (Friedman and Popescu, 2008) and RuleCosi
(RF+RC) (Obregon and Jung, 2023). The RuleFit algorithm consists of using both
original features and new decision rules generated from decision trees. These
decision rules capture interactions between the original features. RuleFit
transforms each path through a tree into a decision rule by combining split
decisions, and discards node predictions, using only the splits in the
decision rules. The resulting model is a sparse linear model that captures
complex interactions between the original features and the decision rules. In
a manner akin, RuleCosi (Obregon and Jung, 2023) leverages each decision tree
path to derive a set of rules. These rules are subsequently combined and
pruned, keeping only the combined rules that have better results, to yield a
more parsimonious set of rules. In this paper we compare our results with
RuleCosi and RuleFit to show our increased performance and more importantly
the ability of the method to learn high accuracy rule sets for some parts of
the analyzed problem.

##  2\. Rule-set Creation Based on Conditional Information Gain

A single decision tree can be converted into a set of production rules. The
number of production rules that can be extracted from a decision tree is the
same as the number of leaf nodes of the tree. In (Obregon and Jung, 2023;
Obregon et al., 2019; Sirikulviriya and Sinthupinyo, 2011; Bénard et al.,
2021; Friedman and Popescu, 2008; Deng, 2014) different authors combine, using
different methods, the set of rules obtained from the different weak learners
to build a set of rules that describe the different parts of the problem that
each of these weak learners has learned. Instead, we create recursively a set
of rules based on surrogate tree models created using the most important
features of an ensemble learned recursively using only the set of data that
has not been already covered by the learned set of rules. The most important
features are obtained by the analyzing the impurity associated to the
application of a feature to a node and averaging it over all the weak
learners. Gini impurity (Breiman, 2001b) measures the decrease on impurity
when a split is performed. A feature that contributes to reduce the impurity
is considered important and vice-versa. Gini impurity is defined as:
$\hat{\Gamma}(t)=\sum_{j=1}^{J}\hat{\Phi}(t)(1-\hat{\Phi}(t)$, where
$\hat{\Phi}(t)$ is the class frequency for class $j$ in the node $t$. The
decrease of impurity is the difference between a node’s impurity and the
weighted sum of the impurity measures of the two child nodes (the Gini index).

In the next, the definition of a production rule is presented, and the
performance measures of a set of production rules are explained following the
same nomenclature as (Obregon and Jung, 2023).

Definition 1 (Output of a boosting ensemble of binary decision trees). The
boosting ensemble of the binary decision trees produces a classification model
$H(x)=\\{(h_{n}(x),w_{n})\\}$ for $n=1$ to $N$ week learners. A base decision
tree $h_{n}(x)$ was derived from data examples in the training set D, and w
contains weights $w_{n}$ associated to each decision tree $h_{n}(x)$.

Definition 2 (Production rule). Let a rule r be in the form r: $A\to y$, where
A is a set of conditions $a\in A$, also called left hand side of the rule
(LHS), and $y$ is the consequent class, also called the right hand side of the
rule (RHS). A condition $a$ is an evaluation expression between an attribute
$x_{ij}$ and a value using an operator such as equal ($=$), not equal
($\neq$), less than ($<$), greater than ($>$), less than or equal to ($le$),
or greater than or equal to ($\geq$). In our case we are limiting the
algorithm to equal ($=$), and not equal ($\neq$) operators (binary inputs).

Production rules are grouped into rulesets $R$. A rule $r$ covers a record
$x_{i}$ if the conditions of the LHS of a rule are satisfied using the
attributes of $x_{i}$. To measure the performance of a ruleset, each record of
a dataset $D$ is evaluated to check if it triggers at least one rule $r$ of
the ruleset $R$. Then, the coverage $c$ of a ruleset $R$ over a dataset $D$ is
given by the fraction of records in $D$ that trigger, at least, one rule of
the ruleset $R$. Aditionally, the accuracy or confidence factor of the rule is
given by the fraction of records in $D$ triggered by, at least, one rule of
the ruleset $R$ whose class labels are equal to $y$.

For measuring the performance of the ensemble models and the SRules model, the
confusion matrix is utilized.

Definition 3 (Rule generation from a surrogate decision tree extracted from
ensemble). Given an ensemble of weak learners $H(X)$ (e.g. decision trees)
which contains multiple weak learners $h_{n}(x)$ for $n=1$ to $N$ and a weight
vector $w$ of size $N$, the problem of rule generation is to derive a set of
simplified production rules $R*$ from $H(X)$. The ruleset $R^{*}$ is required
to maintain or increase the performance of $H(X)$ with a minimum set of
simplified production rules $R^{*}$ and the maximum possible coverage $c$. The
first step of the methodology consists in taking the output of a trained
ensemble and extracting an ordered set of features importance $F^{*}$ of the
model. Using $F^{*}$, a surrogate binary tree ($SBT$) is constructed starting
the root node with the most important feature and splitting each node with the
next most important features. On the second step, we use a conditional
$\tilde{\chi}^{2}$ importance (Wang et al., 2010) pattern selection method to
select those branches of the binary tree that are relevant to the problem
under the null hyptothesis that no pattern exist for the splitting of a node
$j$, conditional to the previously seen nodes of the branch.

Let $L_{i}^{j}$ be the list of ordered features $F^{*}$ that precede feature
$f_{i}$ in its split of the $j-th$ node of the tree. Let be the pattern under
analysis the set $S_{i}=\\{X_{i}^{j}|L_{i}^{j},j=1,\ldots,n_{i}\\}$ and the
pattern $P_{i}^{j}=\\{X_{i}^{j},L_{i}^{j},\ldots,L_{i}^{j-n}\\}$ importance is
then obtained using the data samples assigned to the tree by:

$P_{i}^{j}=\sum_{k=1}^{c}\sum_{s=1}^{ns}\frac{(O_{ks}-E_{ks})^{2}}{E_{ks}}$

being $c$ the number of categories of the feature $i$, and $s$ the number of
splits of the node $L_{i}^{j}$, and

$E_{ks}=T_{ks}*Freq_{ki}$

being $Freq_{ki}$ the frequency of category $k$ for node-feature $i$ (parent)
and $T_{ks}$ the total number of samples of node-feature $s$ (child). This has
been also studied by (in an unpublished work) to extract feature importance in
an heuristic way as the difference in expectacions in a decision path knowing
that the estimated expectation of the model output conditioned on the set
$F^{*}$ of feature values is $f_{x}(F^{*})\approx E[f(x)|x_{F^{*}}]$(Saabas,
[n. d.]). Last, we use these empirical values to obtain the p-value associated
to the $P_{i}^{j}$ importance value. This p-value controls the certainty that
the algorithm SRules has over the pattern $P_{i}^{j}$ under analysis and it
has to be tuned as a parameter of the algorithm base on the certainty needed
for a specific application or the pursued level of interpretation.

After the statistical analysis of every possible pattern is obtained the
generated patterns are translated into rules and ordered by accuracy and
simplicity (rule length). We detect duplicates (p.ej. rules that contain
another rules) and simplify them by quality of interpretation capabilities
(Barredo Arrieta et al., 2020) (the more general pattern is stored). The
process is repeated until all the ruleset are processed. The resulting ruleset
$R^{1*}$ for iteration 1 is then stored and a new iteration starts using those
samples from the dataset that are not covered by $R^{1*}$. The final ruleset
$R^{*}$ is then obtained by a combination of the rulesets obtained for each
iteration $R*=\\{R^{1*},R^{2*},\ldots,R^{i*}\\}$.

###  2.1. SRules Algorithm

SRules is a rule extraction algorithm that given a black-box machine learning
model greedily searches for the most important features and the associated
tree structures to find a subset of rules that provides interpretation over
the dataset. A description of the steps taken in the proposed algorithm,
SRules, is presented in 1. The input of the algorithm is the output of the
black-box model (in our case is an ensemble $H(X)=\\{h_{n}(x),w_{n}\\}$
described in definition 1. The first phase of the algorithm is the extraction
of the feature importance of the given model H(X). We use the permutation test
technique described in (Breiman, 2001b) and Gini criteria to obtain the
feature importance values for the tested ensemble methods (random forest,
adaboost, catboost). A minimum value of importance is needed to set a maximum
level of depth of the binary tree that we construct, otherwise for datasets
that have a very large number of features the construction of the tree would
be costly.

Algorithm 1 SRules: SRules algorithm for creating rulesets from black-box
models using feature importance FI

input: black-box ensemble model H, minImp minimum feature importance value in
order to be extracted, minInsNode (the minimum number of instances that each
node must have to be included as a rule), $\alpha$ (the minimum precision that
the rule must have in order to be included as a rule; assures high precision),
p-significance (the p-value used for selecting or not a branch-rule
$L_{i}^{j}$)

output: $R^{*}$ the minimum set of interpretable rules

FI $\leftarrow$ ExtractFeatureImportance(H, minImp)

R = $\emptyset$; $P^{*}=\emptyset$

SBT = init($FI_{1}$)

SBT $\leftarrow$ BinaryTreeGenerator(SBT, FI, minInsNode, $FI_{2}$, $FI_{1}$)

for each $L_{i}^{j}$ in SBT do $\triangleright$ We walk through the tree
branches

$ns_{i}$ $\leftarrow$ GetChildren(i)

$p_{i}^{j}$ $\leftarrow$ Test$\tilde{\chi}^{2}$($ns_{i}$) $\triangleright$
obtain the p-value of the pattern $P_{i}^{j}$

if $p_{i}^{j}<$ p-significance then

$P^{*}$ $\leftarrow$ append($L_{i}^{j}$) $\triangleright$ the conditional
pattern $L_{i}^{j}$ is added to the set of rules patterns $P^{*}$

end if

end for

R $\leftarrow$ RuleCategorization($P^{*}$, $\alpha$)

$R^{*}$ $\leftarrow$ Prune(R)

return $R^{*}$

The SBT is initialize with the most important feature and the the binary tree
algorithm is called to construct the SBT structure. The algorithm is detailed
at (2) and it uses the minInstances value to control if a new node is created
or not (a minimum value of 5 is set for statistical reasons). Once the tree is
built then we check if the combination set of interpretable branches (of
different possible sizes) are a pattern of interest. For that purpose we use
the conditional $\tilde{\chi}^{2}$ test that empirically can be computed as
$P_{i}^{j}$ as described earlier. The selection or not of that particular
pattern $P_{i}^{j}$ is decided using the statistical significance threshold of
the pattern for classifying the instances that accomplish with that pattern
(i.e. they share the same values for the pattern list $L_{i}^{j}$). In that
case the pattern is added to the set of patterns $P^{*}$ associated to the
dataset. After obtaining the set of patterns $P^{*}$, it is necessary to
define on which class they will be assigned to convert them in a set of rules
$R$. For this purpose, the class with the highest precision of the training
set will be assigned, and if it does not exceed $minPrecision$, it will not be
included as a rule and the pattern will be discarded. Likewise, the rules will
be ordered from the highest to the lowest level of precision, where the most
precise are the first and the least precise will be the last.

Algorithm 2 BinaryTreeGenerator: generates a surrogate binary tree (SBT) based
on feature importance FI

input: SBT, FI ordered list of feature importance, minInsNode, currentNode,
parentNode)

output:

newNode $\leftarrow$ CreateNode(currentNode, parentNode)

if numInstances(newNode) $>=$ minInsNode then $\triangleright$ Compare
instances of the new node

SBT $\leftarrow$ add newNode

currentNode $\leftarrow$ nextFeature(FI)

for child in currentNode do

BinaryTreeGenerator(SBT, FI, minInsNode, child, newNode) $\triangleright$ New
parentNode is the current node

end for

return SBT

end if

There are some rules that may be duplicate, i.e. one more general rule may
include others more specific. In such cases, the more general rules have
priority (they are more interpretable and contain a larger number of instances
which represents more knowledge) and the others will be discarded reducing
also the number of rules and easy the explanation. To do this, we iterate
through the set rules $R*$ from lower priority to higher priority and check if
there is any higher priority rule that contains it. If so, the rules of lower
priority that are contained in those of higher priority will be eliminated
from the final set $R^{*}$.

###  2.2. Some thoughts over the method and extension

It can be observed that SRules only iterates once over the entire dataset and
then obtains a set of interpretable rules based on a surrogate decision tree
model. SRules uses a minimum precision threshold $\alpha$ during the
categorization step of pattern discovery to guarantee minimum performance. If
$\alpha$ is high (i.e., we require high precision on the analyzed pattern
$L_{i}^{j}$) a smaller set of patterns, and also associated rules, will be
obtained, but they will represent with high confidence the instances that are
included in that pattern. On the other hand, only a subset of instances will
be represented in those rules and, thereof, the coverage will be smaller (we
will discuss more about this in the results section). At this point it is
important to note that our final system does not have a default rule for any
of the instances that are not covered by any rule. We could define a default
rule for those instances using the expected value but we focus on obtaining
interpretable rules as close to reality as possible and, therefore, if the
performance of the classifier is bad in some instances we prefer not to
explain.

Instead we propose an extension of the method SRules to address this problem
recursively (Recursive SRules). We adjust the $\alpha$ value to obtain
representative enough rules according to the perfomance criteria (e.g. F1
classification) and then we obtain the ruleset $R_{1}$ associated to that
criteria using SRules. Afterwards, we assign instances $x\in X$ to the ruleset
$R_{1}$ if they fulfill the LHS conditions obtaining a new set of covered
instances $X^{\prime}$ and another set of not-covered instances
$\overline{X}^{\prime}:X^{\prime}\cup\overline{X}^{\prime}=X$. Then we apply
again SRules with $\overline{X}$ obtaining new set of rules for a second
iteration $R_{2}$; for $n$ iterations we will obtain
$\\{R_{1},R_{2},\ldots,R_{n}\\}$ and a final set $R^{*}$ is then obtained by
applying the prune function to those rules
$R^{*}=Prune(\\{R_{1},R_{2},\ldots,R_{n}\\})$. We call to this second approach
Recursive SRules algorithm (RSRules). RSRules gives some flexibility to the
algorithm and allows for greater coverage while maintaining efficiency, but
penalizing explainability by obtaining a greater number of rules (in the best
case will be a similar number).

##  3\. Experiments and Results

###  3.1. Experiments design

In order to prove the effectiveness of the proposed method, several
experiments were conducted. In this section, the context of these experiments
is presented.

####  3.1.1. Datasets

Five public datasets available in the UCI Machine Learning Repository (Bache,
[n. d.]) have been used (divorce, kr-vs-kp, wisconsin, SPECT, tic-tac-toe) and
additionally a survival Covid-19 dataset (salud-covid)(Hospitales, 2020) has
been included. Given that the current state of the SRules algorithm only
supports binary attributes, a one hot encoding (Stevens, 1946) has been
applied to create binary attributes. The datasets have been selected with
different ranges of attributes and instances to demonstrate the effectiveness
of the method on different contexts. The datasets are well-known real world
cases commonly used as benchmark in the machine learning field. The properties
of these datasets can be seen in Table 1. It details the number of instances,
attributes, binary attributes, categorical attributes as well as the total
number of attributes after pre-processing.

Table 1. Summary of the properties of the 5 datasets used in the experiments

Dataset | Class (minor; major) | # inst. | # atts. | # atts. bit. | # atts. cat. | # atts. tot.
---|---|---|---|---|---|---
divorce | (yes; no) | 170 | 54 |  | 54 | 270
kr-vs-kp | (win; no win) | 3196 | 36 |  | 36 | 73
wisconsin | (malignant; benign) | 683 | 9 |  | 9 | 90
SPECT | (positive; negative) | 267 | 22 | 22 |  | 22
salud-covid | (surv.; not surv.) | 1744 | 119 | 119 |  | 119
tic-tac-toe | (positive; negative) | 958 | 9 |  | 9 | 27

###  3.2. Algorithms and experiment validation

Four ensemble based algorithms, random forest (RF) (Breiman, 2001a), Cat Boost
Classifier (CAT) (Prokhorenkova et al., 2018), Ada Boost Classifier (ADA)
(Freund and Schapire, 1997), Gradient Boost Classifier (GBC) (Friedman, 2002,
2001), were chosen to prove the applicability and performance of SRules. The
purpose is to cover different approaches to deal with class imbalance problem.
Moreover, RuleFit (RF+RFIT) (Friedman and Popescu, 2008) and RuleCosi (RF+RC)
(Obregon and Jung, 2023) were also used for comparative purposes given that
are state of the art methods that also creates interpretable rules from
ensemble models. We also included in our experiment design the most simple
interpretable algorithm, decision trees (DT), as a baseline to compare with.
Following the experimentation line of proposed in the RuleCOSI+ paper (Obregon
and Jung, 2023; Obregon et al., 2019). A stratified cross validation with
10-fold repeated 3 times was performed. Within each fold, the hyperparameters
of the ensemble are optimized in a grid-seach with cross validation of a
5-fold, once the ensemble method is trained the best ensemble will be applied
to each rule extraction method for their training. Ensemble hyper-parameters
vary the depth of the trees by $\\{2,3,4,5,6\\}$, and the number of estimators
by $\\{10,25,50,100,250,500\\}$. Likewise for RuleFit the recommended
parameters have been taken, $\alpha=30$, $include\\_linear=True$. Similarly,
the recommended parameters for RuleCosi+ have been taken, $\alpha=0.5$,
$\beta=0$, $c=25\%$. For SRules, different parameters have been taken:
$minImp\in\\{0.05,0.1\\}$, $\alpha\in\\{0.9,0.95\\}$,
$minInsNode\in\\{5,7,10,25,50\\}$, $p$-$significance\in\\{0.95,0.97\\}$. The
metric to be optimized by SRules is defined by Coverage x F1-score, the higher
coverage and F1-score, the better. Note that we can limit the number of rules
created using $minImp$, $minInsNode$, and $p$-$significance$ parameters. A
large $minImp$ value will only take into account a few features that will be
used during the construction of the SBT and thereof reduces the possible
number of final rules $R^{*}$. $minInsNode$ parameter has a similar objective
by establishing a minimum number of instances that each node of a rule must
have, thereof a large value will also reduce the number of rules and its
complexity (the length of the components of the rule). Finally, the
$p$-$significance$ parameter also controls whether an SBT conditional pattern
is selected. A high value will prevent the selection of that pattern and will
also reduce the number of rules. In summary, these parameters allows to reduce
the number of rules, increasing interpretability, but also reduce the number
of instances covered by those rules (note that there is a trade-off between
ease of of interpretation and coverage) and the optimization metric maximizes
the F1-score and coverage constrained by those parameters’ values. We used a
stratified cross-validation with 10-fold repeated 3 times for each combination
of ensemble model+rule generation method. We measure the coverage (percentage
of instances that are covered by the generated rules $R^{*}$), the F1-score,
and the number of rules (rl. num). The results are shown as the average of the
stratified cross validation with 10-fold repeated 3 times, as well as its
standard deviation.

###  3.3. Experimental study

In this section, we present the empirical results of the experiments using
SRules and RSRules. First, to confirm that the method simplifies the result of
the different selected ensemble algorithms. This is done by comparing the
number of rules obtained with SRules with those obtained by the other state of
the art algorithms (RuleCOSI and RuleFIT) for the different datasets and
ensemble methods. Secondly, to evaluate whether the classification performance
of the final ruleset is at least maintained compared to that of the original
ensemble from which it is derived.

Table 2. Non Recursive SRules (SR). Black-box model average performance
results.

Method | Coverage | DT F1 | Ensemble F1 | RFIT F1 | RFIT rl. num. | RC F1 | RC rl. num. | SR F1 | SR rl. num.
---|---|---|---|---|---|---|---|---|---
Random Forest | 63.89±22.7 | 90.38±18.56 | 88.29±23.9 | 91.59±18.3 | 21.56±3.73 | 90.79±19.59 | 18.41±8.09 | 91.52±17.94 | 9.05±6.58
Gradient Boost | 61.27±23.74 | 86.72±25.16 | 89.22±24.16 | 88.63±23.93 | 21.49±3.31 | 88.51±24.66 | 17.28±13.07 | 88.65±23.74 | 8.92±7.46
Ada Boost | 56.57±26.24 | 83.91±29.74 | 85.88±29.63 | 84.17±30.82 | 21.15±3.38 | 68.64±36.05 | 2.81±1.73 | 81.84±35.02 | 19.39±25.45
Cat Boost | 58.96±24.03 | 91.62±18.16 | 65.84±29.46 | 93.15±17.42 | 21.24±3.25 | 79.64±32.71 | 3.21±1.91 | 93.01±17.5 | 5.91±3.98
Global Average | 60.17±24.31 | 88.16±23.56 | 82.31±28.53 | 89.38±23.45 | 21.36±3.42 | 81.89±30.21 | 10.43±10.76 | 88.76±24.91 | 10.82±14.69

Table 3. Non Recursive SRules (SR). Black-box model two-sample t-test analysis
for equal means results (SRules vs. model p-value)

Method | Coverage | DT p-value F1 | Ensemble p-value F1 | RFIT F1 p-value | RFIT rl. num. p-value | RC F1 p-value | RC rl. num. p-value
---|---|---|---|---|---|---|---
Random Forest | 63.89±22.7 | 0.5537 | 0.1471 | 0.9731 | ¡0.0001 | 0.7101 | ¡0.0001
Gradient Boost | 61.27±23.74 | 0.4554 | 0.8202 | 0.9939 | ¡0.0001 | 0.9558 | ¡0.0001
Ada Boost | 56.57±26.24 | 0.5465 | 0.2387 | 0.5042 | 0.3579 | 0.0005 | ¡0.0001
Cat Boost | 58.96±24.03 | 0.4601 | ¡0.0001 | 0.9380 | ¡0.0001 | ¡0.0001 | ¡0.0001
Global Average | 60.17±24.31 | 0.6400 | ¡0.0001 | 0.6222 | ¡0.0001 | ¡0.0001 | 0.5640

Table 4. Recursive SRules (RSR) – Black-box model average performance results.

Method | Coverage | DT F1 | Ensemble F1 | RFIT F1 | RFIT rl. num. | RC F1 | RC rl. num. | RSR F1 | RSR rl. num.
---|---|---|---|---|---|---|---|---|---
Random Forest | 73.18±21.63 | 89.35±18.78 | 86.75±24.73 | 91.25±17.4 | 21.41±3.69 | 90.98±17.93 | 18.36±8.52 | 91.44±17.21 | 13.94±11.39
Gradient Boost | 73.51±24.37 | 88.4±19.77 | 91.6±18.36 | 90.51±18.64 | 21.48±3.41 | 90.29±19.54 | 17.18±13.52 | 89.43±18.27 | 13.71±11.01
Ada Boost | 69.92±23.53 | 88.73±17.94 | 91.47±17.65 | 90.21±19.64 | 21.48±3.35 | 72.31±31.04 | 2.74±1.64 | 87.94±22.06 | 28.06±34.71
Cat Boost | 73.64±19.24 | 91.46±13.45 | 69.27±25.88 | 93.48±11.54 | 21.57±3.87 | 79.22±32.29 | 3.25±2.02 | 93.29±11.14 | 11.02±6.94
Global Average | 72.57±22.29 | 89.48±17.66 | 84.77±23.76 | 91.36±17.11 | 21.48±3.58 | 83.2±27.13 | 10.38±10.96 | 90.52±17.69 | 16.68±20.47

Table 5. Recursive SRules (RSR). Black-box model two-sample t-test analysis
for equal means results (RSRules vs. model p-value).

Method | Coverage | DT p-value F1 | Ensemble F1 p-value | RFIT F1 p-value | RFIT rl. num. p-value | RC F1 p-value | RC rl. num. p-value
---|---|---|---|---|---|---|---
Random Forest | 73.18±21.63 | 0.2708 | 0.0373 | 0.9170 | ¡0.0001 | 0.8044 | ¡0.0001
Gradient Boost | 73.51±24.37 | 0.6104 | 0.2606 | 0.5779 | ¡0.0001 | 0.6666 | 0.0078
Ada Boost | 69.92±23.53 | 0.7090 | 0.0945 | 0.3032 | 0.0117 | ¡0.0001 | ¡0.0001
Cat Boost | 73.64±19.24 | 0.1610 | ¡0.0001 | 0.8750 | ¡0.0001 | ¡0.0001 | ¡0.0001
Global Average | 72.57±22.29 | 0.2651 | ¡0.0001 | 0.3611 | ¡0.0001 | ¡0.0001 | ¡0.0001

The measure of interpretability used in this work is the number of rules of
the classification model (i.e. ruleset $R^{*}$). Table 2 shows a summary of
the metrics: coverage, F1-score (F1), and number of rules; for the different
ensemble methods and decision tree, for the non-recursive SRules approach and
the methods RuleFIT and RuleCOSI. Table 4 shows the same information but for
the recursive version of SRules. A complete list of results over the different
datasets can be seen at tables 7 and 9.

Table 6. Non Recursive SRules (SR). Comparison p-value performance per model
and dataset.

Method | Dataset | Coverage | DT F1 p-value | Ensemble F1 p-value | RFIT F1 p-value | RFIT rl. num. p-value | RC F1 p-value | RC rl. num. p-value
---|---|---|---|---|---|---|---|---
RF | divorce | 92.55±11.02 | 0.7951 | 0.7732 | 0.844 | ¡0.0001 | 0.9849 | ¡0.0001
RF | kr-vs-kp | 82.46±4.33 | 0.251 | 0.2769 | 0.8283 | ¡0.0001 | 0.1206 | 0.9062
RF | wisconsin | 73.71±10.36 | 0.6767 | 0.0282 | 0.0648 | ¡0.0001 | 0.1525 | ¡0.0001
RF | SPECT | 34.73±15.18 | 0.9706 | 1.0000 | 0.9836 | ¡0.0001 | 0.9652 | ¡0.0001
RF | salud-covid | 54.13±6.53 | 0.3703 | 0.0004 | 0.7395 | ¡0.0001 | 0.2599 | ¡0.0001
RF | tic-tac-toe | 45.79±6.04 | 0.0625 | 0.6905 | 0.2039 | ¡0.0001 | 0.248 | ¡0.0001
RF | Total Average | 63.89±22.7 | 0.5537 | 0.1471 | 0.9731 | ¡0.0001 | 0.7101 | ¡0.0001
GBC | divorce | 89.8±15.52 | 0.8773 | 0.8184 | 0.8184 | ¡0.0001 | 0.8158 | ¡0.0001
GBC | kr-vs-kp | 76.39±6.74 | ¡0.0001 | ¡0.0001 | 0.4208 | ¡0.0001 | 0.0037 | ¡0.0001
GBC | wisconsin | 70.47±12.32 | 0.5055 | 0.0883 | 0.0311 | ¡0.0001 | 0.2064 | ¡0.0001
GBC | SPECT | 29.82±20.71 | 0.981 | 1.0000 | 0.9892 | ¡0.0001 | 0.9962 | ¡0.0001
GBC | salud-covid | 55.16±7.27 | 0.0242 | 0.7308 | 0.4645 | ¡0.0001 | 0.1752 | ¡0.0001
GBC | tic-tac-toe | 45.97±9.39 | 0.0015 | 0.0003 | 0.1929 | 0.7745 | 0.0051 | 0.5704
GBC | Total Average | 61.27±23.74 | 0.4554 | 0.8202 | 0.9939 | ¡0.0001 | 0.9558 | ¡0.0001
ADA | divorce | 90.98±16.33 | 0.8868 | 0.8548 | 0.8574 | ¡0.0001 | 0.9582 | 0.0236
ADA | kr-vs-kp | 62.01±12.06 | ¡0.0001 | 0.2354 | 0.0065 | ¡0.0001 | ¡0.0001 | ¡0.0001
ADA | wisconsin | 75.75±6.43 | 0.8215 | 0.0194 | 0.0002 | ¡0.0001 | 0.0294 | 0.0001
ADA | SPECT | 17.89±11.32 | 0.8963 | 0.9788 | 0.9556 | ¡0.0001 | 1.0000 | 0.0039
ADA | salud-covid | 38.72±9.32 | 0.0276 | 0.0123 | 0.0747 | ¡0.0001 | 0.1239 | ¡0.0001
ADA | tic-tac-toe | 54.08±7.91 | ¡0.0001 | 0.0540 | 0.0019 | 0.0338 | ¡0.0001 | ¡0.0001
ADA | Total Average | 56.57±26.24 | 0.5465 | 0.2387 | 0.5042 | 0.3579 | 0.0005 | ¡0.0001
CAT | divorce | 91.18±14.39 | 0.6923 | ¡0.0001 | 0.9078 | ¡0.0001 | 0.8473 | ¡0.0001
CAT | kr-vs-kp | 49.27±11.0 | 1.0000 | ¡0.0001 | 0.9695 | ¡0.0001 | ¡0.0001 | 0.0364
CAT | wisconsin | 84.23±4.53 | 0.1186 | ¡0.0001 | 0.7844 | ¡0.0001 | 0.0005 | ¡0.0001
CAT | SPECT | 33.8±18.6 | 0.9298 | 1.0000 | 0.9858 | ¡0.0001 | 1.0000 | 0.1687
CAT | salud-covid | 46.57±8.81 | 0.2667 | ¡0.0001 | 0.9752 | ¡0.0001 | ¡0.0001 | ¡0.0001
CAT | tic-tac-toe | 48.71±6.08 | 0.0083 | ¡0.0001 | 0.5797 | ¡0.0001 | ¡0.0001 | ¡0.0001
CAT | Total Average | 58.96±24.03 | 0.4601 | ¡0.0001 | 0.9380 | ¡0.0001 | ¡0.0001 | ¡0.0001
Global Average | Total Average | 60.17±24.31 | 0.6400 | ¡0.0001 | 0.6222 | ¡0.0001 | ¡0.0001 | 0.5640

Table 7. Non Recursive SRules (SR). Average performance per model and dataset.

Method | Dataset | Coverage | DT F1 | Ensemble F1 | RFIT F1 | RFIT rl. num. | RC F1 | RC rl. num. | SR F1 | SR rl. num.
---|---|---|---|---|---|---|---|---|---|---
RF | divorce | 92.55±11.02 | 91.75±18.0 | 94.33±18.08 | 93.9±18.12 | 26.47±3.53 | 93.06±18.14 | 5.7±1.18 | 92.97±18.15 | 2.9±0.66
RF | kr-vs-kp | 82.46±4.33 | 98.67±1.36 | 98.7±1.35 | 99.0±1.24 | 22.07±3.12 | 99.48±0.67 | 18.13±3.59 | 99.07±1.26 | 18.23±2.92
RF | wisconsin | 73.71±10.36 | 97.85±1.93 | 98.71±1.48 | 98.53±1.47 | 19±2.48 | 98.34±1.61 | 16.4±3.38 | 97.62±2.2 | 6.2±1.06
RF | SPECT | 34.73±15.18 | 89.02±24.83 | 89.25±24.88 | 89.39±24.9 | 22.23±2.34 | 89.53±24.85 | 19.6±4.59 | 89.25±24.88 | 1.43±0.68
RF | salud-covid | 54.13±6.53 | 65.99±18.77 | 48.95±23.94 | 68.8±19.7 | 18.03±1.61 | 64.39±21.62 | 25.2±8.08 | 70.52±20.04 | 10.17±2.34
RF | tic-tac-toe | 45.79±6.04 | 99.01±1.84 | 99.78±0.7 | 99.91±0.34 | 21.53±2.01 | 99.91±0.51 | 25.4±4.54 | 99.71±0.8 | 15.37±3.73
RF | Total Average | 63.89±22.7 | 90.38±18.56 | 88.29±23.9 | 91.59±18.3 | 21.56±3.73 | 90.79±19.59 | 18.41±8.09 | 91.52±17.94 | 9.05±6.58
GBC | divorce | 89.8±15.52 | 88.12±30.01 | 88.71±30.19 | 88.71±30.19 | 25.03±3.43 | 88.73±30.19 | 5.43±0.73 | 86.92±29.75 | 2.7±0.7
GBC | kr-vs-kp | 76.39±6.74 | 97.55±1.58 | 99.79±0.24 | 98.76±0.92 | 22.17±2.23 | 99.52±0.54 | 24.1±4.08 | 98.94±0.89 | 11.53±2.05
GBC | wisconsin | 70.47±12.32 | 98.35±1.73 | 98.86±1.7 | 99.05±1.53 | 19.77±2.19 | 98.66±1.81 | 14.47±2.05 | 98.02±2.02 | 4.63±1.4
GBC | SPECT | 29.82±20.71 | 73.32±41.32 | 73.57±41.44 | 73.72±41.54 | 22.27±2.23 | 73.52±41.43 | 4.03±2.55 | 73.57±41.44 | 1.23±0.77
GBC | salud-covid | 55.16±7.27 | 66.54±17.66 | 74.48±12.72 | 73.44±10.42 | 17.93±2.36 | 70.89±14.33 | 32.77±17.88 | 75.59±12.09 | 11.33±1.9
GBC | tic-tac-toe | 45.97±9.39 | 96.45±3.63 | 99.93±0.37 | 98.1±2.64 | 21.8±2.28 | 99.72±0.66 | 22.9±6.59 | 98.84±1.52 | 22.07±4.53
GBC | Total Average | 61.27±23.74 | 86.72±25.16 | 89.22±24.16 | 88.63±23.93 | 21.49±3.31 | 88.51±24.66 | 17.28±13.07 | 88.65±23.74 | 8.92±7.46
ADA | divorce | 90.98±16.33 | 87.51±29.9 | 87.83±29.94 | 87.8±29.98 | 24.87±3.55 | 86.82±29.64 | 3.53±0.51 | 86.42±29.59 | 3.17±0.7
ADA | kr-vs-kp | 62.01±12.06 | 95.31±1.51 | 98.15±0.98 | 97.7±1.07 | 21.03±3.46 | 48.56±9.55 | 2±0.0 | 98.45±1.0 | 73.77±9.45
ADA | wisconsin | 75.75±6.43 | 97.86±1.17 | 98.65±1.33 | 99.07±1.0 | 19.33±2.32 | 96.39±3.06 | 5.43±1.72 | 97.78±1.48 | 7.37±1.94
ADA | SPECT | 17.89±11.32 | 90.12±24.99 | 91.14±25.08 | 90.61±25.06 | 22±2.41 | 90.97±25.1 | 2±0.0 | 90.97±25.1 | 1.63±0.67
ADA | salud-covid | 38.72±9.32 | 37.0±33.33 | 39.9±33.97 | 32.65±30.5 | 18.57±2.21 | 8.06±19.44 | 2.87±1.72 | 18.37±30.46 | 10.4±2.93
ADA | tic-tac-toe | 54.08±7.91 | 95.66±4.18 | 99.6±0.8 | 97.18±2.96 | 21.1±2.07 | 81.03±3.12 | 1±0.0 | 99.08±1.21 | 20±1.84
ADA | Total Average | 56.57±26.24 | 83.91±29.74 | 85.88±29.63 | 84.17±30.82 | 21.15±3.38 | 68.64±36.05 | 2.81±1.73 | 81.84±35.02 | 19.39±25.45
CAT | divorce | 91.18±14.39 | 92.74±18.44 | 63.17±12.76 | 95.18±18.26 | 24.7±2.95 | 93.71±18.3 | 4.47±0.73 | 94.63±18.37 | 2.93±0.45
CAT | kr-vs-kp | 49.27±11.0 | 99.49±1.2 | 60.86±7.39 | 99.5±1.19 | 21.8±2.98 | 93.11±4.12 | 3.63±0.49 | 99.49±1.2 | 3.23±0.9
CAT | wisconsin | 84.23±4.53 | 98.74±1.27 | 82.9±2.1 | 99.25±1.04 | 19.2±2.62 | 97.05±3.03 | 5.87±1.66 | 99.19±0.87 | 8.23±1.41
CAT | SPECT | 33.8±18.6 | 85.72±29.34 | 86.39±29.5 | 86.53±29.54 | 22.3±2.48 | 86.39±29.5 | 2±0.0 | 86.39±29.5 | 2.3±1.18
CAT | salud-covid | 46.57±8.81 | 73.58±16.66 | 12.75±4.13 | 78.54±16.35 | 18.43±2.28 | 18.65±25.96 | 2.27±1.55 | 78.41±16.71 | 6.5±1.46
CAT | tic-tac-toe | 48.71±6.08 | 99.46±0.98 | 88.94±2.77 | 99.92±0.31 | 21±1.74 | 88.94±2.77 | 1±0.0 | 99.96±0.23 | 12.27±3.67
CAT | Total Average | 58.96±24.03 | 91.62±18.16 | 65.84±29.46 | 93.15±17.42 | 21.24±3.25 | 79.64±32.71 | 3.21±1.91 | 93.01±17.5 | 5.91±3.98
Global Average | Total Average | 60.17±24.31 | 88.16±23.56 | 82.31±28.53 | 89.38±23.45 | 21.36±3.42 | 81.89±30.21 | 10.43±10.76 | 88.76±24.91 | 10.82±14.69

The performance of the non-recursive and recursive SRules models outperforms
always to RuleCOSI (global average improvement of $\approx 7\%$) and maintains
the F1 results obtained with RuleFIT but with a smaller number of rules. We
have used a two-sample t-test for equal means to test the hypothesis that the
obtained average classification rate and number of rules for the different
models are not due to chance. The obtained overall significance values are
shown in tables 3, 5 and by experiment in tables 6, 8 . We applied this test
under the null hypothesis that the means are equal and the observations have
different standard deviations. We conclude that the improvement obtained for
the analysis SR vs. RC is significant for F1 metric (rejecting the hypothesis
of equal means with a $p-value<0.0001$) and similar for the number of rules
($p-value=0.5640$); for the analysis of SR vs. RFIT the results are similar
for F1 metric ($p-value=0.6222$) and the improvement is significant for the
number of rules ($p-value<0.0001$); and for the recursive SRules the analysis
RSR vs. RC improvement is significant for both F1 metric ($p-value<0.0001$)
and number of rules ($p-value<0.0001$); for the analysis of RSR vs. RFIT the
results are similar for F1 metric ($p-value=0.3611$) and the improvement is
significant for the number of rules ($p-value<0.0001$). Using the overall
results we can conclude that the SRules maintains the results or improves it
versus the other methods, and that recursive SRules improves always but for
RFIT F1 metric than maintains similar results.

If we are interested in high interpretability, we can observed that using Cat
Boost model and the non-recursive SRules algorithm we obtain a 93.01% F1-score
with only 5.9 rules, improving on average the other methods in both criteria.
This demonstrates the capabilities of the algorithm to achieve high
interpretability and high performance sacrificing coverage. In contrast, there
is a difference on coverage between non-recursive and recursive approaches.
The difference is of 12.40%, that is, non-recursive approach covers on average
$\approx 60.2\%$ of the instances and the recursive $\approx 72.6\%$. Overall,
the recursive approach maintains the classification performance and increases
the coverage. As a counterpart, the number of rules increase on average from
10.82 to 16.68 (as expected) sacrificing interpretability for coverage. The
parameters search has been optimized using the F1-score x coverage criteria
and table 10 shows the average values of this metric for each model and the
non-recursive (SRules) and recursive approaches (RSRules). It can be seen that
the best performance is obtained by Random Forest and CatBoost respectively.
On the other hand, AdaBoost shows a clear decrease in performance over the
other.

Analyzing the results for each of the dataset independently (see Tables 7 and
9) can be seen that most of the dataset and models benefit of the recursive
approach and some are very significantly (e.g. kr-vs-kp or SPECT ). In SPECT
dataset, comparing CAT + NR-Srules with CAT + R-SRules we obtain an
improvement on F1-score (86.39±29.5% vs 95.87±4.16%), an improvement in
coverage (33.8±18.6% vs 48.26±11.23%), and a small increment in the number of
rules (2.3±1.18 vs. 3.97±1.3). Furthermore, if we compare these results with
RuleFit or RuleCOSI our method significantly improves both in F1-score and in
number of rules metrics (significance $p-values$ are shown in tables 6, 8 .
Similarly, comparing CAT + SRules with CAT + RSRules for kr-vs-kp dataset we
obtain similar performance (99.49±1.2% vs. 96.76±3.21%), a higher number of
rules (3.23±0.9 vs. 15.97±3.61), and a significantly improvement in coverage (
49.27±11.0% vs. 89.67±4.9%). This is an example of the benefits of the
proposed method, the non-recursive one may provide a simple interpretation via
a small number of rules but covers only some instances of the dataset, and the
recursive provides a better coverage (without sacrificing performance) but
with a larger number of rules and, thereof, worsens the interpretability. The
parameters of the method allows to adapt between these different scenarios
according to the users’ needs.

###  3.4. Brief disccusion

Note that all the results presented in this section are associated with the
indicated coverage. That is, SRules is able to reduce coverage of the
generated rules $R^{*}$ to maintain classification performance and
interpretability, and hence the results are associated to that coverage as
indicated for each experiment. It is also important note that among the three
characteristics that we are trying to pursue in our work, high performance,
high interpretation, and large coverage; high performance is the only one that
we always try to maintain (both by the used optimization of the metric:
F1-score x coverage, and by the learning process of the ensemble model that
minimizes the classification error), and coverage and ease of interpretation
are linked in such a way that an increase in one usually decreases the other.
Thus, we try to explain with the generated rulesets for the areas of the
learner model where the classification rate is high. This is an important
difference with respect to other methods that rely entirely on the learned
ensemble model and its structures to generate the ruleset, but without any
control over the ruleset generation process. On the other hand, we can make
decisions about which parts of the solution, learned by the models, we want to
explain and focus only on those parts that are close to a perfect fit.

Table 8. Recursive SRules (RSR). Comparison p-value performance per model and
dataset.

Method | Dataset | Coverage | DT F1 p-value | Ensemble F1 p-value | RFIT F1 p-value | RFIT rl. num. p-value | RC F1 p-value | RC rl. num. p-value
---|---|---|---|---|---|---|---|---
RF | divorce | 95.69±4.87 | 0.4743 | 0.5361 | 0.8769 | ¡0.0001 | 0.5793 | ¡0.0001
RF | kr-vs-kp | 93.43±2.59 | 0.0615 | 0.0832 | 0.2681 | ¡0.0001 | 0.1698 | ¡0.0001
RF | wisconsin | 83.55±7.38 | 0.4913 | 0.1675 | 0.1664 | ¡0.0001 | 0.8116 | ¡0.0001
RF | SPECT | 39.53±16.74 | 0.8572 | 1.0000 | 0.9621 | ¡0.0001 | 0.8675 | ¡0.0001
RF | salud-covid | 60.3±5.42 | 0.1594 | 0.0002 | 0.8317 | ¡0.0001 | 0.5851 | ¡0.0001
RF | tic-tac-toe | 66.6±6.8 | 0.0039 | ¡0.0001 | 0.0128 | ¡0.0001 | 0.0019 | 0.0043
RF | Total Average | 73.18±21.63 | 0.2708 | 0.0373 | 0.9170 | ¡0.0001 | 0.8044 | ¡0.0001
GBC | divorce | 95.49±11.0 | 0.5451 | 0.4997 | 0.4448 | ¡0.0001 | 0.6057 | ¡0.0001
GBC | kr-vs-kp | 93.58±3.05 | 0.0006 | ¡0.0001 | ¡0.0001 | 0.0002 | ¡0.0001 | 0.002
GBC | wisconsin | 86.78±4.92 | 0.825 | 0.1499 | 0.0413 | ¡0.0001 | 0.3131 | ¡0.0001
GBC | SPECT | 34.62±23.48 | 0.9333 | 1.0000 | 0.9479 | ¡0.0001 | 1.0000 | 0.0393
GBC | salud-covid | 60.55±6.82 | 0.0093 | 0.6787 | 0.7563 | 0.0022 | 0.1347 | ¡0.0001
GBC | tic-tac-toe | 70.05±8.0 | 0.0042 | ¡0.0001 | 0.1380 | ¡0.0001 | ¡0.0001 | ¡0.0001
GBC | Total Average | 73.51±24.37 | 0.6104 | 0.2606 | 0.5779 | ¡0.0001 | 0.6666 | 0.0078
ADA | divorce | 94.71±6.8 | 0.2933 | 0.4542 | 0.0751 | ¡0.0001 | 0.9835 | 0.0743
ADA | kr-vs-kp | 84.74±6.83 | 0.5241 | 0.0042 | 0.0063 | ¡0.0001 | ¡0.0001 | ¡0.0001
ADA | wisconsin | 82.39±7.54 | 0.2560 | 0.0008 | 0.0034 | ¡0.0001 | 0.0007 | ¡0.0001
ADA | SPECT | 30.15±15.5 | 0.2849 | 0.8940 | 0.9340 | ¡0.0001 | 1.0000 | ¡0.0001
ADA | salud-covid | 53.82±5.62 | 0.0833 | 0.0221 | 0.1722 | 0.0103 | ¡0.0001 | ¡0.0001
ADA | tic-tac-toe | 73.74±7.22 | ¡0.0001 | 0.0014 | 0.0175 | ¡0.0001 | ¡0.0001 | ¡0.0001
ADA | Total Average | 69.92±23.53 | 0.7090 | 0.0945 | 0.3032 | 0.0117 | ¡0.0001 | ¡0.0001
CAT | divorce | 94.71±5.43 | 0.5821 | ¡0.0001 | 0.1352 | ¡0.0001 | 0.8598 | ¡0.0001
CAT | kr-vs-kp | 89.67±4.9 | 0.8069 | ¡0.0001 | 0.0256 | ¡0.0001 | ¡0.0001 | ¡0.0001
CAT | wisconsin | 87.95±5.42 | 0.0094 | ¡0.0001 | 0.8052 | ¡0.0001 | ¡0.0001 | ¡0.0001
CAT | SPECT | 48.26±11.23 | 0.3278 | 1.0000 | 0.7006 | ¡0.0001 | 1.0000 | ¡0.0001
CAT | salud-covid | 57.38±6.91 | 0.0935 | ¡0.0001 | 0.8129 | ¡0.0001 | ¡0.0001 | ¡0.0001
CAT | tic-tac-toe | 63.88±7.34 | 0.0005 | ¡0.0001 | 0.0214 | 0.8012 | ¡0.0001 | ¡0.0001
CAT | Total Average | 73.64±19.24 | 0.1610 | ¡0.0001 | 0.8750 | ¡0.0001 | ¡0.0001 | ¡0.0001
Global Average | Total Average | 72.57±22.29 | 0.2651 | ¡0.0001 | 0.3611 | ¡0.0001 | ¡0.0001 | ¡0.0001

Table 9. Recursive SRules (RSR). Average performance per model and dataset.

Method | Dataset | Coverage | DT F1 | Ensemble F1 | RFIT F1 | RFIT rl. num. | RC F1 | RC rl. num. | RSR F1 | RSR rl. num.
---|---|---|---|---|---|---|---|---|---|---
RF | divorce | 95.69±4.87 | 96.72±4.42 | 98.11±3.75 | 97.66±4.24 | 25.53±3.32 | 96.91±4.25 | 5.53±1.17 | 97.49±3.9 | 3.33±0.84
RF | kr-vs-kp | 93.43±2.59 | 95.97±1.66 | 96.1±1.45 | 98.05±1.08 | 21.93±3.77 | 98.24±1.2 | 16.23±4.01 | 97.31±3.46 | 29.5±4.22
RF | wisconsin | 83.55±7.38 | 97.59±1.9 | 98.44±1.45 | 98.43±1.41 | 19.57±2.65 | 97.78±2.06 | 16.73±3.49 | 97.9±1.56 | 7.5±1.83
RF | SPECT | 39.53±16.74 | 88.18±24.74 | 89.33±24.64 | 89.03±24.6 | 22.47±2.08 | 88.27±24.57 | 20.53±2.64 | 89.33±24.64 | 2.27±1.53
RF | salud-covid | 60.3±5.42 | 60.31±20.66 | 43.07±26.87 | 66.85±20.86 | 17.97±2.82 | 65.03±20.85 | 26.43±10.1 | 68.01±21.15 | 13.17±2.97
RF | tic-tac-toe | 66.6±6.8 | 97.31±1.7 | 95.43±2.39 | 97.49±1.72 | 20.97±2.17 | 99.67±0.66 | 24.7±4.24 | 98.61±1.66 | 27.87±4.02
RF | Total Average | 73.18±21.63 | 89.35±18.78 | 86.75±24.73 | 91.25±17.4 | 21.41±3.69 | 90.98±17.93 | 18.36±8.52 | 91.44±17.21 | 13.94±11.39
GBC | divorce | 95.49±11.0 | 93.67±18.15 | 94.01±18.17 | 94.42±18.08 | 25.6±3.01 | 93.24±18.01 | 5.43±0.63 | 90.81±18.26 | 2.83±0.59
GBC | kr-vs-kp | 93.58±3.05 | 96.26±1.15 | 99.76±0.3 | 98.13±1.09 | 22.67±2.8 | 99.36±0.59 | 23±4.76 | 93.95±3.3 | 19.7±2.93
GBC | wisconsin | 86.78±4.92 | 97.09±2.08 | 97.85±2.28 | 98.12±1.78 | 19.87±2.24 | 97.55±2.0 | 14.8±3.7 | 96.96±2.47 | 7.87±1.28
GBC | SPECT | 34.62±23.48 | 81.77±32.88 | 82.49±33.13 | 81.93±33.03 | 22.13±2.62 | 82.49±33.13 | 4.33±3.39 | 82.49±33.13 | 2.77±2.25
GBC | salud-covid | 60.55±6.82 | 65.42±12.8 | 75.64±10.62 | 73.35±12.4 | 17.83±1.51 | 69.29±12.98 | 33.47±19.98 | 74.36±12.92 | 16.03±2.68
GBC | tic-tac-toe | 70.05±8.0 | 96.2±2.64 | 99.86±0.35 | 97.11±2.5 | 20.8±2.07 | 99.77±0.48 | 22.07±5.23 | 97.99±1.96 | 33.03±3.9
GBC | Total Average | 73.51±24.37 | 88.4±19.77 | 91.6±18.36 | 90.51±18.64 | 21.48±3.41 | 90.29±19.54 | 17.18±13.52 | 89.43±18.27 | 13.71±11.01
ADA | divorce | 94.71±6.8 | 95.2±4.62 | 97.2±3.68 | 98.23±3.42 | 25.53±2.86 | 96.44±4.28 | 3.63±0.49 | 96.42±4.29 | 3.3±0.88
ADA | kr-vs-kp | 84.74±6.83 | 95.51±1.23 | 97.86±0.94 | 97.74±1.24 | 22.1±2.29 | 49.94±4.29 | 2±0.0 | 94.86±5.42 | 100.5±17.13
ADA | wisconsin | 82.39±7.54 | 97.68±1.94 | 98.6±1.41 | 98.57±1.87 | 19.3±2.49 | 94.56±3.48 | 5.23±1.76 | 97.12±1.79 | 9.47±2.18
ADA | SPECT | 30.15±15.5 | 93.95±7.5 | 96.28±7.46 | 96.18±7.4 | 22.2±2.41 | 96.02±7.4 | 2±0.0 | 96.02±7.4 | 3.73±1.62
ADA | salud-covid | 53.82±5.62 | 55.41±22.54 | 59.28±23.61 | 53.59±25.16 | 18±2.03 | 18.0±22.93 | 2.6±1.3 | 44.81±24.06 | 20.83±5.49
ADA | tic-tac-toe | 73.74±7.22 | 94.65±3.21 | 99.62±0.65 | 96.94±2.69 | 21.73±2.05 | 78.87±2.75 | 1±0.0 | 98.41±1.86 | 30.53±3.41
ADA | Total Average | 69.92±23.53 | 88.73±17.94 | 91.47±17.65 | 90.21±19.64 | 21.48±3.35 | 72.31±31.04 | 2.74±1.64 | 87.94±22.06 | 28.06±34.71
CAT | divorce | 94.71±5.43 | 95.48±5.65 | 66.05±3.89 | 97.91±3.43 | 26.37±3.9 | 96.05±3.42 | 4.73±0.94 | 96.24±4.96 | 3.53±0.78
CAT | kr-vs-kp | 89.67±4.9 | 96.92±1.41 | 71.23±2.5 | 98.18±1.13 | 22.1±3.35 | 91.46±4.05 | 3.73±0.45 | 96.76±3.21 | 15.97±3.61
CAT | wisconsin | 87.95±5.42 | 97.95±1.59 | 81.72±1.93 | 99.0±1.11 | 18.83±2.49 | 96.74±2.42 | 6.03±1.97 | 98.92±1.19 | 9.33±1.69
CAT | SPECT | 48.26±11.23 | 94.69±5.04 | 95.87±4.16 | 95.48±3.72 | 22.53±2.33 | 95.87±4.16 | 2±0.0 | 95.87±4.16 | 3.97±1.3
CAT | salud-covid | 57.38±6.91 | 66.43±16.27 | 16.24±4.85 | 72.25±14.98 | 17.97±2.24 | 10.68±20.78 | 2±1.05 | 73.14±14.13 | 11.53±2.29
CAT | tic-tac-toe | 63.88±7.34 | 97.28±2.08 | 84.52±3.37 | 98.04±1.51 | 21.6±1.79 | 84.52±3.37 | 1±0.0 | 98.78±0.85 | 21.8±3.94
CAT | Total Average | 73.64±19.24 | 91.46±13.45 | 69.27±25.88 | 93.48±11.54 | 21.57±3.87 | 79.22±32.29 | 3.25±2.02 | 93.29±11.14 | 11.02±6.94
Global | Total Average | 72.57±22.29 | 89.48±17.66 | 84.77±23.76 | 91.36±17.11 | 21.48±3.58 | 83.2±27.13 | 10.38±10.96 | 90.52±17.69 | 16.68±20.47

Table 10. Average ’F1-score x coverage’ and number of rules per model

Method | SRules rl. num. | SRules F1 x coverage | RSRules rl. num. | RSRules F1 x coverage
---|---|---|---|---
Random Forest | 9.05±6.58 | 58.48±4.07 | 13.94±11.39 | 66.92±3.72
Gradient Boost | 8.92±7.46 | 54.31±5.64 | 13.71±11.01 | 65.74±4.45
Ada Boost | 19.39±25.45 | 46.3±9.19 | 28.06±34.71 | 61.49±5.19
Cat Boost | 5.91±3.98 | 54.84±4.2 | 11.02±6.94 | 68.7±2.14

##  4\. Conclusions

In this paper, we proposed SRules, a method for providing interpretability to
black-box machine learning models using recursively surrogate binary tree
models. The method uses the most important features to create a binary
decision tree containing a set of possible important rules. A conditional chi-
square analysis selects the rules that have sufficient significance to be
considered valid according to the imposed requirement of interpretability of
the application. A final phase of pruning detects duplicates and combines all
the rulesets obtained for the different areas of the learned model. The
combination is made on the basis of the generality of the rules; the most
general rules are retained, avoiding duplication and improving
interpretability. In addition, several experiments were performed to evaluate
and validate the obtained results, and it was shown that, in general, the
performance of the obtained rulesets is maintained, whereas the number of
rules is reduced. The main contribution of the proposed method relies on the
ability to leverage between coverage and interpretability without losing
performance, which is a great advantage for practitioners and is meaningful
for understanding the main causes in the model decision. This is specially
useful in domains such as medical diagnosis or biology. Our work has some
limitations, such as the lack of support for continuous inputs because the
algorithm is designed for binary surrogate decision trees or the comparison
with other well known model agnostic feature importance techniques such as
SHAP or LIME to extend its use to machine learning models that doesn’t have
intrinsic feature importance extraction methods. As future work we intend to
include other machine learning models such as Neural Networks using model
agnostic feature importance extraction techniques and add the functionalities
to work with continuous features.

###### Acknowledgements.

This work has been funded by the project ”Inteligencia Artificial eXplicable”
IAX grant of the Young Researchers 2022/2024 initiative of the Community of
Madrid, Spain.

## References

  * (1)
  * Ali et al. (2023) Sajid Ali, Tamer Abuhmed, Shaker El-Sappagh, Khan Muhammad, Jose M. Alonso-Moral, Roberto Confalonieri, Riccardo Guidotti, Javier Del Ser, Natalia Díaz-Rodríguez, and Francisco Herrera. 2023.  Explainable Artificial Intelligence (XAI): What we know and what is left to attain Trustworthy Artificial Intelligence.  _Information Fusion_ 99 (2023), 101805.  https://doi.org/10.1016/j.inffus.2023.101805
  * Bache ([n. d.]) M. (2013). Bache, K. & Lichman. [n. d.].  UCI Machine Learning Repository. In.  ([n. d.]).
  * Barredo Arrieta et al. (2020) Alejandro Barredo Arrieta, Natalia Díaz-Rodríguez, Javier Del Ser, Adrien Bennetot, Siham Tabik, Alberto Barbado, Salvador Garcia, Sergio Gil-Lopez, Daniel Molina, Richard Benjamins, Raja Chatila, and Francisco Herrera. 2020.  Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI.  _Information Fusion_ 58 (2020), 82–115.  https://doi.org/10.1016/j.inffus.2019.12.012
  * Breiman (2001a) Leo Breiman. 2001a.  Random Forests.  _Machine Learning_ 45, 1 (2001), 5–32.  https://doi.org/10.1023/a:1010933404324
  * Breiman (2001b) Leo Breiman. 2001b.  Random forests.  _Machine learning_ 45 (2001), 5–32.
  * Bénard et al. (2021) Clément Bénard, Gérard Biau, Sébastien da Veiga, and Erwan Scornet. 2021.  Interpretable random forests via rule extraction. In _International Conference on Artificial Intelligence and Statistics_. PMLR, 937–945.
  * Castelvecchi (2016) Davide Castelvecchi. 2016\.  Can we open the black box of AI?  _Nature_ 538, 7623 (Oct. 2016), 20–23.  https://doi.org/10.1038/538020a
  * Deng (2014) Houtao Deng. 2014\.  Interpreting Tree Ensembles with inTrees.  https://doi.org/10.48550/ARXIV.1408.5456
  * Freund and Schapire (1997) Yoav Freund and Robert E Schapire. 1997.  A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting.  _J. Comput. System Sci._ 55, 1 (1997), 119–139.  https://doi.org/10.1006/jcss.1997.1504
  * Friedman (2001) Jerome H. Friedman. 2001\.  Greedy function approximation: A gradient boosting machine.  _The Annals of Statistics_ 29, 5 (2001), 1189 – 1232.  https://doi.org/10.1214/aos/1013203451
  * Friedman (2002) Jerome H. Friedman. 2002\.  Stochastic gradient boosting.  _Computational Statistics & Data Analysis_ 38, 4 (2002), 367–378.  https://doi.org/10.1016/S0167-9473(01)00065-2 Nonlinear Methods and Data Mining.
  * Friedman and Popescu (2008) Jerome H. Friedman and Bogdan E. Popescu. 2008.  Predictive learning via rule ensembles.  _The Annals of Applied Statistics_ 2, 3 (2008), 916 – 954.  https://doi.org/10.1214/07-AOAS148
  * González-Alday et al. (2023) Raquel González-Alday, Esteban García-Cuesta, Casimir A. Kulikowski, and Victor Maojo. 2023\.  A Scoping Review on the Progress, Applicability, and Future of Explainable Artificial Intelligence in Medicine.  _Applied Sciences_ 13, 19 (2023).  https://doi.org/10.3390/app131910778
  * Gunning (2017) David Gunning. 2017\.  Explainable artificial intelligence (xai).  _Defense advanced research projects agency (DARPA), nd Web_ 2, 2 (2017), 1.
  * Hospitales (2020) HM Hospitales. 2020\.  Covid Data Save Lives.  https://www.hmhospitales.com/prensa/notas-de-prensa/comunicado-covid-data-save-lives.
  * Lundberg and Lee (2017) Scott M Lundberg and Su-In Lee. 2017.  A Unified Approach to Interpreting Model Predictions. In _Advances in Neural Information Processing Systems_ , I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc.
  * Obregon and Jung (2023) Josue Obregon and Jae-Yoon Jung. 2023.  RuleCOSI+: Rule extraction for interpreting classification tree ensembles.  _Information Fusion_ 89 (Jan. 2023), 355–381.  https://doi.org/10.1016/j.inffus.2022.08.021
  * Obregon et al. (2019) Josue Obregon, Aekyung Kim, and Jae-Yoon Jung. 2019\.  RuleCOSI: Combination and simplification of production rules from boosted decision trees for imbalanced classification.  _Expert Systems with Applications_ 126 (July 2019), 64–82.  https://doi.org/10.1016/j.eswa.2019.02.012
  * Prokhorenkova et al. (2018) Liudmila Prokhorenkova, Gleb Gusev, Aleksandr Vorobev, Anna Veronika Dorogush, and Andrey Gulin. 2018.  CatBoost: Unbiased Boosting with Categorical Features. In _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ (Montréal, Canada) _(NIPS’18)_. Curran Associates Inc., Red Hook, NY, USA, 6639–6649.
  * Saabas ([n. d.]) A. Saabas. [n. d.].  teeinterpreter Python package.  ([n. d.]).  https://github.com/andosa/treeinterpreter
  * Sirikulviriya and Sinthupinyo (2011) Naphaporn Sirikulviriya and Sukree Sinthupinyo. 2011.  Integration of Rules from a Random Forest. In _International Conference on Information and Electronics Engineering_ , Vol. 6. 194–198.
  * Stevens (1946) S. S. Stevens. 1946\.  On the Theory of Scales of Measurement.  _Science_ 103, 2684 (June 1946), 677–680.  https://doi.org/10.1126/science.103.2684.677
  * Tulio Ribeiro et al. (2016) Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. 2016\.  Model-agnostic interpretability of machine learning.  _arXiv e-prints_ (2016), arXiv–1606.
  * Wang et al. (2010) Minghui Wang, Xiang Chen, and Heping Zhang. 2010.  Maximal conditional chi-square importance in random forests.  _Bioinformatics_ 26, 6 (Feb. 2010), 831–837.  https://doi.org/10.1093/bioinformatics/btq038


\mu^{2}(mh)=1\end{subarray}}\mathfrak{c}\Big{(}\frac{n}{h}m\Big{)}\sum_{\begin{subarray}{c}u\mid\mathcal{Q}\\\
(u,h)=1\end{subarray}}\sum_{\begin{subarray}{c}c\mid P(z)\\\
(c,\mathcal{Q}h)=1\end{subarray}}\lambda_{c}^{-}\mu(c)\\\
&\times\tilde{\mathfrak{f}}_{j}(2;m,n;u)\prod_{2\nmid p\mid
cu}(-2\mathfrak{w}(p,1;m,n,h)+\mathfrak{w}(p,2;m,n,h)).\end{split}$

We are now finally in a position to apply Lemma 6.3 to bound from below the
sum over the sieve weights. We make the following important observations. From
(6.77), (6.74), (6.71), (5.17) we have

(6.81) $\begin{split}0&\leq
2\mathfrak{w}(p,1;m,n,h)-\mathfrak{w}(p,2;m,n,h)\\\
&=\left.\begin{cases}\frac{1}{p}(2-\frac{2\chi_{p^{*}}(n)+1}{p-1})(1+\frac{\chi_{-4}(p)}{p(p-1)})^{-1},&p\nmid
nm\\\
\frac{2}{p}(1-\frac{\chi_{-4}(p)}{p})^{-1}(1+\chi_{p^{*}}(n)),&p\mid\frac{n}{h}m,p\nmid(m,n)\\\
\frac{1}{p-1}(1-\frac{\chi_{-4}(p)}{p})^{-1}\mathds{1}_{\nu_{p}(n)=1},&p\mid(m,n)\end{cases}\right\\}\leq\frac{5}{p},\end{split}$

for $p\nmid 2h$. So we can choose $\mathcal{Q}=30$ and use a sieve of
dimension $\gamma=5$. Secondly, since $h\mid n$, $(h,2\mathfrak{N})=1$, we
have $\chi_{-4}(h)=1$, so that a lower bound for the sum of sieve weights with
multiplicative coefficients suffices. This is an important device in the
argument. Now applying Lemma 6.3 and (6.60), we obtain

(6.82) $\displaystyle
S(\mathcal{A},n^{1/C})\geq\mathcal{S}(n)\Big{(}f_{5}(C\kappa_{0})+O\Big{(}\frac{e^{-C\kappa_{0}}}{(\log\mathcal{D})^{1/3}}\Big{)}\Big{)}+O(x^{1-\kappa_{0}}),$

where $f_{5}$ has the same meaning as in Lemma 6.3,
$\mathcal{D}=n^{\kappa_{0}}$ for some small $\kappa_{0}>0$ and $C$ a large
constant such that $f_{5}(C\kappa_{0})>0$,

(6.83) $\mathcal{S}(n)=\sum_{\begin{subarray}{c}h\mid n\\\ P^{+}(h)\leq y\\\
\mu^{2}(h)=1\\\
(h,2\mathfrak{N})=1\end{subarray}}\sum_{\begin{subarray}{c}hm\leq x\\\
P^{+}(m)\leq y\\\ (m,\mathfrak{N})=1\\\
\mu^{2}(m_{o}h)=1\end{subarray}}\mathfrak{c}\Big{(}\frac{n}{h}m\Big{)}\mathfrak{F}_{\mathcal{Q}}(m,n,h)\prod_{\begin{subarray}{c}p\leq
z\\\
p\nmid\mathcal{Q}h\end{subarray}}(1-2\mathfrak{w}(p,1;m,n,h)+\mathfrak{w}(p,2;m,n,h)).$

where
$\mathfrak{F}_{\mathcal{Q}}(m,n,h)=\prod_{\begin{subarray}{c}p\mid\mathcal{Q}\\\
p\nmid h\end{subarray}}\mathfrak{F}_{p}(m,n,h)$ with

(6.84) $\displaystyle\mathfrak{F}_{2}(m,n,h)$
$\displaystyle=\sum_{j=1}^{2}(\mathfrak{f}_{j}(2,0;m,n)-2\mathfrak{f}_{j}(2,1;m,n)+\mathfrak{f}_{j}(2,2;m,n))$

(the right hand side is independent of $h$) and

(6.85)
$\displaystyle\mathfrak{F}_{p}(m,n,h)=\begin{cases}(1-2\mathfrak{w}(p,1;m,n,h)+\mathfrak{w}(p,2;m,n,h)),&p\nmid
2h.\\\ 1,&p\mid h.\end{cases}$

Recalling (6.81), we define multiplicative functions
$\mathfrak{g}_{i}(\bullet)$ supported on squarefree integers with
$\mathfrak{g}_{i}(p)=1$ except for $p\mid P_{\mathcal{Q}}(z)$ where

(6.86)
$\begin{split}&\mathfrak{g}_{0}(p)=1-\Big{(}\frac{2}{p}-\frac{2\chi_{p^{*}}(n)+1}{p(p-1)}\Big{)}\Big{(}1+\frac{\chi_{-4}(p)}{p(p-1)}\Big{)}^{-1},\\\
&\mathfrak{g}_{1}(p)=1-\frac{2}{p}\Big{(}1+\chi_{p^{*}}(n)\Big{)}\Big{(}1-\frac{\chi_{-4}(p)}{p}\Big{)}^{-1},\\\
&\mathfrak{g}_{2}(p)=1-\frac{1}{p-1}\Big{(}1-\frac{\chi_{-4}(p)}{p}\Big{)}^{-1}\mathds{1}_{\nu_{p}(n)=1},\end{split}$

so that

$\begin{split}\mathcal{S}(n)=&\sum_{\begin{subarray}{c}h\mid n\\\ P^{+}(h)\leq
y\\\
\mu^{2}(h)=(h,2\mathfrak{N})=1\end{subarray}}\sum_{\begin{subarray}{c}hm\leq
x\\\ P^{+}(m)\leq y\\\ (m,\mathfrak{N})=1\\\
\mu^{2}(m_{o}h)=1\end{subarray}}\mathfrak{c}\Big{(}\frac{n}{h}m\Big{)}\mathfrak{F}_{\mathcal{Q}}(m,n,h)\prod_{\begin{subarray}{c}p\nmid
nm\\\ p\nmid
h\end{subarray}}\mathfrak{g}_{0}(p)\prod_{\begin{subarray}{c}p\mid\frac{n}{h}m\\\
p\nmid
h(m,n)\end{subarray}}\mathfrak{g}_{1}(p)\prod_{\begin{subarray}{c}p\mid(m,n)\\\
p\nmid h\end{subarray}}\mathfrak{g}_{2}(p).\end{split}$

We rename $mh$ by $m$, $h$ by $hg$ where $h\mid(m,n),h\nmid\mathcal{Q}$, and
$2\nmid g\mid(m,n,\mathcal{Q})$. In this way we can re-write $\mathcal{S}(n)$
as

$\begin{split}&\prod_{p\mid
P_{\mathcal{Q}}(z)}\mathfrak{g}_{0}(p)\sum_{\begin{subarray}{c}m\leq x\\\
P^{+}(m)\leq y\\\ (m,\mathfrak{N})=1\\\
\mu^{2}(m_{o})=1\end{subarray}}\sum_{\begin{subarray}{c}g\mid(n,m,\mathcal{Q})\\\
(g,2\mathfrak{N})=1\end{subarray}}\mathfrak{F}_{\mathcal{Q}}\Big{(}\frac{m}{g},n,g\Big{)}\prod_{\begin{subarray}{c}p\mid\mathcal{Q}\\\
p\mid\frac{n}{g}\frac{m}{g}\end{subarray}}\mathfrak{c}(p)\sum_{\begin{subarray}{c}h\mid(m,n)\\\
(h,\mathcal{Q}\mathfrak{N})=1\end{subarray}}\frac{1}{\mathfrak{g}_{0}(h)}\prod_{\begin{subarray}{c}p\mid(m,n)\\\
p\nmid
h\end{subarray}}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\mid
mn\\\
p\nmid(m,n)\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid\frac{n}{h}\frac{m}{h}\end{subarray}}\mathfrak{c}(p)\\\ &=\prod_{p\mid
P_{\mathcal{Q}}(z)}\mathfrak{g}_{0}(p)\sum_{\begin{subarray}{c}r\mid
2^{\infty}\mathcal{Q}\\\
(r,\mathfrak{N})=1\end{subarray}}\Big{(}\sum_{\begin{subarray}{c}g\mid(n,r,\mathcal{Q})\\\
\mu^{2}(g)=1\\\
(g,2\mathfrak{N})=1\end{subarray}}\mathfrak{F}_{\mathcal{Q}}\Big{(}\frac{r}{g},n,g\Big{)}\prod_{\begin{subarray}{c}p\mid\mathcal{Q}\\\
p\mid\frac{n}{g}\frac{r}{g}\end{subarray}}\mathfrak{c}(p)\Big{)}\\\
&\quad\quad\quad\quad\quad\times\sum_{\begin{subarray}{c}m\leq x/r\\\
P^{+}(m)\leq y\\\ (m,\mathcal{Q}\mathfrak{N})=1\\\
\mu^{2}(m)=1\end{subarray}}\Big{(}\sum_{\begin{subarray}{c}h\mid(m,n)\end{subarray}}\frac{1}{\mathfrak{g}_{0}(h)}\prod_{\begin{subarray}{c}p\mid(m,n)\\\
p\nmid
h\end{subarray}}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\mid
mn\\\
p\nmid(m,n)\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid\frac{n}{h}\frac{m}{h}\end{subarray}}\mathfrak{c}(p)\Big{)}.\end{split}$

We first see that the sum over $g$ can be written as (note that
$\mathfrak{F}_{p}(\bullet,\bullet,p)=1$)

(6.87)
$\displaystyle\prod_{\begin{subarray}{c}p\mid\mathcal{Q}\end{subarray}}\Big{(}\mathfrak{F}_{p}(r,n,1)\prod_{p\mid
rn}\mathfrak{c}(p)+\mathds{1}_{\begin{subarray}{c}p\mid(n,r)\\\ p\nmid
2\mathfrak{N}\end{subarray}}\cdot\prod_{\begin{subarray}{c}p\mid\frac{n}{p}\frac{r}{p}\end{subarray}}\mathfrak{c}(p)\Big{)}=:\mathfrak{F}_{\mathcal{Q}}(r,n)=\prod_{p\mid\mathcal{Q}}\mathfrak{F}_{p}(r,n).$

With $\mathcal{Q}=30$, $\mu^{2}(r_{o})=1$, this becomes

(6.88)
$\displaystyle\mathfrak{F}_{2}(r,n,1)\mathfrak{F}_{3}(r,n,1)\prod_{3\mid
nr}\mathfrak{c}(3)\Big{(}\mathfrak{F}_{5}(r,n,1)\prod_{5\mid
nr}\mathfrak{c}(5)+\mathds{1}_{5\mid(n,r)}\cdot\prod_{p\mid\frac{n}{5}}\mathfrak{c}(5)\Big{)}.$

Using (6.84), (6.73), (6.75) and (6.85), (6.81), we compute explicitly

(6.89)
$\displaystyle\mathfrak{F}_{2}(r,n)=\begin{cases}\frac{1}{2}\mathds{1}_{2\nmid
r},&n\equiv 1\,(\textup{mod}\,2),\\\ 2\mathds{1}_{8\mid r},&n\equiv
2\,(\textup{mod}\,8),\\\ 2\mathds{1}_{4\parallel r},&n\equiv
6\,(\textup{mod}\,8),\\\ \mathds{1}_{2\parallel r},&n\equiv
0\,(\textup{mod}\,4).\end{cases},\quad\mathfrak{F}_{3}(r,n)=\begin{cases}\frac{4}{5}\mathds{1}_{3\nmid
r},&n\equiv 1\,(\textup{mod}\,3),\\\ \frac{8}{5}\mathds{1}_{3\mid r},&n\equiv
2\,(\textup{mod}\,3),\\\ \frac{4}{5}\mathds{1}_{3\nmid r},&n\equiv
0\,(\textup{mod}\,3),\end{cases}$

(note that if $3\mid n$ then $(r,3)=1$ since $(r,\mathfrak{N})=1$) and (with
$\mathfrak{c}(5)=\frac{16}{21}$)

(6.90)
$\displaystyle\mathfrak{F}_{5}(r,n)=\begin{cases}\mathfrak{c}(5)\mathds{1}_{5\nmid
r},&n\equiv 1,4\,(\textup{mod}\,5),\\\ \mathfrak{c}(5)\mathds{1}_{5\mid
r}+\frac{4}{7}\mathds{1}_{5\nmid r},&n\equiv 2,3\,(\textup{mod}\,5),\\\
2\mathfrak{c}(5)\mathds{1}_{\begin{subarray}{c}5\mid n\\\ 5\mid
r\end{subarray}}+\frac{1}{2}\mathfrak{c}(5)\mathds{1}_{5\nmid r},&n\equiv
0\,(\textup{mod}\,5).\end{cases}$

In particular, we can always find some residue class
$r_{0}\,(\textup{mod}\,120)$ such that $\mathfrak{F}_{\mathcal{Q}}(r,n)>0$ for
$r\equiv r_{0}\,(\textup{mod}\,120)$.

Noting that $(m,\mathcal{Q})=\mu^{2}(m)=1$ and $\mathfrak{g}_{i}(p)=1$ if
$p\mid\mathcal{Q}$, we next evaluate the inner sum over $h$ as

(6.91)
$\begin{split}&\sum_{\begin{subarray}{c}h\mid(m,n)\end{subarray}}\frac{1}{\mathfrak{g}_{0}(h)}\prod_{\begin{subarray}{c}p\mid(m,n)\\\
p\nmid
h\end{subarray}}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\mid
mn\\\
p\nmid(m,n)\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid\frac{n}{h}\frac{m}{h}\end{subarray}}\mathfrak{c}(p)\\\
&=\sum_{h\mid(m,n)}\frac{1}{\mathfrak{g}_{0}(h)}\prod_{p\mid
h}\frac{\mathfrak{g}_{0}(p)}{\mathfrak{g}_{2}(p)}\prod_{\begin{subarray}{c}p\mid
h\\\
\nu_{p}(n)=1\end{subarray}}\frac{1}{\mathfrak{c}(p)}\prod_{p\mid(m,n)}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\mid
m\\\ p\nmid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\prod_{\begin{subarray}{c}p\mid
n\\\ p\nmid
m\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\prod_{\begin{subarray}{c}p\mid
n\\\ p\nmid
m\mathcal{Q}\end{subarray}}\mathfrak{c}(p)\prod_{\begin{subarray}{c}p\mid(m,n)\end{subarray}}\mathfrak{c}(p)\\\
&=\sum_{\begin{subarray}{c}h\mid(m,n)\end{subarray}}\Big{(}\frac{1}{\mathfrak{g}_{0}(h)}\prod_{p\mid
h}\frac{\mathfrak{g}_{0}(p)}{\mathfrak{g}_{2}(p)}\prod_{\begin{subarray}{c}p\mid
h\\\
\nu_{p}(n)=1\end{subarray}}\frac{1}{\mathfrak{c}(p)}\Big{)}\prod_{\begin{subarray}{c}p\mid(m,n)\end{subarray}}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{1}(p)}\prod_{\begin{subarray}{c}p\mid
m\\\ p\nmid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\\\
&=\prod_{\begin{subarray}{c}p\mid(m,n)\\\
\nu_{p}(n)=1\end{subarray}}\Big{(}1+\frac{1}{\mathfrak{c}(p)\mathfrak{g}_{2}(p)}\Big{)}\prod_{\begin{subarray}{c}p\mid(m,n)\\\
\nu_{p}(n)>1\end{subarray}}\Big{(}1+\frac{1}{\mathfrak{g}_{2}(p)}\Big{)}\prod_{\begin{subarray}{c}p\mid(m,n)\end{subarray}}\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{1}(p)}\prod_{\begin{subarray}{c}p\mid
m\\\ p\nmid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\\\
&=:\mathfrak{G}(m;n)\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\ p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p),\end{split}$

where $\mathfrak{G}(m;n)$ is a multiplicative function of $m$ with
$\mathfrak{G}(p^{\nu};n)=0$ for $\nu\geq 2$ and $\mathfrak{G}(p;n)=0$ for
$p\mid\mathcal{Q}\mathfrak{N}$. We summarize

(6.92) $\mathcal{S}(n)=\prod_{p\mid
P_{\mathcal{Q}}(z)}\mathfrak{g}_{0}(p)\sum_{\begin{subarray}{c}r\mid
2^{\infty}\mathcal{Q}\\\
(r,\mathfrak{N})=1\end{subarray}}\mathfrak{F}_{\mathcal{Q}}(r,n)\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\sum_{\begin{subarray}{c}m\leq
x/r\\\ P^{+}(m)\leq y\end{subarray}}\mathfrak{G}(m;n).$

###  6.7. Computation of the main term IV – summing over smooth squarefree
numbers

Our last goal is a lower bound for $\mathcal{S}(n)$ based on the formula
(6.92). This will be achieved in (6.109) below. In order to carry out the sum
over $m$ in (6.92), it is useful to define
$\mathfrak{h}(\bullet;n)=\mathfrak{G}(\bullet;n)*\mu$. Recall that the
definition of $\mathfrak{G}(m;n)$ is implicit in (6.91), so that
$\mathfrak{h}(p^{\nu};n)=0$ if $\nu>2$, and for $\nu\leq 2$ we have

(6.93)
$\displaystyle\mathfrak{h}(p;n)=\begin{cases}(1+\frac{1}{\mathfrak{c}(p)\mathfrak{g}_{2}(p)})\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{1}(p)}-1,&p\mid
n,p\nmid\mathcal{Q}\mathfrak{N},\nu_{p}(n)=1,\\\
(1+\frac{1}{\mathfrak{g}_{2}(p)})\frac{\mathfrak{g}_{2}(p)}{\mathfrak{g}_{1}(p)}-1,&p\mid
n,p\nmid\mathcal{Q}\mathfrak{N},\nu_{p}(n)>1,\\\
-1,&p\mid\mathcal{Q}\mathfrak{N},\\\
\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)-1,&p\nmid
n\mathcal{Q}\end{cases}$

and

(6.94) $\displaystyle\mathfrak{h}(p^{2};n)=-\mathfrak{h}(p,n)-1.$

In particular, from (6.86) and (5.17) we have

(6.95) $\displaystyle\mathfrak{h}(p;n)=\begin{cases}1+\frac{4}{p-3},&p\mid
n,p\nmid\mathcal{Q}\mathfrak{N},\\\ -1,&p\mid\mathcal{Q}\mathfrak{N},\\\
O(\frac{1}{p}),&p\nmid
n\mathcal{Q},\end{cases}\quad\mathfrak{h}(p^{2};n)=O(1),$

where we can take $5$ as implied constants. In order to evaluate

(6.96) $\displaystyle\sum_{\begin{subarray}{c}m\leq x/r\\\ P^{+}(m)\leq
y\end{subarray}}\mathfrak{G}(m;n)=\sum_{\begin{subarray}{c}t\leq x/r\\\
P^{+}(t)\leq
y\end{subarray}}\mathfrak{h}(t;n)\Psi\left(\frac{x}{tr},y\right),$

we first truncate the $t$-sum. To this end we recall [FT96, Lemma 4.2]: we
have uniformly in $\exp((\log\log x)^{2})\leq y\leq x$ and $d\leq x$ the
estimate

(6.97) $\Psi(x/d,y)\ll\frac{\Psi(x,y)}{d^{1-\beta}}$

where

$\beta=\beta(x,y)=\frac{\xi(u)+O(1)}{\log y}\quad\text{and}\quad
e^{\xi(t)}=1+t\xi(t)$

is an implicit definition for $\xi(t)$ and as usual $u=\log x/\log y$. It is
easy to see that $\xi(u)=\log(u\log u)+O(1)$. Note that for $\log
y\geq(\log\log x)^{2}$ we have $\beta=o(1)$.

Let $K=n^{1/100}$. The contribution from $t\geq K$ or $r\geq K$ to (6.96) can
be bounded by

(6.98) $\displaystyle\Psi(x,y)\sum_{t_{1}t_{2}^{2}\geq
K}\frac{(t_{1},n)}{t_{1}(t_{1}t^{2}_{2})^{1-\beta}}\ll\Psi(x,y)\frac{1}{K^{1-\beta}}\sum_{t_{1},t_{2}}\frac{(t_{1},n)}{t_{1}(t_{1}t^{2}_{2})^{1-\beta}}\ll
K^{-1/3}n^{\varepsilon}\Psi(x,y).$

For $t,r\leq K$ we evaluate the sum by [FT91, Theorem 2 with $q=1$] getting

(6.99) $\begin{split}&\sum_{\begin{subarray}{c}t\leq K\\\ P^{+}(t)\leq
y\end{subarray}}\mathfrak{h}(t;n)\frac{x}{tr}\int_{0^{-}}^{\infty}\rho\Big{(}\frac{\log
x}{\log y}-\frac{\log(tr)}{\log
y}-v\Big{)}dR(y^{v})\Big{(}1+O\big{(}\exp(-(\log
y)^{0.55})\big{)}\Big{)}.\end{split}$

where $R(x)=[x]/x$. Strictly speaking, the application of [FT91, Theorem 2]
requires $y\leq x/K^{2}\leq x/(tr)$, which we can assume without loss of
generality since $\Psi(x,y)\asymp\Psi(x,x)$ for $y>x^{1/2}$, say.

To estimate the error term, we use (6.97) again, and obtain the bound

(6.100) $\begin{split}\sum_{t\leq
K}|\mathfrak{h}(t;n)|\Psi\Big{(}\frac{x}{tr};y\Big{)}\exp(-(\log
y)^{0.55})&\ll\prod_{p\mid
n}\Big{(}1+\frac{O(1)}{p^{1-\beta}}\Big{)}\Psi(x,y)\exp(-(\log y)^{0.55})\\\
&\ll\Psi(x,y)\frac{(\log n)^{O(1)}}{\exp((\log
y)^{0.55})}\ll\frac{\Psi(x,y)}{(\log x)^{100}}\end{split}$

for $\log y\geq(\log\log x)^{2}$.

We now focus on the main term in (6.99) which we substitute back as the
$m$-sum in (6.92). By partial summation, the main term equals

(6.101) $\displaystyle\prod_{p\mid P_{\mathcal{Q}}(z)}\mathfrak{g}_{0}(p)\cdot
x\int_{0^{-}}^{\infty}\rho(u-v)dW(y^{v})$

where

(6.102) $\displaystyle W(U)$
$\displaystyle=\frac{1}{U}\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\ p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\sum_{\begin{subarray}{c}r\leq
K\\\ r\mid 2^{\infty}\mathcal{Q}\\\
(r,\mathfrak{N})=1\end{subarray}}\mathfrak{F}_{\mathcal{Q}}(r,n)\sum_{\begin{subarray}{c}t\leq
K\\\ P^{+}(t)\leq
y\end{subarray}}\mathfrak{h}(t;n)\sum_{\begin{subarray}{c}m\leq
U/tr\end{subarray}}1.$

It is clear that $W(U)=0$ for $U<1$ and $W(U)=c+O(1/U)$ for some constant $c$
(depending on $n$ and $z$). In preparation for an application of [FT90, Lemme
4.1] we define

$M(s)=\int e^{-sv}dW(e^{v}).$

We compute $M(s)$ as

$M(s)=\mathfrak{S}_{K}(n,s)\frac{s}{s+1}\zeta(s+1)$

where

(6.103)
$\displaystyle\mathfrak{S}_{K}(n,s)=\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\sum_{\begin{subarray}{c}r\leq
K\\\ r\mid 2^{\infty}\mathcal{Q}\\\
(r,\mathfrak{N})=1\end{subarray}}\frac{\mathfrak{F}_{\mathcal{Q}}(r,n)}{r^{s+1}}\sum_{\begin{subarray}{c}t\leq
K\\\ P^{+}(t)\leq y\end{subarray}}\frac{\mathfrak{h}(t;n)}{t^{s+1}}.$

Recalling (6.86) and (5.17) we have

(6.104)
$\frac{60}{67}\leq\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)=1-\frac{\chi_{-4}(p)}{p}+O(p^{-2}),\quad
p\mid n,\,\,p\nmid\mathcal{Q}=30.$

We can extend $r,t$ to infinity getting

(6.105)
$\displaystyle\mathfrak{S}(n,s)=\prod_{\begin{subarray}{c}p\nmid\mathcal{Q}\\\
p\mid
n\end{subarray}}\frac{\mathfrak{g}_{1}(p)}{\mathfrak{g}_{0}(p)}\mathfrak{c}(p)\sum_{k=0}^{\infty}\frac{\mathfrak{F}_{2}(2^{k},n)}{2^{k(s+1)}}\prod_{\begin{subarray}{c}p\mid\mathcal{Q}\\\
(p,2\mathfrak{N})=1\end{subarray}}\Big{(}\mathfrak{F}_{p}(1,n)+\frac{\mathfrak{F}_{p}(p,n)}{p^{s+1}}\Big{)}\prod_{\begin{subarray}{c}p\leq
y\end{subarray}}\Big{(}1+\frac{\mathfrak{h}(p;n)}{p^{s+1}}+\frac{\mathfrak{h}(p^{2};n)}{p^{s+2}}\Big{)}$

where uniformly in $|s|\leq 1/2$ we have (once again by Rankin’s trick)

(6.106)
$\mathfrak{S}(n,s)-\mathfrak{S}_{K}(n,s)\ll\frac{1}{K^{1/2}}\prod_{p\mid
n}\Big{(}1+\frac{1}{p^{\Re
s+1/2}}\Big{)}\Big{)}\ll\frac{1}{K^{1/4}}=n^{-1/400},$

and by Cauchy’s formula this bound remains true for all fixed derivatives with
respect to $s$. Note that by (6.95) we have

(6.107) $\displaystyle\frac{6}{7}\leq
1+\frac{\mathfrak{h}(p;n)}{p}+\frac{\mathfrak{h}(p^{2};n)}{p^{2}}=1+\frac{\chi_{-4}(p)}{p}+O(p^{-2}),\quad
p\mid n.$

Combing (6.89), (6.90), (6.95), (6.104) and (6.107), we obtain for all $j\geq
0$ that

(6.108)
$\frac{d^{j}}{ds^{j}}\mathfrak{S}(n,s)|_{s=0}\asymp\prod_{\begin{subarray}{c}p\mid
n\\\ p\leq\min(y,z)\end{subarray}}\Big{(}1+O\Big{(}\frac{(\log
p)^{j}}{p^{2}}\Big{)}\Big{)}\prod_{\begin{subarray}{c}p\mid n\\\
p\geq\min(y,z)\end{subarray}}\Big{(}1+O\Big{(}\frac{(\log
p)^{j}}{p}\Big{)}\Big{)}\ll 1$

for $\log y\gg(\log\log x)^{2}$ and $\log z\asymp\log n$, and we also see
$\mathfrak{S}(n,0)\gg 1.$

We are now prepared to apply [FT90, Lemme 4.1] to evaluate (6.101), which we
complement with [FT91, Lemme 4.1] for bounds of $\rho^{(j)}(u)$. Using again
$\log y\gg(\log\log n)^{2}$ and $\log z\asymp\log n$ and recalling the error
terms (6.100), (6.98) and (6.106), we conclude

(6.109) $\begin{split}\mathcal{S}(n)&\asymp\Big{(}\prod_{p\mid
P_{\mathcal{Q}}(z)}\mathfrak{g}_{0}(p)\Big{)}\mathfrak{S}(n,0)x\rho(u)\Big{(}1+O\Big{(}\frac{\log\log
n}{\log y}\Big{)}\Big{)}+O\Big{(}\frac{\Psi(x,y)}{(\log x)^{100}}\Big{)}\\\
&\gg\frac{x\rho(u)}{(\log z)^{2}}+O\Big{(}\frac{\Psi(x,y)}{(\log
x)^{100}}\Big{)}\asymp\frac{\Psi(x,y)}{(\log z)^{2}}.\end{split}$

We plug this lower bound back into (6.82) and choose $C=C(\kappa_{0})$ a
sufficiently large constant so that $f_{5}(C\kappa_{0})>0$ getting

$S(\mathcal{A},n^{1/C})\gg(\log z)^{-2}\Psi(x,y)$

provided that $\log y\gg(\log\log n)^{2}$ and $\mathcal{D}=n^{\kappa_{0}}$ for
some sufficiently small $\kappa_{0}>0$. This concludes the proof of Theorem
1.2.

Remark. We close the paper by a short comment on the “singular series”
$\mathfrak{S}(n,0)$ encountered in the final lower bound, which might look a
bit unexpected. This is due to our restrictions on $m$, in particular the fact
that we impose a squarefree condition on $m$. As squarefree numbers are not
equidistributed among all residue classes, the singular series
$\mathfrak{S}(n,0)$ will genuinely depend on the factorization of $n$ in our
set-up. For example, we can see from (6.89) that there are fewer solutions to
$n=m+x^{2}+y^{2}$ with $(xy,3)=1$, $\mu^{2}(m_{o})=1$ when $n\equiv
2\,(\textup{mod}\,3)$ than in the other cases, whilst the number of solutions
to $n=m+x^{2}+y^{2}$ with $(xy,3)=1$ and no extra conditions on $m$ would be
approximately equal for all residue classes of $n\,(\textup{mod}\,3)$.

## References

  * [ABL] E. Assing, V. Blomer, J. Li, _Uniform Titchmarsh divisor problems_ , to appear in Adv. Math.
  * [Ba] A. Balog, _On additive representation of integers_ , Acta Math. Hungar. 54 (1989), 297-301.
  * [BBD] V. Blomer, J. Brüdern, R. Dietmann, _Sums of smooth squares_ , Compos. Math. 145 (2009), 1401-1441.
  * [BFI] E. Bombieri, J. Friedlander, H. Iwaniec, _Primes in arithmetic progressions to large moduli_ , Acta Math. 156 (1986) 203-251.
  * [Co] D. A. Cox, _Primes of the form $x^{2}+ny^{2}$_, John Wiley, 1989.
  * [Dr1] S. Drappeau, Théorèmes de type Fouvry-Iwaniec pour les entiers friables, Compositio Math. 151 (2015), 828–862.
  * [Dr2] S. Drappeau, _Sums of Kloosterman sums in arithmetic progressions, and the error term in the dispersion method_ , Proc. Lond. Math. Soc. 114 (2017), 684-732.
  * [DFI] W. Duke, J. Friedlander, H. Iwaniec. _Bounds for automorphic L-functions_ , Invent. Math. 112(1993), 1–8.
  * [EH] P. D. T. A. Elliott, H. Halberstam, _Some applications of Bombieri’s theorem_ , Mathematika 13 (1966), 196-203.
  * [FT90] É. Fouvry, G. Tenenbaum, _Diviseurs de Titchmarsh des entiers sans grand facteur premier_ , in: Analytic number theory (Tokyo, 1988), Lecture Notes in Mathematics 1434 (Springer, Berlin, 1990), 86–102.
  * [FT91] É. Fouvry, G. Tenenbaum, _Entiers sans grand facteur premier en progressions arithmétiques_ , Proc. London Math. Soc. (3) 63 (1991), 449–494.
  * [FT96] E. Fouvry, G. Tenenbaum, _Répartition statistique des entiers sans grand facteur premier dans les progressions arithmétiques_ , Proc. London Math. Soc. 72 (1996), 481-514.
  * [FI] J. B. Friedlander and H. Iwaniec, _Opera de cribro_ , Coll. Publ. 57 (2010), AMS, Providence, RI.
  * [Ha] A. Harper, _Bombieri-Vinogradov and Barban-Davenport-Halberstam type theorems for smooth numbers_ , arXiv:1208.5992
  * [HL] G. H. Hardy, J. E. Littlewood, _Some problems of partitio numerorum; III: on the expression of a number as a sum of primes_ , Acta Math. 44 (1922), 1-70.
  * [HB] D. R. Heath-Brown, _A new form of the circle method, and its application to quadratic forms_ , J. Reine Angew. Math. 481 (1996), 149-206.
  * [Hi] A. Hildebrand, _On the number of positive integers $\leq x$ and free of prime factors $>y$_, J. Number Theory 22 (1986), 289-307.
  * [HT] A. Hildebrand, G. Tenenbaum, _On integers free of large prime factors._ Trans. Amer. Math. Soc. 296 (1986), 265-290.
  * [Ho1] C. Hooley, _On the representation of a number as the sum of two squares and a prime_ , Acta Math. 97 (1957), 189-210.
  * [Ho2] C. Hooley, _On the representation of a number as the sum of a prime and two squares of square-free numbers_ , Acta Arith. 182 (2018), 201-229.
  * [Iw1] H. Iwaniec, _Primes of the type $\phi(x,y)+A$ where $\phi$ is a quadratic form_, Acta Arith. 21 (1972), 203-234.
  * [Iw2] H. Iwaniec, _Rosser’s sieve_ , Acta Arith. 36 (1980), 171-202.
  * [Iw3] H. Iwaniec, _A new form of the error term in the linear sieve_ , Acta Arith. 37 (1980), 307-320.
  * [Iw4] H. Iwaniec, _Topics in classical automorphic forms_ , Grad. Stud. Math. 17 (1997), AMS.
  * [IK] H. Iwaniec, E. Kowalski, _Analytic Number Theory_ , AMS Colloquium Publications 53, Providence 2004
  * [Ju] M. Jutila, _A variant of the circle method_ , in: Sieve methods, exponential sums, and their application in number theory (Cardiff 1995), 245-254.
  * [KMS] H. Ki, H. Maier, A. Sankaranarayanan, _Additive problems with smooth integers_ , Acta Arith. 175 (2016), 301-319.
  * [KMV] E. Kowalski, P. Michel, J. VanderKam, _Rankin-Selberg $L$-functions in the level aspect_, Duke Math. J. 114 (2002), 123-191.
  * [XLi] X. Li, _Upper bounds on $L$-functions at the edge of the critical strip_, IMRN 2010, 727 - 755
  * [Li] Ju. V. Linnik, _An asymptotic formula in an additive problem of Hardy-Littlewood_ , Izv. Akad. Nauk SSSR Ser. Mat. 24 (1960), 629-706.
  * [Mu2] R. Munshi, _Shifted convolution of divisor function $d_{3}$ and Ramanujan $\tau$ function_, Ramanujan Math. Soc. Lect. Notes Ser. 20 (2013), 251-260
  * [Pi] N. Pitt, _On an analogue of Titchmarsh’s divisor problem for holomorphic cusp forms_ , J. Amer. Math. Soc. 26 (2013), 735-776
  * [Vi] A. I. Vinogradov, _General Hardy-Littlewood equation_ , Mat. Zametki 1 (1967), 189-197.