Benchmarking Large Language Models on Floating-Point Error Classification

📄 arXiv: 2606.31308v1 📥 PDF

作者: Lisa Taldir, Muhammad Ahmad Saeed, David Defour, Pablo de Oliveira Castro, Eric Petit

分类: cs.AI

发布日期: 2026-06-30


💡 一句话要点

提出InterFLOPBench基准以评估LLMs在浮点错误分类中的能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 浮点错误 大型语言模型 多标签分类 软件测试 性能评估

📋 核心要点

  1. 现有方法在浮点错误检测中面临挑战,尤其是在复杂的数值现象上表现不佳。
  2. 论文提出InterFLOPBench基准,通过多标签分类框架评估LLMs在浮点错误检测中的能力。
  3. 实验结果显示,最新的LLMs在浮点错误分类上取得了超过0.88的F1-score,尤其在显式操作上表现更佳。

📝 摘要(中文)

本论文研究了大型语言模型(LLMs)在软件代码中静态检测和分类浮点错误的能力。我们引入了InterFLOPBench,这是一个包含90个C内核和1130个测试样本的基准,旨在评估LLMs在六类浮点错误(如取消、比较、除以零、溢出、下溢和NaN)上的表现。评估框架将浮点错误检测视为多标签分类问题,并采用F1-score指标来衡量性能。结果表明,最新模型(如Qwen 3 32b、Gemini 2.5 Flash等)整体F1-score超过0.88,不同错误类别的性能差异显著。

🔬 方法详解

问题定义:本论文旨在解决大型语言模型在浮点错误检测中的能力不足,现有方法在处理复杂错误时的准确性较低。

核心思路:通过构建InterFLOPBench基准,论文将浮点错误检测视为多标签分类问题,利用F1-score评估模型性能,提升了检测的准确性和全面性。

技术框架:整体架构包括数据集构建、模型训练和评估三个主要模块。数据集包含多种浮点错误类型,模型通过多标签分类进行训练,最后使用F1-score进行性能评估。

关键创新:论文的主要创新在于引入了InterFLOPBench基准,系统性地评估了14种LLMs在浮点错误检测中的表现,填补了现有研究的空白。

关键设计:在实验中,采用了多标签分类损失函数,模型结构经过优化以适应浮点错误的特征,确保了在不同类别上的性能均衡。

🖼️ 关键图片

img_0
img_1

📊 实验亮点

实验结果显示,最新的模型(如Qwen 3 32b、Gemini 2.5 Flash等)在浮点错误分类任务中整体F1-score超过0.88,尤其在除以零操作上表现优异(平均F1-score: 0.8479),而在更复杂的下溢和取消现象上则表现相对较弱(平均F1-score: 0.6059和0.6164)。

🎯 应用场景

该研究的潜在应用领域包括软件开发、自动化测试和代码审查等。通过提高浮点错误的检测能力,能够有效减少软件中的潜在缺陷,提升代码的可靠性和安全性,具有重要的实际价值和未来影响。

📄 摘要(原文)

This paper investigates the capability of Large Language Models (LLMs) to detect and classify floating-point errors statically in software code. We introduce InterFLOPBench, a benchmark of 90 C kernels with 1 130 test samples designed to evaluate LLMs across six categories of floating-point error: cancellation, comparison, division by zero, overflow, underflow and NaN, compared across 14 LLMs. The evaluation framework treats floating-point error detection as a multi-label classification problem and employs the F1-score metric to measure performance. Results demonstrate that latest models (Qwen 3 32b, Gemini 2.5 Flash, Phi 4 Reasoning, DeepSeek R1T2, and gpt-oss 20b and 120b) achieve a performance greater than 0.88 overall F1-score. Performance varies between error categories, between explicit operations such as division by zero (Average F1-score: 0.8479) and more subtle numerical phenomena such as underflow (Average F1-score: 0.6059) and cancellation (Average F1-score: 0.6164).