[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-509355-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-509355-en":130},{"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","dnd-boosting-large-language-models-with-dynamic-nested-depth","DND: Boosting Large Language Models with Dynamic Nested Depth","","Dynamic Nested Depth (DND) is introduced as a novel method that improves off-the-shelf large language models by selecting critical tokens and reprocessing them with nested depth. At the end of each transformer layer, DND uses a router to feed harder tokens back for an extra processing round, effectively reviewing difficult tokens while avoiding redundant computation for easier ones. Two control mechanisms—loss-guided routing and threshold-based stability—ensure precise and stable token selection. Experiments integrate DND into pretrained dense and MoE models during post-training, yielding benchmark gains with minimal parameters and limited compute increase.",{"@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/dnd-boosting-large-language-models-with-dynamic-nested-depth/509355/",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/dnd-boosting-large-language-models-with-dynamic-nested-depth/509355.png","ImageObject",300,407,{"name":42,"@type":43},"supergirl","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-20","2026-10-05",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",10,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does DND address in large language models?","Question",{"text":63,"@type":64},"DND targets inefficiency caused by uniform computation across tokens, even though different tokens vary in prediction difficulty. It concentrates extra computation on critical tokens instead of treating all tokens equally.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does DND select which tokens to reprocess?",{"text":68,"@type":64},"At the end of a transformer layer, DND uses a router to identify more critical tokens, then re-feeds the selected tokens for an additional round of transformer processing.",{"name":70,"@type":61,"acceptedAnswer":71},"What mechanisms help DND maintain stable and distinguishable token selection?",{"text":72,"@type":64},"DND employs two strategies: a router that controls loss to improve token selection distinguishability, and a threshold control scheme that ensures selection stability.","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},509355,1791334749,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,126],{"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":55,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":55,"slug":125},"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"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":144,"read_time":145,"preview_page_count":33,"preview_urls":146},962088121634,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","DND: BOOSTING LARGE LANGUAGE MODELS WITH DYNAMIC NESTED DEPTH  \nTieyuan Chen1,2,3* , Xiaodong Chen2,4 , Haoxing Chen2 , Zhenzhong Lan2,5 , Weiyao Lin 1,3†, Jianguo Li2†  \n1 Shanghai Jiao Tong University, 2Inclusion AI, Ant Group 3ZhongguanCun Academy  \n4Renmin University of China, 5Westlake University  \n{tieyuanchen, [wylin](wylin}@sjtu.edu.cn)[}](wylin}@sjtu.edu.cn)[@sjtu.edu.cn](wylin}@sjtu.edu.cn) , [lijg.zero@antgroup.com](lijg.zero@antgroup.com)  \nABSTRACT  \nWe introduce Dynamic Nested Depth (DND), a novel method that improves performance for off-the-shelf LLMs by selecting critical tokens to reprocess in a nested depth manner. Specifically, at the end of the given transformer layer, DND identifies more critical tokens with a router and feeds them back for an extra round of processing, effectively “reviewing” difficult tokens while avoiding redundant computation for easier ones. The dynamic selection mechanism is tailored for precise control via two novel strategies: a router controlling loss to enhance token selection distinguishability, and a threshold control scheme to ensure selection stability. We demonstrate the effectiveness of DND by directly integrating it into pretrained dense and MoE models during a post-training phase. On diverse benchmarks, DND boosts the performances of the dense Qwen3-1.7B, Llama3.2-1B, and Gemma3-1B by 1.88%, 2.61%, and 2.50% and the MoE Qwen3-30B-A3B by 0.87%, all with a minimal parameter and computing increase.  \n1 INTRODUCTION  \nLarge Language Models (LLMs) have transformed artificial intelligence with their powerful abilities. The main strategy for improving them has been scaling, as empirical laws show that model performance predictably increases with more parameters, data, and computation (Achiam et al., 2023; Team et al., 2024; Yang et al., 2025; Liu et al., 2024) . However, this scaling paradigm has significant drawbacks. The computational overhead for both training and inference grows exponentially with model size. This trend underscores a critical need for more efficient approaches to enhance model performance beyond simple brute-force scaling.  \nA key insight from (Gloeckle et al., 2024) is that prediction difficulty varies significantly across tokens; some are trivial to predict, while others demand deep computational processing. This disparity motivates token-level adaptive computation, where models can focus resources on the most critical inputs. A foundational version of this approach is token pruning, which has been shown to be effective across language understanding (Bae et al., 2025), model compression (Yang et al., 2022b), and vision (Hojjat et al., 2025) . By filtering out uninformative tokens, these methods reduce computational overhead and can even improve robustness by mitigating noise. This establishes a binary choice: a token is either discarded or processed normally. Furthermore, we propose the natural next step: instead of merely retaining challenging tokens for standard processing, we should allocate additional computation to them, ensuring these critical tokens are properly understood.  \nOur choice of how to allocate additional computation is inspired by latent strategies in test-time scaling (Hao et al., 2024; Saunshi et al., 2025) . Unlike using explicit output expansion like COT, these methods recur computation in hidden states, scaling inference without extra text generation. They observed that reasoning tokens place uneven demands on computation: as illustrated in Fig. 1, most tokens serve fluency, while a few critical ones drive complex planning or logical transitions. Inspired by these two perspectives, we propose to integrate token-level selection with latent-space deepening. Instead of uniformly applying extra recurrent depth to all tokens, we dynamically select  \n* This work was done when Tieyuan Chen was a research intern at Ant Group.† Corresponding authors.  \nQ: \"Two quantum states with energies E1 and E2 have a lifetime of 10-9 sec and 10-8 sec, r","cbCaitXaPYQGboJU","https://ap.wps.com/l/cbCaitXaPYQGboJU","pdf",1423452,18,"English","# Abstract\n# Introduction\n## Motivation: Token difficulty and adaptive computation\n## From token pruning to additional computation\n## Latent test-time deepening inspiration\n## Proposed architecture: router and nested depth strategy\n## Training and fusion strategy","[{\"question\":\"What problem does DND address in large language models?\",\"answer\":\"DND targets inefficiency caused by uniform computation across tokens, even though different tokens vary in prediction difficulty. It concentrates extra computation on critical tokens instead of treating all tokens equally.\"},{\"question\":\"How does DND select which tokens to reprocess?\",\"answer\":\"At the end of a transformer layer, DND uses a router to identify more critical tokens, then re-feeds the selected tokens for an additional round of transformer processing.\"},{\"question\":\"What mechanisms help DND maintain stable and distinguishable token selection?\",\"answer\":\"DND employs two strategies: a router that controls loss to improve token selection distinguishability, and a threshold control scheme that ensures selection stability.\"}]","DND: Boosting Large Language Models with Dynamic Nested Depth | PDF",1791235181,45,[147,151,155,159],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/805aced420b92a871ee494e9bcfe0318.webp",983,1272,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/432f7c5f710595ad1a682718d311e70c.webp",982,1270,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fe6a2a614ce040f1c5bb47538857187f.webp",981,1269,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d7f40ae1bd8da49294d1e05f503f5833.webp",980,1268]