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

03/25/2023
by   Ana Jojic, et al.
0

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.

READ FULL TEXT

page 4

page 17

page 21

page 22

page 23

page 24

page 25

research
10/04/2020

Mossad: Defeating Software Plagiarism Detection

Automatic software plagiarism detection tools are widely used in educati...
research
08/21/2021

Analyzing the Effect of Consistency Violation Faults in Self-Stabilizing Programs

Consistency violation faults s refer to faults that occur due to inconsi...
research
01/15/2021

Automating Program Structure Classification

When students write programs, their program structure provides insight i...
research
03/22/2019

Anti-Turing Machine

The invention of CPU-centric computing paradigm was incredible breakthro...
research
05/12/2018

Block Oriented Programming: Automating Data-Only Attacks

With the wide deployment of Control-Flow Integrity (CFI), control-flow h...
research
01/28/2021

Eye: Program Visualizer for CS2

In recent years, programming has witnessed a shift towards using standar...
research
08/28/2022

Assessing the Impact of Execution Environment on Observation-Based Slicing

Program slicing reduces a program to a smaller version that retains a ch...

Please sign up or login with your details

Forgot password? Click here to reset