arXiv:2506.19418cs.CL2025-06AAAI被引 2

用语言变分自编码器显式学习并分离文本推理规则,提升模型可解释性与泛化能力。

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

论文配图:Learning to Disentangle Latent Reasoning Rules with Language VAEs: A Systematic Study
图 1 · 摘自论文原文
  • 通过语言VAE在编码器中显式学习功能型推理规则,实现规则解耦
  • 注入先验知识可提升查询检索效率,且0.5B模型在数学推理中存在性能瓶颈
  • 发现前馈层比注意力层更利于保持规则分离,适合可解释推理研究者

将显式推理规则嵌入语言模型的潜在空间,为提升模型泛化能力、可解释性与可控性提供了新路径。尽管当前基于Transformer的语言模型在自然语言推理(NLI)任务上表现强劲,但往往依赖记忆而非规则推理。本文研究如何通过语言变分自编码器(Language VAEs)在模型潜在空间中显式嵌入与记忆推理规则。提出一个完整的流水线,包含三种基于规则的推理任务、支持性理论框架及端到端架构。实验表明:在显式信号监督下,推理规则作为函数映射可在编码器参数空间中实现解耦,输出特征空间呈现明显聚类;将推理信息注入查询(Query),能更有效从记忆中检索对应值(Value),为仅解码器语言模型注入先验知识提供简便方法;在使用Qwen2.5(0.5B)的数学推理任务中,增加样本量无法持续提升性能,且前馈网络(FFN)层比注意力层更能保持推理规则的分离性。

原文摘要 · Abstract (English)

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.

语言模型推理规则变分自编码器可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。