SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.04152 · NeurIPS · 2021

PlayVirtual: Augmenting Cycle-Consistent Virtual Trajectories for Reinforcement Learning

Tao Yu, Wenjun Zeng, Cuiling Lan, Mingxiao Feng, Zhizheng Zhang, Zhibo Chen

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.04152.json · badge: /api/ran/2106.04152.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
microsoft/Playvirtual canonical (classifier label)
classifier basis: classifier_2025
7 ran · 2 no recorded run
FunctionStatusWhere it lives
DeterministicTransitionModel Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("cd7be639261c9743")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DeterministicTransitionModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define the arguments for DeterministicTransitionModel
encoder_feature_dim = 8
action_shape = (4,)  # tuple with one element for action dimension
layer_width = 16

ARGS = {
    'encoder_feature_dim': encoder_feature_dim,
    'action_shape': action_shape,
    'layer_width': layer_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DeterministicTransitionModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DeterministicTransitionModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EnsembleOfProbabilisticTransitionModels Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("919cc27e1f7bec1a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EnsembleOfProbabilisticTransitionModels: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import random

torch.manual_seed(0)

ARGS = {
    'encoder_feature_dim': 4,
    'action_shape': (3,),
    'layer_width': 8,
    'ensemble_size': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EnsembleOfProbabilisticTransitionModels — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EnsembleOfProbabilisticTransitionModels output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Intensity Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("47eb7a1f0d54ebc9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Intensity: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "scale": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Intensity — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Intensity output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ProbabilisticTransitionModel Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("ca2bcd390a7015f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ProbabilisticTransitionModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define parameters for ProbabilisticTransitionModel
encoder_feature_dim = 5
action_shape = (3,)  # action_shape[0] will be 3
layer_width = 8
announce = True
max_sigma = 10.0
min_sigma = 0.0001

# Construct ARGS dictionary with all parameters
ARGS = {
    'encoder_feature_dim': encoder_feature_dim,
    'action_shape': action_shape,
    'layer_width': layer_width,
    'announce': announce,
    'max_sigma': max_sigma,
    'min_sigma': min_sigma
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ProbabilisticTransitionModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ProbabilisticTransitionModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
infer_leading_dims Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("75457f2cc20c83c7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Test case 1: tensor with 2 leading dims (T, B) + 1 data dim
# Total dims = 3, data dims = 1, leading dims = 2
tensor_2lead = torch.randn(5, 3, 4)  # T=5, B=3, data_dim=4

# Test case 2: tensor with 1 leading dim (B,) + 2 data dims
# Total dims = 3, data dims = 2, leading dims = 1
tensor_1lead = torch.randn(3, 4, 5)  # B=3, data_dims=(4,5)

# Test case 3: tensor with 0 leading dims + 2 data dims
# Total dims = 2, data dims = 2, leading dims = 0
tensor_0lead = torch.randn(4, 5)  # data_dims=(4,5)

# Test various dim values
dim_value_1 = 1
dim_value_2 = 2

# Create ARGS for different test cases
# Using the first test case as primary
ARGS = {
    "tensor": tensor_2lead,
    "dim": dim_value_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_transition_model Ran
ran; our contract draft was wrong, not the code
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("073c59b3ce3faba4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DeterministicTransitionModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import random

torch.manual_seed(0)

ARGS = {
    'transition_model_type': 'deterministic',
    'encoder_feature_dim': 8,
    'action_shape': (3,),
    'layer_width': 64,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DeterministicTransitionModel — a DeterministicTransitionModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DeterministicTransitionModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
maybe_transform Ran
ran; our contract draft was wrong, not the code
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("6d9d0866b2ff715e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleTransform(nn.Module):
    def forward(self, x):
        return x * 2.0

class AltTransform(nn.Module):
    def forward(self, x):
        return x * 0.5

transform = SimpleTransform()
alt_transform = AltTransform()
image = torch.randn(2, 3, 4, 5)

ARGS = {
    "image": image,
    "transform": transform,
    "alt_transform": alt_transform,
    "p": 0.8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CycDM Not yet run
unverified (harvested, no recorded run)
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("1326074065aabbdd")
How it ran

no invocation recorded.

to_categorical Not yet run
unverified (harvested, no recorded run)
microsoft/Playvirtual/DMControl/src/cycdm_sac.py
code served (permissive licence) · get_code("58d78f74ec58f2fc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
Intensity
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2201.12096 (2022-01)
Mask-based Latent Reconstruction for Reinforcement Learning
infer_leading_dims
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2310.17537 (2023-10)
Neuro-Inspired Fragmentation and Recall to Overcome Catastrophic Forgetting in Curiosity
maybe_transform
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2201.12096 (2022-01)
Mask-based Latent Reconstruction for Reinforcement Learning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Learning good feature representations is important for deep reinforcement learning (RL). However, with limited experience, RL often suffers from data inefficiency for training. For un-experienced or less-experienced trajectories (i.e., state-action sequences), the lack of data limits the use of them for better feature learning. In this work, we propose a novel method, dubbed PlayVirtual, which augments cycle-consistent virtual trajectories to enhance the data efficiency for RL feature representation learning. Specifically, PlayVirtual predicts future states in the latent space based on the current state and action by a dynamics model and then predicts the previous states by a backward dynamics model, which forms a trajectory cycle. Based on this, we augment the actions to generate a large amount of virtual state-action trajectories. Being free of groudtruth state supervision, we enforce a trajectory to meet the cycle consistency constraint, which can significantly enhance the data efficiency. We validate the effectiveness of our designs on the Atari and DeepMind Control Suite benchmarks. Our method achieves the state-of-the-art performance on both benchmarks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2106.04152")
get_code_for_paper("2106.04152")
have("2106.04152")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.04152.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.04152.svg)](https://syntology.ai/paper/2106.04152)

Connect an agent — have() is free.