arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2506.19418cs.CL
收藏

学习使用语言VAE解耦潜在推理规则:一项系统性研究

Learning to Disentangle Latent Reasoning Rules with Language VAEs: A Systematic Study

Department of Computer Science, University of Manchester(曼彻斯特大学计算机科学系);School of Computer Science, University of Sheffield(谢菲尔德大学计算机科学学院);Idiap Research Institute(Idiap研究机构);Cancer Biomarker Centre, CRUK Manchester Institute(CRUK曼彻斯特研究所癌症生物标记中心)

Yingji Zhang, Marco Valentino, Danilo S. Carvalho, André Freitas

AI总结:

本研究通过语言VAE在Transformer中显式嵌入推理规则,提出完整学习流程,证明规则可解耦、先验知识可注入,并发现性能瓶颈及ffn层优于注意力层。

摘要:

在语言模型(LMs)的潜在空间内融入显式推理规则,为增强泛化能力、可解释性和可控性提供了一条有前景的途径。尽管当前基于Transformer的语言模型在自然语言推理(NLI)任务上表现出强劲性能,但它们往往依赖记忆而非基于规则的推理。本研究探讨如何通过语言变分自编码器(VAEs)将推理规则显式嵌入并记忆于语言模型中。我们提出了一条在基于Transformer的语言VAE中学习推理规则的完整流程。该流程涵盖三个基于规则的推理任务、一个支撑性理论框架以及一个实用的端到端架构。实验揭示了以下发现:解耦推理:在显式信号监督下,推理规则——视为函数映射——可在编码器的参数空间内被解耦。这种分离导致规则在输出特征空间中形成不同的聚类。先验知识注入:将推理信息注入查询(Query)中,使模型能够更有效地基于键(Key)从记忆中检索存储的值(Value)。该方法为将先验知识整合进仅解码器语言模型提供了一种简单途径。性能瓶颈:在使用Qwen2.5(0.5B)的数学推理任务中,增加样本数量超过某一点后并不能提升性能。此外,前馈(ffn)层在保持模型参数中推理规则分离性方面优于注意力层。

英文摘要:

Incorporating explicit reasoning rules within the latent space of language models (LMs) offers a promising pathway to enhance generalisation, interpretability, and controllability. While current Transformer-based language models have shown strong performance on Natural Language Inference (NLI) tasks, they often rely on memorisation rather than rule-based inference. This work investigates how reasoning rules can be explicitly embedded and memorised within the LMs through Language Variational Autoencoders (VAEs). We propose a complete pipeline for learning reasoning rules within Transformer-based language VAEs. This pipeline encompasses three rule-based reasoning tasks, a supporting theoretical framework, and a practical end-to-end architecture. The experiment illustrates the following findings: Disentangled reasoning: Under explicit signal supervision, reasoning rules - viewed as functional mappings - can be disentangled within the encoder's parametric space. This separation results in distinct clustering of rules in the output feature space. Prior knowledge injection: injecting reasoning information into the Query enables the model to more effectively retrieve the stored value Value from memory based on Key. This approach offers a simple method for integrating prior knowledge into decoder-only language models. Performance bottleneck: In mathematical reasoning tasks using Qwen2.5(0.5B), increasing sample count doesn't improve performance beyond a point. Moreover, ffn layers are better than attention layers at preserving the separation of reasoning rules in the model's parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑