SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.08414 · ICML · 2026

PACT: Self-Evolving Physical Safety Alignment for Diffusion Policies in Embodied Manipulation

Jun Zhu, Xiao Yang, Chengyang Ying, Huayu Chen, Fangming Liu, Lingxuan Wu, Zijian Zhu, Lizhong Wang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 9 no recorded run), measured 2026-11-23; 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/2606.08414.json · badge: /api/ran/2606.08414.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
robotwin-Platform/RoboTwin canonical (classifier label)
classifier basis: census
1 ran · 6 no recorded run
thu-ml/RDT2 community
Papers with Code archive
8 ran · 3 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("b997b9a544314ad1")
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, Attention: 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 math

torch.manual_seed(0)

# Define the config dictionary with all required parameters
config = {
    'num_heads': 2,
    'num_kv_heads': 2,
    'hidden_size': 8,
    'norm_eps': 1e-6,
    'use_flash_attn': False,
}

# Create input tensor
# Shape: (batch_size, seq_len, hidden_size)
# Using small dimensions: batch=2, seq_len=3, hidden_size=8
x = torch.randn(2, 3, 8)

ARGS = {
    'config': config,
}
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 Attention — 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 Attention 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
FeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("12d05605f5f9a64f")
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, FeedForward: 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 = {
    "dim": 64,
    "hidden_dim": 128,
    "multiple_of": 16,
    "ffn_dim_multiplier": 1.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 FeedForward — 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 FeedForward 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
FinalLayer Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("14abdaa97f983a0c")
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, FinalLayer: 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
from timm.models.vision_transformer import Mlp

torch.manual_seed(0)

# Define config dict with required keys
config = {
    'hidden_size': 8,
    'norm_eps': 1e-6,
}

# Define output_size
output_size = 6

# Create ARGS dict mapping all parameters of FinalLayer.__init__
ARGS = {
    'output_size': output_size,
    'config': config,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FinalLayer — 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 FinalLayer 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
RMSNorm Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("e1daa20aa3ecf380")
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, RMSNorm: 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)

# Construct arguments for RMSNorm
# The __init__ method takes: dim (int) and eps (float, default=1e-06)
# The forward method expects x to be a tensor with shape (..., dim)

dim = 4
eps = 1e-6

ARGS = {
    "dim": dim,
    "eps": eps,
}
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 RMSNorm — 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 RMSNorm 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
TimestepEmbedder Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("8a78680b9fb2d022")
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, TimestepEmbedder: 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 math

torch.manual_seed(0)

# The TimestepEmbedder class expects:
# - hidden_size: int - dimension of hidden layers in the MLP
# - frequency_embedding_size: int (default 256) - dimension of frequency embeddings
# - dtype: torch.dtype (default torch.bfloat16) - data type for computations

ARGS = {
    "hidden_size": 64,
    "frequency_embedding_size": 256,
    "dtype": torch.bfloat16,
}
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 TimestepEmbedder — 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 TimestepEmbedder 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
encode_image Ran
ran; our contract draft was wrong, not the code
robotwin-Platform/RoboTwin/code_gen/observation_agent.py
code served (permissive licence) · get_code("73c070397fc27811")
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 str. 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 base64
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, "test_image.png")

# Write a minimal valid PNG file (1x1 transparent pixel)
png_data = base64.b64decode(
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
)
with open(image_path, 'wb') as f:
    f.write(png_data)

ARGS = {
    "image_path": image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_1d_sincos_pos_embed_from_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("06a688b14731d363")
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 ndarray, ndim 2, dtype family float, shape (5, 8) 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define arguments for get_1d_sincos_pos_embed_from_grid
embed_dim = 8  # Must be even; small value for testing
pos = np.array([0.0, 1.0, 2.0, 3.0, 4.0])  # Array of 5 positions

ARGS = {
    "embed_dim": embed_dim,
    "pos": pos,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 8) — shape (5, 8) 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
get_multimodal_pos_embed Ran
ran, honoured the contract we drafted
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("bee6b72001174b29")
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 ndarray, ndim 2, dtype family float, shape (19, 8) 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 numpy as np
from collections import OrderedDict

# Set random seed for reproducibility
np.random.seed(0)

# Define arguments for get_multimodal_pos_embed
ARGS = {
    "embed_dim": 8,  # Must be even for sincos embedding
    "mm_lens": OrderedDict([
        ("image", (4, 3)),  # 2D image grid with shape (4, 3)
        ("text", 5),        # 1D text modality with 5 tokens
        ("audio", 2)        # 1D audio modality with 2 tokens
    ])
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (19, 8) — shape (19, 8) 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
get_nd_sincos_pos_embed_from_grid Ran
ran; our contract draft was wrong, not the code
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("9c96aca8064e1fc6")
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 ndarray, ndim 4, dtype family float, shape (4, 3, 2, 8) 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 numpy as np

ARGS = {
    "embed_dim": 8,
    "grid_sizes": (4, 3, 2),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (4, 3, 2, 8) — shape (4, 3, 2, 8) 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
CrossAttention Not yet run
unverified (harvested, no recorded run)
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("071967d102ce1b68")
How it ran

no invocation recorded.

RDT Not yet run
unverified (harvested, no recorded run)
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("b22f96d363b1e373")
How it ran

no invocation recorded.

RDTBlock Not yet run
unverified (harvested, no recorded run)
thu-ml/RDT2/models/rdt/model.py
code served (permissive licence) · get_code("15ae629e0aaf85dd")
How it ran

no invocation recorded.

generate_code Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation.py
code served (permissive licence) · get_code("b3a57bcb8e8f5a04")
How it ran

no invocation recorded.

generate_code Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation_mm.py
code served (permissive licence) · get_code("3468f78120466b2b")
How it ran

no invocation recorded.

generate_code_once Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation_simple.py
code served (permissive licence) · get_code("bfd5ac5e95b7e7ce")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation.py
code served (permissive licence) · get_code("39b0deb7b86b112d")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation_mm.py
code served (permissive licence) · get_code("0712e9a6f1819e1d")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
robotwin-Platform/RoboTwin/code_gen/task_generation_simple.py
code served (permissive licence) · get_code("ab268ff8e80c132c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 17 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
encode_image 76 other papers
76 dated earlier
2309.05950 (2023-09)
Language Models as Black-Box Optimizers for Vision-Language Models
2311.15732 (2023-11)
GPT4Vis: What Can GPT-4 Do for Zero-shot Visual Recognition?
2312.14867 (2023-12)
VIEScore: Towards Explainable Metrics for Conditional Image Synthesis Evaluation
and 73 more not named here

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-23.

Repositories linked to this paper

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

Abstract

Diffusion policies have achieved remarkable success in robotic manipulation, yet they often fail to satisfy strict physical constraints required for safe deployment. Existing approaches impose safety either prematurely during training or reactively via external guardrails at test time, limiting policy expressivity and overall scalability. We propose Physical safety Alignment for Constrained Trajectories (PACT), a self-evolving posttraining framework that projects pretrained diffusion policies onto constraint-feasible regions without accessing demonstration data or task rewards. PACT distills constraint gradients into the diffusion model through a reverse-KL objective with dense supervision across timesteps. It incorporates a curriculum that progressively tightens constraints while maintaining theoretically bounded policy shift and monotone improvement, mitigating the safety-performance trade-off from catastrophic forgetting. On simulated and real-world embodied manipulation benchmarks, PACT significantly reduces safety violations by 31.0% on average while improving task success by 30.7%. 1

For agents

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

get_harvested_code_for_paper("2606.08414")
get_code_for_paper("2606.08414")
have("2606.08414")

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

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

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

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

Connect an agent — have() is free.