GSOC 2020 — Community Bonding Period and Week 1
By: Sarit Adhikari
Tags: Open Source, Gsoc 2020, Anomaly Detection, Clustering, NLP

Around 15 years back, one of my cousins used to write a technology section in one of the local newspapers. Once he asked me to review one of his articles on “open source software” published on software freedom day. That was the first time I heard about the world beyond Proprietary software. The idea of people contributing to the free software for everyone fascinated me.

Fast forward high school, college, a few years of industry, and a few years into grad school, this summer of 2020, I decided to apply for Google Summer of Code (GSOC). While looking for the host organization, I came across one of the Linux foundation’s projects CHAOSS, which works in developing metrics and methods for open source software health and sustainability. The projects were mostly for the CHOSS child system Augur which collects open-source trace data, stores in the structured data model, and finally, help answer meaningful questions about the open-source project’s health. The project which interested me the most was “Machine Learning for Anomaly Detection”, and hence proceeded to apply for it. For the proposal, we had to complete one microtask and highlight what we wanted to achieve over the summer. Although I started application process pretty late, comprehensive documentation and active community support, helped me get acquainted with the project in a breeze.

The first couple of weeks was a community bonding period where we had a couple of group meetings and one individual meeting. Although in my proposal, I mentioned working with both quantitative data and text data, after a meeting with mentors, I decided to focus on text data. I would be working with the comments on issues and pull requests, and start with NLP tasks like document clustering (and subsequently topic modeling), sentiment analysis, etc. During community bonding period, I went through the documentation, explored data models, and developed an in-depth understanding of ‘workers’ through the help of mentors.

During, the first of week coding, we had access to the database on Augur’s server which already had data from around 223000 issues from 3000 Github repositories. To get started with document clustering, I started with comments from issues in one of the repositories. The idea was to append all the comments within an issue to form a document and cluster those in an attempt to find semantically similar issues based on comments on them. I started with standard text preprocessing tasks like stop words removal, stemming, and tokenization. Although special characters, numbers, punctuations, and emojis might assign a meaning to the comments, for now, I decided to remove those and consider only words involving alphabets. The next step involved creating tf-idf feature matrix. These features are then used to fit KMeans clustering model.

The result is each document (in our case, comments within an issue) being assigned to a particular cluster. Since the data is high dimensional, we need to use dimensionality reduction methods like Principal Component Analysis (PCA) or t-SNE (t-Distributed Stochastic Neighbor Embedding) to visualize the clusters. The by-product of the clustering would be anomaly detection as we can find the issues which are farther apart from all of the clusters (see blue points), meaning that the discussions in those issues differ drastically from the rest of the issues within the repository.