SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.14796 · 2024

PASSION: Towards Effective Incomplete Multi-Modal Medical Image Segmentation with Imbalanced Missing Rates

arXiv · PDF · Open in the Atlas

Code that ran

15 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 12 failures of our instrument; 1 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/2407.14796.json · badge: /api/ran/2407.14796.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
jun-jie-shi/passion canonical (classifier label)
classifier basis: census
15 ran · 1 no recorded run
FunctionStatusWhere it lives
Js_div Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/lr_scheduler.py
code served (permissive licence) · get_code("4c2097366a0c9a24")
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 0, dtype family float, shape () 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)

# Create small probability tensors for p and q
# They need to support .log() method and arithmetic operations
# Shape: (2, 4) for batch size 2, dimension 4
p = torch.nn.functional.softmax(torch.randn(2, 4), dim=1)
q = torch.nn.functional.softmax(torch.randn(2, 4), dim=1)

# KLDivLoss is a callable that takes two arguments
# Looking at the function body: KLDivLoss(log_pq, p) and KLDivLoss(log_pq, q)
# This expects a loss function that computes KL divergence
KLDivLoss = nn.KLDivLoss(reduction='batchmean')

ARGS = {
    'p': p,
    'q': q,
    'KLDivLoss': KLDivLoss
}
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 0, dtype family float, shape () — shape () 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
crop Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jun-jie-shi/passion/code/preprocessing/preprocess_brats.py
code served (permissive licence) · get_code("fb26dcccfaf8fbc6")
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, ndim 1, dtype family int; 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 numpy as np

# Create a small 3D volume with some non-zero values
# Shape: (10, 12, 14) - distinct dimensions for each axis
vol = np.zeros((10, 12, 14), dtype=np.float32)

# Add some non-zero values in the middle to create a region to crop
vol[2:8, 3:9, 4:11] = 1.0

ARGS = {
    'vol': vol
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
dice_loss Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/criterions.py
code served (permissive licence) · get_code("672eefec7e9131bc")
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 0, dtype family float, shape () 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)

# Create small output and target tensors
# Shape: (batch=2, channels=5, depth=4, height=3, width=3)
output = torch.rand(2, 5, 4, 3, 3)
target = torch.randint(0, 2, (2, 5, 4, 3, 3))

# Create a simple upsampling operation (optional)
up_op = nn.Upsample(scale_factor=1.0, mode='nearest')

ARGS = {
    'output': output,
    'target': target,
    'num_cls': 5,
    'eps': 1e-07,
    'up_op': up_op
}
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 0, dtype family float, shape () — shape () 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
dice_loss_bs Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/criterions.py
code served (permissive licence) · get_code("873433db15bc1e4d")
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 2, dtype family float, shape (2, 1) 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)

# Construct tiny tensors for 5D input (batch, channels, depth, height, width)
batch_size = 2
num_channels = 5
spatial_dims = (4, 3, 3)  # depth, height, width - keep small

# output: (batch, num_cls, d, h, w) - logits or predictions
output = torch.randn(batch_size, num_channels, *spatial_dims)

# target: (batch, num_cls, d, h, w) - binary or soft labels
target = torch.randint(0, 2, (batch_size, num_channels, *spatial_dims)).float()

# num_cls parameter
num_cls = 5

# eps parameter for numerical stability
eps = 1e-07

# up_op: optional upsampling operation
# The function checks `if up_op:` and calls `up_op(output)`
# Create a simple identity upsampling module
class IdentityUpsampler(nn.Module):
    def forward(self, x):
        return x

up_op = IdentityUpsampler()

ARGS = {
    "output": output,
    "target": target,
    "num_cls": num_cls,
    "eps": eps,
    "up_op": up_op
}
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 2, dtype family float, shape (2, 1) — shape (2, 1) 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_params Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/lr_scheduler.py
code served (permissive licence) · get_code("d51dae9ac1ba0359")
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, ndim 1, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class AttentionModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(4, 4))
        self.bias = nn.Parameter(torch.randn(4))

class FusionConv(nn.Module):
    def __init__(self):
        super().__init__()
        self.attention = AttentionModule()
        self.conv = nn.Conv2d(4, 4, 3)

class Abstraction(nn.Module):
    def __init__(self):
        super().__init__()
        self.fusion_conv = FusionConv()
        self.other_param = nn.Parameter(torch.randn(4, 3))

class DecoderAll(nn.Module):
    def __init__(self):
        super().__init__()
        self.abstraction1 = Abstraction()
        self.abstraction2 = Abstraction()
        self.abstraction3 = Abstraction()
        self.abstraction4 = Abstraction()

class ModuleWrapper(nn.Module):
    def __init__(self):
        super().__init__()
        self.decoder_all = DecoderAll()
        self.base_conv = nn.Conv2d(4, 4, 1)

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.module = ModuleWrapper()

model = Model()

ARGS = {
    'model': model
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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_temperature Ran
ran, honoured the contract we drafted
jun-jie-shi/passion/code/utils/lr_scheduler.py
code served (permissive licence) · get_code("2675ee5f110411e2")
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 int, ndim 0, dtype family int, shape () 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)

ARGS = {
    "epoch": 15
}
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 int, ndim 0, dtype family int, shape () — shape () 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
mask_gen_cross4 Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/models/mask.py
code served (permissive licence) · get_code("7f3257ab27f6ac4d")
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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - Batchsize: int (used for range but not directly)
# - K: int (used in attn_shape tuple)
# - C: int (used in attn_shape tuple and for slicing)
# - mask: torch tensor with size(0) for batch size, and indexing mask[j][i] where i in range(4)
#   So mask needs shape (bs, 4) with values 0 or 1

Batchsize = 2
K = 3
C = 4

# mask needs to be a tensor with shape (2, 4) - batch size 2, 4 positions
# Values should be 0 or 1 to control masking
mask = torch.tensor([[1, 0, 1, 0], 
                     [1, 1, 0, 1]], dtype=torch.long)

ARGS = {
    "Batchsize": Batchsize,
    "K": K,
    "C": C,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
mask_gen_fusion Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/models/mask.py
code served (permissive licence) · get_code("35e8e3aef9fcc772")
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, 24, 24) 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - Batchsize: integer for batch size
# - NumHead: integer for number of heads
# - patches: integer for number of patches
# - NumClass: integer for number of classes
# - mask: torch tensor of shape (bs, NumClass) with binary values
#   The function accesses mask[j][i] and mask.size(0)

Batchsize = 2
NumHead = 3
patches = 4
NumClass = 5

# mask should be a tensor of shape (Batchsize, NumClass) with binary values
mask = torch.randint(0, 2, (Batchsize, NumClass))

ARGS = {
    "Batchsize": Batchsize,
    "NumHead": NumHead,
    "patches": patches,
    "NumClass": NumClass,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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, 24, 24) — shape (2, 3, 24, 24) 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
nchwd2nlc2nchwd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jun-jie-shi/passion/code/models/blocks.py
code served (permissive licence) · get_code("c7dfb8d3e7844879")
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 5, dtype family float, shape (2, 4, 3, 5, 7) 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)

# Create a simple module that processes (B, L, C) shaped input
class SimpleModule(nn.Module):
    def __init__(self, in_features):
        super().__init__()
        self.linear = nn.Linear(in_features, in_features)
    
    def forward(self, x):
        # x shape: (B, L, C) where L = H*W*D and C is the channel dimension
        return self.linear(x)

# Create input tensor with shape (B, C, H, W, D)
# Using distinct sizes: B=2, C=4, H=3, W=5, D=7
x = torch.randn(2, 4, 3, 5, 7)

# Create module that expects input of shape (B, H*W*D, C)
# After flattening and transposing, the last dimension will be C=4
module = SimpleModule(in_features=4)

ARGS = {
    'module': module,
    'x': x
}
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 5, dtype family float, shape (2, 4, 3, 5, 7) — shape (2, 4, 3, 5, 7) 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
normalization Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/models/blocks.py
code served (permissive licence) · get_code("268e21ea88a8ccb1")
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 BatchNorm3d. 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 = {
    'planes': 16,
    'norm': 'bn'
}
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 BatchNorm3d — a BatchNorm3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNorm3d 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
normalize Ran
ran, violated the contract we drafted
jun-jie-shi/passion/code/preprocessing/preprocess_brats.py
code served (permissive licence) · get_code("8ee9fb4494c15e91")
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 (4, 3, 2, 2) 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 numpy as np

torch.manual_seed(0)

# The function expects a tensor 'vol' with shape (4, ...) where:
# - First dimension has size 4 (the k dimension in the loop)
# - It performs operations: sum(0), indexing [k, ...], masking, mean/std
# - The mask is computed from vol.sum(0) > 0
# Creating a small 4D tensor: (4, 3, 2, 2)
vol = torch.randn(4, 3, 2, 2)

ARGS = {
    "vol": vol
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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 (4, 3, 2, 2) — shape (4, 3, 2, 2) 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
parse Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/parser.py
code served (permissive licence) · get_code("8a289ba730141ed4")
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 AttrDict. 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 copy
from ast import literal_eval
from fractions import Fraction
import yaml

class AttrDict(dict):

    def __getattr__(self, name):
        if name in self.__dict__:
            return self.__dict__[name]
        elif name in self:
            return self[name]
        elif name.startswith('__'):
            raise AttributeError(name)
        else:
            self[name] = AttrDict()
            return self[name]

    def __setattr__(self, name, value):
        if name in self.__dict__:
            self.__dict__[name] = value
        else:
            self[name] = value

    def __str__(self):
        return yaml.dump(self.strip(), default_flow_style=False)

    def merge(self, other):
        if not isinstance(other, AttrDict):
            other = AttrDict.cast(other)
        for k, v in other.items():
            v = copy.deepcopy(v)
            if k not in self or not isinstance(v, dict):
                self[k] = v
                continue
            AttrDict.__dict__['merge'](self[k], v)

    def strip(self):
        if not isinstance(self, dict):
            if isinstance(self, list) or isinstance(self, tuple):
                self = str(tuple(self))
            return self
        return {k: AttrDict.__dict__['strip'](v) for k, v in self.items()}

    @staticmethod
    def cast(d):
        if not isinstance(d, dict):
            return d
        return AttrDict({k: AttrDict.cast(v) for k, v in d.items()})

def parse(d):
    if not isinstance(d, dict):
        if isinstance(d, str):
            try:
                d = literal_eval(d)
            except:
                try:
                    d = float(Fraction(d))
                except:
                    pass
        return d
    return AttrDict({k: parse(v) for k, v in d.items()})

ARGS = {
    "d": {
        "model": "resnet50",
        "batch_size": "32",
        "learning_rate": "0.001",
        "hidden_dim": "[64, 128, 256]",
        "nested": {
            "value": "3/4",
            "flag": "True",
            "name": "test_config"
        },
        "count": 42,
        "fraction_value": "1/2"
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AttrDict — a AttrDict 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
softmax_weighted_loss Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/utils/criterions.py
code served (permissive licence) · get_code("b5ee99865309afa1")
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 0, dtype family float, shape () 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)

# Create output tensor: shape (B, num_cls, H, W, Z)
# B=2 (batch), num_cls=5, H=3, W=4, Z=2 (distinct sizes for different dims)
output = torch.rand(2, 5, 3, 4, 2, dtype=torch.float32)

# Create target tensor: same shape as output
# Values should be in [0, 1] for softmax/probability interpretation
target = torch.rand(2, 5, 3, 4, 2, dtype=torch.float32)

# Create a simple upsampling operation (optional)
class SimpleUpsampler(nn.Module):
    def forward(self, x):
        # Just return input unchanged for this test
        return x

up_op = SimpleUpsampler()

ARGS = {
    "output": output,
    "target": target,
    "num_cls": 5,
    "up_op": up_op
}
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 0, dtype family float, shape () — shape () 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
split_data Ran
ran; our contract draft was wrong, not the code
jun-jie-shi/passion/code/preprocessing/data_split.py
code served (permissive licence) · get_code("4663b0d3de392cbf")
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 os
import tempfile
import random

# Create a temporary directory with some dummy files
temp_dir = tempfile.mkdtemp()
for i in range(10):
    open(os.path.join(temp_dir, f"image_{i}.jpg"), 'w').close()

ARGS = {
    "image_path": temp_dir
}
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 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
sup_128 Ran
ran, honoured the contract we drafted
jun-jie-shi/passion/code/preprocessing/preprocess_brats.py
code served (permissive licence) · get_code("3153dadb37e140a0")
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, ndim 1, dtype family int; 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function: sup_128 takes two numeric parameters (xmin, xmax)
# It performs arithmetic operations on them and returns a tuple
# No complex objects or methods are called, just basic math operations

ARGS = {
    'xmin': 10,
    'xmax': 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
load Not yet run
unverified (harvested, no recorded run)
jun-jie-shi/passion/code/utils/parser.py
code served (permissive licence) · get_code("b40f27cd88000a35")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
crop 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
get_params 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
get_temperature 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
load 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
normalize 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
parse 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation
sup_128 1 other paper
1 dated earlier
2206.02425 (2022-06)
mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation

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

Incomplete multi-modal image segmentation is a fundamental task in medical imaging to refine deployment efficiency when only partial modalities are available. However, the common practice that complete-modality data is visible during model training is far from realistic, as modalities can have imbalanced missing rates in clinical scenarios. In this paper, we, for the first time, formulate such a challenging setting and propose Preference-Aware Self-diStillatION (PASSION) for incomplete multi-modal medical image segmentation under imbalanced missing rates. Specifically, we first construct pixel-wise and semantic-wise self-distillation to balance the optimization objective of each modality. Then, we define relative preference to evaluate the dominance of each modality during training, based on which to design task-wise and gradient-wise regularization to balance the convergence rates of different modalities. Experimental results on two publicly available multi-modal datasets demonstrate the superiority of PASSION against existing approaches for modality balancing. More importantly, PASSION is validated to work as a plug-and-play module for consistent performance improvement across different backbones. Code is available at https://github.com/Jun-Jie-Shi/PASSION.

For agents

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

get_harvested_code_for_paper("2407.14796")
get_code_for_paper("2407.14796")
have("2407.14796")

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

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

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

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

Connect an agent — have() is free.