---
title: 'PolySkill: Continual Skill Induction Framework'
url: https://www.emergentmind.com/topics/polyskill
type: topic
---

# PolySkill: Continual Skill Induction Framework

PolySkill is a framework for continual skill induction in web agents, designed to enable efficient, reusable, and generalizable skills by leveraging polymorphic abstraction—systematically separating a skill’s abstract goal from its concrete implementation. Large language model (LLM)-powered agents, operating in partially observable web environments, utilize PolySkill to both solve novel user-specified tasks and to autonomously construct a polymorphic skill library that retains transferability across diverse websites and domains. Central to the framework is the adoption of abstraction methods from software engineering—specifically, polymorphic binding—to support modular, compositional skill induction and robust cross-site generalization [2510.15863].

## 1. Mathematical Modeling of Continual Skill Learning

The PolySkill paradigm frames web-agent skill learning as a partially observable Markov decision process (POMDP) with a growing skill library:
- **State space** ($S$): Latent web environment configuration (DOM tree, open tabs, URL).
- **Primitive action space** ($A_p$): Low-level web actions such as click, type, scroll, navigation.
- **Skill library** ($K_t$ at time $t$): Set of reusable, parameterized macro-actions (skills), each possibly invoking primitives or previously induced skills.
- **Expanded action space** ($A_t = A_p \cup K_t$): Permits both direct and compositional invocation.
- **Observation space** ($\Omega$): Tree and visual representations (e.g., A11y + screenshot).
- **Transition** ($T: S \times A_p \rightarrow \Delta(S)$) and **observation** ($O: S \rightarrow \Delta(\Omega)$) functions.
- **Task distribution** ($Q$): Source of user or self-generated natural language instructions.

The LLM-based agent policy $\pi_L(a_t \mid o_t, M_t, K_t)$, where $M_t$ records the working memory, determines the next action given observations, action history, and skills. For a horizon $H$, the resulting trajectory is $\tau = (o_0, a_0, ..., o_{H-1}, a_{H-1})$. The immediate objective is to maximize an efficiency-aware reward:

\[
\max_{\pi_L,\,K} \;\; \mathbb{E}_{q \sim Q}\Bigl[g(\tau, q) - \gamma |\tau|\Bigr]
\]

where $g(\tau, q)$ indicates task success and $\gamma$ penalizes lengthy trajectories, subject to additional regularization terms on $K$ to promote skill quality and reuse. This incentivizes compact, reusable skill formation consistent with continual learning goals [2510.15863].

## 2. Polymorphic Abstraction Mechanism

PolySkill’s core innovation is the strict decoupling of each skill into:
- An **abstract goal** $G_k$: Method signature specifying what is to be accomplished (e.g., `search(query):ResultList`).
- A set of **concrete implementations** $I^w_k$: Website-specific programs or action traces that encode how $G_k$ is achieved on site $w$.

A domain-level abstract class $C_d$ (e.g., `AbstractShoppingSite`) exposes a standardized interface $G = \{\texttt{search(query)}, \texttt{add\_to\_cart(item)}, ...\}$. For each website, the LLM, given $G_k$ together with a successful reference trajectory $\tau^w_{\rm sample}$, generates the site-specific implementation $I^w_k = \phi_w(G_k; \tau^w_{\rm sample})$. Visiting a new site $w'$ in the same domain, PolySkill reuses $G_k$ and binds it to a new $I^{w'}_k$ via the same prompt-encoded procedure—**polymorphic binding**. If $h_w$ is a context embedding summarizing $w$, then $I_k^w = \phi(G_k, h_w)$.

This approach ensures reusability: abstract interfaces are shared while implementation details are tailored, allowing skills to generalize and adapt to site-level variation [2510.15863].

## 3. Skill Representation and Compositionality

Each skill $k$ is modeled as:
- A **signature** $G_k$: (method name, arguments, return types).
- A **body** $I_k$: Python code or concrete action sequence stored in the dynamic skill library $K$.

Skills support arbitrary composition: higher-order or composite skills can invoke other skills by name, yielding recursive and modular behavior. For example, a purchase workflow may be assembled as:

```python
def purchase(item):
    results = search(item)
    select(results[0])
    add_to_cart(results[0])
    checkout()
```

A generic composition pseudocode:

```
Function ComposeSkill(name, subskills[]):
    code ← "def " + name + "(args):"
    For each sub in subskills:
        code += "    " + sub.name + "(sub.args)"
    return code
```

This compositional logic permits dense combinatorial reuse and supports curriculum growth via hierarchical abstraction [2510.15863].

## 4. Induction, Refinement, and Regularization

PolySkill alternates between task execution, success verification, skill induction, and library update:

**Task-defined Induction** (Algorithm 1):

```
Input: tasks Q={q₁ … q_N}, LM policy π_L, LM judge V_L
Initialize skill library K ← ∅
for t = 1…N:
    A_t ← A_p ∪ K
    τ ← ExecuteTask(π_L, q_t, A_t)
    if V_L(τ, q_t) == 1:
        K_new ← InduceSkill(π_L, τ, K)
        K ← K ∪ K_new
return K
```

**Task-free Self-exploration** (Algorithm 2):

Here, the agent proposes its own goals via $q_{prop} = \text{ProposeTask}(\pi_L, o_{t-1}, K)$ and repeats the same induction/verification loop.

Skill library structure is regularized for polymorphism by penalizing structural divergence between implementations for the same abstract goal across sites:

\[
R_{\mathrm{poly}} = \sum_{G_k} \mathrm{Dist}(I_k^{w_1}, I_k^{w_2})
\]

where Dist may be code edit-distance or embedding similarity [2510.15863].

## 5. Experimental Protocols and Evaluation Metrics

PolySkill is benchmarked on Mind2Web (2,350 tasks, 137 sites, 31 domains), WebArena (812 tasks, five sites), and live sites (Amazon, Target, GitHub, GitLab).

**Metrics (Appendix A) include:**
- Task Success Rate (SR):

  \[
  \mathrm{SR} = \frac{1}{|\mathcal{T}_{\mathrm{test}}|} \sum_{T \in \mathcal{T}_{\mathrm{test}}} \mathbb{I}[g(\tau_T, T) = 1]
  \]

- Average Steps per successful trajectory:

  \[
  \mathrm{AvgSteps} = \frac{1}{|\mathcal{D}_{\mathrm{succ}}|} \sum_{\tau \in \mathcal{D}_{\mathrm{succ}}} |\tau|
  \]

- Skill Reusability:

  \[
  \mathrm{Reuse} = \frac{|\{k \in K : \exists \tau, k \in \tau\}|}{|K|}
  \]

- Task Coverage (adoption):

  \[
  \mathrm{Coverage} = \frac{|\{\tau : \exists\, k \in K,\,k \in \tau\}|}{|\mathcal{D}_{\mathrm{test}}|}
  \]

- Skill Compositionality:

  \[
  \mathrm{Comp} = \frac{1}{|K|} \sum_{k \in K} |\{k' \in K : k' \text{ appears in body of } k\}|
  \]

Quantitative results demonstrate PolySkill's gains over baselines and the ASI system:

| Method               | Cross-task | Cross-site | Cross-domain |
|----------------------|-----------:|-----------:|-------------:|
| Baseline             |     53.8%  |     56.2%  |      62.3%   |
| ASI (+Online)        |     59.4%  |     58.7%  |      62.1%   |
| PolySkill (+Online)  |   **63.2%**|   **61.3%**|  **63.4%**   |

| Method            | Shopping | Admin | Reddit | GitLab | Map  | Cross-app | Avg   |
|-------------------|---------:|------:|-------:|-------:|-----:|----------:|------:|
| Baseline          |    37.4  |   44.0|   66.0 |   38.9 | 16.4 |     10.3  | 38.5  |
| ASI               |    46.3  |   53.6|   73.7 |   46.8 | 21.5 |     15.1  | 46.5  |
| PolySkill         | **51.4** | **54.8**| 73.2 | **54.2**| 18.9 |   **18.9**| 49.3  |

Additional findings:
- Skill reusability up to 31% (1.7× baseline).
- >20% reduction in steps per task via skill reuse.
- Up to 13.9% relative SR improvement on unseen sites [2510.15863].

## 6. Analytical Results and Ablations

Empirical studies reveal:
- **Skill reuse correlates inversely with average steps** (e.g., 20% reuse corresponds to steps in 3.3–4.4 range, and PolySkill attains 20.4% reuse by task 180).
- **Continual learning experiments**: PolySkill shows superior positive transfer during cross-site adaptation (e.g., from WebArena Shopping to Amazon/Target), with near-zero catastrophic forgetting (retaining original domain SR, in contrast to ASI).
- **Autonomous exploration**: In the absence of preset tasks, PolySkill's self-guided curriculum induces generalizable skills, achieving 43.1% SR (vs <38% in single-site curriculum) on shopping sites and 66.2% SR on held-out coding platforms (exceeding static and specialist baselines) [2510.15863].

## 7. Limitations and Prospects for Expansion

Key contributions include the introduction of polymorphic abstraction from object-oriented programming (OOP) to LLM skill induction, modular interfaces that support transfer and composition, and empirical performance under continual and self-supervised learning.

Identified limitations:
- Skill generality is dependent on the quality of the initial abstract interface; suboptimal abstractions propagate errors.
- Skills may degrade on dynamic sites with changing DOMs, necessitating periodic re-induction.
- Generalization to “long-tail” domains not aligning with established abstractions remains a challenge.

Proposed directions:
- Development of automatic skill-repair mechanisms to update implementations following site changes.
- Integration of failure analysis routines to improve G_k-to-I_k mappings based on unsuccessful bindings.
- Autonomous RL-based discovery of polymorphic skills with compact specialized models.
- Community-driven collaborative skill libraries with versioning and quality review [2510.15863].

Source: https://www.emergentmind.com/topics/polyskill