Is In-Context Learning a Type of Error-Driven Learning? Evidence from the Inverse Frequency Effect in Structural Priming (2025)

Abstract: Large language models (LLMs) have shown the emergent capability of in-context learning (ICL). One line of research has claimed that ICL is functionally equivalent to gradient descent, a type of error-driven learning mechanism. In this paper, we introduce a new way of diagnosing whether ICL is functionally performing error-driven learning. Our approach is based on the inverse frequency effect (IFE)—a phenomenon in which an agent’s behavior is influenced to a greater degree when presented with improbable examples as compared to more likely ones. The IFE has previously been identified in psycholinguistics where humans exhibit the IFE in the context of structural priming (the tendency for people to produce sentence structures they have encountered recently). In that context, the IFE has been used as evidence that human structural priming must involve error-driven learning mechanisms. In our experiments, we simulated structural priming with ICL and found that LLMs indeed display the IFE, with the effect being stronger in larger models. We conclude that at least in the case we studied, ICL is indeed a type of error-driven learning, supporting the hypothesis that an error signal is implicitly computed in the forward pass during ICL. Our results suggest that both humans and LLMs make use of error-driven processing mechanisms in on-line processing.

## introduction to what extent do humans and language models use similar processing mechanisms? in some ways, language processing by language models and human learners appears to be substantially different. humans display the ability to quickly and flexibly adapt to new contexts, while language models have historically required massive amounts of training data and a large number of parameters to exhibit human-like performance. yet recent pre-trained large language models (llms) have shown the capacity to perform in-context learning (icl): they flexibly adapt to novel tasks with only a small number of demonstrations provided as prompts in the context window without any parameter updates @xcite . this emergent capability could provide a way to bridge the divide between language models and humans: because icl enables llms-like humans-to flexibly adapt to novel contexts, perhaps icl shares important properties with the processing mechanisms used by humans. within the body of research about why icl arises and how it operates, one line of work has aimed to deepen our theoretical understanding of icl by offering functional interpretations of icl as a kind of implicit gradient descent during inference. @xcite demonstrate that transformer models, with appropriate choices of parameters, can process in-context demonstrations in a way that is functionally equivalent to performing gradient updates on the same demonstration examples. @xcite , @xcite , and @xcite show that standard transformers @xcite can be trained to implement learning algorithms for linear regressions under icl-based training objectives. @xcite provide a mathematical construction showing a dual form between transformer attention and gradient descent and interpreted icl as a meta-optimization process that performs implicit fine-tuning. however, @xcite argue that the importance of these theoretical demonstrations is limited in that they do not take icl to be an emergent property, instead assuming a training objective that optimizes for icl. these demonstrations therefore deviate from actual llms pre-trained with natural data with a language modeling training objective. indeed, @xcite find inconsistencies between icl and gradient descent in real models, and therefore leave the equivalence between icl and gradient descent as an open question. in this paper, we aim to better characterize what kind of learning mechanism icl is by drawing a connection between icl and human learning mechanisms, using a case study that allows us to evaluate off-the-shelf llms using natural language data. specifically, we investigate whether icl is a type of error-driven learning such that an error signal is implicitly computed during the forward pass. by focusing on this question, we take some first steps toward understanding whether icl involves implicit gradient descent because gradient descent is one type of error-driven learning. to approach this question, we treat icl as a processing mechanism of llms and borrow insights from methods of studying processing mechanisms in humans: we examine to what extent llms show the inverse frequency effect (ife), a phenomenon in human structural priming @xcite that has been argued to require an error-driven processing mechanism in humans, implicit learning (e.g., @xcite . we focus our attention on the widely studied linguistic phenomenon of the dative alternation where the ife has been robustly attested in humans. we demonstrate that llms not only show a robust ife under standard fine-tuning (which involves explicit gradient descent, a type of error-driven learning), but also varying degrees of the ife under the icl setting, with larger models showing a stronger ife. given the correlation between icl ability and model size, we use our results to conclude that, at least in the cases we study, icl is indeed an error-driven learning mechanism. overall, our results suggest that error-driven learning is an aspect of processing shared by humans and icl-using llms. our study has implications for both nlp/ml (1, 2, & 3) and linguistically-motivated analysis of llms (4 & 5): we find evidence that icl in off-the-shelf llms can be viewed as a form of errordriven learning in at least some cases. in this section, we lay out the building blocks necessary for motivating why we use the ife to diagnose the error-driven nature of icl. our experimental approach is formally described in section 3.1. ## results and analysis for each model and for each prime verb, we plotted p rimebias(pd|pd, v ) and p rimebias(pd|do, v ) against increasing verb biases and used linear regression to find the relationship between priming strength and verb biases. we report the 95% confidence intervals of the fitted slopes to assess the significance of the fitted lines, where intervals below 0 suggest that the slopes are more likely to be negative. ## discussion and conclusion evidence that icl is implicitly an error-driven learning mechanism we started with the question of whether icl could be a processing mechanism of llms that can capture the flexibility and adaptability of human learning mechanisms. one type of error-driven learning mechanism that supports flexible adaptation to data is gradient descent. motivated by previous theoretical proposals that icl could in principle be implicitly performing gradient descent or fine-tuning, we attempted to better characterize what kind of learning icl is in actual models. we focused on one particular aspect of icl: whether it involves an implicit error signal during the forward computation. in contrast to previous analyses of icl, we test standard llms with natural language data. having established a connection between icl and human structural priming, we used the ife to diagnose whether llms behave as if they are implicitly performing error-driven learning when processing a prime sentence. the very nature of the ife requires an error-driven mechanism: processing must in some way be sensitive to the error signal, i.e., the amount of divergence from a model's expectations. in the case of do/pd sentences, the ife is defined based on verb biases: the error signal is created by the degree of mismatch between the expectation on structural alternatives based on the verb bias of the prime verb and the actual perceived prime structure. the psycholinguistic literature discussed in section 2.1 was the first to identify the logic of this connection between the ife and error-driven learning, and it is this logic that we are employing in the framing of this paper. note however that our argumentation does not in any way assume that icl involves the same mechanism as human implicit learning. we found that llms do indeed display the ife in many cases, particularly in larger models. these findings support the hypothesis that an error signal is implicitly computed in the forward pass of icl. differences between models suggests that icl only takes on a gradient-descent-like nature in larger models. more speculatively, these results raise the possibility that error-driven learning might be a crucial property that enables generalization from a small number of samples, an ability that is shared by human learners and (to some extent) llms performing icl. our study not only provides behavioral results that align llm and human behavior in structural priming at the processing mechanism level, but also demonstrates the possibility of studying the nature of icl with off-the-shelf pre-trained llms and with naturalistic data. icl as a consequence of language modeling icl is typically understood as involving demonstration-answer pairs in the prompt. inspired by data-centric views that explain icl from the distributional properties of pre-training data , we proposed a generalized notion of icl that is sensitive to general parallelisms. therefore, icl could be viewed as a side product of the general propensity for structural parallelism in the language modeling task. we leave this perspective for future study.