Skip to main content
QUICK REVIEW

[论文解读] Memory Augmented Large Language Models are Computationally Universal

Dale Schuurmans|arXiv (Cornell University)|Jan 10, 2023
Topic ModelingComputer Science被引用 9
一句话总结

该论文表明,通过一个固定的大语言模型(Flan-U-PaLM 540B)并通过一个联想读写内存增强,可以在不改变模型权重的情况下模拟通用图灵机。它通过提示和内存交互构建一个存储指令计算机以实现通用性。

ABSTRACT

We show that transformer-based large language models are computationally universal when augmented with an external memory. Any deterministic language model that conditions on strings of bounded length is equivalent to a finite automaton, hence computationally limited. However, augmenting such models with a read-write memory creates the possibility of processing arbitrarily large inputs and, potentially, simulating any algorithm. We establish that an existing large language model, Flan-U-PaLM 540B, can be combined with an associative read-write memory to exactly simulate the execution of a universal Turing machine, $U_{15,2}$. A key aspect of the finding is that it does not require any modification of the language model weights. Instead, the construction relies solely on designing a form of stored instruction computer that can subsequently be programmed with a specific set of prompts.

研究动机与目标

  • 证明基于变换器的语言模型在有限长度字符串条件下若不进行内存增强则计算能力是受限的。
  • 提出一个外部联想内存和一个存储指令计算机以实现任意计算。
  • 展示 Flan-U-PaLM 540B 仅通过提示驱动的内存交互即可精确模拟通用图灵机 U15,2。)

提出的方法

  • 引入一个将键映射到值的外部联想内存 MEMORY,并将其接口作为 RAM 连接到 LLM。
  • 定义一个简单的计算循环,其中 LLM 充当 CPU,内存通过正则表达式的后处理来解析赋值和更新进行有限状态更新。
  • 设计引导提示和一组指令提示,在 MEMORY 和 LLM 提示中实现 U15,2 的状态机。
  • 将 memory location op 作为指令寄存器,并通过拼接模式对提示进行预处理以读取当前内存符号。
  • 证明存储指令计算机可以通过有限的提示-结果行为集合来模拟 U15,2 的每一步计算。

实验结果

研究问题

  • RQ1在外部内存在加持下,固定、预训练的 LLM 能实现通用计算吗?
  • RQ2足以实现通用图灵机的最小化的提示存储指令体系结构是什么?
  • RQ3Flan-U-PaLM 540B 是否能可靠执行所需的提示程序指令以复现图灵机的行为?

主要发现

  • 带内存的 LLM 可以使用有限的提示程序指令来模拟通用图灵机。
  • 交互循环从内存中检索下一个提示,运行 LLM,并基于解析结果更新内存,形成冯诺依曼式的计算循环。
  • 论文提供了具体验证,显示 Flan-U-PaLM 540B 能执行 29 种(状态,符号)情况以模拟 U15,2。
  • 不需要对 LLM 权重进行再训练;通用性通过提示设计和内存解析实现。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。