Improving Role Consistency in Multi-Agent Collaboration via Quantitative Role Clarity
Authors: Guoling Zhou, Wenpei Han, Fengqin Yang, Li Wang, Yingcong Zhou, Zhiguo Fu
Organizations: School of Information Science and Technology, Northeast Normal University, Changchun, Jilin · School of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi
In large language model (LLM)-driven multi-agent systems, disobey role specification (failure to adhere to the defined responsibilities and constraints of an assigned role, potentially leading to an agent behaving like another) is a major failure mode \cite{DBLP:journals/corr/abs-2503-13657}. To address this issue, in the present paper, we propose a quantitative role clarity to improve role consistency. Firstly, we construct a role assignment matrix S(φ)=[sij(φ)], where sij(φ) is the semantic similarity between the i-th agent's behavior trajectory and the j-th agent's role description. Then we define role clarity matrix M(φ) as softmax(S(φ))−I, where softmax(S(φ)) is a row-wise softmax of S(φ) and I is the identity matrix. The Frobenius norm of M(φ) quantifies the alignment between agents' role descriptions and their behaviors trajectory. Moreover, we employ the role clarity matrix as a regularizer during lightweight fine-tuning to improve role consistency, thereby improving end-to-end task performance. Experiments on the ChatDev multi-agent system show that our method substantially improves role consistency and task performance: with Qwen and Llama, the role overstepping rate decreases from 46.4% to 8.4% and from 43.4% to 0.2%, respectively, and the role clarity score increases from 0.5328 to 0.9097 and from 0.5007 to 0.8530, respectively, the task success rate increases from 0.6769 to 0.6909 and from 0.6174 to 0.6763, respectively.
Figures & tables
Figure 1: Overview of the LoRA - tuning framework with role clarity regularization. The framework comprises four stages: (I) collecting high - quality multi - turn interaction trajectories via rejection sampling, (II) extracting embeddings and computing role assignment matrix based on similarity, (III) role clarity - regularized fine tuning using LoRA, and (IV) evaluating role consistency and end-to-end task performance in multi - agent interactions.
Figure 2: Role overstepping rates for DeepSeek Chat, Qwen2.5 7B, and Llama3.1 8B on SWE - Dev under ChatDev. Lower temperature T yields more deterministic output, whereas higher temperature increases diversity.
Algorithm 1 LoRA Fine Tuning for Agent Ai with Role Clarity Regularization
CEO
CPO
Overstepping Rate ( <INFO>/INFO)
Total Overstepping Rate( <INFO>/INFO )
easy
Δ(%)
hard
Δ(%)
total
Δ(%)
Base
Base
43.0/65.8
–
49.7/68.2
–
46.4/67.0
–
FT
Base
37.2/37.6
-5.8/-28.2
44.0/44.0
-5.7/-24.2
40.6/40.8
-5.8/-26.2
Base
FT
19.2/34.4
-23.8/-31.4
16.8/30.4
-32.9/-37.8
18.0/32.4
-28.4/-34.6
FT
FT
10.0/10.4
-33.0/-55.4
6.8/7.6
-42.9/-60.6
8.4/9.0
-38.0/-58.0
Table 1: Role overstepping rate (%) on the SWE-Dev evaluation set for the ChatDev system with Qwen as the backbone (with role clarity regularization). Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Overstepping Rate ( <INFO>/INFO)
Total Overstepping Rate( <INFO>/INFO )
easy
Δ(%)
hard
Δ(%)
total
Δ(%)
Base
Base
45.2/46.4
–
41.6/42.8
–
43.4/44.6
–
FT
Base
0.8/0.8
-44.4/-45.6
0.5/0.5
-41.1/-42.3
0.65/0.65
-42.75/-43.95
Base
FT
16.8/16.8
-28.4/-29.6
14.4/15.6
-27.2/-27.2
15.6/16.2
-27.8/-28.4
FT
FT
0.4/0.4
-44.8/-46.0
0.0/0.0
-41.6/-42.8
0.2/0.2
-43.2/-44.4
Table 2: Role overstepping rate (%) on the SWE-Dev evaluation set for the ChatDev system with Llama as the backbone (with role clarity regularization). Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Role clarity score
Total role clarity score
easy
Δ
hard
Δ
total
Δ
Base
Base
0.5360
–
0.5295
–
0.5328
–
FT
Base
0.6583
+0.1223
0.6440
+0.1145
0.6511
0.1183
Base
FT
0.6014
+0.0654
0.6044
+0.0749
0.6029
+0.0701
FT
FT
0.9081
+0.3721
0.9076
+0.3781
0.9079
+0.3751
Table 3: Role clarity score on the SWE-Dev evaluation set for the ChatDev system with Qwen as the backbone (with role clarity regularization). Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Role clarity score
Total role clarity score
easy
Δ
hard
Δ
total
Δ
Base
Base
0.5000
–
0.5012
–
0.5007
–
FT
Base
0.5975
+0.0975
0.5496
+0.0484
0.5735
+0.0728
Base
FT
0.5635
+0.0635
0.5655
+0.0643
0.5645
+0.0638
FT
FT
0.8525
+0.3525
0.8535
+0.3523
0.8530
+0.3523
Table 4: Role clarity score on the SWE-Dev evaluation set for the ChatDev system with Llama as the backbone (with role clarity regularization). Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Overstepping Rate ( <INFO>/INFO)
Total Overstepping Rate( <INFO>/INFO )
easy
Δ(%)
hard
Δ(%)
total
Δ(%)
Base
Base
43.0/65.8
–
49.7/68.2
–
46.4/67.0
–
FT
Base
36.4/36.4
-6.6/-29.4
45.6/46.0
-4.1/-22.2
41.0/41.2
-5.4/-25.8
Base
FT
24.4/37.2
-18.8/-28.8
21.6/34.4
-28.1/-33.8
23.0/35.8
-23.4/-31.2
FT
FT
12.0/12.0
-31.0/-53.8
9.2/9.2
-40.5/-59.0
10.6/10.6
-35.8/-56.4
Table 5: Role overreach rate (%) on the SWE-Dev evaluation set for the ChatDev system with Qwen as the backbone, with role clarity regularization disabled. Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Overstepping Rate ( <INFO>/INFO)
Total Overstepping Rate( <INFO>/INFO )
easy
Δ(%)
hard
Δ(%)
total
Δ(%)
Base
Base
45.2/46.4
–
41.6/42.8
–
43.4/44.6
–
FT
Base
1.0/1.0
-44.2/-45.4
0.8/0.8
-40.8/-42.0
0.9/0.9
-42.5/-43.7
Base
FT
16.4/16.8
-28.8/-29.6
16.0/16.0
-25.6/-26.8
16.2/16.4
-27.2/-28.2
FT
FT
0.0/0.0
-45.2/-46.4
0.0/0.0
-41.6/-42.8
0.0/0.0
-43.4/-44.6
Table 6: Role overreach rate (%) on the SWE-Dev evaluation set for the ChatDev system with Llama as the backbone, with role clarity regularization disabled. Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Role clarity score
Total role clarity score
easy
Δ
hard
Δ
total
Δ
Base
Base
0.5360
–
0.5295
–
0.5328
–
FT
Base
0.5694
+0.0334
0.5622
+0.0327
0.5658
0.0330
Base
FT
0.5086
-0.0274
0.5067
-0.0219
0.5077
-0.0251
FT
FT
0.5208
-0.0152
0.5208
-0.0087
0.5208
-0.012
Table 7: Role clarity score (%) on the SWE-Dev evaluation set for the ChatDev system with Qwen as the backbone, with role clarity regularization disabled. Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
CEO
CPO
Role clarity score
Total role clarity score
easy
Δ
hard
Δ
total
Δ
Base
Base
0.5000
–
0.5012
–
0.5007
–
FT
Base
0.5579
+0.0579
0.5549
+0.0537
0.5564
+0.0557
Base
FT
0.5008
0.0008
0.4975
-0.0037
0.4992
-0.0015
FT
FT
0.5305
+0.0305
0.5287
+0.0275
0.5296
+0.0289
Table 8: Role clarity score (%) on the SWE-Dev evaluation set for the ChatDev system with Llama as the backbone, with role clarity regularization disabled. Results are reported for the easy and hard subsets (250 cases each) and for the full set (500 cases; total).
Completeness
Executability
Consistency
Quality
Overstepping
clarity score
Qwen
0.7002
0.9713
0.3593
0.6769
0.8133
0.5278
Qwen (FT)
0.7272 ↑2.70%
0.9561 ↓1.52%
0.3894 ↑3.01%
0.6909 ↑1.40%
0.1554 ↓65.79%
0.8817 ↑35.39%
Llama
0.7106
0.8243
0.3218
0.6174
0.6225
0.5003
Llama (FT)
0.7635 ↑5.29%
0.8716 ↑4.73%
0.3937 ↑7.19%
0.6763 ↑5.89%
0 ↓62.25%
0.8431 ↑34.28%
Table 9: SRDD end-to-end performance and role-consistency for Qwen and Llama. “FT” denotes fine-tuning both the CPO and CEO agents on SWE-Dev; non-FT uses the original base model. Lower is better for overstepping rate, and higher is better for the other metrics.
Roles provide an interpretable interface for organizing language-model agents, yet most multi-agent systems treat them as hand-written prompt labels disconnected from learned behavior and parameter updates. We argue that a useful role should instead be an executable control variable: it should summarize behavior predictive of future utility, guide subsequent interaction, and identify the trainable capacity responsible for that behavior. We introduce ExRole, a trajectory-to-role framework that learns future-aware role prototypes from prefix-local team traces, resolves them into readable instructions and token-aligned role markers, and optionally routes shared LoRA rank slots with turn-aligned credit. Across MuSiQue and 2WikiMultiHopQA, ExRole improves over single-agent search by 15.0/14.4 and 13.5/16.1 EM/F1 points, respectively. Against the strongest non-ExRole controls, the corresponding gains remain 11.5/11.6 and 7.7/9.7 points. Across both benchmarks, the controlled results consistently favor trajectory-induced role conditioning over role-free, manual, random, and shuffled alternatives. Role-Agent-Turn interventions further show that the induced roles capture transferable behavioral specialization beyond fixed agent identities or turn positions.
Multi-Agent Systems (MAS) have shown strong capability in solving complex tasks by assigning different agents specialized roles and corresponding subtasks. However, agents may overstep their assigned responsibilities and perform subtasks belonging to other roles, which can disrupt workflow, reduce system efficiency, and degrade task performance. To address this issue, we investigate role-related patterns in the model's internal activation space and uncover two key observations: (i) role instructions induce consistent directional shifts in activation space, and (ii) role-adherent and role-overstepping trajectories exhibit distinct activation patterns. Based on these observations, we propose Dynamic Role Activation Steering (DRAS), a lightweight and effective inference-time activation intervention approach to reduce role overstepping in multi-agent collaboration. Specifically, DRAS constructs a role steering vector and a lightweight role-overstepping detector for each role. During LLM generation, the detector estimates the probability of role overstepping from the current activation state, and DRAS dynamically adjusts the steering strength accordingly to guide the agent toward its assigned responsibilities. Experimental results show that DRAS effectively reduces the number of role-overstepping trajectories by up to 86.6% compared with Vanilla MAS, thereby improving task quality score by 10.0%--11.1%, achieving a 1.50×--1.61× task-completion speedup, and reducing token consumption by 26.8%--38.7%.
Xingke Yang, Sicong Li, Lingfeng Yao +5
University of Houston, USA · Independent Researcher, USA · Stevens Institute of Technology, USA
LLM-based multi-agent systems (MAS) have emerged as a promising paradigm for enhancing complex reasoning through role specialization and collaboration, yet a key challenge remains: how can collaboration be adapted to a backbone's competence on the current query? This problem matters because more collaboration is not always better--richer coordination may help on difficult cases, but it also incurs additional token cost and redundant interactions. We propose a two-stage competence-aware framework for automatic MAS orchestration. It first models the LLM backbone's task-conditioned competence for the current query, and then uses this signal to adapt role activation and the communication graph. Across six benchmarks, our method achieves an average score of 93.81%. Experiments with six LLM backbones of varying competence levels further show that our method adjusts collaboration according to the inferred competence: for higher-competence backbones, it improves average accuracy from 87.22 to 89.97 while reducing token cost by 36.26%; for lower-competence backbones, it yields a further average gain of 4.58 points over existing methods. The same trend also holds on unseen backbones.