Manuscript Offprint

arXiv:2610.33582

Replicate What Varies: Resource Sharing for Domain-Randomized Embodied Simulation

Zixu Hao, Weijun Wang, Xiangyu Li, Liang Mi, Hao Wu, Yunxin Liu, Ting Cao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Simulation provides a low-cost sandbox where embodied agents can attempt tasks, observe outcomes, and learn from experience. Running many diverse simulation environments concurrently can consume substantial CPU and GPU memory because independently constructed scenes duplicate resources that remain unchanged across instances. We present Patchwork, a resource-sharing system for domain-randomized simulation, built around the representation E=T+ΔE = T + \Delta: a shared template contains common resources, and a patch records the mutations needed to construct a target environment. Patchwork separates randomization sampling from replay and selects reusable templates together with patches that preserve each target environment's intended configuration. Its layered runtime shares compiled model structure and immutable assets while keeping mutable parameters and simulation state private to each instance. We implement Patchwork on robosuite and MuJoCo and evaluate it on LIBERO-plus and RoboCasa365 workloads. At 32 replicas, shared-template execution reduces CPU RSS by 88–92% relative to process-per-environment execution. Controlled experiments show how sharing shifts memory growth toward template diversity and unique asset content rather than instance count, within the supported sharing boundaries.

1 Introduction

Language models are expanding how robots can interpret instructions and carry out tasks in the physical world. Recent work uses language models to generate and refine robot-control programs [16, 19], control robots directly through action interfaces [7, 8, 38], and coordinate vision-language-action (VLA) policies within agent harnesses [2, 39]. These systems open a path for embodied agents to improve through experience, making access to environments for repeated interaction an important part of their development.

Simulation offers a low-cost sandbox for embodied agents to interact with their surroundings and learn from this interaction. In Zetta, for example, repeated simulation rollouts supply failure traces for diagnosis, followed by further trials to validate proposed improvements [2]. Physical trials require robot hardware, operating time, and supervision; simulated environments can be reset and run in parallel at scale with much lower costs. Recent agentic real-to-sim-to-real systems reconstruct interactive simulation environments from real-world observations and transfer simulation-acquired skills or policies back to physical robots, making simulation a more practical environment for learning from experience [1, 13, 25]. We see simulation as a sandbox for embodied agents, with the potential to become part of their post-training infrastructure. The scale at which these sandboxes can run affects how much experience an agent can collect within a fixed time and hardware budget.

Useful experience also requires variation in the conditions an agent encounters. Domain randomization varies properties such as lighting, textures, and object poses to expose policies to different conditions and support transfer to the real world [30]. For example, repeated attempts at a pick-and-place task may use different object positions and table textures while retaining the same robot and room geometry. Collecting this experience at scale requires many such environments to run concurrently. Their combined CPU and GPU memory footprint limits how many environments fit on a machine, making efficient deployment of diverse simulation sandboxes a practical concern.

Part of this memory footprint comes from duplicating resources that remain unchanged across diverse environments. High-throughput simulators are optimized for running many homogeneous environments together. 1^{1} When environments differ, constructing separate models or scenes can copy common resources along with the properties that vary. ManiSkill's GPU path shares a PhysX system and simulation buffers while constructing heterogeneous sub-scenes independently [28].

1^{1}Recent Isaac Lab versions support heterogeneous cloning by routing asset variants to selected environments. However, sharing remains bounded by USD prim/instance and backend-native physics boundaries; mutations that cross these boundaries may require uninstancing and prevent effective sharing.

Figure

Figure 1: Resource sharing across diverse simulation environments.

Many CPU-based MuJoCo stacks maintain a full model per worker, as in the subprocess environments used by RLinf for RoboCasa and LIBERO [26, 37]. When independent models are materialized, model and asset resources grow with the number of environments, limiting how many simulation sandboxes can run concurrently on a machine.

Many domain-randomized environments differ in only a small portion of their description. A scene may retain the same robot, room geometry, and most assets while changing a light parameter, an object pose, or a texture reference. These limited differences leave substantial common content that could be shared across environments. Figure 1 illustrates this sharing opportunity.

We represent this structure explicitly as E=T+ΔE = T + \Delta. A simulation environment E consists of a shared template T containing its invariant content and a patch Δ\Delta recording the mutations that produce one instance. This representation allows environments to share unchanged resources while keeping the parts that vary private to each instance.

Turning this representation into efficient resource sharing raises three challenges. First, simulator resources have no uniform structure or sharing granularity. Compiled model structure, model parameters, runtime state, and rendering assets have different storage layouts, lifetimes, and ownership rules. A model parameter may vary at the level of an individual field, while an immutable texture can be shared as a complete asset. The system must map the mutations in a patch to sharing boundaries appropriate for each resource type.

Second, constructing an environment from a template and patch must preserve isolation and simulation semantics. Each mutation in the patch must be applied to resources owned by the target instance, leaving the shared template and other instances unaffected. The resulting environment must behave as if it had been constructed independently with the same specification.

Third, template reuse must preserve the intended randomization choices. Simulation frameworks often sample these choices during construction or reset. Reusing a template can bypass some of these steps or repeat others, producing a different environment if the choices remain implicit. The system must record the choices and replay their effects so that applying a patch reproduces the target instance.

We present Patchwork, a simulation system that supports resource sharing for heterogeneous domain-randomized workloads. It describes environment differences through a declarative mutation interface and uses a layered runtime to construct target instances from shared templates and patches.

To handle different resource granularities, Patchwork maps each supported mutation to the sharing boundary of the resource it affects. The runtime shares compiled structure through templates, keeps mutable model parameters and runtime state private to each instance, and deduplicates immutable assets by content.

To preserve isolation during instance construction, Patchwork keeps templates read-only and directs supported patch mutations to instance-owned resources. During template selection and planning, it compares structural and asset profiles to identify compatible templates and derive patches within the supported mutation vocabulary.

To preserve randomization choices across template reuse, Patchwork separates sampling from application and records the sampled choices as declarative mutations. Instance construction replays these mutations without resampling their values. This makes the choices explicit and replayable, allowing template reuse to reproduce the intended target instance.

Our evaluation shows that, for compatible task variants, common model and asset resources need not be replicated per instance: model storage is shared within template groups, and texture storage is reused across groups.

We summarize our contributions as follows:

• We introduce a template-and-patch representation for domain-randomized simulation environments, with explicit, replayable mutations describing the differences between a shared template and each target instance.

• We design and implement Patchwork on the robosuite/MuJoCo stack. Its layered runtime shares compiled model structure and immutable assets while isolating per-instance model parameters and simulation state.

• We evaluate Patchwork on robosuite-based LIBERO-plus and RoboCasa365. With 32 RoboCasa365 environments, it reduces CPU RSS and GPU memory by 92% and 93%, respectively, compared with process-per-environment execution.

References (34)