# Harris Hawks Feature Selection in Distributed Machine Learning for Secure
IoT Environments

Neveen Hijazi1, Moayad Aloqaily1, Bassem Ouni2, Fakhri Karray1, Merouane
Debbah2
2{bassem.ouni<EMAIL_ADDRESS>
1Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI), UAE
2Technology Innovation Institute (TII), Abu Dhabi, UAE
E-mails: 1{neveen.hijazi; moayad.aloqaily<EMAIL_ADDRESS>
###### Abstract

The development of the Internet of Things (IoT) has dramatically expanded our
daily lives, playing a pivotal role in the enablement of smart cities,
healthcare, and buildings. Emerging technologies, such as IoT, seek to improve
the quality of service in cognitive cities. Although IoT applications are
helpful in smart building applications, they present a real risk as the large
number of interconnected devices in those buildings, using heterogeneous
networks, increases the number of potential IoT attacks. IoT applications can
collect and transfer sensitive data. Therefore, it is necessary to develop new
methods to detect hacked IoT devices. This paper proposes a Feature Selection
(FS) model based on Harris Hawks Optimization (HHO) and Random Weight Network
(RWN) to detect IoT botnet attacks launched from compromised IoT devices.
Distributed Machine Learning (DML) aims to train models locally on edge
devices without sharing data to a central server. Therefore, we apply the
proposed approach using centralized and distributed ML models. Both learning
models are evaluated under two benchmark datasets for IoT botnet attacks and
compared with other well-known classification techniques using different
evaluation indicators. The experimental results show an improvement in terms
of accuracy, precision, recall, and F-measure in most cases. The proposed
method achieves an average F-measure up to 99.9%. The results show that the
DML model achieves competitive performance against centralized ML while
maintaining the data locally.

###### Index Terms:

IoT, Harris Hawks Optimization, Cognitive Cities, Smart Buildings, Distributed
Machine Learning.

##  I Introduction

Internet of Things (IoT) is one of the most significant revolutions of the
21st century and can be simply described as a set of connected smart edge
devices. These devices can be found in many applications we encounter across
our daily lives including healthcare, smart cities, transportation systems,
and smart grids [1]. IoT environments typically consist of collections of
distributed heterogeneous devices with low computational memory, and they have
the ability to expand with other interconnected networks, which results in
many security concerns [2]. The enormous increase in IoT devices and their
lack of security guarantees has motivated attackers to launch attacks by
setting up large-scale IoT botnet attacks. A botnet is a network of devices
connected to IoT devices that are infected by malware. In addition,
compromised devices have a simple infection process, which makes every
vulnerable device a bot candidate. Some of the most popular examples of IoT
botnet attacks are Mirai, BASHLITE, and Phishing [3]. Consequently, this
highlights the importance of increasing security measures to identify the most
critical cyberattacks in a smart IoT environment.

Intrusion Detection Systems (IDSs) are security systems that detect attacks
and malicious activities in networks, such as botnet attacks. ML techniques
can play an essential role in IDS structures to classify and predict attacks.
Different ML techniques are used to detect anomalies and attacks in
cybersecurity, such as K-Nearest Neighbor (KNN), Support Vector Machines
(SVM), and Decision Trees (DT) [4, 5]. However, IoT devices continuously
produce vast amounts of data that is challenging to deal with using
traditional ML techniques and requires complex models to process such as deep
learning technique [1]. Therefore, there is a need for more efficient
searching and learning algorithms, which has led to the emergence of
metaheuristic algorithms.

Metaheuristics algorithms are a well-regarded choice to solve high-dimensional
problem through the utilization of the feature selection technique [6]. The
objective of this technique is to generate a highly accurate general model
while minimizing the number of selected features in order to reduce
computational time. Therefore, various works have utilized metaheuristic
algorithms in feature selection methods such as Genetic Algorithm (GA),
Particle Swarm Optimization (PSO), and Harris Hawks Optimization (HHO) [5, 7].

Distributed ML is a valuable approach, it aims to train one or more ML models
for a network of users, each having a local dataset. Thus, distributed ML
reduces data transmissions within centralized ML and minimizes the risks of
privacy leaks. In addition, it can reduce the risk of a single point of
failure compared to centralized ML [8]. Distributed ML can be applied in
various applications such as healthcare [9] and wireless network [2]. In this
study, we propose a hybrid model based on the HHO and Random Weight Network
(RWN) algorithms to detect botnet attacks launched from compromised IoT
devices. The proposed approach performs wrapper FS based on two main stages:
centralized and distributed ML. Wrapper FS consists of three repeated steps
including search algorithm, learning algorithm, and an evaluation measure. In
our work, we used HHO as a search algorithm to select the near-optimal feature
subset of the input features and optimized the RWN structure simultaneously to
increase the prediction power. Then, RWN is applied as a learning algorithm to
fit the training dataset according to the selected solution. Finally,
evaluation measures are applied to assess the quality of the selected
solution. The proposed approach is compared with other metaheuristics
approaches [10].

The contributions of this work can be summarized as

  1. 1.

We propose an intrusion detection system based on HHO with RWN.

  2. 2.

We apply RWN as the base classifier in wrapper FS, unlike most of the
literature that uses KNN.

  3. 3.

We utilize the HHO algorithm to achieve two different objectives
simultaneously, including, near-optimal subset of features and number of
hidden neurons in RWN.

  4. 4.

We leverage distributed ML to maintain data privacy and apply the proposed
approach using a distributed ML scheme.

The rest of the paper is organized as follows. Section II presents the
background and related works of Harris Hawks Optimization, Random Weight
Network algorithms, and Decentralized machine learning. The methodology and
proposed approach are described in detail in Section III. The conducted
experiments and the obtained results are discussed in Section IV. Finally, we
conclude our work and provide suggestions for future directions in Section V.

##  II Background and Related Work

###  II-A Harris Hawks Optimization (HHO)

HHO is a meta-heuristic optimization algorithm developed by A. Heidari et al.
[11]. The HHO algorithm was inspired by the behavior of Harris Hawks.
Precisely, HHO uses a multi-agent system where each agent represents a
solution and collaborates with other agents to search for the global optimal
solution. The algorithm starts with a set of initial solutions, and then
updates the solutions by exchanging information and searching in a new
direction. The algorithm terminates when a stopping criterion is met, such as
reaching a maximum number of iterations or finding a solution that meets a
certain fitness threshold. HHO uses a combination of global and local search
techniques to balance the exploration and exploitation of a search space in
order to find the global optimum solution. In the exploration phase, candidate
solutions are randomly generated and evaluated for potential optimization. The
selection of the solution generation strategy is based on a probability of
either considering the location of already discovered solutions or relying on
randomly determined positions. The exploitation phase of the HHO algorithm is
a key component that influences the optimization performance. In this phase,
the algorithm uses the surprise pounce strategy to search for optimal
solutions in the problem space. The algorithm follows four different chasing
strategies: Soft Besiege, Hard Besiege, Soft Besiege with progressive rapid
dives, and Hard Besiege with advanced fast dives. The choice of strategy is
based on the energy of the prey, where the prey energy loses its energy while
escaping the hawk. Thus, the hawks alternate between different exploitative
behaviors based on the prey’s energy during running.

HHO is applied in different and broad applications in the literature. For
instance, O. Alzubi et al. [4] proposed an SVM combined with HHO for Android
malware detection. Their research relied on two targets, the first goal was to
determine the best hyperparameters for the SVM, and the second was to
determine the weights of the features to determine the most important ones,
thus improving the detection process by using the HHO algorithm. Their
approach was compared against existing techniques using four different
datasets. The results showed superior performance over other metaheuristic
algorithms and state-of-art classifiers. Another work also mentioned the
importance of HHO [12]. In this study, S. Sokkalingam et al. proposed three
hybrid ML approaches with feature selection methods for IDS: SVM-PSO, SVM-HHO-
PSO, and SVM-HHO. The performance of these methods was evaluated using the
NSL-KDD dataset and compared with various classifiers. The experimental
outcomes indicated that SVM-HHO-PSO achieved the best results compared to
other methods.

###  II-B Random Weight Networks (RWN)

RWN is a computational neural network model developed by Schmidt et al. [13]
to handle the training process of a Single Hidden Layer Feedforward Neural
Network (SLFN), where a node can be a subnet that consist of extra hidden
node. RWN has overcome the problems of back-propagation, such as slow
convergence and high probability of being trapped in a local minimum. In RWN,
the input weights and the hidden biases are initialized randomly; then, the
output weights are analytically computed using the Moore–Penrose generalized
inverse method. Compared to other gradient descent methods used in SLFN, the
RWN learning rate is speedy and has better generalization performance.
Moreover, RWN does not need human intervention to set the parameters manually
such as learning rate, number of epochs, etc. RWN has only one parameter that
needs to be initialized, which is the number of hidden neurons.

RWN is a powerful learning algorithm, which is used in a wide range of
applications. For example, H. Faris et al. [5] proposed a hybrid email spam
detection system based on GA and RWN. The proposed approach performs a wrapper
FS method using an RWN classifier. The GA is used to select the optimal
features and determine the number of neurons in the hidden layer of the RWN.
Their approach detected spam emails and achieved excellent results in terms of
accuracy, recall, and precision. Another hybrid method proposed by E.
Rawashdeh et al. in [14]. In this study, the authors depended on RWN and PSO.
The aim of the work was to optimize the structure of the RWN and to find the
best subset of features. PSO was used to find the best subset of features, as
well as the number of hidden neurons in RWN. The proposed approach was
evaluated on thirty datasets, compared with other state-of-the-art methods,
and showed superior results in most datasets.

###  II-C Distributed Machine Learning (DML)

In this approach of learning, a generic model is distributed by the server to
all clients or devices. The devices then customize the model through local
training and testing with their own data, enabling predictions and insights
from live data generated by the device. This approach keeps the data local,
reducing security and privacy concerns, but the downside is that IoT devices
are not well-suited for intensive computation [2].

Distributed ML has gained more attention in recent years. For instance, F.
Zerka et al. [9] applied several ML algorithms using a distributed framework
to preserve medical data privacy. Their approach was compared with the
centralized ML approach using four small medical datasets. The results show
that the distributed approach delivers similar performance to the centralized
approach, while preserving privacy of the patient data. A. Tuladhar et al.
[15] investigated a distributed ML model by ensemble using three classifiers:
ANNs, SVM, and Random Forests (RF). Their approach was evaluated on four
medical datasets. They found improvement in results when increasing the number
of locally trained models in the ensemble. The authors suggested using the
proposed approach on small datasets.

According to the No Free Lunch theorem (NLF) [16], there is no single
optimization algorithm that outperforms the others in all optimization
problems. Therefore, this field of research offers opportunities for
improvement and the development of new techniques that can tackle a wider
range of problems and applications. This will ultimately lead to more
competitive and improved results when compared to current algorithms. Overall,
it can be understood from the literature that applying evolutionary algorithms
with RWN is gaining more attention from researchers. HHO is a recent
optimization algorithm that has been applied in different applications and has
achieved promising results compared to other metaheuristic techniques.
Moreover, it provides good exploration and exploitation. Therefore, it would
be wise to use these properties with a robust learning algorithm, such as RWN.
In conclusion, the proposed approach differs from previous studies by
proposing a wrapper FS based on HHO and RWN algorithms to solve the IoT botnet
detection problem, and applying the proposed approach within distributed ML
that addresses IoT security and privacy issues.

Figure 1: An overview of the proposed approach.

##  III Methodology

The proposed work is conducted based on a two-stage: centralized and
distributed ML models. We apply the FS method, model construction, evaluation,
and assessment in each stage. The main contribution lies in FS and the phases
of model construction, where a new model based on HHO and RWN is proposed.
This section presents the details of the proposed approach, which is based on
using HHO for FS while simultaneously optimizing the RWN structure.

###  III-A Data Preprocessing

Two benchmark datasets were used for this work: N-BaIoT dataset [17] and
Phishing legitimate dataset [18]. The N-BaIoT dataset is obtained from the
University of California at Irvine (UCI) machine learning repository. This
dataset represents a real IoT network consisting of nine devices: a baby
monitor, two doorbells, four security cameras, a thermostat, and a webcam. The
second dataset was collected from Kaggle datasets. The dataset comprises 48
features extracted from 10,000 web pages, with 5000 being phishing pages and
the other 5000 being legitimate ones [18]. Using the preliminary dataset
without any preprocessing may impact the overall performance of the obtained
model. Because we deal with massive and real datasets, they may contain
inconsistent and redundant data. In order to get the best possible results, we
apply data integration and data normalization. In the integration step, we
integrated the data for the N-BaIoT dataset according to each device type. For
example, the four different types of security cameras are merged into one
file. All the devices in the N-BaIoT dataset have 115 features and 7,062,606
instances. These devices typically connect to IoT networks through Wi-Fi. For
each device, data were collected during normal operation and various attacks
conducted by the BASHLITE and Mirai botnet. The total number of attacks
carried out by BASHLITE and Mirai were 555,932 and 2,838,272 respectively. The
integration step’s benefit is reducing the number of generated models [17].
For the normalization step, we apply the Min-Max normalization method to both
datasets to make all the input values within a consistent scale [0,1].

###  III-B Wrapper Feature Selection based on HHO-RWN

In this work, we apply an FS method on the training dataset to eliminate
irrelevant features, reduce data dimensionality, and increase prediction
performance. Two well-known methods in feature selection are filter-based and
wrapper-based approaches. In our work, we used a wrapper-based approach.
Wrapper FS consists of three main components: the search algorithm, learning
algorithm, and evaluation of the features. Wrappers are more potent than
filters when accuracy is more important than speed. This is because they
explore the relevant subset of features in the search space of a particular
classifier, where most studies use the same classifier used in the learning
process [5]. On the other hand, the drawback of the wrappers is that they
require a high computational time. Most studies use fast classifiers such as
KNN as a primary classifier [5].

In our proposed approach, we utilize RWN as the base classifier; in addition
to the fast-learning property, RWN has good generalization performance. Our
wrapper-based approach selects HHO to search for the relevant feature subsets.
In order to apply a metaheuristic optimization algorithm for a given task, two
crucial design issues have to be addressed: the solution representation and
the fitness function used to evaluate the solution, which are discussed below:

  1. 1.

Solution Representation: A hawk in HHO represents a candidate solution for the
targeted problem. A solution in our work consists of two parts. The first part
is a set of binary bits 1 or 0, which indicate if the corresponding features
are selected or not. The second part of the candidate solution consists of a
group of binary bits that determine the number of hidden nodes in RWN. The
length of the solution is L + M, where L is the number of features in the
dataset, and M is the number of bits reserved to represent the maximum number
of hidden neurons.

  2. 2.

Fitness Function: A fitness function is needed to assess the quality of the
solutions. In this work, we use a fitness function that addresses three
objectives: increasing the classification accuracy, reducing the
dimensionality of the dataset by selecting the relevant features, and
decreasing the complexity of the RWN in terms of the number of hidden nodes.
This fitness function is defined in Eq. 1.

$\displaystyle Fitness$ $\displaystyle=\alpha
Err+\beta\frac{f}{F}+\gamma\frac{n}{N}$ (1)

The parameters $\alpha,\beta,$ and $\gamma$ are three factors within the range
[0–1] that control the weight of each of the classification rate, number of
selected features, and hidden neurons, respectively. $Err$ represents the
classification error rate of the RWN classifier, $f$ denotes the number of
selected features, $F$ is the total number of original features in the
dataset, $n$ is the number of neurons determined by the evaluated HHO
solution, and $N$ is the maximum number of possible neurons in the RWN. The
maximum number of neurons is set to 1024, which is represented by ten elements
in the solution. Usually, the error rate is measured as $(Err=1-Acc)$, where
$Acc$ represents the classification accuracy. To consider the imbalanced
datasets, we use the F-measure instead of accuracy in the error rate measure.
Thus, the error rate in our case becomes $(Err=1-F\\_measure)$. After we
obtained the selected features from the FS process, we must remove the
irrelevant features and keep only the selected features from the training and
testing data which will highly improve the performance measure. The proposed
approach is illustrated in Fig.1. The code is available in the GitHub [19].

As mentioned earlier, the proposed approach was applied in two stages:
centralized and distributed ML. In the centralized ML model, we trained the
proposed approach and other traditional ML techniques by using the entire
training dataset. Then we use the centralized ML model as a reference to
compare the performance of each corresponding distributed ML model in each
dataset. In contrast, the distributed ML models, representing various IoT
devices, were trained on local datasets. We split the training datasets by
sampling without replacement method to ensure the diversity (i.e. different
parts of the training datasets) for each user. So, each user has local data
and applies the proposed approach and other ML techniques, thus distributed ML
contributes to preserve the data privacy.

##  IV Results and Discussion

This section presents a performance evaluation of the proposed approach
through experiments on the datasets. All the experiments were performed using
a PC with Intel Core (TM) i7-165G7 2.8 GHz and 16 GB RAM. The proposed
approach was implemented and tested in Python 3.9.12. Initially, the datasets
are divided into ($66\%$ and $34\%$) for training and testing, respectively.
The training dataset is further distributed into ($75\%$ and $25\%$) for
training and validation, respectively.

Since Evolutionary Algorithms (EAs) are based on randomness, experiments must
be repeated several times to reduce the random effect in EAs performance.
Therefore, the proposed approach was tested under 30 independent runs, while
the number of iterations was 100 and the population size was 200. Commonly,
the population size should be large enough to guarantee the diversity of the
solutions [20]. Most recent references have set the value of the population
size to 200 or less [7, 10]. Therefore, we used the maximum population size
value of many studies. Also, many previous works have set the values of
$\alpha,\beta,$ and $\gamma$, fitness function parameters to 0.99, 0.01, and
0.01, respectively [5, 7]. Therefore, this paper uses the same values of these
parameters in the fitness function. In addition, we compare the performance
with other known classifiers commonly used in the literature, including KNN,
SVM, Adaboost, and DT. This experiment aims to show the motivation for using
RWN as a primary classifier within the FS method and as a final classifier.
Because the datasets are imbalanced, considering the accuracy ratio for
evaluation is misleading. Therefore, we should examine other metrics such as
recall, precision, and F-measure. For all results, the best results were
indicated by a bold typeface. The results of accuracy, recall, precision, and
F-measure values of the centralized and distributed ML models are shown in
Tables I and II, respectively. According to the HHO-RWN results in Table I, we
can see that all average accuracy values are enhanced compared to SVM and
Adaboost classifiers. The accuracy rate has improved up to $2.6\%$ compared to
HHO-SVM in Security camera device. Regarding the average precision results, we
can observe that all values in HHO-RWN are higher than other classifiers. The
precision enhancement rate reached $6.6\%$ in Phishing legitimate dataset. As
for the average F-measure, HHO-RWN outperforms the other classifiers with 4
out of 5 devices in the N-BaIoT dataset. It also achieved the best average
F-measure result in Phishing legitimate dataset.

Figure 2: The convergence curves for centralized ML models during training
iterations.

The maximum result accomplished by HHO-RWN with $99.9\%$. The F-measure rate
has improved by $8.0\%$ compared to HHO-SVM in Webcam device. Table II
illustrates the results for the distributed ML model. We can observe that HHO-
RWN and HHO-DT obtained the highest F-measure with $99.9\%$ in the Webcam
dataset, and HHO-Adaboost achieved the second highest with $99.5\%$. The
F-measure rate has improved up to $9.3\%$. The precision rate has enhanced up
to $14.5\%$ in Phishing legitimate dataset. According to the average recall
results, the maximum result achieved by HHO-RWN with $99.0\%$, and the
improvement rate reached $24.0\%$ in the Security camera device. Additionally,
we compare the performance of centralized and distributed ML models. The
average F-measure of distributed ML yields the best results in the Security
camera device with $99.9\%$, and it shares the same results with the
centralized ML model in the Baby Monitor device with $99.8\%$ and in the
Webcam device with $99.9\%$, and is very competitive in the other cases.
Overall, the results in the distributed ML scheme showed promising
performance. In the distributed ML scheme, we trained the proposed approach on
a portion of the training dataset. While in the centralized scheme, the
proposed approach has been trained in the entire training dataset, leading to
higher generalization and better performance.

The convergence curves of the HHO-RWN in centralized and distributed ML models
with other classifiers are shown in Figs. 2 and 3, respectively for all
datasets, according to the measurement of fitness. It can be seen that the
different selection schemes show a similar convergence pattern. However, the
proposed approach is relatively preferable with regards to the convergence
rate. Noting that 100 iterations are used to monitor convergence in all cases.
It is reasonable to say that the best feature subsets and the best number of
hidden neurons that are selected by the proposed approach enable it to obtain
higher values based on the four metrics measured on the testing dataset. Table
III shows the comparison of average accuracy, recall, and precision values
between HHO-RWN and other metaheuristics. According to the collected results,
HHO-RWN achieved the highest average accuracy among all algorithms for two
devices. HHO-RWN recorded the best performance with a 0.999% accuracy at the
Baby monitor device. When evaluating HHO-RWN ability to correctly identify
anomalies, the results were the best in two devices. Table III also reveals
that HHO-RWN achieved the best average precision values among two devices.

Figure 3: The convergence curves for distributed ML models during training
iterations. TABLE I: Evaluation results of proposed approach and other
comparative methods under the centralized learning scheme.

| HHO-KNN | HHO-SVM | HHO-Adaboost | HHO-DT | HHO-RWN
---|---|---|---|---|---
Datasets | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure
Baby_Monitor | 0.996 | 0.989 | 0.993 | 0.994 | 0.991 | 0.954 | 0.991 | 0.979 | 0.997 | 0.992 | 0.988 | 0.992 | 0.990 | 0.993 | 0.993 | 0.985 | 0.999 | 0.996 | 0.995 | 0.998
Doorbell | 0.999 | 0.989 | 0.987 | 0.993 | 0.996 | 0.982 | 0.982 | 0.954 | 0.995 | 0.990 | 0.973 | 0.992 | 0.994 | 0.995 | 0.992 | 0.977 | 0.998 | 0.984 | 0.996 | 0.997
Thermostat | 0.999 | 0.958 | 0.978 | 0.992 | 0.984 | 0.983 | 0.984 | 0.988 | 0.998 | 0.851 | 0.972 | 0.996 | 0.998 | 0.995 | 0.933 | 0.976 | 0.995 | 0.968 | 0.995 | 0.999
Security_camera | 0.998 | 0.991 | 0.985 | 0.970 | 0.974 | 0.720 | 0.974 | 0.963 | 0.997 | 0.980 | 0.991 | 0.992 | 0.997 | 0.993 | 0.991 | 0.960 | 1.000 | 0.992 | 1.000 | 0.990
Webcam | 0.997 | 0.992 | 0.989 | 0.993 | 0.996 | 0.978 | 0.996 | 0.919 | 0.998 | 0.992 | 0.982 | 0.995 | 0.999 | 0.993 | 0.992 | 0.953 | 0.998 | 0.997 | 0.998 | 0.999
Phishing legitimate | 0.951 | 0.953 | 0.947 | 0.951 | 0.906 | 0.899 | 0.909 | 0.821 | 0.967 | 0.942 | 0.944 | 0.944 | 0.965 | 0.957 | 0.972 | 0.965 | 0.974 | 0.973 | 0.975 | 0.974

TABLE II: Evaluation results of proposed approach and other comparative
methods under the distributed learning scheme.

| HHO-KNN | HHO-SVM | HHO-Adaboost | HHO-DT | HHO-RWN
---|---|---|---|---|---
Datasets | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure | Acc | Rec | Prec | F-measure
Baby_Monitor | 0.991 | 0.997 | 0.991 | 0.996 | 0.989 | 0.972 | 0.990 | 0.994 | 0.992 | 0.995 | 0.998 | 0.996 | 0.996 | 0.990 | 0.966 | 0.990 | 0.998 | 0.994 | 0.991 | 0.998
Doorbell | 0.998 | 0.991 | 0.982 | 0.997 | 0.995 | 0.989 | 0.982 | 0.997 | 0.993 | 0.984 | 0.994 | 0.998 | 0.993 | 0.990 | 0.970 | 0.999 | 0.996 | 0.980 | 0.994 | 0.996
Thermostat | 0.997 | 0.945 | 0.926 | 0.997 | 0.984 | 0.980 | 0.984 | 0.981 | 0.996 | 0.943 | 0.965 | 0.997 | 0.997 | 0.895 | 0.969 | 0.998 | 0.992 | 0.971 | 0.993 | 0.997
Security_camera | 0.998 | 0.988 | 0.988 | 0.971 | 0.970 | 0.750 | 0.950 | 0.924 | 0.997 | 0.983 | 0.992 | 0.994 | 0.999 | 0.981 | 0.983 | 0.998 | 0.997 | 0.990 | 0.997 | 0.998
Webcam | 0.996 | 0.990 | 0.992 | 0.990 | 0.990 | 0.988 | 0.994 | 0.906 | 0.996 | 0.996 | 0.996 | 0.995 | 0.999 | 0.998 | 0.996 | 0.999 | 0.995 | 0.996 | 0.994 | 0.999
Phishing legitimate | 0.941 | 0.886 | 0.927 | 0.930 | 0.909 | 0.857 | 0.827 | 0.898 | 0.969 | 0.958 | 0.959 | 0.958 | 0.959 | 0.936 | 0.935 | 0.959 | 0.969 | 0.970 | 0.972 | 0.963

TABLE III: Comparison between HHO-RWN and other metaheuristics in terms of
Accuracy, Recall, and Precision

| Accuracy | Recall | Precision
---|---|---|---
Dataset | HHO-RWN | NSGA-II | MOPSO-Lévy | SPEA-II | HHO-RWN | NSGA-II | MOPSO-Lévy | SPEA-II | HHO-RWN | NSGA-II | MOPSO-Lévy | SPEA-II
Baby Monitor | 0.999 | 0.565 | 0.937 | 0.604 | 0.996 | 0.985 | 0.920 | 0.967 | 0.995 | 0.479 | 0.710 | 0.521
Doorbell | 0.998 | 0.487 | 0.989 | 0.801 | 0.984 | 0.693 | 0.780 | 0.902 | 0.996 | 0.256 | 1.000 | 0.559
Thermostat | 0.995 | 0.289 | 0.998 | 0.327 | 0.968 | 0.149 | 0.997 | 0.157 | 0.995 | 0.022 | 0.957 | 0.000

Since privacy and security factors are essential in many applications,
distributed ML is a promising learning solution. It enables the training of
machine learning models locally, so there is no need to transfer the data to a
central cloud. Thus, the reduction in heavy data transmissions will minimize
the number of potential attacks consequently decreasing the risks of privacy
leakage. Therefore, the choice of whether to build a centralized or
distributed model depends on the target application and the nature of the
data. We can say that choosing the appropriate learning scheme depends on the
application’s environment, priorities, and objectives while considering
factors of privacy, performance, and computational resources.

##  V Conclusion

Due to the dramatic increase in the number of IoT devices deployed online and
the security sensitives of these devices, hackers and attackers exploit the
increase of such devices to deploy different types of attacks. Intrusion
detection systems are one of the techniques allocated to protecting the IoT
network. The main aim of the proposed approach is to detect IoT botnet attacks
by utilizing HHO to improve RWN and at the same time, to perform FS based on
centralized and distributed ML models. Experimental results revealed that the
proposed model performs well in centralized and distributed models to detect
attacks on smart IoT devices. For future work, we plan to integrate the
proposed approach using Federated Learning (FL) to improve security and
privacy issues. In addition, investigate the efficiency of the proposed
approach for other types of applications such as the healthcare system.

## Acknowledgements

This research was supported by the Technology Innovation Institute (TII), Abu
Dhabi, UAE, under the CyberAI project (grant number: TII/DSRC/2022/3036).

## References

  * [1] M. Aloqaily, S. Otoum, I. Al Ridhawi, and Y. Jararweh, “An intrusion detection system for connected vehicles in smart cities,” _Ad Hoc Networks_ , vol. 90, p. 101842, 2019.
  * [2] B. Ghimire and D. B. Rawat, “Recent advances on federated learning for cybersecurity and cybersecurity for federated learning for internet of things,” _IEEE Internet of Things Journal_ , 2022.
  * [3] C. Kolias, G. Kambourakis, A. Stavrou, and J. Voas, “Ddos in the iot: Mirai and other botnets,” _Computer_ , vol. 50, no. 7, pp. 80–84, 2017.
  * [4] O. A. Alzubi, J. A. Alzubi, A. Al-Zoubi, M. A. Hassonah, and U. Kose, “An efficient malware detection approach with feature weighting based on harris hawks optimization,” _Cluster Computing_ , vol. 25, no. 4, pp. 2369–2387, 2022.
  * [5] H. Faris, A.-Z. Ala’M, A. A. Heidari, I. Aljarah, M. Mafarja, M. A. Hassonah, and H. Fujita, “An intelligent system for spam detection and identification of the most relevant features based on evolutionary random weight networks,” _Information Fusion_ , vol. 48, pp. 67–83, 2019.
  * [6] Z. Chkirbene, A. Erbad, R. Hamila, A. Mohamed, M. Guizani, and M. Hamdi, “Tidcs: A dynamic intrusion detection and classification system based feature selection,” _IEEE Access_ , vol. 8, pp. 95 864–95 877, 2020.
  * [7] N. M. Hijazi, H. Faris, and I. Aljarah, “A parallel metaheuristic approach for ensemble feature selection based on multi-core architectures,” _Expert Systems with Applications_ , vol. 182, p. 115290, 2021.
  * [8] Y. Jiang, K. Zhang, Y. Qian, and L. Zhou, “Anonymous and efficient authentication scheme for privacy-preserving distributed learning,” _IEEE Transactions on Information Forensics and Security_ , 2022.
  * [9] F. Zerka, V. Urovi, F. Bottari, R. T. Leijenaar, S. Walsh, H. Gabrani-Juma, M. Gueuning, A. Vaidyanathan, W. Vos, M. Occhipinti _et al._ , “Privacy preserving distributed learning classifiers–sequential learning with small sets of data,” _Computers in Biology and Medicine_ , vol. 136, p. 104716, 2021.
  * [10] M. Habib, I. Aljarah, and H. Faris, “A modified multi-objective particle swarm optimizer-based lévy flight: An approach toward intrusion detection in internet of things,” _ARABIAN JOURNAL FOR SCIENCE AND ENGINEERING_ , 2020\.
  * [11] A. A. Heidari, S. Mirjalili, H. Faris, I. Aljarah, M. Mafarja, and H. Chen, “Harris hawks optimization: Algorithm and applications,” _Future generation computer systems_ , vol. 97, pp. 849–872, 2019.
  * [12] S. Sokkalingam and R. Ramakrishnan, “An intelligent intrusion detection system for distributed denial of service attacks: A support vector machine with hybrid optimization algorithm based approach,” _Concurrency and Computation: Practice and Experience_ , vol. 34, no. 27, p. e7334, 2022.
  * [13] W. F. Schmidt, M. A. Kraaijveld, R. P. Duin _et al._ , “Feed forward neural networks with random weights,” in _International conference on pattern recognition_. IEEE Computer Society Press, 1992, pp. 1–1.
  * [14] E. F. Rawashdeh, I. Aljarah, and H. Faris, “A cooperative coevolutionary method for optimizing random weight networks and its application for medical classification problems,” _Journal of Ambient Intelligence and Humanized Computing_ , vol. 12, no. 1, pp. 321–342, 2021.
  * [15] A. Tuladhar, S. Gill, Z. Ismail, N. D. Forkert, A. D. N. Initiative _et al._ , “Building machine learning models without sharing patient data: A simulation-based analysis of distributed learning by ensembling,” _Journal of biomedical informatics_ , vol. 106, p. 103424, 2020.
  * [16] D. H. Wolpert and W. G. Macready, “No free lunch theorems for optimization,” _IEEE transactions on evolutionary computation_ , vol. 1, no. 1, pp. 67–82, 1997.
  * [17] Y. Meidan, M. Bohadana, Y. Mathov, Y. Mirsky, A. Shabtai, D. Breitenbacher, and Y. Elovici, “N-baiot—network-based detection of iot botnet attacks using deep autoencoders,” _IEEE Pervasive Computing_ , vol. 17, no. 3, pp. 12–22, 2018.
  * [18] C. L. Tan, “Phishing dataset for machine learning: Feature evaluation,” _Mendeley Data_ , vol. 1, 2018.
  * [19] N. Hijazi, M. Aloqaily, B. Ouni, F. Karray, and M. Debbah, “Harris hawks feature selection in distributed machine learning for secure iot environments.” [Online]. Available: https://github.com/Artifitialleap-MBZUAI/Harris-Hawks-Feature-Selection-in-Distributed-Machine-Learning-for-Secure-IoT-Environments
  * [20] H. Fukumoto and A. Oyama, “Study on improving efficiency of multi-objective evolutionary algorithm with large population by m2m decomposition and elitist mate selection scheme,” in _2018 IEEE Symposium Series on Computational Intelligence (SSCI)_. IEEE, 2018, pp. 1180–1187.


* Nesvold & Kuchner (2015) Nesvold E. R., Kuchner M. J., 2015, ApJ, 798, 83
  * Nesvold et al. (2013) Nesvold E. R., Kuchner M. J., Rein H., Pan M., 2013, ApJ, 777, 144
  * Pearce & Wyatt (2014) Pearce T. D., Wyatt M. C., 2014, MNRAS, 443, 2541
  * Pearce & Wyatt (2015) Pearce T. D., Wyatt M. C., 2015, MNRAS, 453, 3329
  * Pearce et al. (2020) Pearce T. D., Krivov A. V., Booth M., 2020, MNRAS, 498, 2798
  * Pearce et al. (2021) Pearce T. D., Beust H., Faramaz V., Booth M., Krivov A. V., Löhne T., Poblete P. P., 2021, MNRAS, 503, 4767
  * Pearce et al. (2022) Pearce T. D., et al., 2022, A&A, 659, A135
  * Petrovich et al. (2013) Petrovich C., Malhotra R., Tremaine S., 2013, ApJ, 770, 24
  * Plavchan et al. (2005) Plavchan P., Jura M., Lipscy S. J., 2005, ApJ, 631, 1161
  * Quillen (2006) Quillen A. C., 2006, MNRAS, 372, L14
  * Quillen & Faber (2006) Quillen A. C., Faber P., 2006, MNRAS, 373, 1245
  * Rafikov (2023) Rafikov R. R., 2023, MNRAS, 519, 5607
  * Reche et al. (2008) Reche R., Beust H., Augereau J. C., Absil O., 2008, A&A, 480, 551
  * Regály et al. (2018) Regály Z., Dencs Z., Moór A., Kovács T., 2018, MNRAS, 473, 3547
  * Reidemeister et al. (2011) Reidemeister M., Krivov A. V., Stark C. C., Augereau J. C., Löhne T., Müller S., 2011, A&A, 527, A57
  * Rein & Liu (2012) Rein H., Liu S. F., 2012, A&A, 537, A128
  * Rein & Tamayo (2015) Rein H., Tamayo D., 2015, MNRAS, 452, 376
  * Rodigas et al. (2014) Rodigas T. J., Malhotra R., Hinz P. M., 2014, ApJ, 780, 65
  * Schoonenberg & Ormel (2017) Schoonenberg D., Ormel C. W., 2017, A&A, 602, A21
  * Schoonenberg et al. (2018) Schoonenberg D., Ormel C. W., Krijt S., 2018, A&A, 620, A134
  * Schüppler et al. (2015) Schüppler C., et al., 2015, A&A, 581, A97
  * Schüppler et al. (2016) Schüppler C., Krivov A. V., Löhne T., Booth M., Kirchschlager F., Wolf S., 2016, MNRAS, 461, 2146
  * Sefilian & Rafikov (2019) Sefilian A. A., Rafikov R. R., 2019, MNRAS, 489, 4176
  * Sefilian et al. (2021) Sefilian A. A., Rafikov R. R., Wyatt M. C., 2021, ApJ, 910, 13
  * Sefilian et al. (2023) Sefilian A. A., Rafikov R. R., Wyatt M. C., 2023, ApJ, 954, 100
  * Smallwood (2023) Smallwood J. L., 2023, MNRAS, 523, 3526
  * Stark & Kuchner (2009) Stark C. C., Kuchner M. J., 2009, ApJ, 707, 543
  * Stuber et al. (2023) Stuber T. A., Löhne T., Wolf S., 2023, A&A, 669, A3
  * Tabeshian & Wiegert (2016) Tabeshian M., Wiegert P. A., 2016, ApJ, 818, 159
  * Tabeshian & Wiegert (2017) Tabeshian M., Wiegert P. A., 2017, ApJ, 847, 24
  * Thebault et al. (2012) Thebault P., Kral Q., Ertel S., 2012, A&A, 547, A92
  * Tremaine (1993) Tremaine S., 1993, in Phillips J. A., Thorsett S. E., Kulkarni S. R., eds, Astronomical Society of the Pacific Conference Series Vol. 36, Planets Around Pulsars. pp 335–344
  * Vitense et al. (2010) Vitense C., Krivov A. V., Löhne T., 2010, A&A, 520, A32
  * Weidenschilling (1977) Weidenschilling S. J., 1977, Ap&SS, 51, 153
  * Wisdom (1980) Wisdom J., 1980, AJ, 85, 1122
  * Wisdom & Holman (1991) Wisdom J., Holman M., 1991, j, 102, 1528
  * Wyatt (2003) Wyatt M. C., 2003, ApJ, 598, 1321
  * Wyatt (2008) Wyatt M. C., 2008, ARA&A, 46, 339
  * Wyatt (2020) Wyatt M., 2020, in Prialnik D., et al., eds, , The Trans-Neptunian Solar System. pp 351–376, doi:10.1016/B978-0-12-816490-7.00016-3
  * Wyatt et al. (1999) Wyatt M. C., Dermott S. F., Telesco C. M., Fisher R. S., Grogan K., Holmes E. K., Piña R. K., 1999, ApJ, 527, 918
  * Wyatt et al. (2007) Wyatt M. C., Smith R., Su K. Y. L., Rieke G. H., Greaves J. S., Beichman C. A., Bryden G., 2007, ApJ, 663, 365
  * Yelverton & Kennedy (2018) Yelverton B., Kennedy G. M., 2018, MNRAS, 479, 2673

##  Appendix A Surface-density profile fitting

We fit surface-density profiles to our simulations through several rounds of
$\chi^{2}$ minimisation, using the following process. First, we perform an
initial $\chi^{2}$ minimisation, which typically provides a good fit to the
broad disc as a whole. However, this generally produces poor fits at the
edges, because the edges make up a small fraction of the overall profile; the
inner edge on Figure 2 spans just 25 radial bins, compared to the 400 bins
across the entire disc, so even a poor edge fit would not significantly impact
the overall $\chi^{2}$. To properly fit the inner edge, we then repeat the
fitting using the parameters of the first fit as our initial guess, except for
$\sigma_{{\rm i}}$ for which we use a value between $10^{-8}$ and $10^{2}$. We
repeat this several times for different initial guesses of $\sigma_{{\rm i}}$,
and the fit with the lowest $\chi^{2}$ is taken as the new reference fit.
Finally, this whole process is repeated for the outer edge, using the new
reference fit as our initial guess and testing different guesses for
$\sigma_{{\rm o}}$. The fit with the lowest $\chi^{2}$ after this process is
the fit we use. This technique avoids local minima, and ensures that the edge
profiles are properly fitted. It is also considerably faster than performing a
full MCMC fit to each of our simulations. The fitting is performed using the
python module scipy.optimize.

##  Appendix B Eccentric planets

We showed that a planet on a circular orbit excites debris eccentricities
through MMRs, and that these eccentricities set the steepness of the disc
inner edge. However, an eccentric planet would also drive up eccentricities
through secular interactions. Whilst we focus on circular-orbit planets in
this paper, in this section we briefly consider how planet eccentricity would
affect the inner-edge profiles. We will show that a low- to moderate-
eccentricity planet can excite debris more than a circular-orbit planet,
resulting in a flatter inner edge, and that the planet eccentricities required
to do this can be low enough that they do not necessarily impose a clear
asymmetry on the disc.

###  B.1 N-body simulation with an eccentric planet

To demonstrate the effect of an eccentric planet, we re-run the simulation
from Figure 2, but with the planet eccentricity increased to 0.2. We also
initialise the disc inner edge to be slightly further outwards than before; we
still place it one Hill radius exterior to the planet’s apocentre, but since
the planet is now eccentric, we switch to the definition of the eccentric Hill
radius at apocentre from Pearce & Wyatt (2014):

$r_{\rm Hill,Q}\approx a_{\rm p}(1+e_{\rm p})\left[\frac{m_{\rm p}}{(3-e_{\rm
p})m_{*}}\right]^{1/3},$ (36)

where $e_{\rm p}$ is the planet eccentricity. We do this because the Hill
radius of an eccentric planet varies around the planet orbit; the above
equation is the Hill radius at the planet’s apocentre, and the equivalent at
planet pericentre is found by changing $e_{\rm p}$ to $-e_{\rm p}$ in this
equation.

We run the eccentric-planet simulation for ${16.5\;{\rm Myr}}$, which is much
longer than the ${0.868\;{\rm Myr}}$ for the circular case. We do this because
an eccentric planet would drive spiral density waves in a massless disc
through secular interactions, in addition to sculpting the inner edge through
scattering. Pearce & Wyatt (2014) show that such a disc would settle into its
final state after at least 10 secular times have elapsed at its outer edge (by
which time the spirals are tightly wound and indistinct), and at least 10
diffusion times have elapsed at the inner edge (by which time scattering would
be largely complete). We compute the secular timescale using Equation 17 in
Pearce & Wyatt (2014), and run our simulation to 10 times that value.

Figure 17 shows the simulation with an eccentric planet, for comparison with
the equivalent circular-planet simulation of Figure 2. As well as ejecting
debris, the eccentric planet drives the disc into a broad, eccentric structure
aligned with the planet orbit, as described in Pearce & Wyatt (2014) and
Faramaz et al. (2014). Debris eccentricities are much higher than in the
circular-planet case (Figure 17 middle panel, compared to Figure 2 left
panel), with implications for the inner-edge profile as discussed below.
Another difference is that the inner edge is truncated at a semimajor axis
corresponding to 5 eccentric Hill radii outside the planet’s apocentre, rather
than 3 Hill radii as in the circular case; this behaviour is discussed in
Pearce & Wyatt (2014). The eccentric-planet simulation also has resonant
debris surviving on planet-crossing orbits (e.g the 3:2 MMR), and such
populations can be stable even for highly eccentric planets (Pearce et al.,
2021).

Figure 17: Simulation with an eccentric planet. The simulation has the same
setup as that on Figure 2, except here the planet has eccentricity 0.2, and
the initial disc lies further out (see Section B.1). The eccentric planet
excites debris through secular interactions, resulting in higher
eccentricities and flatter edges than the circular-planet case. Left panel:
positions at the end of the simulation. Orange and green points are debris
within $45^{\circ}$ of the planet’s pericentre and apocentre directions
respectively. Middle panel: the dotted black line is ${2e_{\rm forced}(a)}$,
the maximum debris eccentricity expected from secular interactions (Equation
37). The solid lines define the chaotic region, which is 5 (rather than 3)
times the eccentric Hill radius either side of the eccentric planet’s orbit.
Right panel: separate surface-density profiles for material within
$45^{\circ}$ of the planet’s pericentre and apocentre. The thick and thin
lines are the simulation data and fitted models respectively, relative to the
peak of the pericentre model. The fit to the pericentre side has ${r_{\rm
i}=16.6\;{\rm au}}$, ${\sigma_{{\rm i}}=0.137}$, ${r_{\rm o}=33.9\;{\rm au}}$
and ${\sigma_{{\rm o}}=0.0625}$, whilst that to the apocentre side has
${r_{\rm i}=20.0\;{\rm au}}$, ${\sigma_{{\rm i}}=0.106}$, ${r_{\rm
o}=37.7\;{\rm au}}$ and ${\sigma_{{\rm o}}=0.0666}$; the peak fitted surface
density on the apocentre side is 0.973 times that on the pericentre side. All
remaining lines and symbols are defined on previous figures.

We now assess the profile of the eccentric-disc inner edge. In our circular-
planet simulations we simply azimuthally averaged the entire disc to produce
radial surface-density profiles, but this approach is insufficient for
asymmetric discs. Instead, we follow Tabeshian & Wiegert (2016, 2017) and
divide the disc into several sectors. We define one sector as everything
${45^{\circ}}$ either side of the planet’s pericentre direction, and another
as everything ${45^{\circ}}$ either side of the planet’s apocentre. These
sectors are coloured orange and green respectively on the left panel of Figure
17. For each of these sectors we azimuthally average the particles within
them, to produce one radial surface-density profile for the region around
pericentre and another for the region around apocentre. These profiles are
shown on the right panel of Figure 17. We fit each profile with Equation 6 as
before, again fixing the powerlaw index $\alpha$ to 1.5. The result is that
the inner edge has a different steepness on the apocentre and pericentre sides
of the disc; we fit ${\sigma_{{\rm i}}=0.137}$ on the pericentre side,
compared to 0.106 on the apocentre side. Both are much flatter than the
circular-planet case, which had ${\sigma_{{\rm i}}=0.0361}$. In the next
section we quantify the general impact of planet eccentricity on the inner-
edge profile.

###  B.2 Effect of planet eccentricity on the inner-edge profile

The inner-edge steepness is set by the eccentricity of surviving debris. A
circular-orbit planet excites debris eccentricities through MMRs, whilst an
eccentric planet also excites eccentricities through secular interactions. If
the secular excitation were greater than the MMR excitation, then the
eccentric planet would produce a flatter edge than a circular-orbit planet. In
this section we calculate how eccentric a planet can be before the inner-edge
profile deviates from the circular-planet case, and the effect of an eccentric
planet on the inner edge.

Secular interactions with an eccentric planet cause debris eccentricities to
oscillate, whilst their semimajor axes remain constant. Specifically, debris
initialised on a circular orbit with semimajor axis $a$ would oscillate in
eccentricity between zero and twice the forcing eccentricity $e_{\rm forced}$,
where

$2e_{\rm forced}(a)\approx\frac{5}{2}\frac{a_{\rm p}}{a}e_{\rm p}$ (37)

(Murray & Dermott, 1999). This is shown on the middle panel of Figure 17,
where the dotted line is $2e_{\rm forced}$. We can use this to derive the
maximum eccentricity of secular debris at the disc inner edge; the innermost
stable semimajor axis is about 5 eccentric Hill radii beyond planet apocentre,
i.e. ${a_{\rm in}\approx a_{\rm p}(1+e_{\rm p})+5r_{\rm Hill,Q}}$ (Pearce &
Wyatt, 2014), so we can use Equation 36 to get the innermost stable semimajor
axis, then substitute this into Equation 37. The result is that, to first
order in planet eccentricity, the maximum debris eccentricity from secular
effects at the disc inner edge is

${e_{\rm max,sec}}\approx 2e_{\rm forced}(a_{\rm in})\approx\frac{5}{2}e_{\rm
p}\left[1+3.47\left(\frac{m_{\rm p}}{m_{*}}\right)^{1/3}\right]^{-1}.$ (38)

For the scenario on Figure 17 (${e_{\rm p}=0.2}$, ${m_{\rm p}/m_{*}=1.9\times
10^{-3}}$), Equation 38 yields ${{e_{\rm max,sec}}\approx 0.35}$, in good
agreement with the simulation.

We can use Equation 38 to determine how eccentric a planet must be for the
inner-edge profile to differ significantly from the circular-planet case.
Equation 7 gives the rms eccentricity at the inner edge arising from MMRs from
a circular-orbit planet; if an eccentric planet excited debris to higher
values through secular interactions, then the edge profile would be flatter
than in the circular-planet case. Comparing Equations 7 and 38, the disc inner
edge would be flatter than the circular-planet case if the planet has
eccentricity

$e_{\rm p}>0.277\left(\frac{m_{\rm
p}}{m_{*}}\right)^{1/3}+0.961\left(\frac{m_{\rm p}}{m_{*}}\right)^{2/3}.$ (39)

For the examples on Figures 2 and 17 with a ${2\;{\rm M_{Jup}}}$ planet
orbiting a solar-type star, ${m_{\rm p}/m_{*}=1.9\times 10^{-3}}$ and so
Equation 39 predicts a critical planet eccentricity of 0.05 (equal to the
eccentricity of Jupiter). So for this example, if the planet eccentricity were
below 0.05 then the inner-edge profile would be similar to the circular-planet
case (Figure 2), whilst higher planet eccentricities would result in a flatter
inner edge (Figure 17).

The actual inner-edge steepnesses on the pericentre and apocentre sides are
comparable to that predicted by Equation 13; for the example on Figure 17,
inserting ${e_{\rm i,rms}\approx{e_{\rm max,sec}}/\sqrt{3}=0.17}$ into
Equation 13 predicts ${\sigma_{{\rm i}}\approx 0.144}$, comparable to the
simulation values of 0.137 and 0.106 on the pericentre and apocentre sides
respectively999Strictly the rms eccentricity of a secular population scales
with ${e_{\rm max,sec}}$ by a factor $\sqrt{2}$ rather than $\sqrt{3}$, since
the eccentricity distribution is not uniform, but for this simple estimate we
neglect this difference..

Generally, the inner edge of an eccentric disc would be steeper on the
apocentre side than the pericentre side, due to how the innermost debris
evolves. Pearce & Wyatt (2014) showed that the inner edge is set by debris
with the innermost stable semimajor axis ${a_{\rm in}}$, which oscillates in
eccentricity between 0 and $2e_{\rm forced}$. This debris also evolves in
orientation, being maximally aligned with the planet orbit when its
eccentricity is high, and minimally aligned when low. The result is that the
disc inner edge assumes an eccentric shape; combining Equations 5 and 6 in
Pearce & Wyatt (2014) shows that an ellipse fitted to the disc inner edge will
have eccentricity

$e_{\rm i}=\frac{e_{\rm forced}(a_{\rm in})}{1-e_{\rm forced}(a_{\rm in})},$
(40)

which is ${e_{\rm forced}(a_{\rm in})}$ to first order101010The equivalent
equation for the eccentricity of the outer edge is ${e_{\rm out}=e_{\rm
forced}(a_{\rm out})/[1+e_{\rm forced}(a_{\rm out})]}$, where $a_{\rm out}$ is
the outermost semimajor axis; similarly, this reduces to ${e_{\rm out}\approx
e_{\rm forced}(a_{\rm out})}$ to first order.. This means that at apocentre
the inner edge is a superposition of low-eccentricity orbits at the innermost
stable semimajor axis, so its profile is relatively sharp; conversely, at
pericentre the inner edge is a diffuse superposition of higher-eccentricity
orbits and is flatter. There may also be additional surface-density features
that would manifest in particularly narrow and/or eccentric discs (Pearce &
Wyatt, 2014).

##  Appendix C Criterion for planet-sculpted edges to be steeper than the
overall disc

In Appendix E.1 we show that the steepness of the erf function is equivalent
to that of a powerlaw $r^{p}$ if

$\sigma_{{\rm i}}=\sqrt{\frac{2}{\pi}}\frac{1}{p},$ (41)

and so the inner edge is much steeper than the overall disc profile if
${\sigma_{{\rm i}}\ll\sqrt{2/\pi}/\alpha}$. Since all of our simulated inner
edges have ${\sigma_{{\rm i}}<0.2}$ (Figure 6), the planet-sculpted edges
should be much steeper than the overall disc provided that the initial-disc
profile is flatter than ${r^{-4}}$ (and also ${r^{4}}$).

##  Appendix D Deriving inner-edge parameters from our simple scattering model

Here we use our simple scattering model to predict inner-edge parameters,
yielding the results in Sections 3.1.1 and 3.1.2. These parameters are derived
with reference to Figure 8.

###  D.1 Semimajor axes $a_{1}$ and $a_{2}$, and the fraction of surviving
debris with semimajor axis $a$

We define

$a_{1}\equiv a_{\rm p}+\delta a$ (42)

to be the semimajor axis where ${e_{\rm q}(a_{1})=0}$, i.e. the semimajor axis
of a circular orbit at the outer edge of the chaotic zone (recalling that
$e_{\rm q}(a)$ is given by Equation 9). Then we define

$a_{2}\equiv\frac{a_{\rm p}+\delta a}{1-e_{\rm max}}=\frac{a_{1}}{1-e_{\rm
max}}$ (43)

as the semimajor axis where ${e_{\rm q}=e_{\rm max}}$, i.e. the semimajor axis
of an orbit with pericentre at the outer edge of the chaotic zone and
eccentricity equal to the maximum eccentricity $e_{\rm max}$.

Next, we assume that the fraction of surviving particles with semimajor axis
$a$ transitions from ${0\;{\rm per\;cent}}$ for ${a\leq a_{1}}$ to ${100\;{\rm
per\;cent}}$ for ${a\geq a_{2}}$. Since we assume that all debris with initial
eccentricity above ${e_{\rm q}(a)}$ is ejected, for particles with initial
eccentricities uniformly distributed between 0 and $e_{\rm max}$ the
probability density function of surviving particles goes as

$S(a)\propto\frac{e_{\rm q}(a)}{e_{\rm max}}$ (44)

for ${a_{1}\leq a\leq a_{2}}$. Similarly, ${S(a)=0}$ for ${a\leq a_{1}}$ and
is constant for ${a\geq a_{2}}$.

###  D.2 Inner-edge location $r_{\rm i}$

For an orbit with semimajor axis $a$ and eccentricity $e$, the time-averaged
value of some parameter $x$ over a single orbit is

$\langle x\rangle=\frac{1}{2\pi
a^{2}\sqrt{1-e^{2}}}\int^{2\pi}_{0}r^{2}(f)x(f){\rm{d}}f,$ (45)

where $r$ and $f$ are the radial distance and true anomaly respectively (e.g.
Murray & Dermott 1999). Hence the time-averaged radial distance of a single
body is

$\langle r_{a,e}\rangle=a\left(1+\frac{e^{2}}{2}\right).$ (46)

For a collection of bodies with the same semimajor axis but with
eccentricities uniformly drawn between 0 and $e_{\rm q}$, we can integrate
Equation 46 to get the average radial position of the bodies in this group;
this is ${\langle r_{a}\rangle=\int^{e_{\rm q}}_{0}\langle
r_{a,e}\rangle(e){\rm d}e/e_{\rm q}}$, which yields

$\langle r_{a}\rangle=a\left[1+\frac{e_{\rm q}^{2}(a)}{6}\right].$ (47)

Next, we integrate Equation 47 to find the average position of all particles
with semimajor axes between $a_{1}$ and $a_{2}$, which we hypothesise to be
similar to the characteristic inner-edge radius $r_{\rm i}$. This is ${r_{\rm
i}\approx\int^{a_{2}}_{a_{1}}\langle r_{a}\rangle(a)S(a){\rm d}a}$. Finally,
we replace $e_{\rm max}$ in the above equations with ${\sqrt{3}e_{\rm i,rms}}$
for a uniform eccentricity distribution, and expand to first order in
eccentricity. This yields our prediction for the characteristic radius of the
sculpted disc’s inner edge:

$r_{\rm i}\approx a_{\rm p}\left(1+\frac{\delta a}{a_{\rm
p}}\right)\left(1+\frac{2}{\sqrt{3}}e_{\rm i,rms}\right).$ (48)

##  Appendix E Relating the various literature models used to quantify edge
profiles

Various parametric models are used in the literature to quantify the steepness
of debris-disc inner edges. Here we provide conversions of commonly used
steepness parameters to the $\sigma_{{\rm i}}$ we use. We also show a radial
profile quantified by a powerlaw function, and also the equivalent erf-
powerlaw function with parameters derived using the following equations, to
show the two are similar (Figure 18).

###  E.1 Relating erf to a radial powerlaw

Consider an inner edge fitted with the erf function

$\Sigma_{\rm E}(r)=\Sigma_{0}\left[1-{\rm erf}\left(\frac{r_{\rm
i}-r}{\sqrt{2}\sigma_{{\rm i}}r_{\rm i}}\right)\right],$ (49)

where ${\Sigma_{0}}$ is the surface density at the characteristic edge radius
$r_{\rm i}$ (e.g. Rafikov 2023). The profile could alternatively be quantified
by a powerlaw:

$\Sigma_{\rm P}(r)=\Sigma_{0}\left(\frac{r}{r_{\rm i}}\right)^{{p_{\rm i}}}.$
(50)

Equations 49 and 50 can be differentiated to yield the slopes at $r_{\rm i}$:

$\frac{\rm d}{{\rm d}r}\Sigma_{\rm E}(r)\bigg{\rvert}_{r=r_{\rm
i}}=\sqrt{\frac{2}{\pi}}\frac{\Sigma_{0}}{r_{\rm i}\sigma_{{\rm i}}},$ (51)

and

$\frac{\rm d}{{\rm d}r}\Sigma_{\rm P}(r)\bigg{\rvert}_{r=r_{\rm
i}}=\frac{\Sigma_{0}{p_{\rm i}}}{r_{\rm i}}.$ (52)

Hence the erf function (Equation 49) has the same steepness as the powerlaw
function (Equation 50) at $r_{\rm i}$ if

$\sigma_{{\rm i}}=\sqrt{\frac{2}{\pi}}\frac{1}{{p_{\rm i}}}.$ (53)

Figure 18: The double-powerlaw model for the observed q1 Eri disc from Lovell
et al. (2021), compared to our erf-powerlaw model inferred using the method in
Section 5.

###  E.2 Relating erf to tanh

Consider an inner edge fitted with a hyperbolic-tangent function

$\Sigma_{\rm T}(r)=\Sigma_{0}\left[1+\tanh\left(\frac{r-r_{\rm i}}{l_{\rm
i}}\right)\right],$ (54)

where $l_{\rm i}$ characterises the edge flatness (e.g. Marino 2021).
Differentiating this yields the slope at $r=r_{\rm i}$:

$\frac{\rm d}{{\rm d}r}\Sigma_{\rm T}(r)\bigg{\rvert}_{r=r_{\rm
i}}=\frac{\Sigma_{0}}{l_{\rm i}}.$ (55)

Equating this to Equation 51 shows that the erf function has the same slope as
the hyperbolic-tangent function at $r=r_{\rm i}$ if

$\sigma_{{\rm i}}=\sqrt{\frac{2}{\pi}}\frac{l_{\rm i}}{r_{\rm i}}.$ (56)

###  E.3 Relating tanh to a radial powerlaw

Equating Equations 52 and 55 shows that a radial powerlaw has the same slope
as the hyperbolic-tangent function at $r=r_{\rm i}$ if

${p_{\rm i}}=\frac{r_{\rm i}}{l_{\rm i}}.$ (57)