MA-RAG: Automating Role Engineering for RESTful APIs with Multi-Head Attention and Retrieval-Augmented Generation
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7607-7615.
https://doi.org/10.24963/ijcai.2025/846
Keywords
- Data Mining: DM: Mining codebase and software repositories
- Natural Language Processing: NLP: Language models
- Multidisciplinary Topics and Applications: MTA: Software engineering
- Multidisciplinary Topics and Applications: MTA: Security and privacy
Abstract
This paper addresses the role engineering problem for RESTful applications and proposes a role engineering method based on multi-head attention and Retrieval Augmented Generation called MA-RAG. The method first performs fine-grained control flow analysis on the system source code to extract permission information of API handlers. Then, using basic blocks as units, it employs pre-trained code models to convert the source code into semantic vectors, which are stored in the retrieval augmented generation model. On this basis, a call chain structure tree is constructed with permissions as the center, utilizing the multi-head attention mechanism to aggregate semantic information of different code granularities from bottom to top, with each attention head corresponding to a role engineering objective. Finally, the root vectors of each permission tree are subjected to self-supervised clustering to adaptively determine the number of roles and perform division. We evaluated MA-RAG on 284 real-world software systems, and the results show that compared with other methods, MA-RAG can significantly save time overhead, reduce the number of generated roles, lower the role permission overlap rate, and improve the interpretability score.
@inproceedings{ijcai2025p846,
title = {MA-RAG: Automating Role Engineering for RESTful APIs with Multi-Head Attention and Retrieval-Augmented Generation},
author = {Luo, Yang and Shen, Qingni and Wu, Zhonghai},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {7607--7615},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/846},
url = {https://doi.org/10.24963/ijcai.2025/846},
}
TY - CPAPER TI - MA-RAG: Automating Role Engineering for RESTful APIs with Multi-Head Attention and Retrieval-Augmented Generation AU - Luo, Yang AU - Shen, Qingni AU - Wu, Zhonghai T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 7607 EP - 7615 DO - 10.24963/ijcai.2025/846 UR - https://doi.org/10.24963/ijcai.2025/846 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: