[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-455438-105":59,"doc-detail-455438-en":131,"doc-similar-455438":163},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","asymptotic-theory-of-in-context-learning-by-linear-attention","Asymptotic theory of in-context learning by linear attention","","Transformers can learn and execute tasks from examples provided in the input without explicit task-specific prior training, yet key requirements remain unclear. This research provides an exactly solvable linear regression ICL model using linear attention and derives sharp asymptotic learning-curve behavior. In a scaling regime where token dimension grows without bound, context length and pretraining task diversity scale proportionally, and pretraining examples scale quadratically, the model shows double-descent learning and a phase transition. Low diversity leads to memorization, while high diversity enables genuine ICL and generalization. Results are validated with linear attention and full nonlinear Transformer experiments.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/asymptotic-theory-of-in-context-learning-by-linear-attention/455438/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/asymptotic-theory-of-in-context-learning-by-linear-attention/455438.png","ImageObject",300,407,{"name":92,"@type":93},"Logic","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-15","2026-09-30",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does the paper address about in-context learning (ICL)?","Question",{"text":113,"@type":114},"It targets unresolved questions about the necessary sample complexity, pretraining task diversity, and context length for ICL to succeed in Transformers.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How is ICL studied in the paper?",{"text":118,"@type":114},"The authors analyze an exactly solvable model of ICL for a linear regression task implemented with a linear attention module.",{"name":120,"@type":111,"acceptedAnswer":121},"What behavior does the model show as pretraining examples increase and task diversity varies?",{"text":122,"@type":114},"It exhibits a double-descent learning curve with increasing pretraining examples, and it undergoes a phase transition: low task diversity favors memorization, while high task diversity enables genuine ICL and generalization.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},455438,1791190129,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":105,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},1099513958762,"https://ap-avatar.wpscdn.com/avatar/1000023916a998db790?x-image-process=image/resize,m_fixed,w_180,h_180&k=1784791008015729253","RESEARCH ARTICLE  \nCOMPUTER SCIENCES  \nAsymptotic theory of in-context learning by linear attention  \nYue M. Lua,1 ID , Mary Leteya, Jacob A. Zavatone-Vetha,b,c,d,2 ID , Anindita Maitie,2, and Cengiz Pehlevana,b,f,1  \nEdited by David Donoho, Stanford University, Stanford, CA; received February 4, 2025; accepted May 15, 2025  \nTransformers have a remarkable ability to learn and execute tasks based on examples provided within the input itself, without explicit prior training. It has been argued that this capability, known as in-context learning (ICL), is a cornerstone of Transformers’success, yet questions about the necessary sample complexity, pretraining task diversity, and context length for successful ICL remain unresolved. Here, we provide a precise answer to these questions in an exactly solvable model of ICL of a linear regression task by linear attention. We derive sharp asymptotics for the learning curve ina phenomenologically rich scaling regime where the token dimension is taken to inﬁnity; the context length and pretraining task diversity scale proportionally with the token dimension; and the number of pretraining examples scales quadratically. We demonstrate a double-descent learning curve with increasing pretraining examples, and uncover a phase transition in the model’s behavior between low and high task diversity regimes: in the low diversity regime, the model tends toward memorization of training tasks, whereas in the high diversity regime, it achieves genuine ICL and generalization beyond the scope of pretrained tasks. These theoretical insights are empirically validated through experiments with both linear attention and full nonlinear Transformer architectures.  \nmachine learning j transformers j in-context learning  \nSince their introduction by Vaswani et al. in (1), Transformers have become a cornerstone of modern AI. Originally designed for sequence modeling tasks, such as language modeling and machine translation, Transformers achieve state-of-the art performance across many domains, even those that are not inherently sequential (2) . Most strikingly, they underpin the breakthroughs achieved by large language models such as BERT (3), LLaMA (4), the GPT series (5–8), the Claude model family (9), and DeepSeek R1 (10) .  \nThe technological advancements enabled by Transformers have inspired a substantial body of research aimed at understanding their working principles. One key observation is that language models gain new behaviors and skills as their number of parameters and the size of their training datasets grow (7, 11–13) . A particularly important emergent skill isin-context learning (ICL), which describes the model’s ability to learn and execute tasks based on the context provided within the input itself, without the need for explicit prior training on those speciﬁc tasks. To give an example from natural language processing, apretrained large language model might be able to successfully translate English to Italian after being prompted with a few example translations, even if it has not been speciﬁcally pretrained on that translation task (7) . ICL enables language models to perform new, specialized tasks without retraining, which is arguably a key reason for their generalpurpose abilities.  \nDespite recent progress in understanding ICL, fundamental questions about when and how ICL emerges in large language models remain unresolved. These models are typically trained or pretrained using a next-token prediction objective, but the impact of various algorithmic and hyperparameter choices during pretraining on ICL performance is still not well understood. What mechanisms do Transformers implement to facilitate ICL? How many pretraining examples are necessary for ICL capabilities to arise? Furthermore, how many examples must be provided within the input context for the model to successfully perform an in-context task? Another important question is the degree of task diversity in the training data: how diverse","cbCailfJTXuMKpF9","https://ap.wps.com/l/cbCailfJTXuMKpF9","pdf",2019723,"English","# Introduction\n# Related Work and Motivation\n# Main Contributions and Model Setup\n# Significance\n# Author Information","[{\"question\":\"What problem does the paper address about in-context learning (ICL)?\",\"answer\":\"It targets unresolved questions about the necessary sample complexity, pretraining task diversity, and context length for ICL to succeed in Transformers.\"},{\"question\":\"How is ICL studied in the paper?\",\"answer\":\"The authors analyze an exactly solvable model of ICL for a linear regression task implemented with a linear attention module.\"},{\"question\":\"What behavior does the model show as pretraining examples increase and task diversity varies?\",\"answer\":\"It exhibits a double-descent learning curve with increasing pretraining examples, and it undergoes a phase transition: low task diversity favors memorization, while high task diversity enables genuine ICL and generalization.\"}]","Asymptotic theory of in-context learning by linear attention | PDF",1790742918,28,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d59445edc37c21a0f9deab3de19f7760.webp",983,1314,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/6cfe2cbdcb377f495112ab257a494816.webp",982,1313,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/b75db871e959b128114ccaed277311cf.webp",981,1312,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f3484695e3cc13935a479b455bcc40a4.webp",980,1310,{"list":164,"token":66},[165,171,178,185,192,199,206,213,220,226],{"doc_id":166,"doc_title":167,"file_type":138,"home_preview_img_url":168,"slug":169,"view_count":145,"category_name":40,"create_tm":170},83115,"Graph Convolutional Attention: A Spectral Perspective on Graph Denoising and Diffusion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808936697/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=MPEllZcihdL5lqo80Zc2t9EI0uY%3D","graph-convolutional-attention-a-spectral-perspective-on-graph-denoising-and-diffusion",1784185374,{"doc_id":172,"doc_title":173,"file_type":138,"home_preview_img_url":174,"slug":175,"view_count":176,"category_name":40,"create_tm":177},327849,"OmniOpt - arXiv 2607 - Taxonomy, Geometry, and Benchmarking of Modern Optimizers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229909096237/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=DC7JGdL69RzMnUbJbeb23K7vA0Y%3D","omniopt-arxiv-2607-taxonomy-geometry-and-benchmarking-of-modern-optimizers",17,1789978184,{"doc_id":179,"doc_title":180,"file_type":138,"home_preview_img_url":181,"slug":182,"view_count":183,"category_name":40,"create_tm":184},84574,"Ghost in the Kernel: In-Context Learning with Efficient Transformers via Domain Generalization","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809061911/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=TOVpngdAJnBtLTGlSSl3WFE%2FgGw%3D","ghost-in-the-kernel-in-context-learning-with-efficient-transformers-via-domain-generalization",25,1784196888,{"doc_id":186,"doc_title":187,"file_type":138,"home_preview_img_url":188,"slug":189,"view_count":190,"category_name":40,"create_tm":191},125511,"Noisy gradient flows - with applications in machine learning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229838536889/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=8CfxSMh4gaOj5BZDDKAmS7iBEdg%3D","noisy-gradient-flows-with-applications-in-machine-learning",24,1785899517,{"doc_id":193,"doc_title":194,"file_type":138,"home_preview_img_url":195,"slug":196,"view_count":197,"category_name":40,"create_tm":198},328023,"Pretraining Curricula Enable Selective Fine-tuning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229909359537/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=iKlURZDVFSUhHCvS%2F81YgPb4dLk%3D","pretraining-curricula-enable-selective-fine-tuning",14,1789978529,{"doc_id":200,"doc_title":201,"file_type":138,"home_preview_img_url":202,"slug":203,"view_count":204,"category_name":40,"create_tm":205},85057,"Hidden Decoding at Scale: Latent Computation Scaling for Large Language Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809238776/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=XHpksfRfeQFP7Uc12SbHAY37Xmo%3D","hidden-decoding-at-scale-latent-computation-scaling-for-large-language-models",32,1784200696,{"doc_id":207,"doc_title":208,"file_type":138,"home_preview_img_url":209,"slug":210,"view_count":211,"category_name":40,"create_tm":212},327212,"Full-Stack FP4 - Stable LLM Pretraining with Quantized Projections, Optimizers, and Attention","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229909310598/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=UY6cd20S5iSC5Y4Txi6lZX6kqHw%3D","full-stack-fp4-stable-llm-pretraining-with-quantized-projections-optimizers-and-attention",18,1789976708,{"doc_id":214,"doc_title":215,"file_type":138,"home_preview_img_url":216,"slug":217,"view_count":218,"category_name":40,"create_tm":219},121450,"Performance Benchmarking of Traditional Machine Learning and Transformer Models for Multi-Class Text - Classification","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835488441/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=eOlmBo0iImHctQ9e%2BhFI9bU37Rk%3D","performance-benchmarking-of-traditional-machine-learning-and-transformer-models-for-multi-class-text-classification",29,1785735716,{"doc_id":221,"doc_title":222,"file_type":138,"home_preview_img_url":223,"slug":224,"view_count":56,"category_name":40,"create_tm":225},123521,"Fundamental limits of learning in sequence multi-index models and deep attention networks - high-dimensional asymptotics and sharp thresholds","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229836845976/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=0QCKy%2FKLOhDdwP2SVz8HE2i6Y0M%3D","fundamental-limits-of-learning-in-sequence-multi-index-models-and-deep-attention-networks-high-dimensional-asymptotics-and-sharp-thresholds",1785817087,{"doc_id":227,"doc_title":228,"file_type":138,"home_preview_img_url":229,"slug":230,"view_count":231,"category_name":40,"create_tm":232},134456,"PolySketchFormer - Fast Transformers via Sketching Polynomial Kernels","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229861044008/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=M%2BaV2RQDle058vml661V0zoEaAA%3D","polysketchformer-fast-transformers-via-sketching-polynomial-kernels",22,1787262769]