Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelines

Patrick J. Flynn, Tristan Vanderbruggen, Chunhua Liao, Pei-Hung Lin, Murali Emani, Xipeng Shen · DOI

The field of Machine Learning for code is rapidly expanding, yet it remains a fragmented landscape. This paper serves as a navigational guide, aiming to move Programming Language Processing (PLP) toward "FAIR" (Findable, Accessible, Interoperable, and Reusable) principles by providing a structured framework for building modular code-processing workflows.

The Challenge of Programming Language Processing

While Natural Language Processing (NLP) has matured with standardized models like BERT and GPT, PLP presents unique complexities. Developers face a "Wild West" of fragmented datasets, diverse model architectures (ranging from simple sequences to complex graphs), and the necessity of integrating traditional compiler tools like parsers and scanners. The lack of a standard categorization for these components makes it difficult to select the right model for a specific task or to preserve code logic during tokenization.

A Three-Pillar Taxonomy

To address these gaps, the authors propose a comprehensive taxonomy based on a survey of high-impact PLP publications. This framework categorizes reusable components into three main pillars:

1. Task Taxonomy

Extending the CodeXGLUE benchmark, the authors introduce categories like Code-to-Analysis (predicting performance or compiler metrics) and Semantic Matching (identifying similar code snippets), alongside traditional generation tasks.

The Task Taxonomy categorizes PLP objectives into high-level groups like Code-to-Analysis and Semantic Matching.

2. Architecture Taxonomy

Models are categorized by their operational modality:

  • FFNN/RNN: Suitable for simple sequences.
  • Transformers: Utilized for sequence-to-sequence tasks using encoders, decoders, or both.
  • Graph Neural Networks (GNNs): Essential for representing code structure through Abstract Syntax Trees (ASTs) or control-flow graphs.

3. Tokenization Taxonomy

The paper distinguishes between standard NL tokenizers (e.g., WordPiece) and compiler-based tools such as scanners (lexical analysis), parsers (syntactic analysis), and compilers (semantic analysis).

Mapping the Landscape

A core contribution of this work is a comprehensive mapping that associates specific tasks with the most effective models and datasets. This "lookup table" serves as a practical resource for researchers to identify the right building blocks for their pipelines.

A comprehensive mapping of PLP tasks to corresponding models and benchmark datasets.

Key Insights and Validation

The authors emphasize that code is fundamentally different from text. The Code-to-Analysis category is vital for engineering, where the goal is often to evaluate code quality, performance, or security rather than just generating new snippets. Furthermore, the power of multi-modality is highlighted in models like SynCoBERT, which integrate code tokens, structural information (AST), and natural language comments.

The framework was validated through case studies, including:

  • Zero-Shot Information Discovery: Using pre-trained BERT-like models to cluster OpenMP codes by similarity without task-specific training.
  • C++ Declaration Extraction: Composing a pipeline with a fine-tuned encoder and decoder to perform tasks typically handled by complex compiler front-ends.

Future Directions

While modularity is the goal, interoperability remains a challenge. The authors plan to evolve these taxonomies into a formal ontology. This would enable "workflow synthesis," where systems could automatically suggest and assemble optimized ML pipelines based on high-level user requirements, such as detecting memory leaks in specific languages.

Summary updated

BibTeX
@inproceedings{flynn2022finding,
  author = {Patrick J. Flynn and Tristan Vanderbruggen and Chunhua Liao and Pei-Hung Lin and Murali Emani and Xipeng Shen},
  title = {{Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelines}},
  booktitle = {ECSA (Tracks and Workshops)},
  year = {2022},
  doi = {10.1007/978-3-031-36889-9\_27},
}
Figure