Fuzzy-Logic Adaptation of Sliding Window Parameters in Data Preparation for Large Language Models
Main Article Content
Abstract
The article proposes a fuzzy regulator for calculating sliding window parameters to prepare training data for Large Language Models. The traditional approach sets the stride and context length parameters as fixed constants, uniform for the entire text, and does not account for the linguistic characteristics of individual fragments, such as dense scientific text and monotonous, repetitive text. The proposed method utilizes two automatically computed features of a fragment: lexical diversity and the average BPE token length. Based on the Mamdani algorithm with a base of 9 fuzzy logic rules and defuzzification using the center of gravity method, the fuzzy regulator adaptively calculates the stride and context length values for each fragment. The proposed approach has a cognitive interpretation, as it mimics the mechanism of adaptive human attention during reading, for example, complex fragments are processed more attentively with a small stride size.
Article Details
References
2. Touvron H., Lavril T., Izacard G. et al. LLaMA: Open and efficient foundation language models // arXiv preprint. 2023. arXiv:2302.13971. https://doi.org/10.48550/arXiv.2302.13971.
3. Rashka S. Build a Large Language Model (From Scratch) // Manning Publications. 2024. 368 p. ISBN 9781633437166.
4. Radford A., Wu J., Child R. et al. Language models are unsupervised multitask learners // OpenAI Blog. 2019. Vol. 1(8). P. 9.
5. Zadeh L.A. Fuzzy sets // Information and Control. 1965. Vol. 8(3). P. 338–353.
6. Mamdani E.H., Assilian S. An experiment in linguistic synthesis with a fuzzy logic controller // International Journal of Man-Machine Studies. 1975. Vol. 7(1). P. 1–13.
7. Gupta Y., Saini A., Saxena A. Fuzzy logic-based approach to develop hybrid similarity measure for efficient information retrieval // Journal of Information Science. 2014. Vol. 40(6). P. 846–857. https://doi.org/10.1177/0165551514548989
8. Prabowo R., Thelwall M. Sentiment analysis: A combined approach // Journal of Informetrics. 2009. Vol. 3(2). P. 143–157.
9. Bobyr M.V., Milostnaya N.A., Bondarenko B.A., Bobyr M.M. Experimental Study of HSV Threshold Method and U-Net Neural Network in Fire Recognition Task // Automatic Documentation and Mathematical Linguistic. 2025. Vol. 59(4). P. S313–S320. https://doi.org/10.3103/S0005105525701225
10. Rayner K., Pollatsek A. The Psychology of Reading. Lawrence Erlbaum Associates. 1989. 529 p.
11. Jang J.-S.R. ANFIS: Adaptive-network-based fuzzy inference system // IEEE Transactions on Systems, Man, and Cybernetics. 1993. Vol. 23(3). P. 665–685. https://doi.org/ 10.1109/21.256541
12. Bobyr M.V., Arkhipov A., Emelyanov S., Milostnaya N. A method for creating a depth map based on a three-level fuzzy model // Engineering Applications of Artificial Intelligence. 2023. Vol. 117. https://doi.org/10.1016/j.engappai.2022.105629

This work is licensed under a Creative Commons Attribution 4.0 International License.
Presenting an article for publication in the Russian Digital Libraries Journal (RDLJ), the authors automatically give consent to grant a limited license to use the materials of the Kazan (Volga) Federal University (KFU) (of course, only if the article is accepted for publication). This means that KFU has the right to publish an article in the next issue of the journal (on the website or in printed form), as well as to reprint this article in the archives of RDLJ CDs or to include in a particular information system or database, produced by KFU.
All copyrighted materials are placed in RDLJ with the consent of the authors. In the event that any of the authors have objected to its publication of materials on this site, the material can be removed, subject to notification to the Editor in writing.
Documents published in RDLJ are protected by copyright and all rights are reserved by the authors. Authors independently monitor compliance with their rights to reproduce or translate their papers published in the journal. If the material is published in RDLJ, reprinted with permission by another publisher or translated into another language, a reference to the original publication.
By submitting an article for publication in RDLJ, authors should take into account that the publication on the Internet, on the one hand, provide unique opportunities for access to their content, but on the other hand, are a new form of information exchange in the global information society where authors and publishers is not always provided with protection against unauthorized copying or other use of materials protected by copyright.
RDLJ is copyrighted. When using materials from the log must indicate the URL: index.phtml page = elbib / rus / journal?. Any change, addition or editing of the author's text are not allowed. Copying individual fragments of articles from the journal is allowed for distribute, remix, adapt, and build upon article, even commercially, as long as they credit that article for the original creation.
Request for the right to reproduce or use any of the materials published in RDLJ should be addressed to the Editor-in-Chief A.M. Elizarov at the following address: amelizarov@gmail.com.
The publishers of RDLJ is not responsible for the view, set out in the published opinion articles.
We suggest the authors of articles downloaded from this page, sign it and send it to the journal publisher's address by e-mail scan copyright agreements on the transfer of non-exclusive rights to use the work.