Published April 28, 2026 | Version v1
Journal article Open

Информационно-теоретический бюджет безопасности при генерации кода языковыми моделями: выявление скрытого дрейфа уязвимостей средствами мониторинга взаимной информации

  • 1. Ташкентский университет информационных технологий имени Мухаммада ал-Хорезми, преподаватель, Ташкент, Узбекистан,

Description

Языковые модели заметно ускоряют разработку программного обеспечения, но сохраняют склонность к генерации небезопасного кода. В научной работе предложен бюджет информации безопасности (Security Information Budget, SIB) – мера взаимной информации между скрытыми представлениями модели и контекстом безопасности, отслеживаемая в реальном времени при генерации кода. Предполагается, что снижение SIB предшествует появлению уязвимого фрагмента. Гипотеза проверена на DeepSeek-Coder-33B и Qwen2.5-Coder-32B с использованием CWE-Bench и HumanEval-Security. Мониторинг SIB показал F1 = 0,81 на CWE-Bench и в среднем выявлял риск за 23 токена до генерации уязвимого участка, дополняя существующие средства статического анализа.

Files

7_1124-37-45-Gaipnazarov.pdf

Files (435.8 kB)

Name Size Download all
md5:345b6833ef6c00e4eb5829052cd200dd
435.8 kB Preview Download

Additional details

References

  • Ziegler, A., et al. (2022). Productivity assessment of neural code completion. Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming, pp. 21–29. DOI: 10.1145/3520312.3534864
  • Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2022). Asleep at the keyboard? Assessing the security of GitHub Copilot's code contributions. Proceedings of IEEE S&P 2022, pp. 754–768. DOI: 10.1109/SP46214.2022.9833571
  • Khoury, R., et al. (2023). How secure is code generated by ChatGPT? Proceedings of IEEE SMC 2023, pp. 2445–2450. DOI: 10.1109/SMC53992.2023.10394075
  • Tishby, N., Pereira, F. C., & Bialek, W. (2000). The information bottleneck method. Proceedings of the 37th Annual Allerton Conference on Communication, Control, and Computing, pp. 368–377. arXiv:physics/0004057
  • Guo, D., et al. (2024). DeepSeek-Coder: When the large language model meets programming – the rise of code intelligence. arXiv preprint, arXiv:2401.14196
  • Hui, B., et al. (2024). Qwen2.5-Coder technical report. arXiv preprint, arXiv:2409.12186
  • Zhang, J., et al. (2024). CWE-Bench: A benchmark for evaluating vulnerability detection in AI-generated code. Proceedings of ISSTA 2024, pp. 345–356. DOI: 10.1145/3650212.3680316
  • Tony, C., et al. (2023). LLMSecEval: A dataset of natural language prompts for security evaluations. Proceedings of MSR 2023, pp. 588–592. DOI: 10.1109/MSR59073.2023.00083
  • He, J., & Vechev, M. (2023). Large language models for code: Security hardening and adversarial testing. Proceedings of ACM CCS 2023, pp. 1865–1879. DOI: 10.1145/3576915.3623175
  • PyCQA. (2014). Bandit: A tool designed to find common security issues in Python code. GitHub Repository. URL: https://github.com/PyCQA/bandit
  • Avgustinov, P., et al. (2016). QL: Object-oriented queries on relational data. Proceedings of ECOOP 2016, LIPIcs vol. 56, pp. 2:1–2:25. DOI: 10.4230/LIPIcs.ECOOP.2016.2
  • Fang, R., Bindu, R., & Kang, D. (2024). LLM agents can autonomously exploit one-day vulnerabilities. arXiv preprint, arXiv:2404.08144
  • Tishby, N., & Schwartz-Ziv, R. (2017). Opening the black box of deep neural networks via information. arXiv preprint, arXiv:1703.00810
  • Ge, T., et al. (2025). Reasoning models don't always say what they think. arXiv preprint, arXiv:2503.06365
  • Voita, E., Titov, I., & Sennrich, R. (2019). The bottom-up evolution of representations in the transformer: A study with machine translation and language modeling objectives. Proceedings of EMNLP-IJCNLP 2019, pp. 4396–4406. DOI: 10.18653/v1/D19-1448
  • Xiao, T., et al. (2023). Efficient guided generation for large language models. arXiv preprint, arXiv:2302.09928
  • Kirchenbauer, J., et al. (2023). A watermark for large language models. Proceedings of ICML 2023, PMLR 202, pp. 17061–17084
  • Belghazi, M. I., et al. (2018). MINE: Mutual information neural estimation. Proceedings of ICML 2018, PMLR 80, pp. 531–540
  • Kraskov, A., Stögbauer, H., & Grassberger, P. (2004). Estimating mutual information. Physical Review E, 69(6), 066138. DOI: 10.1103/PhysRevE.69.066138
  • He, J., & Vechev, M. (2023). SVEN: Security and vulnerability-enabling/disabling language models for code. arXiv preprint, arXiv:2311.12509
  • Chen, M., et al. (2021). Evaluating large language models trained on code. arXiv preprint, arXiv:2107.03374
  • Li, R., et al. (2023). StarCoder: May the source be with you! Transactions on Machine Learning Research, ISSN 2835-8856
  • Rozière, B., et al. (2023). Code Llama: Open foundation models for code. arXiv preprint, arXiv:2308.12950
  • Banerjee, S., & Chua, C. E. H. (2024). Static analysis meets large language models: A security-focused survey. ACM Computing Surveys, 56(8), Article 193. DOI: 10.1145/3631534
  • Siddiq, M. L., & Santos, J. C. S. (2022). SecurityEval dataset: Mining vulnerability examples to evaluate machine learning-based code generation techniques. Proceedings of MSR4PS 2022, pp. 29–33. DOI: 10.1145/3549035.3561184