# Acoustic Side Channel Attack on Keyboards Based on Typing Patterns

Alireza Taheritajar<EMAIL_ADDRESS>0009-0002-5642-6329 Augusta
University1120 15th St.AugustaGAUSA30912 and  Reza Rahaeimehr
<EMAIL_ADDRESS>0000-0003-0305-3661 Augusta University1120 15th St.
AugustaGAUSA

(2024)

###### Abstract.

Acoustic side-channel attacks on keyboards can bypass security measures in
many systems that use keyboards as one of the input devices. These attacks aim
to reveal users’ sensitive information by targeting the sounds made by their
keyboards as they type. Most existing approaches in this field ignore the
negative impacts of typing patterns and environmental noise in their results.
This paper seeks to address these shortcomings by proposing an applicable
method that takes into account the user’s typing pattern in a realistic
environment. Our method achieved an average success rate of 43% across all our
case studies when considering real-world scenarios.

Keyboard acoustic emanations, Signal processing, Side channels, acoustic
analysis

††copyright: acmlicensed††journalyear: 2024††doi: XXXXXXX.XXXXXXX††conference:
2024; ; ††isbn: 978-1-4503-XXXX-X/18/06††ccs: Security and privacy Side-
channel analysis and countermeasures

##  1\. Introduction

Figure 1. Sample of acoustic waves produced by typing a four-letter word

There has been a growing concern over personal data and information security
in recent years. With the increasing use of digital devices and online
communication, protecting sensitive data has become crucial to modern life.
The process of acquiring knowledge about a system by analyzing its side
effects is commonly referred to as a Side-Channel Attack (Taheritajar et al.,
2023). Electronic device emissions have long been a concern within the
security and privacy communities (Briol, 1991), as they are susceptible to
side-channel attacks. Acoustic side-channel attacks (Asonov and Agrawal, 2004;
Backes et al., 2010) can pose a significant threat to digital security. This
type of attack takes advantage of unintended sound emissions generated by
electronic devices to extract sensitive information. One of the threats to
digital security involves keyboard acoustic side-channel attacks (Berger et
al., 2006), where malicious actors can extract sensitive information, such as
emails, passwords, or credit card details (Ponnam, 2013). Such attacks can be
hazardous, as they can bypass traditional security measures like passwords
(Ross et al., 2005; Yan et al., 2004) and encryption. These attacks usually
analyze the sound of each individual key in a time or frequency domain(Zhuang
et al., 2009).

One of the most concerning aspects of keyboard acoustic side-channel attacks
is that they can be conducted remotely without the need for physical access to
the target device (Compagno et al., 2017; Taheritajar et al., 2023). This
makes them an attractive target for cyber-criminals, who can easily reach
numerous users. To avoid this type of attack, it is essential to guarantee
that sound cannot be captured in the environment due to the high efficiency of
modern microphones (Zhuang et al., 2009). Attackers can analyze the sound
waveforms of keystrokes to determine keystrokes’ timing, intensity, and
frequency, exposing sensitive information. One of the major difficulties in
carrying out keyboard acoustic side-channel attacks is accurately capturing
the sound of keystrokes. This entails using high-quality microphones and
advanced signal-processing techniques to eliminate background noise and
extract the sound of keystrokes. Once the sound has been captured, attackers
can use various data analysis techniques, including statistical analysis,
machine learning algorithms, signal processing techniques (Taheritajar et al.,
2023), acoustic triangulation attack(Fiona, 2006), and Time Difference of
Arrival (TDoA) (Zhu et al., 2014).

Some past studies have demonstrated significant success with their
methodologies. However, most of them had to restrict the environmental
conditions or neglect the distinct features in their experiments to avoid any
interference that could impact the outcomes. For instance, they usually
ignored the effect of environmental noise or users’ typing patterns on their
research (Taheritajar et al., 2023). Recognizing typing patterns is a complex
task due to variations in how people use keys(Halevi and Saxena, 2012).This
variability adds to the challenge of achieving reliable and accurate
recognition, as highlighted in Asonov and Agrawal’s study(Asonov and Agrawal,
2004). Furthermore, it is well-established that most attributes of emanations
exhibit non-uniform patterns across different device models and are often
affected by environmental factors. Another important factor that can disrupt
existing methods is the keyboard model used by the user. Usually, when the
keyboard model is changed, most algorithms can no longer maintain their
previous predictive power due to the unique sound characteristics produced by
each keyboard. In addition, recently proposed approaches, especially those
that use deep learning networks, have added complexity to obtaining stable
results during training, performance, or execution. So, it is crucial to
propose a novel method that covers all of these disadvantages in this field of
research. This paper explores the concept of keyboard acoustic side-channel
attacks and their potential to compromise digital security and proposes a
method that covers aforementioned problems and weaknesses. We keep our
proposed method simple and applicable to realistic scenarios. The process
involves capturing and analyzing audio recordings of keystrokes, extracting
inter-keystroke time intervals, and keypress timings (Figure 1). Then, we
train a statistical model using this data to predict the user’s keystrokes.
The model is then tested on unknown recorded sounds of the keystrokes of the
same user to determine its accuracy and effectiveness. Finally, we enhance our
results by filtering the wrongly predicted words by an English dictionary. By
using this approach, we can analyze the typing patterns of users and use this
information to predict the texts they type, even in real environments with
ambient noise. We don’t restrict our users to specific keyboard models.

The experiment results indicate that a user’s typing pattern in keyboard
acoustic side-channel attacks can be used to bypass security countermeasures.
We collected confidential data from 20 users’ typing samples to study the
effect of letter count and typing patterns on success rate. We were able to
achieve a success rate of approximately 43% on average across all of our test
cases. The threat of keyboard acoustic side-channel attacks emphasizes the
significance of having robust cybersecurity practices. By being well-informed
about the risks of acoustic side channel attacks and implementing appropriate
measures to protect sensitive data, individuals and organizations can enhance
their security against this threat.

The article is structured as follows: First, we provide a brief overview of
previous research on keyboard emanation attacks in section 2. Then, we present
our newly proposed method in section 3. In section 4, we provide experimental
results, while section 5 covers the limitations and countermeasures. Finally,
we conclude the paper and propose potential future research in section 6.

(a) Random Text

(b) Specific Sentence

(c) Specific Words

Figure 2. The interface of the data gathering software

##  2\. Related Work

There is a significant body of research on using acoustic side channels to
extract information from computing devices. The studies reviewed in this
section have made significant contributions to the understanding of keyboard
acoustic side-channel attacks. In 2004, Asonov and Agrawal (Asonov and
Agrawal, 2004) demonstrated the possibility of deducing the keystrokes made by
an individual on a keyboard by using a simple microphone placed nearby. They
achieved this by analyzing the acoustic emissions produced while typing using
signal processing techniques. Furthermore, their study revealed the ability to
extract sensitive information, such as passwords and credit card numbers, from
the sound of keystrokes.

More recently, in 2011, Genkin et al. (Genkin et al., 2014) presented a
significant attack that used acoustic signals to extract cryptographic keys
from a computer’s processor. The authors demonstrated the ability to extract
RSA keys from laptops, desktops, and even mobile phones using a smartphone
placed near the target device. This work showed that even highly secure
cryptographic systems can be vulnerable to acoustic side-channel attacks. In
addition to attacks on computers, there have been studies on using acoustic
side channels to extract information from other devices. For example, Quarta
et al. (Quarta et al., 2018) showed that it was possible to infer the content
of printed documents by analyzing the acoustic signals generated by a printer.
They showed that it was possible to reconstruct printed text with up to 90%
accuracy from acoustic signals captured by a smartphone placed near a specific
printer. Another example is the work by O’Leary et al. (O’Leary et al., 2016),
who showed that we can use acoustic signals to infer the location of a
smartphone in a room. By analyzing the acoustic signals generated by the
smartphone’s speaker and microphone, the authors were able to estimate the
position of the device within a few centimeters. Also, there have been studies
on using acoustic side channels to extract information from human-computer
interfaces. For example, Backes et al. (Backes et al., 2013) showed that it
was possible to infer PIN codes entered using a touchscreen by analyzing the
sound of the user’s finger tapping on the screen.

In the work by De et al. (de Souza Faria and Kim, 2019), a low-cost side-
channel attack called DAA (differential audio analysis) exploited the sound
generated by mechanical keypads. This attack, which was based on differential
characteristics between sounds recorded by two microphones, achieved a 100%
classification rate for two tested PIN pads of the same model. However, when
applied to a different device, the success rate dropped to 63%. In (Toreini et
al., 2015), Toreini et al. (2015) employed signal processing and machine
learning techniques to explore the feasibility of discerning individual Enigma
keys based on the acoustic emissions they produced. Their results demonstrated
that identifying these keys could be consistently achieved with a success rate
of 84%. Notably, this identification process only required basic equipment,
including a simple microphone and a personal computer. In Anand et al.’s work
(Anand and Saxena, 2018), they investigate remote keyboard acoustic side-
channel attacks and propose countermeasures. They demonstrate the adaptability
of acoustic side-channel attacks to remote eavesdropper settings and introduce
a software-based defense, using white noise and fake keystrokes to mitigate
these threats effectively. In Harrison et al.’s recent work (Harrison et al.,
2023), a deep learning model was practically implemented to classify laptop
keystrokes using a smartphone microphone. Achieving a remarkable 95% accuracy
with nearby phone-recorded keystrokes and a significant 93% accuracy with
Zoom-recorded keystrokes, this study showcases the feasibility of side-channel
attacks using readily available tools and algorithms. The paper also addresses
mitigation strategies to safeguard users from these threats.

There are a lot of other approaches that prove the feasibility of using
acoustic side channel effects of keyboards to attack sensitive data; however,
often, they overlook the effect of the user’s typing style in their studies as
a critical parameter that can reduce their success rates. In Song et al.’s
study (Song et al., 2001), they conducted a statistical analysis of typing
patterns, revealing that such patterns can divulge key information. They
utilized a Hidden Markov Model and a key sequence prediction algorithm to
predict keystrokes from inter-keystroke timings. Furthermore, they devised an
attacker system to monitor SSH sessions for password learning. In the work by
Liu et al. (Liu et al., 2019), the authors introduce a novel approach to user-
independent inter-keystroke timing attacks on PINs. Their attack methodology
is based on constructing an inter-keystroke timing dictionary derived from a
human cognitive model. Significantly, this model’s parameters can be
determined with a minimal amount of training data from any users, regardless
of whether they are the intended target victims. This approach suggests the
potential for large-scale deployment in real-world scenarios. The authors
explore various online attack settings, evaluating their attack’s performance
across different levels of PIN strength. Their experimental results reveal
that the proposed attack outperforms random guessing methods significantly.

##  3\. Our Method

Figure 3. Example of extracted segments related to keystrokes

We propose a new technique that can complement other approaches, covering
their weaknesses and defects to achieve better results. Typing pattern is
often overlooked by other approaches and negatively affects their results. We
turn this negative point into a positive one. The time interval between
pressing keys on a keyboard varies for different key pairs. However, we have
noticed that an individual tends to type a particular key pair within a
similar time interval in most cases, which is influenced by factors such as
the arrangement of keys on the keyboard, the anatomy of their hands, and
personal typing patterns. For example, we observed that the selected users
tended to type the ”b” and ”o” keys within a similar time in different words,
such as ”both” and ”book,” although these time intervals may vary from one
user to another. On the other hand, there are variations in the time intervals
between different key pairs. Using these two facts, we can model the victim’s
typing pattern. This model and a recording of the ambient noise of the victim
place can lead to a keyboard acoustic side-channel attack. Our method shows
that we can deduce sensitive information, such as emails and texts, by
analyzing the acoustic emissions produced while typing. In the following
sections, we will discuss the different phases of this research in detail.

###  3.1. Threat Model

Our approach assumes the victim is identified. We do not restrict our method
to a specific keyboard model or brand. Moreover, we assume that the victim
typically works in a private room. Hence, the environment noise is at the
level of usual quiet individual offices such that the noises can be controlled
and handled through some signal processing methods. We presume that we can
capture some typing samples of the victim in his working environment,
including the text and the ambient noise, which we use to build and train our
statistical models. We consider an oracle that can split the target audio file
into separate files corresponding to each word. This is a realistic assumption
because usually, after typing a word, users press the Enter or Space keys,
which generate distinguishable sounds even by human ears.

###  3.2. Dataset

To build a dataset of keystroke sounds, we developed a Windows-based
application (Figure 2) using C# programming language111Python version of this
program is available (link to both software available upon request) that
captures a user’s typing pattern in three conditions. Firstly, after capturing
the ambient noises for the first few seconds, the user types any desired text
on their wish. Secondly, he types specific sentences, and in the final step,
he types a set of predetermined commonly used words to capture a diverse range
of typing styles and patterns. We chose these sentences and words based on the
diversity needed to type letters and words in English.

Implementation Overview: When the software is executed, a pop-up appears to
inform users about the research policies and to obtain their consent to
participate in the study. Subsequently, a new anonymous folder is created
within the main Dataset folder. Following this, the software records the
keystrokes and audio samples during the three mentioned steps. The resulting
dataset consists of three audio files in WAV format and three text files for
each step. Each text file contains detailed information on each keystroke,
including the press and release TimeSpans, Key status, Virtual code, Scan
code, Caps lock status, and Shift status.

The developed software allows us to gather a comprehensive and confidential
dataset to capture diverse typing styles and patterns, including the audio
noises in the environment. We use the resulting dataset files to train models
for our attack.

###  3.3. Training Statistical Model

As mentioned before, the main idea of this paper is to utilize a user’s typing
pattern to train a statistical model. In the first step, information from the
dataset gathered by each user is used to calculate and store the time interval
between two pressed keys in a sheet called ’Data’ in an Excel file entitled
’model.xlsx’. Next, we calculate the average and standard deviation of these
time intervals for each sequence of similar keys and store them in another
sheet called ’Analysis’ in the same Excel file. The ’Analysis’ sheet serves as
the trained model.

We utilize the information from both sheets and compare the results. As the
number of similar keystroke sequences increases, we can see that the user
types those sequences with almost identical time intervals, with only minor
differences. Hence, using the ’Analysis’ sheet for larger user-generated
datasets is preferable. Moreover, by examining the standard deviation values,
we can infer the uniformity of the user’s typing pattern. The higher the
standard deviation values, the more inconsistent the user’s typing pattern,
resulting in a higher probability of errors in our algorithm. Nevertheless, we
propose a coefficient to reduce such errors, which will be discussed in the
subsequent sections.

Algorithm 1 Keystrokes Prediction Algorithm

Trained model $M$, Recorded sound of typing $S$, Frame length $l$, Number of
keystrokes to predict $k$, Minimum time between two keystrokes $m$, Tolerance
factor $t_{f}$.

List of predicted words $W$, list of predicted words that exist in the
dictionary $W_{c}$.

Set $F=\\{f_{i}=0|0\leq i<|S|\\}$.

while $i=0$ to $|S|-l$ do

Set $f_{i}=\sum_{t=i}^{i+l-1}|S[t]|$.

end while

while $n=1$ to $k$ do

Set $b_{n}=Max(F)$.

Update $F=\\{f_{i}=0|b_{n}-m<i<b_{n}+l+m\\}$.

end while

Set $B=(b_{1},...,b_{k})$.

$Sort(B)$.

Set $root=\\{^{\prime\prime},\\{\\}\\}$ // $node=\\{value,children\\}$

Set $L=\\{^{\prime}a^{\prime},...,^{\prime}z^{\prime}\\}$

while $i=1$ to $k-1$ do

Set $\Delta T_{i}=b_{i+1}-b_{i}$.

Set $C_{i}=\\{(k_{a},k_{b},\Delta_{ab})|k_{a}\in
L\land\Delta_{ab}-t_{f}\leq\Delta T_{i}\leq\Delta_{ab}+t_{f}\\}$

Update $L=\\{k_{b}|(k_{a},k_{b},\Delta_{ab})\in C_{i}\\}$

$AddCandidatesToTree(root,C_{i})$

end while

Set $W=GetAllPathesFromRootToLeaves(root)$

Set $W_{c}=[w\in W|w\in Dictionary]$.

Return $W_{c}$.

Figure 4. Example of detected keystrokes using proposed algorithms

###  3.4. Prediction

The next step after determining the statistical model related to each user’s
typing pattern is to recognize unknown keystrokes by analyzing the audio file
recorded from their typing. The audio file needs to be analyzed to find the
exact segments related to each keystroke, and then they will be examined
through further processes.

####  3.4.1. Extracting Keystrokes Segments

The process of extracting keystroke-related segments (e.g. Figure 3) from the
audio file involves several steps. Previous works have also noted that
keystrokes, especially in the hunt-and-peck style, typically occur within a
maximum duration of about 100 milliseconds, notably slower than alternative
typing methods. To begin, we employ a sliding window with a frame size of 100
milliseconds and a hop of one, as illustrated in Figure 4. Within this window,
we calculate the sum of the absolute amplitude of the recorded audio signal.
Subsequently, we systematically search for the maximum point within these
sliding windows and reset the values in the vicinity of this maximum to zero.
This resetting operation extends over a range that spans from the index of the
maximum point minus the frame length to the index of the maximum point plus
the frame length. This range alteration allows us to pinpoint the keystroke
signals, as we observe that the time intervals between keystrokes tend to be
longer than 100 milliseconds. By zeroing this range, we effectively eliminate
the possibility of redundant keystroke predictions. We repeat this step
iteratively until we’ve successfully identified the total number of
keystrokes. This determination is made by listening to the recorded file and
acting as an operator to ensure accuracy in our predictions.

Since the touch and press components of each keystroke generate the loudest
sounds, the maximum amplitude often occurs within the initial ten percent of
the keystroke segment. As our third step, after identifying all desired
maximum indexes associated with each keystroke, we proceed to calculate
segments corresponding to the keystrokes within a range extending from these
indexes to indexes plus a frame length. These segments can represent the
detected keystrokes. Additionally, we can save each segment in separate files,
which can facilitate future analysis and enhance the comprehensibility of the
extracted information for further study.

####  3.4.2. Calculation of time intervals

As previously mentioned, determining the time intervals between each keystroke
can be achieved once we have detected each segment of keystrokes. Various
methods were employed to calculate these intervals, including determining the
time between the start or end of each segment, finding intervals between the
average start and end times of each segment, and identifying the time
intervals between the largest peaks within each segment. We opted to calculate
the time intervals between the starting points of all keystroke segments. This
approach yielded the best results as it maintained the highest consistency
with the values recorded in the dataset and the statistical model we
developed.

####  3.4.3. Finding sequences of possible keystrokes

In the preceding section, we calculated time intervals between unidentified
keystrokes. Now, we seek the closest match within our statistical model for
these intervals. However, as users may not consistently type the same key
sequence at exact time intervals, we explore numbers within a range around the
calculated interval. This range extends approximately five percent greater and
five percent less than the calculated interval. We previously mentioned that a
higher standard deviation in time values for similar keys can lead to a higher
error rate in our algorithm. To address this, we calculate coefficients for
the time intervals based on the average standard deviation and adjust the
mentioned five percent range accordingly.

Once we’ve identified all possible sequences of typed letters for each step,
we construct a decision tree-like diagram for the subsequent steps. This
diagram enables us to trace all branches connected from the root to the final
branch. Any remaining unconnected branches are pruned. In the next step, we
consolidate all connected branches, representing the potentially typed
keystrokes we’ve identified. These serve as the raw prediction results.

####  3.4.4. Enhancing the results using English dictionary

The previous step generated a set of potential words typed by the user. Given
our specific focus on text content, including emails, and notes, we can
augment our prediction accuracy by employing semantic correctness approaches,
such as dictionary checks or AI-based methods like Large Language Models
(LLMs) (Brown et al., 2020). These methods enable us to refine our predictions
and ascertain the accurate sentences and text corresponding to our predicted
words. So, in the subsequent step, we enhanced our results by searching for
these words in an English dictionary and eliminating invalid words. This
process significantly improves the accuracy of our term prediction.

The procedure outlined in this section enables us to predict the letters the
user has typed by utilizing a model trained on the user’s typing pattern and
employing a series of analytical procedures on the audio signal. In the
following section, we will discuss the results and experiments conducted.

##  4\. Experimental Analysis

This section provides a comprehensive analysis of the experimental results
derived from our investigation. Our experiments were crafted to evaluate the
effectiveness and implications of the proposed acoustic side-channel attack.
Our evaluation encompasses various facets of the study, including accuracy,
efficiency, and security implications.

Figure 5. The effect of the number of letters on the success rate

###  4.1. User Study:

We conducted an IRB-approved user study to gather typing patterns from
participants. The data obtained are treated with confidentiality and
anonymity. To achieve this, we carefully selected 20 adult users, each
exhibiting their unique typing patterns, to train and test the accuracy of our
approach using their respective samples. The constructed distinct datasets
contained a test set of common English words, such as ”work”, ”love”, ”life”,
”like”, ”night”, ”world”, ”table”, ”they”, ”have”, ”teacher”, ”book”, ”buy”,
”credit”, ”paper”, ”order”, ”mobile”, ”mother”, ”cat”, ”run”, ”house”, and
”bill”, were chosen for their prevalence in English texts and varied word
lengths. This selection allowed us to measure the impact of word length on
prediction accuracy. The effect of the number of letters in a word is visually
represented in Figure 5. The figure indicates that the success rate increases
as the number of letters in words increases until we reach six letters. This
is because having more letters creates a larger tree based on those letters.
However, larger trees do not necessarily result in more meaningful words.
Therefore, we have observed that in this situation, there are fewer words that
result in bigger success rates. Interestingly, after number six, we reached
the highest success rate.

Figure 6. The success rate per each user Table 1. Comparison of Key Characteristics Among Acoustic Side Channel Attack Approaches on Keyboards Approach |  Requires large dataset |  Specific keyboard dependency |  Model training complexity |  typing pattern limitation |  Environ-ment noise limitation |  Success Rate
---|---|---|---|---|---|---
cognitive modeling (Liu et al., 2019) |  No |  Yes |  Yes |  No |  Yes |  %10
Deep learning (Slater et al., 2019) |  Yes |  Yes |  Yes |  Yes |  No |  84.59%
Hidden Markov Model (Foo Kune and Kim, 2010) |  No |  Yes |  Yes |  Yes |  Yes |  N/A
triangulation (Ranade et al., 2009) |  Yes |  Yes |  Yes |  Yes |  Yes |  87.5%
timing dictionary (LIU, 2019) |  No |  Yes |  Yes |  Yes |  Yes |  14.0%
Our Method |  No |  No |  No |  No |  No |  43%

###  4.2. Accuracy Assessment:

We conducted a series of experiments and calculations to assess the accuracy
of our proposed acoustic side-channel attack. The primary objective of these
evaluations was to gauge the effectiveness of our approach in predicting user
keystrokes based on their typing patterns. To assess the overall accuracy of
the proposed method, we initially tallied the number of correctly detected
words for each user’s test dataset. Following this, we calculated the average
number of correct detections for each user. Subsequently, we computed the
average accuracy of our approach across all 20 users. Figure 6 illustrates
both the collective accuracy of all users and the individual accuracy of each
user. Our investigation reveals a linear relationship between the average
standard deviation (ASD) of each user’s typing sample and the success rate of
prediction. This implies that users with a consistent typing pattern tend to
have lower ASD, resulting in a higher prediction success rate. For instance,
User 13 exhibits the lowest ASD and, consequently, the highest success rate.
Our findings substantiate our initial hypothesis regarding the correlation
between typing pattern and susceptibility to these types of attacks.
Additionally, we computed the average success rate across all users as the
final average success rate for our approach, which amounts to approximately
43%.

As mentioned earlier, our aim was to simulate a highly realistic environment
and experiments. We deliberately chose:

  * •

Not to eliminate acoustic noises during the data-gathering process

  * •

Not to restrict the keyboard model

  * •

Not compelled participants to adopt a specific typing style, such as hunt and
peck, touch typing, two-fingered typing

  * •

To keep our attack simulation more realistic,

  * •

To use the laptop’s microphone, which was not a high-quality microphone

Consequently, comparing our results with other approaches becomes challenging,
as they often constrain various parameters in their experiments to showcase
the success rate of their methods. However, we tried to compare some of our
features and achievements to other similar methods in table 1.

In comparing various acoustic side-channel attack approaches on keyboards,
distinctive characteristics emerge. Cognitive modeling (Liu et al., 2019)
stands out for not requiring a large dataset and considering both specific
keyboard dependency and users’ typing patterns; however, it does not account
for environmental noise, resulting in a relatively low success rate of 10%.
Deep learning (Slater et al., 2019) demands a large dataset, exhibits keyboard
dependency, and involves complex model training. It achieves a success rate of
84.59%, but it neglects consideration of realistic environments. Hidden Markov
Model (Foo Kune and Kim, 2010) is notable for its lack of dataset requirement;
However, we could not find their final achievement accurately, and they
overlook both users’ typing patterns and environmental noise. Triangulation
(Ranade et al., 2009) requires a large dataset and is keyboard-dependent, yet
it achieves a commendable success rate of 87.5%, neglecting considerations for
users’ typing patterns and environmental noise. Timing dictionary (LIU, 2019)
does not necessitate a large dataset but is keyboard-dependent, resulting in a
modest success rate of 14%, with no consideration for users’ typing patterns
or environmental noise.

Our proposed method differs by not requiring a large dataset and minimizing
keyboard dependency. It excels in considering users’ typing patterns and
environmental noise, achieving a practical success rate of 43%. This
highlights the trade-offs and strengths of each approach, emphasizing the
importance of tailored considerations for real-world applicability. Our
intention was to propose a practical approach aligned with real-world
scenarios. Unlike approaches that limit destructive parameters for
experimental convenience, we sought to mirror the conditions encountered in
the actual world. Note that any success rate greater than zero in real-world
scenarios is a significant achievement for an attacker. Furthermore, our
proposed method can be combined with other approaches to get better results,
addressing potential shortcomings they may have.

##  5\. Limitations and Countermeasures

We have tried to minimize our approach’s dependence on environmental
conditions. However, it is a fundamental reality that if we cannot accurately
capture the sound of the keyboard, we may not be able to precisely identify
every keystroke, resulting in a reduction in overall accuracy. Another
physical limitation to consider is that all acoustic keystroke detection
methods rely on the strength of the sound generated by the keyboards.
Therefore, keyboards with softer keys produce less sound power, which, in
turn, can lead to reduced accuracy in the final detection.

A crucial assumption in our approach is that users maintain a consistent and
detectable typing pattern throughout the dataset-building process. In other
words, our approach can adversely affect the success rate of these groups:

  * •

People who use computers rarely, because they do not maintain a consistent
typing pattern.

  * •

Professional typists, because they type very fast, and the touch, key-press,
and key-release events of consecutive keystrokes usually have overlaps, and we
can’t detect the tying pattern accurately.

##  6\. Conclusion

In this paper, we have explored the possibility of acoustic side-channel
attacks on keyboards that are based on the user’s typing pattern. This
approach addresses some of the limitations of other methods and provides a
more realistic method that can be used against criminal and terrorist groups.

Our proposed method uses the time differences between consecutive keystrokes
to train a statistical model for extracting unknown keystrokes from a recorded
acoustic sound. To test our method, we collected the ambient noise and typed
text of 20 people based on an IRB-approved approach, and obtained
approximately a 43% success rate through our experiments. Our results were
achieved in a realistic environment without any restrictions on users’
keyboards, typing patterns, or environmental acoustic noises, which is a
significant advantage over other approaches. We utilized an English dictionary
to enhance our text-detection abilities. However, we intend to explore the
potential of AI-powered models like LLMs in future projects to improve our
success rate.

We acknowledge that our proposed method still has some inherent limitations,
such as the consistency and predictability of the user’s typing pattern and
the quality of the acoustic recorded sound. Overall, we believe that this
approach highlights the need for more secure input methods and emphasizes the
potential vulnerability of digital security.

## References

  * (1)
  * Anand and Saxena (2018) S Abhishek Anand and Nitesh Saxena. 2018.  Keyboard emanations in remote voice calls: Password leakage and noise (less) masking defenses. In _Proceedings of the Eighth ACM Conference on Data and Application Security and Privacy_. 103–110.
  * Asonov and Agrawal (2004) Dmitri Asonov and Rakesh Agrawal. 2004.  Keyboard acoustic emanations revisited. In _Proceedings of the 11th ACM conference on Computer and communications security_. ACM, 373–382.
  * Backes et al. (2013) Michael Backes, Markus Durmuth, Sebastian Gerling, and Manfred Pinkal. 2013.  Acoustic side-channel attacks on touchscreens. In _Proceedings of the 2013 ACM SIGSAC Conference on Computer and Communications Security_. ACM, 551–562.
  * Backes et al. (2010) Michael Backes, Markus Dürmuth, Sebastian Gerling, Manfred Pinkal, Caroline Sporleder, et al. 2010\.  Acoustic $\\{$Side-Channel$\\}$ attacks on printers. In _19th USENIX Security Symposium (USENIX Security 10)_.
  * Berger et al. (2006) Yigael Berger, Avishai Wool, and Arie Yeredor. 2006.  Dictionary attacks using keyboard acoustic emanations. In _Proceedings of the 13th ACM conference on Computer and communications security_. 245–254.
  * Briol (1991) Roland Briol. 1991.  Emanation: How to keep your data confidential. In _Proceedings of Symposium on Electromagnetic Security For Information Protection_. 225–234.
  * Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020\.  Language models are few-shot learners.  _Advances in neural information processing systems_ 33 (2020), 1877–1901.
  * Compagno et al. (2017) Alberto Compagno, Mauro Conti, Daniele Lain, and Gene Tsudik. 2017.  Don’t skype & type! acoustic eavesdropping in voice-over-ip. In _Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security_. 703–715.
  * de Souza Faria and Kim (2019) Gerson de Souza Faria and Hae Yong Kim. 2019.  Differential audio analysis: a new side-channel attack on PIN pads.  _International Journal of Information Security_ 18 (2019), 73–84.
  * Fiona (2006) Au Hiu Yan Fiona. 2006.  Keyboard acoustic triangulation attack.  _The Chinese University Of Hong Kong: bachelors thesis_ (2006).
  * Foo Kune and Kim (2010) Denis Foo Kune and Yongdae Kim. 2010.  Timing attacks on pin input devices. In _Proceedings of the 17th ACM conference on Computer and communications security_. 678–680.
  * Genkin et al. (2014) Daniel Genkin, Adi Shamir, and Eran Tromer. 2014.  RSA key extraction via low-bandwidth acoustic cryptanalysis. In _23rd USENIX Security Symposium_. USENIX Association, 575–590.
  * Halevi and Saxena (2012) Tzipora Halevi and Nitesh Saxena. 2012.  A closer look at keyboard acoustic emanations: random passwords, typing styles and decoding techniques. In _Proceedings of the 7th ACM Symposium on Information, Computer and Communications Security_. 89–90.
  * Harrison et al. (2023) Joshua Harrison, Ehsan Toreini, and Maryam Mehrnezhad. 2023.  A Practical Deep Learning-Based Acoustic Side Channel Attack on Keyboards. In _2023 IEEE European Symposium on Security and Privacy Workshops (EuroS &PW)_. IEEE, 270–280.
  * LIU (2019) Ximing LIU. 2019.  When keystroke meets password: Attacks and defenses.  _Dissertations and Theses Collection_ (2019).
  * Liu et al. (2019) Ximing Liu, Yingjiu Li, Robert H Deng, Bing Chang, and Shujun Li. 2019.  When human cognitive modeling meets PINs: User-independent inter-keystroke timing attacks.  _Computers & Security_ 80 (2019), 90–107.
  * O’Leary et al. (2016) Ryan O’Leary, Luca Rackliffe, and Johnson Agbinya. 2016.  Acoustic location of smartphones. In _Proceedings of the 15th international conference on Mobile and ubiquitous multimedia_. ACM, 307–311.
  * Ponnam (2013) Sravanthi Ponnam. 2013.  Keyboard Acoustic Emanations Attack: An Empirical study.
  * Quarta et al. (2018) Davide Quarta, Paolo Milani Comparetti, Davide Balzarotti, and Stefano Zanero. 2018.  Acoustic side-channel attacks on printers. In _Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security_. ACM, 1938–1952.
  * Ranade et al. (2009) Vinayak Ranade, Jeremy Smith, and Ben Switala. 2009.  Acoustic side channel attack on atm keypads.
  * Ross et al. (2005) Blake Ross, Collin Jackson, Nick Miyake, Dan Boneh, and John C Mitchell. 2005.  Stronger Password Authentication Using Browser Extensions.. In _USENIX Security Symposium_ , Vol. 17. Baltimore, MD, USA, 32.
  * Slater et al. (2019) David Slater, Scott Novotney, Jessica Moore, Sean Morgan, and Scott Tenaglia. 2019.  Robust keystroke transcription from the acoustic side-channel. In _Proceedings of the 35th Annual Computer Security Applications Conference_. 776–787.
  * Song et al. (2001) Dawn Xiaodong Song, David Wagner, and Xuqing Tian. 2001.  Timing Analysis of Keystrokes and Timing Attacks on $\\{$SSH$\\}$. In _10th USENIX Security Symposium (USENIX Security 01)_.
  * Taheritajar et al. (2023) Alireza Taheritajar, Zahra Mahmoudpour Harris, and Reza Rahaeimehr. 2023.  A Survey on Acoustic Side Channel Attacks on Keyboards.  _arXiv preprint arXiv:2309.11012_ (2023).
  * Toreini et al. (2015) Ehsan Toreini, Brian Randell, and Feng Hao. 2015.  An acoustic side channel attack on enigma.  _School of Computing Science Technical Report Series_ (2015).
  * Yan et al. (2004) Jeff Yan, Alan Blackwell, Ross Anderson, and Alasdair Grant. 2004.  Password memorability and security: Empirical results.  _IEEE Security & privacy_ 2, 5 (2004), 25–31.
  * Zhu et al. (2014) Tong Zhu, Qiang Ma, Shanfeng Zhang, and Yunhao Liu. 2014.  Context-free attacks using keyboard acoustic emanations. In _Proceedings of the 2014 ACM SIGSAC conference on computer and communications security_. 453–464.
  * Zhuang et al. (2009) Li Zhuang, Feng Zhou, and J Doug Tygar. 2009.  Keyboard acoustic emanations revisited.  _ACM Transactions on Information and System Security (TISSEC)_ 13, 1 (2009), 1–26.


# Influence of Allee Effect on Extreme Events in Coupled Three Species Systems

Deeptajyoti Sen
Department of Physical Sciences
IISER Mohali
Manauli, Punjab - 140306
<EMAIL_ADDRESS>
&Sudeshna Sinha
Department of Physical Sciences
IISER Mohali
Manauli, Punjab - 140306
<EMAIL_ADDRESS>
Corresponding author

###### Abstract

We consider the dynamics of two coupled three-species population patches,
incorporating the Allee Effect, focussing on the onset of extreme events in
the coupled system. First we show that the interplay between coupling and the
Allee effect may change the nature of the dynamics, with regular periodic
dynamics becoming chaotic in a range of Allee parameters and coupling
strengths. Further, the growth in the vegetation population displays an
explosive blow-up beyond a critical value of coupling strength and Allee
parameter. Most interestingly, we observe that beyond a threshold of coupling
strength and Allee parameter, the population densities of all three species
exhibit non-zero probability of yielding extreme events. The emergence of
extreme events in the predator populations in the patches is the most
prevalent, and the probability of obtaining large deviations in the predator
populations is not affected significantly by either the coupling strength or
the Allee effect. In the absence of the Allee effect the prey population in
the coupled system exhibits no extreme events for low coupling strengths, but
yields a sharp increase in extreme events after a critical strength of
coupling. The vegetation population in the patches display a small finite
probability of extreme events for strong enough coupling, only in the presence
of Allee effect. Lastly we consider the influence of additive noise on the
continued prevalence of extreme events. Very significantly, we find that noise
suppresses the unbounded vegetation growth that was induced by a combination
of Allee effect and coupling. Further, we demonstrate that noise mitigates
extreme events in all three populations, and beyond a noise level we do not
observe any extreme events in the system at all. This finding has important
bearing on the potential observability of extreme events in natural and
laboratory systems.

##  1 Introduction

Investigating the advent of extreme events, signalling behaviour beyond normal
variability in the dynamics of complex systems, has enormous relevance from
the viewpoint of basic understanding of complex systems, as well as
implications for risk assessments from catastrophic surges [10, 13, 18, 19].
So exploring the emergence of such events in models and real-world systems, as
well as the search for mechanisms and processes that may underlie extreme
events, has witnessed much research interest in recent years [1]. An extreme
event can be labelled as one where a state variable displays very large,
relatively rare, fluctuations from the average value. That is, in the course
of its evolution the system exhibits occasional uncorrelated excursions that
are significantly different from the mean. So the most commonly employed
signature of extreme events in phenomena ranging from oceanography [7] to
financial markets [12], is uncorrelated recurrent deviations larger than a
prescribed threshold of typically 3-8 standard deviations away from the
average value.

A very important direction in the study of extreme events is to unearth
generic mechanisms that can give rise such large deviations in the dynamics.
While extreme events in stochastic models has been extensively studied over
decades [11, 14], the advent of extreme events in deterministic dynamical
systems, without intrinsic or extrinsic stochasticity, has garnered focus in
recent times [2, 3, 8, 9, 15]. Focussing on this direction, we consider
emergent extreme phenomena in patches of vegetation-prey-predator systems
coupled through Lotka-Volterra interactions, incorporating the biologically
important Allee effect. In population dynamics the Allee effect reflects the
advantageous influence of conspecific interactions on population growth [5, 6,
16], and captures the impact of small population size on the long-term
persistence of a population. Further we consider the role of noise on the
propensity of extreme events in this coupled three-species system. Beyond
modelling population dynamics in ecosystems, these results have broad bearing
on the mechanisms that can enhance extreme events in deterministic dynamical
systems, and the effect of stochasticity on their prevalence.

Our paper is organized as follows. At the outset, in Section 2 we introduce
the model of three interacting species, incorporating the Allee effect, and
recall some significant results in this system. In Section 3 we go on to
explore the dynamics of coupled patches of such three-species systems to
establish the generality and broad scope of our findings. Lastly, in Section
4, we summarize our results and discuss their potential implications.

##  2 Three species food chain model with the Allee effect

The local and global dynamics of three species interacting models has
significant impact in complex system research, in particular in theoretical
ecology. Here we will consider a vertical food chain model incorporating the
dynamics of the snowshoe hare and the Canadian lynx populations, based on
observed data. This model consists vegetation (denoted by $u$), prey (denoted
by $v$) and predator (denoted by $w$) and also incorporates the Allee effect
into the growth of predator. The dynamics of the model can be described by the
following coupled nonlinear ordinary differential equations:

$\begin{split}\dot{u}&=f(u,v,w)\,=\,au\ -\ \alpha_{1}f_{1}(u,v),\\\
\dot{v}&=g(u,v,w)\,=\,\alpha_{1}f_{1}(u,v)\ A(v)\ -\ bv\ -\
\alpha_{2}f_{2}(v,w),\\\ \dot{w}&=h(u,v,w)\,=\,\alpha_{2}f_{2}(v,w)\ -\
c(w-w^{*}),\end{split}$ (1)

where $a$, $b$ and $c$ are the growth rates of vegetation, prey and predator
respectively. Here we consider the interaction between vegetation and prey
follow Holling type II functional response $f_{1}(u,v)\,=\,\frac{uv}{1+ku}$
whereas the interaction between prey and predator is considered to follow
Lotka-Volterra type interaction, described by $f_{2}(u,v)\,=\,uv$. The
parameter $k$ corresponds to the average time spent for processing a food, and
is termed “handling time”. Here $\alpha_{1}$ denotes the maximum growth rate
of prey, which is the product of the ingestion rate and a constant factor less
than unity, considering the fact that not all ingested vegetation population
converted into prey biomass. The parameter $\alpha_{2}$ is the parameter that
corresponds to $\alpha_{1}$ in the predator population. The predator is
considered to be generalist, accounting for the fact that it can persist at an
equilibrium $w^{*}$, either in absence of prey or when it’s concentration is
low. Additionally, we incorporate the Allee effect into the prey’s growth by
introducing the following functional form

$A(v)\,=\,\frac{v}{v+\theta},$

where $\theta$ is the Allee parameter reflecting the critical prey density at
which the probability of successful mating would be half. This form is
characteristic of the fact that the per-capita reproduction rate becomes
smaller at low prey density. This kind of Allee effect appears due to lack of
mating partners, low fertilization efficiency, cooperative breeding mechanism,
etc in the context of biology. The dynamics of this three species model and
the consequences of the Allee effect on this system has been very recently
studied in [17]. We recall the principal results from that study below:

  * •

The Allee effect induces explosive increase (which we term a “blow-up”) of the
vegetation population, i.e. there is a critical threshold of the Allee
parameter beyond which the vegetation population has a positive probability of
unbounded growth.

  * •

While this three species system is regular when the Allee effect is absent or
small, sufficiently large Allee effect induces chaos in the system.

  * •

The Allee effect also has an impact on the development of extreme events in
the three-species system, with the Allee effect typically enhancing the
probability of obtaining such events.

  * •

Lastly, additive noise in this three-species system mitigates the blow-up of
the vegetation population, as well as suppresses extreme events.

##  3 Patches of three-species systems coupled through cross-predation

In order to gauge the generality of the phenomena observed in a single patch
in our earlier work, we now explore the dynamics of two coupled patches, where
each patch again has three species, namely vegetation, prey and predator. The
populations in local patches are connected in such a way that predator of one
patches can attack the prey of neighbouring patches and vice versa. This
coupling strategy, known as coupling through cross-predation, signifies that
predators are more mobile compared to prey and can move into another patch to
capture the prey. Dynamics of the coupled three species system can be
described by the following sets of equations:

$\begin{split}\dot{u}_{1}&=f(u_{1},v_{1},w_{1}),\\\
\dot{v}_{1}&=g(u_{1},v_{1},w_{1})\ -\ C\ v_{1}w_{2},\\\
\dot{w}_{1}&=h(u_{1},v_{1},w_{1})\ +\ C\ v_{2}w_{1},\\\ \ &\ \\\
\dot{u}_{2}&=f(u_{2},v_{2},w_{2}),\\\ \dot{v}_{2}&=g(u_{2},v_{2},w_{2})\ -\ C\
v_{2}w_{1},\\\ \dot{w}_{2}&=h(u_{2},v_{2},w_{2})\ +\ C\
v_{1}w_{2}.\end{split}$ (2)

Here the populations of vegetation, prey and predator in $i$-th patch
($i\,=\,1,2$) are denoted by $u_{i}$, $v_{i}$ and $w_{i}$ respectively and $C$
is a parameter reflecting the inter-patch coupling strength. The function
$f_{i},g_{i},h_{i},\,i\,=\,1,2$ have the same form as in a single patch given
by Eqn. (1), with parameters
$a_{i},b_{i},c_{i},\alpha_{1i},\alpha_{2i},\theta_{i},\,i\,=\,1,2$. To start
our analysis we assume that
$a_{1}\,=\,a_{2}\,=\,a,\,b_{1}\,=\,b_{2}\,=\,b,\,c_{1}\,=\,c_{2}\,=\,c,\,\alpha_{11}\,=\,\alpha_{12}\,=\,\alpha_{1},\,\alpha_{21}\,=\,\alpha_{22}\,=\,\alpha_{2},\,\theta_{1}\,=\,\theta_{2}\,=\,\theta$.
Although considering identical parameters is not accurate from the ecological
point of view, it provides a good test bed for investigations and serves as an
useful starting point for analyzing the coupled system. In this study we
consider the parameter values $a\,=\,1$, $b\,=\,1$, $c\,=\,10$,
$w^{*}\,=\,0.006$, $\alpha_{1}\,=\,0.5$, $\alpha_{2}\,=\,1$, $k\,=\,0.05$ [4].
We explore the dynamics of the coupled system under varying Allee parameter
$\theta$ and coupling strength $C$, through numerical simulations using the
Runge-Kutta fourth order algorithm. We have corroborated the stability and
convergence of our results with respect to decreasing step size.

Figure 1: Probability of unbounded vegetation growth in coupled patches with
respect to the coupling strength $C$. A blow-up to be considered to occur when
the vegetation population in any patches exceeds $10^{3}$. Three different
values of $\theta$ are considered and the probability is estimated from a
sample of 500 initial states distributed randomly in a hyper-cube
($u_{i}\in[0:4]$, $v_{i}\in[0:2]$, $w_{i}\in[0:5]$) over each patch.

## Temporal evolution of population densities in the coupled patches

Our first significant observation is the emergence of “blow-ups” in the
vegetation population densities beyond a threshold of coupling strength. This
threshold decreases with increasing the Allee parameter $\theta$, namely the
onset of unbounded vegetation growth occurs at weaker coupling for stronger
Allee effect. In order to quantify the advent of such blow-ups, we estimate
the probability of unbounded vegetation growth from many initial states
followed over an extended period of time, ensuring that the estimated values
are converged with respect to sample size of initial conditions. In Fig. 1 we
display the results thus obtained, for varing coupling strengths $C$, for
values of the Allee parameter $\theta\,=\,0.001,\,0.005,\,0.01$. It is clearly
noticeable from the figure that for each value of the Allee parameter
$\theta$, there exists a critical value $C^{*}_{\theta}$ of coupling strength,
beyond which vegetation has a nonzero probability of blow-up. It is also
evident that for increasing values of $\theta$, the value of $C^{*}_{\theta}$
reduces. This clearly demonstrates that the Allee effect enhances the
propensity of explosive vegetation growth, a trend that is consistent with
results from a single patch.

Next we look into the temporal evolution of the population densities and the
emergent attractors in phase phase, for the coupled patches. To illustrate the
dynamics of the coupled system we present two representative time series and
the corresponding phase space attractors in Fig. 2, for Allee parameter
$\theta\,=\,0$ and $\theta\,=\,0.003$, with coupling strength $C=0.1$. It is
clearly evident that Allee effect induces chaos in the coupled system, and we
obtain chaotic attractors for sufficiently large $\theta$. This phenomenon is
demonstrated more rigorously through the bifurcation diagram in Fig. 3 which
displays the emergence of chaos after a critical value of $\theta$. This trend
is similar to that observed in a single patch. So the influence of the Allee
effect observed in a single patch generalizes to two coupled patches. Further,
importantly, increasing the Allee effect parameter $\theta$ increases the size
of the chaotic attractor in the coupled system. The sparse points at the high
values of $u$, $v$ and $w$ are manifested as extreme events in the time
series.

Fig. 4 shows the bifurcation sequence with respect to coupling strength $C$,
for $\theta=0$ and $\theta=0.003$. It has already been observed that in a
single patch when the Allee effect is absent, all population densities evolve
periodically with the system attracted to a period-$4$ orbit. However,
interestingly, under coupling, even in the absence of Allee effect, we observe
that the populations in the patches evolve aperiodically when coupling is
sufficiently strong (see Fig. 4, top row). One also observes a periodic window
arising near $C\,=\,0.5$ in the bifurcation diagram as a result of interior
crisis.

The bifurcation diagrams for the case of Allee parameter $\theta=0.003$ is
displayed in Fig. 4 (bottom row). The first significant observation is that
chaos arises in the presence of Allee effect, even in uncoupled patches.
Further we observe that increasing the coupling strength typically increases
the size of the chaotic attractor, except in a small range
($C\in[0.32,0.411]$) where the system settles into a small two-periodic
attractor as a result of interior crisis. This two-periodic attractor becomes
unstable once again as the coupling strength increases, giving rise to the
sudden emergence of a large chaotic attractor. So comparing the bifurcation
scenarios for the two different cases we can conclude that weak coupling
induces chaos in the presence of Allee effect, while for strong coupling chaos
arises even in the absence of Allee effect.

Figure 2: Time series for the vegetation, prey and predator populations in a
patch, and the corresponding phase space attractor, of the system given by
Eqns. (2), for coupling strength $C=0.1$, and the Allee parameter $\theta$
equal to $0$ (a-b) and $0.003$ (c-d). The red dashed line corresponds to mean
$\mu$ of the time series and the black dashed line indicates the $\mu+5\sigma$
threshold.

Figure 3: Bifurcation diagram of (left to right) vegetation, prey and predator
population densities, with respect to the Allee parameter $\theta$ for the
coupling strength $C\,=\,0.5$.

Figure 4: Bifurcation diagram of (left to right) vegetation, prey and predator
populations in a patch, with respect to the coupling strength $C$, for (top
row) $\theta\,=\,0$, and (bottom row) $\theta\,=\,0.003$.

Further, we explore the synchronization between the populations of vegetation,
prey and predator in the two patches. In order to quantify the degree of
synchronization we calculate the average synchronization error, defined as the
mean square difference of the corresponding population densities of the two
patches, obtained by averaging over long time and many initial states. It is
clear that there is no synchronization, even for strong coupling. The closest
synchronization (i.e. lowest synchronization error) is achieved in the
parameter window supporting a period-2 orbit for $\theta=0.003$, but typically
the patches do not synchronize irrespective of the presence or absence of the
Allee effect.

Figure 5: Average synchronization error of the coupled patches, with respect
to the coupling strength $C$ for Allee parameter (a) $\theta\,=\,0$, (b)
$\theta\,=\,0.003$.

## Extreme Events in the evolution of the population densities

We first probe the global maximum of vegetation ($u_{max}$), prey ($v_{max}$)
and predator ($w_{max}$) populations under increasing coupling strengths for
different Allee parameter $\theta$. We have estimated $u_{max}$, $v_{max}$ and
$w_{max}$ by recording the maximum of the population of the patches from a
large sample of random initial conditions. In Fig. 6 we plot $u_{max}$,
$v_{max}$ and $w_{max}$ with respect to the coupling parameter $C$ for Allee
parameter $\theta=0$ and $\theta=0.003$. We observe that estimated values of
$u_{max}$, $v_{max}$ and $w_{max}$ typically increase with rising coupling
strength $C$, and this increase is more pronounced in the presence of Allee
effect. This signifies that the Allee effect, as well as coupling strength,
enhance the global maximum of the populations of all three species. This
observation is consistent with the fact that increasing Allee parameter and
coupling strengths typically yield an increase in the size of the attractor in
phase space, as evident from the bifurcation diagrams.

Figure 6: Global maximum of (a) vegetation ($u_{max}$), (b) prey population
($v_{max}$) and (c) predator population $(w_{max})$ with respect to the
coupling strength $C$, scaled by their values obtained for $C\,=\,0$, for
Allee parameter $\theta=0$ (blue) and $\theta=0.003$ (red). When the value of
this scaled quantity is larger than $1$, the global maximum is larger than
that for the case of uncoupled patches.

Next we focus on the probability of obtaining extreme events for vegetation,
prey and predator populations in the coupled patches in order to gauge the
influence of the Allee effect and the coupling strength on the advent of large
deviations. With no loss of generality we consider the threshold of an extreme
event to be $5\sigma$. In order to estimate the probability of obtaining
extreme events, denoted as $P_{ext}$, we evolve the system from a large sample
of random initial conditions over a prolonged time period and note the
occurrences when a population exceeds the $\mu+5\sigma$ threshold. Fig. 7
displays $P_{ext}$ for all three population densities with respect to the
coupling strength for different $\theta$. In general, coupling enhances the
occurrences of large deviations. Note however that when these deviations occur
in periodic windows, such near $C\sim 0.5$ for $\theta=0$ and around $C\sim
0.3-0.4$ for $\theta=0.003$, they are not true extreme events as they are
entirely correlated in time and recur periodically.

When Allee effect is absent (Fig. 7 left panel), vegetation population is
always confined to low values and does not show any extreme events. The prey
population is likewise limited to small values for lower coupling strengths.
However, it deviates considerably from its mean beyond a critical threshold of
coupling strength, resulting in extreme events. The predator populations have
the highest propensity of extreme events, with extreme events arising even in
uncoupled patches.

In the presence of Allee effect (Fig. 7 right panel) one finds that both the
predator and prey populations display large deviations from the mean, over the
full coupling range, including the uncoupled case of $C=0$. The only exception
to this trend is the perceptible dip in extreme events around $C\sim 0.3-0.4$
for $\theta=0.003$ corresponding to a periodic window supporting a small
period-$2$ orbit (cf. Fig. 4 lower panels). The most significant result in the
coupled patches in the presence of Allee effect is the emergence of a small
finite probability of extreme events in the vegetation population for
sufficiently strong coupling.

These trends are further bourne out by Fig. 8, which displays $P_{ext}$ over a
range of Allee parameters for a fixed value of coupling strength. It is again
apparent that predator populations exhibit the highest propensity for large
deviations from the mean, and this is not affected much by the magnitude of
the Allee Effect. The prey population on the other hand shows steady increase
in extreme events with increasing Allee parameter. However, $P_{ext}$ for the
prey is always lower than that for predators. The vegetation shows no extreme
events at this value of coupling, even when the Allee effect is present.

Figure 7: Probability of obtaining extreme events in unit time in a patch
($P_{ext}$), with respect to coupling strength $C$, where $P_{ext}$ is
estimated by sampling a time interval of length $T\,=\,4000$ and averaging
1000 random initial conditions. We present this for two different values of
the Allee parameter: (a) $\theta\,=\,0$ and (b) $\theta\,=\,0.003$. Here we
consider that an extreme event occurs when a population exceeds the threshold
value of $\mu+5\sigma$. The case of vegetation is shown in blue, prey in red
and predator in black. Figure 8: Probability of obtaining extreme events in
unit time in a a patch ($P_{ext}$), with respect to Allee parameter $\theta$.
Here the coupling strength is fixed at $C\,=\,0.25$, and $P_{ext}$ is
estimated by sampling a time interval of length $T\,=\,4000$ and averaging
over 1000 random initial conditions. The case of vegetation is shown in blue,
prey in red and predator in black.

## Effect of Noise on Extreme Events

Noise is prevalent in natural ecosystems as a result of external factors such
as inherent diversity, fluctuations in migration, and environmental changes.
Here we examine how stochasticity influences the three-species coupled system
(2). Specifically we explore the dynamics of the system under additive random
noise $\xi(t)$, given by the following dynamical equations:

$\begin{split}\dot{u}_{1}&=f(u_{1},v_{1},w_{1})\ +\ \xi_{1}(t),\\\
\dot{v}_{1}&=g(u_{1},v_{1},w_{1})\ -\ C\ v_{1}w_{2}\ +\ \xi_{2}(t),\\\
\dot{w}_{1}&=h(u_{1},v_{1},w_{1})\ +\ C\ v_{2}w_{1}\ +\ \xi_{3}(t),\\\ \ &\
\\\ \dot{u}_{2}&=f(u_{2},v_{2},w_{2})\ +\ \xi_{4}(t),\\\
\dot{v}_{2}&=g(u_{2},v_{2},w_{2})\ -\ C\ v_{2}w_{1}\ +\ \xi_{5}(t),\\\
\dot{w}_{2}&=h(u_{2},v_{2},w_{2})\ +\ C\ v_{1}w_{2}\ +\
\xi_{6}(t).\end{split}$ (3)

Figure 9: Time series for the vegetation, prey and predator populations (left
panel) and corresponding phase attractor of the system (right panel), for
coupling strength $C\,=\,0.5$, Allee parameter $\theta\,=\,0.05$ and noise
strength (a-b), $\sigma\,=\,0.001$ (c-d), $\sigma\,=\,0.005$ (e-f)
$\sigma\,=\,0.01$. Note that for this value of $C$ and $\theta$, the system
has unbounded vegetation growth in the absence of noise. So noise has
suppressed the explosive growth in the coupled system.

The functional forms $f(u,v,w)$, $g(u,,w)$ and $h(u,v,w)$ are given as before
in Eq. 1, and $\xi_{i}(t),\,i\,=\,1,2,\cdots,6$ represent zero mean delta-
correlated Gaussian white noises satisfying
$<\xi_{i}(t),\xi_{j}(t^{{}^{\prime}})>\,=\,\sigma\delta(t-t^{{}^{\prime}})\delta_{ij}$
for $i,j\,=\,1,2,\cdots,6$, where $\sigma$ is the noise strength. We
investigate the dynamics of the stochastic differential system (3) numerically
by using explicit Euler-Maruyama scheme. We have also checked the convergence
and stability of the numerical solutions with decreasing step size.

We investigate how the dynamics of the coupled system is affected by the
presence of additive noise. In particular, we explore whether the system
becomes more irregular, or if chaos is suppressed to noisy cycles or noisy
fixed points, in the presence of stochasticity. In Fig. 9 we present the time
series and phase portrait of the system (3) for different noise strengths. It
is observed that when noise strength is either zero or of very low magnitude
($\sigma\,=\,10^{-3}$), all three populations oscillate aperiodically and
system evolves to chaotic attractors (Fig. 9 (a-b) ). Also note that
populations of all species exhibit extreme events for low magnitude of the
noise strength as their states occasionally cross the $\mu+5\sigma$ threshold.
On increasing noise strengths ($\sigma\sim 5\times 10^{-3}$) , these extreme
events completely disappear from the all populations, and the populations of
all three species settle into a noisy periodic orbit (Fig. 9 (c-d)). On
further increasing the noise strength ($\sigma\sim 10^{-2}$), the populations
of all three species settle down to a noisy quasi-steady state (Fig. 9 (e-f)),
and the system continues to exhibit no extreme deviations from the mean. So
then, very interestingly, the extreme events in the populations of this
coupled three-species system are suppressed under sufficiently strong noise.
Therefore we arrive at the following significant conclusion: additive noise
not only suppresses the extreme events from the vegetation, prey and predator
populations, but it also transforms the dynamics of the system from chaos to a
noisy quasi-steady state. Additionally the additive noise also tames the
explosive growth in the vegetation population that we observed earlier.

##  4 Discussion

In summary, we explored the dynamics of two coupled patches of a three-species
trophic system incorporating the Allee Effect in the prey population. Our
focus is on the emergence of extreme events in the system. In particular we
address the significant question of whether or not Allee effect and coupling
suppress or enhance extreme events. Our first key observation is as follows:
we find that the system experiences a explosive blow-up in the vegetation
population after a critical value of coupling strength in presence of the
Allee effect. Further the interplay of the Allee effect and coupling has a
pronounced influence on the nature of the dynamics. In order to explore this
aspect in detail, we looked into the bifurcation scenarios of the system with
respect to the Allee parameter $\theta$ and coupling strength $C$. We find
that the populations of all three species of the coupled system (2) oscillate
in a regular manner and settle into a four periodic orbit when the Allee
parameter $\theta$ is low, whereas, the populations fluctuate aperiodically
and chaotic attractors emerge in the coupled system with increasing the Allee
parameter $\theta$. In addition the size of the attractor gradually increases
with the increasing Allee parameter $\theta$ which is compatible with trends
from a single patch. It was also clearly evident that coupling induces chaotic
behavior in the system. Further, interspersed in the chaotic regimes one finds
periodic windows that arise from interior crisis in certain ranges of coupling
strengths. The notable difference stemming from the Allee effect is that there
is chaos for low coupling strengths, including the case of $C=0$ (i.e. the
uncoupled case) for finite $\theta$, while weakly coupled patches with no
Allee effect exhibit regular dynamics.

Most importantly, we observe that for large enough coupling strengths and
Allee parameters all population densities exhibit non-zero probability of
yielding extreme events. In general, the predators have the largest propensity
for extreme events in coupled patches, and the vegetation population densities
exhibit the least number of extreme occurrences. Further, the emergence of
extreme events in the predator population is not affected much by either the
coupling strength or the Allee effect. For prey populations, in the absence of
the Allee effect there are no extreme events for low coupling strengths, but
there is a sharp increase in extreme events after a critical value of coupling
strength. For the vegetation population a small finite probability of extreme
events emerges for strong enough coupling, only in the presence of Allee
effect.

Lastly we consider the influence of additive noise on extreme events. First,
we find that noise tames the unbounded vegetation growth induced by the
coupling and Allee effect. More interestingly, we demonstrate that
stochasticity drastically diminishes the probability of extreme events in all
three populations in the coupled atches. In fact for sufficiently high noise,
we do not observe any more extreme events in the system. This indicates that
noise can mitigate extreme events, and has potentially important impact on the
observability of extreme events in naturally occurring systems.

## Acknowledgement

This paper is in honor of Somdatta Sinha, who continues to inspire us to use
mathematical formalisms to understand wide-ranging problems arising in
biological contexts.

## References

  * [1] S. Albeverio, V. Jentsch, and H. Kantz.  Extreme events in nature and society.  Springer Science & Business Media, 2006.
  * [2] G. Ansmann, R. Karnatak, K. Lehnertz, and U. Feudel.  Extreme events in excitable systems and mechanisms of their generation.  Physical Review E, 88(5):052911, 2013.
  * [3] V. Balakrishnan, C. Nicolis, and G. Nicolis.  Extreme value distributions in chaotic dynamics.  Journal of Statistical Physics, 80(1-2):307–336, 1995.
  * [4] B. Blasius, A. Huppert, and L. Stone.  Complex dynamics and phase synchronization in spatially extended ecological systems.  Nature, 399(6734):354–359, 1999.
  * [5] F. Courchamp, L. Berec, and J. Gascoigne.  Allee effects in ecology and conservation.  Oxford University Press, 2008.
  * [6] B. Dennis.  Allee effects: population growth, critical density, and the chance of extinction.  Natural Resource Modeling, 3(4):481–538, 1989.
  * [7] K. Dysthe, H. E. Krogstad, and P. Müller.  Oceanic rogue waves.  Annu. Rev. Fluid Mech., 40:287–310, 2008.
  * [8] R. Karnatak, G. Ansmann, U. Feudel, and K. Lehnertz.  Route to extreme events in excitable systems.  Physical Review E, 90(2):022917, 2014.
  * [9] S. L. Kingston, K. Thamilmaran, P. Pal, U. Feudel, and S. K. Dana.  Extreme events in the forced liénard system.  Physical Review E, 96(5):052204, 2017.
  * [10] R. Kinney, P. Crucitti, R. Albert, and V. Latora.  Modeling cascading failures in the north american power grid.  The European Physical Journal B-Condensed Matter and Complex Systems, 46(1):101–107, 2005.
  * [11] V. Kishore, M. Santhanam, and R. Amritkar.  Extreme events on complex networks.  Physical review letters, 106(18):188701, 2011.
  * [12] F. Lillo and R. N. Mantegna.  Power-law relaxation in a complex system: Omori law after a financial market crash.  Physical Review E, 68(1):016119, 2003.
  * [13] J. Lubchenco and T. R. Karl.  Extreme weather events.  Phys. Today, 65(3):31, 2012.
  * [14] S. N. Majumdar and R. M. Ziff.  Universal record statistics of random walks and lévy flights.  Physical review letters, 101(5):050601, 2008.
  * [15] P. Moitra and S. Sinha.  Emergence of extreme events in networks of parametrically coupled chaotic populations.  Chaos: An Interdisciplinary Journal of Nonlinear Science, 29(2):023131, 2019.
  * [16] D. Sen, S. Ghorai, S. Sharma, and M. Banerjee.  Allee effect in prey’s growth reduces the dynamical complexity in prey-predator model with generalist predator.  Applied Mathematical Modelling, 91:768–790, 2021.
  * [17] D. Sen and S. Sinha.  Enhancement of extreme events through the allee effect and its mitigation through noise in a three species system.  revision under review in Scientific Reports, arXiv: http://arxiv.org/abs/2109.05753, 2021.
  * [18] D. R. Solli, C. Ropers, P. Koonath, and B. Jalali.  Optical rogue waves.  Nature, 450(7172):1054–1057, 2007.
  * [19] S. Strogatz.  How the blackout came to life.  The New York Times, 2003.