{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,15]],"date-time":"2026-09-15T02:47:24Z","timestamp":1789440444339,"version":"build-2803163510"},"reference-count":25,"publisher":"Oxford University Press (OUP)","issue":"9","license":[{"start":{"date-parts":[[2025,4,25]],"date-time":"2025-04-25T00:00:00Z","timestamp":1745539200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/academic.oup.com\/pages\/standard-publication-reuse-rights"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"publisher","award":["62306208"],"award-info":[{"award-number":["62306208"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100006606","name":"Tianjin Natural Science Foundation","doi-asserted-by":"publisher","award":["23JCQNJC00920"],"award-info":[{"award-number":["23JCQNJC00920"]}],"id":[{"id":"10.13039\/501100006606","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Tianjin Municipal Education Commission of China","award":["2021SK103"],"award-info":[{"award-number":["2021SK103"]}]},{"name":"Tianjin Xinchuang Haihe Lab of ITAI","award":["22HHXCJC00002"],"award-info":[{"award-number":["22HHXCJC00002"]}]},{"DOI":"10.13039\/501100004826","name":"Beijing Municipal Natural Science Foundation","doi-asserted-by":"publisher","award":["IS23061"],"award-info":[{"award-number":["IS23061"]}],"id":[{"id":"10.13039\/501100004826","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Art Project of National Social Science Foundation of China","award":["23BH157"],"award-info":[{"award-number":["23BH157"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2025,9,21]]},"abstract":"<jats:title>Abstract<\/jats:title>\n               <jats:p>Despite the significant success of transformer models and their successors in various natural language processing (NLP) applications, their internal workings are still not fully understood. Much of the current interpretability research has focused primarily on numerical components, often missing the complex semantic layers within these models. To fill this gap, this study explores the interpretability of the transformer model, a cornerstone of modern NLP, by addressing the semantic complexities of its multi-layer architecture. We identify three key questions: (i) the influence of the multi-layer structure on semantic processing, (ii) the unique contributions of each layer to model performance, and (iii) methodologies for determining optimal layer counts for the encoder and decoder. To tackle these issues, we introduce the semantic interpreter for transformer hierarchy, an innovative framework that employs convex hull metrics to visualize and assess semantic quality and quantity. Our contributions include novel methods for semantic assessment, a dual analytical framework that integrates cumulative and layer-to-layer perspectives, and insights into the dynamics of encoding and decoding. This comprehensive approach aims to enhance the understanding of Transformer models, ultimately guiding their refinement for improved interpretability and effectiveness in natural language tasks.<\/jats:p>","DOI":"10.1093\/comjnl\/bxaf034","type":"journal-article","created":{"date-parts":[[2025,4,24]],"date-time":"2025-04-24T23:47:39Z","timestamp":1745538459000},"page":"1237-1251","source":"Crossref","is-referenced-by-count":1,"title":["Unravelling the semantic mysteries of transformers layer by layer"],"prefix":"10.1093","volume":"68","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1744-9571","authenticated-orcid":false,"given":"Cheng","family":"Zhang","sequence":"first","affiliation":[{"name":"Faculty of Digital Economics and Managements, Tianjin University of Finance and Economics , 25 Zhujiang Road, Hexi District, Tianjin 300221 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6988-4081","authenticated-orcid":false,"given":"Jinxin","family":"Lv","sequence":"additional","affiliation":[{"name":"College of Science and Technology, Tianjin University of Finance and Economics , 25 Zhujiang Road, Hexi District, Tianjin 300221 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8988-9381","authenticated-orcid":false,"given":"Jingxu","family":"Cao","sequence":"additional","affiliation":[{"name":"College of Science and Technology, Tianjin University of Finance and Economics , 25 Zhujiang Road, Hexi District, Tianjin 300221 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4286-1365","authenticated-orcid":false,"given":"Jiachuan","family":"Sheng","sequence":"additional","affiliation":[{"name":"College of Science and Technology, Tianjin University of Finance and Economics , 25 Zhujiang Road, Hexi District, Tianjin 300221 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8660-3608","authenticated-orcid":false,"given":"Dawei","family":"Song","sequence":"additional","affiliation":[{"name":"School of Computer Science, Beijing Institute of Technology , 5 Zhongguancun South Street, Haidian District, Beijing 100081 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-7681-1223","authenticated-orcid":false,"given":"Tiancheng","family":"Zhang","sequence":"additional","affiliation":[{"name":"Department of Intelligence and Computing, Tianjin University , 135 Yaguan Road, Jinnan District, Tianjin 300072 ,","place":["China"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"286","published-online":{"date-parts":[[2025,4,25]]},"reference":[{"key":"2025092201571160200_ref1","first-page":"6000","article-title":"Attention is all you need","volume-title":"Proceedings of the 31st International Conference on Neural Information Processing Systems (NeurIPS)","author":"Vaswani","year":"2017"},{"key":"2025092201571160200_ref2","first-page":"3889","article-title":"Is attention explanation? An introduction to the debate","volume-title":"Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (ACL)","author":"Bibal","year":"2022"},{"key":"2025092201571160200_ref3","first-page":"12963","article-title":"Self-attention attribution: interpreting information interactions inside transformer","volume-title":"Proceedings of the 34th AAAI Conference on Artificial Intelligence (AAAI)","author":"Hao","year":"2021"},{"key":"2025092201571160200_ref4","doi-asserted-by":"crossref","first-page":"276","DOI":"10.18653\/v1\/W19-4828","article-title":"What does BERT look at? An analysis of BERT\u2018s attention","volume-title":"Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP","author":"Clark","year":"2019"},{"key":"2025092201571160200_ref5","doi-asserted-by":"crossref","first-page":"37","DOI":"10.18653\/v1\/P19-3007","article-title":"A multiscale visualization of attention in the transformer model","volume-title":"Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations","author":"Vig","year":"2019"},{"key":"2025092201571160200_ref6","doi-asserted-by":"crossref","first-page":"11","DOI":"10.18653\/v1\/D19-1002","article-title":"Attention is not not explanation","volume-title":"Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)","author":"Wiegreffe","year":"2019"},{"key":"2025092201571160200_ref7","doi-asserted-by":"crossref","first-page":"2996","DOI":"10.18653\/v1\/2020.acl-main.270","article-title":"Improving transformer models by reordering their sublayers","volume-title":"Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL)","author":"Press","year":"2020"},{"key":"2025092201571160200_ref8","first-page":"14211","article-title":"On the expressivity role of layernorm in transformers\u2019 attention","author":"Brody","year":"2023","journal-title":"Findings of the Association for Computational Linguistics (ACL)"},{"key":"2025092201571160200_ref9","doi-asserted-by":"crossref","first-page":"4190","DOI":"10.18653\/v1\/2020.acl-main.385","article-title":"Quantifying attention flow in transformers","volume-title":"Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL)","author":"Abnar","year":"2020"},{"key":"2025092201571160200_ref10","first-page":"10183","article-title":"Synthesizer: rethinking self-attention for transformer models","volume-title":"Proceedings of the 38th International Conference on Machine Learning (ICML)","author":"Tay","year":"2021"},{"key":"2025092201571160200_ref11","first-page":"1956","article-title":"Contributions of transformer attention heads in multi- and cross-lingual tasks","volume-title":"Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJNLP)","author":"Ma","year":"2021"},{"key":"2025092201571160200_ref12","first-page":"4129","article-title":"A structural probe for finding syntax in word representations","volume-title":"Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL)","author":"Hewitt","year":"2019"},{"key":"2025092201571160200_ref13","first-page":"3011","article-title":"Syntax-BERT: improving pre-trained transformers with syntax trees. In: Merlo P, Tiedemann J, Tsarfaty R, (eds). Proceedings of the","volume-title":"16th Conference of the European Chapter of the Association for Computational Linguistics (EACL)","author":"Bai","year":"2021"},{"key":"2025092201571160200_ref14","first-page":"8592","article-title":"Visualizing and measuring the geometry of BERT","volume":"3","author":"Reif","year":"2019","journal-title":"Adv Neural Inform Process Syst"},{"key":"2025092201571160200_ref15","doi-asserted-by":"crossref","first-page":"263","DOI":"10.18653\/v1\/W19-4827","article-title":"From balustrades to Pierre vinken: looking for syntax in transformer self-attentions","volume-title":"Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP","author":"Mare\u010dek","year":"2019"},{"key":"2025092201571160200_ref16","first-page":"1186","article-title":"Understanding neural machine translation by simplification: the case of encoder-free models","volume-title":"Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP)","author":"Tang","year":"2019"},{"key":"2025092201571160200_ref17","first-page":"14211","article-title":"On the expressivity role of LayerNorm in transformers\u2019 attention","volume-title":"Findings of the Association for Computational Linguistics (ACL)","author":"Brody","year":"2023"},{"key":"2025092201571160200_ref18","first-page":"6019","article-title":"Rethinking the value of transformer components","volume-title":"Proceedings of the 28th International Conference on Computational Linguistics (COLING)","author":"Wang","year":"2020"},{"key":"2025092201571160200_ref19","first-page":"1658","article-title":"Assessing the memory ability of recurrent neural networks","volume-title":"Proceedings of the 24th European Conference on Artificial Intelligence (ECAI)","author":"Zhang","year":"2020"},{"key":"2025092201571160200_ref20","first-page":"104","volume-title":"Computational Geometry for Design and Manufacture","author":"Faux","year":"1979"},{"key":"2025092201571160200_ref21","first-page":"791","article-title":"Which words pillar the semantic expression of a sentence?","volume-title":"Proceedings of the 35th IEEE International Conference on Tools with Artificial Intelligence (ICTAI)","author":"Zhang","year":"2023"},{"key":"2025092201571160200_ref22","doi-asserted-by":"crossref","first-page":"256","DOI":"10.18653\/v1\/2021.findings-acl.22","article-title":"How does attention affect the model?","volume-title":"Findings of the Association for Computational Linguistics (ACL-IJCNLP)","author":"Zhang","year":"2021"},{"key":"2025092201571160200_ref23","doi-asserted-by":"crossref","first-page":"364","DOI":"10.18653\/v1\/2021.emnlp-main.30","article-title":"Distilling linguistic context for language model compression","volume-title":"Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP)","author":"Park","year":"2021"},{"key":"2025092201571160200_ref24","doi-asserted-by":"crossref","first-page":"4593","DOI":"10.18653\/v1\/P19-1452","article-title":"BERT rediscovers the classical NLP pipeline","volume-title":"Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL)","author":"Tenney","year":"2019"},{"key":"2025092201571160200_ref25","doi-asserted-by":"crossref","first-page":"70","DOI":"10.18653\/v1\/W16-3210","article-title":"Multi30K: Multilingual English-German image descriptions","volume-title":"Proceedings of the 5th Workshop on Vision and Language","author":"Elliott","year":"2016"}],"container-title":["The Computer Journal"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/academic.oup.com\/comjnl\/article-pdf\/68\/9\/1237\/63002717\/bxaf034.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/academic.oup.com\/comjnl\/article-pdf\/68\/9\/1237\/63002717\/bxaf034.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,9,22]],"date-time":"2025-09-22T05:57:26Z","timestamp":1758520646000},"score":1,"resource":{"primary":{"URL":"https:\/\/academic.oup.com\/comjnl\/article\/68\/9\/1237\/8119372"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,4,25]]},"references-count":25,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2025,4,25]]},"published-print":{"date-parts":[[2025,9,21]]}},"URL":"https:\/\/doi.org\/10.1093\/comjnl\/bxaf034","relation":{},"ISSN":["0010-4620","1460-2067"],"issn-type":[{"value":"0010-4620","type":"print"},{"value":"1460-2067","type":"electronic"}],"subject":[],"published-other":{"date-parts":[[2025,9]]},"published":{"date-parts":[[2025,4,25]]}}}