Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agents

Suji Kim, Kangsan Kim, Sung Ju HwangarXiv 2026

TL;DR

Deploying massive AI agents for every specific software application is prohibitively expensive, yet smaller models often suffer from uneven, domain-specific failures. This paper introduces LEARNWEAK, an automated, annotation-free framework that uses a strong teacher model to pinpoint a small agent's specific weaknesses, synthesize targeted training tasks, and execute error-aware fine-tuning. By focusing training precisely on what the student gets wrong, LEARNWEAK allows 7B/8B models to achieve massive performance leaps across diverse desktop applications, sometimes even outperforming their much larger teachers.

What Problem Does This Paper Address?

Computer-Use Agents (CUAs) are AI systems designed to navigate digital environments—clicking buttons, typing text, and managing workflows across desktop and web applications. While large, closed-source models excel at these tasks, running them at scale is expensive and raises significant data privacy concerns for enterprises. Small, open-source models (around 7B to 8B parameters) are a more practical alternative for local deployment, but they struggle to handle the unique conventions and complex workflows of specialized software (like Excel, Photoshop, or VSCode).

The standard remedy has been domain specialization: generating synthetic data to fine-tune these small models on specific applications. However, the authors discover that naive, broad data generation yields only marginal improvements. Small models have limited capacity; they don't just need more data, they need targeted practice on their specific blind spots without destroying their existing capabilities.

Methods

LEARNWEAK tackles domain specialization through a fully automated, two-stage pipeline:

1. LEARNWEAK-GEN (Weakness-Aware Data Generation)

Instead of randomly exploring an application, the framework pairs the small student model with a stronger teacher model (e.g., an 32B model) on a small set of seed tasks.

  • Weakness Discovery: The system isolates tasks where the teacher succeeds but the student fails. A vision-language model (VLM) reviews these trajectories and generates a structured "weakness report" detailing exactly where the student stumbled (e.g., "unable to compute aggregations in spreadsheets").
  • Targeted Synthesis: A query generator uses this weakness report alongside application screenshots to synthesize new, highly specific training tasks that force the student to practice its weak skills.

2. LEARNWEAK-DPO (Error-Adaptive Finetuning)

To train the agent efficiently without causing it to forget general skills, LEARNWEAK uses step-level Direct Preference Optimization (DPO).

  • Teacher-Replay: The student is placed in the exact state of a successful teacher trajectory. If the student's proposed action diverges from the teacher's correct action, a preference pair is created.
  • Error-Aware Masking: Crucially, the framework differentiates between planning errors (choosing the wrong tool or workflow) and execution errors (choosing the right tool but clicking the wrong coordinates). It dynamically adjusts the token-masking during training so the model only updates the behaviorally relevant parts of its response.

3. Domain Scalability

To prevent catastrophic forgetting across different software, the base student model remains completely frozen. Domain-specific knowledge is localized into modular LoRA adapters that can be swapped out depending on the active application.

Figure 2: Overview of LEARNWEAK framework. LEARNWEAK-GEN iteratively constructs domain data by comparing teacher and student responses, summarizing student weaknesses, and generating new tasks conditioned on weakness reports and representative screenshots. LEARNWEAK-DPO then converts specializes the student with step-wise preference supervision and error-aware optimization.

Datasets

The framework was evaluated using OSWorld, a comprehensive benchmark for desktop environment automation. The authors evaluated performance across 8 distinct software domains:

  • Office Productivity: LibreOffice Calc (Spreadsheets), Impress (Presentations), Writer (Documents).
  • System Utilities: OS (Linux command line), Thunderbird (Email).
  • Creative & Coding: Gimp (Image editing), VLC (Media player), VSCode (Code editing).

To ensure rigorous evaluation, the training environments and initial assets generated by LEARNWEAK were entirely disjoint from the official OSWorld evaluation setups, preventing any benchmark data contamination.

Key Insights and Ideas

  • Student-Awareness Trumps Data Volume: Generating data based on what a specific model gets wrong is vastly more sample-efficient than generating a massive, generalized dataset for a software domain.
  • Disentangling Intent from Execution: A model that fails because it doesn't understand a spreadsheet formula requires a different learning signal than a model that understands the formula but misses the input box. Separating planning and execution errors prevents broad, destructive updates to the model's weights.
  • Surpassing the Teacher: Pure imitation learning caps a student's capabilities at the level of the teacher. However, by using teacher trajectories to specifically correct the student's unique structural weaknesses, the specialized student can actually surpass the teacher's standalone performance in certain domains.

Key Results

  • Significant Performance Gains: Across the 8 OSWorld domains, LEARNWEAK achieved an average performance boost of 11.6 percentage points on EvoCUA-8B and 11.1 percentage points on OpenCUA-7B.
  • Outperforming the Teacher: The specialized EvoCUA-8B model achieved a success rate of 82.05% on Gimp and 72.46% on VSCode, notably outperforming its own 32B teacher model (which scored 76.29% and 65.22% respectively).
  • Superiority Over Baselines: Under identical training budgets, LEARNWEAK consistently outperformed alternative autonomous data generation pipelines (such as AgentSynth, OS-Genesis, and ZeroGUI) and standard offline training strategies like standard SFT and DPO.
Figure 1: Conceptual illustration of LEARNWEAK and performance gains after domain specialization, showing consistent improvements of the small student across target software domains.

Limitations and Future Work

  • Teacher Dependency: The framework relies on the availability of a teacher model capable of successfully completing tasks in the target domain. If the teacher is highly unstable or systematically flawed in a specific environment, the student will inherit those errors.
  • Prerequisite Capabilities: LEARNWEAK is designed to inject domain-specific software knowledge; it assumes the base student model already possesses foundational computer-use skills like basic visual grounding and UI interaction.
  • Future Directions: The authors suggest exploring automated multi-adapter routing, allowing an agent to dynamically switch between specialized LoRA modules on the fly as a user moves between different desktop applications.

Summary updated

BibTeX
@misc{kim2026learn,
  author = {Suji Kim and Kangsan Kim and Sung Ju Hwang},
  title = {{Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agents}},
  year = {2026},
  eprint = {2605.28775},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.28775},
}
Figure