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
References
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.

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.