xTED: Cross-Domain Adaptation via Diffusion-Based Trajectory Editing

## Abstract

Abstract Reusing pre-collected data from different domains is an appealing solution for decision-making tasks that have insufficient data in the target domain but are relatively abundant in other related domains.
Existing cross-domain policy transfer methods mostly aim at learning domain correspondences or corrections to facilitate policy learning, such as learning domain/task-specific discriminators, representations, or policies. This design philosophy often results in heavy model architectures or task/domain-specific modeling, lacking flexibility.
This reality makes us wonder: can we directly bridge the domain gaps universally at the data level, instead of relying on complex downstream cross-domain policy transfer models?
In this study, we propose the Cross -Domain T rajectory ED iting ( xTED ) framework that employs a specially designed diffusion model for cross-domain trajectory adaptation.
Our proposed model architecture effectively captures the intricate dependencies among states, actions, and rewards, as well as the dynamics patterns within target data. By utilizing the pre-trained diffusion as a prior, source domain trajectories can be transformed to match with target domain properties while preserving original semantic information.
This process implicitly corrects underlying domain gaps, enhancing state realism and dynamics reliability in the source data, and allowing flexible incorporation with various downstream policy learning methods.
Despite its simplicity, xTED demonstrates superior performance in extensive simulation and real-robot experiments .

## 1 Introduction

Policies learned on insufficient data from a single domain easily end up with undesirable performance, especially in real systems (Guiochet et al., ; Zhan et al., ) where performing reinforcement/imitation learning (RL/IL) in the real world (i.e. target domain) yields laborious and costly data collection, notorious reset, and reward specification issues (Zhu et al., ).
Faced with restricted data acquisition in reality, people resort to incorporating data generated with simulation or pre-collected from other domains (i.e. source domains) into policy learning for greater synergy (Niu et al., ; ; Open X-Embodiment et al., ).
However, source domains invariably bear multiple domain gaps (Niu et al., ), such as appearance (Tobin et al., ) and dynamics gaps (Peng et al., ), as well as morphology gaps for embodied agents (Gupta et al., ).
These domain discrepancies would reduce the availability of source data since directly augmenting target data with unprocessed source data sometimes leads to negative effects on policy learning.

Existing cross-domain policy learning methods tend to design domain-specific policy transfer models equipped with domain correspondences (Zhang et al., ), corrections (Eysenbach et al., ), or discriminations (Stadie et al., ; Sharma et al., ) that either rely on task-specific architecture designs (e.g. special encoders (Mueller et al., ; Wang et al., ) and domain-specific regularizations (Desai et al., ; Eysenbach et al., ; Niu et al., ; Xue et al., )), or are only applicable to specific domain of data (e.g. adaptable vision encoder design only applicable to image inputs (Rao et al., ).
Additionally, the domain-specific discriminators or mappings (Stadie et al., ; Liu et al., ) sometimes require tedious efforts to refresh for accomodating multiple source domains, which substantially hinders data reutilization efficiency and efficacy.
These limitations highlight the need for a more generic and flexible approach that addresses domain gaps more directly.

Figure: Figure 1: The connections and distinctions between image editing and trajectory editing.
Refer to caption: extracted/5917530/figure/intro.png

Above inadequately addressed issues make us wonder: Rather than relying on sophisticated and domain-specific policy transfer models, is it possible to bridge domain gaps at the data level?
If source trajectories can be transformed to minimize domain gaps and seamlessly utilized for policy learning, any policy learning method can be flexibly chosen with primary focus on task-relevant considerations, without the burden of cross-domain design complexities.
To achieve this goal, we tend to correct the biased domain modeling within trajectories based on target data while preserving valuable and primitive information from source domains.
With these pursuits, a natural analogy can be drawn that domain transfer at the trajectory level parallels style transfer in image editing (Meng et al., ), where only the visual style and aesthetic elements of an image are transformed without altering its narrative content, such as converting a stroke-painted castle into a photorealistic one.
However, as depicted in Fig. 1, source-domain trajectories face not only biased observation styles but also altered viewpoints and inaccurate transition dynamics over time.
Moreover, trajectories are composed of fundamentally heterogeneous elements—such as observations, actions, and rewards—that, if naïvely treated as equivalent pixels in an image, would obscure the recognition of their respective inherence and delicate interactive dependencies.
Thus, despite sharing a similar high-level philosophy, this editing solution is not directly applicable to cross-domain policy transfer due to the intrinsic heterogeneity and dependencies within trajectories and the complex domain discrepancies.

To address these distinctions, we propose the Cross-Domain Trajectory EDiting (xTED) paradigm with a novel diffusion model architecture tailored for decision-making data, which effectively captures the target trajectory distribution as a prior.
The architecture illustrated in Fig. 2 employs a separate encoding-decoding approach to recognize states, actions, and rewards, each possessing fundamentally different physical meanings and unique internal consistency patterns.
To effectively capture the dynamics patterns within trajectories, we implement dependency structure modeling mechanisms that capture the interactive relationships among states, actions, and rewards.
With the assistance of above designs, we successfully extend the philosophy in diffusion-based image editing (Huang et al., ) to decision-making data, equipping xTED pipeline with three simple steps:
(1) train diffusion model on the target data;
(2) distort source data with noises and then denoise them with the pre-trained diffusion model;
(3) incorporate edited source data into target data for policy learning with any algorithm at will.
Through extensive experiments, we show that incorporating source data edited with xTED consistently yields performance improvements over training solely on target data while directly adding unprocessed source data often results in significant performance degradation, particularly in real-robot manipulation tasks.

## 2 Related Work

### 2.1 Cross-Domain Policy Adaptation

Addressing the challenges posed by domain gaps has long been established as an essential task for the prolonged development of data-hungry policy learning methods and models (Niu et al., ).
The most straightforward approach is to construct direct mappings for state and action space between source and target domains (Liu et al., ; Kim et al., ; Zhang et al., ; Raychaudhuri et al., ; Wang et al., ).
An alternative is to learn domain-agnostic task-relevant embedding with mutual information criterion (Franzmeyer et al., ) and explicit domain discrimination (Stadie et al., ; Sharma et al., ), which can also be achieved with temporal contrastive learning methods (Sermanet et al., ; Dwibedi et al., ; Yang et al., ; Choi et al., ; Li et al., ) to enable representation highly dependent on task progress while neglecting domain-variant information.
Other than representation learning, it is also preferable to directly regularize the policy learning process in situations with mild observation gaps, by reward augmentation (Eysenbach et al., ; Liu et al., ; Xue et al., ) and reweighting the value update (Niu et al., ; ; Xu et al., ).
The complicated domain/task-specific designs hinder convenient reuse and fine-tuning of those models to accommodate data from multiple source domains available at different stages of training (Niu et al., ).
In contrast, xTED introduces a generic and flexible approach that handles domain gaps at the data level, avoiding any task-specific design and domain-specific fine-tuning while applicable to multiple source domains of data and freeing the choices of any upstream observation encoder and downstream policy learning method.

### 2.2 Diffusion Models for Decision Making

Diffusion models have been applied across various decision-making settings, including generating multi-modal policies (Chi et al., ; Wang et al., ), single-step transitions (Lu et al., ), subgoals (Black et al., ), trajectories (Janner et al., ; Ajay et al., ; He et al., ), and videos for planning (Ajay et al., ; Yang et al., ; Du et al., ; ). However, prior works primarily focus on single-domain generation tasks, such as data augmentation, without addressing cross-domain challenges.
In contrast, xTED introduces a distinct setting by employing diffusion models to adjust source trajectories so that they more closely resemble target domain characteristics while preserving useful primitive information from source domains.
As demonstrated in Section 5.5, this setting is highly sample-efficient, as it does not require the extensive training data needed by diffusion-based generation tasks that aim to generate data from modeled target distribution.

## 3 Preliminaries

#### Notations.

For convenience, we introduce the relevant notations and elements of decision trajectories with the standard formulation of Markov Decision Process (MDP).
A finite-horizon MDP is defined as a tuple $\mathcal{M}:=\langle\mathcal{S},\mathcal{A},T,R,H,\gamma\rangle$ where $\mathcal{S}$ and $\mathcal{A}$ are state and action spaces, $T:\mathcal{S}\times\mathcal{A}\rightarrow\Delta_{\mathcal{S}}$ is the transition dynamics; $R:\mathcal{S}\times\mathcal{A}\rightarrow\Delta_{\mathbb{R}}$ is the reward function; $H$ is the horizon that indicates the end of trajectories at the $H$-th step; $\gamma$ is the discount factor. The entire decision trajectory can be denoted with a sequence of transition tuples $\tau=\{(s_{t},a_{t},r_{t})\}_{t=0}^{H-1}$, where $(s_{t},a_{t})\in\mathcal{S}\times\mathcal{A}$, $r_{t}\sim R(s_{t},a_{t})$ and $s_{t+1}\sim T(s_{t},a_{t})$.
Nevertheless, trajectory modeling defined under these Markovian assumptions may result in limited performance as ablated in Section 5.6, as it enforces temporally causal relations within trajectories, potentially sacrificing global consistency.

#### Source and Target Domains.

Adapting the standard MDP with domain-dependent annotations as $\mathcal{M}(\Omega):=\langle\mathcal{S}_{\Omega},\mathcal{A}_{\Omega},T_{
\Omega},R_{\Omega},H,\gamma\rangle$ (Niu et al., ), where $\mathcal{S}_{\Omega}$, $\mathcal{A}_{\Omega}$, and $T_{\Omega}$ represent domain-dependent state spaces, action spaces, and transition dynamics, respectively. The reward function $R_{\Omega}$, influenced by $\mathcal{S}_{\Omega}$ and $\mathcal{A}_{\Omega}$, is also task-relevant. Here, $\Omega$ denotes the domain, which is shaped by the environment and the embodiments. Source domain(s) $\Omega_{src}=\{\Omega_{src}^{i}\}^{N}_{i=1}$, $N\in\mathbb{N}^{+}$, and target domain $\Omega_{tgt}$ may differ in state, action, and reward spaces, as well as in transition dynamics, reflecting the complex interplay of visual/viewpoint and dynamics gaps in the real world.

#### Diffusion Models.

Diffusion models have emerged as a powerful class of generative models (Ho et al., ),
which typically involves solving two stochastic differential equation (SDE) phases: the forward and the reverse processes.
The forward process models the gradual addition of noise to the data, transforming the data distribution $p(\mathbf{x}_{0})$ into a noised distribution over a series of discrete time steps $K$. This process can be described by the following equation:

$$ $q(\mathbf{x}_{k}|\mathbf{x}_{k-1})=\mathcal{N}(\mathbf{x}_{k};\sqrt{\alpha_{k- 1}}\mathbf{x}_{k-1},(1-\alpha_{k-1})\mathbf{I}),\mathbf{x}_{0}\sim q(\mathbf{x }_{0}),k\in[1,\cdots,K]$ (1) $$

where $\alpha_{k}$ are the variance schedules. Given $\mathbf{x}_{0}$, we could sample the results of forward SDE at any noise step $k$:

$$ $\mathbf{x}_{k}\sim\mathcal{N}(\mathbf{x}_{k};\mu_{k},\sigma_{k}^{2}\mathbf{I}) :=\mathcal{N}(\mathbf{x}_{k};\sqrt{\alpha_{1}\alpha_{2}\cdots\alpha_{k}} \mathbf{x}_{0},(1-\alpha_{1}\alpha_{2}\cdots\alpha_{k})\mathbf{I})$ (2) $$

The reverse process, on the other hand, involves learning to denoise the data, effectively reversing the forward process. It can be modeled as:

$$ $p_{\theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k})=\mathcal{N}(\mathbf{x}_{k-1};\mu_{ \theta}(\mathbf{x}_{k},k),\Sigma_{k})$ (3) $$

where $\mu_{\theta}(\mathbf{x}_{k},k)$ is the learnable mean of reverse conditional distribution.
The training process involves optimizing the variational lower bound of the data likelihood, a process which encourages the model to accurately reconstruct the data from noise.
This can boil down to simply minimizing the difference of the forward posterior and reverse conditional distribution $D_{KL}(q(\mathbf{x}_{k-1}|\mathbf{x}_{k},\textbf{x}_{0})|p_{\theta}(\mathbf{x}
_{k-1}|\mathbf{x}_{k}))$ across all denoising steps, where $q(\mathbf{x}_{k-1}|\mathbf{x}_{k},\textbf{x}_{0})=\mathcal{N}(\mathbf{x}_{k-1}
;\mu_{q}(\mathbf{x}_{k},\mathbf{x}_{0}),\Sigma_{q})$.
As the variance is only dependent on pre-defined $\alpha$ coefficients, we can construct the variance of the approximate reverse distribution $\Sigma_{k}$ also as $\Sigma_{q}=\sigma_{q}^{2}\mathbf{I}$. Thus, $\mu_{\theta}(\mathbf{x}_{k},k)$ is to clearly approach the forward process posterior mean $\mu_{q}(\mathbf{x}_{k},\mathbf{x}_{0})$:

$$ $\arg\min_{\theta}D_{KL}(q(\mathbf{x}_{k-1}|\mathbf{x}_{k},\textbf{x}_{0})|p_{ \theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k}))\Leftrightarrow\arg\min\frac{1}{2 \sigma_{q}^{2}}\|\mu_{\theta}(\mathbf{x}_{k},k),\mu_{q}(\mathbf{x}_{k},\mathbf {x}_{0})\|_{2}^{2}$ (4) $$

In practice, we adopt a further simplified surrogate loss instead of the distribution mean matching:

$$ $\mathcal{L}_{\theta}=\mathbb{E}_{k\in[1,\cdots,K],\mathbf{x}_{0}\sim q(\mathbf {x}_{0}),\epsilon\sim\mathcal{N}(\mathbf{0},\mathbf{I})}\|\epsilon-\epsilon_{ \theta}(\mathbf{x_{k}},k)\|^{2}$ (5) $$

where $\epsilon_{\theta}$ represents a parameterized network predicting the noise based on $\mathbf{x}_{k}$ and $k$. This remains identical to estimating the forward posterior mean, by adopting necessary re-parameterization (Ho et al., ).
In our context, the data samples $\mathbf{x}$ are assigned with decision trajectories $\tau$.

## 4 xTED: A Cross-Domain Trajectory Editing Framework

Figure: Figure 2: The model architecture is delicately designed for capturing intricate dependencies among transitions and decision elements (states, actions and rewards).
Refer to caption: extracted/5917530/figure/tb_ddit.png

In Section 4.1, we introduce the design philosophies behind model architecture and analyze why it is adept at handling the intricate heterogeneity, dependencies and temporal consistency within trajectories than naïve implementations, as illustrated in Fig. 2.
Next, we formalize how it effectively scaffolds the cross-domain trajectory editing paradigm, as detailed in Section 4.2.

### 4.1 Model Architecture

#### Encoding and decoding design for decision making data.

States, actions, and rewards in MDP present fundamentally dissimilar notions, entailing distinct physical meanings and consistency properties.
This naturally distinguishes the trajectory-based models from image-based models, which only considers spatial representations among visual patches (Peebles & Xie, ) and simply treats every pixel homogeneously in modeling designs (Ho et al., ).
Thus, xTED encodes and decodes state, action, and reward sequences $\tau^{s},\tau^{a},\tau^{r}$ in trajectories $\tau$ separately.
In every noise step $k$, each sequence is first compressed or enlarged into latent representation $h_{k}^{s},h_{k}^{a},h_{k}^{r}$ with appropriate feature dimensions using separate networks $f$, and then processed with a self-attention module S-Attn to capture global consistency along the sequence dimension (conditions are also embedded with $\mathbf{e}_{k}^{c}=f_{c}(k,\mathbf{c})$):

$$ $h_{k}^{i}=\texttt{E}_{i}(\tau_{k}^{i},k,c):=\texttt{S-Attn}(f_{i}(\tau_{k}^{i} ),\mathbf{e}_{k}^{c}),i\in[s,a,r]$ (6) $$

The series of networks $f$ provides substantial flexibility to incorporate task-specific prior knowledge, facilitating the construction of a reasonable information bottleneck.
The embedding spaces should not be overly compressed, as subsequent attention blocks require sufficiently rich information to uncover dependencies. Conversely, these embedding spaces must not be excessively enlarged due to concerns about computational complexity and memory usage. From an interactive perspective, the embedding dimensions should be balanced to prevent the model from neglecting lower-dimensional action and reward embeddings when processing high-dimensional visual observations.
At the end, given the final representation $h_{k}^{\prime s},h_{k}^{\prime a},h_{k}^{\prime r}$, we use separate decoders to predict the corresponding noise $y_{k}$ at noise step $k$, which recover the original dimension space respectively:

$$ $y_{k}^{s}=\texttt{D}_{\texttt{s}}(h_{k}^{\prime s})\in\mathbb{R}^{\mathcal{S}} ,\ y_{k}^{a}=\texttt{D}_{\texttt{a}}(h_{k}^{\prime s})\in\mathbb{R}^{\mathcal{ A}},\ y_{k}^{r}=\texttt{D}_{\texttt{r}}(h_{k}^{\prime r})\in\mathbb{R}^{R}$ (7) $$

Crucially, this separation on encoding and decoding preserves the inherent differences between states, actions, and rewards, aiding the model in recognizing clear dependencies on the latent representations $h_{k}$.
Compared with prior works, these help avoid exploiting spurious correlations within decision-making data and sidesteps modeling the overall trajectory distribution directly (Janner et al., ; He et al., ), thereby enhancing sample efficiency and maximizing model expressiveness.

#### Dependency structure modeling.

Although states, actions, and rewards possess fundamentally different physical properties, significant interactive dependencies exist among them.
Specifically, unlike the spatial representation of images, sequential decision data entails intricate dynamics patterns that consistently drive state updates, action generation, and reward acquisition throughout trajectories, which play an indispensable role in effective trajectory modeling.
To this end, the state and action embeddings $h_{k}^{s}$ and $h_{k}^{a}$ are cross-attended to capture mutual dependencies by exchanging key-value pairs in multi-headed attention, modeling the effects of policy and transition state dynamics separately:

$$ $h_{k}^{\prime s}=\texttt{X-Attn}(h_{k}^{s},h_{k}^{a},\mathbf{e}_{k}^{c}),\quad h _{k}^{\prime a}=\texttt{X-Attn}(h_{k}^{a},h_{k}^{s},\mathbf{e}_{k}^{c})$ (8) $$

However, it is important to note that rewards are naturally dependent on state-action sequences, while this dependency does not work in reverse due to their underlying causal relationships. Enforcing in-context optimality guidance could conflict with the primary goal of addressing domain gaps within trajectories. Therefore, we query the reward embeddings $h_{k}^{r}$ using concatenated state-action embeddings, without imposing unreasonable reward dependencies on state-action sequence modeling:

$$ $h_{k}^{\prime r}=\texttt{X-Attn}(h_{k}^{r},[h_{k}^{s},h_{k}^{a}],\mathbf{e}_{k }^{c})$ (9) $$

Introducing prior knowledge of the causal dependencies among states, actions, and rewards provides necessary regularizations for capturing trajectory distributions. This dependency structure modeling module alleviates the overabundance of information and relationships, enabling the model to accurately capture essential dependency priors and efficiently handle long-term sequential modeling. Additionally, the sequence-level dependency structure modeling naturally decouples the hypothesized temporal causal relationships adopted in many sequential modeling approaches (Chen et al., ; Ajay et al., ), offering flexibility in whether to incorporate temporal causality during modeling.

#### Incorporating external conditions.

In addition to the noise step $k$, our model architecture accommodates various conditioning information $\mathbf{c}=[c_{i}]_{i=0}^{N}$, guiding trajectories toward desirable regions.
For example, we can steer the entire trajectory modeling toward high-rewarding regions by conditioning on normalized trajectory returns $\mathbf{c}=[R(\tau)]$ (Ajay et al., ), with specific implementation details outlined in Appendix B.1.
Moreover, our model demonstrates superior synergy with return-conditioned modeling compared to naive architectures that concatenate states, actions, and rewards along temporal or feature dimensions as input, as analyzed in Section 5.6. This advantage arises from our separate encoding-decoding manner and designs of dynamics dependency modeling, which effectively recognize the one-way dependencies between reward and state-action sequences.

#### Applicability to diverse decision-making task settings.

Our architecture is compatible with multi-modal observations, including proprioceptive, exteroceptive (visual/point clouds), and language inputs, as long as modality-specific encoders are employed. From the perspective of trajectory composition, it offers flexibility in accommodating non-standard trajectories, which may include terminal flags, class labels, or preference labels for auxiliary module training to aid policy optimization.
If these task-specific elements exhibit similarities with rewards, which have specific dependencies on states and/or actions, the architecture can be easily extended with minimal additional design complexities by incorporating extra encoders, decoders, and attention modules, akin to our reward-relevant design philosophies. Furthermore, practitioners can also omit the reward-relevant modules to fit non-reward (imitation learning) settings, as demonstrated in our real robot experiments (Section 5.4).

### 4.2 Cross-Domain Trajectory Editing

#### Training Diffusion Model on Target Data.

Given a target domain dataset, we first train the diffusion model to capture its trajectory distribution using Eq. 5, where $\mathbf{x}_{k}$ represents the noised trajectory $\tau_{k}$, and additional conditions $\mathbf{c}$, if any, are concatenated with the noise step $k$ as inputs.
Particularly, we keep the initial transition unchanged in each $H$-horizon trajectory during training, serving as an anchor for enhanced stability in long-sequence modeling.

#### Editing Source Trajectories.

In the forward process, we obtain noised trajectories $\tau_{k}$ from $\mathcal{N}(\tau_{k};\tau_{0},\sigma^{2}_{k}\mathbf{I})$, which retains information from the original source trajectory $\tau_{0}$. This procedure is governed by a ratio parameter $\kappa=\frac{k}{K}\in[0,1]$, determining the level of noise addition. A small $\kappa$ preserves much of the source trajectory information, while a large $\kappa$ diminishes it.
The ideal selection principle for $\kappa$ aims to distort only fine-grained information, such as transition dynamics in the source data, while retaining valuable large-scale information, such as skill primitives inherent in the trajectories. Additionally, this noised initialization theoretically yields favorable results by solving the reverse stochastic differential equation.
Thus, we could then denoise $\tau_{k}$ using the diffusion prior, successfully aligning the edited trajectories $\hat{\tau}_{0}$ with the target domain. The initial transition remains unchanged after each forward and denoising step, consistent with the training process, which is crucial for enhancing editing performance, as discussed in Appendix C.6.
Experiments in Appendix C.2 indicate that setting $\kappa=0.5$ is universally optimal for incorporating the edited source data into policy learning, ensuring sufficient exploitation of source data while shifting its domain properties toward the target domain. After the editing process, we can safely integrate edited source data with target data for downstream policy learning using any algorithms at task specifications.

## 5 Experiments

In this section, we present empirical evaluations of the proposed cross-domain trajectory editing framework, xTED.
We begin with detailing our experimental setups and the baselines for comparison. We then assess xTED against baseline methods in simulation (5.3) and real-robot tasks (5.4), overcoming various observation, dynamics, and morphology gaps within the source data.
xTED consistently demonstrates advantages across different domain gaps and tasks compared to solely training on original target data or directly augmenting target data with source data (5.7), as well as its stability on various data quantity (5.5). We conclude with ablation studies on key design elements of our model architecture and provide evidence and analyses that echo with insights from methodology (5.6).

### 5.1 Experimental Environment Setups

#### Simulation Experiments.

We conduct simulation-based experiments using the MuJoCo physics simulator (Todorov et al., ). Specifically, we construct two source domains on Walker2d-v2 (WK) and HalfCheetah-v2 (HC), where we intentionally introduce dynamics and morphology gaps relative to the original target domains by modifying the physics modeling configurations:
(1) Gravity: applying $2\times$ gravitational acceleration in the simulation dynamics;
(2) Friction: using $0.25/0.5\times$ friction coefficient to make the agent harder to maintain balance;
(3) Thigh Size: using $2\times$ thigh size to introduce morphology gaps on the embodiment.
We record the average return of Soft Actor-Critic (Haarnoja et al., ) policies trained in these source domains and provide a straightforward quantification of the impact of domain gaps on source policy learning in Appendix B.3.

For data acquirement and implementation details: (i) target data: we randomly select 20k transitions from the corresponding datasets in the standard offline RL benchmark D4RL (Fu et al., ).
Specifically, we only consider the Medium (M), Medium Replay (MR) and Medium Expert (ME) datasets, as we hardly use a random or expert policy for system control in common real-world scenarios.
(ii) source data: we collect trajectories of 20k transitions from the source domain with a SAC policy trained in the same domain.
Please see Appendix B.1 for more implementation details.

Figure: Figure 3: Target and source domains with complicated discrepancies on embodiments and viewpoints (top) and experiment results (bottom). The top right presents the snapshots from base and wrist camera views of data collection processes in target/source domain from Cup/Duck/Pot tasks respectively. The average success rate for real-robot tasks with/without distractors is obtained over 3 seeds.
Refer to caption: x1.png

#### Real-Robot Experiments.

We conduct real-world experiments in robotic environments where target data is collected by the WidowX robot and source data is collected by the Airbot, for 100 trajectories respectively.
We build three manipulation tasks: (1) Pick up a red cup and place it on a silver pan (Cup); (2) Pick up a duck and place it on a green plate (Duck); (3) Move a pot from right to left (Pot).
As shown in Fig. 3, there are huge domain discrepancies on robot embodiments and camera viewpoints: two 7-DoF robots possess distinctive module shapes/lengths, embodiment masses and joint types; source and target configurations present different viewpoints and field of views from base and wrist cameras on two robots.
Our objective is to incorporate the edited data from the Airbot to enhance policy performance on the WidowX robot.
These task environments are highly stochastic, featuring randomly initialized object positions and poses, as well as distractors with various shapes, colors, and locations.
Please see Appendix B.2 for more implementation details.

### 5.2 Baselines

(1) Target: training policies on the pre-sampled D4RL data (20k transitions per task) for simulation experiments and pre-collected WidowX data ($\sim$5k transitions per task) for real-robot experiments;
(2) Source: training policies on data (20k transitions per task) pre-sampled with SAC policies for simulation experiments;
(3) Target with S4RL: training policies solely on target data while applying the traditional data augmentation technique S4RL (Sinha et al., ) that adds action noise to target data;
(4) Target+Source: training policies on both target data and unprocessed source data (20k transitions collected by SAC source policies for simulation experiments/around 6k transitions from human tele-operation on Airbot for real-robot experiments);
(5) Target+Edited Source : training policies on both target data and source data edited with our pre-trained model model.

### 5.3 Comparative Evaluation in Simulation Experiments

In Table 1, we present the comparative results of xTED and other baselines on the simulation-based experiments.
We integrate our trajectory editing process with a downstream policy learning module, implemented using one of the widely-used state-of-the-art (SOTA) offline RL algorithms, Implicit Q-Learning (IQL) (Kostrikov et al., ). Notably, our method achieves the best or on-par performance in almost all tasks (18 out of 18) compared to the baselines. Specifically, we find that policy learning directly augmented with original source data can have negative effects compared to solely learning from target data in 5 out of 18 tasks, while augmenting with edited source data consistently shows improvement in all of the tasks.
In WK-MR and HC-MR, edited source data helps improve the performance by over 50% and 20% respectively. The overall 16.4% improvement also shows consistent stability on different domain gaps and quality of target data.
This likely results from the fact that biased dynamics in source trajectories can detrimentally affect policy learning, despite the increased data coverage and diversified behavior patterns introduced by these trajectories. Nevertheless, xTED effectively adjusts the trajectories to realistic dynamics and provides meaningful augmentation, rather than merely expanding the data distribution.
xTED also demonstrates the ability to handle vairous gaps simultaneously using a single fixed diffusion model in Appendix C.9.

Table: Table 1: Average normalized scores for MuJoCo tasks on 20k target/source data (5 random seeds). $\Delta$ denotes adding (edited) source data makes how much performance gain/degradation against training on target data.

### 5.4 Comparative Evaluation in Real-Robot Experiments

The average success rates for Cup, Duck, and Pot tasks are shown in Fig. 3.
Each result is estimated over 10 episodes per task with random environmental initializations and averaged over 3 seeds.
Target + Edited Source overwhelmingly outperforms the baselines in all the tasks, regardless of the presence of distractors.
Notably, in the Cup task, combining learning from edited source data increases the success rate from 43% to 97% and 30% to 73.3%, in environments without and with distractors respectively.
In contrast, due to the huge domain gaps between the source and target domains, directly adding original source data yields no performance gain and sometimes even causes degradation against solely training on target data, e.g. 40% to 20% in Duck task and 23% to 0% in Pot task.
When evaluated with surrounding distractors, directly incorporating source data into policy learning sometimes leads to a more severe performance drop than without distractors, such as from 43% to 13% and from 40% to 0% in the Duck and Pot tasks, respectively.
Furthermore, our method consistently outperforms the Target with S4RL across all tasks. This result highlights that data augmentation methods cannot reliably enhance policy performance when compared to using only the original target data.
It underscores the superior effectiveness and necessity of the cross-domain trajectory editing paradigm, which appropriately leverages biased source data.
All numeric results in Fig. 3 can be found in Appendix C.1 Table 7.

### 5.5 Investigations on Sample Efficiency

Figure: Figure 4: Different amounts of data for diffusion and policy training (Target: WK-MR, Source: Gravity).
Refer to caption: extracted/5917530/figure/data_ratio.png

xTED demonstrates robust performance across varying amounts of data.
We first ablate on data quantity for diffusion training (5k, 10k, 20k transitions from WK-MR) and keep the same data quantity for policy learning.
From Table 2, we find that the policies learned from target and edited source data still perform well despite of very limited data for training diffusion model, demonstrating high sample efficiency of diffusion models in our data editing paradigm.

We then ablate on data quantity for both diffusion training and policy learning: randomly sample transitions of 50k and 100k from the WK-MR dataset for diffusion training, combining each with an equivalent amount of source data for policy learning. Fig. 4 exhibits the policy performance on target, target+source, and target+edited source datasets, utilizing different training algorithms, IQL and TD3+BC (Fujimoto & Gu, ). It is evident that with small datasets (20k transitions, Table 1), our method significantly enhances the quality of the source domain dataset, thereby improving training performance. As the dataset size increases (50k and 100k transitions), our method continues to enhance source data quality, though the improvement over baselines might sometimes become less pronounced since the target data itself can sufficiently support policy learning without source data.
xTED also prevails on larger amounts of source data involved in policy learning in Appendix C.4.

**Table 2: Reduced data usage for diffusion training hardly has negative impact on policy learning.**
| Domain Gap | Gravity | Friction | Thigh Size |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Target Data | 5k | 10k | 20k | 5k | 10k | 20k | 5k | 10k | 20k |
| Avg. Score | 26.7±9.8 | 21.5±8.5 | 23.3±9.1 | 29.0±8.3 | 25.0±8.2 | 25.9±9.1 | 31.4±10.0 | 29.8±9.6 | 25.9±9.1 |

### 5.6 Ablation Findings on Model Architecture

Table: Table 3: Architecture Ablations (5 random seeds). Red indicates lower scores than solely training on target data.

Table: Table 4: Our architecture is more compatible with (return-) conditioned diffusion. Results are averaged over 5 random seeds. Red indicates lower scores than solely training on target data. $\uparrow$ indicates improved performance with return conditioning, while $\downarrow$ indicates the opposite.

We ablate our model architecture to demonstrate the impact of different design insights and techniques.
We primarily consider four distinct architecture baselines:
(1) Feature Concatenation (FC): concatenating state, action, and reward sequences on feature dimension before passing through attention;
(2) Transition concatenation (TC): concatenating state, action, and reward sequences on temporal dimension
before passing through attention;
(3) Causal Mask (CM): incorporating causal masks in attention modules in our architecture for modeling Markovian process, considering transitions only depending on the previous step;
(4) Diffusing over States + Inverse Dynamics (Inv): solely diffusing over state trajectories, while employing two inverse models to obtain actions and rewards.
Table 3 demonstrates that our model consistently achieves superior performance, from which several key insights into architecture design can be derived:
(1) Entire trajectory modeling outperforms partial trajectory modeling:
Using inverse models (Inv) results in significantly higher compounding errors, as action feasibility and reward plausibility cannot be reliably maintained when only states are diffused without a unified model that handles all components consistently;
(2) Imposing Markovian properties as priors in trajectory modeling is suboptimal:
Incorporating Markovian modeling (CM) degrades the quality of edited source data, as local transition dynamics enforced by masked attention mechanisms may conflict with the global temporal consistency required in trajectory modeling.
This suggests that trajectory modeling demands a distinct approach compared to common practices in decision-making approaches;
(3) Our design effectively captures intricate dependencies within trajectories:
Concatenating states, actions, and rewards along transition or feature dimensions (TC/FC) is problematic. It treats the entire trajectory as a homogeneous, image-like input, which obscures the model’s ability to correctly identify dependencies between transitions and decision elements, and introduces unwarranted dependencies of rewards on state-action sequences;
(4) Our design integrates well with return-conditioned diffusion:
Table 4 reveals that incorporating return conditioning in naïve architectures (TC/FC) leads to performance degradation, whereas our model with return conditioning successfully guides edited source data towards higher-reward regions, resulting in superior policy performance. This is because only our design correctly models the one-way dependencies of reward and state-action sequences, enabling effectively implementing return-conditioned strategies.

### 5.7 xTED for Single-Domain Data Augmentation

In reality, data from other domains is not always available.
Fortunately, our model design also entails great potential to serve as a data generation model to navigate through this situation.
In Fig. 5, we illustrate the results of using our model for data augmentation on small datasets (20k transitions) pre-sampled from D4RL.
Our model offers two simple types of augmentation approaches:
(1) Tgt. (Edit): adding noise onto the original data as the forward process to match a theoretical Gaussian distribution ($\kappa=1.0$), followed by denoising with our model with the same number of steps.
(2) Tgt. (Gen): directly denoising standard Gaussian noise with our model.
model-based trajectory augmentation is compared with two baselines: (1) S4RL (Sinha et al., ): adding a zero-mean noise distribution $\mathcal{N}(0,3e^{-4})$ on every dimension of the state space;
(2) SER (Lu et al., ): learn a diffusion-based dynamics model for transition generation.
All the methods augment the original dataset with the same amount of synthetic samples.
It can be observed that augmentation with our diffusion model consistently leads in almost all tasks.
S4RL achieves comparable scores in specific tasks but tends to exhibit high variance due to its randomization mechanism. Compared with SER, our approach demonstrates that modeling longer-horizon trajectory dynamics and temporal consistency significantly improves data augmentation quality for small datasets over merely modeling transition dynamics.

Figure: Figure 5: Average normalized scores for single-domain data augmentation. Averaged over 5 random seeds.
Refer to caption: extracted/5917530/figure/data_aug.png

## 6 Conclusions

We present a novel, simple, generic, flexible, and effective trajectory editing paradigm (xTED), which reframes cross-domain policy adaptation as a data pre-processing problem.
It is a task- and domain-agnostic method that avoids the need for task-specific policy adaptation designs and can accommodate multiple available source domains.
Furthermore, it is compatible with any observation encoder and downstream policy learning method, making it adaptable to various task specifications.
Additionally, xTED is orthogonal to other cross-domain policy adaptation paradigms, which can be flexibly integrated for greater synergy if necessary.
At the core of xTED, we introduce a scalable and flexible diffusion model architecture, effectively modeling the complex dependencies within trajectories.
This design proves to be sample-efficient and highly compatible with (return-)conditioned diffusion.
Besides, our model demonstrates strong potential as a data generator for single-domain data augmentation when no source data is available, highlighting its superiority in modeling entire trajectories.
Through extensive experiments, we show that incorporating source data edited with xTED consistently yields performance improvements over training solely on target data while directly adding unprocessed source data often results in significant performance degradation, particularly in real-robot manipulation tasks.

## Appendix

## Appendix A Extended Discussions with Existing Works

xTED offers a generic, flexible, simple yet effective cross-domain trajectory editing paradigm that gains massive necessity and advantages over existing approaches. This section comprehensively elaborates on its distinctions from domain adaptation and data augmentation.

### A.1 Domain Adaptation

xTED casts cross-domain policy adaptation as a data pre-processing problem, thereby eliminating the need for designing modality/task-specific adaptation modules that function during training. Most existing policy adaptation methods primarily focus on achieving MDP Alignment (Kim et al., ).

#### Existing categories of domain adaptation.

The first category of approaches to achieving such alignment is through learning direct mappings or corrections between source and target domains. For observation space alignment, numerous works leverage advances in generative adversarial learning and contrastive learning to transform the observation space, achieving consistent visual rendering and camera viewpoints as in the target domain (Zhu et al., ; Liu et al., ; Zhang et al., ; Bewley et al., ; Rao et al., ; Liu et al., ; Gangwani & Peng, ; Radosavovic et al., ).
In scenarios with dynamics mismatch, it becomes necessary to align both state and action spaces simultaneously, which introduces more complex correspondence learning mechanisms such as (dynamics/temporal) cycle consistency (Kim et al., ; Zhang et al., ; Raychaudhuri et al., ; Zakka et al., ; Wang et al., ) and mutual information criteria (Franzmeyer et al., ).
Alternatively, modifying the reward space can compensate for the misalignment in transitional dynamics within MDPs (Eysenbach et al., ; Liu et al., ; Lyu et al., ; Xue et al., ), which may also be implicitly addressed by adaptively regularizing Q-values (Niu et al., ; ; Hou et al., ).
This category necessitates model retraining when new data from other source domains becomes available, which can be time-consuming and labor-intensive.

The second category resorts to building a canonical representation space that preserves task-relevant yet domain-agnostic information (Stadie et al., ; Pan et al., ; Mueller et al., ; Sermanet et al., ; Cetin & Celiktutan, ; Wang et al., ; Yang et al., ; Choi et al., ).
This auxiliary representation space, often viewed as skills (Gupta et al., ; Hejna et al., ; Pertsch et al., ; Xu et al., ) or subgoals (Sharma et al., ; Ma et al., ; ; Li et al., ), facilitates the construction of aligned domain-invariant MDPs by capturing task semantics that effectively guide agents in completing tasks.
However, this approach involves designing task-specific loss functions and optimization procedures, which may struggle to find a representation space that effectively encapsulates the inputs and reflects the task.

Despite the aforementioned shortcomings, these two categories share a common Achilles’ heel: mode collapse (Lopez et al., ). Most policy adaptation methods, whether explicitly or implicitly, rely on the high-level philosophy of generation and discrimination.
Learning an informative mapping or a canonical representation that can effectively recover the entire target distribution can be exceedingly challenging, especially due to data imbalance and the sensitivity of hyper-parameter tuning.

#### Why “data adaptation”?

To overcome all the aforementioned issues, it is crucial to avoid designing modality/task-specific adaptation modules and instead handle domain adaptation at the data level. This approach provides significant flexibility, allowing the integration of various upstream observation encoders for different modalities, as well as diverse downstream policy learning methods that best suit the tasks at hand.

#### Why diffusion-based data editing?

Direct data transformation cannot rely on a pre-trained deterministic mapping or representation to pre-process source data, as this would face the same challenges as traditional domain adaptation methods, leading to transformed data with reduced variety and insufficient coverage in the target distribution. Moreover, such mappings or representations require re-training or fine-tuning to accommodate multiple source domains. In contrast, diffusion-based editing ensures diversity in the transformed data due to its stochastic nature and avoids mode collapse. Additionally, the editing process is universally domain-agnostic, correcting only the dynamics and observation patterns while preserving task-relevant information in source data with a target distribution prior modeled by a diffusion model, thus enabling a retraining-free approach.

Above all, xTED represents a novel, generic, and flexible cross-domain data-level policy adaptation paradigm. It is domain-agnostic, accommodating multiple source domains without the need for re-training or fine-tuning the diffusion model; modality-agnostic, being compatible with various observation encoders; task-agnostic, integrating seamlessly with different task-specific policy learning methods; compatible with other policy adaptation paradigms and approaches for greater synergy.

### A.2 Distinctions from Data Augmentation

#### Setting.

Data augmentation is primarily employed in single-domain settings, which are fundamentally different from xTED’s cross-domain applications. Typically, no data from other domains is introduced, and data augmentation focuses on manipulating training data to enhance robustness, e.g. noising the original data (Sinha et al., ).

In contrast, data editing is a broader paradigm that encompasses the applications of data augmentation. Even when data from other domains is unavailable, xTED can serve as an expressive data generation model for augmenting small-sample datasets in single-domain settings, outperforming state-of-the-art data augmentation strategies (Lu et al., ; Sinha et al., ) (see Section 5.7).

#### Diffusion-based data editing V.S. data augmentation.

We have to emphasize that using diffusion models for data editing is both sample-efficient and error-tolerant than diffusion-based trajectory generation for data augmentation (Lu et al., ; He et al., ; Jackson et al., ). This is because the goal in data editing is far more easily attainable compared to its application in data generation tasks.
When diffusion models are used for data generation, the focus is usually on achieving a high level of precision to generate data that closely matches the original data distribution.
However, in the context of data editing, the requirements are relaxed to simply distort (edit) the data to more closely match the target dynamics and observation patterns than the source data.
Crucially, there is no need for edited source data to closely resemble target data in every detail.
Thus, diffusion models for editing are relatively insensitive to the amount of target data used, having minimal impact on the ultimate policy performance as proved in Section 5.5.

## Appendix B Implementation Details and Experiment Setup

### B.1 Simulation Experiments

The implementation details in our simulation experiments are specified as follows:

- •
Model and Method Setups: to strike the balance among the concerns from Separate Encoding-Decoding in Section 4.1, we try to encode the state, action, and reward into $16\times$ embedding dimensions respectively.
In terms of the number of self-attention blocks, we set $N_{s}=N_{a}=2,N_{r}=1$ in Figure 2 for the least computation consumption with performance guarantee.
The training process takes denoising steps $K=200$ and optimizes over Eq. 5.
In xTED, we perturb the source trajectories with $k=100$ steps of gaussian noises and denoise them with the pretrained model in $k=100$ steps ($\kappa=0.5$).
The computation of attention modules is proportional to $9H^{2}$ (self-attention: $(N_{s}+N_{a}+N_{r})^{2}$; cross-attention:$4H^{2}$), so we also set architecture with minimal differences on computation efforts for the architecture ablation baselines for fair comparisons, i.e. FC, TC, Inv, CM.
For CM, we keep the architecture the same with xTED, with the only difference of adding a causal mask with markovian constraints.
We use 9 successive self-attention modules and FC ($9\times H^{2}$), while one self-attention module for TC ($(3\times H)^{2}$), achieving the same attention computation.
For Inv, we only have to diffuse over states without addressing the intricate dependencies within trajectories so we reduce the computation and adopt only 2 self-attention modules for efficiency.
- •
Data Usage.
We use only 20k transitions from the D4RL target dataset for diffusion training and policy learning on each task, which represents merely 1/50 of HC-M, 1/10 of HC-MR, 1/100 of HC-ME, 1/50 of WK-M, 1/15 of WK-MR, and 1/100 of WK-ME from the original D4RL dataset. The full dataset is already sufficient to train a high-performing policy, making it unnecessary to combine source data and risk potential negative effects due to domain gaps.
- •
Encoder-Decoder.
Separately encoding and decoding state, action, and reward sequences in trajectories offers great flexibility to apply task-specific prior knowledge in constructing a reasonable information bottleneck.
The spaces of embedded state $z_{s}$, action $z_{a}$, and reward $z_{r}$ should not be overly compressed as following attention blocks requires sufficiently rich information to discover connections.
On the other hand, the embedding spaces should not be infinitely enlarged due to concerns on computational complexity and memory use.
From an interactive angle, the sizes of these embedding spaces should not be diversely imbalanced so that the model is less prone to ignoring the low-dimensional action and reward embeddings when involved with visual observations.
In all the transformer architectures ablated in Section 5.6, the encoders and decoders we used are simple MLPs with two dense layers:
$\displaystyle z_{s}$
$\displaystyle=\mathrm{MLP}(s)$
(10)
$\displaystyle z_{a}$
$\displaystyle=\mathrm{MLP}(a)$
$\displaystyle z_{r}$
$\displaystyle=\mathrm{MLP}(r)$
$\displaystyle\mathbf{z}$
$\displaystyle=[z_{s},z_{a},z_{r}]$
In xTED and CM, we expand the observation, action, and reward into a feature (hidden) space with 16 times the original dimensionality.
In Inv, FC, and TC, each observation, action, and reward is embedded into a 320-dimensional space.
- •
Self-Attention Module $\texttt{S-Attn}(x,c)$.
In xTED, TC, FC, Inv and CM, we use multi-head self-attention (MSA) mechanism to apply long-horizon consistency in sequence modeling. Specificlly, we use the MultiHeadDotProductAttention (MSA) function implemented by JAX, denoted by $\mathrm{ATTN}$. The forward processes of self-attention module are formulated as follows:
$\displaystyle z_{c}=\mathrm{MLP}(c)$
(11)
$\displaystyle q=k=v=\mathrm{LayerNorm}(x)\cdot(1+z_{c,\mathrm{scale}})+z_{c,
\mathrm{shift}}$
$\displaystyle x=x+z_{c,\mathrm{gate},\mathrm{attn}}\cdot\mathrm{ATTN}\left(q,k
,v\right)$
$\displaystyle x=x+z_{c,\mathrm{gate},\mathrm{mlp}}\cdot\mathrm{MLP}\left(
\mathrm{LayerNorm}(x)\cdot(1+z_{c,\mathrm{scale}})+z_{c,\mathrm{shift}}\right)$
Here, $x$ is the input, $c$ is the condition, $z_{c,\mathrm{gate}},z_{c,\mathrm{scale}}$ and $z_{c,\mathrm{shift}}$ are chunked from $z_{c}$.
More detailed hyperparameters are shown in Table 5.
- •
Cross-Attention Module $\texttt{X-Attn}(x_{q},x_{kv},c)$.
In xTED and CM, we use cross-attention mechanism to apply sequence modeling.
The input argument $c$ is produced by the output of the condition encoder $f_{c}$, which splits into two components, $c_{q}$ and $c_{kv}$, ensuring that the tensor shapes align with $x_{q}$ and $x_{kv}$, respectively.
We still use the MultiHeadDotProductAttention implemented by JAX. The forward processes of cross-attention module are formulated as follows:
$\displaystyle c_{q},c_{kv}=c$
(12)
$\displaystyle z_{c_{q}}=\mathrm{MLP}(c_{q})$
$\displaystyle z_{c_{kv}}=\mathrm{MLP}(c_{kv})$
$\displaystyle q=\mathrm{LayerNorm}(x_{q})\cdot(1+z_{c_{q},\mathrm{scale}})+z_{
c_{q},\mathrm{shift}}$
$\displaystyle k=v=\mathrm{LayerNorm}(x_{kv})\cdot(1+z_{c_{kv},\mathrm{scale}})
+z_{c_{kv},\mathrm{shift}}$
$\displaystyle x_{kv}=x_{kv}+z_{c_{kv},\mathrm{gate},\mathrm{attn}}\cdot\mathrm
{ATTN}(q,k,v)$
$\displaystyle x_{kv}=x_{kv}+z_{c_{kv},\mathrm{gate},\mathrm{mlp}}\cdot\mathrm{
MLP}\left(\mathrm{LayerNorm}(x_{kv})\cdot(1+z_{c_{kv},\mathrm{scale}})+z_{c_{
kv},\mathrm{shift}}\right)$
Here, $x_{q}$ is the input for query, $x_{kv}$ is the input for key and value, $c_{q}$ is the condition for $x_{q}$, $c_{kv}$ is the condition for $x_{kv}$.
$z_{c_{kv},\mathrm{gate}},z_{c_{kv},\mathrm{scale}}$ and $z_{c_{kv},\mathrm{shift}}$ are chunked from $z_{c_{kv}}$. $z_{c_{q},\mathrm{scale}}$ and $z_{c_{q},\mathrm{shift}}$ are chunked from $z_{c_{q}}$.
More detailed hyperparameters are shown in Table 5.
- •
Editing Details.
When we use xTED for trajectory editing, the step parameter $\kappa$ we use is 0.5, while the total time steps $K$ we used for training xTED model is 200. This implies that we add $k=100$ steps of noise to the original source-domain data, then denoise it with xTED with the same number of steps.
- •
Policy Learning.
In this paper, we use IQL and TD3+BC as policy learning algorithms. The key hyperparameters we used are shown in Table 5, which are basically the same as the original papers.
- •
Evaluation: All the simulation results are obtained by averaging over the same set of 5 random seeds.
- •
Computing Resources: we ran experiments largely on 8 NVIDIA A100 GPUs via an internal cluster.

**Table 5: Hyperparameters for simulation (sim) and real-robot (real) experiments.**
| Hyper-parameter | Value |
| --- | --- |
| xTED (sim) |  |
| Number of self attention blocks for state | 2 |
| Number of self attention blocks for action | 2 |
| Number of self attention blocks for reward | 1 |
| Number of cross attention blocks for s-a | 1 |
| Number of cross attention blocks for a-s | 1 |
| Number of cross attention blocks for r-sa | 1 |
| Size of hidden dim for encoder/decoder | 16$\times$original dim |
| Trajectory horizon $H$ | 20 |
| xTED (real) |  |
| Number of self attention blocks for state | 2 |
| Number of self attention blocks for action | 2 |
| Number of cross attention blocks for s-a | 1 |
| Number of cross attention blocks for a-s | 1 |
| Size of hidden dim for encoder/decoder | 1$\times$original dim |
| Trajectory horizon $H$ | 5 |
| IQL (sim) |  |
| Actor learning rate | 3e-4 |
| Critic learning rate | 3e-4 |
| Optimizer | adam |
| TD3+BC (sim) |  |
| Actor learning rate | 1e-5 |
| Critic learning rate | 1e-3 |
| Optimizer | adam |
| BC (real) |  |
| Actor learning rate | 1e-4 |
| Optimizer | adam |

### B.2 Real-Robot Experiments

In addition to configurations identical to those used in simulation experiments, we summarize below the specific implementation details for the real-robot experiments:

- •
Model and Method Setups:
Different from simulation experiments, the robot manipulation tasks involves environments where rewards are hard to specify, thus resulting in collecting non-reward trajectories.
Correspondingly, the self-attention and cross-attention modules for reward trajectories are removed from the original xTED architecture, leaving only self-attention and cross-attention modules for state and action sequences. In terms of other architecture designs and editing details, we keep them identical with simulation experiment setups.
We set the trajectory horizon for modeling with xTED to $H=5$, as the robot manipulation trajectories contain higher-dimensional features, necessitating a trade-off in horizon length to reduce computational burden.
- •
Data Collection.
Each source/target dataset comprises 100 trajectories (40-60 transitions per trajectory with a frequency of around 5Hz, 75 trajectories w/ distractors and 25 trajectories w/o distractors) with RGB observations (480 × 640) from an external camera and a camera mounted on the robot’s gripper, as well as end-effector actions.
- •
Observation Pre-processing.
We choose DecisionNCE-T (Li et al., ) to compress the 480x640 camera views into embedding space with 1024 feature dimensions before applying xTED. xTED is then deployed on the lower-dimensional observation representation instead of the high-dimensional image observations.
- •
Encoder-Decoder. In xTED architecture, we maintain the original feature dimensionality of the observation representation (1024) and expand the action space by two times orginal feature dimensionality.
- •
Transformer Architecture. The architecture remains identical to that used in our simulation experiments, with the only exception being the removal of modules related to reward dependency modeling.
- •
Policy Learning.
The robot policy network consists of three layers of MLPs for action prediction, trained via vanilla behavior cloning (BC) with L2 regression using the Adam optimizer at a learning rate of 1e-4. All models are trained for 2.5k epochs with a batch size of 64.
- •
Evaluation.
We evaluate the policy checkpoint with 10 episodes for each seed with random environmental initializations and 3 random seeds for each result.
- •
Computing Resources: we ran experiments on 4x NVIDIA A800 GPUs via an internal cluster.

### B.3 On the Magnitude of Domain Gaps Introduced by the Simulation Experiment Setups

In Section 5.1, we mentioned that we modified the original dynamics—such as 2x gravity, 0.25/0.5x friction (HC/WK), and 2x thigh size—to construct source domains with biased dynamics. To quantify the domain gaps, we recorded the mean values of the average returns of SAC policies trained in the source domain but evaluated in the target domain, and compared them to SAC policies trained and evaluated in the target domain. As shown in Table 6, the domain gaps significantly hinder direct policy transfer from the source to the target domain, resulting in notable performance degradation.

**Table 6: Average scores of SAC policies trained in source/target domain and evaluated in target domain.**
| Task | Domain Gap | Avg. Return (Source) | Avg. Return (Target) |
| --- | --- | --- | --- |
| Halfcheetah | Gravity | 4513 | 10290 |
| Friction | 5099 |  |  |
| Thigh Size | 5537 |  |  |
| Walker2d | Gravity | 1233 | 4916 |
| Friction | 3392 |  |  |
| Thigh Size | 437 |  |  |

## Appendix C Additional Experiment Results

### C.1 Numeric Results of Real-Robot Experiments

The values of success rate depicted in Fig. 3 bar plots are listed in the following Table 7.
Surprisingly, incorporating edited source trajectories helps improve success rate of task completion by a fairly large margin, i.e. $>100\%$ or even $>200\%$ against solely training on target data.
However, directly combining original source trajectories generally results in severe performance degradation, i.e. in 5/6 tasks.
Particularly, the success rates drop to 0% in Pot tasks where the robot arm cannot identify the target object and approach it.

Qualitatively, as shown in the recorded videos on our [website](https://xted24.github.io/xTED/), robot policies trained on target data consistently exhibit poor performance in lifting the end effector, preventing the cup from being placed through the top opening of the pan. Additionally, these policies show low accuracy and poor timing in grasping or releasing target objects, attributed to the insufficiency and narrowly distributed target data. Conversely, directly incorporating source data results in policies that are more aggressive and less precise in control, as Airbot operates within a broader range of control dynamics.

**Table 7: Performance comparisons across different real-robot tasks and baselines.**
| Task | Target+Edited Source (Ours) | Target+Source | Target | Target (w/ S4RL) |
| --- | --- | --- | --- | --- |
| Cup | 0.97±0.06 (+125.6%) | 0.40±0.10 (-7.0%) | 0.43±0.06 | 0.30±0.20 |
| (w/ distractors) | 0.73±0.15 (+143.3%) | 0.40±0.10 (+33.0%) | 0.30±0.20 | 0.23±0.23 |
| Duck | 0.63±0.21 (+57.5%) | 0.20±0.20 (-50.0%) | 0.40±0.17 | 0.60±0.26 |
| (w/ distractors) | 0.83±0.06 (+93.0%) | 0.13±0.06 (-69.8%) | 0.43±0.31 | 0.50±0.17 |
| Pot | 0.70±0.10 (+204.3%) | 0.00±0.00 (-100.0%) | 0.23±0.06 | 0.53±0.11 |
| (w/ distractors) | 0.80±0.00 (+100.0%) | 0.00±0.00 (-100.0%) | 0.40±0.26 | 0.13±0.15 |

### C.2 xTED with Different Choices of Editing Ratio

According to SDEdit (Meng et al., ), editing ratio $\kappa=0.5$ falls in the sweet spot of image editing tasks and so does it in trajectory editing tasks in general, as shown in Table 8.
$\kappa=0.0$ indicates no editing applied on the source data, whereas $\kappa=1.0$ indicates that edited source data is theoretically denoised from random noise and thus approximately equivalent to direct generation without any basis.
This reveals that $\kappa$ should not be too large or too small to effectively retain useful information from the source data while precisely eliminating domain-specific biases.
However, in certain scenarios, $\kappa=1.0$ can successfully transform source trajectories to align with target domain properties, resulting in the best performance.

**Table 8: Ablations on editing ratio $\kappa$ with WK-MR dataset.**
| Domain Gap | $\kappa$ | Target+Edited Source |
| --- | --- | --- |
| Gravity | 0.0 | 19.5±10.7 |
| 0.05 | 23.1±10.4 |  |
| 0.5 | 23.3±9.1 |  |
| 1.0 | 27.1±10.8 |  |
| Friction | 0.0 | 17.4±6.2 |
| 0.05 | 24.7±7.0 |  |
| 0.5 | 25.9±9.1 |  |
| 1.0 | 25.5±13.6 |  |
| Thigh Size | 0.0 | 18.0±6.7 |
| 0.05 | 25.7±7.9 |  |
| 0.5 | 25.9±9.1 |  |
| 1.0 | 24.1±9.3 |  |

### C.3 xTED with Multiple Editing Iterations

In xTED, we add $k$-step Gaussian noise to source trajectories and denoise them in $k$-steps using a pre-trained xTED for one iteration ($e=1,\kappa=0.5$ for all our results). In Table 9, we explore the impact of two editing iterations ($e=2$) and find that increasing the number of iterations can sometimes enhance xTED’s performance by achieving better alignment with target domain properties. It is noteworthy that $e=1,\kappa=1.0$ and $e=2,\kappa=0.5$ involve the same total number of noising and denoising steps, with the only difference being that $e=2,\kappa=0.5$ divides the process into two iterations.
$e=2,\kappa=0.5$ seems to perform well only if $e=1,\kappa=1.0$ also does, suggesting that some tasks with large domain gaps benefit from more editing steps.
Interestingly, $e=2,\kappa=0.5$ always slightly outperforms $e=1,\kappa=1.0$.
This observation indicates that xTED, even with the same computational effort in noising and denoising, can achieve improved performance by dividing the editing process into finer-grained refinement stages.

Table: Table 9: xTED with different editing configurations. Averaged over 5 random seeds.

### C.4 xTED on Larger Amount of Source Data

In this section, we present the results of leveraging a larger amount of source data (200k transitions), i.e. 10 times the target data. We tested policy performance using the TD3+BC algorithm with target data from the WK-MR and HC-MR datasets. As shown in Table 10, xTED demonstrates a clear advantage over the baselines and improves on the results obtained with only 20k source data. These results suggest that xTED is robust and stable in accommodating larger amounts of source data, highlighting its potential for scaling up model capacity and data usage in future developments of larger-scale cross-embodiment policy learning for robotics.

Table: Table 10: Average normalized scores for MuJoCo tasks on 20k target data and 200k source data.

### C.5 Comparisons on Transformer and Temporal U-Net for Diffusion-Based Data Editing

As shown in Table 11, compared to Temporal U-Net commonly used in diffusion models, our architecture achieved higher overall scores and significantly reduced training time per epoch (1000 training steps).
The training time consumptions (seconds) were recorded on a server with $8\times$ A100 GPUs while each model was trained using a single GPU on the server, with no other GPUs active during the process.
The detailed architecture of Temporal U-Net can be found in (Ajay et al., ).

**Table 11: Comparisons xTED and Temporal U-Net for trajectory editing.**
| Target Data | Source Dynamics | Temporal U-Net | xTED |  |  |
| --- | --- | --- | --- | --- | --- |
| Avg. Score$\uparrow$ | Clock Time$\downarrow$ | Avg. Score$\uparrow$ | Clock Time$\downarrow$ |  |  |
| HC-MR | Gravity | 27.9$\pm$3.2 | 74.6s | 31.3$\pm$2.9 | 46.1s |
| Friction | 27.7$\pm$3.7 | 31.8$\pm$3.1 |  |  |  |
| Thigh Size | 28.8$\pm$3.5 | 33.0$\pm$3.0 |  |  |  |
| WK-MR | Gravity | 30.9$\pm$9.6 | 93.2s | 23.3$\pm$9.1 | 46.5s |
| Friction | 26.3$\pm$12.6 | 25.9$\pm$9.1 |  |  |  |
| Thigh Size | 28.2$\pm$9.3 | 25.9$\pm$9.1 |  |  |  |
|  | Total | 169.8 | 167.8s | 171.2 | 92.6s |

### C.6 xTED with Additional Constraints and Conditions on Diffusion Models

We train xTED with constraints of fixed initial transition (Init. Const.) and no constraint of fixed last transition (Last Const.) in trajectories.
xTED can also accommodate conditioning strategies (Conditioned xTED).
In this section, we ablate on these additional constraints and conditions.

In terms of the implementation of return-conditioned xTED, to generate trajectories that maximize return, we condition the diffusion model on the return of trajectories, such that the training objective in Eq. 5 should be adapted to:

$$ $\mathcal{L}_{\theta}=\mathbb{E}_{k\in[1,\cdots,K],\tau_{0}\sim q(\tau_{0}), \epsilon\sim\mathcal{N}(\mathbf{0},\mathbf{I})}\|\epsilon-\epsilon_{\theta}( \tau_{k},R(\tau),k)\|^{2}$ (13) $$

where the returns are normalized to ensure $R(\tau)\in[0,1]$.
Sampling a high-return trajectory corresponds to setting $R(\tau)\rightarrow 1$.
In the planning stage, we denoise the blurred trajectories with classifier-free guidance with perturbed noise (Ajay et al., ):

$$ $\hat{\epsilon}:=\epsilon_{\theta}(\tau_{k},\varnothing,k)+\omega\left(\epsilon _{\theta}(\tau_{k},R(\tau),k)-\epsilon_{\theta}(\tau_{k},\varnothing,k)\right)$ (14) $$

where we assign $R(\tau)=0.9,\omega=1.0$.

As shown in Table 12, the use of initial constraint benefits the final performance, while using last constraint has the opposite effect. Notably, incorporating return guidance can further enhance the effectiveness of xTED.

Table: Table 12: xTED with additional constraints and condition guidance. Averaged over 5 random seeds.

### C.7 xTED with Different Choices of Trajectory Horizons for Diffusion Modeling

In sequential modeling, the sequence horizon is a critical parameter. Modeling sequences that are too long can significantly challenge the model capacity, while sequences that are too short often result in reduced long-horizon consistency. In this section, we compare a shorter horizon of 10 with the horizon of 20 used in our main simulation experiments. As shown in Table 13, selecting a horizon of 20 improves the model performance in the HalfCheetah and Walker2d locomotion tasks.

Table: Table 13: Average normalized scores for MuJoCo tasks on horizon choices for trajectory modeling.

### C.8 xTED on Different Degrees of Dynamic Gaps

We explore the impact of different degrees of dynamics gap on policy performance aided with xTED. Specifically, we modify the thighs of HalfCheetah and Walker2d to $0.5\times$, $2\times$, and $3\times$ original sizes respectively.
The results in Fig. 6 indicate that under various degrees of dynamics gaps,
edited source data can augment the original dataset effectively in most of situations, while directly augmenting with unedited source data is sometimes more sensitive to extreme domain gaps in HalfCheetah environments.

Figure: Figure 6: Average normalized returns for different degrees of dynamic gaps (different thigh sizes) on 20k transitions from WK-MR and HC-MR.
Refer to caption: extracted/5917530/figure/data_gap.png

### C.9 xTED for Multiple Source Domains with Different Gaps

xTED demonstrates the ability to handle diverse source domains with varying domain gaps using a single pre-trained diffusion model over the target domain, without the need for re-training or fine-tuning.
We integrate source datasets exhibiting three distinct domain gaps (20k data with thigh size, gravity, and friction gaps, respectively) into the policy learning process. While unedited source data with intricate domain gaps generally degrade overall policy performance, the edited source data, with narrower gaps, consistently improves policy learning outcomes.

Table: Table 14: Average normalized scores for multi-source MuJoCo experiments.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 5
presentation: 3
questions: Please see the weakness section.
soundness: 3
strengths: - The paper is overall clearly written.
- The proposed method is simple, yet seems to be effective.
- The ablation studies are comprehensive and helps to understand the performance gains of the method.
summary: This paper proposes a method named "Cross-Domain Trajectory EDiting (xTED)" for adapting data from a source domain into a target domain for better policy learning. The setting considered is that there is some sort of gap between the source and target domain, e.g., dynamics, observations, or agent embodiments, thus the data -- decision trajectories composed of (s, a, s') in a MDP -- from the source domain cannot be directly applied to the target domain, and needs to be first adapted/edited. The proposed method first trains a diffusion model on the target domain data; then, it adds noise to the source domain data, and then apply the trained diffusion model to denoise it to "edit" the noised source trajectory to target trajectory. The paper proposes a new architecture for the diffusion model, which first separately encodes the state, action, and reward via self attention, and then perform cross attention between them, with "Dependency structure modeling." where, e.g., reward only attends to (state, action) pairs. This shows to perform better than traditional architectures such as simply concatenating state, action, reward pairs. Experiments are performed on two simulation tasks, where the source and target domain differs in transition dynamics, and three real-world manipulation tasks, where the source and target domain differs in observation and dynamics, and the proposed method is shown to outperform baselines. Ablation studies are performed to help understand the performance of different components of the method.
weaknesses: - One major issue is that lack of strong baselines. There are several baselines on policy/trajectory transfer mentioned in the introduction, e.g., Eysenbach et al, 2021, however, the paper does not compare to any of them. It is mentioned in the intro that these methods employ specific assumptions and thus come with specific constraints, but it would be good to specify, in the context of this paper's experiments, why these methods are not applicable. If they are applicable, then a comparison would greatly strengthen the paper. 
- In the abstract, the paper claims "extensive" sim and real experiments. Although this is a subjective measure, but 2 sim envs + 3 pick-and-place tasks for real-world robots may not seem "extensive". I would encourage the authors to test at least on a few more sim envs. 
- The proposed method edits the source trajectory by adding noise to the source trajectory, and then use the diffusion model trained on the target data to denoise it. I wonder if this is any theoretic analysis or guarantee on this is a valid operation, i.e., the resulting trajectory will be the target trajectory. In my understanding, the diffusion denoise process needs to start from a Gaussian noise to ensure the correctness of the denoising process. In the paper, however, it starts from a "biased" data which is noise added to source data. A discussion on this would be appreciated.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: See ii) in the weakness part.
soundness: 2
strengths: i) This paper delicately models the interdependencies among states, actions and rewards within trajectories to facilitate learning in the diffusion model. This detailed modeling significantly contributes to the empirical success of the methodology.

ii) The extensive evaluation results underscore the effectiveness of trajectory editing using the diffusion model.
summary: This paper presents a new method to improve the policy learning on the task where the data collection is laborious or costly. The authors use the diffusion model to transfer the source data which shares primitive skills with the target data, thereby augmenting the dataset for policy learning. During the training phase, the diffusion model acquires prior knowledge from the limited target data. During evaluation, this prior is utilized to filter out task-irrelevant information, retaining only the pertinent skill knowledge from the source trajectory for the target task.
weaknesses: i) This model primarily relies on the diffusion model for transferring source data to target data as a form of data augmentation. However, the lack of a theoretical foundation raises concerns about the novelty of this approach, despite the authors' detailed trajectory modeling in the embedding space using neural networks. Therefore, I suggest that the authors conduct a theoretical analysis to elucidate how the diffusion model minimizes the distance between the source data and target data through transformations applied to the source data at the trajectory level. Subsequently, they can theoretically expound on how these minimized distances influence the policy's performance compared to scenarios without data transformations facilitated by the diffusion model.


ii) This work exhibits superiority in scenarios where the source and target domains share similar skill knowledge. My concern is the success of this method may partially stem from the fact that skills inherent in the source data can inspire skill acquisition for the target task. In practical applications, various types of source data are available, and it may not be clear which sources can expedite learning for the target data. It remains uncertain in this study whether the diffusion model-based trajectory editing can effectively handle "bad" samples within the source data for the target task. Therefore, I recommend that the authors test their method on source domains with varying degrees of similarity in skills to the target domain, or assess how the method performs when presented with a combination of pertinent and extraneous source data.


iii) A minor suggestion is to increase the font size in Fig.1 and Fig.2 for improved readability.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. Please address the major points and minor points above.
2. How does xTED handle/extend to learning between source-target embodiments with different dimensionality and kinematics? (e.g., robot hand with gripper and hand with 3-4 fingers)
   - This question would shed light on fundamental limitations, leading to valuable insights about the method's generalizability and potential future research directions.
soundness: 1
strengths: 1. According to the extensive experiment results, it seems the following intuitions are valid:
    - separating sequence models with causality interactions for states, actions, and rewards captures their dynamics structures better.
    - injecting noisy source trajectories into the target denoising process as a form of "augmenting diffusion" increases learning performance (Table 1). This could be a good insight into data augmentation for diffusion models.
summary: The paper addresses cross-domain trajectory adaptation for RL/imitation learning settings, focusing on improving policy learning from data with significant domain gaps, such as those in dynamics, morphology, or visual properties. The authors propose xTED (Cross-Domain Trajectory Editing), a diffusion model-based framework that "edits" source domain trajectories to align with target domain characteristics. The model architecture encodes state, action, and reward sequences separately to maintain dependencies and temporal consistency in trajectories, followed by a denoising process that adapts source trajectories to fit the target domain. The novelty lies in proposing an intuitive sequencing model architecture and introducing regulated noisy source trajectories for training target diffusion models.

The evaluation includes simulation-based experiments in MuJoCo environments (e.g., Walker2d-v2, HalfCheetah-v2) and real-world robotic manipulation tasks. In these experiments, xTED's performance is compared with baselines using success rate, normalized score, and cumulative reward as metrics. Baselines include direct policy learning on target data, using unprocessed source data, and traditional data augmentation techniques.
weaknesses: **Major points**

1. The main concern is the lack of theoretical investigation of introducing the noisy source trajectories to train the target diffusion model, despite the claim: "this noised initialization theoretically yields favorable results by solving the reverse stochastic differential equation." on Line 276. "Editing" process described in Sec. 4.2. does not form a backward (denoising) process since the noisy source trajectories are not obviously Brownian noise, hence the convergence results [3] do not apply. xTED should be clarified on how it differs from standard diffusion processes and its implications for convergence guarantees. Then, the authors should:
   - provide a rigorous theoretical analysis of xTED or,
   - explicitly state the limitations of applying existing theoretical results [3] on xTED.

2. No assumptions are made about the dimensionality or (domain) structure of source-target state/action trajectories, including states, actions, and rewards. This information is crucial to understanding the scope of cross-domain learning and theoretical understanding of the denoising process with noisy source trajectories. The authors should explicitly state any assumptions on the structure and dimensionality of the source and target domains and discuss how these assumptions impact the applicability and performance of xTED (e.g., how xTED might need to be adapted for domains with different structures or dimensionalities, etc.)

3. Connecting to "imaging editing" is confusing with this paper's formulation. The author should consider revising their framing of the method, by providing a more direct explanation of how they augment the target denoising process with noise-regulated source trajectories. Perhaps a brief explanation to motivate the connection to image editing should be provided.

**Minor points**

4. Sec 2.2 should additionally cite [1, 2] as they formulate diffusion models for smooth trajectories, which are relevant to this paper's claims.
5. There is a typo in Eq. 4. There should be a minus between the $\mu$s.
6. While Sec 4.2 is relatively understandable after carefully reading, it would be much clearer if a small visualization for Sec. 4.2 is presented similarly to Fig. 2. For example, a high-level intuition drawing of the training target diffusion model with noises as perturbed source trajectories.

[1] Carvalho, Joao, et al. "Motion planning diffusion: Learning and planning of robot motions with diffusion models." 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2023.

[2] Luo, Yunhao, et al. "Potential based diffusion motion planning." ICML (2024).

[3] De Bortoli, Valentin. "Convergence of denoising diffusion models under the manifold hypothesis." TMLR (2022).

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 3
questions: - If the model learns to edit random datasets from the source domain into expert datasets in the target domain, distributional discrepancies could lead to significant issues. Are there any experimental results or discussions addressing this potential problem in the paper?
- In Table 2, Reducing the amount of target data actually leads to improved performance. Why does performance increase with less data usage?
soundness: 2
strengths: - The paper is well-structured and easy to follow, making the proposed method and experimental results accessible to readers.
- The framework is presented with thorough detail, and a clear understanding of the experimental setup.
summary: The paper introduces xTED, a cross-domain adaptation framework that applies a diffusion-based approach to edit trajectories from source domains, enabling them to better align with the target domain's dynamics. Through extensive simulations and real-robot experiments, xTED demonstrates enhanced policy learning efficiency, particularly by improving performance.
weaknesses: - The effectiveness of the xTED methodology proposed in this paper is questionable, given that there is a considerable overlap in confidence intervals with baselines (Tgt + Src), suggesting similar performance levels. In particular, in Table 1, a significant portion of the results shows comparable performance to the datasets composition approach, with confidence intervals entirely overlapping for all results in the Walk2D environment.
- There is insufficient comparison with SOTA baselines. It seems necessary to include comparisons with methods that integrate cross-domain environments in Offline RL, such as [1, 2]. The studies in [1, 2] include experiments that are particularly similar to those conducted in this paper. Although the problem setups are not entirely identical, cross-domain RL approaches, as explored in [3, 4], are also worth considering for comparison.

[1] Liu, Jinxin, Hongyin Zhang, and Donglin Wang. "Dara: Dynamics-aware reward augmentation in offline reinforcement learning." *arXiv preprint arXiv:2203.06662* (2022).

[2] Liu, Jinxin, et al. "Beyond ood state actions: Supported cross-domain offline reinforcement learning." *Proceedings of the AAAI Conference on Artificial Intelligence*. Vol. 38. No. 12. 2024.

[3] Rao, Kanishka, et al. "Rl-cyclegan: Reinforcement learning aware simulation-to-real." *Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition*. 2020.

[4] Raychaudhuri, Dripta S., et al. "Cross-domain imitation from observations." *International Conference on Machine Learning*. PMLR, 2021.

Meta-review: **summary**

The paper introduces xTED, a diffusion model-based framework for adapting source domain trajectories to align with target domain characteristics, addressing challenges in RL and IL where domain gaps exist (e.g., in dynamics, observations, or agent embodiments). xTED first trains a diffusion model on limited target domain data, then applies noise to source domain trajectories before denoising them to generate target-aligned trajectories. The authors also propose a new architecture, which separately encodes state, action, and reward sequences via self-attention. Extensive experiments on both simulated environments (e.g., MuJoCo tasks with varying dynamics) and real-world robotic manipulation tasks demonstrate that xTED outperforms baselines.

**strengths**

* The paper is clearly written
* Extensive evaluation results 

**weaknesses**

* The paper does not compare xTED against sufficiently robust or diverse baselines, limiting the strength of its empirical validation. Also, the overlapping confidence intervals in the evaluation results raise concerns about the statistical significance of the reported improvements.
* The experiments do not explore varying degrees of similarity between source and target domains or scenarios with mixed relevant and extraneous source data, which would provide deeper insights into the method's robustness.

**decision**

Despite its simplicity,  it is difficult to say that the contributions of this work are very significant due to several limitations listed in **weaknesses**. I recommend that the authors address these concerns and consider resubmitting to another venue.

Decision: Reject