SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.20700 · 2026

mmWave-Diffusion:A Novel Framework for Respiration Sensing Using Observation-Anchored Conditional Diffusion Model

Yong Wang, Zijun Huang, Shuai Yao, Bao Zhang, Qifan Shen, Chengbo Zhu, Qisong Wu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 1 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/2603.20700.json · badge: /api/ran/2603.20700.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
goodluckyongw/mmWave-Diffusion community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
FinalLayer Ran
ran on a synthesized input · constructed an object; no result was computed
goodluckyongw/mmWave-Diffusion/network.py
code served (permissive licence) · get_code("28b45f22cc03a722")
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

torch.manual_seed(0)

# Define ARGS dict with all parameters for FinalLayer.__init__
ARGS = {
    'hidden_size': 4,
    'patch_size': 3,
    'out_channels': 2,
}

# Verify the setup by instantiating and running forward pass
if __name__ == "__main__":
    model = nn.Module()
    model.__class__ = type('FinalLayer', (nn.Module,), {
        '__init__': lambda self, hidden_size, patch_size, out_channels: (
            super(type(self), self).__init__(),
            setattr(self, 'norm_final', nn.LayerNorm(hidden_size, elementwise_affine=True, eps=1e-06)),
            setattr(self, 'linear', nn.Linear(hidden_size, patch_size * out_channels, bias=True)),
            setattr(self, 'adaLN_modulation', nn.Sequential(nn.SiLU(), nn.Linear(hidden_size, 2 * hidden_size, bias=True))),
            setattr(self, 'patch_size', patch_size),
            setattr(self, 'out_channels', out_channels),
        )[-1]
    })
    
    final_layer = nn.Module()
    final_layer.norm_final = nn.LayerNorm(ARGS['hidden_size'], elementwise_affine=True, eps=1e-06)
    final_layer.linear = nn.Linear(ARGS['hidden_size'], ARGS['patch_size'] * ARGS['out_channels'], bias=True)
    final_layer.adaLN_modulation = nn.Sequential(nn.SiLU(), nn.Linear(ARGS['hidden_size'], 2 * ARGS['hidden_size'], bias=True))
    final_layer.patch_size = ARGS['patch_size']
    final_layer.out_channels = ARGS['out_channels']
    
    # Create sample inputs
    B, T, C = 2, 5, ARGS['hidden_size']
    x = torch.randn(B, T, C)
    t = torch.randn(B, ARGS['hidden_size'])
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 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
RDTBlock Ran
ran on a synthesized input · constructed an object; no result was computed
goodluckyongw/mmWave-Diffusion/network.py
code served (permissive licence) · get_code("f15ff5ed667f8404")
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, RDTBlock: 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)

def modulate(x: torch.Tensor, shift: torch.Tensor, scale: torch.Tensor) -> torch.Tensor:
    """
    x: [B, T, C]; shift/scale: [B, C]
    """
    return x * (1 + scale.unsqueeze(1)) + shift.unsqueeze(1)

class RDTBlock(nn.Module):

    def __init__(self, hidden_size: int, num_heads: int, mlp_ratio: float=4.0):
        super().__init__()
        self.hidden_size = hidden_size
        self.norm1 = nn.LayerNorm(hidden_size, elementwise_affine=True, eps=1e-06)
        self.self_attn = nn.MultiheadAttention(hidden_size, num_heads, batch_first=True)
        self.norm_cross = nn.LayerNorm(hidden_size, elementwise_affine=True, eps=1e-06)
        self.cross_attn = nn.MultiheadAttention(hidden_size, num_heads, batch_first=True)
        self.cross_gate = nn.Parameter(torch.tensor(0.0))
        self.norm2 = nn.LayerNorm(hidden_size, elementwise_affine=True, eps=1e-06)
        mlp_hidden = int(hidden_size * mlp_ratio)
        self.mlp = nn.Sequential(nn.Linear(hidden_size, mlp_hidden, bias=True), nn.GELU(approximate='tanh'), nn.Linear(mlp_hidden, hidden_size, bias=True))
        self.adaLN_modulation = nn.Sequential(nn.SiLU(), nn.Linear(hidden_size, 9 * hidden_size, bias=True))
        self._init_zero()

    def _init_zero(self):
        nn.init.zeros_(self.self_attn.out_proj.weight)
        if self.self_attn.out_proj.bias is not None:
            nn.init.zeros_(self.self_attn.out_proj.bias)
        nn.init.zeros_(self.cross_attn.out_proj.weight)
        if self.cross_attn.out_proj.bias is not None:
            nn.init.zeros_(self.cross_attn.out_proj.bias)
        last_linear = self.mlp[2]
        nn.init.zeros_(last_linear.weight)
        if last_linear.bias is not None:
            nn.init.zeros_(last_linear.bias)

    def forward(self, x: torch.Tensor, context: torch.Tensor, t: torch.Tensor, cross_attn_mask: torch.Tensor | None=None) -> torch.Tensor:
        shift_msa, scale_msa, gate_msa, shift_cross, scale_cross, gate_cross, shift_mlp, scale_mlp, gate_mlp = self.adaLN_modulation(t).chunk(9, dim=1)
        x_norm1 = modulate(self.norm1(x), shift_msa, scale_msa)
        attn_out, _ = self.self_attn(x_norm1, x_norm1, x_norm1, need_weights=False)
        x = x + torch.tanh(gate_msa).unsqueeze(1) * attn_out
        x_norm_cross = modulate(self.norm_cross(x), shift_cross, scale_cross)
        cross_out, _ = self.cross_attn(x_norm_cross, context, context, attn_mask=cross_attn_mask, need_weights=False)
        cross_scale = torch.tanh(self.cross_gate) * torch.tanh(gate_cross).unsqueeze(1)
        x = x + cross_scale * cross_out
        x_mlp_in = modulate(self.norm2(x), shift_mlp, scale_mlp)
        x = x + torch.tanh(gate_mlp).unsqueeze(1) * self.mlp(x_mlp_in)
        return x

ARGS = {
    "hidden_size": 4,
    "num_heads": 2,
    "mlp_ratio": 4.0,
}
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 RDTBlock — 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 RDTBlock 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
goodluckyongw/mmWave-Diffusion/network.py
code served (permissive licence) · get_code("3de4521f63c4adbf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 math
import torch
import torch.nn as nn

class TimestepEmbedder(nn.Module):

    def __init__(self, hidden_size: int, frequency_embedding_size: int=256):
        super().__init__()
        self.hidden_size = hidden_size
        self.frequency_embedding_size = frequency_embedding_size
        self.mlp = nn.Sequential(nn.Linear(frequency_embedding_size, hidden_size), nn.SiLU(), nn.Linear(hidden_size, hidden_size))

    @staticmethod
    def timestep_embedding(timesteps: torch.Tensor, dim: int, max_period: float=10000.0) -> torch.Tensor:
        """Create sinusoidal timestep embeddings (PyTorch diffusion standard)."""
        half = dim // 2
        device = timesteps.device
        exponent = -math.log(max_period) * torch.arange(half, device=device) / half
        freq = torch.exp(exponent)
        args = timesteps.float()[:, None] * freq[None]
        embedding = torch.cat([torch.cos(args), torch.sin(args)], dim=-1)
        if dim % 2 == 1:
            embedding = torch.cat([embedding, torch.zeros_like(embedding[:, :1])], dim=-1)
        return embedding

    def forward(self, t: torch.Tensor) -> torch.Tensor:
        t_freq = self.timestep_embedding(t, self.frequency_embedding_size)
        return self.mlp(t_freq)


INIT_ARGS = {
    "hidden_size": 64,
    "frequency_embedding_size": 32,
}

ARGS = {
    "t": torch.tensor([0, 5], dtype=torch.long),
}

if __name__ == "__main__":
    embedder = TimestepEmbedder(**INIT_ARGS)
    output = embedder(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
modulate Ran
ran; our contract draft was wrong, not the code
goodluckyongw/mmWave-Diffusion/network.py
code served (permissive licence) · get_code("b39a0ec04592a909")
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 3, dtype family float, shape (2, 3, 4) 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

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# x: [B, T, C] where B=batch, T=sequence length, C=channels
B, T, C = 2, 3, 4
x = torch.randn(B, T, C)

# shift: [B, C]
shift = torch.randn(B, C)

# scale: [B, C]
scale = torch.randn(B, C)

ARGS = {
    "x": x,
    "shift": shift,
    "scale": scale,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) 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
RDT Not yet run
unverified (harvested, no recorded run)
goodluckyongw/mmWave-Diffusion/network.py
code served (permissive licence) · get_code("6dd0ed646acc6c0a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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, 1 later) and 4 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
modulate
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later
2407.15811 (2024-07)
Stretching Each Dollar: Diffusion Training from Scratch on a Micro-Budget
2605.07193 (2026-05)
Coupling Models for One-Step Discrete Generation
2608.27066 (2026-08)
Beyond Classification: Task-Dependent Learnability under Privacy-Motivated Image Transformations

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

Millimeter-wave (mmWave) radar enables contactless respiratory sensing, yet fine-grained monitoring is often degraded by nonstationary interference from body micromotions. To achieve micromotion interference removal, we propose mmWave-Diffusion, an observation-anchored conditional diffusion framework that directly models the residual between radar phase observations and the respiratory ground truth, and initializes sampling within an observation-consistent neighborhood rather than from Gaussian noise-thereby aligning the generative process with the measurement physics and reducing inference overhead. The accompanying Radar Diffusion Transformer (RDT) is explicitly conditioned on phase observations, enforces strict one-to-one temporal alignment via patch-level dual positional encodings, and injects local physical priors through banded-mask multi-head cross-attention, enabling robust denoising and interference removal in just 20 reverse steps. Evaluated on 13.25 hours of synchronized radar-respiration data, mmWave-Diffusion achieves state-of-the-art waveform reconstruction and respiratory-rate estimation with strong generalization. Code repository: https://github.com/goodluckyongw/mmWave-Diffusion.

For agents

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

get_harvested_code_for_paper("2603.20700")
get_code_for_paper("2603.20700")
have("2603.20700")

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

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

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

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

Connect an agent — have() is free.