Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models

preprint OA: closed
Full text JSON View at publisher

Abstract

Abstract Transformer networks, driven by self-attention, are central to Large Language Models. In generative Transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, GPU-stored projections must be loaded into SRAM for each new generation step, causing latency and energy bottlenecks. We present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text processing performance comparable to GPT-2 without training from scratch. Our architecture respectively reduces attention latency and energy consumption by up to two and five orders of magnitude compared to GPUs, marking a significant step toward ultra-fast, low-power generative Transformers.
Full text 12,906 characters · extracted from preprint-html · click to expand
Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models | 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 Article Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models Nathan Leroux, Paul-Philipp Manea, Chirag Sudarshan, Jan Finkbeiner, and 3 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-5461915/v1 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 08 Sep, 2025 Read the published version in Nature Computational Science → Version 1 posted You are reading this latest preprint version Abstract Transformer networks, driven by self-attention, are central to Large Language Models. In generative Transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, GPU-stored projections must be loaded into SRAM for each new generation step, causing latency and energy bottlenecks. We present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text processing performance comparable to GPT-2 without training from scratch. Our architecture respectively reduces attention latency and energy consumption by up to two and five orders of magnitude compared to GPUs, marking a significant step toward ultra-fast, low-power generative Transformers. Physical sciences/Engineering/Electrical and electronic engineering Physical sciences/Mathematics and computing/Computational science In-Memory Computing Transformers Hardware-Algorithm Co-Design Gain cells Large Language Models Full Text Additional Declarations There is NO Competing Interest. Supplementary Files NATCOMPUTSCI242552supplementary.pdf Supplementary Information Cite Share Download PDF Status: Published Journal Publication published 08 Sep, 2025 Read the published version in Nature Computational Science → 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-5461915","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":387204379,"identity":"989a1b58-1b3c-4ee7-8f60-45bf10f5843c","order_by":0,"name":"Nathan Leroux","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA9klEQVRIiWNgGAWjYHACNiC2gDATKoAEM3MDAR3MIC0SEPaHMyABRhK0MM5sA1P4tZiznz/24OcOCTnz9h4zad55tdH87UAtPyq24dRi2ZPMbth7RsJY5swZY2PebcdzZxxmbGDsOXMbpxaDA8lsErxtEokzJHIMH/NuO5bbANTCzNiGR8v5x2ySf9sk6oFaDA7zzjmWO5+glhvJbNJAWxIkgLY8nNlQk7uBsJbHZtKybRKGM3iOFRt8OHYgdyNQy0G8fjmf+EzybZuNvAR78zaJhJq63HnnDx988KMCtxZ0cBhMHiBaPRDUkaJ4FIyCUTAKRggAAGeqVxZCATluAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0000-0003-3672-0870","institution":"Forschungszentrum Jülich","correspondingAuthor":true,"prefix":"","firstName":"Nathan","middleName":"","lastName":"Leroux","suffix":""},{"id":387204380,"identity":"894278e9-b8e4-454d-8413-6158aa3a36eb","order_by":1,"name":"Paul-Philipp Manea","email":"","orcid":"","institution":"Forschungszentrum Jülich, PGI-14","correspondingAuthor":false,"prefix":"","firstName":"Paul-Philipp","middleName":"","lastName":"Manea","suffix":""},{"id":387204381,"identity":"62c4f9a5-bc16-488d-abde-b42521b79da2","order_by":2,"name":"Chirag Sudarshan","email":"","orcid":"","institution":"Forschungszentrum Jülich, PGI-14","correspondingAuthor":false,"prefix":"","firstName":"Chirag","middleName":"","lastName":"Sudarshan","suffix":""},{"id":387204382,"identity":"01a0f778-2933-4f14-be60-36ee58fd37c4","order_by":3,"name":"Jan Finkbeiner","email":"","orcid":"","institution":"Forschungszentrum Jülich, PGI-15, RWTH Aachen","correspondingAuthor":false,"prefix":"","firstName":"Jan","middleName":"","lastName":"Finkbeiner","suffix":""},{"id":387204383,"identity":"ffd5c83c-9503-4b4b-b82e-36c3a149dee9","order_by":4,"name":"Sebastian Siegel","email":"","orcid":"","institution":"Forschungszentrum Jülich, PGI-14","correspondingAuthor":false,"prefix":"","firstName":"Sebastian","middleName":"","lastName":"Siegel","suffix":""},{"id":387204384,"identity":"6dc6e531-e218-4515-bd5e-51dd796829f9","order_by":5,"name":"John Paul Strachan","email":"","orcid":"","institution":"Forschungszentrum Jülich, PGI-14, RWTH Aachen","correspondingAuthor":false,"prefix":"","firstName":"John","middleName":"Paul","lastName":"Strachan","suffix":""},{"id":387204385,"identity":"2b60f92e-9f4c-4ddf-aef8-8c6deb6e561b","order_by":6,"name":"Emre Neftci","email":"","orcid":"https://orcid.org/0000-0003-4556-3758","institution":"Forschungszentrum Jülich","correspondingAuthor":false,"prefix":"","firstName":"Emre","middleName":"","lastName":"Neftci","suffix":""}],"badges":[],"createdAt":"2024-11-15 16:35:37","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-5461915/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-5461915/v1","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1038/s43588-025-00854-1","type":"published","date":"2025-09-08T04:00:00+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":90864451,"identity":"90278d18-0498-4f25-aaaa-9e9ffdbeed6b","added_by":"auto","created_at":"2025-09-09 07:05:38","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":7062684,"visible":true,"origin":"","legend":"Article File","description":"","filename":"NATCOMPUTSCI242552main.pdf","url":"https://assets-eu.researchsquare.com/files/rs-5461915/v1_covered_9f3bff16-9d29-4967-a406-f47509279051.pdf"},{"id":70888162,"identity":"43c6e5ae-4236-461e-9043-da56226a2792","added_by":"auto","created_at":"2024-12-09 02:39:41","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":921479,"visible":true,"origin":"","legend":"\u003cp\u003eSupplementary Information\u003c/p\u003e","description":"","filename":"NATCOMPUTSCI242552supplementary.pdf","url":"https://assets-eu.researchsquare.com/files/rs-5461915/v1/c06e825f83db791add6b2cb2.pdf"}],"financialInterests":"There is \u003cb\u003eNO\u003c/b\u003e Competing Interest.","formattedTitle":"Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"nature-portfolio","isNatureJournal":true,"hasQc":false,"allowDirectSubmit":false,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"","title":"Nature Portfolio","twitterHandle":"","acdcEnabled":false,"dfaEnabled":false,"editorialSystem":"ejp","reportingPortfolio":"","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"In-Memory Computing, Transformers, Hardware-Algorithm Co-Design, Gain cells, Large Language Models","lastPublishedDoi":"10.21203/rs.3.rs-5461915/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-5461915/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Transformer networks, driven by self-attention, are central to Large Language Models. In generative Transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, GPU-stored projections must be loaded into SRAM for each new generation step, causing latency and energy bottlenecks.\r\n\r\nWe present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models.\r\nTo circumvent this problem, we design an initialization algorithm achieving text processing performance comparable to GPT-2 without training from scratch. Our architecture respectively reduces attention latency and energy consumption by up to two and five orders of magnitude compared to GPUs, marking a significant step toward ultra-fast, low-power generative Transformers.","manuscriptTitle":"Analog In-Memory Computing Attention Mechanism for Fast and Energy-Efficient Large Language Models","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-12-09 02:39:36","doi":"10.21203/rs.3.rs-5461915/v1","editorialEvents":[],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"nature-computational-science","isNatureJournal":true,"hasQc":false,"allowDirectSubmit":false,"externalIdentity":"natcomputsci","sideBox":"Learn more about [Nature Computational Science](http://www.nature.com/natcomputsci/)","snPcode":"","submissionUrl":"","title":"Nature Computational Science","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"ejp","reportingPortfolio":"Nature Research","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"f4afdf58-4b25-4abc-964c-86e4931cf735","owner":[],"postedDate":"December 9th, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[{"id":41265869,"name":"Physical sciences/Engineering/Electrical and electronic engineering"},{"id":41265870,"name":"Physical sciences/Mathematics and computing/Computational science"}],"tags":[],"updatedAt":"2025-09-09T07:05:27+00:00","versionOfRecord":{"articleIdentity":"rs-5461915","link":"https://doi.org/10.1038/s43588-025-00854-1","journal":{"identity":"nature-computational-science","isVorOnly":false,"title":"Nature Computational Science"},"publishedOn":"2025-09-08 04:00:00","publishedOnDateReadable":"September 8th, 2025"},"versionCreatedAt":"2024-12-09 02:39:36","video":"","vorDoi":"10.1038/s43588-025-00854-1","vorDoiUrl":"https://doi.org/10.1038/s43588-025-00854-1","workflowStages":[]},"version":"v1","identity":"rs-5461915","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-5461915","identity":"rs-5461915","version":["v1"]},"buildId":"qtupq5eGEP_6zYnWcrvyt","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.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2024) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00