---
title: Compositional Skill Acquisition in LLMs
url: https://www.emergentmind.com/topics/compositional-skill-acquisition-in-llms
type: topic
---

# Compositional Skill Acquisition in LLMs

Compositional skill acquisition in large language models (LLMs) refers to the process by which models learn to combine individual skills, reasoning steps, or modular components—often learned in isolation—into novel, coherent strategies for solving more complex, out-of-distribution problems. Compositionality, as a core property of human cognition, enables infinite productivity from finite elements and is considered an essential prerequisite for systematic generalization and high-level reasoning in natural language processing (NLP), robotics, program synthesis, vision-language reasoning, and mathematics. Recent research has empirically, theoretically, and algorithmically evaluated the degree to which LLMs (and multimodal extensions) exhibit compositionality, provided methodologies for compositional dataset construction and prompting, analyzed gaps and deficiencies, and introduced frameworks for compositional skill training, inference, and evaluation.

## 1. Definitions and Conceptual Axes

**Compositional skill acquisition** refers to a model’s ability to synthesize previously acquired “atomic” skills—such as basic string transformations, arithmetic reasoning, visual grounding, or symbolic manipulations—into solutions for previously unseen compositions. Formally, if $f(x)$ and $g(x)$ are known to the model, the compositional task is to solve $h(x) = g(f(x))$ even if $h$ itself was never trained directly [2509.25123]. Axes along which compositional acquisition is evaluated include:

- **Systematic compositionality**: The systematic reuse and recombination of known primitives or skills for novel configurations [2405.06680].
- **Skill composition**: The chaining or functional composition of modular procedures or reasoning steps (e.g., combining geometric and combinatorial reasoning) [2506.18880].
- **Compositional generalization**: Performance on out-of-distribution tasks that require integrated application of multiple subskills, not just simple in-distribution pattern matching [2410.06272, 2506.18880].
- **Compositional meta-skills**: Higher-order rules that govern how skills are composed beyond mere rote execution of observed patterns [2409.19808].

## 2. Empirical Evaluation and Benchmarking

Empirical studies consistently find a pronounced gap between in-domain generalization (on tasks similar to training data) and true compositional generalization. Key methodologies and metrics include:

- **Systematic synthetic tasks**: Controlled frameworks such as SKILL-MIX (for language skills) and MathTrap (injecting logical traps into math problems) probe a model’s ability to integrate or transfer skills beyond memorized cases [2409.19808, 2405.06680].
- **Graph-based and visual reasoning**: CGGC (Compositional Generalization Challenge for Graph-based Commonsense Reasoning) requires models to verbalize novel tuples of relations in a reasoning graph, measuring the ability to compose seen primitives into new relational configurations [2410.06272].
- **Compositional translation and code synthesis**: Multi-stage tasks that decompose complex inputs (e.g., sentences, program specs) into segments or subtasks, and then measure model accuracy and transfer in recomposing those pieces [2503.04554, 2503.15540, 2501.06625].

Results converge on the finding that standard LLMs—even when highly capable in base tasks—often exhibit significant performance degradation when confronting novel compositional cases:
- For complex reasoning that combines multiple newly-mixed skills, top-tier LLMs experience sharp performance drops (in some cases to less than 20–40% accuracy) despite near-perfect results for each skill in isolation [2407.15720, 2410.06272].
- Skill composition performance depends critically on whether component tasks affect non-overlapping supports in the embedding space (separable vs. sequential tasks) [2407.15720].

## 3. Algorithmic and Training Approaches

A diverse array of strategies have been tested to improve compositional skill acquisition, including:

- **Prompting strategies**: Skills-in-Context (SKiC) prompting provides modular descriptions and exemplars for atomic and composite skills in a single prompt; this has produced near-perfect systematic generalization in some domains and leverages latent skill activation in pretrained LLMs [2308.00304].
- **Data augmentation**: Techniques such as Component Substitution (CompSub) and Learning Component Substitution (LCS) generate multi-grained, recombined training examples by swapping components across examples, thereby introducing a compositional inductive bias and implicitly regularizing the hypothesis class [2502.20834].
- **Reward-based learning/RL**: Reinforcement learning post-training, especially with carefully designed rewards for compositional tasks, is shown to teach genuinely new skills (rather than just reweighting patterns), enabling models to learn unseen compositions and transfer these meta-skills to new domains [2509.25123, 2412.13492, 2505.19406]. RL objectives can explicitly reward correct multi-step composition without exposing intermediate traces.
- **Curriculum and meta-learning**: Ordering demonstration examples from “easy-to-hard” by compositional structure (e.g., transitive to common target in a reasoning graph) improves generalization [2410.06272]. Curriculum scaffolding and meta-reasoning controllers are proposed as future research trajectories [2506.18880].

### Table: Representative Approaches

| Approach                  | Key Mechanism                      | Empirical Effect              |
|---------------------------|------------------------------------|-------------------------------|
| Skills-in-Context (SKiC)  | Prompt module+composition          | Near-perfect system. gen. [2308.00304] |
| CompSub / LCS             | Multi-grained compositional aug.   | Gains up to 66.5% on SCAN [2502.20834] |
| RL post-training          | Reward for composition correctness | Enables generalization to $g(f(x))$ [2509.25123], boosts compositional reasoning in VLMs [2505.19406] |
| Easy-to-hard curriculum   | Demo order by composition diff.    | Improved CGGC performance [2410.06272] |

## 4. Theoretical Perspectives and Analysis

Theoretical work has sought to formalize conditions under which compositionality emerges or fails in LLMs:

- **Embedding “confined support”**: Compositional generalization is successful primarily when the component tasks act on disjoint subspaces of the input embedding. This is formally captured as increased compositional accuracy when $Acc_\theta(S_k) + Acc_\theta(S_g) \leq Acc_\theta(S_{k \cup g})$ [2407.15720].
- **Second-order loss approximation**: Composability of modules is theoretically justified when fine-tuned parameter updates (task vectors) remain close to the pretraining initialization (pretraining basin). Mathematically, for parameter displacements $\Delta_t$: 
  $$
  \ell(\theta_P) \lesssim \sum_t w_t \ell(\theta_0 + \Delta_t)
  $$
  (where $\ell$ is the task loss and $\theta_P$ is a convex combination of modules), establishing that quadratic loss curvatures support modular composition [2405.16350].
- **Data augmentation as regularization**: Theoretical results show that span substitution augmentation (CompSub) is tantamount to adding a term encouraging invariance to context for exchanged components, thereby explicitly promoting compositional structure in the learned representations [2502.20834].

## 5. Modalities Beyond Language: Robotics, Vision, and Program Synthesis

Compositional acquisition is an active research area across multiple domains:

- **Robotic skill composition**: LLMs are used as high-level planners to recursively decompose natural language task instructions into subtasks, autonomously write code snippets for task success conditions, and facilitate data labeling for multi-task visuo-motor policies [2307.14535]. The resulting modularity enables robust, retry-capable, and reusable skill acquisition.
- **Programs and planning**: LLM-guided program synthesis and plan generation frameworks use agentic decomposition, bottom-up composition, and process mining to discover, store, and retrieve modular “skills” as process models, thus making program generation more interpretable and compositional [2503.15540, 2501.06625, 2410.12870].
- **Visual reasoning and vision-language modeling**: Controller-type LLMs coordinate abstract spatial/temporal routines and visual tools. Automated generation of in-context exemplars, use of task abstraction, and explicit reward for cross-modal grounding boosts performance on compositional visual tasks [2401.01974, 2505.19406].

## 6. Open Issues and Limitations

Despite recent algorithmic advances, critical challenges and deficiencies remain:

- **Compositionality gap**: LLMs and VLMs often fail to exhibit spontaneous, systematic composition of skills under out-of-distribution composition—a gap quantified by performance drops as task complexity increases, or when primitive skills must be integrated beyond memorized templates [2405.06680, 2506.18880].
- **Scaling and instruction-tuning tradeoffs**: Scaling up model parameters generally improves compositionality in some domains; however, instruction-tuning can sometimes degrade compositional behavior even as it increases alignment and in-domain performance [2407.13419].
- **Task structure sensitivity**: Compositional performance strongly depends on whether subskills are separable or require sequential/entangled reasoning. Models excel when tasks decompose into non-interfering segments, but fail to compose sequential, entangled, or structurally aligned sub-skills [2407.15720, 2506.18880].
- **Transfer and meta-compositionality**: RL-based compositional training enables transfer of a composition meta-skill across domains when atomic skills are shared, but next-token objectives fail to produce such transfer [2509.25123].

## 7. Implications, Applications, and Research Directions

Enhanced compositional skill acquisition in LLMs underpins advancements in robust NLP, code generation, cross-modal reasoning, scientific discovery, robotics, and agentic AI systems. Promoting compositionality involves targeted fine-tuning, curriculum staging, data augmentation, and RL in composition-specific regimes, and the deployment of structured prompting and modular architectures.

Future directions include:
- Dynamic and meta-learning curricula for progressive skill integration [2506.18880];
- Data-efficient “skill-rich” synthetic augmentation for flexible meta-skill induction [2409.19808];
- Integration of verifiable intermediate rewards and explicit grounding in multimodal systems [2505.19406];
- Theoretical exploration of disentangled representations, task arithmetic, and regularization bounds for compositional learning [2405.16350, 2502.20834].

Progress in these areas will determine the capacity of future LLMs to match or exceed the systematic and creative composition capabilities of human cognition.

Source: https://www.emergentmind.com/topics/compositional-skill-acquisition-in-llms