DENT: A Tool for Tagging Stack Overflow Questions With Deep Learning Energy Patterns


Tool Description

DENT (Deep Learning Energy pattern Tagger) is a Chrome extension used to add "energy pattern tags" to the deep learning related questions from Stack Overflow. DENT is aimed at increasing the awareness about the deep learning energy patterns among the developers and improving their adoption.

Download Tool Zip

Installation

System Requirements

Have Python 3.x installed in your system.

From Github

Clone or download this github repository:

git clone https://github.com/rishalab/DENT.git

Navigate into the backend directory:

cd backend

Install the requirements:

pip install -r requirements.txt

To start the server use the following command:

python backend.py

Load the extension directory in the Chrome browser in developer mode. Instructions for loading

Usage

Navigate to a Stack Overflow question page containig a question with one of the following deep learning related tags (tensorflow, theano, keras caffe, pytorch).

Ex: https://stackoverflow.com/questions/67452064/

The energy pattern tag can be seen on the top-left of the question body above the vote button as shown in the figure below. It may take about ~5-10 seconds for the tag to load depending on the system capacity

DENT UI

Approach diagram

  • Classification methodology

    DENT uses centroid based classification to classify a question into one of the enegry patterns. The input text is converted into sentence embeddings using pretrained sentence-BERT model. The cosine similarity of the embeddings with the centroid of every energy pattern is computed. The energy pattern that gives the maximum similarity score is assigned as the output label to the corresponding input document. To ensure that the classifier does not assign energy labels to the questions that are not related to energy, we have a cosine similarity threshold of 0.5. Below this score, no energy pattern is assigned to the input text.

    elegant icons
  • Working of Extension

    The approach of labeling described in the previous step is deployed on a local server using the Flask web framework. The extension monitors the browser forload of GitHub issues page. Once loaded, the text data from each of the issues is extracted and sent as an input to the flask backend server. The server labels the issues using the labeling approach and returns the list of labels for the given issue. This list is used to generate the tag element for each of the labels. These tags areappended to the issues in the webpage

    elegant icons

Results

  • A preliminary evaluation of DENT on 102 Stack Overflow posts achieved an average precision on 0.74 ,recall of 0.66, F1-score of 0.65 with an accuracy of 66%
  • The evaluated posts along with the ground truth and the predictions are available here.
  • A detailed classification report showing class wise precision, recall and F1-scores is available here.

Demo Video

Contributors

Shriram Shanbhag, Sridhar Chimalakonda, Vibhu Saujanya Sharma, Vikrant Kaulgud