Cognitive Adaptation of Sliding Window Parameters of Large Language Models Based on a High-Speed Area Ratio Method

Main Article Content

Abstract

This paper proposes a method for adaptive control of sliding window parameters in large language models (LLMs) based on Mamdani fuzzy inference with defuzzification using the high-speed area ratio method (MAR-II). The input variables are the type-token ratio (TTR) and the average BPE token length (ATL), interpreted as measurable correlates of the cognitive load of a text fragment. A nine-rule fuzzy controller generates the sliding window stride and context length (max_length). MAR-II is compared with the center of gravity (CoG) method across a 25×25 grid of input space points (RMSE: 99.9 tokens for stride, 147.4 tokens for max_length). It is demonstrated that MAR-II ensures the additivity of the fuzzy model and eliminates the systematic errors of CoG, achieving a single-inference computation time of approximately 35 ns on a Xilinx Spartan 3E FPGA.

Article Details

How to Cite
Brezhneva, E. O. “Cognitive Adaptation of Sliding Window Parameters of Large Language Models Based on a High-Speed Area Ratio Method”. Russian Digital Libraries Journal, vol. 29, no. 5, Sept. 2026, pp. 1906-23, doi:10.26907/1562-5419-2026-29-5-1906-1923.

References

Leekwijck W.V., Kerre E.E. Defuzzification: criteria and classification // Fuzzy Sets and Systems. 1999. Vol. 108. P. 159–178. https://doi.org1 0.1016/S0165-0114(97)00337-0
2. Bobyr M.V., Milostnaya N.A., Kulabuhov S.A. A method of defuzzification based on the approach of areas' ratio // Applied Soft Computing. 2017. Vol. 59. P. 19–32. https://doi.org1 0.1016/j.asoc.2017.05.040
3. Bobyr M.V., Milostnaya N.A., Arkhipov A.E., Luneva M.Yu. Analysis of high-speed defuzzifiers in the problem of robot manipulator control // Vestnik Komp'yuternykh i Informatsionnykh Tekhnologiy. 2020. Vol. 17, No. 4. P. 18–28. https://doi.org1 0.14489/vkit.2020.04.pp.018-028
4. Bobyr M.V., Milostnaya N.A., Belskaya S.Yu. Fuzzy-logic adaptation of sliding window parameters in data preparation for large language models (LLMs) // Elektronnye Biblioteki [Electronic Libraries]. 2026. Vol. 29, No. 4. P. 1–21.
5. Baddeley A. Working memory // Science. 1992. Vol. 255. P. 556–559. https://doi.org1 0.1126/science.1736359
6. Miller G.A. The magical number seven, plus or minus two // Psychological Review. 1956. Vol. 63(2). P. 81–97. https://doi.org1 0.1037/h0043158
7. Bobyr M.V., Yakushev A.S., Dorodnykh A.A. Fuzzy devices for cooling the cutting tool of the CNC machine implemented on FPGA // Measurement. 2020. Vol. 152. P. 107378. https://doi.org1 0.1016/j.measurement.2019.107378
8. Bobyr M.V., Milostnaya N.A., Bulatnikov V.A. The fuzzy filter based on the method of areas' ratio // Applied Soft Computing. 2022. Vol. 117. P. 108449. https://doi.org1 0.1016/j.asoc.2022.108449
9. Bondar O.G., Brezhneva E.O., Golubev D.A. Selection of bit width for nonlinear neuron components in FPGA implementation // Izvestiya Yugo-Zapadnogo Gosudarstvennogo Universiteta [Proceedings of the Southwest State University]. 2025. Vol. 29, No. 4. P. 70–92. https://doi.org1 0.21869/2223-1560-2025-29-4-70-92.