Not logged in.

Contribution Details

Type Master's Thesis
Scope Discipline-based scholarship
Title Generating Code Documentation from Context Information Using Deep Learning A StackOverflow Case Study
Organization Unit
Authors
  • Philipp Mockenhaupt
Supervisors
  • Harald Gall
  • Pasquale Salza
  • Adelina Ciurumelea
Language
  • English
Institution University of Zurich
Faculty Faculty of Business, Economics and Informatics
Date 2020
Abstract Text The Transformer model structure is state-of-the-art in sequence generation, and BERT-like (Bidirectional Encoder Representations from Transformers) general language models are among the best-performing language models for general natural language processing tasks. We investigate whether these state-of-the-art deep learning model architectures can be used to generate code documentation from context information. We do this by defining StackOverflow content as our context information case study and we create the code documentation oracle from documentation that includes a link to StackOverflow found on GitHub. To understand if the structure of the context information affects the results we use two datasets: one is a simple concatenation of different StackOverflow page parts, whereas the other, in addition, indicates the different parts by a keyword. We compare different deep learning approaches and our results indicate that the state-of-the-art in deep learning in connection with natural language processing can be used to generate code documentation from context information, as we outperform the model structure created for the general natural language processing task. The best-performing model is a Transformer with a BERT encoder additionally trained on the StackOverflow data and equipped with additional vocabulary. This model structure outperforms our baseline model Transformer with classical BERT encoder, producing a 14% higher BLEU (Bilingual Evaluation Understudy) score, 8% higher accuracy and a 1.4% decrease in the word mover distance. An improved performance of the raw Transformer structure in connection with a more structured context information indicates the Transformer can gather context information in a flexible way by focusing on different context information parts based on keyword indication.
Zusammenfassung Die Transformer Model Struktur ist die aktuell führende Struktur um geschriebene Sätze zu generieren und BERT (Bidirectional Encoder Representations from Transformers) ähnliche Modelle sind unter den besten Modellen für allgemeine, auf Sprachverständnis basierende Aufgaben. Wir untersuchen, ob diese Modelle benützt werden können, um Code Dokumentation auf Basis von Kontext Information zu erstellen. Für diese Aufgabe fokussieren wir uns in einer Fallstudie auf Kontext Information zusammengetragen von StackOverflow und als Ziel Dokumentation benützen wir Code Dokumentation von GitHub Repositories, welche einen Link zu StackOverflow beinhalten. Um zu verstehen, ob die Struktur der Kontext Information die Resultate beeinflusst, benützen wir zwei Datasets: eines besteht aus einer einfachen Aneinanderreihung von Inhalten verschiedener StackOverflow Seitenbereiche, das andere Dataset markiert diese unterschiedlichen Teile mit einem Stichwort, welches den Typ des Inhalts beschreibt. Wir vergleichen verschiedene Deep Learning Ansätze und die Ergebnisse deuten an, dass die aktuell führenden Deep Learning Modelle Code Dokumentation mit Hilfe von Kontext Information erstellen können, da das Modell entwickelt für den allgemeinen Fall in Performance übertroffen werden kann. Das beste Modell ist ein Transformer mit einem BERT ähnlichen Encoder, welcher zusätzlich mit den StackOverflow Daten trainiert wurde und mit zusätzlichem Vokabular ausgestattet ist. Diese Modell Struktur erzielt im Vergleich zum BERT Modell, trainiert für den allgemeinen Fall, einen BLEU (Bilingual Evaluation Understudy) Score welcher 14% höher ist, eine 8% höhere Genauigkeit und eine um 1.4% niedrigere Word Mover Distance. Das auf dem Original basierende Transformer Modell erzielt auf dem strukturierten Dataset eine höhere Performance, dies ist ein Indiz die Transformer Struktur kann Kontext Information flexibel verarbeiten, indem sich das Modell mit Hilfe von Stichworten auf unterschiedliche Kontext Information fokussieren kann.
PDF File Download
Export BibTeX