How do Pre-Trained Models Support Software Engineering? An Empirical Study in Hugging Face

Alexandra González, Xavier Franch, David Lo, Silverio Martínez-Fernández · DOI

As the open-source AI ecosystem expands, Hugging Face (HF) has emerged as the primary repository for Pre-Trained Models (PTMs). However, its organization remains centered on general Machine Learning categories like Computer Vision or Natural Language Processing, creating a "discovery nightmare" for software engineers. Finding models specifically tailored for tasks like bug localization or requirements engineering often requires manual, time-consuming searches through inconsistent metadata.

This study addresses this gap by developing an automated pipeline to identify and categorize software engineering (SE) models. As shown in the comparison below, this work significantly scales previous efforts, mining over 1.5 million models to create a validated catalog of 2,205 SE-specific PTMs.

Comparison of this study with existing literature on SE task classification and model mining.

Methodology

The researchers implemented a five-phase pipeline designed to bridge the gap between general ML repositories and SE-specific needs:

  1. Taxonomy Construction: Defining a fine-grained taxonomy of 147 specific SE tasks based on existing literature.
  2. Data Collection: Mining the HF API for 1,533,973 models, including model cards, metadata, and linked arXiv abstracts.
  3. Data Processing: Utilizing text normalization and outlier detection to filter out false positives (e.g., distinguishing "logging" as an SE activity from non-SE contexts).
  4. LLM-Based Validation: Employing Gemini 2.0 Flash to validate SE relevance. The team conducted pilot studies with human annotators to refine prompts, achieving a Cohen’s kappa > 0.81.
  5. Data Analysis: Examining the final 2,205 models for temporal trends, licensing, and task distribution.
The five-phase pipeline for identifying and validating SE-specific PTMs on Hugging Face.

Key Insights and Findings

The "Implementation Obsession"

The analysis reveals a heavily lopsided ecosystem. Models for "Software Implementation" (coding) outnumber those for "Software Maintenance" by a ratio of 20 to 1. Early-stage activities, such as Requirements Engineering and Software Design, remain almost entirely neglected by the current PTM landscape.

The Text Generation Monopoly

Despite the complexity of SE tasks, the underlying ML task for nearly all identified models is "Text Generation." This suggests that the research community is currently treating almost every SE problem—from code synthesis to explanation—as a generative language task.

The Transparency and Quality Gap

A critical finding is the lack of standardized reporting. Only 9.6% of the identified SE models report benchmark results in their model cards. Furthermore, many of those that do report results show scores below 50%, suggesting that many models on the hub may not yet be production-ready.

The number of SE models saw an explosion starting in Q2 2023, likely driven by the surge in interest following the release of ChatGPT. In terms of reuse, permissive licenses dominate the field, with Apache 2.0 (857 models) and MIT (278 models) being the most common. Additionally, the ecosystem relies heavily on a few "superstar" base models, such as Llama-3 and StarCoder2, which serve as the foundation for the majority of specialized SE tools.

Limitations and Future Outlook

The study's effectiveness is currently tied to the quality of documentation provided by developers; models with blank descriptions cannot be accurately categorized. While this research provides a comprehensive snapshot of the Hugging Face ecosystem as of March 2025, the authors plan to expand future versions to include other registries like GitHub Models and PyTorch Hub. Ultimately, the goal is to integrate these classifications into automated SE pipelines, allowing IDEs to recommend specific, task-appropriate models in real-time.

Summary updated

BibTeX
@misc{gonzalez2025how,
  author = {Alexandra González and Xavier Franch and David Lo and Silverio Martínez-Fernández},
  title = {{How do Pre-Trained Models Support Software Engineering? An Empirical Study in Hugging Face}},
  year = {2025},
  eprint = {2506.03013},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.03013},
}
Figure