DRAGON无需依赖文档即可高效分类海量代码库,准确率显著提升。
DRAGON: Robust Classification for Very Large Collections of Software Repositories
- 仅用文件名和目录名进行分类,不依赖缺失的README文件。
- 在82.5万仓库上F1@5达60.8%,比之前最好方法高6个百分点。
- 即使无文档仍保持94%性能,适合真实世界稀疏文档场景。
自动为源码仓库打上反映其内容与用途的“主题”标签,在大规模软件集合中导航或搜索时非常有用。然而现有方法常严重依赖README等元数据,这些信息在实际中常缺失,限制了其适用性。我们提出DRAGON,一种专为超大规模、多样化软件集合设计的仓库分类器。它仅使用版本控制系统中常见的轻量级信号:文件和目录名,可选地结合可用的README。在大规模分类任务中,DRAGON将F1@5从54.8%提升至60.8%,超越当前最佳水平。即使没有README,性能仅下降6%,依然有效。许多剩余错误为语义相近的近似标签,提升了预测在真实软件集合中的实用价值,能通过推荐相关主题辅助搜索与发现。作为开发副产品,我们还发布了迄今为止最大的开源仓库分类数据集,包含82.5万仓库及对应的真实主题标签,数据源自Software Heritage档案,为未来大规模、语言无关的软件仓库理解研究奠定基础。
原文摘要 · Abstract (English)
The ability to automatically classify source code repositories with ''topics'' that reflect their content and purpose is very useful, especially when navigating or searching through large software collections. However, existing approaches often rely heavily on README files and other metadata, which are frequently missing, limiting their applicability in real-world large-scale settings. We present DRAGON, a repository classifier designed for very large and diverse software collections. It operates entirely on lightweight signals commonly stored in version control systems: file and directory names, and optionally the README when available. In repository classification at scale, DRAGON improves F1@5 from 54.8% to 60.8%, surpassing the state of the art. DRAGON remains effective even when README files are absent, with performance degrading by only 6% w.r.t. when they are present. This robustness makes it practical for real-world settings where documentation is sparse or inconsistent. Furthermore, many of the remaining classification errors are near misses, where predicted labels are semantically close to the correct topics. This property increases the practical value of the predictions in real-world software collections, where suggesting a few related topics can still guide search and discovery. As a byproduct of developing DRAGON, we also release the largest open dataset to date for repository classification, consisting of 825 thousand repositories with associated ground-truth topics, sourced from the Software Heritage archive, providing a foundation for future large-scale and language-agnostic research on software repository understanding.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。