Natural languages exhibit striking regularities in their statistical structure, including notably the emergence of Zipf's and Heaps' laws. Despite this, it remains broadly unclear how these properties relate to the modern tokenisation schemes used in contemporary transformer models. In this note, we analyse the information content (as measured by the Shannon entropy) of various corpora under the assumption of a Zipfian frequency distribution, and derive a closed-form expression for the slot entropy expectation value. We then empirically investigate how byte--pair encoding (BPE) transforms corpus statistics, showing that recursive applications of BPE drive token frequencies toward a Zipfian power law while inducing a characteristic growth pattern in empirical entropy. Utilizing the ability of transformers to learn context dependent token probability distributions, we train language models on corpora tokenised at varying BPE depths, revealing that the model predictive entropies increasingly agree with Zipf-derived predictions as the BPE depth increases. Attention-based diagnostics further indicate that deeper tokenisation reduces local token dependencies, bringing the empirical distribution closer to the weakly dependent (near IID) regime. Together, these results clarify how BPE acts not only as a compression mechanism but also as a statistical transform that reconstructs key informational properties of natural language.
Infusing clinical knowledge into tokenisers for language models
The UCL Institute of Health Informatics(伦敦大学学院健康信息学研究所);Advanced Care Research Centre(高级护理研究中心);The Usher Institute(乌舍研究所);College of Medicine and Veterinary Medicine(医学与兽医学院);University of Edinburgh(爱丁堡大学);School of Literatures, Languages and Cultures(文学、语言与文化学院);Edinburgh Futures Institute(爱丁堡未来研究所)
Time to Embrace Natural Language Processing (NLP)-based Digital Pathology: Benchmarking NLP- and Convolutional Neural Network-based Deep Learning Pipelines
University of Science and Technology of China(中国科学技术大学);UNSW Sydney(新南威尔士大学);Genmab Inc.(Genmab公司)