Submitted:
27 November 2026
Posted:
01 December 2026
You are already at the latest version
Abstract
Detection of suspicious login attempts is critical for securing the information system from any unauthorised access. Nevertheless, the problem of separating suspicious login attempts from normal user behaviour remains open. In this study, we discuss the approaches of applying the authentication logs for detecting suspicious login attempts and comparing three approaches: Rule-Based Detection, Random Forest, and Isolation Forest. For this purpose, an experiment on a synthetic data set consisting of 48,711 authentication-related events was performed. The data was split chronologically into 80% for training and 20% for testing. The methods were compared by means of accuracy, precision, recall, and F1-score metrics. Isolation Forest demonstrated the highest accuracy of 86.40%, whereas Rule-Based Detection demonstrated the highest recall of 26.39% and F1-score of 11.45%. However, all three approaches demonstrated the low capability of detecting suspicious events. The results obtained demonstrate that accuracy cannot serve as the only criteria for the evaluation of performance of the detection. Class imbalance, the use of synthetic data, and limited behavioural features may affect detection performance.
Keywords:
suspicious login detection
; log analysis
; machine learning
; random forest
; isolation forest
; anomaly detection
1. Introduction
1.1. Background
We all log in to our emails, university websites, and other online accounts using passwords. However, passwords do not always guarantee that an account is secure. Attackers may steal passwords or try different combinations to gain access to an account.
A user enters the wrong password five times within a few minutes. This could be a sign of someone trying to guess the password, but it could also be a normal user who has forgotten it. Authentication logs record these attempts and allow us to examine when they happened and where they came from [1,2].
The problem becomes harder when an attacker already knows the password. They may log in successfully on the first attempt, leaving no repeated failures to detect. For this reason, looking only at failed login attempts is not enough to decide whether a login is suspicious.
1.2. Research Problem
The biggest problem is that it is not always easy to tell if a login is safe or suspicious. For example, a hacker may have the correct password and log in without any problems. At the same time, a real user could log in from a new device or location, and the system could think it is an attack.
If the system does not notice a real attack, someone may get access to another person’s account. But if it gives too many false warnings, normal users may have problems logging in.
Another difficulty is that researchers test their methods using different datasets and testing methods. Because of this, it is hard to compare their results and decide which approach works better [3,4]. This paper looks at what different detection methods can identify and where they may have problems.
1.3. Research Questions
To understand this problem better, I will look at four main questions:
- How can authentication logs help identify suspicious login attempts?
- Which machine learning and anomaly detection methods are used to detect suspicious logins?
- What are the main weaknesses of existing detection methods?
- How do different detection methods compare in terms of detecting suspicious activity and reducing false alarms?
1.4. Research Objectives
The primary goal of this research is to investigate whether authentication logs could be used for detection of any suspicious behavior. To discover existing detection techniques and their drawbacks, ten prior works were analyzed.
The experiments involve comparing three different detection techniques: Rule-Based Detection, Random Forest, and Isolation Forest. The methods were implemented using Python and tested on a synthetic dataset with 48,711 authentication events.
The purpose of this study is to evaluate the effectiveness of each technique, define their advantages and drawbacks, and analyze the relation between event detection and false alarms.
2. Literature Review
Researchers have studied different methods of detecting suspicious login attempts. Some methods focus on failed login attempts, while others look at unusual login patterns or changes in user behavior. These methods include log analysis, machine learning, behavioral analysis, graph-based detection, and risk-based authentication. Each method has its own advantages and limitations.
2.1. Scope and Organization of the Review
In the following, I have selected 10 papers looking at different methods for detecting suspicious behaviour during login. Some papers look at detecting brute force attacks, whilst others involve using machine learning to detect anomalies within a user’s login activity. Papers have been included looking at graph-based detection and risk-based authentication. The papers have been selected due to them being related to my research questions and looking at different methods for detecting suspicious login activity. This however does not mean it is an exhaustive list and there may be more relevant papers. When looking at these papers I have considered three areas regarding detection, investigation and response. Detection looks to find any potential suspicious activity including brute force attacks or logins from unknown devices. Investigation looks to understand if this suspicious activity could be an attack. Response looks to determine what actions to take once a potential threat has been detected. These areas can overlap but are separate. A method for detecting anomalies may not provide any insight into why they are anomalies or what actions to take. Below I will discuss how much information each method uses, how they have been assessed and the key limitations.
2.2. Log Analysis and Brute-Force Detection
2.2.1. Interpreting Authentication Events
Authentication logs can prove useful. Patterns can be picked up in the logs to find potential attacks. Frequent failed logins on an account can indicate a brute-force attack. Attempting to log in using the same IP address across many accounts can show signs of password spraying. There may not necessarily be an attack taking place. If ten failed attempts occur within a few minutes, this could appear to be more suspicious compared to ten attempts over the course of several weeks. However, attackers will often space out their attempts to prevent them from being detected. Also multiple users may be using the same public IP address. This can cause issues as it can be hard to tell if multiple users are attempting to access the system or just one user. Timestamps can also be incorrect, making it difficult to know the sequence of events. Khandait et al. [1] looked at SSH authentication logs and found repetitive patterns in attacks such as common usernames. This helps to find potential attacks as there are repetitive events in the log. They included network traffic information, so this might not be applicable to just having authentication logs. This shouldn’t be the only thing being considered to detect attacks, as real users may enter wrong passwords.
2.3. Machine Learning and Anomaly Detection
2.3.1. Features, Labels, and Model Scope
There are many factors to consider when deciding what machine learning model to use. Some techniques look at each login event, which can help identify anomalous behavior. Other techniques look at a range of login events to help identify patterns of guessing passwords. As these two techniques are looking for different patterns, comparing accuracy between them without taking into account the task and data they are being used on could be misleading.
The type of information the model is using can also affect the type of model. Authentication data could include information such as failed logins, login times, IP addresses, and devices. In supervised learning, models are trained using labeled data such as normal or suspicious login activity. Unsupervised learning can identify anomalous patterns without the need for labeled data. However, this does not always mean there has been an attack.
Abbas et al. [5] compared the Support Vector Machine (SVM) and Gaussian Naive Bayes (GNB) models to detect brute force login attempts. They also looked at the effect of Principal Component Analysis (PCA). Zhang [6] compared the Random Forest, SVM, and Neural Network models to detect anomalous login activity. These studies show that different machine learning techniques can be used to detect suspicious login activity. However, these results should not be directly compared as they use different data and evaluation.
An important consideration when preparing data for machine learning is data leakage. This is when information that should not be known by the model is used. For example, if the system is to detect suspicious activity in real time it should not know information about future login events. Otherwise, the model may perform well during testing but less effectively in real situations.
Another problem is how the training and test data are separated. If very similar login events or events from the same attack appear in both datasets, the results may be too optimistic. This is not necessarily a problem with the machine learning algorithm itself, but it can affect how reliable the evaluation is. For this reason, it is important to separate the data carefully and explain how the model is tested.
Machine learning can use different features to identify suspicious login activity, such as the number of failed attempts, login frequency, unfamiliar IP addresses, and changes in devices. The quality of authentication data is important. Missing or incorrect information may reduce the model’s ability to identify suspicious activity.
These issues are important for the present study because the experiment uses authentication-related features to detect suspicious activity. The data is divided chronologically to evaluate detection performance on more recent events.
2.3.2. Supervised Classification
In the study by Abbas et al. [5], using Principal Component Analysis (PCA) improved the accuracy of Gaussian Naive Bayes (GNB), but slightly reduced the accuracy of Support Vector Machine (SVM). The accuracy of SVM decreased from 97.24% to 96.55%, while GNB increased from 87.93% to 91.03%. Despite this, SVM still performed better than GNB in both tests.
According to Zhang [6], Random Forest achieved an accuracy of 94.7%, while an SVM model had a false positive rate of 2.1%. However, these results should not be directly compared with those of Abbas et al. [5], because the studies used different datasets and evaluation methods.
A limitation of supervised learning is that its performance depends on the examples used during training. If the dataset mainly contains password guessing attacks, the model may have difficulty detecting other types of suspicious activity, such as an attacker logging in with a stolen password. The results also depend on the quality of the training data and how the models are evaluated.
2.3.3. Unsupervised Detection
When there are limited examples of attacks, it can be challenging to identify suspicious login events. Using unsupervised machine learning can help identify any anomalies within the authentication data. Mykhaylova et al. [7] looked into using the Isolation Forest algorithm to detect suspicious authentication. The Isolation Forest algorithm detects anomalies by identifying any observations that deviate from the norm. This may help identify any anomalies within the login events that traditional rules may not pick up. This may not necessarily be an attack. The user may have logged in from a different location or entered the wrong password multiple times. If the attacker is acting similarly to a typical user, then it can be hard to identify. This demonstrates the limitations of using anomaly detection. Whilst using unsupervised methods can help identify any anomalies, careful consideration should be given to the results to understand how often attacks are identified and how many false alerts are generated.
2.4. Behavioral, Graph-Based, and Risk-Based Methods
2.4.1. Context and Operational Interpretation
Sometimes there will be changes to your login patterns. For example, if an employee goes on night shifts, then they will get warnings about their login times as they have previously been logged in during the day mostly. Shared computers and public IP addresses can also make suspicious activity harder to identify, since several people may use the same network. An IP address alone cannot always show who is logging in or where the person is physically located.
Graph-based methods can help identify connections between users, computers, and login events. However, their results depend on how these connections are represented. An unusual connection may indicate suspicious activity, but it does not necessarily mean that an attack has happened. Additional information may be needed before deciding whether an account has been compromised.
2.4.2. Behavioral Baselines
Behavioral-based detection uses a user’s past login patterns to detect any anomalous behavior. It uses a user-specific approach to detect anomalies. For example, an employee may have a regular pattern of logging in from a certain IP address or computer. Whereas for another employee, this may be an anomaly.
This could help to detect attacks where there are no multiple failed login attempts. If an attacker has gained access to a password, they may be able to successfully log in, but this may be an anomaly compared to their past login attempts. The problem with this approach is that there must be enough data on past login attempts to understand what is a typical pattern. This can cause false alerts if there are changes in a user’s typical behavior.
Siadati and Memon [2] looked at user-computer relationships using their Network Login Structure method. This was able to detect anomalies in login attempts. They evaluated their method using simulated attacks and were able to detect 82% of attacks with a low false positive rate of 0.3%. However, this was based on the conditions of their study and may vary in other environments.
Zhao et al. [8] looked at detecting anomalies in email account logins. They used changes in login patterns to detect any anomalies. This could include anomalies such as unusual time zones or network subnets the user has not logged in from before. This can help to detect any anomalies without relying on multiple failed login attempts.
Both studies use past login attempts but Siadati and Memon [2] look at user-computer relationships, whereas Zhao et al. [8] look at unusual patterns in email account activity. This could help to detect attacks where someone has gained access to a password but could also cause alerts if there are legitimate changes in user behavior.
2.4.3. Datasets and Graph-Based Investigation
Landauer et al. [3] presented a dataset of over 5 years of log data from over 5000 users, including simulated attacks on their accounts. This can be used by researchers to test detection methods for anomalies. However, the results gathered from these simulated attacks may not reflect accurately how well a system will work against real attacks. Amrouche et al. [9] looked at graph methods to analyze the relationships between login events. Using graph methods can help to look at the relationships between users, computers and anomalous events. This could help researchers to identify patterns in the data that are not easily identifiable from single login events. Each study looks at different aspects of securing logins. Landauer et al. [3] provide data to test detection methods, and Amrouche et al. [9] look to analyze the relationships in events. They can help to gain an understanding of anomalous login events. However, the quality of the data and how well the relationships have been represented can affect the results gained.
2.4.4. Risk-Based Authentication
Using risk-based authentication (RBA), information can be used to determine how risky a login attempt is. If it is found that a login is unusual, then the user may be asked to provide further verification. Wiefling et al. [10] looked into how risk thresholds and factors of importance can impact the RBA system. They collected data from 780 users over 1.8 years. Wiefling et al. [4] looked into a large dataset including 3.3 million users and 31.3 million login attempts. Their research looked into how to configure an RBA system, privacy issues and the impact of further verification on the user. One issue that can occur when using RBA is the choice of risk thresholds. If the thresholds are too low, then legitimate users may be asked for extra verification. If they are too high, then suspicious logins may not be checked. Frequent alerts can also make the login process less convenient. The studies show that RBA is not just about identifying unusual activity but also about when to ask for further verification. A useful system will take into account security and the user experience of legitimate users.
2.5. Critical Comparison and Research Gaps
2.5.1. Evaluation Criteria for Practical Use
When evaluating a login detection system, it is important to consider what happens when the system makes mistakes. If it misses a real attack, an attacker may continue using a compromised account without being detected. However, false alarms can also cause problems. Legitimate users may receive unnecessary security warnings, while security teams spend time investigating normal activity.
Accuracy alone is not enough to evaluate a detection system. Two important measures are precision and recall. Precision shows how many login attempts flagged as suspicious were actually attacks. Recall shows how many real attacks the system successfully detected. A system may have high accuracy but still perform poorly at detecting attacks, especially when most login attempts in the dataset are normal.
The number of false alarms is also important. For example, even a low false-positive rate can produce many unnecessary alerts when a system processes a large number of legitimate logins. This is why evaluation should consider how common attacks are in the dataset, how suspicious activity is identified, and what conditions trigger an alert.
Detection speed can also affect how useful a system is. An alert that arrives too late may not help prevent an attack. Detecting suspicious activity earlier may sometimes lead to more false warnings. This creates a trade-off between detecting attacks quickly and avoiding unnecessary alerts.
These evaluation criteria are important for the present study because the detection methods are evaluated using accuracy, precision, recall, F1-score, and confusion matrices. These metrics help identify how well each method detects suspicious events and how often it incorrectly flags normal activity.
2.5.2. Comparability of Evaluation Results
The studies included in this paper differ in their aims, datasets, and testing techniques. Abbas et al. [5] and Zhang [6] tested machine learning models. Siadati and Memon [2] looked at unusual user-computer relationships. Amrouche et al. [9] looked at graph-based techniques to detect suspicious logins. As each study aims to do something different, they cannot be compared to see which method is the best.
The accuracy can also be misleading if there are very few attacks. For example, if there are 990 normal logins and 10 attacks in a dataset, a system that always says a login is normal will have a 99% accuracy. This shows that other factors should be considered, such as the number of attacks missed and false alerts. This can cause inconvenience for genuine users who receive frequent security alerts [4].
The studies also looked at different types of suspicious activity. Khandait et al. [1] looked at attack patterns within SSH authentication data. Siadati and Memon [2] and Zhao et al. [8] looked at unusual login relationships and behavior changes. This means they may detect different types of attacks. For example, multiple failed logins could indicate someone is guessing passwords. Unusual successful logins could indicate that someone has used a stolen password.
However, neither method is perfect. Legitimate users may enter the wrong password multiple times, have different working hours, or log in from an unknown network. Combining different login patterns may help to provide more information about suspicious activity but cannot guarantee that all attacks will be detected.
2.5.3. Unresolved Challenges and Research Direction
The studies reviewed in this paper show that detecting suspicious logins is a challenging task. Different approaches are used to detect different types of suspicious activity. There are challenges in obtaining realistic data to use for authentication. Often, login data may be sensitive, meaning companies may not be able to provide this data. Data sets such as the one provided by Landauer et al. [3] can help researchers by providing data to test their detection methods. The results of the simulated attacks may not reflect a real scenario. It is important to consider how the data is split into training and test sets. If events within the same attack are highly similar, then the model may give overly optimistic accuracy scores. To help create a realistic scenario, the data can be split by time. However, further validation is required to ensure there is no data leakage. Finally, normal login patterns will change over time. As an example, a user may begin working late at night or connect to a new network. This may cause the detection system to flag this as suspicious activity. Therefore, detection methods should be tested based on the number of attacks detected and also how many false alerts are raised. To examine these challenges, the present study compares Rule-Based Detection, Random Forest, and Isolation Forest using the same synthetic dataset and evaluation metrics. This comparison helps identify the limitations of each method in detecting suspicious events and reducing false alarms.
3. Methodology
3.1. Research Design
This study compares three methods for detecting suspicious authentication-related events: Rule-Based Detection, Random Forest, and Isolation Forest. The primary goal of this paper is to analyse these three methods and compare their performance in detecting suspicious activity from authentication logs. The experiment was conducted in Google Colab using Python. The pandas library was used for data preparation and organisation, while scikit-learn was used to train the machine learning models and calculate the evaluation metrics. The matplotlib library was used to visualise the results.
3.2. Dataset Description
The experiment utilized the FinnGen Synthetic Login Activity Dataset (FSLAD-2025) [11]. The CSV file used in this study contained 48,711 records and 15 columns. These records describe various authentication-based activities such as successful and unsuccessful logins, authentication challenges, and actions related to accounts. In addition, the dataset features the time stamps, login methods, information about the use of second-factor authentication, and anonymized identifiers.
The column is_suspicious served as the target variable. Out of 48,711 records, 3,595 (7.38%) records were marked as suspicious, while the other 45,116 (92.62%) were marked as non-suspicious records. The importance of the discrepancy is that one can build a rather accurate model by predicting the majority class and missing the suspicious events.
The dataset consists of synthetic records, not verified attacks collected from an actual company. According to the dataset documentation, the synthetic records were generated from anonymized FinnGen login-event summaries using Python. The dataset is publicly available under the Creative Commons Zero (CC0 1.0) license [11].
3.3. Data Preprocessing
Prior to constructing the model, the data was screened for presence of missing values and duplicates. There were no missing values or fully duplicated records so that there was no need for removing records due to those issues.
The login_timestamp attribute was converted to datetime. Based on this information, two more attributes were extracted: hour of the event and day of the week. In addition, binary attributes were defined to determine success and failure of login events.
Some attributes had string values that cannot be applied directly for modeling purposes since they should have numeric type. Those attributes were encoded using one-hot encoding in order to obtain the corresponding numeric features.
Records were sorted according to the timestamp and divided into two parts. 80% (38,968 records) of the data was used for training. 20% (9,743 records) was left to serve as the test set. This approach based on chronology of data was used to make sure that the model is evaluated on more recent events and not on randomly mixed ones.
3.4. Detection Methods
3.4.1. Rule-Based Detection
In the first method, a limited number of predefined rules are applied to detect suspicious actions. The difference is that the machine learning algorithms learn patterns of activities based on the training data set. In contrast, all events are compared with the conditions that are chosen prior to analysis.
Three different conditions were defined in the experiment. The first one checks if an event has taken place between 00:00 and 05:59. The second condition looks for authentication challenges that finished with the wrong answer, user denial, error, or quota exhaustion. The third condition searches for failed logins with no second factor authentication.
An event was considered to be suspicious if at least one of the three conditions was met. For instance, the third condition would be satisfied by a failed login even in the daytime, when it had no second-factor authentication.
Such rules can be used as a baseline for comparison. It should be noted that they cannot prove that suspicious events are actual attacks since any abnormal login activity may be caused by other factors.
3.4.2. Random Forest
The second method utilized the Random Forest machine learning technique that is an ensemble-based supervised learning algorithm that combines the predictions of multiple decision trees.
Unlike the first technique, which is rule-based, this model learns the relationship between the features and suspicious event labels in the dataset.
The classifier model was set to use 100 decision trees with a random seed set to 42. Balanced class weights were used during model training since suspicious events comprised only a fraction of the total entries.
The features used include login hour, day of the week, second factor, success/failure flag for login, system name, login type, authentication challenge type, and challenge status.
After training using 38,968 records, the model was then evaluated against the test subset.
3.4.3. Isolation Forest
The third method involves Isolation Forest, which is an anomaly detection method that identifies observations differing from typical data patterns. Unlike the Random Forest model, it does not need any labels for suspicious events when fitting.
The model has 100 estimators and random_state value of 42. The contamination value was set to 0.073 based on the approximate proportion of suspicious events in the training dataset.
As in the case of the Random Forest model, Isolation Forest received the same input features. Then it classified each testing observation as a normal or anomalous one. Predictions made by Isolation Forest were transformed into binary values and compared with the labels for suspicious events.
Such an approach makes it possible to conduct the experiment in terms of whether there are any anomalies, i.e., unusual feature combinations in the dataset that correspond to suspicious events. However, an anomaly does not mean a threat.
3.5. Evaluation Metrics
All three approaches have been assessed using Accuracy, Precision, Recall, F1-Score and Confusion Matrices.
Accuracy calculates the ratio of all events that were classified correctly. Precision represents the proportion of events classified as suspicious that were actually suspicious. Recall indicates the proportion of suspicious events that were actually detected.
The F1-Score combines Precision and Recall in a single figure. It is especially helpful in the case when the dataset has significantly less suspicious events compared to normal events.
Confusion Matrices have also been used to assess correct detections, false alarms and undetected suspicious events.
3.6. Methodological Limitations
Several limitations can be identified in this experiment. The first one refers to the use of synthetic data set. While the data set includes various kinds of authentication-related events, it does not reflect the complexity of real organizational networks completely.
The second limitation refers to the way of representing user behavior. Each anonymized user identifier occurs only once within the dataset. and it is impossible to create login histories for each user. Thus, the experiment relies on analyzing features of events instead of the dynamics of user behavior.
Additionally, the dataset includes events like logouts or modifications of accounts. Therefore, the experiment analyzes suspicious authentication-related events rather than login attempts alone.
Finally, models were tested by using the baseline settings without conducting additional parameter tuning and experiments on real dataset. In this case, the experiment provides an initial comparison between detection techniques rather than comprehensive evaluation of their performance in operational security systems.
4. Results
This section presents the results of the three detection methods: Rule-Based Detection, Random Forest, and Isolation Forest. All methods were evaluated on the same test dataset of 9,743 authentication-related events. The test dataset contained 8,985 normal events and 758 suspicious events, representing 92.22% and 7.78% of the test data, respectively.
4.1. Performance Comparison
The three methods were evaluated using accuracy, precision, recall, and F1-score. Table 1 presents the results.
Isolation Forest achieved the highest accuracy of 86.40% and the highest precision of 7.62%. Rule-Based Detection achieved the highest recall of 26.39% and F1-score of 11.45%. Random Forest achieved an accuracy of 80.92%, but its recall and F1-score remained low.
Figure 1 compares the three methods using precision, recall, and F1-score.
The figure shows a clear difference in recall between Rule-Based Detection and the two machine learning models. Precision remained below 8% for all three methods, while none achieved an F1-score above 12%.
4.2. Confusion Matrix Analysis
Table 2 presents the confusion matrix results for each method. These include true negatives (TN), false positives (FP), false negatives (FN), and true positives (TP).
Rule-Based Detection correctly identified 200 of the 758 suspicious events and missed 558. It also produced 2,535 false alarms, the highest number among the three methods.
Random Forest detected 74 suspicious events, missed 684, and produced 1,175 false alarms.
Isolation Forest detected 51 suspicious events and missed 707. It produced 618 false alarms, the lowest number among the evaluated methods.
Overall, Rule-Based Detection identified the most suspicious events, while Isolation Forest produced the fewest false alarms. None of the three methods achieved both high recall and a low number of false alarms.
5. Discussion
5.1. Interpretation of Results
However, from the obtained results, it is clear that none of the three approaches managed to detect suspicious events effectively. All three approaches had their own strengths and weaknesses.
The approach of Rule-Based Detection was the one with the best recall rate and F1-score. More suspicious events were found using it compared to the other two approaches, but this approach also classified many normal events as suspicious. The Random Forest algorithm was more accurate than the Rule-Based Detection but had lower sensitivity to suspicious events. Despite the model’s use of labeled data for training and balancing of class weights, the recall rate was low, suggesting that the selected features may not contain enough information about suspicious events. Isolation forest had the lowest number of false alarms and the best accuracy among all three methods. However, most suspicious activities were not detected. It implies that abnormal activity found by the method did not necessarily coincide with suspicious activity.
Class imbalance should be taken into consideration when evaluating the above findings. Only 7.78% of all test events were labelled as suspicious ones. Hence, the method which marks all events as normal ones can achieve 92.22% accuracy. This accuracy is higher than that of all three evaluated methods. This shows that accuracy alone cannot be used to evaluate suspicious activity detection. Precision, recall, and F1-score offer more insight into the detection.
5.2. Comparison with Previous Studies
Mykhaylova et al. [7] explored the use of Isolation Forest for detecting brute-force attacks. Their study highlighted the importance of anomaly thresholds and the difficulties associated with imbalanced datasets. These concerns are relevant to the present experiment, where Isolation Forest achieved low recall despite having the highest accuracy among the evaluated methods.
Siadati and Memon [2] used network login patterns to identify structurally anomalous authentication activity. Their approach considered relationships within an enterprise network rather than examining individual events alone. In contrast, the present study focused on event-level features because the dataset did not provide repeated login histories for individual users.
Amrouche et al. [9] applied a graph-based approach to investigate malicious authentication events and their relationships. Their work highlights the value of contextual information when analysing suspicious activity.
Together, these studies suggest that individual event characteristics may not be sufficient for reliable detection. However, direct performance comparisons are limited because the studies used different datasets, features, detection methods, and evaluation settings.
5.3. Practical Implications
While using the system of security monitoring, omission of suspicious cases may lead to ignoring potential threat. On the other hand, high number of false alarms will increase workload of security analysts.
The analysis shows that there is a trade-off. Rule-Based Detection found a higher number of suspicious events, but it produced 2,535 false alarms. Isolation Forest lowered the number of false alarms to 618, however, it was able to detect only 51 out of 758 suspicious events.
Neither of two approaches achieved a satisfactory balance between detection of suspicious activity and false alarms. Therefore, the results should be seen as preliminary comparison.
5.4. Limitations and Future Work
However, the primary limitation of the research is that the dataset was artificial. Artificial authentication events may not completely reflect authentic user behavior and malicious patterns.
Moreover, in the dataset, there was one instance of each user identifier. Consequently, it was not possible to analyze the history and change in user behavior over time.
Additionally, the dataset contained authentication events besides the login events. Thus, the results apply to suspicious authentication-related events more broadly. The models were tested using fixed parameter settings without much parameter tuning. The presence of different features, model parameters, and detection thresholds might influence the results.
Future studies may consider using real authentication logs and include information about historical user behavior as well as test some other behavioral features. Model parameters and detection thresholds might also be tuned using a separate validation dataset.
The combination of rule-based detection and machine learning might be another promising avenue of research. It should be checked whether it is possible to increase detection rates while reducing the number of false positives.
6. Conclusions
In this paper, we considered the use of authentication logs to identify any suspicious activity on login attempts. Previous literature was considered, and three different methods for detection have been tested: Rule-Based Detection, Random Forest, and Isolation Forest.
In the experiment, a synthetic dataset of 48,711 authentication-related events was used. The results show that different methods have their own advantages and disadvantages.
Rule-Based Detection provided the highest recall of 26.39% and F1-score of 11.45%, while generating the largest number of false positives. Isolation Forest generated the highest accuracy of 86.40%, while providing the smallest number of false positives. However, it did not detect most of the suspicious events. It can be seen from the results that authentication log information may be helpful in recognizing suspicious actions, but single characteristics of events might not be sufficient for successful detection. Furthermore, it is possible to state that high accuracy does not automatically indicate effective detection performance, especially when suspicious events are rare in the data set.
None of the three detection methods has shown good results in terms of a compromise between the detection of suspicious events and the decrease of false positives. Further research should focus on real authentication logs and historical user behavior, as well as on a combination of different approaches for detection.
To conclude, accurate detection of suspicious logins implies a number of aspects including proper features, appropriate evaluation criteria, and tests in a real setting.
Supplementary Materials
The supplementary information can be downloaded at the website of this paper posted on Preprints.org
Data Availability Statement
The FinnGen Synthetic Login Activity Dataset (FSLAD-2025) used in this study is publicly available under the CC0 1.0 license on Zenodo at https://doi.org/10.5281/zenodo.17858129. The CSV file used in the experiment was obtained from the GitHub repository at https://github.com/school-of-software/finngen-synthetic-login-dataset. The Python code used for data preprocessing, model implementation, evaluation, and visualisation is available in the Google Colab notebook at https://colab.research.google.com/drive/1kE1B6kQg5lrOImmG8235X1MzmlTj8e25?usp=sharing.
References
- Khandait, P.; Tiwari, N.; Hubballi, N. Who is trying to compromise your SSH server? An analysis of authentication logs and detection of bruteforce attacks. In Proceedings of the Adjunct Proceedings of the International Conference on Distributed Computing and Networking, 2021. [Google Scholar]
- Siadati, H.; Memon, N. Detecting structurally anomalous logins within enterprise networks. In Proceedings of the Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, 2017. [Google Scholar]
- Landauer, M.; Skopik, F.; Höld, G.; Wurzenberger, M. A user and entity behavior analytics log data set for anomaly detection in cloud computing. In Proceedings of the 2022 IEEE International Conference on Big Data, 2022. [Google Scholar]
- Wiefling, S.; Jørgensen, P.R.; Thunem, S.; Lo Iacono, L. Pump up password security! Evaluating and enhancing risk-based authentication on a real-world large-scale online service. ACM Trans. Priv. Secur. 2022, 26. [Google Scholar] [CrossRef]
- Abbas, Z.; Hussain, S.A.; Ahmad, B.; Usman, M.; Ali, M.; Ouariach, F.Z.; Ouariach, S. Detection of brute-force login attempts using machine learning. Iraqi J. Inf. Commun. Technol. 2026, 9. [Google Scholar] [CrossRef]
- Zhang, J. Performance evaluation and comparison of machine learning algorithms for anomalous login behavior detection in enterprise networks. J. Artif. Intell. Rev. 2024. [Google Scholar]
- Mykhaylova, O.; Shtypka, A.; Fedynyshyn, T. An Isolation Forest-based approach for brute force attack detection. In Proceedings of the CEUR Workshop Proceedings, 2024; Vol. 3842. [Google Scholar]
- Zhao, J.; Yang, C.; Wu, D.; Cao, Y.; Liu, Y.; Cui, X.; Liu, Q. Detecting compromised email accounts via login behavior characterization. Cybersecurity 2023, 6, 36. [Google Scholar] [CrossRef]
- Amrouche, F.; Lagraa, S.; Kaiafas, G.; State, R. Graph-based malicious login events investigation. In Proceedings of the 16th IFIP/IEEE Symposium on Integrated Network and Service Management (IM 2019), 2019. [Google Scholar]
- Wiefling, S.; Dürmuth, M.; Lo Iacono, L. What’s in score for website users: A data-driven long-term study on risk-based authentication characteristics. In Proceedings of the Financial Cryptography and Data Security, 2021. [Google Scholar]
- Dada, O.A.; Wang, T.; Sipilä, T.P. FinnGen Synthetic Login Activity Dataset (FSLAD-2025). 2025. [Google Scholar] [CrossRef]
Figure 1.
Comparison of detection methods based on precision, recall, and F1-score.

Table 1.
Performance comparison of detection methods.
| Method | Accuracy | Precision | Recall | F1-score |
| Rule-Based | 68.25% | 7.31% | 26.39% | 11.45% |
| Random Forest | 80.92% | 5.92% | 9.76% | 7.37% |
| Isolation Forest | 86.40% | 7.62% | 6.73% | 7.15% |
Table 2.
Confusion matrix results for the three methods.
| Method | TN | FP | FN | TP |
| Rule-Based | 6,450 | 2,535 | 558 | 200 |
| Random Forest | 7,810 | 1,175 | 684 | 74 |
| Isolation Forest | 8,367 | 618 | 707 | 51 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.