Polynomial Regression as a Task for Understanding In-context Learning Through Finetuning and Alignment
Max Wilcoxson, Morten Svendgård, Ria Doshi, Dylan Davis, Reya Vir, Anant Sahai
TL;DR
The paper introduces univariate polynomial regression based on Chebyshev polynomials as a lightweight, structured proxy to study prompting and alignment in in-context learning. It implements a GPT2-style model and compares parameter-efficient fine-tuning methods (LoRA) with soft prompting on polynomial tasks, including a clamping-based alignment toy and a jailbreaking scenario. The results show LoRA generally outperforms soft prompting in low-data regimes, that in-context learning can capture polynomial regression dynamics, and that alignment-like behavior can be learned in-context and manipulated via jailbreaking, echoing observations from larger LLMs. The work argues that this toy setup captures essential ICL and alignment dynamics while enabling clearer visualization and reduced computational costs, offering a useful testbed for future analyses.
Abstract
Simple function classes have emerged as toy problems to better understand in-context-learning in transformer-based architectures used for large language models. But previously proposed simple function classes like linear regression or multi-layer-perceptrons lack the structure required to explore things like prompting and alignment within models capable of in-context-learning. We propose univariate polynomial regression as a function class that is just rich enough to study prompting and alignment, while allowing us to visualize and understand what is going on clearly.
