[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-290133-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-290133-en":131,"doc-similar-290133":161},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","delayed-attention-training-improves-length-generalization-in-transformer-rnn-hybrids","Delayed Attention Training Improves Length Generalization in Transformer - RNN Hybrids","","We study length generalization in sequence models on a composite task combining state tracking with associative recall. Prior evidence shows recurrent networks handle state tracking but struggle with recall, while Transformers excel at recall yet fail to extend state tracking to longer sequences. We build hybrid recurrent-attention models and train them jointly on the combined objective to test whether both abilities can be maintained. The Transformer part exploits shortcut strategies, harming length generalization. We identify this shortcut reliance as a key barrier and introduce delayed training of attention layers, which mitigates the effect and yields near-perfect accuracy (>90%) on sequences three times longer than training.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/delayed-attention-training-improves-length-generalization-in-transformer-rnn-hybrids/290133/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/delayed-attention-training-improves-length-generalization-in-transformer-rnn-hybrids/290133.png","ImageObject",300,407,{"name":42,"@type":43},"Aran","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-17","2026-09-17",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What composite problem do the authors study for length generalization?","Question",{"text":63,"@type":64},"They study a sequence modeling task that jointly requires state tracking and associative recall. Correct predictions must answer both the modulo-sum query and the keyed recall query.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Why do Transformer - RNN hybrid models still have poor length generalization?",{"text":68,"@type":64},"The authors find that, inside the hybrids, the Transformer component tends to rely on shortcut solutions. This shortcut reliance undermines generalization to longer sequences.",{"name":70,"@type":61,"acceptedAnswer":71},"What is Delayed Attention Training (DAT) and how does it help?",{"text":72,"@type":64},"DAT deactivates the attention modules during an initial training phase so the recurrent pathway learns state tracking first. After a fixed number of epochs, attention layers are enabled to train jointly, reducing shortcut behavior and improving length generalization to near-perfect (>90%) on longer sequences.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},290133,1789640740,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":33,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":124,"preview_page_count":33,"preview_urls":144},137455076865,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","arXiv :2510 .00258v1 [ cs .LG] 30 Sep 2025  \nDelayed Attention Training Improves Length Generalization in Transformer–RNN Hybrids  \nBuu Phan 1 ∗ Reza Ebrahimi 2 Sanjay Haresh 2 Roland Memisevic2  \n1University of Toronto 2 Qualcomm AI Research †  \n[truong.phan@mail.utoronto.ca](truong.phan@mail.utoronto.ca), {ebrahimi,sanjayh,rmemisev}@qti.qualcomm.com  \nAbstract  \nWe study length generalization in sequence models on a composite problem involving both state tracking and associative recall. Prior work finds that recurrent networks handle state tracking well but struggle with recall, whereas Transformers excel at recall yet fail to extend state-tracking capabilities to longer sequences.  \nMotivated by the complementary strengths of these architectures, we construct hybrid models integrating recurrent and attention-based components, and train them on the combined task to evaluate whether both capabilities can be preserved.  \nOur results reveal that, in such hybrids, the Transformer component tends to exploit shortcut solutions, leading to poor length generalization. We identify this shortcut reliance as a key obstacle and propose a simple yet effective training strategy—delaying the training of the attention layers—that mitigates this effect and significantly improves length generalization performance. Our experiments show that this approach enables hybrid models to achieve near-perfect accuracy (> 90%) on hybrid sequences three times longer than those used during training.  \n1 Introduction  \nTransformers play a central role in modern language models [3, 10] . Part of this success has been attributed to their ability to perform a kind of content-based retrieval, making them especially effective for associative recall and related reasoning tasks prevalent in language modeling [1] . On the other hand, transformers are known to struggle with tasks that require state tracking and to length-generalize in the absence of carefully designed task-specific features or reasoning formats [5, 12] . The reason is that the lack of an inductive bias towards recurrent (step-by-step) processing allows transformers to rely on shortcut heuristics [6](e.g., solving modulo addition without maintaining sequence-level state), leading to brittle length generalization behavior. In contrast, recurrent models such as LSTMs [8] naturally maintain state across long sequences and generalize well on state-tracking tasks, but their fixed-capacity memory makes content-based retrieval challenging for these models.  \nContributions. Given the importance of length generalization for general reasoning, we investigate whether a hybrid architecture can effectively combine the complementary strengths of recurrent and attention-based models. To this end, we design a synthetic task that jointly evaluates a model’s ability to perform both state tracking and selective recall. Our experiments reveal that transformers are prone to adopting shortcut solutions, even within hybrid architectures, thereby undermining their ability to generalize over longer sequences. Nevertheless, we find that by delaying the training of the attention component, we can effectively prevent such shortcuts and enable the network to preserve state-tracking capabilities while still benefiting from the recall advantages of attention.  \n2 Methods and Results  \nExperimental Setup. We design each training instance as a sequence consisting of key–value pairs, followed by two query markers that require multiple different forms of reasoning. Each input  \n∗Work done during internship at Qualcomm AI Research  \n†Qualcomm AI Research is an initiative of Qualcomm Technologies, Inc.  \nWork presented at What Can(’t) Transformers Do? Workshop at NeurIPS 2025 .  \nFigure 1: Left: Hybrid block diagram with a single attention layer, i.e. the red box, which is replicated ×4 in experiments. Right: Accuracy across sequence lengths, evaluated on both in-distribution (≤ 25) and out-of-distribution (> 25) cases. Accuracy with > ","cbCaiub9OXZI98rk","https://ap.wps.com/l/cbCaiub9OXZI98rk","pdf",225858,"English","# Abstract\n# 1 Introduction\n# 2 Methods and Results","[{\"question\":\"What composite problem do the authors study for length generalization?\",\"answer\":\"They study a sequence modeling task that jointly requires state tracking and associative recall. Correct predictions must answer both the modulo-sum query and the keyed recall query.\"},{\"question\":\"Why do Transformer - RNN hybrid models still have poor length generalization?\",\"answer\":\"The authors find that, inside the hybrids, the Transformer component tends to rely on shortcut solutions. This shortcut reliance undermines generalization to longer sequences.\"},{\"question\":\"What is Delayed Attention Training (DAT) and how does it help?\",\"answer\":\"DAT deactivates the attention modules during an initial training phase so the recurrent pathway learns state tracking first. After a fixed number of epochs, attention layers are enabled to train jointly, reducing shortcut behavior and improving length generalization to near-perfect (\\u003e90%) on longer sequences.\"}]","Delayed Attention Training Improves Length Generalization in Transformer - RNN Hybrids | PDF",[145,149,153,157],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/dc1904004fc963278ba830521d2e938f.webp",983,1272,{"page_no":26,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6b2adb1b858f0151a024bfec164f5695.webp",982,1270,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2b623d041eebc69bae6de7db1bdfbbea.webp",981,1269,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/aba3de4acc0d9d5d6434595dd5b59c14.webp",980,1268,{"list":162,"token":11},[163,170,177,184,190,196,203,209,216,222],{"doc_id":164,"doc_title":165,"file_type":138,"home_preview_img_url":166,"slug":167,"view_count":168,"category_name":29,"create_tm":169},82171,"On Locality and Length Generalization in Visual Reasoning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808673782/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=w4YcLXnB6poNlYw0reNQw1JfyxQ%3D","on-locality-and-length-generalization-in-visual-reasoning",17,1784178577,{"doc_id":171,"doc_title":172,"file_type":138,"home_preview_img_url":173,"slug":174,"view_count":175,"category_name":29,"create_tm":176},85347,"Extending LLM Context via Associative Recurrent Memory","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809304167/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=Y2RgHmGCMaelpvDxF1YeW2LX8nY%3D","extending-llm-context-via-associative-recurrent-memory",26,1784202686,{"doc_id":178,"doc_title":179,"file_type":138,"home_preview_img_url":180,"slug":181,"view_count":182,"category_name":29,"create_tm":183},85216,"Context by Distinct Information An Auditable Dirichlet Process Working Memory for Long Redundant Context Streams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809295635/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=eMQ%2Bm2IWXCUO9aRRQ4blxyCz%2BEU%3D","context-by-distinct-information-an-auditable-dirichlet-process-working-memory-for-long-redundant-context-streams",22,1784201805,{"doc_id":185,"doc_title":186,"file_type":138,"home_preview_img_url":187,"slug":188,"view_count":26,"category_name":29,"create_tm":189},760070,"Do LLMs Overcome Shortcut Learning? - An Evaluation of Shortcut Challenges in Large Language Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495258/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=Rw6VyUKpA4GFRUTMl7LbggorXj8%3D","do-llms-overcome-shortcut-learning-an-evaluation-of-shortcut-challenges-in-large-language-models",1795898387,{"doc_id":191,"doc_title":192,"file_type":138,"home_preview_img_url":193,"slug":194,"view_count":116,"category_name":29,"create_tm":195},585377,"Time as a geometric property of the latent space - An empirical study of Time-and-Order RoPE in Knowledge Tracing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229954133943/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=IMd2ikGyLBLpw7JhvhEUi4RwWMs%3D","time-as-a-geometric-property-of-the-latent-space-an-empirical-study-of-time-and-order-rope-in-knowledge-tracing",1792054555,{"doc_id":197,"doc_title":198,"file_type":138,"home_preview_img_url":199,"slug":200,"view_count":201,"category_name":29,"create_tm":202},327455,"A HIPPOCAMPUS FOR LINEAR ATTENTION - An Exact Memory for What the Recurrent State Forgets - arXiv 2607.02303","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229909324242/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=gc%2Fan0YiV6bk7abriiqce7EpiPU%3D","a-hippocampus-for-linear-attention-an-exact-memory-for-what-the-recurrent-state-forgets-arxiv-260702303",18,1789977236,{"doc_id":204,"doc_title":205,"file_type":138,"home_preview_img_url":206,"slug":207,"view_count":201,"category_name":29,"create_tm":208},273842,"TreeWY - Speculative Verification for Gated DeltaNet Hybrids - Abstract","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229899968782/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=0J%2B7BQyasvMyAbNCrVmZyHAku%2Fg%3D","treewy-speculative-verification-for-gated-deltanet-hybrids-abstract",1789472971,{"doc_id":210,"doc_title":211,"file_type":138,"home_preview_img_url":212,"slug":213,"view_count":214,"category_name":29,"create_tm":215},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=1796110199&Signature=VsjN2QCOBf2ri4fEYm%2BhebmAcsk%3D","ghost-in-the-kernel-in-context-learning-with-efficient-transformers-via-domain-generalization",25,1784196888,{"doc_id":217,"doc_title":218,"file_type":138,"home_preview_img_url":219,"slug":220,"view_count":33,"category_name":29,"create_tm":221},684328,"Titans: Learning to Memorize at Test Time - NeurIPS 2025 Paper","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000059278/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=Fi0v5OaXG1KE3xkptrxT8Gc%2BFO0%3D","titans-learning-to-memorize-at-test-time-neurips-2025-paper",1794004489,{"doc_id":223,"doc_title":224,"file_type":138,"home_preview_img_url":225,"slug":226,"view_count":214,"category_name":29,"create_tm":227},124760,"An Expandable Machine Learning-Optimization Framework to Sequential Decision-Making","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229838281670/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110199&Signature=RdxA65b%2FjVdWps4ZVOxeeeWN5Ns%3D","an-expandable-machine-learning-optimization-framework-to-sequential-decision-making",1785894348]