The Growing N-Gram Algorithm: a Novel Approach to String Clustering

The Growing N-Gram Algorithm: a Novel Approach to String Clustering

The Growing N-Gram Algorithm: A Novel Approach to String Clustering Corrado Grappiolo1, Eline Verwielen2 and Nils Noorman3 1ESI (TNO), Eindhoven, The Netherlands 2Unaffiliated, Valkenswaard, The Netherlands 3Philips Healthcare, Best, The Netherlands Keywords: String Clustering, N-Grams, Operational Usage Modelling, System Verification Testing. Abstract: Connected high-tech systems allow the gathering of operational data at unprecedented volumes. A direct benefit of this is the possibility to extract usage models, that is, a generic representations of how such systems are used in their field of application. Usage models are extremely important, as they can help in understanding the discrepancies between how a system was designed to be used and how it is used in practice. We interpret usage modelling as an unsupervised learning task and present a novel algorithm, hereafter called Growing N- Grams (GNG), which relies on n-grams — arguably the most popular modelling technique for natural language processing — to cluster and model, in a two-step rationale, a dataset of strings. We empirically compare its performance against some other common techniques for string processing and clustering. The gathered results suggest that the GNG algorithm is a viable approach to usage modelling. 1 INTRODUCTION Connected high-tech systems allow the gathering of operational data at unprecedented volumes, usually in the form of log files. These, although historically mainly used for software debugging purposes, bring new opportunities to understanding how end-users are actually using a system, opposed to how they were designed to be used, for instance during system de- sign. To be able to extract relevant log information and aggregate it into usage models can therefore be extremely beneficial. Usage models can help to iden- Figure 1: Philips Image Guided Therapy’s Azurion tify particular types of behaviour, leading to insights interventional x-ray system https://www.philips.com.eg/ healthcare/solutions/interventional-devices-and-therapies. which can serve as a basis for product improvements. System verification can certainly benefit from us- age models. During system verification, it is evalu- mean time between failures, ranging from a few hun- ated whether the system complies to regulations, re- dreds to thousands of hours. Ideally, the system is quirements and specifications. System reliability ver- put under “average” use during reliability verification. ification is part of this process. The goal of reliability However, it is difficult to determine what exactly the verification is to drive a system with realistic clini- average use exactly is. cal scenarios in conditions which were not expected Our ultimate goal is the design of a computational beforehand, taking care that the system is not load- framework for system (reliability) verification testing and stress-tested. To evaluate the reliability of a sys- capable of distinguishing “average” usage (and other tem, its response has to be monitored at test time. If types of usage). Ideally, the framework would lever- the response is not as expected, then the system has age usage models to identify, from a given dataset, made a failure which may impact the operator or the logs depicting normal behaviour, and then to re- patient. Reliability figures are usually expressed as execute them. Additionally, such framework should 52 Grappiolo, C., Verwielen, E. and Noorman, N. The Growing N-Gram Algorithm: A Novel Approach to String Clustering. DOI: 10.5220/0007259200520063 In Proceedings of the 8th International Conference on Pattern Recognition Applications and Methods (ICPRAM 2019), pages 52-63 ISBN: 978-989-758-351-3 Copyright c 2019 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved The Growing N-Gram Algorithm: A Novel Approach to String Clustering Table 1: Example of an x-ray sequence. ous actions. Step Action Symbol Three main research questions arise: (1) how well 1 table movement start 1 do existing techniques used for string/text/document 2 x-ray arm movement start 2 clustering perform on our data? (2) How can we com- 3 table movement stop 3 pare the outcome of different clustering algorithms 4 x-ray arm movement stop 4 corresponding to a different number of clusters? (3) 5 table movement start 1 Is it possible to provide an alternative clustering ap- 6 table movement stop 3 proach? 7 table movement start 1 To answer the first research question we consid- 8 table movement stop 3 ered k-means and complete-link hierarchical cluster- 9 user-interface 5 ing — two of the most common clustering algorithms 10 user-interface 5 — in presence of raw text-data and string similar- 11 user-interface 5 ity measures or given a data transformation technique 12 x-ray acquisition start 6 which converts the raw data into a vectorised form. 13 table movement start 1 The second research question is answered by lever- 14 x-ray arm movement start 2 aging on our modelling approach, which essentially 15 table movement stop 3 aims to create probabilistic graphs for each cluster, to 16 x-ray arm movement stop 4 retrieve probability-based metrics — entropy in our 17 x-ray acquisition stop 7 case — to compare partitions obtained by using dif- ferent algorithms and data transformation techniques. be able to continuously maintain up-to-date represen- Concerning the third research question, we propose a tations of different behaviour types. We focus our novel algorithm, hereafter called Growing N-Grams attention on operational data of Philips Healthcare’s (GNG). GNG creates new or updates existing n-gram Image Guided Therapy interventional systems (IGT) models in a two-step rationale. First, given an in- — see Figure 1 — which make the task of modelling put string to cluster, the algorithm relies on the exist- normal behaviour far from being trivial: the flexibil- ing models’ symbols to identify the candidate models ity of this system, the medical staff’s variety in ed- which share most commonalities with the string. If ucational background, their familiarity with manoeu- none are found, a new n-gram model based on that vring the system and the different pathologies of the string is created. Otherwise, the algorithm calculates, patients, result in an almost infinite amount of differ- for each candidate model, the chain probability of that ent usage types. Our interest, more specifically, is on string; the string is then assigned to the model which the sequence of high-level actions performed by the returned the highest probability, with the consequence users on the x-ray system during a medical procedure, that the winner model’s n-grams and probabilities are rather than its low-level details, such as motor/sensor updated to encompass the input string. To the authors’ readings. Table 1 depicts an example of such x-ray best knowledge, there has never been an attempt to sequences. perform string clustering directly by means of n-gram Since we hold no a-priori knowledge on how classification. many usage behaviours exist we interpret usage mod- We conducted an empirical evaluation of string elling as an unsupervised learning task. Assuming the clustering based on a dataset describing sub- successful partitioning of a given dataset into clusters, sequences of the Bolus chase procedure, a technique so that the similarity of behaviours represented by the in peripheral arteriography, performed on Philips string belonging to the same cluster is maximised, Healthcare’s IGT interventional systems1. Once the whilst the similarity of behaviours across clusters is set of n-gram models is built, the evaluation procedure minimised, the subsequent task would correspond to consists of calculating the entropy score of the chain the extraction of a usage model for each cluster. Nat- probabilities calculated by each n-gram model for a ural Language Processing (NLP) techniques are par- given validation set of strings. The rationale is the ticularly useful. More specifically, we aim at extract- following: an optimal clustering partition would lead ing a n-gram model for each retrieved cluster. The to n-gram models which do not “overlap”, meaning main key-feature of n-grams is that they can lead to that given an input string all but one model will return the creation of probabilistic graphs which can then be a very low chain probability, hence low entropy. On used for classification purposes (Jurafsky and Martin, the other hand, the worst clustering partition would 2014). In our approach, each node of a n-gram graph corresponds to a log action, whilst the edges connect- 1The dataset, algorithms and additional content can ing nodes correspond to the conditional probability of be found using the following link: https://github.com/ an action occurring given a finite sequence of previ- bracciolo22/Growing-n-Grams. 53 ICPRAM 2019 - 8th International Conference on Pattern Recognition Applications and Methods lead to n-gram models with some degree of overlap, meaning that all models will return similar probabil- ity values, thus resulting in a high entropy score. By n-gram overlap we intend the existence of sub-graphs of nodes, edges and related probabilities, which are the same among different n-gram models, or at least very close to each other. The gathered results suggest that: (1) GNG can outperform all other algorithms given appropriate hy- perparameter setting; (2) there might be a relation- ship between the statistical properties of the dataset at hand and the hyperparameters leading to the op- Figure 2: Clustering algorithms and data processing ap- proaches considered in our study. timal performance of GNG; (3) complete-link clus- tering with a simple string similarity measure such form, most often retrieved by a combination of tech- as the Levenshtein distance can lead to good results; niques called Term Frequency and Inverse Document (4) string vectorisation does not offer straightforward Frequency (tf-idf), (Raghavan and Birchard, 1979; computational benefits.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us