arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2303.14310cs.CL
收藏

GPT正在成为一台图灵机:以下是一些编程方法

GPT is becoming a Turing machine: Here are some ways to program it

Fred Hutchinson Cancer Research Center(弗雷德·哈钦森癌症研究中心);University of California San Diego(加利福尼亚大学圣迭戈分校);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Microsoft Research(微软研究院)

Ana Jojic, Zhen Wang, Nebojsa Jojic

摘要:

我们证明,通过适当的提示,GPT-3系列的模型可以被触发,以执行必要的迭代行为,执行(而不仅仅是写或回忆)涉及循环的程序,包括在计算机科学课程或软件开发人员访谈中发现的几个流行的算法。我们通过以下三种方式之一(或组合)来触发对自注意力(IRSA)的执行和描述:1)在针对一个特定输入的目标程序的执行路径的示例中使用强重复结构,2)使用执行路径的片段进行重复,以及3)解释禁止(跳过)对所生成的文本的部分的自注意力。在动态程序执行中,IRSA比用功能更强大的GPT-4替换模型带来更大的准确性增益。IRSA在教育中有很好的应用前景,因为提示和响应类似于数据结构和算法课程中的学生作业。我们的研究结果对评估LLM具有影响,LLM通常针对上下文学习:我们表明,甚至可能不覆盖一个完整任务示例的提示可以触发算法行为,允许解决以前认为LLM很难解决的问题,例如逻辑谜题。因此,及时的设计在LLM表现中发挥着比以前认识到的更加关键的作用。

英文摘要:

We demonstrate that, through appropriate prompting, GPT-3 family of models can be triggered to perform iterative behaviours necessary to execute (rather than just write or recall) programs that involve loops, including several popular algorithms found in computer science curricula or software developer interviews. We trigger execution and description of Iterations by Regimenting Self-Attention (IRSA) in one (or a combination) of three ways: 1) Using strong repetitive structure in an example of an execution path of a target program for one particular input, 2) Prompting with fragments of execution paths, and 3) Explicitly forbidding (skipping) self-attention to parts of the generated text. On a dynamic program execution, IRSA leads to larger accuracy gains than replacing the model with the much more powerful GPT-4. IRSA has promising applications in education, as the prompts and responses resemble student assignments in data structures and algorithms classes. Our findings hold implications for evaluating LLMs, which typically target the in-context learning: We show that prompts that may not even cover one full task example can trigger algorithmic behaviour, allowing solving problems previously thought of as hard for LLMs, such as logical puzzles. Consequently, prompt design plays an even more critical role in LLM performance than previously recognized.

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

↑