Table of Contents
Fetching ...

Scaling Automatic Extraction of Pseudocode

Levent Toksoz, Gang Tan, C. Lee Giles

TL;DR

Addresses scaling automatic extraction of pseudocode from scholarly papers, focusing on arXiv where PDF/LaTeX formats are heterogeneous. Proposes an end-to-end extraction pipeline with preprocessing, detection, and extraction stages to harvest pseudocode blocks. Produces a large corpus of about $323{,}303$ pseudocodes from roughly $2.2$ million PDFs, validated via manual labeling of $1000$ papers. TF-IDF and LDA analyses reveal exponential growth of pseudocode usage, a shift toward graph algorithms, and later emergence of machine learning themes, underscoring the resource's potential for NLP/vision tasks and code-generation benchmarks.

Abstract

Pseudocode in a scholarly paper provides a concise way to express the algorithms implemented therein. Pseudocode can also be thought of as an intermediary representation that helps bridge the gap between programming languages and natural languages. Having access to a large collection of pseudocode can provide various benefits ranging from enhancing algorithmic understanding, facilitating further algorithmic design, to empowering NLP or computer vision based models for tasks such as automated code generation and optical character recognition (OCR). We have created a large pseudocode collection by extracting nearly 320,000 pseudocode examples from arXiv papers. This process involved scanning over $2.2$ million scholarly papers, with 1,000 of them being manually inspected and labeled. Our approach encompasses an extraction mechanism tailored to optimize the coverage and a validation mechanism based on random sampling to check its accuracy and reliability, given the inherent heterogeneity of the collection. In addition, we offer insights into common pseudocode structures, supported by clustering and statistical analyses. Notably, these analyses indicate an exponential-like growth in the usage of pseudocodes, highlighting their increasing significance.

Scaling Automatic Extraction of Pseudocode

TL;DR

Addresses scaling automatic extraction of pseudocode from scholarly papers, focusing on arXiv where PDF/LaTeX formats are heterogeneous. Proposes an end-to-end extraction pipeline with preprocessing, detection, and extraction stages to harvest pseudocode blocks. Produces a large corpus of about pseudocodes from roughly million PDFs, validated via manual labeling of papers. TF-IDF and LDA analyses reveal exponential growth of pseudocode usage, a shift toward graph algorithms, and later emergence of machine learning themes, underscoring the resource's potential for NLP/vision tasks and code-generation benchmarks.

Abstract

Pseudocode in a scholarly paper provides a concise way to express the algorithms implemented therein. Pseudocode can also be thought of as an intermediary representation that helps bridge the gap between programming languages and natural languages. Having access to a large collection of pseudocode can provide various benefits ranging from enhancing algorithmic understanding, facilitating further algorithmic design, to empowering NLP or computer vision based models for tasks such as automated code generation and optical character recognition (OCR). We have created a large pseudocode collection by extracting nearly 320,000 pseudocode examples from arXiv papers. This process involved scanning over million scholarly papers, with 1,000 of them being manually inspected and labeled. Our approach encompasses an extraction mechanism tailored to optimize the coverage and a validation mechanism based on random sampling to check its accuracy and reliability, given the inherent heterogeneity of the collection. In addition, we offer insights into common pseudocode structures, supported by clustering and statistical analyses. Notably, these analyses indicate an exponential-like growth in the usage of pseudocodes, highlighting their increasing significance.
Paper Structure (16 sections, 4 figures, 7 tables)

This paper contains 16 sections, 4 figures, 7 tables.

Figures (4)

  • Figure 1: Number of papers scanned over years by the extraction pipeline.
  • Figure 2: Number of papers with LaTeX and "\\ begin{algorithm}" tag.
  • Figure 3: Yearly Distribution of Papers with Keywords (See Table \ref{['tab:indicword']} for keyword details)
  • Figure 4: Category Distribution of Papers with Keywords (See Table \ref{['tab:indicword']} for keyword details)