🤖 AI Summary
It remains unclear whether in-context learning (ICL) implicitly implements error-driven learning—functionally equivalent to gradient descent—or relies solely on pattern matching. Method: Inspired by psycholinguistic structural priming paradigms, we adapt the inverse frequency effect (IFE)—a well-established behavioral signature of human error-driven learning—to diagnose ICL mechanisms. Using structured ICL prompt templates, we conduct controlled experiments and rigorous statistical analyses across multiple large language models (LLMs), including Llama and GPT variants, spanning diverse parameter scales. Contribution/Results: We demonstrate that ICL elicits a statistically significant IFE in LLMs, with effect magnitude monotonically increasing with model size. This provides the first causal empirical evidence that implicit error signal computation occurs during ICL’s forward pass—challenging purely feedforward interpretations. Our work establishes a novel cognitive science–informed methodology for probing internal learning dynamics in foundation models.
📝 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.