Prior work shows that program-aided reasoning, in which large language models (LLMs) are combined with programs written in programming languages such as Python, can significantly improve accuracy on various reasoning tasks. However, while accuracy is essential, it is also important for such reasoners to "know what they know", which can be quantified through the calibration of the model. In this paper, we compare the calibration of Program Aided Language Models (PAL) and text-based Chain-of-thought (COT) prompting techniques over 5 datasets and 2 model types: LLaMA models and OpenAI models. Our results indicate that PAL leads to improved calibration in 75% of the instances. Our analysis uncovers that prompting styles that produce lesser diversity in generations also have more calibrated results, and thus we also experiment with inducing lower generation diversity using temperature scaling and find that for certain temperatures, PAL is not only more accurate but is also more calibrated than COT. Overall, we demonstrate that, in the majority of cases, program-aided reasoners better know what they know than text-based counterparts.
翻译:先前研究表明,程序辅助推理(即大型语言模型结合Python等编程语言编写的程序)能显著提升各类推理任务的准确率。然而,除准确率外,这类推理器能否"知晓自身所知"同样重要,这可通过模型的校准度进行量化。本文在5个数据集和2类模型(LLaMA模型与OpenAI模型)上,比较了程序辅助语言模型与基于文本的思维链提示技术的校准度。结果表明,PAL在75%的实例中展现出更优的校准度。我们的分析揭示,生成内容多样性较低的提示风格会带来更佳的校准结果,因此我们进一步尝试通过温度缩放降低生成多样性,发现特定温度下PAL不仅准确率更高,校准度也优于COT。总体而言,我们证实了在多数情况下,程序辅助推理器比纯文本推理器更清楚地知晓自身所知。