[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-327630-105":59,"doc-detail-327630-en":130},{"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":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","hierarchical-sparse-attention-done-right-toward-infinite-context-modeling-abstract-and-introduction","Hierarchical Sparse Attention Done Right - Toward Infinite Context Modeling - Abstract and Introduction","","Scaling modern large language models to long contexts is limited by quadratic attention computation and weak length extrapolation of dense attention. Chunk-wise sparse attention is a promising alternative, yet existing approaches underperform full attention due to inaccurate chunk selection. The paper proposes Hierarchical Landmark Sparse (HiLS) Attention, learning retrieval-based chunk selection end-to-end under LM loss, with hierarchical factorization and score-fused outputs. Results in Fig. 1 show comparable or improved in-domain performance and strong extrapolation beyond 64× training length, plus faster inference.",{"@graph":69,"@context":122},[70,84,105],{"@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":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/hierarchical-sparse-attention-done-right-toward-infinite-context-modeling-abstract-and-introduction/327630/",{"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/hierarchical-sparse-attention-done-right-toward-infinite-context-modeling-abstract-and-introduction/327630.png","ImageObject",300,407,{"name":92,"@type":93},"Aria","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-09-21",true,{"@type":102,"interactionType":103,"userInteractionCount":44},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why is scaling LLMs to long contexts difficult for full attention?","Question",{"text":112,"@type":113},"Full attention is expensive due to quadratic computation and suffers from poor length extrapolation. It also incurs KV-cache costs that grow with context length, limiting long-context deployment.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What is the core idea behind HiLS Attention?",{"text":117,"@type":113},"HiLS factorizes attention hierarchically and learns chunk selection end-to-end under the language-modeling loss. It fuses retrieved-chunk information using retrieval scores directly in the forward attention computation.",{"name":119,"@type":110,"acceptedAnswer":120},"How does HiLS-Attention perform compared with full attention at long contexts?",{"text":121,"@type":113},"The paper reports comparable or better performance at in-domain context lengths, and it extrapolates beyond 64× the training context length with high retrieval accuracy. It also aims to improve inference efficiency while maintaining effectiveness on general long-context tasks.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},327630,1790437230,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":44,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"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},2336464648322,"https://ap-avatar.wpscdn.com/avatar/2200025388227c56fec?_k=1778556882303663488","arXiv :2607 .02980v 1 [ cs .CL] 3 Jul 2026  \nHierarchical Sparse Attention Done Right: Toward Infinite Context Modeling  \nXiang Hu 1 ∗ Xinyu Wei2∗ Hao Gu3∗ Minshen Zhang4∗ Tian Liang 1  \nHuayang Li 1 Lei Zhu 1 Yan Wang 1 Sirui Han3 Yushi Bai 1 Kewei Tu2 Haitao Mi 1 Leo Liang 1  \n1Tencent HY Team, 2 ShanghaiTech University,  \n3The Hong Kong University of Science and Technology  \n4University of California, San Diego  \n[https://github.com/Tencent-Hunyuan/HiLS-Attention](https://github.com/Tencent-Hunyuan/HiLS-Attention)  \nRULER average exact match (%)  \n100  \n80  \n60  \n40  \n20  \n0  \n95.3 99.0  \n94.7  \n90.7 89.3  \n81.7  \nOlmo3-CPT (YaRN) Olmo3-HiLS-Attn  \n98.7  \nRULER Long-Context Extrapolation 97.3  \n8K 16K 32K 64K 128K 256K 512K 1M  \nContext length  \n(a)  \nLatency (ms/token) Latency (s)  \n60  \n40  \n20  \n0  \n75  \n50  \n25  \n0  \n Full attention  HiLS-Attn  \n(a) Prefill latency  \n8K 16K 32K 64K 128K 256K 512K  \nContext length  \n(b) Decode latency  \n8K 16K 32K 64K 128K 256K 512K  \nContext length  \n(b)  \nScore Score  \n50  \n25  \n0  \n80  \n60  \n40  \n20  \n0  \n Olmo3-CPT  Olmo3-HiLS-Attn  \nLongBench-v1 \u003C 8K LongBench-v1 > 8K Overall  \nSDoc MDoc Summ. Fewshot  \nSynth. Code SDoc MDoc Summ. Few- Synth. Code Overall  \nshot  \n(c)  \nGeneral / Math / Code Tasks  \n| 59.1 | General | 73.0\u003Cbr>69.8 64.264.7 | Math | Code | Average |\n| --- | --- | --- | --- | --- | --- |\n| 56.6 | 55.655.9\u003Cbr>43.0\u003Cbr>38.7 |  | 43.4\u003Cbr>40.0 |  | 43.243.4 |\n|  | 34.3\u003Cbr>31.3 |  | 36.9\u003Cbr>33.4 | 32.332.6\u003Cbr>24.525.1\u003Cbr>19.5 18.9 |  |\n|  |  |  |  |  |  |\n|  |  |  |  |  |  |\n\nMMLU GPQA Hella Swag  \nARC-c BoolQ Race CMath GSM8K CRUX Human MBPP+ Avg.  \nEval+  \n(d)  \nFigure 1: After only 50B continued-training tokens, HiLS-Attention inherits the capability of full attention while bringing two key advantages: strong ultra-long context extrapolation beyond the YaRN-extended 4 × length (Fig. 1a) and faster inference (Fig. 1b) . Meanwhile, it preserves comparable performance for short-and medium-context tasks, within both the original training length and the YaRN-extrapolated range (Fig. 1c & 1d) .  \n∗[Core Contributors. shawnxxxhu@tencent.com](Core Contributors. shawnxxxhu@tencent.com)  \nAbstract  \nScaling modern large language models (LLMs) to long contexts is limited by the quadratic computation cost, and poor length extrapolation of dense attention.  \nChunk-wise sparse attention offers a promising alternative, but all existing methods fall short of full attention because of their inaccurate chunk selection. We propose Hierarchical Landmark Sparse (HiLS) Attention, a chunk-wise sparse attention mechanism that learns chunk selection end-to-end under the language-modeling (LM) loss. HiLS factorizes attention hierarchically: each query performs attention independently with each retrieved chunk to extract chunk-specific information, and the resulting outputs are fused according to chunk retrieval scores. By incorporating retrieval scores into the forward attention computation, HiLS optimizes them directly with the LM loss, enabling end-to-end retrieval learning and native sparse training. Experimental results in Fig 1 show that HiLS-Attention achieves performance comparable to, and in some cases better than, full attention at indomain context lengths. Meanwhile, HiLS-Attention extrapolates more than 64 × the training context length with 90% retrieval accuracy, far beyond full attention.  \nMoreover, existing full-attention models can be converted to HiLS-Attention with lightweight continued pretraining, preserving in-domain performance while acquiring ultra-long-context extrapolation. Together with its sparse KV access and computation, HiLS-Attention breaks the usual efficiency-performance trade-off, enabling long-context LLMs that are both more efficient and more effective on general long-context tasks than their full-attention counterparts.  \n1 Introduction  \nThe ability to model and utilize long contexts has become a fundamental desired capability of modern Large Language Models ","cbCaiaqiYNWzj9jm","https://ap.wps.com/l/cbCaiaqiYNWzj9jm","pdf",1271839,27,"English","# Abstract\n# 1 Introduction\n## Long-context modeling motivation and challenges\n## Chunk-wise sparse attention and its limitations\n## Proposed HiLS Attention approach","[{\"question\":\"Why is scaling LLMs to long contexts difficult for full attention?\",\"answer\":\"Full attention is expensive due to quadratic computation and suffers from poor length extrapolation. It also incurs KV-cache costs that grow with context length, limiting long-context deployment.\"},{\"question\":\"What is the core idea behind HiLS Attention?\",\"answer\":\"HiLS factorizes attention hierarchically and learns chunk selection end-to-end under the language-modeling loss. It fuses retrieved-chunk information using retrieval scores directly in the forward attention computation.\"},{\"question\":\"How does HiLS-Attention perform compared with full attention at long contexts?\",\"answer\":\"The paper reports comparable or better performance at in-domain context lengths, and it extrapolates beyond 64× the training context length with high retrieval accuracy. It also aims to improve inference efficiency while maintaining effectiveness on general long-context tasks.\"}]","Hierarchical Sparse Attention Done Right - Toward Infinite Context Modeling - Abstract and Introduction | PDF",1789977672,68,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e0ce39562815ffda70b9315f5707d3ec.webp",983,1272,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/66fcbd80b4f617abdb6dcec63c0b5a41.webp",982,1270,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/14614952288dac3748d60fa5814a0124.webp",981,1269,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/25c82b594c90cc938788df148cd09fee.webp",980,1268]