Saved in:
Bibliographic Details
Main Authors: Liu, Binwen, Xu, Peiyu, Yuan, Quan, Chen, Yihong
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.06475
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909606401277952
author Liu, Binwen
Xu, Peiyu
Yuan, Quan
Chen, Yihong
author_facet Liu, Binwen
Xu, Peiyu
Yuan, Quan
Chen, Yihong
contents We investigate in-context learning (ICL) through a meticulous experimental framework that systematically varies task complexity and model architecture. Extending beyond the linear regression baseline, we introduce Gaussian kernel regression and nonlinear dynamical system tasks, which emphasize temporal and recursive reasoning. We evaluate four distinct models: a GPT2-style Transformer, a Transformer with FlashAttention mechanism, a convolutional Hyena-based model, and the Mamba state-space model. Each model is trained from scratch on synthetic datasets and assessed for generalization during testing. Our findings highlight that model architecture significantly shapes ICL performance. The standard Transformer demonstrates robust performance across diverse tasks, while Mamba excels in temporally structured dynamics. Hyena effectively captures long-range dependencies but shows higher variance early in training, and FlashAttention offers computational efficiency but is more sensitive in low-data regimes. Further analysis uncovers locality-induced shortcuts in Gaussian kernel tasks, enhanced nonlinear separability through input range scaling, and the critical role of curriculum learning in mastering high-dimensional tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2505_06475
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
Liu, Binwen
Xu, Peiyu
Yuan, Quan
Chen, Yihong
Machine Learning
We investigate in-context learning (ICL) through a meticulous experimental framework that systematically varies task complexity and model architecture. Extending beyond the linear regression baseline, we introduce Gaussian kernel regression and nonlinear dynamical system tasks, which emphasize temporal and recursive reasoning. We evaluate four distinct models: a GPT2-style Transformer, a Transformer with FlashAttention mechanism, a convolutional Hyena-based model, and the Mamba state-space model. Each model is trained from scratch on synthetic datasets and assessed for generalization during testing. Our findings highlight that model architecture significantly shapes ICL performance. The standard Transformer demonstrates robust performance across diverse tasks, while Mamba excels in temporally structured dynamics. Hyena effectively captures long-range dependencies but shows higher variance early in training, and FlashAttention offers computational efficiency but is more sensitive in low-data regimes. Further analysis uncovers locality-induced shortcuts in Gaussian kernel tasks, enhanced nonlinear separability through input range scaling, and the critical role of curriculum learning in mastering high-dimensional tasks.
title Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
topic Machine Learning
url https://arxiv.org/abs/2505.06475