scieee AI-readable full text Open interactive document viewer

Machine Learning applied to fault correlation

Lima, Pedro Jorge Rito

Abstract

Over the last years, one of the areas that have most evolved and extended its application to a multitude of possi bilities is Artificial Intelligence (AI). With the increasing complexity of the problems to be solved, human resolution becomes impossible, as the amount of information and patterns that can be detected is limited, while AI thrives on the dimension of the problem under analysis. Furthermore, as nowadays more and more traditional devices are computerized, an increasing number of elements are producing data that has many potential applications. Consequently, we find ourselves at the height of Big Data, where huge volumes of data are generated, being entirely unfeasible to process and analyze them manually. Additionally, with the increasing complexity of network topologies, it is necessary to ensure the correct func tioning of all equipment, avoiding cascade failures among devices, which can lead to catastrophic consequences depending on their use. Thus, Root Cause Analysis (RCA) tools become fundamental since these are developed to automatically, through rules established by its users, realize the underlying causes when some equipment mal functions. However, with the growing network complexity, the definition of rules becomes exponentially more complicated as the possible points of failure scale drastically. In this context, framed by the Altice Labs RCA and network environment use case, the main objective of this research project is defined. The aim is to use Machine Learning (ML) techniques to extrapolate the relationship between different types of equipment alarms, gathered by the Alarm Manager tool, to have a better understanding of the impact of a failure on the entire system, thus easing and helping the process of manual implementation of RCA rules. As this tool manages millions of daily alarms, it becomes unfeasible to process them manually, making the application of ML essential. Furthermore, ML algorithms have tremendous capabilities to detect patterns that humans could not, ideally exposing which specific failure causes a series of malfunctions, thus allowing system administrators to only focus their attention on the source problem instead of the multiple consequences. The ML approach proposed in this project is based on the causality among alarms, instead of their features, and uses the cartesian product of a specific problem, the involved technology, and the manufacturer, to extrap olate the correlations among faults. The results achieved reveal the tremendous potential of this approach and open the road to automatizing the definition of RCA rules, which represents a new vision on how to manage network failures efficiently.

Full text

Universidade do Minho Escola de Engenharia Departamento de Informática Pedro Jorge Rito Lima Machine Learning applied to Fault Correlation October 2021 Universidade do Minho Escola de Engenharia Departamento de Informática Pedro Jorge Rito Lima Machine Learning applied to Fault Correlation Master dissertation Integrated Master’s in Informatics Engineering Dissertation supervised by Professor Rui Mendes: Universidade do Minho Engenheiro Carlos Guilherme Araújo: Altice Labs October 2021 COPYRIGHT AND TERMS OF USE FOR THIRD PARTY WORK This dissertation reports on academic work that can be used by third parties as long as the internationally accepted standards and good practices are respected concerning copyright and related rights. This work can thereafter be used under the terms established in the license below. Readers needing authorization conditions not provided for in the indicated licensing should contact the author through the RepositóriUM of the University of Minho. LICENSE GRANTED TO USERS OF THIS WORK: CC BY https://creativecommons.org/licenses/by/4.0/ ACKNOWLEDGEMENTS To my supervisors at industry and academy, Eng. Guilherme Araújo and Professor Rui Mendes, for their advice and guidance. I would also like to thank Guilherme for the numerous well-paced briefings, that allowed me to better understand Altice Labs’ tool and the project’s main challenges, and Professor Rui Mendes for the scientific suggestions to improve my work. To Altice Labs for including me on the team and providing me a scholarship for developing this project. In a more relaxed writing style: To my parents who supported and endured me during the most difficult times of this project and all previous ones. In particular, to Solange who, if I don’t give a direct thanks to, will disown me. In fact, she deserves it for guiding me in key academic and life decisions. To my grandmother, who was on the frontline of my education from a young age, and pushed me to never settle below greatness. I believe she would be proud of me, however, for sure she would point out things to improve, as always. To my friends who have always been by my side, providing memories of a lifetime, and without whom this dissertation would have been finished a month ago. To my sisters, always creating chaos that prevents me from being relaxed at home. Indirectly, they helped me by leaving me no choice but to isolate myself to finish the dissertation. Inês deserves a special bonus for encouraging me in pursuing AI research. Thank you all, and to myself, who did the hard work without ever losing much mental sanity. a STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. b ABSTRACT Over the last years, one of the areas that have most evolved and extended its application to a multitude of possibilities is Artificial Intelligence (AI). With the increasing complexity of the problems to be solved, human resolution becomes impossible, as the amount of information and patterns that can be detected is limited, while AI thrives on the dimension of the problem under analysis. Furthermore, as nowadays more and more traditional devices are computerized, an increasing number of elements are producing data that has many potential applications. Consequently, we find ourselves at the height of Big Data, where huge volumes of data are generated, being entirely unfeasible to process and analyze them manually. Additionally, with the increasing complexity of network topologies, it is necessary to ensure the correct functioning of all equipment, avoiding cascade failures among devices, which can lead to catastrophic consequences depending on their use. Thus, Root Cause Analysis (RCA) tools become fundamental since these are developed to automatically, through rules established by its users, realize the underlying causes when some equipment malfunctions. However, with the growing network complexity, the definition of rules becomes exponentially more complicated as the possible points of failure scale drastically. In this context, framed by the Altice Labs RCA and network environment use case, the main objective of this research project is defined. The aim is to use Machine Learning (ML) techniques to extrapolate the relationship between different types of equipment alarms, gathered by the Alarm Manager tool, to have a better understanding of the impact of a failure on the entire system, thus easing and helping the process of manual implementation of RCA rules. As this tool manages millions of daily alarms, it becomes unfeasible to process them manually, making the application of ML essential. Furthermore, ML algorithms have tremendous capabilities to detect patterns that humans could not, ideally exposing which specific failure causes a series of malfunctions, thus allowing system administrators to only focus their attention on the source problem instead of the multiple consequences. The ML approach proposed in this project is based on the causality among alarms, instead of their features, and uses the cartesian product of a specific problem, the involved technology, and the manufacturer, to extrapolate the correlations among faults. The results achieved reveal the tremendous potential of this approach and open the road to automatizing the definition of RCA rules, which represents a new vision on how to manage network failures efficiently. keywords Root Cause Analysis, Fault Correlation, Machine Learning, Artificial Intelligence, Network Topologies, Rules automation, Alarm Manager c RESUMO Ao longo dos últimos anos, uma das áreas que mais tem evoluído e estendido a sua utilização para uma infinidade de possibilidades é a Inteligência Artificial (IA). Com a crescente complexidade dos problemas, a resolução humana torna-se impossível, uma vez que a quantidade de informação e padrões que podem ser detectados é limitada, enquanto a IA prospera na dimensão do problema em análise. Além disso, como hoje em dia cada vez mais dispositivos tradicionais são informatizados, um número crescente de elementos está a produzir dados com muitas potenciais aplicações. Consequentemente, encontramo-nos no auge do Big Data, onde enormes volumes de dados são gerados, sendo totalmente inviável processá-los e analisá-los manualmente. Esta é uma das razões que tem levado à prosperidade da IA. Além disso, com a crescente complexidade das topologias de rede, é necessário assegurar o correcto funcionamento de todos os equipamentos, evitando falhas em cascata entre dispositivos, o que pode levar a consequências catastróficas dependendo da sua utilização. Assim, as ferramentas de Root Cause Analysis (RCA) tornam-se fundamentais, uma vez que são desenvolvidas para, através de regras estabelecidas pelos seus utilizadores, se aperceberem automaticamente das causas subjacentes quando algum equipamento apresenta anomalias. No entanto, com a crescente complexidade da rede, a definição de regras torna-se exponencialmente mais complicada, uma vez que os pontos possíveis de falha escalam tremendamente. Neste contexto, enquadrado pelo ambiente de rede e cenários de RCA da Altice Labs, foi definido o principal objectivo deste projecto de investigação. Este objectivo consiste na aplicação de técnicas de Machine Learning (ML) para extrapolar a relação entre os diferentes tipos de alarmes dos equipamentos, geridos pela ferramenta Alarm Manager, para ter uma melhor compreensão do impacto de uma falha em todo o sistema, facilitando e ajudando assim o processo de implementação manual das regras RCA. Como esta ferramenta gere milhões de alarmes diários, torna-se inviável processá-los manualmente, tornando essencial a aplicação do ML. Além disso, os algoritmos ML têm uma enorme capacidade para detectar padrões que os humanos não conseguem detectar, idealmente expondo quais as falhas específicas que causam uma série de falhas, permitindo assim que os administradores do sistema apenas concentrem a sua atenção no problema de raiz em vez das suas múltiplas consequências. A abordagem ML proposta neste projecto baseia-se na causalidade entre os alarmes, em vez das suas características, e utiliza o produto cartesiano de um problema específico, da tecnologia envolvida, e do fabricante, para extrapolar as correlações entre falhas. Os resultados alcançados revelam o enorme potencial desta abordagem e abrem o caminho para automatizar a definição de regras RCA, o que representa uma nova visão sobre como gerir eficazmente as falhas da rede. palavras-chave Root Cause Analysis, Correlação entre Falhas, Aprendizagem Máquina, Inteligência Artificial, Topologias de Rede, Automatização de Regras, Gestão de Alarmes d CONTENTS 1INTRODUCTION 1 1.1 Motivation and Objectives 1 1.2 Dissertation Layout 2 2S TAT E O F T H E A R T 4 2.1 Background Concepts 4 2.1.1 Algorithmics 4 2.1.2 Metrics 9 2.2 Related Work 11 2.3 Summary 13 3ALARM MANAGER 14 3.1 Description 14 3.2 Functioning 14 3.3 Alarm Data 18 3.4 Data Balancing 19 3.5 Summary 20 4DATA P R O C E S S I N G 22 4.1 Dataset Import 22 4.2 Addition and Removal of Features 23 4.3 Dataset Purification 25 4.4 Summary 26 5P R O P O S E D M L A P P R OA C H E S 27 5.1 Cartesian Product: Specific Problem ×Device 28 5.1.1 Feature Engineering 28 5.1.2 Data Example 30 5.1.3 Discussion 31 5.2 Single Predictor: Specific Problem 33 5.2.1 Feature Engineering 33 5.2.2 Data Example 34 i contents ii 5.2.3 Discussion 37 5.3 Cartesian Product: Specific Problem ×Technology ×Subsystem 39 5.3.1 Feature Engineering 39 5.3.2 Data Example 39 5.3.3 Discussion 41 5.4 Summary 42 6RESULTS DISCUSSION 44 6.1 Hardware 44 6.2 Automation Process 46 6.3 Results 48 6.3.1 One Problem 48 6.3.2 One Zone 50 6.3.3 All Problems on All Zones 53 6.4 Summary 55 7CONCLUSIONS AND FUTURE WORK 56 7.1 Main Contributions 57 7.2 Future work 57 1.2. Dissertation Layout 3 sponding type. The perception of this tool is essential, as it addresses the constitution of each alarm instance, which is the main entity of the project. In chapter 4 - Data Processing - is explained how the dataset to be used during the project was created from the raw data provided by a TO. Additionally, it also mentions all the processing applied to the data in order to purify it, thus generating the final dataset for the application of ML techniques. In chapter 5 - Proposed ML Approaches - the primary approach used in the project and its sub-variants are explained in depth. These variants are worth mentioning as they were not a change of direction of the project but a refinement process to extrapolate as much helpful information as possible from the data provided. In chapter 6 - Results Discussion - all the results obtained during the most intensive phase of model testing are exposed in multiple degrees of granularity. In addition, the system used throughout the development stage is characterized, as it is a factor to be taken into consideration in ML and big data processing fields. The automation process developed, to obtain results for all unique problems and areas of the entire country, thus extrapolating as many relationships and patterns as possible, is also exposed. In chapter 7 - Conclusion and Future Workan analysis and retrospective of the objectives proposed in this project and its achievement are presented. Additionally, it is mentioned what contributions in the real world were accomplished and envisioned. Lastly, a debate on the possible improvements towards a robust, individual ML tool is provided. 2 S TAT E O F T H E A R T In order to ground the conceptual and practical decisions of this project, it is first necessary to study the main concepts and state of the art in the involved areas. Therefore, this chapter’s purpose is twofold: i) to identify and explain the crucial concepts used throughout the thesis; ii) to analyze state of the art techniques used on similar RCA problems. While the former allows to deepen and expose concepts essential to developing the project at hand, the latter serves to better understand how to tackle the problem and what solutions have already been implemented for similar scenarios. 2.1 BACKGROUND CONCEPTS Throughout this project, numerous tools, models, metrics, and methods related to the ML field were used. However, for a complete understanding of the dissertation, from the variety of techniques used to the testing phase applied, it is necessary to have certain core notions well established. Thus, several concepts will be explained in this section, from algorithms and ML models to their respective metrics, referred to and used throughout the thesis. 2.1.1 Algorithmics In the ML area, there is a wide range of possible learning algorithms to be used, so it is necessary to understand the problem in analysis and its data to identify better the optimal model for the use case. In total, there are six different types of machine learning algorithms [2]; however, two of these are variants of the four best known and worth of briefly highlighting: • Supervised learning: when the data of the problem under analysis has labels, i.e., it is known for a certain input given to an ML model what is the correct output, a supervised learning algorithm can be used. These labels work as a supervisor of the algorithm as through them the model can correct its learning phase if the labels’ predictions are wrong, based on the deviance (error) from its true label. In this way, the model optimizes itself to understand the data better and maximize the labels’ correctness. Within Supervised Learning, there are two different paths regarding the type of variable the model has to predict: 4 2.1. Background Concepts 5 –Continuous Target Variable: the output value expressed by the model is, as the name implies, a continuous variable [3]. It has a continuous spectrum of possible values that it can take, and there is a direct relationship between the different values. This algorithm is used for regression problems [4]; –Categorical Target Variable: the target variable is categorical [3], so, unlike continuous, it can take on one of a limited and usually fixed number of possible values. Any problem with labels and where it is desired to predict a categorical variable, i.e., a state, uses this learning algorithm. This algorithm is used for classification problems [5]. •Unsupervised Learning: Contrary to the previous algorithm, that is, when the data to be used by the model does not have labels, and the model does not know which output it should reach, we are faced with unsupervised learning. Thus, the algorithm must be able to aggregate information/data according to its characteristics and patterns to extract useful information. It can be used for clustering [6] or association [7] problems; •Semi-supervised learning: while in the previous algorithms the existence of labels was binary: either they existed, or they did not; this algorithm is used when there is an intermediate scenario: labels exist for some inputs, but not all, and the cost of labeling them all is too high. This is possible when the existing labels are categorical, where the success scenario of the algorithm depends on being able, through the existing labels, to identify the patterns of that group/state, thus aggregating the entries that have no inputs in their corresponding groups [8]; •Reinforcement Learning: this algorithm is quite different from the previous ones as the label concept does not apply. In this technique, a new concept arises, an actor will perform an action and have a respective reward depending on the chosen action [9]. This algorithm applies this action process continuously and learns according to its reward, aiming to maximize it. This continuous process is based on four simple steps: i) the agent observes the state of the input; ii) according to the received state it makes a decision, thus performing an action; iii) the agent receives a reward or reinforcement according to the action it previously took; iv) a pair (initial state, action performed ) on the received reward is stored. During this last step, the algorithm tries to extract knowledge about what just happened so that it can get an equal or better reward in a future similar input. 2.1. Background Concepts 6 Figure 1: Diagram of the four different types of machine learning algorithms (adapted from [10]) Considering the spectrum of ML algorithm types previously presented, illustrated in Figure 1, and the supervised learning task resulting from the approaches explained in Section 5, the present section also discusses the ML algorithm used to fulfill it. In this sense, the fundaments of Random Forests are further explored in this section, along with how the models’ features importance contribute to the analysis. Random Forests As an ensemble algorithm, to better understand random forests’ principles, it is pivotal to recognize its primary component: decision trees [11]. Random forests comprise a variable number of decision trees (hence being an ensemble algorithm) being the final result the weighted score amongst them (average value or majority voting). Decision Trees get their name from the tree-like format they use to make decisions [12]. Thus, they are composed of a root, the top node of the entire tree, multiple branches, intermediate nodes, and decisions, the last node/leaf. Its behavior is to distribute features of the dataset across the tree branches so an input can traverse the tree according to the values of its fields, reaching a leaf, i.e., the decision/prediction of the model [13]. To better understand its operation, a brief theoretical example of its workflow will be presented below. Thus, assuming the data shown in Figure 2as the base dataset for the problem, the implementation of this learning algorithm could lead, since from the same data, it is possible to generate an infinity of different trees, to the decision tree seen in Figure 3. 2.1. Background Concepts 7 Figure 2: Small sample dataset Figure 3: Decision tree generated from the small sample dataset As can be seen, all nodes except the leaves (nodes at the lowest level) represent variables of the dataset, and the path applied is relative to the value an input has for each field. That is, as an example, if entry number 5 of the dataset in Figure 2was used for testing, i.e., the model did not know the value of "Play", the path would be as follows: (i) the first feature under analysis is "weather", as for this entry, the value is "Rainy", the path used is the one on the far right. ii) now, the feature under analysis is "wind", as for this entry, the value is "Strong", so now the left path is used iii) the last level of the tree is reached, so the model has reached its decision, in this case: "No". As can be seen in the dataset, the decision obtained by the ML algorithm is correct. This example is purely theoretical, and as can be seen, only three of the four variables were used as decision nodes. The depth of the tree depends on the number of estimators used. However, these can be repeated; in the above example, after the "Humidity" node, there could be a node for the "weather" feature to filter its value once again. Having understood how a decision tree works, it is possible to understand the workings and benefits of random forests. These are composed of nothing less than multiple decision trees. While in the last example, only one decision tree was built to forecast, in random forests, several are implemented. So at the end of the process, the model’s final forecast is not the one of a single tree, but a weighted forecast of all decision trees [14], as shown 2.1. Background Concepts 8 in figure 4. Thus, numerous trees are implemented in random forests, all with the same base dataset but with different construction, i.e., different decision nodes. Figure 4: Example of a random forest architecture Feature Importance The increasing growth of ML applications in academic, industrial, and health contexts has been triggering the need for explanations regarding the behavior of machine learning algorithms [15]. In this sense, Explainable AI (XAI) is an emerging field [16,17]. Besides fostering the general public trust in ML [17], studying and assessing the machine learning internal decision criteria can help unveil meaningful novel insights [15] in business/industrial contexts. In the case of random forests, one can use feature importance as a form of XAI [18]. As the name implies, feature importance allows identifying what impact each feature has on the model’s decision-making process. When applying feature importance to a model, an array of size equal to the number of predictors used by the model is obtained, where each field has a percentage value of the impact of the feature on that index. The value for each feature can range from 0%, the feature has no impact on the decision, to 100%, that unique feature has all the decision power over the data (implying that all others have 0%, as the sum of the feature importance array must be 100%). For the decision tree represented in Figure 3, an example of applying feature importance is present in Figure 5. Figure 5: Example of the application of Feature Importance 2.1. Background Concepts 9 The tree creation process is not random: choosing for the top levels of the tree, the features that minimize entropy [19], it is expected, as seen in the figure above, that the feature with the highest impact is the root of the tree, as being the feature with the highest impact and being the root of the tree, the depth of the tree is minimized as the forecast/leaf is reached faster. In the context of this project, as will be seen later in this dissertation, the final approach used is based on the ML model of random forests, using the trios of past incidents as features. The goal is to train a model for each unique trio to predict whether a specific series of trios will cause the model’s trio. Thus, having a trained model that can process trios from the network and identify whether its trio occurred or not. However, this model’s prediction is not the information sought by this project. Thus, this approach aims to have a model trained to analyze the causality of a particular trio and then dissect it to see how the decision was made. That is, what patterns the model discovered to identify the correlations between the trios correctly. Since the features of each trio model are the other existing trios, the application of Feature Importance allows drawing for each trio what is the impact of all others. Thus, in the successful scenario of training the models, it is then possible to extrapolate the correlations between all different trios, completing the objective proposed in this dissertation. 2.1.2 Metrics Just as critical as the development of an approach is the analysis of its results. However, before analyzing the results obtained by a model, it is mandatory to assess its quality since if the model has not been able to learn effectively, all the results obtained are useless and most likely false. Therefore, this sub-section will explain what a confusion matrix is and the metrics it allows to calculate. Confusion Matrix A confusion matrix [3] is a technique used to summarize the performance of classification algorithms [20]. Its size is equal to the number of target classes, i.e., in a binary problem, it will be 2x2, and in multiclass NxN, where N corresponds to the number of values the categorical target variable can take. For the project at hand, since a model will be created for each trio, it only needs to predict whether or not the failure will occur, resulting in many binary problems. Thus, in Table 1, the appearance and content of a models’ confusion matrix can be seen. Actual Positive Actual Negative Predicted Positive Number of True Positive (TP) Number of False Positive (FP) Predicted Negative Number of False Negative (FN) Number of True Negative (TN) Table 1: Contents of a confusion matrix As shown in the table above, the confusion matrix distributes the model predictions into four different classes [3]: 2.1. Background Concepts 10 •True Positive: the model predicted the positive class, and it was the actual class. Shown in the upper-left corner (2nd quadrant). •False Positive: the model predicted the positive class; however, it was wrong as the actual class is negative. Shown in the upper-right corner (1st quadrant) •False Negative: the model predicted the negative class; however, it was wrong as the actual class is positive. Shown in the lower-left corner (3rd quadrant) •True negative: the model predicted the negative class, and it was the actual class. Shown in the lower-right corner (4th quadrant) Having understood the distribution of predictions within the confusion matrix, it becomes evident that a model is as good as the more significant distribution of values is on the y=−xdiagonal (correct predictions) and minor on the y=x(wrong predictions). From the confusion matrix is possible to calculate several metrics, of which is worth highlighting [3]: •Accuracy: represents the ratio between the number of correct predictions over the total number of predictions. This metric answers the question: "How often is the model successful". It can be calculated as follows: Accuracy(ACC) = TP +TN TP +TN +FP +FN •Precision: represents the ratio of the number of correct positive predictions over the total number of positive predictions. This metric answers the question: "Having predicted the positive class, how often is the model successful". It can be calculated as follows: Precision =TP TP +FP •True Positive Rate (TPR): represents the ratio between the number of correct positive predictions over the total number of positive entries on the dataset. This metric, also known as recall, answers the question: "If the actual class is positive, how often is the model successful". It can be calculated as follows: TPR =TP TP +FN •False Positive Rate (FPR): represents the ratio between the number of wrong positive predictions over the total number of negative entries on the dataset. This metric answers the question: "If the actual class is negative, how often is the model unsuccessful". It can be calculated as follows: FPR =FP FP +TN •ROC-AUC: a Receiver Operating Characteristic curve (ROC curve) is a metric that reflects how well a classification model performs across all categorization levels. The TPR vs. FPR at various categorization 2.2. Related Work 11 criteria is plotted, in form of a graph on a ROC curve. As the classification threshold is lowered, more items are classified as positive, increasing both False Positives and True Positives. The Area Under the Curve (AUC) is the term used to describe the area beneath the ROC Curve. The AUC score can vary between 0 and 1, being a 0.5 AUC score associated with a model with random prediction,i.e., that has not captured the data interdependencies. The ideal model reaches a AUC score of 1 whereas a model whose all prediction are contrarily predicted has a 0 AUC score. Throughout the development, the ROC and ACC metrics will be used to ascertain the quality of a model as they are the metrics with the most significance [21]. Thus, to the confusion matrix presented previously, two new columns are added, as shown in Table 2, so that these two metrics will always be present when evaluating a model’s quality. Actual Positive Actual Negative Metrics Predicted Positive - - Accuracy ROC-AUC Predicted Negative - - - - Table 2: Template of the confusion matrix and metrics considered 2.2 R E L AT E D W O R K The work to be carried out during this project focuses on applying machine learning techniques to root cause analysis, thus being able to extrapolate correlations among multiple failures automatically. Through this newly acquired knowledge about the system, an administrator is able to manually define new RCA rules that can more efficiently manage the countless alarms produced by the system topologies. Therefore, thorough evaluation of previous studies conducted in the field is paramount for adequate methods, tools and techniques’ selection. Through root cause analysis, these past studies aim to identify the relation of causality between multiples interdependent variables, in order to assess, predict and therefore prevent fault occurrence. Root cause analysis can be applied to a wide range of fields of research, from biological science and medicine [22] to manufacturing engineering [23,24,25] and telecommunication industries [26,27,28,29,30]. Being able to determine the root cause of any given problem is determinant to properly and permanently address and eradicate it. Doing so in business contexts can have substantial impact perceived service quality of its users and consequent business stability. Although being a widely active field of research, the concrete application of root cause analysis to tracking devices failure in network topology is still an open issue. Nevertheless, data processing pipelines and learning algorithms across multidisciplinary fields can be transposed and adjusted to maximize information retrieval for RCA. 2.2. Related Work 12 The study carried out in [26] targets a root cause problem with a similar area of application to the one of the present work, however simplified, both in terms of data dimensionality, root problems and number of devices. In this sense, some strategies and techniques presented inspired the strategies used for problem characterization and approach definition for this thesis. In this study, Random Forest models are created for each type of event, in order to predict whether a specific fault on a specific device will occur or not. The analysis correlates all devices faults within a 5 minutes time frame of each occurrence. Similarly, [31] also resorts to random forests in order to properly detect anomalies in Internet-based services. Through multiple detectors functions, it is possible to extract features from the data, which cooperatively with the operator’s labels, allows for a continuous retraining of the anomaly classifier. This approach was able to achieve an accuracy of 66%, which is a reasonable value considering the field of application, that is known for the complex data patterns to recognize. The potential of applying random forests in root cause analysis fostered the use of a variation of this algorithm, in particular a Random Decision Forest Regressor, to cancer analysis [22]. With a similar goal as [31], the study carried out in [23] applied a different approach based on Bayesian networks for Root Cause Analysis in the field of quality deviation in manufacturing. In this study a Bayesian networks model represented by direct, acyclic graphs, was developed in order to identify the causal relationship between manufacturing stages. Considering other root cause analysis strategies applied to other fields, [32] also uses Bayesian networks to networking monitoring and security, whereas [33] focuses on predicting service failure resorting to neural networks. Neural networks are also the core algorithm underneath the [34] study, where root cause analysis aims to determine the failure of power transformers. Although of a divergent field, this type of power failure problem deeply relates with some of the key root problems that are targeted in this thesis project. The [35] study is also based on neural networks, however focusing more on identifying the correlation of variables more than the root of the problem itself. Complementary, the research method resorted to clustering in an attempt to handle the unsupervised nature of the dataset considered. Furthermore, within the field of RCA for the telecommunication sector, [30] focuses primarily on alarm correlation discovery, having resorted to a graph-based ML algorithm to help detect fault patterns in order to reduce network maintenance costs. Similarly, [29] also resorts to graph theory, having developed a hybrid causal graph-based algorithm, tested in both artificial data and real telecom data. Conversely to previously approaches used for RCA, a Principal Component Analysis (PCA) technique is used in [28] for data dimensionality reduction, as well as to, in an unsupervised learning strategy, detect anomalies and the root cause of telecommunication network problems. Lastly, the study carried out in [27] explores an alternative solution to a simplified version of fault correlation and RCA problems in the telecommunication field. The algorithm used is different from the previously described, where to solve this issue was used generalized sequential patterns, which allow a time-gape constraint, thus being optimal for mining alarm databases. 3.4. Data Balancing 19 3.4 DATA B A L A N C I N G For the problem under analysis in this dissertation, the correlation between failures, the most relevant factor in the data is the one that identifies the failure that occurred: specificProblem. The main goal will be to analyze the relationship between different specificProblems, so, in an initial phase, it is helpful to ascertain the distributions of the problems to analyze their balancing. Before analyzing the distribution of problems in the area with the most occurrences, it is necessary to analyze the distribution of problems in all country zones. Thus, in the interval from May 1st to May 16th, as shown in Figure 10, it was identified for each country’s zone: i) how many unique specificProblems were detected (left); ii) how many failures occurred during the period in question (right). Figure 10: Distribution of the faults across the various zones of the country. Although there are 55 different zones in the country, only 54 are present in the figure above, as one of the zones, "QwA", due to a system error, has 539396 unique problems in 775316 entries. As can be seen, the distribution is not at all homogeneous, considering that the most recurrent country zone, "QwE", has about 23.5% of all failures in the country. Thus, this will be the zone used henceforth for testing. Using a dataset sample, relative to the period between May 1st and May 16th, consisting of 2.77 million entries, which, after a filtering process, which will be explained in the next chapter, and the removal of all non-New entries, remains with about 670 thousand entries. Figure 11 shows the number of occurrences of each problem in the top20 and the cumulative percentage of problems in the dataset (i.e., the sum of previous problems with itself). The orange bars represent the number of occurrences (with its scale at the left) of the specific problem of the X-axis, which, as can be seen, is not constant among all problems but significantly decreasing (thus showing a notorious unbalance among the different problems). In blue is represented the cumulative value of the problems (with its scale at the right), i.e., the aggregate sum of the occurrences, thus representing the "analyzed" percentage of the dataset (within the 670k). As shown in the figure, the distribution is not homogeneous (where the most recurrent problem constitutes almost 21% of the entire sample dataset), and still within the top30, the 70% barrier is quickly surpassed. Although in this sample there are 4036 different problems, as we can see in Figure 12, most are pretty insignificant, 3.5. Summary 20 since the first 133 problems represent 90% of the dataset, and the top 1191 (which is not even a third of the total number of problems) composes 99% of the dataset’s entries. Figure 11: Occurrence distribution and cumulative percentage of the top20 problems in the sample dataset Figure 12: Cumulative percentage of all problems in the sample dataset 3.5 SUMMARY In this chapter, the motivation for understanding the Alarm Manager tool has been exposed. Thus, it was explained in detail what it is and what it is used for, its typical workflow and behavior in more anomalous scenarios, 3.5. Summary 21 the data stored for each alarm instance created, and, finally, the distribution of the different types of problems in an arbitrary period of time. Having properly understood the tool’s behavior and data, which led to this project’s origin, it becomes possible to move on to a pre-processing data phase, thus transforming the raw data exposed in this chapter into helpful information that an ML model can process. 4 DATA PROCESSING As the dataset to be used for the development of this project, as mentioned before, is the actual output of Alarm Manager, it has an enormous variety of fields and information that is not necessary nor useful for this project. So, for the application of machine learning techniques, it is necessary to understand what the goal is so that it is viable to apply data processing techniques, thus extracting as much helpful information as possible. Therefore, in this chapter, all techniques, and processing applied to the original dataset will be addressed, thus creating a base dataset used to train the ML models, ergo achieving the stipulated project goal. 4.1 DATA S E T I M P O RT Although the data to be used is, as mentioned above, the actual output of Alarm Manager, it is not aggregated in a single file but a vast set of parquet files, with several for each day. In order to facilitate the application of ML techniques in python, it is quite helpful to read/convert the data to a dataframe, thus allowing a more agile use [38]. On a first impression, the solution for merging the files seems relatively trivial: i) reading the parquet files to dataframe; ii) recursive application of the append method [39], concatenating the dataframes into a single one. However, although dataframes are mutable [40], their length is unchangeable after creation, so the append method does not add rows to a dataframe; instead, it returns the desired concatenated dataframe [39]. Due to this property, the linear concatenation of dataframes becomes quite heavy and slow, as it has to continuously rewrite the same lines along the concatenation of the numerous dataframes in the same variable. To mitigate this issue, a concatenation mechanism based on the divide and conquer algorithm, similar to the one used on quicksort [41], was implemented, working as follows: recursively, divide the number of files to be imported by half, until the moment when there are only 2 or 1 in the case of the division of an odd number of files; concatenate those two in an auxiliary dataframe; recursively repeat this process upwards, thus concatenating the auxiliary dataframes of the previous iteration into a new dataframe. In this way, the number of lines repeated per append is drastically reduced. This concatenation process can be seen in the diagram of Figure 13. For the initial development of this project, since it has no use until the final solution is found to use the entire dataset available, it was imported 64 parquet files that represented 15 days of issues (same dataset sample used to analyze the problems’ distribution in Section 3.4). 22 4.2. Addition and Removal of Features 23 Files to be appended First division in half Last divison, stop condition achieved First parallel concatenation of the files Process done, all files appended Figure 13: Parallel concatenation process developed 4.2 ADDITION AND REMOVAL OF FEATURES At this point, a dataset corresponding to 2 weeks of Alarm Manager entries is created, thus forming a dataframe with millions of lines, where each row has the information represented in table 3, as can be seen in Figure 15. However, as seen in the table and figure, there is a lot of redundant, unnecessary and deprecated features, so it is important to remove them from the dataset, leaving only useful information for the implementation stage. The following columns have been removed for such purpose: startTime, lastStartTime, lastEndTime, systemAckTime, ackSystemId, ackUserID, ackUserID, ackStatus, inhibited, manualCloseUserId, manualCloseSystemId, manual- CloseTime, notVisible, summary, node, nodeAlias, alarmType, probableCause, domain, moiFriendlyName, tags and additionalText. 4.2. Addition and Removal of Features 24 Figure 14: Alarm’s features before preprocessing The "extraAttributes" feature, being a JSON field as can be seen in Figure 15, may at first glance seem useless since ML models cannot process it. However, it has two information fields that are very relevant to the project at hand: • sol_ne - identifies, for the equipment that reported the failure, which equipment is hierarchically above it, thus being its aggregator (1 level above). In Figure 15, this field is outlined by the red rectangle; • sol_neMaster - identifies, for the equipment that reported the failure, which equipment is hierarchically above its aggregator, being thus the aggregator of the aggregator of the equipment that malfunctioned (2 levels above). In Figure 15, this field is outlined by the blue rectangle. Thus, two new fields are created: "moiExternalId" and "moiMaster". This information can be quite relevant as it demonstrates a hierarchy between components, which can be helpful to solve RCA problems where several 4.3. Dataset Purification 25 pieces of equipment fail because their aggregator fails. Regarding "moiExternalId", this field already existed; however, its information was not consistent with the one presented in extraAttributes, and sometimes the field appeared null while the corresponding information was present in the JSON field. Hence, its creation is mentioned because it was removed and later added through iteration throughout the dataframe to obtain the new values for this field due to inconsistencies with the previous data. To optimize this process, since iterating through massive dataframes is an exhausting process, a lambda expression [42] was used, which updated the two new fields created with the information present in the extraAttributes. Therefore, the feature "extraAttributes" can be removed at the end of this process, as it no longer has valuable information for the project. Figure 15: JSON Content of the Feature "extraAttributes" For data security and privacy reasons, in the datasets provided by a TO, some of the fields have undergone an encryption process, thus maintaining due anonymity regarding critical information from its customers. Such fields were, for example, the equipment id that generated the alarm and its location. While the id being encrypted has no impact on the project development, since this encryption is consistent between all the inputs, the location encryption prevents the larger scale perception of where the failure occurred. For example, if two problems occur in the same street, which is the granularity of the location feature, it is possible to understand the spatial importance of this malfunction, but it will be unnoticeable if they occur in the same block as there is no relationship between the encrypted addresses. Ergo the need to create fields that represented spatial proximity between encrypted addresses arose. So, three new fields were additionally provided by the TO: "localCode2D", "local- Code4D" and "localCode6D"; where the higher the number, the greater the granularity of the area represented by that field, thus creating three new per zone aggregation levels for solving the problem. After applying the process aforementioned, an alarm input is represented by the features that can be seen in Figure 16. 4.3 DATASET PURIFICATION As the dataset has the necessary and valuable features for the project’s development, its content must be verified to analyze its quality since a ML model is only as good as the data used for its training. For this purpose, several operations were performed to the dataset to become more consistent, and it was possible to get more critical information from it. Initially, all "NEW" entries with an eventCount greater than ’1’ were removed since these result from synchronization issues between Alarm Manager’s servers. This is a simple dataframe drop operation, where the referred condition is verified. Additionally, all repeated entries have been removed, as these do not add any extra information to the dataset. Besides the trivial drop duplicates operation, it was necessary to remove repetitions that had different times, which for the event type ’CHANGE’ is impossible to distinguish, as they could be effectively different alarms. However, it is relatively easy for the event type ’NEW’, as there should only be one entry. Finally, all the inputs of an alarm instance that did not have the event type ’NEW’ were removed since that instance 4.4. Summary 26 Figure 16: Alarm’s features after preprocessing would be biased if the temporal start of the malfunction were unknown. For this removal, it was detected that if it were done through the iteration of a list with the ids to be removed, the process would be highly time-consuming (over eight hours). So, the solution applied was based on calculating the list with all the rows to be removed beforehand, thus applying the drop method only once, which speeded up the process massively, taking only seconds instead. 4.4 SUMMARY This chapter explains in detail the pre-processing applied to the datasets provided by a TO in order to convert their raw data into usable datasets for ML models. Due to the Alarm Manager’s daily splitting of the data, the import process implemented to minimize the number of dataframes copies and the time to import them was also explained. Finally, a data cleansing process was also exposed, where inputs originating from entropy and Alarm Manager Servers’ errors are discarded to maximize the usefulness of the data for the models. 5 PROPOSED ML APPROACHES Root cause analysis, which aims at understanding and detecting the underlying failure (root cause) in a cascade of its consequent events, is a subfield of the broader area of Pattern recognition. In the past years, pattern recognition (PR) has presented immense growth due to the usage of Machine Learning techniques [43], which are capable of consuming enormous amounts of data (big data) and consistently identify patterns within themselves. For this project, the approach mentioned in [26], seemed an excellent starting point since, although simplified, it has similarities to the challenge proposed here. Furthermore, this article uses Random Forests that shine when using many features that individually have weak predictive power but collectively a much stronger one. As with many projects in the AI-ML field, the most significant difficulty is not adjacent to the technology stack used, being this knowledge the default premise for development, but rather to how to approach the problem and critically analyze the results. A common misconception in AI is that it only needs substantial data to apply ML techniques. This reasoning is fallacious as it is necessary to have data with helpful information and minimally standardized so that a model can detect patterns and extrapolate information. However, in this use case, it is known a priori that there is a causal relationship between the alarms, even if it is not theoretically or empirically known. Thus, a very high standard is set, as now, as hard as it may be, the patterns and information that this project is intended to identify are known to exist. While in several areas of computer science, one can consider the development process deterministic: the same operation with the same inputs will always lead to the same result; in ML, this does not occur. This requires a deeper understanding of the model implemented and, above all, of the results obtained. Only then is it possible to understand what is happening within the model being trained and how it can identify the existing patterns. During the development of this thesis, varied approaches were used, but one stood out as the most accurate and consistent among the entirety of the dataset. Finally, in this chapter, the three adaptations of the core approach will be thoroughly explained, showcasing what knowledge it was possible to draw from each one and the reason for the transition between them. These approaches can be considered mutations of the main one, and the transition between them is due to the critical analysis of the results, the problems encountered, and the attempt to maximize the extrapolation of patterns detected in the data. Therefore, all are considered relevant to mention in this chapter to better understand the solution implemented and the reasoning that led to it. Due to the aforementioned reasons, this chapter can be considered a logbook of the development process. 27 5.1. Cartesian Product: Specific Problem ×Device 28 5.1 C A RT E S I A N P R O D U C T:SPECIFIC PROBLEM ×DEVICE As there is a time causality property in this problem, since, logically, the root problem has to happen before its consequences, such will be exploited in this approach. Additionally, as stated in chapter 3, an alarm is composed of multiple fields, but all that data is disregarded for implementing this approach since the purpose is to understand which alarms trigger others based merely on its occurrence and history. Thereby, a new type of event is created and, henceforth, an alarm is represented by the following tuple: (equipment where it occurred, its specific problem). The goal is to create a model for each different type of event, so each model will try to predict the occurrence of a specific problem on a specific device through the history of alarms that have occurred. However, initially, due to dimensionality issues, the model is only defined for the problem, and the equipment, in which it occurs, is ignored. For the purpose of this approach, there will be two sliding windows: the observation window, where alarm occurrences are monitored and counted; and the prediction window, where through the alarms captured in the observation window, the model will try to predict if its alarm (the one which characterizes the model) is going to occur or not. For the observation window, it was used a 5-minute gap since it is considered that more than 80% of causality is present in 60 seconds or less [26], thus giving a secure margin for causality. 5.1.1 Feature Engineering As stated before, for this approach, a new dataset has to be generated by applying the same operation to the entirety of the native dataset, which in this case is the scalar product between the specific problem of an alarm and the equipment where it occurred. This process aims to create a dataset where every row represents an observation window for every alarm entry of the default dataset. Therefore, applying this process to the entire dataset will generate a new one of equal dimension, and the value of each column represents how many times a specific problem on a specific device occurred during the observation window that led to the creation of such row. Understanding this approach to the problem and the way the new dataset for the model is generated, it quickly becomes evident that all datasets (one for each different unique problem) will be identical(since the operation to generate every row is deterministic and equivalent between all models since they are all generated from the same initial dataset) with the only difference being the target variable. As an ML model is developed for every problem, each one only has to predict whether the problem it represents occurs or not, thus being binary classification models. Having the original dataset concatenated, since Alarm Manager divides its data into multiple parquet files for every day, the process of generating a new dataset for the ML model training can be started. To better understand how it was solved at the code level, it will be explained step by step, thus allowing a more in-depth analysis of the process: •Dataset purification - before using the native dataset to generate the one needed for the model, it is necessary to cleanse it again in order to remove as much noise and entropy as possible. Thereby, firstly, all 5.2. Single Predictor: Specific Problem 35 Id Problem Extra Features Equipment 1 Energy ... EqpA 2 Signal ... EqpA 3 Energy ... EqpB 4 Signal ... EqpA 5 Disk Space ... EqpC 6 Signal ... EqpA Table 9: Alarm Manager’s simulation dataset to exemplify the second approach applying the process described in this section, assuming that the time difference between the first and last alarm is less than 5 minutes, generates an intermediate causality matrix and an array of problems, as can be seen in Table 10. Energy Signal Disk Space 0 0 0 1 0 0 1 1 0 2 1 0 2 2 0 2 2 1 Problem Energy Signal Energy Signal Disk Space Signal Table 10: Intermediate causality matrix and its corresponding array of problems (second approach) After the process is complete and the intermediate causality matrix is generated, a dataset can be created for each model. As an example, for the model related to the Energy problem, the dataset that can be seen in Table 11 would be generated for its training and testing, thus completing the causality matrix for this problem. Energy Signal Disk Space Target 0 0 0 1 1 0 0 0 1 1 0 1 2 1 0 0 2 2 0 0 2 2 1 0 Table 11: Causality Matrix for the Energy Model (second approach) 5.2. Single Predictor: Specific Problem 36 Time Deviation Sub-Approach For the sub-variant of this approach with the concern of temporal remoteness and, assuming for the sake of this theoretical explanation, that the alarms in Table 9are all equally 30s apart from each other, after applying the additional feature engineering steps, it would then reach the intermediate causality matrix that can be seen in Table 12. Energy <30s Energy ⊆ [30s- 60s] Energy >30s Signal <30s Signal ⊆ [30s- 60s] Signal >30s Disk Space <30s Disk Space ⊆ [30s- 60s] Disk Space >30s 000000000 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 2 0 0 2 1 0 0 Problem Energy Signal Energy Signal Disk Space Signal Table 12: Intermediate causality matrix and its corresponding array of problems (second approach with time deviation) After this intermediate step, as mentioned in the past examples, it is possible to enter the final stage, where through a Boolean comparison, it is possible to generate the final causality matrix, as can be seen in Table 13 for the Energy model. Energy <30s Energy ⊆ [30s- 60s] Energy >30s Signal <30s Signal ⊆ [30s- 60s] Signal >30s Disk Space <30s Disk Space ⊆ [30s- 60s] Disk Space >30s Target 0000000001 1000000000 0 1 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 2 0 0 2 1 0 0 0 Table 13: Causality Matrix for the Energy Model (second approach with time deviation) 5.2. Single Predictor: Specific Problem 37 5.2.3 Discussion Contrary to the last approach, which used the Cartesian product between specificProblem and managedObjectInstance, through the one described in this section, it becomes possible to train the Random Forest model with a significantly larger dataset, as the number of columns increases very slightly with the introduction of more rows, as shown in Table 14. Rows 10 000 100 000 400 000 Columns 340 1481 3233 Table 14: Impact of the increase of rows processed on the number of columns (second approach) Considering the success of the previous approach, which, due to the scaling issue, was disadvantaged for the training phase, it was expected that this variation in analysis, that despite only using specificProblem as a predictor, with access to a more extensive and varied dataset, would also be able to identify patterns between alarms and achieve a satisfactory success rate. In a test scenario of the same problem, "Loss of Signal" - the most frequent in the dataset, constituting 21% of it - the model showed its ability to learn and detect patterns effectively. Not only did it achieve a high success rate, as can be seen in Table 15, but it also had high percentage values at the feature importance phase, thus showing its capacity to identify the relationships among problems, as can be seen in Figure 18. Figure 18: Top 10 feature importance of the Loss of Signal model Actual Positive Actual Negative Metrics Predicted Positive 11 958 275 Accuracy ROC-AUC Predicted Negative 3176 8261 85.42% 85.35% Table 15: Confusion Matrix of the Loss of Signal model (second approach) Having solved the scaling problem, the current approach demonstrating a good success rate and a new ability to train with large volumes of data, it became possible to transition from the top1 - Loss of Signal - to the top 7 most recurring problems, which represent about 58% of the dataset. At this stage, unexpectedly, it was detected that the problem with more significance in the dataset was also the one with the least successful model. Although 5.2. Single Predictor: Specific Problem 38 initially off-putting, this makes perfect sense when considering the degree of repetition of the same failure, as it was so recurrent that the model had more difficulty in detecting which combination of failures caused it. When the models started to analyze the following problems, which despite belonging to the top7 are much less significant than the top1, each model started to reach very high success rates, as can be shown in Figure 19. These models have approached the maximum theoretical value of AUC - 1 - meaning the model has almost 100% capable of distinguishing between the two classes (the problem occurring or not). Figure 19: ROC-AUC and Accuracy metrics for the top7 models At this point, the thesis goal seemed to have been achieved, as the model effectively demonstrated a considerable capacity to detect patterns among the various faults, and it would be possible to move on to a much more extensive training and testing phase in order to collect all possible information present in the dataset. However, after a new exchange of ideas with the Alarm Manager’s development team, an idea for an even better model for the task in question emerged. Instead of just using the specificProblem as a predictor, do the cartesian product between it, the subsystem - which represents the supplier of the equipment where the failure occurred - and technology - which identifies the technology the equipment uses. Thus, a new approach emerges, which, after all that has already been achieved, promises to be the perfect solution to the problem proposed in this thesis and is therefore described in detail in the next section. Time Deviation Sub-Approach Regarding the sub-variant with time offset concerns, it was found to have no impact, positive or negative, on the model’s performance as it maintains the same values in the test metrics. However, it could be considered that it provided more information to the reader/results analyst by identifying the temporal distance between failures, which in itself is not sufficiently favorable for the scaling problem it generates by tripling the number of columns in the causality matrix. 5.3. Cartesian Product: Specific Problem ×Technology ×Subsystem 39 5.3 C A RT E S I A N P R O D U C T:SPECIFIC PROBLEM ×TECHNOLOGY ×SUBSYSTEM Although initially, it may seem that this will restore the scaling issue since the cartesian product will be applied between 3 features, such does not happen. While the number of combinations of (Problem, Device) is colossal, since all devices can suffer from different problems, the number of permutations between the three features used in this approach is relatively small, since the number of different manufacturers or technologies used by the same device is meager. 5.3.1 Feature Engineering As in subsection 5.2.1, this approach is a new variant of the one mentioned in subsection 5.1.1, so the whole preprocessing process is quite identical with only two differences: •Triples Calculation - likewise the past approaches, before creating the observation windows that will lead to the causality matrix, it is necessary to calculate all the unique predictors. In this case, such can be achieved by applying the Cartesian product among the following features: specificProblem,Technology and Subsystem. As stated before, even though this product is between 3 different features, their relation is almost bijective; hence the number of combinations is so close to the number of unique specificProblem. •Model For Each Triple - In contrast to the past approaches, where a model was problem-oriented, meaning a model was created for every unique problem in the dataset, and it would try to predict whether if the observation window in the analysis was of its type or not, now a model is created for every unique triple of (specificProble,Technology,Subsystem). Since the predictors now go into a much more specific degree of detail, taking into account not only the manufacturer but also the technology used by the equipment, and, fortunately, the number of combinations is quite similar to the unique problems, it becomes pretty advantageous to generate a model for each triple. Through this, each model can find even more specific relationships since the root for a problem in one manufacturer does not have to be identical to that of another manufacturer or even one using a different technology. 5.3.2 Data Example Similar to the demonstration in the previous approach, this subsection will showcase a simple theoretical example of the application of the Feature Engineering phase of this approach for a better understanding of how it works. Assuming the dataset seen in Table 16 as the one provided by Alarm Manager 5.3. Cartesian Product: Specific Problem ×Technology ×Subsystem 40 Id Problem Extra Features Technology Subsystem 1 Energy ... Tech1 Sub1 2 Signal ... Tech2 sub2 3 Energy ... Tech1 Sub2 4 Signal ... Tech3 Sub2 5 Disk Space ... Tech3 Sub3 6 Signal ... Tech2 Sub2 Table 16: Alarm Manager’s simulation dataset to exemplify the third approach applying the process described in this section, assuming that the time difference between the first and last alarm is less than 5 minutes, generates an intermediate causality matrix and an array of problems, as can be seen in Table 17. Energy- Tech1-Sub1 Energy- Tech1-Sub2 Signal- Tech2-Sub2 Signal- Tech3-Sub2 Disk Space- Tech2-Sub1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 0 11111 Problem Energy Signal Energy Signal Disk Space Signal Table 17: Intermediate causality matrix and its corresponding array of problems (third approach) After the process is complete and the intermediate causality matrix is generated, a dataset can be created for each model. As an example, for the model related to the Energy problem, the dataset that can be seen in Table 18 would be generated for its training and testing, thus completing the causality matrix for this problem. 5.3. Cartesian Product: Specific Problem ×Technology ×Subsystem 41 Energy- Tech1-Sub1 Energy- Tech1-Sub2 Signal- Tech2-Sub2 Signal- Tech3-Sub2 Disk Space- Tech2-Sub1 Target 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 Table 18: Causality Matrix for the Energy Model (third approach) 5.3.3 Discussion Since the previous approach was very successful and showed full learning capacity, through the improvement explained during this section to the approach, it was expected to get as good or even better results, since: i) the model has two more predictors than the previous version, thus having two more information variables for decision making; ii) the models are now oriented to triples (specificProble,Technology,Subsystem) instead of only to the problem, thus avoiding wrong generalizations, since the same problem in equipment from different manufactures or with different technologies may have different failure causes. Applying the same test phase used on the previous approach quickly showed that the models could effectively at least maintain, but mostly improve their performance, both in a metric perspective of the models (ROC and ACC) and also in a feature importance phase where it was able to identify triples with relatively high impact on the origin of the triple under analysis, as can be seen in Figures 20 to 22. Figure 20: Top5 feature importance of the model (Loss of Signal, DSLCLIENTE, AWS) Figure 21: Top5 feature importance of the model (Receive Dying-Gastp, ONT, SQR) Figure 22: Top5 feature importance of the model (Loss of signal, PON, SQR) So, even before moving on to a much more extensive training and testing phase, the approach was tested for the top 15. The goal was to check whether it would still be able to find the patterns in the eight new problems, which were less significant in the dataset than those analyzed so far. As in subsection 5.2.3, the discovery that 5.4. Summary 42 less common problems in the dataset (although still quite significant: Top15) are easier to predict and detect patterns was again verified. Given this empirically obtained result, it becomes evident that the reason why the less significant problems in the dataset are easier to predict is due to the specificity of their failure cause. While the problem, for example, "Loss of Signal", is caused by a myriad of different reasons, the less frequent ones have a consistent pattern of occurrence. This way, no matter how complex or not evident that pattern may be to a human, a machine learning algorithm quickly detects it and improves its predictive ability, thus making the new models reach the almost utopian metric values (ROC above 99.5%, being the maximum theoretical value 100%), as can be seen in Figure 23. Figure 23: ROC-AUC and Accuracy metrics for the top15 models At this point, it was considered that the approach had reached its maximum point of maturity and improvement since it became possible to conclude previously unknown relationships between alarms. Thus, the chapter regarding the approaches and their functioning is closed, and it is possible to move on to the results chapter, where all the training stages and methods will be exposed, alongside all the results obtained with the development of this thesis. 5.4 SUMMARY This chapter explains in detail the approach used in this project, considering three variants regarding different predictors. Thus, the potential of each is exposed, accompanied by a theoretical example for a better understanding and a result obtained to ascertain the usefulness of the approach. 5.4. Summary 43 At the end of this chapter, the specific variant of the approach to be used is defined, and it becomes necessary to enter a more extensive and intensive testing phase. 6 RESULTS DISCUSSION After developing and refining the approach, an expansion of the training and test case becomes necessary. Whereas previously, it was only tested up to the top15 most significant problems in the most recurrent area of the country, having the approach optimized allows expanding the training and testing phase. Thus, it will be applied to all problems in all areas to extrapolate as much knowledge as possible from the data provided for the project. This chapter will cover not only the technical specifications of the machine used during the training and testing phase (since in a big data and machine learning area, hardware resources are fundamental for a fluid development), the automation process that allowed a more accurate and consistent training across all zones and problems and, finally, the results and knowledge obtained after all the continuous training of the models. 6.1 H A R DWA R E One of the main limiting factors in big data processing and machine learning is the hardware resources [46], as it not only needs to access many data simultaneously but also needs to apply computationally heavy learning algorithms. Additionally, there is a considerable gap between the minimum requirements and the recommended ones, i.e., even if it is a heavy process, most of the currently available machines can run it, but the processing times can be so high that makes the development stage utterly impossible. On the contrary, there are machines available to rent that have immense computational power and would almost immediately do the training stage for this project. However, they are costly to rent, and due to their power, in the development stage, it would not make sense to rent as most of the paid time would not be on training but refining the approach, thus wasting the money spent on the machine. So it is necessary to find a middle ground that allows a stable development and that allows running the models several times without waiting endless hours for results, which always delays the efficient development of the project. Thus, the machine used for the development of the project was my personal computer, which has the technical specifications that can be seen in Table 19. 44 6.3. Results 51 several occurred so few times during the observed time that the model cannot detect patterns and learn relations effectively. Thus, the new guard referred to in 6.2 was added, so the process only continues to be applied as long as the best version of the model (within the three balance variations) has a ROC value greater than 60%. With this new guard and applying the previously described approach, it is possible to train 1344 different trios; that is, 1344 models are generated with ROC values higher than 60%. Although it may initially seem minor, considering that there are 3713 unique trios, 1344 processed correspond to 98.92% of the 400 thousand entries of the dataset. Despite being numerous, the remaining unexamined trios have very few occurrences; more precisely, the maximum value of detected occurrences in these trios is 5. Therefore it is impossible to train such models, as not only the value is already low, but also 20% are separated for testing the model. After the process is done, analogous to Figure 26, a dataframe is generated with all the trios processed and the impact of each feature in its model, as shown in Figure 28. Figure 28: Result of applying Feature Importance to the 1344 processed models Once again, as shown in the figure above, most columns have little values, showing almost 0 correlation with triple under analysis. To this end, the filtering process is applied once again, keeping for each trio only the top 6.3. Results 52 10 features with the most impact on the model, as can be seen in Figs. 29 to 31. Analyzing these results shows that although the three triples are distinct, the root cause of failure among the 3 is the same, thus pinpointing the impact that such triple has on the entire system. Figure 29: Top10 feature importance of the model (Received Dying Gasp indication from ONT, ONT, AWS) Figure 30: Top10 feature importance of the model (Loss of Power, DSLCLIENTE, AWS) Figure 31: Top10 feature importance of the model (The dying-gasp of GPON ONTi(DGi) is generated, ONT, HWI) Analogous to the diagram in Figure 23, a graph with the ROC and accuracy values of each model was developed to assess the quality concerning the metrics of the models. However, due to the very high number of processed triples, it becomes impossible to correctly perceive them in a bar chart. Thus, this information will be divided into two graphs for better analysis: Figure 32 shows the ROC and ACC of the top20 models and Figure 33 shows the accuracy, in orange 33a, and the ROC, in blue 33b, of the 1344 models. Despite of visually appearing as a continuous line, the graph is composed by points, where X represents the trio processed and Y the ROC and ACC). 6.3. Results 53 Figure 32: ROC-AUC and Accuracy metrics for the top20 models (a) Accuracy of the 1344 processed models (b) ROC-AUC of the 1344 processed models Figure 33: Metrics obtained for every model processed These results were obtained by applying the approach explained in section 5.3 on the machine with the specifications referenced in Table 19, having an average execution time (average between 5 distinct executions) of 1h36 minutes. 6.3.3 All Problems on All Zones After the success of analyzing a single trio and the subsequent expansion to all the different trios of a single zone, it is once again possible to expand the approach test scenario. So, the approach will now be applied to all 55 6.3. Results 54 zones of the country, thus being the broadest test scenario possible. Moreover, this expansion allows, in case of success, to maximize the extrapolation of system-wide knowledge and relationships. Since now the training and testing process is applied cyclically between all zones, a subsequent manual analysis of the results becomes unfeasible (also because between iterations, all variables have to be freed and/or reset, thus avoiding cycle stops due to lack of RAM).Thus, at the end of each iteration of the zones cycle, the filtered results (top 10) of each trio are saved for excell, as can be seen in Figure 34, together with the ROC and ACC obtained, in order to understand the significance of the results, and the number of positive and negative inputs used for training, in order to understand the degree of "depth" of the training phase and the veracity of the results. Thus, at the end of the process, the folder with the 54 files of the zones grows to 110 files, being the 54 new ones the results for each individual zone. Figure 34: Example of the excel file generated after the processing of a zone To better analyze the approach’s success in expanding to all country zones, a graph was developed with the number of trios processed per zone, as shown in Figure 35 in orange. However, since not all zones have the same number of problems within the same time frame, as shown in Figure 10, it was necessary to add a second metric in blue to the graph to understand what percentage of the dataset was processed. As shown in the above figure, almost the entire dataset of the country was correctly processed: 48 out of 54 zones with more than 95% alarms processed and 41 with more than 99%. Overall, 95% of the entire dataset for all zone intervals between May 1st and May 16th was correctly processed. Thus, it is possible to conclude that the approach was a success, and it was possible to extrapolate the maximum amount of information from the data provided by the TO, thus having fulfilled the objective proposed in the thesis. 6.4. Summary 55 Figure 35: Number of triples processed per zone (orange) and the respective percentage they represent in the total dataset (blue) 6.4 SUMMARY In this chapter, the technical specifications of the machine used during the development of this project and the automation process developed were exposed to apply the final approach to all areas and problems in the country, thus maximizing the knowledge possible to extrapolate from the system. Additionally, the results for each of the three different levels of granularity are also exposed: one problem, one zone, and all the problems on all the zones; in order to understand in more detail the results obtained and what percentage of the data it was possible to process. 7 CONCLUSIONS AND FUTURE WORK This research project arose from the possibility of applying ML techniques to Altice Labs’ Alarm Manager tool. The main goal was to extrapolate the relationship between different types of alarms in order to have a better understanding of the impact of a failure on the entire system, thus easing and helping the process of manual implementation of RCA rules. During this dissertation, the whole development process of the project was presented, from the treatment and pre-processing of data received by a TO, to the creation and implementation of an approach capable of absorbing such data variability and effectively learning the existing relationships between alarm instances, to the results obtained during the whole refinement process. Thus, it becomes possible for the reader to closely follow the entire developing process and the decisions taken throughout the project. In more detail, the first step involved evaluating the state of the art techniques used in similar problems since, through the analysis and interpretation of the solutions exposed in the literature, it was possible to better understand the problem and how to tackle it. Then, the creation of a new structured dataset was essential since the data provided for the project development was taken directly from the Alarm Manager tool database, containing many incongruences and irrelevant information to the project at hand. So, all unnecessary information was dropped, removing outdated and deprecated fields, and through the dataset purification, all initial entropy was removed, becoming possible to pass to a development stage. After implementing and testing different approaches, one was found to have a higher learning capability, this being based on the proposal on [26], which tackles a simplified RCA scenario showcasing the possibility of the development of a model without using the specific fields of each alarm, which allows a better perception of the causality effect among alarms, based only on their occurrence. However, numerous adjustments and enhancements had to be made in order to fit the Altice Labs Alarm Manager scenario best, solving the issues that originated from this being a broader and real-life problem with big data. The new proposed approach allowed to maximize the valuable knowledge possible to draw from the results, which is essential for a later phase of manual creation of correlation rules. Finally, the results obtained during the intensive testing phase, applying the final approach in all zones for all problems, were exposed. These results are crucial to the project, not only for being its primary goal but also for confirming previously known relationships (hence proving the truthfulness of the results) and ascertain new ones (providing new helpful information to the system administrators to create more specific RCA rules). Thus, the implemented ML approach was considered a success, as it allowed not only to achieve the goal outlined initially, 56 7.1. Main Contributions 57 but it also opened a window to an even more exciting and complex scenario, which will be followed after the end of this project. 7.1 MAIN CONTRIBUTIONS The project developed and described throughout this dissertation focused on the analysis and exploration of actual relations between alarms of real equipment from a TO and controlled by Alarm Manager. It is also essential to take into account that, in this TO and at this moment, Alarm Manager processes about 4 million daily alarms with a forecast of expansion to more than 10 million in a few years so. For this reason, its manual processing is entirely impossible. Thus any alarms’ hierarchy information that can be extracted and empirically proven is exceptionally beneficial because it supports the system administrators in the creation of proper and previously unknown RCA rules. The development of this project was considered a success, as it was not only possible to discover the relationship between thousands of problems in 55 different areas, but it was also able to take into consideration the technology used by the equipment and its supplier, which allowed for a new and more thorough perspective of the hierarchy and relationship between failures. Additionally, it was possible to elaborate excel reports for each one of the 55 different zones, including all the relations between all the trios of (specificProblem,Technology, Subsystem), the impact percentage value of its top10 at feature importance level, alongside the metrics obtained by the model, for a detailed insight into the veracity of the results. In this way, this project outcome has real impact, because now, through the application of machine learning techniques on the causality matrix (thus implying that all discoveries are through patterns detected by the failure history), immense previously unknown relationships were discovered, allowing the generation of new RCA rules and reducing the manual processing currently performed by system administrators. 7.2 F U T U R E W O R K As in all projects, having reached an end, it becomes possible to look back and question and/or identify aspects in which the work could be improved or continued. In this particular case, and for all the reasons previously mentioned throughout the dissertation, I believe that the ideal scenario for the proposed challenge was reached. However, during the testing phase of the approaches considered, specifically, the one that uses the Cartesian product between the problem and the equipment in which it occurred, a glimpse of a possible different path to follow with a more ambitious objective emerged. While in the scope of this master thesis, the proposed goal was the detection of correlations between alarms, the approach in Section 5.1 revealed the possibility of, instead of using the ML models results for a posterior manual RCA rule definition phase, the ML models would automatically be able to identify for each problem which was the precedent that triggered it and, in a cascade of failures scenario, identifying which is the real source failure that has to be solved. Therefore, it can be considered that, through this successful expansion, an administrator would never have to manually define rules again, as ML would automatically do this process which 7.2. Future work 58 furthermore represents the highest possible aggregation scenario, considering the outstanding capabilities of detecting patterns provided by ML techniques. After the delivery of this project and, since my work will continue at Altice Labs, this new path will be explored to develop a fundamental tool that would run on top of the Alarm Manager and would be able to receive an instance of an alarm sent by a device and add, in real-time, which precedent alarm triggered it. This tool would be highly beneficial since, in its successful scenario, when series of faults occur, all stemming from the same cause, instead of the system administrator having to deal with them all sequentially, he would see them all aggregated on the alarm instance source. Thus, only one instance would have to be fixed to solve numerous problems, which would otherwise be much more time consuming for the administrator, hence providing a massive reduction in dimensionality, maximizing the systems’ efficiency. BIBLIOGRAPHY [1] L. Zhou, S. Pan, J. Wang, and A. V. Vasilakos, “Machine learning on big data: Opportunities and challenges,” Neurocomputing, vol. 237, pp. 350–361, 2017. [2] T. O. Ayodele, “Types of machine learning algorithms,” New advances in machine learning, vol. 3, pp. 19–48, 2010. [3] F. Provost and R. Kohavi, “Glossary of terms,” Journal of Machine Learning, vol. 30, no. 2-3, pp. 271–274, 1998. [4] R. Caruana and A. Niculescu-Mizil, “An empirical comparison of supervised learning algorithms,” in Proceedings of the 23rd international conference on Machine learning, 2006, pp. 161–168. [5] S. B. Kotsiantis, I. Zaharakis, P. Pintelas et al., “Supervised machine learning: A review of classification techniques,” Emerging artificial intelligence applications in computer engineering, vol. 160, no. 1, pp. 3–24, 2007. [6] M. Caron, P. Bojanowski, A. Joulin, and M. Douze, “Deep clustering for unsupervised learning of visual features,” in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 132–149. [7] T. Hastie, R. Tibshirani, and J. Friedman, Unsupervised Learning. New York, NY: Springer New York, 2009, pp. 485–585. [8] O. Chapelle, B. Scholkopf, and A. Zien, Eds., “<emphasis emphasistype="bold">semi-supervised learning</emphasis> (chapelle, o. et al., eds.; 2006) [book reviews],” IEEE Transactions on Neural Networks, vol. 20, no. 3, pp. 542–542, 2009. [9] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction. MIT press, 2018. [10] Simhyeonju and Hyunjulie, “Machine learning studying roadmap,” 2018. [Online]. Available: https: //medium.com/hyunjulie/machine-learning-studying-roadmap-8596b6571f8a [11] J. Ali, R. Khan, N. Ahmad, and I. Maqsood, “Random forests and decision trees,” International Journal of Computer Science Issues (IJCSI), vol. 9, no. 5, p. 272, 2012. [12] A. J. Myles, R. N. Feudale, Y. Liu, N. A. Woody, and S. D. Brown, “An introduction to decision tree modeling,” Journal of Chemometrics: A Journal of the Chemometrics Society, vol. 18, no. 6, pp. 275–285, 2004. [13] R. C. Barros, M. P. Basgalupp, A. C. De Carvalho, and A. A. Freitas, “A survey of evolutionary algorithms for decision-tree induction,” IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), vol. 42, no. 3, pp. 291–312, 2011. 59 bibliography 60 [14] M. El Habib Daho, N. Settouti, M. El Amine Lazouni, and M. El Amine Chikh, “Weighted vote for trees aggregation in random forest,” in 2014 International Conference on Multimedia Computing and Systems (ICMCS), 2014, pp. 438–443. [15] A. Adadi and M. Berrada, “Peeking inside the black-box: a survey on explainable artificial intelligence (xai),” IEEE access, vol. 6, pp. 52 138–52 160, 2018. [16] D. Gunning, M. Stefik, J. Choi, T. Miller, S. Stumpf, and G.-Z. Yang, “Xai—explainable artificial intelligence,” Science Robotics, vol. 4, no. 37, 2019. [17] W. Samek and K.-R. Müller, “Towards explainable artificial intelligence,” in Explainable AI: interpreting, explaining and visualizing deep learning. Springer, 2019, pp. 5–22. [18] S. M. Lundberg, G. Erion, H. Chen, A. DeGrave, J. M. Prutkin, B. Nair, R. Katz, J. Himmelfarb, N. Bansal, and S.-I. Lee, “From local explanations to global understanding with explainable ai for trees,” Nature machine intelligence, vol. 2, no. 1, pp. 56–67, 2020. [19] W. Du and Z. Zhan, “Building decision tree classifier on private data,” 2002. [20] M. Sokolova and G. Lapalme, “A systematic analysis of performance measures for classification tasks,” Information processing & management, vol. 45, no. 4, pp. 427–437, 2009. [21] J. Huang and C. Ling, “Using auc and accuracy in evaluating learning algorithms,” IEEE Transactions on Knowledge and Data Engineering, vol. 17, no. 3, pp. 299–310, 2005. [22] G. Pal, X. Hong, Z. Wang, H. Wu, G. Li, and K. Atkinson, “Lifelong machine learning and root cause analysis for large-scale cancer patient data,” Journal of Big Data, vol. 6, no. 1, pp. 1–29, 2019. [23] A. Lokrantz, E. Gustavsson, and M. Jirstrand, “Root cause analysis of failures and quality deviations in manufacturing using machine learning,” Procedia CIRP, vol. 72, pp. 1057–1062, 2018. [24] M. Giollo, A. Lam, D. Gkorou, X. L. Liu, and R. van Haren, “Machine learning for fab automated diagnostics,” in 33rd European Mask and Lithography Conference, vol. 10446. International Society for Optics and Photonics, 2017, p. 104460O. [25] S. Azimi and C. Pahl, “Root cause analysis and remediation for quality and value improvement in machine learning driven information models.” in ICEIS (1), 2020, pp. 656–665. [26] J. M. N. Gonzalez, J. A. Jimenez, J. C. D. Lopez et al., “Root cause analysis of network failures using machine learning and summarization techniques,” IEEE Communications Magazine, vol. 55, no. 9, pp. 126– 131, 2017. [27] R. Costa, N. Cachulo, and P. Cortez, “An intelligent alarm management system for large-scale telecommunication companies,” in Portuguese Conference on Artificial Intelligence. Springer, 2009, pp. 386–399.