<div dir="ltr"><div>Hi All,</div><div>    I am trying to solve a problem of finding Anomalies/Outliers using application logs of a large KMS. Please find the details below:</div><div><br></div><div><b>Problem Statement</b>: Find Anomalies/outliers using application access logs in an un-supervised learning environment. Basic use case is to find any suspicious activity by user/group, that deviates from a trend that the algorithm has learned.</div><div><br></div><div><b>Input Data</b>: Data would be created from log file that are in the following format: </div><div><br></div><div>"ts, src_ip, decrypt, user_a, group_b, kms_region, key"</div><div><br></div><div>Where:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><i>ts</i> : time of access in epoch Eg: 1489840335</div><div><i>decrypt</i> : is one of the various possible actions.</div><div><i>user_a</i>, <i>group_a</i> : are the user and group that did the access</div><div><i>kms_region</i> : the region in which the key exists</div><div><i>key</i> : the key that was accessed</div><div><br></div></blockquote><div><b>Train Set</b>: This comes under the un-supervised learning and hence we cant have a "normal" training set which the model can learn. </div><div><br></div><div><b>Example of anomalies</b>:</div><div><ol><li>User A suddenly accessing from a different IP: xx.yy<br></li><li>No. of access for a given key going up suddenly for a given user,key pair<br></li><li>Increased access on a generally quite long weekend<br></li><li>Increased access on a Thu (compared to last Thursdays)<br></li><li>Unusual sequences of actions for a given user. Eg. read, decrypt, delete in quick succession for all keys for a given user<br></li></ol></div><div>------------------------</div><div><br></div><div>From our research, we have come up with below list of algorithms that are applied to similar problems:</div><div><ul><li><a href="https://en.wikipedia.org/wiki/Autoregressive_integrated_moving_average">ARIMA</a> : This might be good for timeseries predicting, but will it also learn to flag anomalies like #3, #4, sequences of actions(#5) etc?<br></li><li><a href="http://scikit-learn.org/stable/modules/outlier_detection.html">scikit-learn's Novelty and Outlier Detection</a> : Not sure if these will address #3, #4 and #5 use cases above.<br></li><li>Neural Networks<br></li><li>k-nearest neighbors<br></li><li>Clustering-Based Anomaly Detection Techniques: k-Means Clustering etc<br></li><li><a href="https://www.vs.inf.ethz.ch/edu/HS2011/CPS/papers/chandola09_anomaly-detection-survey.pdf">Parametric Techniques</a> (See Section 7): This might work well on continuous variables, but will it work on discrete features like, is_weekday etc? Also will it cover cases like #4 and #5 above?<br></li></ul></div><div>Most of the research I did were on problems that had continuous features and did not consider discrete variables like "Holiday_today?" / succession of events etc.</div><div><br></div><div> Any feedback on the algorithm / technique that can be used for above usecases would be highly appreciated. Thanks.<br></div><div><br></div><div>Regards,</div><div>John.</div></div>