LAG-XAI: A Lie-Inspired Affine Geometric Framework for Interpretable Paraphrasing in Transformer Latent Spaces | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article LAG-XAI: A Lie-Inspired Affine Geometric Framework for Interpretable Paraphrasing in Transformer Latent Spaces Olexander Mazurets, Olexander Barmak, Leonid Bedratyuk, Iurii Krak This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9440491/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Modern Transformer-based language models achieve strong performance in natural language processing tasks, yet their latent semantic spaces remain largely uninterpretable black boxes. This paper introduces LAG-XAI (Lie Affine Geometry for Explainable AI), a geometric framework that models paraphrasing not as discrete word substitutions, but as a structured affine transformation within the embedding space. By conceptualizing paraphrasing as a continuous geometric flow on a semantic manifold, we propose a computationally efficient mean-field approximation inspired by local Lie group actions. This allows us to decompose paraphrase transitions into geometrically interpretable components: rotation, deformation, and translation. Experiments on the noisy PIT-2015 Twitter corpus, encoded with Sentence-BERT, reveal a “linear transparency” phenomenon. The proposed affine operator achieves an AUC of 0.7713. By normalizing against random chance (AUC 0.5), the model captures approximately 80% of the non-linear baseline’s effective classification capacity (AUC 0.8405), offering explicit parametric interpretability in exchange for a moderate drop in absolute accuracy. The model identifies stable geometric characteristics, including a trace-based global operator reconfiguration angle of approximately 27.84° and near-zero deformation, consistent with local isometry. Cross-domain robustness was additionally explored in a zero-shot transfer setting on a sampled subset of the TURL dataset, where the observed geometric patterns were qualitatively consistent with those found on PIT-2015. Furthermore, the practical utility of LAG-XAI was explored in hallucination detection: using a “cheap geometric check” with a threshold calibrated on PIT-2015, the method achieved 95.3% recall on a sampled HaluEval subset by registering deviations beyond the permissible semantic corridor. Precision and F1 are reported as derived estimates under a balanced-prior assumption and the threshold-induced false-positive rate. Overall, the approach provides a mathematically grounded and resource-efficient path toward the mechanistic interpretability of Transformer embedding spaces. Artificial Intelligence and Machine Learning Explainable AI Geometric Deep Learning Transformer Latent Space Paraphrase Modeling Lie Groups LLM Hallucination Detection Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9440491","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":624454135,"identity":"498f16a8-1c9f-4f11-bc11-97b907193d0c","order_by":0,"name":"Olexander Mazurets","email":"","orcid":"https://orcid.org/0000-0002-8900-0650","institution":"Khmelnytskyi National University, Khmelnytskyi, 29016, Ukraine","correspondingAuthor":false,"prefix":"","firstName":"Olexander","middleName":"","lastName":"Mazurets","suffix":""},{"id":624454852,"identity":"5da77ffa-31be-482b-971a-a0de2c0761fd","order_by":1,"name":"Olexander Barmak","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA20lEQVRIiWNgGAWjYBACAzB5gEFOQgIiwNhArBZj0rUkziBaizn72acbfpyxSZ85uzvtMQ+DjeyGAzyGH/BpsexJN7vZcyMtd7bM2e3GPAxpxkAtxhJ4HXYgje0Gz4fDufMkcrdJ8zAcTgRqMcCv5fwztpt/PhxOl4No+Q/SYvwDr5YbaWy3eW4cTpCGaDkA0mKG1xbLGc/YbsucSTOcOSN3m+Qcg2TjmYfZyizwaTHnT2O7+eaYjbzEjdxtEm8q7GT7jjdvvoFPC7o7gZiZBPWjYBSMglEwCrADAA0ZTOh2x90VAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0000-0003-0739-9678","institution":"Khmelnytskyi National University, Khmelnytskyi, 29016, Ukraine","correspondingAuthor":true,"prefix":"","firstName":"Olexander","middleName":"","lastName":"Barmak","suffix":""},{"id":624454853,"identity":"7cd3872c-e777-40c8-890c-951313639311","order_by":2,"name":"Leonid Bedratyuk","email":"","orcid":"https://orcid.org/0000-0002-6076-5772","institution":"Khmelnytskyi National University, Khmelnytskyi, 29016, Ukraine","correspondingAuthor":false,"prefix":"","firstName":"Leonid","middleName":"","lastName":"Bedratyuk","suffix":""},{"id":624454854,"identity":"0f3f46e6-3f74-4afe-8140-0b86e6c0b54e","order_by":3,"name":"Iurii Krak","email":"","orcid":"https://orcid.org/0000-0002-8043-0785","institution":"Taras Shevchenko National University of Kyiv, Kyiv, 03187, Ukraine","correspondingAuthor":false,"prefix":"","firstName":"Iurii","middleName":"","lastName":"Krak","suffix":""}],"badges":[],"createdAt":"2026-04-16 16:14:40","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-9440491/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9440491/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":107485926,"identity":"a56a3825-3985-447b-9403-b10018546d07","added_by":"auto","created_at":"2026-04-22 02:36:50","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1381154,"visible":true,"origin":"","legend":"","description":"","filename":"MazuretsLAGXAIfinal.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9440491/v1_covered_34c769b2-37ea-4d76-a9f4-e9520458acf1.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eLAG-XAI: A Lie-Inspired Affine Geometric Framework for Interpretable Paraphrasing in Transformer Latent Spaces\u003c/strong\u003e\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Khmelnytskyi National University","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Explainable AI, Geometric Deep Learning, Transformer Latent Space, Paraphrase Modeling, Lie Groups, LLM Hallucination Detection","lastPublishedDoi":"10.21203/rs.3.rs-9440491/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9440491/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eModern Transformer-based language models achieve strong performance in natural language processing tasks, yet their latent semantic spaces remain largely uninterpretable black boxes. This paper introduces LAG-XAI (Lie Affine Geometry for Explainable AI), a geometric framework that models paraphrasing not as discrete word substitutions, but as a structured affine transformation within the embedding space. By conceptualizing paraphrasing as a continuous geometric flow on a semantic manifold, we propose a computationally efficient mean-field approximation inspired by local Lie group actions. This allows us to decompose paraphrase transitions into geometrically interpretable components: rotation, deformation, and translation. Experiments on the noisy PIT-2015 Twitter corpus, encoded with Sentence-BERT, reveal a “linear transparency” phenomenon. The proposed affine operator achieves an AUC of 0.7713. By normalizing against random chance (AUC 0.5), the model captures approximately 80% of the non-linear baseline’s effective classification capacity (AUC 0.8405), offering explicit parametric interpretability in exchange for a moderate drop in absolute accuracy. The model identifies stable geometric characteristics, including a trace-based global operator reconfiguration angle of approximately 27.84° and near-zero deformation, consistent with local isometry. Cross-domain robustness was additionally explored in a zero-shot transfer setting on a sampled subset of the TURL dataset, where the observed geometric patterns were qualitatively consistent with those found on PIT-2015. Furthermore, the practical utility of LAG-XAI was explored in hallucination detection: using a “cheap geometric check” with a threshold calibrated on PIT-2015, the method achieved 95.3% recall on a sampled HaluEval subset by registering deviations beyond the permissible semantic corridor. Precision and F1 are reported as derived estimates under a balanced-prior assumption and the threshold-induced false-positive rate. Overall, the approach provides a mathematically grounded and resource-efficient path toward the mechanistic interpretability of Transformer embedding spaces.\u003c/p\u003e","manuscriptTitle":"LAG-XAI: A Lie-Inspired Affine Geometric Framework for Interpretable Paraphrasing in Transformer Latent Spaces","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-04-20 07:17:03","doi":"10.21203/rs.3.rs-9440491/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"f57de125-f750-4a2a-85ca-9bf197e3278f","owner":[],"postedDate":"April 20th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":66465966,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2026-04-20T07:17:03+00:00","versionOfRecord":[],"versionCreatedAt":"2026-04-20 07:17:03","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9440491","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9440491","identity":"rs-9440491","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.