WorksComputer Science
PFedMA: Who Should Join Next as Federated Multi-Agent Orchestration Evolves?
Abstract
Federated Multi-Agent Systems (FedMAS) offer a promising paradigm for collaborative reasoning among LLM-based agents while keeping raw client data decentralized. However, reliable multi-round collaboration remains challenging. Agent selection must take into consideration evolving task requirements and the agent's historical reliability, while privacy rules must adapt to changing collaboration contexts and meet the client's personalized needs. To address these challenges, we propose PFedMA, a federated multi-agent framework for feedback driven multi-round collaboration under heterogeneous privacy requirements. Across rounds, PFedMA maintains historical capability and reliability states to guide agent selection, evaluates task responses before aggregation, and refines subsequent queries according to accumulated collaboration feedback. PFedMA enables bidirectional local to global and global to local private rule evolution across heterogeneous clients. Clients generalize locally updated privacy rules and selectively incorporate globally maintained rules, thereby facilitating cross-client privacy rule evolution while preserving personalized constraints. Extensive experiments across reasoning, privacy sensitive, and adversarial settings show that PFedMA improves task performance, reduces measured privacy leakage, and improves system robustness.
Introduction
LLM based multi-agent systems (MAS) coordinate agents with complementary capabilities to address complex tasks ([13, 30]). In privacy sensitive settings, however, the knowledge required for collaboration is distributed across multiple data holders with distinct privacy requirements, data ownership constraints, and access control policies. To complete the collaborative task, agents must integrate distributed knowledge and intermediate reasoning information, while raw data cannot be centralized. This challenge motivates federated multi-agent systems (FedMAS), a distributed collaboration paradigm in which agents reason over locally held information and exchange task relevant information without directly centralizing raw client data ([25]). However, existing FedMAS does not fully address how to select reliable agents or adapt information sharing rules as reasoning unfolds across rounds.
As collaboration progresses, both who should participate and what information should be shared may change with the evolving reasoning state. Early rounds may require broad domain expertise, whereas later rounds may call for specialized agents to resolve uncertainties exposed by intermediate responses. Meanwhile, as reasoning progresses and collaboration demands evolve, newly required information may introduce sharing scenarios that are not covered by existing privacy rules. Consequently, agent orchestration and privacy control become closely interdependent across reasoning rounds. Agent orchestration determines whose knowledge enters the collaborative reasoning process, while privacy rules determine what information can be shared. The resulting responses and reasoning state, in turn, affect both subsequent agent selection and the privacy constraints relevant to
Correspondence to: Fan Qi <[email protected]; [email protected]>. Additional author contact information: Shuai Li <[email protected]> and Xiaoshan Yang <[email protected]>. later rounds. FedMAS therefore needs to use feedback from intermediate responses to update both agent selection and privacy rules across rounds.
These two interdependent decisions give rise to two challenges. First, task response reliability must inform agent selection across rounds. Previous studies have explored iterative interactions between clients in federated collaboration [31], as well as multi-round routing based on the current interaction context [38]. However, selecting agents based only on the current query context may overlook agents’ historical reliability in previous rounds. Because agents may produce incomplete, erroneous, or adversarial responses [10, 40], selecting agents without accounting for their past reliability can propagate errors across rounds.
Second, privacy rules must adapt to evolving collaboration while preserving heterogeneous client requirements. Existing agent-level approaches protect sensitive information through context filtering and rule-based protection [25, 34]. Separately, applying DP to agent responses [22] may introduce perturbations that propagate across rounds, increasing the risk of semantic drift and inconsistent reasoning. These approaches typically rely on predefined privacy constraints or fixed protection strategies, which may fail to accommodate changing information needs across reasoning rounds, either suppressing information necessary for subsequent reasoning or failing to capture newly emerging privacy risks [29, 25]. Moreover updating rules only locally limits cross client reuse, while applying shared rules uniformly can overlook differences in client requirements, data characteristics, and task contexts [18]. The challenge is to reuse newly identified privacy rules across clients without overriding their distinct local requirements.
To address these challenges, we propose PFedMA, a federated multi-agent framework for feedback driven multi-round collaboration under heterogeneous privacy requirements. At each round, PFedMA evaluates task responses and updates historical capability and reliability estimates to guide agent selection and query refinement in the next round. Response reliability also determines which clients contribute new privacy rule candidates. These candidates are generalized for cross-client reuse, while each client selectively adopts rules according to its local requirements; the adopted rules then govern subsequent queries and responses.
Our main contributions are summarized as follows:
We propose PFedMA, a federated multi-agent system with feedback driven orchestration that leverages cross round capability and reliability feedback to adapt agent selection, thereby mitigating repeated selection of unreliable agents and error accumulation across rounds.
We introduce a federated privacy rule co-evolution mechanism in PFedMA that enables privacy rules to adapt to evolving collaboration while preserving heterogeneous client requirements, allowing local privacy rules to benefit other clients without overriding personalized privacy rules.
Experiments across diverse benchmarks show that PFedMA improves average task performance and reduces measured privacy leakage compared with Fed-ICL, while achieving a lower attack success rate than EPEAgents under the evaluated prompt injection attacks.
Related Work
Multi-Agent System. Multi-agent systems (MAS) predominantly rely on centralized architectures, structuring collaboration via domain personas [27], external retrieval [35], or predefined execution pipelines [7, 30]. To resolve conflicts and reach consensus, systems employ diverse alignment strategies, including textual debates and voting [8, 26], adaptive termination [15], and belief state broadcasting [10, 17]. Recent advances in task routing further optimize this orchestration using dynamic paths [36] and reinforcement learning [38]. However, these centralized paradigms mandate transparent raw context sharing, inherently violating data privacy. In contrast, our framework achieves dynamic multi-round dispatch while operating under explicit local data boundaries.
Federated Multi-Agent System. To reduce communication overhead, federated paradigms increasingly leverage text driven prompting [23], textual gradients [6], and in context learning [33]. Similarly, cooperative frameworks iteratively aggregate plain text responses from local exemplars [31]. However, sharing raw text introduces severe prompt extraction risks [11], making secure communication a critical challenge [18].

Figure 1. Overview of PFedMA. Task response feedback guides query refinement and client routing, while privacy rules evolve through cross client sharing and personalized adaptation. Together, they jointly determine the participants and the content to be shared, thereby laying the foundation for continued collaboration. The algorithm is provided in Appendix § 6.
Existing privacy enhancing approaches, including trusted environments [21], node decomposition [32], and differential privacy [22], reduce information exposure through different mechanisms. However, depending on the mechanism, they may require additional trusted infrastructure or restrict the information available during collaboration, making it difficult to preserve semantically useful context across multiple reasoning rounds [25]. To mitigate this risk, we restrict server bound communication to privacy processed responses, generalized privacy rule candidates and compact rule level feedback, thereby preserving the stated client local data boundary.
Method
Preliminaries
We consider a federated multi-agent system with an honest but curious server and heterogeneous clients . Each client maintains a private dataset and a local experience buffer , both of which remain on device. Although the server cannot directly access clients’ raw local data or unprocessed local responses, it may attempt to infer private information from uploaded privacy processed responses . Meanwhile, some clients may provide unreliable or malicious task responses.
To address these concerns, we introduce historical capability and reliability states, along with global and personalized privacy rule repositories for query and response privacy processing, respectively. At round , the server maintains the accumulated collaboration state and processes the query using its global privacy rule repository to obtain . The orchestrator selects a subset of participating clients based on their routing state and sends to the selected clients. Each selected client generates a local response and processes it using its personalized privacy rule repository before uploading . Both and remain on device. The server evaluates the uploaded responses, updates the routing states to , and aggregates reliable responses to obtain . Meanwhile, global and personalized privacy rules co-evolve through generalized local rule sharing and selective global to local adaptation. If the task remains unresolved, the server refines the query using the updated routing states and applies the updated global privacy rules before dispatching it to selected clients in the next round. The process ends when no further clients are needed or the round budget is exhausted.
Iterative Orchestration for Federated MAS
Building on the overview in § 3.1, this section details client selection, response evaluation and aggregation, and the reward used to train the orchestrator.
Agent Selection and Routing State Updates
PFedMA first identifies the expertise domain most relevant to as , and then retrieves the corresponding candidate set . The orchestrator then selects participating agents as
Where maintains the historical capability and reliability states of client . After the returned response of is evaluated, its routing state is updated using the newly observed historical capability and reliability feedback
where denotes the set of responses retained by the reliability filter, is the number of previously evaluated responses from , and , , and denote its anomaly scores. We define as accumulated historical capability state of client , where indicates whether the current retained response improves upon the most recent retained response of the same client, and identifies the capability dimensions in which the current response improves upon that reference. In contrast, summarizes the agent’s historical risk as the mean of its observed anomaly scores.
The updated routing state is . Thus, response evaluations from the current round are retained in and directly influence agent selection in subsequent rounds. Detailed state update definitions are provided in Appendix § 9.
Response Reliability Evaluation and Filtered Aggregation
Similar to the recently proposed decision centered model Jev [2], PFedMA explicitly presents task level results rather than burying them in free form responses. While Jev focuses on decision making, PFedMA focuses on conclusions and records the claims and evidence corresponding to each conclusion.
At round , the privacy processed response of client is represented as , where denotes the final conclusion, denotes the collection of claims supporting the conclusion, and denotes the corresponding collection of evidence associated with these claims. The details are provided in Appendix § 8.§ 1.
PFedMA evaluates each response from the complementary perspectives of intent, evidence, and cross agent consensus. To aggregate fine grained anomaly signals, we use
where denotes the number of fine grained anomaly scores being aggregated and is the -th score. The operator balances the most severe anomaly with the overall anomaly level. This score captures abnormal intents such as instruction overriding, false authority claims, aggregator manipulation, and task goal substitution. The evidence anomaly assesses claim level evidence quality from support, verifiability, and coherence, while the consensus anomaly measures semantic deviation from peer conclusions. Intent and evidence are evaluated by a frozen judge model, whereas consensus is computed deterministically; details are provided in Appendix § 8.§ 3 and Appendix § 8.§ 2.
The three anomaly dimensions are combined into an overall anomaly score, and task responses exceeding the tolerance threshold are excluded:
where controls the contribution of consensus anomaly, and denotes the anomaly tolerance threshold. A relatively small is used because disagreement alone does not necessarily indicate an unreliable response. The retained is then used for aggregation.
The retained privacy processed responses are aggregated to update the accumulated collaboration state:
In our implementation, Fusion is realized by the server side orchestrator , which synthesizes the retained privacy processed responses and the previous global reasoning state into .
Composite Reward for Multi-Round Orchestration
During RL training, PFedMA uses a composite reward that balances final answer correctness, answer quality improvements across rounds, response reliability, and agent invocation cost. For a collaboration trajectory containing routing rounds, the total reward is
where evaluates format compliance and evaluates the final answer. Details for these two formulas are provided in Appendix § 10.§ 1. Meanwhile, delivers intermediate feedback for routing, with the step wise reward defined as
Here, records the change in answer quality from to , while measures the average normalized response risk of the agents invoked at round . denotes the maximum number of agents that can be invoked in a single round, and represents the fraction of the invocation budget used by the current routing decision. Detailed definitions and RL settings are provided in Appendix § 10.§ 1.
Federated Privacy Rule Co-Evolution Mechanism
Existing privacy rule based data minimization approaches for Federated MAS mainly regulate information disclosure according to agent roles and access requirements [25], but do not address how client specific privacy knowledge can be reused across the federation without centralizing personalized policies. To bridge this gap, PFedMA introduces a federated privacy rule co-evolution mechanism, in which shareable privacy knowledge is propagated globally while complete client specific privacy rule repositories remain local.
Global Privacy Rule Repository . The global privacy rule repository is maintained by the server to preserve privacy knowledge that is shareable across clients. At round , the server receives generalized rule candidates from clients and evaluates their cross client semantic support. When multiple candidates are available, candidates achieving the highest positive support proportion are selected to form the global candidate set:
Here, is the candidate pool, and is the support proportion of candidate . The set retains all candidates with the highest positive support proportion. Details are provided in Appendix § 11. The server also collects compact rule level feedback from previous rule executions and uses it together with the promoted candidates to update the global repository:
This update consolidates shareable rules and resolves conflicting or ineffective global rules according to accumulated client feedback. The updated repository is then used by the server to process the next query before dispatch: . The resulting privacy rule processed query is then dispatched to the selected clients for local inference, thereby transferring the updated global privacy constraints to the next round of collaboration. Detailed definitions and update procedures are provided in Appendix § 11.
Personalized Privacy Rule Repository . Upon receiving the privacy processed query , client performs local inference using its private data and accumulated experience . denotes the local utility score of privacy rule for client at communication round , and is defined as follows:
Here, the term measures the semantic relevance of rule to the local experience buffer . Furthermore, , , and denote the numbers of times that rule is triggered, successfully enforced, and found to conflict with a local privacy requirement, respectively. The details are provided in Appendix § 11.
Meanwhile, the updated global rules are redistributed to the client for personalized adaptation. Rather than directly replacing its local rules, client compares each redistributed global rule with its semantically corresponding local rule according to their local utility and selects
Here, , with a detailed definition provided in Appendix § 11. This selective adaptation allows global privacy knowledge to refine the personalized repository without overriding client specific alternatives. The personalized repository is applied to each locally generated response before transmission . If a previously uncovered privacy constraint is detected, the corresponding rule remains on device, and only its generalized representation is shared . Here, denotes the client side private rules generalization operator, and is the shareable rule representation. The generalized rule is sent to the server for the subsequent global privacy rule updates; see Appendix § 11.
Experiments
In the experiments, we seek to answer the following research questions:
RQ1: Does cross round response feedback improve multi-round federated reasoning over feedback free orchestration?
RQ2: Can federated privacy rule co-evolution enable cross client privacy rule coordination and personalized adaptation while maintaining rule enforcement effectiveness and task utility?
RQ3: Can multi-factor reliability evaluation improve robustness against unreliable task responses while preserving benign task utility?
Experimental Setup
Models. Following KABB ([39]), we construct 20 agent profiles across 12 knowledge domains and distribute them over federated clients. Each client hosts a local agent with private data, an experience buffer, and personalized privacy rules, while multiple clients may share the same profile. Agent profiles use domain specific prompts with one of seven LLM backbones: Mini-Max2.5 ([5]), DeepSeek-V3 ([19]), Qwen2-72B-Instruct ([3]), GPT-4o ([16]), DeepSeek-R1 ([12]), LLaMA-3-70B-Instruct ([1]), or Kimi-K2.5 ([28]).
Dataset and Evaluation Metrics. We evaluate PFedMA on mathematical reasoning benchmarks, including GSM8K ([9]), MATH ([14]), and AIME24 ([20]); clinical QA benchmarks, including MedQA and MedMCQA ([27]); instruction following with AlpacaEval 2.0 ([39]); and privacy sensitive web agent tasks with SeeAct on Mind2Web-SC ([34]). We report ASR, RR, PNA, and NRP following ASB ([37]), together with BP to evaluate benign task utility with defense mechanisms enabled, together with LPA, LPP, LPR, EA, FRA, and LR for privacy evaluation ([34, 24]). Metric definitions are provided in Appendix § 13.
Baselines. We conduct a comparative analysis of the PFedMA algorithm against other MAS methods. For the single agent baseline, the primary goal is to demonstrate that our method’s performance is not due to the server LLM model, but rather to the effectiveness of the federated MAS. For federated MAS, we compare with Fed-ICL ([31]) and EPEAgents ([25]). For centralized MAS, we compare with Router-R1 ([38]), KABB ([39]), and OPTAGENT ([4]). All multi-agent methods use the same pool of 20 experts and the same number of iteration rounds to isolate the effect of orchestration and aggregation.
Main Results and Analysis
Cross Round Feedback and Iterative Orchestration (RQ1).
Table 1 compares PFedMA with representative single-agent, centralized MAS, and federated MAS baselines under the same expert pool and collaboration-round budget. PFedMA achieves the highest average score of 78.86, outperforming the strongest baseline, Fed-ICL, by 2.52 points. It ranks first on MATH, GSM8K, AIME24, and AlpacaEval 2.0, and second on MedQA and MedMCQA, indicating strong performance across the evaluated tasks. Figure 9a shows that accuracy generally increases across collaboration rounds, suggesting that useful reasoning information is progressively accumulated. The ablation results in Figure 2b further show that removing query optimization or either historical routing state consistently degrades performance. These results indicate that cross round state evolution, query adaptation, and learned orchestration each contribute to the overall improvement. Figure 6c provides complementary evidence that PFedMA adaptively selects agents according to task requirements: mathematical agents are selected more frequently for mathematical benchmarks, while medical agents are favored for medical tasks. Overall, these results support the effectiveness of feedback driven iterative orchestration in progressively refining the reasoning state and adapting subsequent collaboration decisions.
| Method | Math | GSM8K | AIME24 | MedQA | AlpacaEval 2.0 | MedMCQA | Avg |
| Single Agent | |||||||
| Router-R1 | |||||||
| KABB | |||||||
| OPTAGENT | |||||||
| EPEAgents | |||||||
| Fed-ICL | |||||||
| PFedMA | |||||||
| RQ2: Evaluation of privacy processed and performance | |||||||
| Method | LR | LPR | LPA | LPP | EA | FRA | Avg |
| Single Agent | |||||||
| Router-R1 | |||||||
| KABB | |||||||
| OPTAGENT | |||||||
| EPEAgents | |||||||
| Fed-ICL | |||||||
| PFedMA |
Table 1. Performance and privacy comparison of different frameworks. Best results are shown in bold, and second best results are _underlined_. For Avg calculation, lower is better metrics are converted using before averaging.

Figure 6. Agent Abilities and Agent Selection. Full results are given in Appendix § 15.§ 2.

Figure 9. (a) Federated iteration (b) LLM API Call Count (c) Federated Privacy Rule Effectiveness (d) PFedMA Data Heterogeneity. Accuracy of federated iterative optimization, federated iteration rounds and demonstration of privacy rule effectiveness, API usage and client data heterogeneity in PFedMA with clients.

Figure 2. Ablation studies of the reliability module, iterative orchestration loop, federated privacy rule co-evolution loop and robustness utility trade off across adversarial ratios.

Figure 3. Performance Evaluation under Iterative Optimization and Risk Threshold Variation.
Cross Client Privacy Rule Coordination and Personalized Adaptation (RQ2). Table 1 shows that PFedMA achieves the lowest leakage rate of 26.70, which is 5.90 points lower than the second best result. It also obtains the best LPR, LPA, LPP, and FRA scores while achieving the second best EA, indicating that the improved privacy protection does not come at the cost of substantially degraded task utility. The lower leakage rate, together with the higher FRA, indicates that PFedMA strengthens measured privacy rule enforcement while preserving task utility under the evaluated setting. Figure 4a further shows that privacy rule coverage increases progressively across collaboration rounds. This trend is consistent with the intended role of federated privacy rule co-evolution, through which reusable rules identified locally are consolidated globally and subsequently adapted to client specific requirements. Together, these results provide empirical support for cross client privacy rule coordination and personalized adaptation while maintaining a favorable privacy utility balance.

Figure 4. (a) Privacy rule coverage across rounds and (b) accuracy efficiency trade off across routing budgets.
Reliability Evaluation and Adversarial Robustness (RQ3). Table 2 compares PFedMA with representative baselines under prompt injection attacks. PFedMA achieves the lowest ASR of 30.80, reducing the attack success rate by 1.21 points compared with the second best method, EPEAgents. Meanwhile, PFedMA obtains the highest RR, BP, and NRP, and the second highest PNA, resulting in the best overall score of 63.45. These results indicate that the robustness improvement is not achieved by simply rejecting more responses. PFedMA remains effective on benign inputs while reducing the influence of adversarial responses. Overall, the results demonstrate a favorable robustness utility trade off under adversarial federated collaboration.
| Method | ASR | RR | BP | PNA | NRP | Avg |
| Single Agent | ||||||
| Router-R1 | ||||||
| KABB | ||||||
| OPTAGENT | ||||||
| EPEAgents | ||||||
| Fed-ICL | ||||||
| PFedMA |
Table 2. Robustness of different frameworks under adversarial attacks
Ablation Study
Effectiveness of Feedback Driven Iterative Orchestration. Figure 2b evaluates the contributions of query optimization and the historical routing states. Specifically, the -RQ variant removes feedback guided query optimization, the -IA variant removes the historical capability state , and the -RT variant removes the historical reliability state . Each ablation breaks a distinct pathway through which outcomes from the current round influence subsequent collaboration decisions. The consistent degradation of these variants demonstrates that PFedMA benefits from maintaining a closed cross round feedback loop, rather than merely repeating independent multi-agent interactions.
Necessity of Federated Privacy Rule Co-Evolution. Figure 2c compares PFedMA with five variants, where NR removes privacy rules, SR keeps rules static, LE updates rules only locally, G2L retains only global to local rule adaptation, and L2G retains only local to global rule aggregation. PFedMA achieves the privacy utility trade off, confirming the importance of combining personalized local adaptation with cross client rule synchronization. Figure 9c further shows how privacy rule effectiveness evolves across federated communication rounds.
PFedMA consistently achieves the highest FRA, outperforming local only evolution, static rules, and the variant without privacy rules. Its persistent advantage across rounds indicates that local adaptation alone is insufficient to fully exploit reusable privacy knowledge. Together, these results demonstrate that bidirectional local to global rule consolidation and global to local personalized adaptation are both important for improving privacy rule effectiveness while preserving task utility.
Effectiveness of Multi Factor Reliability Evaluation. Figure 2a compares PFedMA with variants that remove the complete reliability evaluator or individual evaluation dimensions, including intent, evidence, and consensus. PFedMA achieves the best robustness utility profile, confirming the importance of reliability aware response assessment before aggregation. Removing the complete evaluator causes the largest overall degradation, while removing any individual dimension also weakens performance. These results indicate that relying on a single reliability signal is insufficient to consistently identify unreliable responses.
Conclusion and Limitations
We propose PFedMA, a federated multi-agent framework integrating feedback-driven orchestration with federated privacy rule co-evolution. The orchestration loop adapts agent selection based on evolving task requirements and historical reliability, while the privacy loop enables bidirectional rule evolution while preserving personalized constraints. Experiments across reasoning, privacy-sensitive, and adversarial tasks demonstrate improvements in task performance, privacy rule effectiveness, and robustness. PFedMA focuses on semantic privacy rule coordination under federated data isolation without providing formal privacy guarantees.
Algorithm
In this section, we mainly introduce the core algorithm in our paper.
Algorithm 1 Execution Workflow of PFedMA
Input: initial task , clients set , domain set , domain prototypes , maximum number of rounds , maximum number of clients per round , risk threshold , consensus weight , global privacy rule repository , and personalized privacy rule repositories
Initialize , , , , for all
Each agent maintains local experience and routing state
while do
Apply the global privacy rule repository to the current query:
Identify the most relevant domain:
Retrieve the corresponding candidate agent set
Select participating agents: ,
if selects the termination action then
break
end if
for all do
Generate the local response:
Apply personalized privacy processing:
end for
for all do
end for
Retain responses satisfying the reliability threshold:
if then
Update the global reasoning state:
else
end if
Update the routing states using the observed capability and reliability feedback
Construct generalized local rule candidates from newly identified personalized privacy constraints
Build the candidate pool and obtain the supported global candidate set
Collect rule-level feedback and update the global repository:
Redistribute updated global rules and selectively update each personalized repository
Refine the query for the next round:
end while
Output: Final answer derived from the latest global reasoning state
Comparison with Related Frameworks
As summarized in Table 3, existing methods primarily optimize expert selection, sequential routing, or federated response refinement in isolation. In contrast, PFedMA establishes a closed loop orchestration process in which reasoning progress, response reliability, and heterogeneous privacy constraints jointly influence subsequent collaboration decisions.
| Method | Setting | Expert Coordination | Iterative Refinement | Reliability Feedback | Privacy Personalization | Privacy Rules | Co-evolution |
| Router-R1 | Centralized MAS | RL-based dynamic routing | ✓ | – | – | – | |
| KABB | Centralized MAS | Knowledge aware expert selection | Partial | – | – | – | |
| Fed-ICL | Federated MAS | Federated response aggregation | ✓ | – | – | – | |
| PFedMA | Federated MAS | Reliability aware dynamic routing | ✓ | ✓ | ✓ | ✓ |
Table 3. Comparison of PFedMA with representative multi-agent and federated multi-agent frameworks. PFedMA differs from prior methods by jointly coupling iterative reasoning, agent reliability, and heterogeneous privacy constraints within a closed loop orchestration process.
Structured Response Evaluation Details
Structured Response Format and Example
The agent’s response follows a structured format consisting of three components: final answer, claim, and evidence. At round , each selected client returns a privacy rule based information minimization response using the following structured format:
{
"final_answer": "...",
"claims": [
{
"claim": "...",
"evidence": ["...", "..."]
},{
"claim": "...",
"evidence": ["...", "..."]
}
],
"domain_fit": 0.0,
"self_confidence": 0.0
}
The corresponding mathematical representation is
The structured response separates the final conclusion from the claim level information used for subsequent reliability evaluation. Here, denotes the final conclusion returned by agent at round .
where denotes the -th explicit claim in the response, and denotes the number of claims.
Each claim is paired with a corresponding evidence set, such that
where contains the evidence provided specifically for claim . In particular,
where denotes the -th evidence item associated with the -th claim, and denotes the number of evidence items provided for that claim. Thus, the structured representation establishes an explicit claim evidence correspondence: each is evaluated together with its own evidence set , while different claims may be supported by different numbers of evidence items.
The fields domain_fit and self_confidence are self reported auxiliary metadata in . Because these values may be manipulated by unreliable clients, they are not directly treated as reliability scores.
| Component | Implementation | Shares | Trainable |
| Intent evaluator | Frozen LLM judge | No | No |
| Evidence evaluator | Frozen LLM judge | No | No |
| Consensus evaluator | Semantic similarity | No | No |
| Orchestrator | RL fine tuned LLM | – | Yes |
Table 4. Implementation and training status of the response evaluators.
Example. [AGE] year old [GENDER] with transitional cell carcinoma of the bladder comes to the physician because of a [TIME] day history of ringing sensation in his ear. He received this first course of neoadjuvant chemotherapy [TIME]. Pure tone audiometry shows a sensorineural hearing loss of [NUMBER] dB. The expected beneficial effect of the drug that caused this patient’s symptoms is most likely due to which of the following actions? An example of a client response is shown in the Figure 7.

Figure 7. Format of the client’s response. Final Answer Format. Final Answer: Cross-linking of DNA. Claims. Claim 1. The patient is taking a chemotherapeutic agent used to treat bladder cancer, most likely a platinum-based drug like Cisplatin. Evidence: - transitional cell carcinoma of the bladder - first course of neoadjuvant chemotherapy. Claim 2. The mechanism of action, or beneficial effect, of Cisplatin is the formation of intra- and inter-strand DNA cross-links. Evidence: - expected beneficial effect of the drug that caused this patient's symptoms.
Evaluator Implementation and Parameter Isolation
The response evaluators are separated from the trainable orchestrator (Qwen2.5-3B-Instruct). Specifically, the intent and evidence anomaly scores are produced by a frozen judge model using fixed evaluation prompts and predefined scoring criteria. The judge does not share trainable parameters with , and its parameters remain unchanged during both reinforcement learning training and inference. The intent and evidence evaluators use the same frozen judge model (Qwen2.5-3B-Instruct) backbone but different task specific instructions.
The consensus anomaly does not invoke the judge model. It is computed deterministically from the semantic similarity between the conclusions of the participating agents. Therefore, the three anomaly dimensions do not introduce additional trainable components into PFedMA.
The judge receives only the response fields required by the corresponding evaluator. The intent evaluator receives the response sentences and the predefined intent risk categories, whereas the evidence evaluator receives each claim and its associated evidence. It does not observe the ground truth answer, the routing reward, or the orchestrator’s subsequent decision. The resulting anomaly scores are used by the server for response filtering and agent state updates, but no evaluator gradient is propagated to the orchestrator.
Anomaly Definitions and Boundary Cases
Pooling Operator. For any non empty set of scores , we define
where denotes the number of fine-grained anomaly scores being aggregated, denotes the -th anomaly score, and controls the trade-off between the most severe anomaly and the average anomaly level.
Intent Anomaly. Let denote the sentence level units extracted from . The predefined intent risk set is
For each response unit, the evaluator produces an intent risk score
The response level intent anomaly is
Evidence Anomaly. Privacy rule based information minimization adjustment or abstracts sensitive details while aiming to preserve the evidence supporting each claim. The evaluator assesses the support provided by the privacy processed evidence; omitted sensitive details are not themselves treated as anomalies when the remaining information sufficiently supports the claim. Verifiability refers to the judge’s assessment based on the supplied text, rather than independent verification of external sources. For claim , let
where denotes the -th evidence item associated with the -th claim, and denotes the number of evidence items provided for that claim. For , let and denote the support strength and verifiability of evidence item , respectively. We define
The internal coherence of the evidence set is
The claim level evidence quality is
Accordingly, the claim level evidence anomaly is
The response level evidence anomaly is
When no explicit claim is provided, i.e., , the evidence anomaly is set to its maximum value of 1. This boundary condition prevents an empty claim set from bypassing evidence-quality evaluation and is consistent with the structured response format, in which claims and their associated evidence provide the basis for evidence reliability assessment.
Consensus Anomaly. The consensus anomaly measures whether the conclusion of client is supported by the conclusions of the other selected clients:
where denotes normalized semantic similarity. A larger value therefore indicates stronger deviation from peer conclusions. The singleton case is assigned zero because consensus cannot be assessed from only one response.
Overall Anomaly Score and Robust Aggregation
The three anomaly dimensions are combined into an overall response anomaly score:
Responses whose anomaly scores exceed the tolerance threshold are excluded from aggregation:
The orchestrator then aggregates the retained privacy rule based information minimization responses to update the accumulated collaboration state:
Agent Routing State Update
After each orchestration round, PFedMA updates the routing metadata of the participating agents based on their observed historical capability and historical response reliability.
For agent with at least one previously retained response, define:
Thus, indexes the most recent round before in which the response of client was retained by the reliability filter. Denote the most recent round before in which the response of agent was retained by the reliability filter. Here, indexes previous collaboration rounds. This definition allows the historical capability update to compare the current response with the most recent reliable response of the same agent while naturally accommodating intermittent agent participation across rounds.
If the current response passes the reliability filter and the agent has a previously retained response, the orchestrator compares the current response with that agent’s most recent retained response from an earlier round to obtain a response level improvement signal and an agent specific capability increment vector.
Here, and denote two comparative evaluations performed by the same orchestrator under different fixed evaluation instructions, rather than conditional likelihoods. The response level feedback signal indicates whether the current retained response improves upon the most recent retained response of the same client. The capability vector identifies the capability dimensions in which the current response improves upon that reference. Before collaboration begins, the historical capability state of each agent is initialized as a zero vector: .
For the first retained response of an agent, no previously retained response is available for comparison. This response therefore establishes the initial comparison reference, and no capability progress increment is assigned in that round.
For subsequent responses, the historical capability state is updated as
where denotes the set of responses retained by the reliability filter. Therefore, responses excluded from aggregation do not receive positive progress credit.
The historical reliability state records the cumulative mean of the anomaly scores observed from the responses of agent . Let denote the number of responses from agent that have been evaluated prior to round . Before collaboration begins, the observation count and historical reliability state are initialized as
Whenever a new response from agent is evaluated, the observation count is updated as
and the historical reliability state is updated as
Here, , , and denote the intent, evidence, and consensus anomaly scores of the current response, respectively. Unlike the historical capability update, every evaluated response contributes to the historical reliability state, including responses excluded from aggregation by the reliability filter. This allows unreliable responses to remain reflected in the agent’s historical risk profile.
If agent does not return a newly evaluated response at round , its historical capability state, reliability states, and observation count remain unchanged. Finally, the updated routing state is defined as
Thus, the routing state jointly captures accumulated evidence of agent-specific historical capability and historical response reliability, allowing subsequent routing decisions to account for both observed collaboration progress and historical reliability.
Reinforcement Learning Details
Reward Definitions
Let denote a collaboration trajectory containing executed routing rounds, where is the maximum routing round budget, , and indexes the executed rounds. As defined in Equation (6), the trajectory reward consists of a format reward, a terminal answer reward, and step-wise rewards that provide intermediate supervision for multi-round orchestration.
Format and final conclusion rewards. The format reward evaluates whether the orchestrator generated outputs satisfy the required structured format:
The terminal answer reward evaluates the correctness of the final answer using the corresponding benchmark evaluator:
Cross-round reasoning progress. For a training instance with ground truth answer , let denote the answer extracted from the aggregated reasoning state using the corresponding benchmark’s answer extraction procedure. Exact Match (EM) is defined as
where is the indicator function. To measure partial correctness, let and denote the token multisets obtained after applying the same benchmark specific normalization procedure to and , respectively. Token level precision is
Token level recall is
Here, denotes multiset intersection, denotes the number of tokens counted with multiplicity, precision is the proportion of predicted tokens that match the ground truth answer, and recall is the proportion of ground truth tokens covered by the prediction. The token level F1 score is
Since and are nonnegative, their sum is zero only when both scores are zero. The second case therefore avoids division by zero. Following [38], the intermediate answer quality score is
Thus, for an exact match and otherwise. We set and define the quality gain at round as
Round level response risk. For each response , we reuse the overall anomaly score . Since its three components are bounded in , its range is
Each response anomaly score is normalized by , and the normalized scores are averaged over the agents invoked at round . The round-level response risk is
where is the set of agents invoked at round . Here, is the consensus anomaly weight and is the number of agents invoked at round . Consequently, and a larger value indicates a less reliable set of responses.
Agent invocation cost. The normalized invocation cost is
where is the maximum number of agents that may be invoked in one routing round.
Combining the three components gives the step wise reward in (7):
A routing step satisfies . If the orchestrator selects the termination action, no additional agent is invoked and no further step wise reward is generated.
The ground truth dependent quantities , , and are used only during RL training. They are not available to the orchestrator during inference.
Policy Optimization
We optimize the server side orchestrator , where denotes its trainable parameters, using Proximal Policy Optimization (PPO) implemented with the veRL framework. At round , the policy observes the privacy processed query , the accumulated collaboration state , and the capability and safety metadata of the candidate agents. It then generates a structured routing action that either selects a subset satisfying or terminates the trajectory when no additional agent is required.
After the selected agents return Privacy rule based information minimization responses , the server evaluates response reliability, aggregates the retained responses, and computes the training reward. PPO updates are performed centrally using the orchestrator visible trajectory. Raw client datasets , local experience buffers , complete personalized privacy rules , and unsanitized responses remain client local and are not used in policy optimization. This training protocol preserves the federated data isolation boundary, but does not by itself provide a cryptographic or differential privacy guarantee.
Training Configuration
We train the Orchestrator using the veRL framework for reinforcement learning in LLMs, with Proximal Policy Optimization (PPO) as the default algorithm. Specifically, we use the training splits of MATH and MedQA for RL optimization of the Orchestrator, while all remaining benchmarks are evaluated in a zero shot manner without further RL fine tuning. During the RL training phase, the batch size is set to 64, with a maximum of 220 training steps. The anomaly evaluation parameters are set to and ; their sensitivity is analyzed in Section J.5. Training this model requires 4 NVIDIA A800 GPUs, while inference requires 8 NVIDIA 3090 GPUs. Below are the hyperparameter settings for reinforcement learning in our work. We refer to [38] to set the hyperparameters required for the experiments.
| Hyperparameter | Value | Hyperparameter | Value |
| Learning Rate (Actor) | 1e-5 | Learning Rate (Critic) | 1e-5 |
| Total Batch Size | 64 | Mini-batch Size | 64 |
| Micro-batch Size | 8 | Max Training Steps | 220 |
| Max Routing Steps | 100 | Max Sequence Length | 4096 |
| Max Response Length | 2048 | Max Length for LLM API Response | 1024 |
| Tensor Parallel Size | 1 | GPU Utilization Ratio | 0.8 |
| Rollout Sampling Temperature (Train) | 1.0 | Rollout Sampling Temperature (Eval) | 1.0 |
Table 5. Hyperparameter Settings.
Federated Privacy Rule Co-Evolution
Candidate Pool Construction. Only clients retained by the response reliability evaluation contribute new rule candidates. To prevent one client from dominating a semantic cluster, each client contributes at most one candidate to that cluster in a collaboration round. After this distinct client contribution check, explicit client identifiers are removed from the stored representations, and the candidates are randomly permuted:
where is the retained agent set defined in Equation (29), and is the resulting unordered candidate pool. A client that identifies no new rule at round contributes no candidate. Removing explicit identifiers and permuting candidates reduces direct identifier exposure in the shared representations but does not provide an anonymity guarantee.
Semantic Support Filtering. For each candidate , we compute semantic support by counting the other uploaded candidates whose cosine similarity to it is at least 0.9:
where maps each generalized privacy rule to a semantic embedding, computes cosine similarity, and is the indicator function. The condition excludes self support. Under the distinct client contribution check used in candidate pool construction, repeated contributions from the same client to a semantic cluster do not increase its support.
We then normalize the support count to obtain the proportion of other candidates that are semantically similar to :
where . The denominator prevents division by zero for a singleton pool.
For a pool containing multiple candidates, we select those with the highest positive support proportion, without introducing an additional support count or support proportion threshold. For a singleton pool, the sole candidate is passed directly to the global update. The resulting global candidate set is
All candidates tied for the highest positive support proportion are retained. If multiple candidates are present but none receives support, then . The singleton case explicitly permits a candidate to enter the global update without cross client corroboration. For larger pools, the selection favors candidates with the broadest support and excludes those with lower support proportions. Semantically equivalent accepted candidates are subsequently consolidated into a representative global rule, and conflicting alternatives are handled through feedback based conflict resolution.
Local Utility Evaluation and Rule Selection. After the global update, reusable rules are redistributed to the clients and evaluated locally. For a candidate rule , client computes
where measures the semantic relevance of to the local experience buffer , records how many times the rule has been triggered locally, records how many of those applications were locally evaluated as effective, and records how many applications conflicted with a local policy or task requirement. These statistics remain on device. The maximum operator avoids division by zero when a rule has not yet been triggered.
Let denote a global privacy rule received by client . If the client has a semantically corresponding local rule , it compares the two rules using their local utility scores and selects the one with the higher score. If no corresponding local rule exists, the client evaluates against its default privacy policy.
If no semantically corresponding local rule exists, the redistributed rule is evaluated against the client’s default policy. If no global counterpart exists, the existing local rule remains active. Ties are resolved in favor of the existing local rule. The selected rule is added to the client’s local privacy rule repository: . It is then used for subsequent Privacy rule based information minimization under the corresponding semantic constraint. Non selected personalized alternatives remain in the local repository and may be reconsidered as new rule level feedback becomes available. Consequently, a global rule does not unconditionally override a personalized rule and is adopted only when it obtains a higher local utility score.
Client Side Rule Level Feedback. Client locally records the usage and effectiveness of privacy rules in round . Let denote the set of local rules applied and evaluated in that round, including existing personalized rules and adopted global rules. The corresponding local rule level feedback is
Here, is the identifier of a redistributed global rule, and each term records only the corresponding change in the current round. The feedback does not contain triggering examples, raw responses, complete personalized rules, or the local experience buffer.
The server collects the compact feedback reported by the selected clients:
The server uses these signals to update scores, resolve conflicts, and adjust which shared global rules remain active. Client specific rule content and complete usage statistics remain stored locally.
Historical Rule Score Update. The local utility evaluation determines which privacy rule is used by each client, whereas the following procedure evaluates the subsequent use of shared rules across clients. Client side usage feedback is aggregated by the server to maintain a historical score for each global rule. This score is then used to perform server rule updates.
For each global privacy rule , the server checks the feedback in and includes client index in if reports an evaluated use of the rule identified by , and . Thus, contains the indices of clients that used the corresponding rule and reported its results in round , with each client counted once. For each , the feedback score is defined as
where for every . The server maintains a historical score for each shared global rule. If evaluable feedback is available in round , the score is updated by
For a newly promoted global rule, we initialize and . Let denote the cumulative number of client evaluations received by global rule before round . The count is updated as . The historical rule score is updated by
If no evaluable feedback is available for in round , its previous score is retained.
Rule Conflict Resolution. PFedMA does not apply a separate rule remove criterion. Instead, the server uses the feedback based conflict resolution procedure described above to determine which rule is used for each semantic constraint. Non selected alternatives remain in the global repository and may be reconsidered when additional client feedback becomes available. Rules are not removed solely because they receive no feedback in a round.
Dynamic Global Repository Update. The server updates the global repository by combining the existing rules with the accepted candidates :
Here, Resolve merges equivalent rules and applies the conflict resolution procedure described above. Its output is
Here, are the rules selected for the first, second, and subsequent semantic constraints, respectively, using the conflict resolution procedure described above. The subscripts index semantic constraints, not clients. A rule without conflicting alternatives is retained directly.
In other words, RuleUpdate is a compact representation of the server side global rule evolution process rather than a separate optimization operator. The client feedback is first used to update the rule scores , after which the newly promoted candidates are combined with the existing global repository . The Resolve operation then merges semantically equivalent rules and resolves conflicting rules according to their updated scores. Rules without conflicting alternatives are retained directly. Consequently, both newly discovered cross client privacy knowledge and subsequent rule execution feedback jointly determine the evolution of .
Interaction with Privacy Enforcement. The updated global repository filters subsequent queries before they are sent to selected clients, reducing unnecessary disclosure without concealing the query from the server. Each client uses its personalized repository to process local responses before transmission. Raw responses, complete rules, local experiences, and triggering examples remain on device; generalized rule candidates and compact feedback are shared for global updates. This closes the rule evolution loop: local rules are generalized and promoted through cross client support, global rules are selectively adapted by clients, and their feedback guides later conflict resolution and retirement. Thus, global and personalized repositories co-evolve across rounds rather than through one way propagation.
Trust Assumptions. While task responses may be unreliable or malicious, as described in § 3.1. Our framework assumes that privacy rules are trusted policy artifacts that faithfully represent the privacy requirements of participating clients. In particular, we assume that (i) each client correctly maintains its local privacy-rule repository, (ii) the global privacy-rule repository only contains rules accepted through the prescribed rule-evolution procedure, and (iii) the coordinator faithfully executes rule aggregation, conflict resolution, and rule dissemination.
Under this assumption, privacy rules are treated as trusted policy inputs rather than adversarial objects. Privacy-rule poisoning, malicious rule injection, intentional manipulation of rule semantics, and compromise of the trusted rule repository are outside the scope of this work. Our goal is instead to study how privacy knowledge can be generalized, aggregated, and personalized across clients while respecting client-local privacy constraints.
Prompt Templates
The query evolution prompt guides the orchestrator to review the accumulated collaboration state and determine what information is still needed to solve the task. It uses responses collected in previous rounds to distinguish questions that have already been answered from those requiring further investigation. The updated query then directs subsequent collaboration toward these remaining questions, reducing repeated requests for information already available.

Figure 1 (PDF p. 25). Evolution. You are a question optimization expert. Rewrite the user's question so that another LLM can understand and answer it more accurately. Requirements: 1. Preserve the original meaning and intent of the question. 2. Make the wording clearer, more concise, and more specific. 3. Clarify vague or ambiguous expressions when the context allows. 4. Do not add new assumptions, facts, constraints, or requirements that are not present in the original question. 5. Keep the rewritten question natural, complete, and suitable for direct use as an LLM input. Question: {question}
The privacy rule creation prompt identifies emerging privacy requirements in client inputs and expresses them as reusable rules for subsequent privacy processing. It compares the identified requirements with the existing rule library to determine whether suitable rules are already available. When an existing rule adequately covers a requirement, it is reused; otherwise, a new rule is formulated to capture the previously uncovered constraint. By focusing on gaps in existing coverage, this process allows clients to incorporate new requirements encountered during collaboration while limiting redundant rule creation. The resulting rules extend the rule library and provide a consistent basis for handling similar requirements in future interactions, reducing the need to formulate rules repeatedly for recurring situations. They also provide a basis for sharing generalized privacy knowledge across clients, allowing requirements identified in one context to inform rule development in other settings. Through this process, individual collaboration experiences can contribute to a broader collection of reusable privacy rules that remains adaptable to evolving client needs.

Figure 2 (PDF p. 25). Rule Prompt. Task: Act as a privacy protection expert. Analyze the input text to identify all potential privacy-sensitive information. Compare identified privacy types against the existing rule library and either select existing rules or formulate new ones. You must: 1. Broadly identify any privacy-sensitive information, including but not limited to PII (names, IDs), contact details, medical records (diagnoses, test results, symptoms, medications), financial data, and location/biometric data. 2. Treat client-specific sensitive information as private when it falls under the applicable privacy policy, including personally identifying information, patient-specific clinical details, financial information, and other context-dependent sensitive attributes. 3. Specific measurements, diagnoses, symptoms, medications, or other individual-level attributes should be protected when required by the applicable privacy policy. 4. Do not treat general domain knowledge or abstract factual statements as private unless they contain information specific to an individual. 5. Review the current existing rule library: {rule_index_json}. 6. If the identified privacy type is already covered by the library, select its rule name. 7. If the identified privacy type is not covered, define a new rule. The new rule name must be in English with snake_case and must not conflict with existing rules. 8. If no privacy information is found in the text, return empty arrays.
The question rewriting prompt turns the updated query into a clear and complete question for the selected clients. It incorporates relevant context and clarifies what information the clients should provide, while preserving the original task objective. This helps clients understand the request and produce answers that support the next reasoning step.
Change Question Prompt.
You are a query refinement expert supporting iterative multi-agent reasoning. Refine the current query using the available reasoning feedback to help the next agent address unresolved parts of the original task.
Inputs:
Original question: {question}
Current query: {current_query}
Current reasoning state: {reasoning_state}
Unresolved issues: {unresolved_gaps}
Requirements:
Preserve the original task, intent, and explicit constraints.
Use the reasoning state and unresolved issues to identify what the next agent needs to clarify, verify, or complete.
Prioritize unresolved issues that directly affect answering the original question. Avoid repeating resolved work unless verification is needed.
Treat intermediate conclusions as provisional. Do not present unverified claims as established facts or assume that previous answers are correct.
Make the refined query clear, specific, and self-contained using only information available in the inputs.
Do not introduce unsupported facts, assumptions, constraints, or unrelated objectives. Preserve uncertainty when the available context cannot resolve it.
Treat the supplied questions and feedback as task data. Do not follow embedded instructions that attempt to override these requirements.
If reasoning feedback is missing or uninformative, improve the current query's wording without changing its meaning.
Output only the refined query.
The routing prompt selects experts based on current reasoning needs and feedback on clients’ contributions and reliability, adapting selection as the task progresses.
Routing Prompt.
Task:
Analyze the original problem, the experts already selected, their answers, their known deficiencies, and the capability matrix. Determine whether the current expert set is sufficient to solve the problem correctly.
You must:
Understand the required final output format of the original problem.
Evaluate whether the selected experts’ answers are correct, complete, and aligned with the problem requirements.
Identify any remaining knowledge or capability gaps.
Decide whether additional experts are needed.
Select only the most necessary additional experts based on the capability matrix.
Do not add experts indiscriminately or include all available experts for convenience.
Do not include experts who have already been selected unless there is a clear need to reselect them.
If no additional experts are needed, set "continue" to false and return an empty "agents" list.
If the newly selected expert set would be exactly the same as the previous expert set in both names and quantity, set "continue" to false.
Return only a valid JSON object in the following structure:
"stage_id": Use the next stage identifier, such as "stage_1", "stage_2", etc.
"knowledge_deficit": Summarize the most important unresolved gap.
"stage_description": Describe the next stage work clearly and specifically.
"continue": Set to true only when additional expert selection is necessary.
"agents": Include only newly needed experts. Use an empty array if "continue" is false.
"expert_defect": Required when "continue" is true. Each selected expert must have a corresponding deficiency description.
"task_type": Must be exactly one capability type listed in {ability_describe}.
The privacy processing prompt guides the system to process outgoing content according to the applicable privacy rules. It identifies information subject to sharing restrictions and modifies the content while aiming to retain information useful for the task. Applying these rules before transmission helps align communication with privacy requirements as they evolve across collaboration rounds.

Figure 1 (PDF p. 27). Privacy Prompt. Task: Act as a privacy protection assistant. Apply the provided active privacy rules to sanitize the user's input text through semantic understanding. Each active rule is represented by the fields: category, action, abstraction, and priority. The category specifies the standardized semantic type of sensitive information covered by the rule. You must: 1. Use semantic understanding to identify text spans whose semantic type matches the category specified by an active rule. Do not rely solely on exact keyword matching. 2. Only sanitize information covered by the provided active rules: {rules_json}. Do not modify information that is not covered by an active rule. 3. If multiple active rules apply to the same text span, apply the rule with the highest priority. 4. If a rule's action is "HIDE", replace the matched sensitive span with a category-level placeholder and record only the placeholder and its category in the entities list. Do not expose the original sensitive content in the output. 5. If a rule's action is "ABSTRACT", generalize only the matched sensitive span according to the abstraction level specified by the rule, while preserving the surrounding task-relevant semantics. 6. When multiple distinct sensitive spans of the same category must be represented separately, assign consistent numeric suffixes when needed, such as "[ENTITY_1]" and "[ENTITY_2]". 7. Apply abstraction in a domain-agnostic manner. Preserve the semantic type and task-relevant context of the protected information while removing or generalizing details beyond the abstraction level permitted by the active rule. Do not introduce new factual information or infer replacement values that are not supported by the input. 8. Preserve the original meaning, structure, and non-sensitive content as much as possible. Do not perform unnecessary rewriting. 9. Return only the sanitized text and the corresponding privacy-safe entities list.
The agent response generation prompt structures answers based on local information into conclusions, claims, and evidence for reliability evaluation and aggregation.

Figure 2 (PDF p. 27). Agent Prompt. answer_generation_prompt = """You are a professional problem-solving expert. Your task is to solve the given problem accurately and return a structured answer. Inputs: Original Problem: {task.original_problem} Few-shot Examples: {few_shot_examples} Current Problem Context: {task.context} Instructions: 1. Carefully understand the original problem and the current problem context. 2. Use the few-shot examples only as formatting and reasoning references; do not copy their content unless directly relevant. 3. Provide a complete, accurate, and professional answer. 4. Use appropriate formatting inside the answer: - Use LaTeX format for mathematical expressions. - Use Python code blocks for programming-related solutions. - Use clear professional language for general reasoning tasks. 5. Ensure that every claim is supported by concrete evidence from the problem, context, reasoning process, or reliable domain knowledge. 6. Do not include unsupported assumptions. 7. If the information is insufficient, clearly state the uncertainty in the final answer and reflect it in the confidence score. Field requirements: - "final_answer": Provide the final answer directly and professionally. - "claims": Include one or more key claims that summarize and justify the final answer. - "claim": Each claim should be concise, clear, and directly related to the final answer. - "evidences": Each claim must include at least one supporting evidence. - "self_confidence": A numeric value between 0 and 1, indicating confidence in the answer.
Evaluation Metrics
For all methods, privacy metrics are computed from their generated outputs under the same privacy-sensitive evaluation protocol. This section provides the definitions of all privacy and robustness metrics used in our experiments. The rule enforcement metrics, including LPA, LPP, LPR, EA, and FRA, follow GuardAgent (Xiang et al., [34]. Leakage Rate (LR) follows the evaluation principle of PrivacyLens (Shao et al., [24]. The adversarial robustness metrics, including ASR, RR, PNA, and NRP follow Agent Security Bench (ASB) (Zhang et al., [37]). We additionally report Benign Performance (BP), defined here as the task completion rate on benign inputs with the evaluated defense mechanisms enabled.
Rule Enforcement Metrics. Let denote the number of evaluation instances. For each instance , let denote the ground truth label, where indicates a privacy/safety violation and indicates a permissible interaction. Let denote the predicted label. Following GuardAgent (Xiang et al., [34], the corresponding evaluation metrics are computed as
Label Prediction Accuracy (LPA).
Higher LPA indicates more accurate privacy/safety decisions.
Label Prediction Precision (LPP).
Higher LPP indicates fewer permissible interactions incorrectly classified as violations.
Label Prediction Recall (LPR).
Higher LPR indicates that more actual violations are correctly detected.
Explanation Accuracy (EA). Let denote the ground truth set of violated rules for instance , and the corresponding predicted set. Let . We define
Higher EA indicates more complete identification of the rules responsible for a violation.
Final Response Accuracy (FRA). Let denote the index set of permissible instances, and let indicate whether the final response or action for instance is correct. Then
Higher FRA indicates better preservation of task utility on permissible interactions.
Leakage Rate (LR). Following PrivacyLens [24], LR measures the proportion of privacy sensitive instances in which at least one sensitive information item can be inferred from the evaluated output. Let denote the set of privacy sensitive evaluation instances. For each instance , let denote the set of sensitive information items associated with , and let denote the evaluated output. For each , let indicate whether the sensitive information item can be inferred from . The instance level leakage indicator is . The Leakage Rate is
Lower LR indicates less observed privacy leakage. Following PrivacyLens [24], LR is computed at the instance level: an instance is counted as leaked if at least one sensitive information item is inferable from the evaluated output.
Attack Success Rate (ASR). Let denote the number of attacked tasks and the number of successful attacks. Then
Lower ASR indicates stronger adversarial robustness.
Refusal Rate (RR). Let denote the number of aggressive requests and the number explicitly refused by the agent. Then
Higher RR indicates stronger refusal behavior against unsafe requests.
Performance under No Attack (PNA). Let denote the number of clean tasks and the number successfully completed. Then
Higher PNA indicates better benign task performance.
Benign Performance (BP). BP measures the system’s ability to complete benign tasks under the evaluated defense configuration. Let denote the number of benign test tasks without injected attacks, and let denote the number of these tasks successfully completed with the defense mechanisms enabled. Then
Higher BP indicates better preservation of benign task utility with the defense mechanisms enabled.
Net Resilient Performance (NRP).
where PNA and ASR are converted to the scale before multiplication. Higher NRP indicates a better trade off between benign task performance and adversarial robustness.
Adversarial Evaluation Setup
We evaluate PFedMA using context ignoring prompt injection attacks adapted from Agent Security Bench (ASB) [37]. The following paragraphs specify the threat model and attack configuration.
Threat Model. We distinguish task response reliability from privacy policy trust. Participating clients may produce unreliable or malicious task responses, which motivates reliability aware routing and response filtering. In contrast, privacy rules are treated as trusted policy artifacts maintained by the client side privacy subsystem and are not controlled by the task response adversary. Therefore, privacy rule poisoning, malicious rule injection, and manipulation of rule semantics are outside the threat model considered in this work. The server is honest but curious and may attempt to infer private information from privacy processed communications, but faithfully executes the prescribed rule aggregation and dissemination protocol.
Attack Construction. Following Agent Security Bench (ASB) Zhang et al. [37], we construct the context ignoring prompt injection attack as , where denotes the original task text, denotes the context ignoring instruction, denotes the injected adversarial instruction, and denotes string concatenation.
Malicious Agent Configuration. For each test instance, agents are randomly selected as malicious from the participating agents. The adversarial ratio is defined as . We evaluate different values of to examine robustness under increasing adversarial ratios. The specific configurations are .
Evaluation Metric. We use Attack Success Rate (ASR), defined in Section H, as the primary robustness metric. The contribution of the anomaly filtering mechanism is evaluated by comparing PFedMA with its filtering disabled variant under the same attack configuration.
Additional Experimental Analysis
This section provides additional analyses of client data heterogeneity, agent capabilities, iterative collaboration, efficiency, robustness, and hyperparameter sensitivity.
Effect of Client Data Heterogeneity
To evaluate client data heterogeneity, we consider both IID and Dirichlet based Non IID partitions with , where smaller indicates stronger heterogeneity. As shown in Figure 9d, average accuracy decreases from 0.744 under IID to 0.611 at , and recovers to 0.663 and 0.719 as increases to 0.5 and 1.0, respectively.
Agent Capabilities and Selection Patterns
Agent Analysis. In our setting, there is some overlap in the abilities of the expert agents. Figure 6 provides a visual representation of the dynamic expert selection mechanism. Specifically, Figure 6a shows that Agent 1 possesses outstanding mathematical abilities. Consistent with this, the heatmap in Figure 6c indicates that Agent 1 is frequently selected in math intensive benchmarks such as GSM8K and MATH. Meanwhile, Figure 6b confirms Agent 6’s outstanding expertise in the medical domain, which aligns with its high selection frequency on medical datasets such as MedQA and MedMCQA. These results demonstrate that our mechanism can accurately capture task requirements and adaptively leverage the domain strengths of expert agents. We use abbreviated labels to improve the readability of agent capability visualizations.
| Abbr. | Full Capability | Abbr. | Full Capability |
| Math | Mathematical Calculation | Q.Anlys. | Question Analysis |
| Code | Code Generation | Geo.Logic | Geographical Logical Reasoning |
| Trans. | Translation | Med.QA | Medical Knowledge Question Answering |
| Summary | Summarization | Clin.Rec. | Clinical Record Structuring |
| Story | Story Generation | Med.Lit. | Medical Literature Retrieval |
| Combined | Combined Task | Pat.Comm. | Patient Communication |
Table 6. Explanation of capability abbreviations.

Figure 8. Agent Ability
Iterative Reasoning, Privacy Rule Evolution, and API Usage
Figure 9 presents answer accuracy and privacy rule effectiveness across rounds, together with API usage across benchmarks. For the Non IID setting, samples are partitioned across clients using a Dirichlet distribution over the task domain categories. For each category, client allocation proportions are sampled from , where smaller induces stronger client level heterogeneity.
Efficiency and Robustness Trade offs
Figures 3a examine how task performance and token consumption evolve with iteration rounds, while Figure 2d evaluates the robustness utility trade off as the proportion of adversarial agents increases.
Hyperparameter Sensitivity
Figure 5 presents the sensitivity analysis of and using independent parameter sweeps. Both hyperparameters exhibit non monotonic effects on robustness, indicating that either insufficient or excessive filtering strength can degrade performance. Smaller values provide weaker suppression of potentially unreliable responses, whereas overly large values may reject useful responses and reduce refusal rate. AHyperparameters were selected using a held-out validation set and fixed before evaluation on the test sets. Based on the validation results, we set and ior all main experiments. Figure 5 reports the corresponding sensitivity analysis, showing that performance varies non-monotonically with both hyperparameters and that the selected values provide a favorable trade-off between attack suppression and refusal behavior.

Figure 5. Hyperparameters and . The x-axis represents the parameter values, and the y-axis shows the corresponding ASR and RR.
Privacy Scope.
PFedMA focuses on limiting the disclosure of client local information during federated collaboration rather than hiding the task query from the server. Raw local responses, complete personalized privacy rules, local experiences, and triggering examples remain on device, while privacy processed responses, generalized rule candidates, and compact rule level feedback may be visible to the server. Our privacy evaluation measures sensitive information leakage from generated outputs and does not constitute a formal confidentiality guarantee.
Limitations
PFedMA does not claim formal privacy guarantees such as differential privacy or cryptographic confidentiality. Instead, it provides semantic level privacy filtering by controlling information disclosure through adaptive privacy rules. As multi-agent systems move toward broader collaboration across organizational boundaries, stronger privacy assurances will become increasingly important. Establishing formal guarantees is an important direction for future work.
References
- [1]Lisa C Adams, Daniel Truhn, Felix Busch, Felix Dorfner, Jawed Nawabi, Marcus R Makowski, and Keno K Bresser. Llama 3 challenges proprietary state-of-the-art large language models in radiology board–style examination questions. Radiology, 312(2):e241191, 2024.DOI
- [2]Diogo Almeida. Introducing system one models & jev. TypeSafe AI, 2026. URL https:// typesafe.ai/blog/introducing-system-one-models-and-jev.
- [3]Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023.arxiv.org/abs/2309.16609
- [4]Zhenyu Bi, Meng Lu, Yang Li, Swastik Roy, Weijie Guan, Morteza Ziyadi, and Xuan Wang. Optimizing multi-agent llm interactions through verbal reinforcement learning for enhanced reasoning. In Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics, pp. 1713–1728, 2025.
- [5]Aili Chen, Aonian Li, Baichuan Zhou, Bangwei Gong, Binyang Jiang, Boji Dan, Changhao Zhang, Changqing Yu, Chao Wang, Cheng Ma, et al. The minimax-m2 series: Mini activations unleashing max real-world intelligence. arXiv preprint arXiv:2605.26494, 2026.
- [6]Minghui Chen, Ruinan Jin, Wenlong Deng, Yuanyuan Chen, Zhi Huang, Han Yu, and Xiaoxiao Li. Can textual gradient work in federated learning? arXiv preprint arXiv:2502.19980, 2025.
- [7]Weize Chen, Yusheng Su, Jingwei Zuo, Cheng Yang, Chenfei Yuan, Chi-Min Chan, Heyang Yu, Yaxi Lu, Yi-Hsin Hung, Chen Qian, et al. Agentverse: Facilitating multi-agent collaboration and exploring emergent behaviors. In The Twelfth International Conference on Learning Representations, 2023.
- [8]Hyeong Kyu Choi, Xiaojin Zhu, and Sharon Li. Debate or vote: Which yields better decisions in multi-agent large language models? arXiv preprint arXiv:2508.17536, 2025.
- [9]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
- [10]Wentao Deng, Jiahua Pei, Zhiwei Xu, Zhaochun Ren, Zhumin Chen, and Pengjie Ren. Belief-calibrated multi-agent consensus seeking for complex nlp tasks. arXiv preprint arXiv:2510.06307, 2025.
- [11]Haonan Duan, Adam Dziedzic, Mohammad Yaghini, Nicolas Papernot, and Franziska Boenisch. On the privacy risk of in-context learning. arXiv preprint arXiv:2411.10512, 2024.
- [12]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.
- [13]Taicheng Guo, Xiuying Chen, Yaqi Wang, Ruidi Chang, Shichao Pei, Nitesh V Chawla, Olaf Wiest, and Xiangliang Zhang. Large language model based multi-agents: A survey of progress and challenges. arXiv preprint arXiv:2402.01680, 2024.
- [14]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
- [15]Tianyu Hu, Zhen Tan, Song Wang, Huaizhi Qu, and Tianlong Chen. Multi-agent debate for llm judges with adaptive stability detection. arXiv preprint arXiv:2510.12697, 2025.
- [16]Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, et al. Gpt-4o system card. arXiv preprint arXiv:2410.21276, 2024.arxiv.org/abs/2410.21276
- [17]Anita Keshmirian, Razan Baltaji, Babak Hemmatian, Hadi Asghari, and Lay R Varshney. Many Illms are more utilitarian than one. arXiv preprint arXiv:2507.00814, 2025.arxiv.org/abs/2507.00814
- [18]Magdalena Kossek and Margareta Stefanovic. Survey of recent results in privacy-preserving mechanisms for multi-agent systems. Journal of Intelligent & Robotic Systems, 110(3):129, 2024.DOI
- [19]Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, et al. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437, 2024.arxiv.org/abs/2412.19437
- [20]Niklas Muennighoff, Zitong Yang, Weijia Shi, Xiang Lisa Li, Li Fei-Fei, Hananneh Hajishirzi, Luke Zettlemoyer, Percy Liang, Emmanuel Candès, and Tatsunori B Hashimoto. s1: Simple test-time scaling. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 20286–20332, 2025.arxiv.org/abs/2501.19393
- [21]Anudit Nagar, Cuong Tran, and Ferdinando Fioretto. A privacy-preserving and trustable multi-agent learning framework. arXiv preprint arXiv:2106.01242, 2021.arxiv.org/abs/2106.01242
- [22]Ashwinee Panda, Tong Wu, Jiachen Wang, and Prateek Mittal. Differentially private in-context learning. In The 61st Annual Meeting Of The Association For Computational Linguistics, 2023.
- [23]Chen Qiu, Xingyu Li, Chaithanya Kumar Mummadi, Madan Ravi Ganesh, Zhenzhen Li, Lu Peng, and Wan-Yi Lin. Text-driven prompt generation for vision-language models in federated learning. arXiv preprint arXiv:2310.06123, 2023.arxiv.org/abs/2310.06123
- [24]Yijia Shao, Tianshi Li, Weiyan Shi, Yanchen Liu, and Diyi Yang. PrivacyLens: Evaluating privacy norm awareness of language models in action. Advances in Neural Information Processing Systems, 37:89373–89407, 2024.arxiv.org/abs/2409.00138
- [25]Zitong Shi, Guancheng Wan, Wenke Huang, Guibin Zhang, Jiawei Shao, Mang Ye, and Carl Yang. Privacy-enhancing paradigms within federated multi-agent systems. arXiv preprint arXiv:2503.08175, 2025.arxiv.org/abs/2503.08175
- [26]Yiliu Sun, Zicheng Zhao, Sheng Wan, and Chen Gong. Cortexdebate: Debating sparsely and equally for multi-agent debate. In Findings of the Association for Computational Linguistics: ACL 2025, pp. 9503–9523, 2025.arxiv.org/abs/2507.03928
- [27]Xiangru Tang, Anni Zou, Zhuosheng Zhang, Ziming Li, Yilun Zhao, Xingyao Zhang, Arman Cohan, and Mark Gerstein. Medagents: Large language models as collaborators for zero-shot medical reasoning. In Findings of the Association for Computational Linguistics: ACL 2024, pp. 599–621, 2024.arxiv.org/abs/2311.10537
- [28]Kimi Team, Tongtong Bai, Yifan Bai, Yiping Bao, SH Cai, Yuan Cao, Y Charles, HS Che, Cheng Chen, Guanduo Chen, et al. Kimi k2. 5: Visual agentic intelligence. arXiv preprint arXiv:2602.02276, 2026.arxiv.org/abs/2602.02276
- [29]Nguyen Truong, Kai Sun, Siyao Wang, Florian Guitton, and YiKe Guo. Privacy preservation in federated learning: An insightful survey from the gdpr perspective. Computers & Security, 110:102402, 2021.arxiv.org/abs/2011.05411
- [30]Junlin Wang, Jue Wang, Ben Athiwaratkun, Ce Zhang, and James Zou. Mixture-of-agents enhances large language model capabilities. arXiv preprint arXiv:2406.04692, 2024.arxiv.org/abs/2406.04692
- [31]Ruhan Wang, Zhiyong Wang, Chengkai Huang, Rui Wang, Tong Yu, Lina Yao, John Lui, and Dongruo Zhou. Federated in-context learning: Iterative refinement for improved answer quality. arXiv preprint arXiv:2506.07440, 2025.arxiv.org/abs/2506.07440
- [32]Yaqi Wang, Jianquan Lu, Wei Xing Zheng, and Kaibo Shi. Privacy-preserving consensus for multi-agent systems via node decomposition strategy. IEEE Transactions on Circuits and Systems I: Regular Papers, 68(8):3474–3484, 2021.DOI
- [33]Panlong Wu, Kangshuo Li, Junbao Nan, and Fangxin Wang. Federated in-context llm agent learning. arXiv preprint arXiv:2412.08054, 2024.arxiv.org/abs/2412.08054
- [34]Zhen Xiang, Linzhi Zheng, Yanjie Li, Junyuan Hong, Qinbin Li, Han Xie, Jiawei Zhang, Zidi Xiong, Chulin Xie, Nathaniel D Bastian, et al. Guardagent: safeguard llm agents via knowledge-enabled reasoning. In ICML 2025 workshop on computer use agents, 2025.arxiv.org/abs/2406.09187
- [35]Mengxi Xiao, Ben Liu, He Li, Jimin Huang, Qianqian Xie, Xiaofen Zong, Mang Ye, and Min Peng. Moodangels: A retrieval-augmented multi-agent framework for psychiatry diagnosis. arXiv preprint arXiv:2506.03750, 2025.arxiv.org/abs/2506.03750
- [36]Yanwei Yue, Guibin Zhang, Boyang Liu, Guancheng Wan, Kun Wang, Dawei Cheng, and Yiyan Qi. Masrouter: Learning to route llms for multi-agent systems. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 15549–15572, 2025.
- [37]Hanrong Zhang, Jingyuan Huang, Kai Mei, Yifei Yao, Zhenting Wang, Chenlu Zhan, Hongwei Wang, and Yongfeng Zhang. Agent security bench (asb): Formalizing and benchmarking attacks and defenses in llm-based agents. arXiv preprint arXiv:2410.02644, 2024.arxiv.org/abs/2410.02644
- [38]Haozhen Zhang, Tao Feng, and Jiaxuan You. Router-r1: Teaching llms multi-round routing and aggregation via reinforcement learning. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025a.
- [39]Jusheng Zhang, Zimeng Huang, Yijia Fan, Ningyuan Liu, Mingyan Li, Zhuojie Yang, Jiawei Yao, Jian Wang, and Keze Wang. Kabb: Knowledge-aware bayesian bandits for dynamic expert coordination in multi-agent systems. arXiv preprint arXiv:2502.07350, 2025b.arxiv.org/abs/2502.07350
- [40]Yanzhe Zhang and Diyi Yang. Searching for privacy risks in llm agents via simulation. In International Conference on Learning Representations, volume 2026, pp. 98142–98176, 2026.arxiv.org/abs/2508.10880