Interpretability is central for scientific machine learning, as understanding \emph{why} models make predictions enables hypothesis generation and validation. While tabular foundation models show strong performance, existing explanation methods like SHAP are computationally expensive, limiting interactive exploration. We introduce ShapPFN, a foundation model that integrates Shapley value regression directly into its architecture, producing both predictions and explanations in a single forward pass. On standard benchmarks, ShapPFN achieves competitive performance while producing high-fidelity explanations ($R^2$=0.96, cosine=0.99) over 1000\times faster than KernelSHAP (0.06s vs 610s). Our code is available at https://github.com/kunumi/ShapPFN
翻译:可解释性是科学机器学习的关键,因为理解模型为何做出预测能够推动假设生成与验证。尽管表格基础模型展现出强大性能,但现有解释方法(如SHAP)计算成本高昂,限制了交互式探索。我们提出ShapPFN——一种将Shapley值回归直接集成到其架构中的基础模型,能通过单次前向传播同时生成预测与解释。在标准基准测试中,ShapPFN在保持竞争性能的同时,生成高保真解释($R^2$=0.96,余弦相似度=0.99),且速度比KernelSHAP快1000倍以上(0.06秒 vs 610秒)。我们的代码已开源:https://github.com/kunumi/ShapPFN