让CPU完美复现GPU的矩阵运算,实现可信的模型审计
Hawkeye: Reproducing GPU-Level Non-Determinism
- 通过精密测试还原GPU算术细节,支持跨平台精确复现
- 在Ampere/Hopper/Lovelace架构上实现零精度损失的复现
- 适合需要第三方审计模型训练过程的研究者与开发者
我们提出Hawkeye,一个用于分析和复现GPU级算术操作的系统。借助该框架,任何人可在不损失精度的情况下,使用CPU重新执行原本在NVIDIA GPU上运行的机器学习模型训练或推理流程中的矩阵乘法操作。这与以往可验证机器学习方法形成鲜明对比——前者引入显著计算开销,后者则存在鲁棒性差和质量下降问题。Hawkeye的核心技术贡献是一套系统化的精细测试,涵盖NVIDIA Tensor Cores上的舍入方向、次正规数处理以及非结合性累加顺序。我们在多个NVIDIA GPU架构(Ampere、Hopper、Lovelace)和精度类型(FP16、BFP16、FP8)上测试并评估该框架,在所有测试场景中均实现了CPU对矩阵乘法的完全复现,为高效可信的第三方模型训练与推理审计铺平道路。Hawkeye源代码已开源:https://github.com/badasherez/gpu-simulator。
原文摘要 · Abstract (English)
We present Hawkeye, a system for analyzing and reproducing GPU-level arithmetic operations. Using our framework, anyone can re-execute on a CPU the exact matrix multiplication operations underlying a machine learning model training or inference workflow that was executed on an NVIDIA GPU, without any precision loss. This is in stark contrast to prior approaches to verifiable machine learning, which either introduce significant computation overhead to the original model owner, or suffer from non-robustness and quality degradation. The main technical contribution of Hawkeye is a systematic sequence of carefully crafted tests that study rounding direction, subnormal number handling, and order of (non-associative) accumulation during matrix multiplication on NVIDIA's Tensor Cores. We test and evaluate our framework on multiple NVIDIA GPU architectures ( Ampere, Hopper, and Lovelace) and precision types (FP16, BFP16, FP8). In all test cases, Hawkeye enables perfect reproduction of matrix multiplication on a CPU, paving the way for efficient and trustworthy third-party auditing of ML model training and inference. We provide source code for Hawkeye at https://github.com/badasherez/gpu-simulator.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。