[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-273357-105":59,"doc-detail-273357-en":131},{"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","the-intrinsic-dimension-of-prompts-in-internal-representations-of-large-language-models","The Intrinsic Dimension of Prompts in Internal Representations of Large Language Models","","The study investigates how token representations at the prompt level evolve in large language models using intrinsic dimension as a geometric probe. Treating transformers as mean-field particle systems, it estimates intrinsic dimension across layers and shows correlation with next-token uncertainty measured by average surprisal. Intrinsic dimension peaks in early-to-middle layers and increases under syntactic or semantic disruption via token shuffling. The work also trains a per-layer linear probe to distinguish malicious from benign prompts, reaching 90–95% accuracy and outperforming common guardrails while comparing favorably with tuned-lens entropy approaches.",{"@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/the-intrinsic-dimension-of-prompts-in-internal-representations-of-large-language-models/273357/",{"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/the-intrinsic-dimension-of-prompts-in-internal-representations-of-large-language-models/273357.png","ImageObject",300,407,{"name":92,"@type":93},"Jiven","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-22","2026-09-15",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What does the paper mean by prompt-level intrinsic dimension (ID)?","Question",{"text":113,"@type":114},"Prompt-level ID measures the effective dimensionality of the token point cloud in embedding space using all tokens within a prompt, estimated at each model layer.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How is intrinsic dimension connected to model uncertainty?",{"text":118,"@type":114},"Intrinsic dimension correlates with average surprisal (next-token cross-entropy), with an analysis linking logits-geometry to softmax entropy via effective dimensionality.",{"name":120,"@type":111,"acceptedAnswer":121},"How is intrinsic dimension used for safety screening?",{"text":122,"@type":114},"A linear probe trained on per-layer intrinsic-dimension profiles distinguishes malicious from benign prompts before generation, achieving 90–95% accuracy and outperforming standard guardrails.","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},273357,1790508089,{"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":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":4},1099513958607,"https://ap-avatar.wpscdn.com/avatar/100002390cf8733938c?x-image-process=image/resize,m_fixed,w_180,h_180&k=1778829742770036399","arXiv : 250 1 . 10573v2 [cs .CL] 2 1 Aug 2026  \nThe Intrinsic Dimension of Prompts in Internal Representations of Large Language Models  \nKarthik Viswanathan†,∗ , Yuri Gardinazzi‡,∗ , Giada Panerai, Alberto Cazzaniga, Matteo Biagetti  \nArea Science Park, Trieste, Italy † University of Amsterdam, The Netherlands ‡ University of Trieste, Trieste, Italy  \n∗ Equal contribution.  \nCorrespondence: [matteo. biaget ti@areasciencepark. it](matteo. biaget ti@areasciencepark. it)  \nAbstract  \nWe study the geometry of token representations at the prompt level in large language models through the lens of intrinsic dimension. Viewing transformers as mean-field particle systems, we estimate the intrinsic dimension of the empirical measure at each layer and demonstrate that it correlates with next-token uncertainty. Across models and intrinsic dimension estimators, we find that intrinsic dimension peaks in early to middle layers and increases under syntactic and semantic disruption (by shuffling tokens), and that it is strongly correlated with average surprisal, with a simple analysis linking logits geometry to entropy via softmax. As a case study in practical interpretability and safety, we train a linear probe on the per-layer intrinsic dimension profile to distinguish malicious from benign prompts before generation. This probe achieves accuracy of 90 to 95% in different datasets, outperforming widely used guardrails such as Llama Guard and Shield Gemma.  \nWe further compare against linear probes built from layerwise entropy derived via the Tuned Lens and find that the intrinsic dimension-based probe is competitive and complementary, offering a compact, interpretable signal distributed across layers. Our findings suggest that prompt-level geometry provides actionable signals for monitoring and controlling LLM behavior, and offers a bridge between mechanistic insights and practical safety tools.  \n1 Introduction  \nLarge language models (LLMs) make predictions by iteratively refining token representations across layers. Understanding how these internal representations evolve and what they reveal about the underlying model remains a core challenge for interpretability and safety. We take a geometric perspective, grounded in recent analytic views of transformers as mean-field interacting systems, where token dynamics is governed by their empirical measure, i.e., the layerwise distribution of token representations viewed as a point cloud in embedding space (Vuckovic et al., 2020; Geshkovski et al., 2024; 2025; 2026; Sander et al., 2022) . In particular, Geshkovski et al. (2025) showed that phenomena like rank collapse can be understood by studying the geometry of tokens, motivating further analysis. We propose prompt-level intrinsic dimension (ID), a measure of the effective dimensionality of the token point cloud, to probe the empirical measure at each layer. We aim to show that it directly characterizes the internal geometry that governs token interactions and that it encodes information directly usable for downstream tasks.  \nOur approach is inspired by geometric studies that have measured dataset-level properties using last-token representations (Valeriani et al., 2023; Cheng et al., 2023; Skean et al., 2024; Acevedo et al., 2025) to locate semantic phases across layers. However, last-token analyses obscure intra-prompt structure and do not directly probe the empirical measure governing token dynamics. We instead compute ID at the prompt  \nlevel, i.e. using all tokens within a prompt. This allows us to connect geometry to model uncertainty at theresolution where interactions actually occur.  \nFirst, we provide qualitative evidence that prompt-level geometry tracks semantic organization. Across models, the intrinsic dimension exhibits a characteristic peak in early-to-middle layers, a behaviour that also appears in dataset level representation geometry (Cheng et al., 2025) . When we disrupt syntax and semantics by shuffling tokens, this peak ","cbCaiuLdzwWBo0Im","https://ap.wps.com/l/cbCaiuLdzwWBo0Im","pdf",7470894,28,"English","# Introduction\n## Prompt-level intrinsic dimension (ID)\n## Geometry–uncertainty relationship\n## Pre-output safety screening case study\n## Comparison with tuned-lens entropy","[{\"question\":\"What does the paper mean by prompt-level intrinsic dimension (ID)?\",\"answer\":\"Prompt-level ID measures the effective dimensionality of the token point cloud in embedding space using all tokens within a prompt, estimated at each model layer.\"},{\"question\":\"How is intrinsic dimension connected to model uncertainty?\",\"answer\":\"Intrinsic dimension correlates with average surprisal (next-token cross-entropy), with an analysis linking logits-geometry to softmax entropy via effective dimensionality.\"},{\"question\":\"How is intrinsic dimension used for safety screening?\",\"answer\":\"A linear probe trained on per-layer intrinsic-dimension profiles distinguishes malicious from benign prompts before generation, achieving 90–95% accuracy and outperforming standard guardrails.\"}]","The Intrinsic Dimension of Prompts in Internal Representations of Large Language Models | PDF",1789471037,71]