给6588个开源项目打上行业标签,助力研究技术扩散与创新地理分布。
Industry Classification of GitHub Repositories Using the North American Industry Classification System (NAICS)
- 用嵌入检索+大模型评分,从百万仓库中筛选高置信度行业标签。
- 人工验证显示96.98%准确率,复现误差小于0.03%。
- 适合研究开源生态、技术扩散或产业分析的学者和从业者。
GitHub 拥有数亿个公开代码库,但平台未提供代码库与标准化行业分类的映射关系。这一空白限制了对创新地理分布、开源生产产业结构及新技术跨行业扩散的实证研究。本文提出 NAICS-GH,一个包含 6,588 个来自美国、欧盟和澳大利亚的 GitHub 代码库的公开语料库,每个代码库均标注了 2 位数的北美产业分类系统(NAICS 2022)行业类别。标签通过「检索-验证」流水线生成,结合 BAAI/bge-large-en 嵌入、FAISS 检索与 GPT-4.1 评分规则。该流程将约 137 万原始代码库缩减至 31,178 个候选配对,最终保留 6,588 个置信度不低于 8 的标签。端到端重跑可复现候选集,差异小于 0.03%。在随机抽取的 2,421 个代码库的人工验证样本上,标签精确率达 96.98%,95% Wilson 置信区间为 [96.23, 97.59]。我们在语料库上评测六种预训练编码器,其中 RoBERTa-large 在 20% 预留测试集上达到 86.45% 的 F1 与 86.35% 的准确率。数据集、元数据(Croissant 格式)、流水线代码、提示模板与微调模型均已开放,采用 CC-BY-4.0 与 MIT 许可证。
原文摘要 · Abstract (English)
GitHub hosts hundreds of millions of public repositories, but the platform exposes no native mapping from repositories to standardized industry sectors. This gap limits empirical work on the geography of innovation, the industrial composition of open-source production, and the diffusion of new technologies across economic sectors. We present NAICS-GH, a publicly released corpus of 6,588 GitHub repositories drawn from source pools covering the United States, the European Union, and Australia, each labeled with a 2-digit sector from the North American Industry Classification System (NAICS 2022). Labels are produced by a retrieve-and-verify pipeline that combines BAAI/bge-large-en embeddings, FAISS retrieval, and GPT-4.1 rubric scoring. The pipeline narrows about 1.37 million source repositories to 31,178 candidate repository-sector pairs and retains 6,588 high-confidence labels with score at least 8. Re-running the retrieval pipeline end to end reproduces the candidate set to within 0.03 percent. On a 2,421-repository human-validated random sample, the released labels attain 96.98 percent precision, with Wilson 95 percent confidence interval [96.23, 97.59]. We benchmark six pretrained encoders on the released corpus; RoBERTa-large reaches 86.45 percent F1 and 86.35 percent accuracy on a held-out 20 percent test set. The dataset, Croissant metadata, pipeline code, prompts, and fine-tuned checkpoint are released under CC-BY-4.0 and MIT licenses.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。