Fuzzy-Logic Adaptation of the Decoding Selectivity Coefficient in Autoregressive Text Generation by Language Models

Main Article Content

Abstract

In autoregressive text generation using language models (LLM), the next token is selected using a softmax function with a fixed decoding coefficient equal to one, which is the same for all generation steps and all text types. This approach does not take into account the dynamically changing linguistic characteristics of the generated context. For example, a text with high lexical diversity requires high selectivity, meaning the decoding coefficient should be small. A monotone, repetitive context requires a smoother distribution, meaning the decoding coefficient should be large. This article proposes a fuzzy controller for calculating the decoding selectivity coefficient using two linguistic features: the lexical diversity of the generated context and the Shannon entropy of the probability distribution at the previous step. The fuzzy controller is implemented using the Mamdani algorithm with a base of nine fuzzy logic rules and a defuzzifier based on the center-of-gravity method. The effectiveness of the proposed approach lies in the fact that for terminologically rich text, the fuzzy controller reduces the Shannon entropy of the probability distribution by more than 20 times compared to the standard approach.

Article Details

How to Cite
Bobyr, M. V., N. A. Milostnaya, and S. Y. Belskaia. “Fuzzy-Logic Adaptation of the Decoding Selectivity Coefficient in Autoregressive Text Generation by Language Models”. Russian Digital Libraries Journal, vol. 29, no. 5, Sept. 2026, pp. 1880-05, doi:10.26907/1562-5419-2026-29-5-1880-1905.

References

Vaswani A., Shazeer N., Parmar N. et al. Attention Is All You Need // Advances in Neural Information Processing Systems. 2017. Vol. 30. P. 6000–6010.
2. Lee S.E. Language Models are Unsupervised Multitask Learners (GPT-2) // OpenAI. Seoul National University, 2024. https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf
3. Rashka S. Building LLM from Scratch. St. Petersburg: Piter, 2026. 384 p.
4. Zadeh L.A. Fuzzy sets // Information and Control. 1965. Vol. 8, No. 3. P. 338–353.
5. Mamdani E.H. Application of fuzzy algorithms for control of simple dynamic plant // Proceedings of the Institution of Electrical Engineers. 1974. Vol. 121(12). P. 1585–1588.
6. Bobyr M.V., Milostnaya N.A., Belskaia S.Yu. Fuzzy-logic adaptation of sliding window parameters in data preparation for large language models // Electronic libraries. 2026. Vol. 29, Is. 4, pp. 1318-37. doi:10.26907/1562-5419-2026-29-4-1318-1337.
7. Bobyr, M., Milostnaya, N., Belskaya, S. A Unified Fuzzy Logic Controller for Adaptive Text Generation in Large Language Models // SSRN. 2026. doi: 10.2139/ssrn.6819385.
8. Klüver J. A mathematical theory of communication: Meaning, information, and topology // Complexity. 2011. Vol. 16 (3). Р. 10–26.
https://doi.org/10.1002/cplx.20317
9. Holtzman A., Buys J., Du L., Forbes M., Choi Y. The curious case of neural text degeneration // Computation and Language. 2020. arXiv:1904.09751. https://doi.org/10.48550/arXiv.1904.09751
10. Bobyr M. Area ratio method for stability analysis of fuzzy logic and neuro-fuzzy systems with bifurcation validation // Information Sciences. 2026. №. 732. P. 122928. https://doi.org/10.1016/j.ins.2025.122928
11. Bobyr M.V. Stability in fuzzy-logic and neuro-fuzzy systems. Moscow: INFRA-M, 2026. 271 p.


Most read articles by the same author(s)