Застосування методу низькорангової адаптації на прикладі донавчання моделі прихованої дифузії
Заголовок (англійською):
Application of the low-rank adaptation method on the example of fine-tuning a latent diffusion model
Автор(и):
Іванченко Г.М.
Гетун Г.В.
Скляров І.О.
Соломін А.В.
Гетун С.Ю.
Автор(и) (англ):
Ivanchenko H.M.
Getun G.V.
Skliarov I.O.
Solomin A.V.
Getun S.Y.
Ключові слова (укр):
: метод низькорангової адаптації, тренування нейромереж, моделі прихованої дифузії, генеративні моделі, нейромережі, оптимізатор AdamW, генерація зображень, архітектурні стилі, машинне навчання, датасет, валідаційний датасет
Ключові слова (англ):
Low-Rank Adaptation, Fine-tuning, Latent Diffusion Models, Generative Models, Neural Networks, AdamW Optimizer, Image Generation, Architecture styles, Machine Learning, Training Data, Validation Data
Анотація (укр):
Cтаття досліджує метод низькорангової адаптації (LoRA), швидку методику тонкого налаштування нейронних мереж з великою кількістю параметрів, та її потенційне застосування в різних галузях, з акцентом на архітектуру, будівництво та будівельну механіку. Дослідження застосовує LoRA для тонкого налаштування моделі прихованої дифузії (LDM) для генерації зображень будівель у різних архітектурних стилях, слугуючи ілюстративним прикладом ефективності LoRA для адаптації великих моделей до спеціалізованих завдань.
Нейронні мережі з великою кількістю параметрів, такі як моделі прихованої дифузії (LDM) та великі мовні моделі (LLM), продемонстрували значний потенціал у різних галузях, але їх навчання з нуля є обчислювально дорогим та трудомістким. Тонке налаштування пропонує більш ефективний підхід шляхом адаптації попередньо навчених моделей до конкретних завдань та даних. LoRA ще більше підвищує ефективність, додаючи невелику кількість параметрів до моделі, а не налаштовуючи всі ваги. LoRA використовує низькорангові матричні представлення для зменшення кількості параметрів, що навчаються, під час тонкого налаштування. Вводячи менші матриці для кожного шару та навчаючи їх на нових даних, LoRA значно прискорює процес тонкого налаштування та зменшує обчислювальні витрати. Дослідження демонструє застосування LoRA для тонкого налаштування LDM StableDiffusion 1.5 для генерації зображень будівель у різних архітектурних стилях за допомогою інструменту OneTrainer.
Результати показують, що тонке налаштування StableDiffusion 1.5 за допомогою LoRA ефективно генерує високоякісні зображення будівель у заданих архітектурних стилях, підкреслюючи потенціал LoRA для адаптації великих моделей до спеціалізованих завдань. Наголошується на використанні набору даних для валідації для запобігання перенавчанню та визначення оптимальної точки зупинки навчання, забезпечуючи узагальненість моделі.
Це дослідження робить внесок у ширше дослідження застосовності LoRA для тонкого налаштування великих нейронних мереж у різних областях. Хоча дослідження зосереджено на LDM для архітектурних застосувань, основні принципи та продемонстрована ефективність LoRA поширюються на інші типи великих моделей, такі як LLM, для вирішення спеціалізованих завдань у різних галузях.
Анотація (англ):
This article explores the Low-Rank Adaptation (LoRA) method, a fast fine-tuning technique for large-parameter neural networks, and its potential application in various fields, with a focus on architecture, construction, and structural mechanics. The study applies LoRA to fine-tune a Latent Diffusion Model (LDM) for generating images of buildings in various architectural styles, serving as an illustrative example of LoRA’s effectiveness for adapting large models to specialized tasks.
Large-scale neural networks, such as Latent Diffusion Models (LDMs) and Large Language Models (LLMs), have shown significant potential in various fields, but their training from scratch is computationally expensive and time-consuming. Fine-tuning offers a more efficient approach by adapting pre-trained models to specific tasks and data. LoRA further enhances efficiency by adding a small number of parameters to the model instead of adjusting all weights. LoRA uses low-rank matrix representations to reduce the number of trainable parameters during fine-tuning. By introducing smaller matrices for each layer and training them on new data, LoRA significantly speeds up the fine-tuning process and reduces computational costs.
The study demonstrates the application of LoRA for fine-tuning the LDM Stable Diffusion 1.5 to generate images of buildings in various architectural styles using the OneTrainer tool. The results show that fine-tuning Stable Diffusion 1.5 using LoRA effectively generates high-quality images of buildings in specified architectural styles, highlighting LoRA’s potential for adapting large models to specialized tasks. The use of a validation dataset is emphasized for preventing overfitting and determining the optimal stopping point for training, ensuring the model's generalizability.
This research contributes to the broader exploration of LoRA’s applicability for fine-tuning large neural networks in various domains. While the study focuses on LDMs for architectural applications, the underlying principles and demonstrated effectiveness of LoRA extend to other types of large models, such as LLMs, for addressing specialized tasks in different fields.
Публікатор:
Київський національний університет будівництва і архітектури
Назва журналу, номер, рік випуску (укр):
Опір матеріалів і теорія споруд, 2025, номер 114
Назва журналу, номер, рік випуску (англ):
Strength of Materials and Theory of Structures, 2025, number 114
Мова статті:
English
Формат документа:
application/pdf
Дата публікації:
05 June 2025
Номер збірника:
Університет автора:
Kyiv National University of Construction and Architecture, Kyiv, National Technical University of Ukraine "Igor Sikorsky Kyiv Polytechnic Institute", Kyiv
References:
1. Getun, H.V., Ivanchenko, H.M., Skliarov, I.O., Solomin, A.V., &Hetun, S.Y. Zastosuvannya neyromerezh v arkhitekturi budivel' I optymizatsiya dlya ts'oho modelei prykhovanoi dyfuzii (Application of neural networks in building architecture and optimization of latent diffusion models for this purpose). Kyiv: Current problems of architecture and urban planning, 2025, Vol. 71, P. 494-509, DOI:10/32347/2077-3455.2025.71.494-509 (Ukraine)2. Wenjie Liao, Xinzheng Lu, Yifan Fei, Yi Gu, Yuli Huang. Generative AI design for building structures. Automation in Construction. 2024, Vol. 157, 105187. ISSN 0926-5805. DOI: 10.1016/j.autcon.2023.105187. Netherlands, Amsterdam: Elsevier B.V. (Netherlands)3. Hao Leng, Yuqing Gao, Ying Zhou.ArchiDiffusion: A novel diffusion model connecting architectural layout generation from sketches to Shear Wall Design. Journal of Building Engineering. 2024, Vol.98,111373.ISSN 2352-7102. DOI: 10.1016/j.jobe.2024.111373.Netherlands: Elsevier B.V. (Netherlands)4. Zhuang Tan, Sizhong Qin, Kongguo Hu, Wenjie Liao, Yuan Gao, Xinzheng Lu. Intelligent generation and optimization method for the retrofit design of RC frame structures using buckling-restrained braces. Earthquake Engineering and Structural Dynamics. 2024, 14 November. DOI: 10.1002 / eqe. 4268. United Kingdom: John Wiley and Sons Ltd. (United Kingdom)5. Botvinovska S., Getun G., Zolotova A., Korbut I., Nikolaenko T., Parnenko V., Rodin R. General procedure for determining the geometric parameters of tools in the technological systems involving machining by cutting. Eastern-European Journal of Enterprise Technologies. Vol. 1 No. 1 (109) (2021): Engineering technological systems. Published: 2021-02-19. year 6-12. UDC 621.9 DOI: 0.15587/1729-4061.2021.224897 (Ukraine)6. Ivanchenko G.M., Getun G.V., Bezklubenko I.S., Solomin A.V., Getun S.Y. Mathematical model of the stress-strain state of multilayered structures with different elastic properties // Strength of Materials and Theory of Structures: Scientific-&-Technical collected articles – Kyiv: KNUBA, 2024. – Issue 113. – P. 131-138. http://opir.knuba.edu.ua/ http:/omtc.knuba.edu.ua/ DOI: 10.32347/2410-2547.2024.113.131-138 (Ukraine)7. Getun G.V., Butsenko Y.P., Labzhynsky V.A., Balina O.I., Bezklubenko I.S., SolominA.V. Prognozuvannya sytuatsiy ta optymizatsiya pryinyattya rishen' na osnovi skinchennykh lantsihiv Markova v raionakh z promislovym zabrudnennyam (Situation forecasting and decision-making optimizations based on using markov finite chains for areas with industrial polutions). // Strength of Materials and Theory of Structures: Scientific-&-Technical collected articles – Kyiv: KNUBA, K: 2020. Issue 104. - P. 164-174. ISSN 2410-2547. DOI: 10.32347/2410-2547.2020.104.164-174 (Ukraine)8. Ying Zhou, Hao Leng, Shiqiao Meng, Hao Wu, Zheng Zhang. StructDiffusion: End-to-end intelligent shear wall structure layout generation and analysis using diffusion model. Engineering Structures, Volume 309, 2024, 118068. ISSN 0141-0296. DOI: 10.1016/j.engstruct.2024.118068. United Kingdom: Elsevier B.V. (United Kingdom)9. R. Rombach, A. Blattmann, D. Lorenz, P. Esserand B. Ommer. High-Resolution Image Synthesis with Latent Diffusion Models. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), NewOrleans, LA, USA, 2022, pp. 10674-10685, DOI: 10.1109/CVPR52688.2022.01042 (UnitedStatesofAmerica).10. Ho, Jonathan, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 2020, 33: 6840-6851.. https://doi.org/10.48550/arXiv.2006.1123911. Song, Yang, and Stefano Ermon. Improved techniques for training score-based generative models. Advances in neural information processing systems, 2020, 33: 12438-12448. https://doi.org/10.48550/arXiv.2006.0901112. Weng, Lilian. What are diffusion models? Lil’Log. 2021, Jul.https://lilianweng.github.io/posts/2021-07-11-diffusion-models/.13. Ronneberger, Olaf, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference, Munich, Germany, October 5–9, 2015, proceedings, part III 18. Springer International Publishing, 2015. https://doi.org/10.48550/arXiv.1505.04597.14. One Trainer. https://github.com/Nerogar/OneTrainer15. Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., ... & Chen, W.LoRA: Low-rank adaptation of Large Language Models. arXiv preprint arXiv:2106.09685, 2021.https://doi.org/10.48550/arXiv.2106.09685.