Evaluating faithfulness of Large Language Models (LLMs) to a given task is a complex challenge. We propose two new unsupervised metrics for faithfulness evaluation using insights from information theory and thermodynamics. Our approach treats an LLM as a bipartite information engine where hidden layers act as a Maxwell demon controlling transformations of context $C $ into answer $A$ via prompt $Q$. We model Question-Context-Answer (QCA) triplets as probability distributions over shared topics. Topic transformations from $C$ to $Q$ and $A$ are modeled as transition matrices ${\bf Q}$ and ${\bf A}$ encoding the query goal and actual result, respectively. Our semantic faithfulness (SF) metric quantifies faithfulness for any given QCA triplet by the Kullback-Leibler (KL) divergence between these matrices. Both matrices are inferred simultaneously via convex optimization of this KL divergence, and the final SF metric is obtained by mapping the minimal divergence onto the unit interval [0,1], where higher scores indicate greater faithfulness. Furthermore, we propose a thermodynamics-based semantic entropy production (SEP) metric in answer generation, and show that high faithfulness generally implies low entropy production. The SF and SEP metrics can be used jointly or separately for LLM evaluation and hallucination control. We demonstrate our framework on LLM summarization of corporate SEC 10-K filings.


翻译:评估大型语言模型(LLM)对特定任务的忠实度是一项复杂的挑战。基于信息论与热力学的洞见,我们提出了两种用于忠实度评估的新型无监督度量指标。该方法将LLM视为一个二分信息引擎,其中隐藏层扮演着麦克斯韦妖的角色,通过提示Q控制上下文C到答案A的转换。我们将问题-上下文-答案(QCA)三元组建模为共享主题上的概率分布。从C到Q和A的主题转换分别通过转移矩阵Q和A进行建模,这两个矩阵分别编码了查询目标与实际结果。我们的语义忠实度(SF)指标通过计算这两个矩阵之间的Kullback-Leibler(KL)散度来量化任意给定QCA三元组的忠实度。这两个矩阵通过对此KL散度进行凸优化同时推断得出,最终SF指标通过将最小散度映射到单位区间[0,1]获得,其中更高的分数表示更高的忠实度。此外,我们提出了一种基于热力学的答案生成语义熵产生(SEP)度量,并证明高忠实度通常意味着低熵产生。SF和SEP指标可单独或联合用于LLM评估与幻觉控制。我们在LLM对公司SEC 10-K文件摘要生成任务上验证了该框架。

0
下载
关闭预览

相关内容

UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
【ACL2020-Facebook AI】大规模无监督跨语言表示学习
专知会员服务
34+阅读 · 2020年4月5日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
A Survey of Large Language Models
Arxiv
495+阅读 · 2023年3月31日
Arxiv
82+阅读 · 2023年3月26日
VIP会员
相关资讯
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员