Capacity Matters: a Proof-of-Concept for Transformer Memorization on Real-World Data

Anton Changalidis, Aki Härmä


Abstract
This paper studies how the model architecture and data configurations influence the empirical memorization capacity of generative transformers. The models are trained using synthetic text datasets derived from the Systematized Nomenclature of Medicine (SNOMED) knowledge graph: triplets, representing static connections, and sequences, simulating complex relation patterns. The results show that embedding size is the primary determinant of learning speed and capacity, while additional layers provide limited benefits and may hinder performance on simpler datasets. Activation functions play a crucial role, and Softmax demonstrates greater stability and capacity. Furthermore, increasing the complexity of the data set seems to improve the final memorization. These insights improve our understanding of transformer memory mechanisms and provide a framework for optimizing model design with structured real-world data.
Anthology ID:
2025.l2m2-1.17
Volume:
Proceedings of the First Workshop on Large Language Model Memorization (L2M2)
Month:
August
Year:
2025
Address:
Vienna, Austria
Editors:
Robin Jia, Eric Wallace, Yangsibo Huang, Tiago Pimentel, Pratyush Maini, Verna Dankers, Johnny Wei, Pietro Lesci
Venues:
L2M2 | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
227–238
Language:
URL:
https://preview.aclanthology.org/landing_page/2025.l2m2-1.17/
DOI:
10.18653/v1/2025.l2m2-1.17
Bibkey:
Cite (ACL):
Anton Changalidis and Aki Härmä. 2025. Capacity Matters: a Proof-of-Concept for Transformer Memorization on Real-World Data. In Proceedings of the First Workshop on Large Language Model Memorization (L2M2), pages 227–238, Vienna, Austria. Association for Computational Linguistics.
Cite (Informal):
Capacity Matters: a Proof-of-Concept for Transformer Memorization on Real-World Data (Changalidis & Härmä, L2M2 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/landing_page/2025.l2m2-1.17.pdf