Abstract
Context: Open-source Pre-Trained Models (PTMs) provide extensive resources for various Machine Learning (ML) tasks, yet these resources lack a classification tailored to Software Engineering (SE) needs to support the reliable identification and reuse of models for SE. Objective: To address this gap, we derive a taxonomy encompassing 147 SE tasks and apply an SE-oriented classification to PTMs in a popular open-source ML repository, Hugging Face (HF). Method: Our repository mining study followed a five-phase pipeline: (i) identification SE tasks from the literature; (ii) collection of PTM data from the HF API, including model card descriptions and metadata, and the abstracts of the associated arXiv papers; (iii) text processing to ensure consistency; (iv) a two-phase validation of SE relevance, involving humans and LLM assistance, supported by five pilot studies with human annotators and a generalization test; (v) and data analysis. This process yielded a curated catalogue of 2,205 SE PTMs. Results: We find that most SE PTMs target code generation and coding, emphasizing implementation over early or late development stages. In terms of ML tasks, text generation dominates within SE PTMs. Notably, the number of SE PTMs has increased markedly since 2023 Q2, while evaluation remains limited: only 9.6% report benchmark results, mostly scoring below 50%. Conclusions: Our catalogue reveals documentation and transparency gaps, highlights imbalances across SDLC phases, and provides a foundation for automated SE scenarios, such as the sampling and selection of suitable PTMs.
Introduction
The rapid expansion of the open-source AI community has led to a surge in Pre-Trained Models (PTMs) on platforms like Hugging Face (HF). However, HF's native categorization relies on broad machine learning domains (e.g., NLP, Computer Vision), which do not align with the specific needs of the Software Development Life Cycle (SDLC). Software engineers seeking models for specialized tasks like bug detection or architectural design must navigate a vast, heterogeneous repository with minimal SE-specific guidance. This study addresses this challenge by developing an automated framework to identify and categorize HF models according to a comprehensive SE task taxonomy.
Methodology
The research utilizes a five-phase pipeline designed for large-scale repository mining and validation.
- Task Identification: A taxonomy of 147 SE tasks was derived from existing literature, mapped across five SDLC phases.
- Data Collection: Metadata, model cards, and arXiv abstracts were scraped for over 1.5 million PTMs via the HF API.
- Data Processing: Text normalization and keyword searching were performed, followed by outlier detection to filter false positives (e.g., distinguishing "logging" as a task from code snippets containing log statements).
- LLM-Based Validation: Gemini 2.0 Flash was employed to validate model relevance. Prompts were iteratively refined through human-annotated pilot tests to ensure high reliability (Cohen’s kappa > 0.81).
- Data Analysis: The final catalogue was analyzed for trends in task distribution, licensing, and documentation quality.
Comparison with Related Work
This study significantly expands the scale of SE model cataloguing compared to previous efforts in the literature.
As shown in the comparison table, while previous studies focused on smaller subsets of papers or specific model types, this work analyzes over 1.5 million PTMs using a multi-source approach (model cards, metadata, and arXiv abstracts) to identify 2,205 relevant SE models.
Key Findings
SDLC Imbalance
The current landscape of AI for SE is heavily skewed toward the "Software Implementation" phase. Tasks such as code generation and general coding dominate the catalogue, while early-stage activities like requirements engineering and software design are severely underrepresented. For instance, implementation-related tasks had over 2,700 associations, while requirements engineering had only 27.
Documentation and Evaluation Gaps
A significant portion of the HF ecosystem suffers from poor documentation. Approximately 31% of all models lack a model card. Among identified SE models, evaluation transparency is low: only 9.57% report benchmark results. Furthermore, performance on standard benchmarks like HumanEval often remains below 50%, suggesting substantial room for improvement in model efficacy.
Growth and Licensing
The creation of SE-specific models saw a dramatic spike starting in Q2 2023, peaking at 444 new models in Q2 2024. Most of these models are released under permissive licenses, with Apache 2.0 and MIT being the most prevalent, which encourages commercial adoption and further research.
Conclusion
This study provides a curated catalogue of 2,205 SE-specific PTMs and highlights critical gaps in the current ecosystem, particularly regarding documentation and the coverage of the full SDLC. The automated pipeline and resulting dataset serve as a foundation for future work in automated model recommendation and the development of AI tools that support the entire software engineering process beyond just code generation.
Summary updated