paperbot · PL 论文追踪

全部论文 待读 收藏

Looks Good, but Does It Run? A Large-Scale Empirical Study of the Executability of Example Code in Model Cards

看起来不错,但能运行吗?模型卡中示例代码可执行性的大规模实证研究
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Simeng Yao, Jialin Zhao, Yang Zhang, Tun Li, Tao Wang, Changrong Xie, Zezhou Tang, Yiwen Wu
crossref: 2026-10-09

AI 速览

一句话:对 Hugging Face 模型卡示例代码开展大规模实证,揭示运行失败普遍,并提出自动修复工具 CardCodeFixer。

模型卡用于说明机器学习模型应如何理解、评估和复用,其中许多还提供示例代码以帮助用户访问模型,但这些代码的可执行性仍缺乏研究。作者以 Hugging Face 作为开放模型仓库,对 291 个模型卡的示例代码进行实证研究,发现 68.38% 的代码片段无法运行。为刻画失败原因,他们构建了包含 15 个错误类别和 24 个子类别的分类体系,并提炼出 50 种可复用修复策略。基于这些发现,作者开发了自动修复工具 CardCodeFixer。实验表明,使用 GPT-4o 时可将可执行率从 29.63% 提升至 56.08%,使用 DeepSeek-v3 时从 31.75% 提升至 51.85%。结果刻画了模型卡示例代码的执行问题,并表明自动修复能有效提升可执行性。

问题
模型卡中的示例代码对模型复用很重要,但其可执行性、失败模式及修复方式尚未得到系统研究。
方法
在 Hugging Face 上对 291 个模型卡的示例代码进行实证分析,构建错误分类体系并提炼修复策略,进而实现基于 LLM 的自动修复工具 CardCodeFixer。
评估
通过可执行率评估 CardCodeFixer,在 GPT-4o 与 DeepSeek-v3 上分别将可执行率从 29.63%/31.75% 提升到 56.08%/51.85%。
原文摘要(Abstract)

Model cards document how machine learning models should be understood, evaluated, and reused in practice. Many also provide example code to help users access and use models, yet the executability of such code remains understudied. We take Hugging Face as an open model repository and conduct an empirical study of model-card example code. Among 291 model cards, 68.38% of the example-code snippets fail to run, suggesting that execution failures are common and may hinder model reuse. To characterize these failures, we construct a taxonomy comprising fifteen error categories and twenty-four subcategories and distill fifty reusable repair strategies. Based on these findings, we develop CardCodeFixer, a tool for automated repair. Experimental results show that CardCodeFixer increases executability from 29.63% to 56.08% with GPT-4o and from 31.75% to 51.85% with DeepSeek-v3. These results characterize execution problems in model-card example code and show that automated repair can improve executability.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot12472,
  title = {Looks Good, but Does It Run? A Large-Scale Empirical Study of the Executability of Example Code in Model Cards},
  author = {Simeng Yao and Jialin Zhao and Yang Zhang and Tun Li and Tao Wang and Changrong Xie and Zezhou Tang and Yiwen Wu},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837507}
}