P-FedSkill: A Personalized Federated Skill Learning Framework under Task Heterogeneity

Zehang Lin, Jiayi Ji, Rongrong JiarXiv 2026

TL;DR

AI agents get smarter by distilling their past actions into reusable "skills," and federated learning lets them share these skills without exposing sensitive user data. However, blindly sharing skills across users with very different goals often backfires, feeding agents irrelevant or downright misleading instructions. P-FedSkill solves this by treating skill sharing like a personalized matchmaking service—evaluating how skills actually perform on specific tasks and dynamically routing only the right strategies to the right agent at the right time.

What Problem Does This Paper Address?

Imagine deploying millions of AI agents on edge devices. Each agent generates interaction "trajectories"—step-by-step logs of states, actions, and outcomes. By extracting reusable strategies (skills) from these logs, agents become much more efficient. Because individual users only perform a narrow set of tasks, pooling trajectories across devices would create a much richer skill library. Naturally, privacy concerns forbid sharing raw logs.

Federated Skill Learning (FSL) bridges this gap by distilling raw logs into compact skill representations locally and uploading only those abstractions to a central server. Yet existing FSL methods suffer from a blind spot: task heterogeneity. Different clients face wildly different tasks. Sharing skills based purely on vector similarity ignores utility. A strategy that helps Client A neatly place an object on a shelf might be completely irrelevant to Client B heating food in a microwave, or actively mislead Client C into taking the wrong actions while cleaning.

Fig. 1. Illustration of unequal skill contributions under task heterogeneity.

Methods

To make skill sharing task-aware, the authors propose P-FedSkill, built around three sequential modules (with a frozen text encoder handling feature representations):

Fig. 2. Illustration of the P-FedSkill framework.
  1. Local Skill Extraction (LSE): Instead of lumping all local logs together, the client agent first groups its trajectories by task type. From each homogeneous group, it extracts compact skill patches consisting of two parts: a task applicability condition (when to use it) and an execution strategy (filtered tool calls and action sequences). It deduplicates identical patches and tallies how many subgoals succeeded or failed using each strategy, uploading the patches, outcome counts, and encoded task descriptions to the server.
  2. Personalized Skill Selection (PSS): On the server, semantically equivalent patches are merged into a global pool. Because a client might only test a skill a few times locally, PSS uses empirical Bayes to evaluate reliability: it builds a Beta prior from other clients' success rates and updates it with the target client's local successes and failures. To guard against small-sample flukes, it penalizes the posterior mean by its standard deviation. This conservative performance score is added to an applicability score—measuring cosine similarity between the skill's condition and both the client's overall tasks and specifically its failed tasks. Each client receives its top-$K$ personalized skills.
  3. Task-Aware Skill Routing (TASR): Even a personalized skill toolkit contains strategies for multiple local tasks. At inference time, TASR scores the client's skills against the current task description. Rather than feeding a fixed number of skills into the agent's prompt, TASR looks at the gap between the top-1 and top-2 relevance scores. If the gap is large (a clear match), it routes a small number of skills ($M_l$); if the top scores are close (ambiguous match), it routes a larger bundle ($M_h$) so potentially helpful strategies aren't left behind.

The authors also prove a finite-sample theoretical bound guaranteeing that PSS's selected skill set stays close to the true oracle-optimal set.

Datasets

The authors evaluate their framework using two existing benchmarks (no new datasets are introduced):

  • ALFWorld: An interactive benchmark aligning text descriptions with embodied household environments (used here for motivating empirical analyses on trajectory grouping and cross-client skill impact).
  • $\tau^2$-Bench: A benchmark for evaluating conversational agents in dual-control environments across three distinct domains: Airline, Retail, and Telecom. Tasks are split across 5 clients under both IID (shuffled evenly) and non-IID (partitioned via a Dirichlet distribution with $\alpha = 0.1$) settings, using Qwen3.6-35B-A3B as the shared backbone agent.

Key Insights and Ideas

  • Don't mix tasks during skill extraction: On ALFWorld, extracting skills from trajectories grouped by the same task type consistently required fewer steps to complete tasks and achieved higher accuracy as trajectory count grew, whereas extracting from multi-task logs introduced conflicting strategies.
  • Failures are a feature: When building a client's personalized skill set in PSS, explicitly scoring skills by how well their applicability conditions match a client's failed local tasks directly targets the agent's blind spots.
  • Confidence dictates context size: Using the relevance gap between the top two candidate skills is an intuitive, lightweight heuristic for dynamic prompt routing—avoiding noisy, bloated context windows when a single skill clearly fits the bill, while hedging bets when the task is ambiguous.

Key Results

On $\tau^2$-Bench, P-FedSkill outperforms all baselines—including a no-skill backbone (FSL-B), centralized memory (AWM), and federated baselines (FederatedSkill and FedSkillGit)—across every domain in both data distributions:

  • IID Setting: P-FedSkill hits 66.67% accuracy in Airline, 76.47% in Retail, and 76.47% in Telecom (surpassing the runner-up FederatedSkill at 46.67%, 73.53%, and 64.71%, respectively).
  • Non-IID Setting: Under heavy task heterogeneity, P-FedSkill achieves 80.00% in Airline, 70.59% in Retail, and 79.41% in Telecom—outperforming FederatedSkill by 6.67, 5.88, and 11.76 percentage points across the three domains, and beating the base agent (FSL-B) by up to 26.67 percentage points.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@misc{lin2026p,
  author = {Zehang Lin and Jiayi Ji and Rongrong Ji},
  title = {{P-FedSkill: A Personalized Federated Skill Learning Framework under Task Heterogeneity}},
  year = {2026},
  eprint = {2611.33707},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33707},
}
Figure