SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.14651 · 2024

Improving Representation of High-frequency Components for Medical Visual Foundation Models

arXiv · PDF · Open in the Atlas

Code that ran

15 of 17 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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.14651.json · badge: /api/ran/2407.14651.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
Arturia-Pendragon-Iris/Frepa canonical (classifier label)
classifier basis: census
15 ran · 2 no recorded run
FunctionStatusWhere it lives
false_negative Ran
ran; our contract draft was wrong, not the code
Arturia-Pendragon-Iris/Frepa/evaluation.py
code served (permissive licence) · get_code("5918a2c8063db81e")
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 float64, ndim 0, 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 numpy as np
import torch

torch.manual_seed(0)

# The function expects:
# - pred: array-like that can be flattened
# - label: array-like that can be flattened
# - smooth: numeric value (optional, has default)

# Create small numpy arrays for pred and label
pred = np.array([[0.9, 0.1, 0.8, 0.2],
                 [0.7, 0.3, 0.6, 0.4]])

label = np.array([[1, 0, 1, 0],
                  [1, 0, 1, 1]])

smooth = 1e-05

ARGS = {
    "pred": pred,
    "label": label,
    "smooth": smooth
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
false_positive Ran
ran; our contract draft was wrong, not the code
Arturia-Pendragon-Iris/Frepa/evaluation.py
code served (permissive licence) · get_code("f79426e2a95b7a05")
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 float64, ndim 0, 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 numpy as np
import torch

torch.manual_seed(0)

# Create simple numpy arrays for pred and label
# pred: predicted values (typically probabilities or binary predictions)
# label: ground truth binary labels
pred = np.array([[0.9, 0.2, 0.8, 0.1],
                 [0.7, 0.3, 0.6, 0.4]])

label = np.array([[1, 0, 1, 0],
                  [1, 0, 1, 0]])

ARGS = {
    "pred": pred,
    "label": label,
    "smooth": 1e-05
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
frangi_filter Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/analysis/filter_2D.py
code served (permissive licence) · get_code("5a69c69f11eafb55")
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 (16, 16) 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

# Create a small 2D numpy array for testing
# The function expects a numpy array and will apply filters to it
np_array = np.random.rand(16, 16).astype(np.float32)

ARGS = {
    "np_array": np_array,
    "scale_range": range(1, 10, 2),
    "alpha": 0.5,
    "beta": 0.5,
    "gamma": 15,
    "enhance": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — 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 (16, 16) — shape (16, 16) 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_1d_sincos_temp_embed Ran
ran, honoured the contract we drafted
Arturia-Pendragon-Iris/Frepa/attn_module.py
code served (permissive licence) · get_code("85c400086fb61347")
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 (4, 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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "embed_dim": 8,
    "length": 4,
}
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 ndarray, ndim 2, dtype family float, shape (4, 8) — shape (4, 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_2d_sincos_pos_embed Ran
ran, honoured the contract we drafted
Arturia-Pendragon-Iris/Frepa/attn_module.py
code served (permissive licence) · get_code("02c43f67a5f856d7")
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 (18, 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

# The function get_2d_sincos_pos_embed takes these parameters:
# - embed_dim: int, embedding dimension (must be even)
# - grid_size: int, size of the grid
# - cls_token: bool, whether to include class token
# - extra_tokens: int, number of extra tokens

ARGS = {
    "embed_dim": 8,
    "grid_size": 4,
    "cls_token": True,
    "extra_tokens": 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 2, dtype family float, shape (18, 8) — shape (18, 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_rel_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/model.py
pointer only (licence: MIT); the stored copy get_code serves, from LeapLabTHU/EchoWorld, is pointer only (licence: NONE) · get_code("d51d94a92bbaf66b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from LeapLabTHU/EchoWorld, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

img_degrade Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/pretrain/utils.py
code served (permissive licence) · get_code("25926b913a448899")
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 3, dtype family float, shape (3, 512, 512) 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)

# Create a valid ct_array: shape (3, 512, 512) as expected by the functions
# The spatial dimensions must be 512x512 (divisible by 32 for img_mask and 16 for fre_mask)
ct_array = np.random.randn(3, 512, 512).astype(np.float32)

ARGS = {
    "ct_array": ct_array
}
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 3, dtype family float, shape (3, 512, 512) — shape (3, 512, 512) 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
img_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/pretrain/utils.py
code served (permissive licence) · get_code("306991bf95c6f7de")
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 3, dtype family float, shape (3, 512, 512) 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

np.random.seed(0)

# Create a small CT array with shape (3, 512, 512)
# 3 channels, 512x512 spatial dimensions (16*32 = 512)
ct_array = np.random.randn(3, 512, 512).astype(np.float32)

ARGS = {
    "ct_array": ct_array,
    "masked_ratio": 0.6,
}
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 3, dtype family float, shape (3, 512, 512) — shape (3, 512, 512) 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
jerman_filter Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/analysis/filter_2D.py
code served (permissive licence) · get_code("ad7194aabc208160")
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 (8, 6) 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 scipy import ndimage

np.random.seed(0)

# Create a small 2D image array for testing
# Using shape (8, 6) for distinct dimensions
test_image = np.random.rand(8, 6).astype(np.float32) * 255

ARGS = {
    "np_array": test_image,
    "tau": 1,
    "enhance": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (8, 6) — shape (8, 6) 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
jerman_filter_scan Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/analysis/filter_2D.py
code served (permissive licence) · get_code("b65e4be1f60fda96")
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 3, dtype family float, shape (4, 5, 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 numpy as np
from scipy import ndimage

# Create a small 3D array (height=4, width=5, depth=2)
raw_array = np.random.rand(4, 5, 2).astype(np.float32)

# Ensure at least one slice has non-zero values
raw_array[:, :, 0] = np.random.rand(4, 5) * 0.5 + 0.3

ARGS = {
    "raw_array": raw_array,
    "tau": 1.0,
    "enhance": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 5, 2) — shape (4, 5, 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
modulate Ran
ran; our contract draft was wrong, not the code
Arturia-Pendragon-Iris/Frepa/attn_module.py
code served (permissive licence) · get_code("03310bba324ae4fb")
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) and returned Tensor, ndim 2, dtype family float, shape (2, 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 for the modulate function
# x: input tensor with shape (batch_size, feature_dim)
x = torch.randn(2, 4)

# shift: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
shift = torch.randn(2)

# scale: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
scale = torch.randn(2)

ARGS = {
    "x": x,
    "shift": shift,
    "scale": scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 4) — shape (2, 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
refine_ct Ran
ran, honoured the contract we drafted
Arturia-Pendragon-Iris/Frepa/pretrain/utils.py
code served (permissive licence) · get_code("0475e9f78fad81d2")
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 (2, 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 numpy as np

# Create a small CT array (simulating medical imaging data)
# CT values are typically in Hounsfield units (roughly -1000 to 3000)
ct_array = np.array([
    [-500, 0, 500, 1000],
    [100, 200, 300, 400]
], dtype=np.float32)

ARGS = {
    "ct_array": ct_array
}
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 (2, 4) — shape (2, 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
true_negative Ran
ran, honoured the contract we drafted
Arturia-Pendragon-Iris/Frepa/evaluation.py
code served (permissive licence) · get_code("6b7de36ae6ac0fdd")
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 float64, ndim 0, 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 numpy as np

# Create small numpy arrays for pred and label
# pred should be binary predictions (0 or 1) or probabilities (0-1)
# label should be binary labels (0 or 1)

pred = np.array([1, 0, 1, 1, 0, 1])
label = np.array([1, 0, 1, 0, 0, 1])

ARGS = {
    "pred": pred,
    "label": label
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/model.py
code served (permissive licence) · get_code("9185d0312408e7bd")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small input tensor [B, H, W, C]
# Using distinct sizes: B=2, H=5, W=7, C=4
x = torch.randn(2, 5, 7, 4)

# Window size parameter
window_size = 3

ARGS = {
    "x": x,
    "window_size": window_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 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
window_unpartition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Arturia-Pendragon-Iris/Frepa/model.py
code served (permissive licence) · get_code("5ddb841ad5ed28ee")
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, 7, 6, 3) 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)

# window_unpartition expects:
# - windows: [B * num_windows, window_size, window_size, C]
# - window_size: int
# - pad_hw: Tuple[int, int] - padded height and width
# - hw: Tuple[int, int] - original height and width

# Let's construct valid inputs:
# Say we have B=2 batches, window_size=4
# Hp=8, Wp=8 (padded), H=7, W=6 (original)
# Number of windows = (Hp // window_size) * (Wp // window_size) = 2 * 2 = 4
# So windows shape should be [B * 4, window_size, window_size, C] = [2*4, 4, 4, C]

B = 2
window_size = 4
Hp, Wp = 8, 8  # padded dimensions
H, W = 7, 6    # original dimensions
C = 3          # number of channels

# Number of windows per batch
num_windows = (Hp // window_size) * (Wp // window_size)  # 2 * 2 = 4

# Create windows tensor: [B * num_windows, window_size, window_size, C]
windows = torch.randn(B * num_windows, window_size, window_size, C)

pad_hw = (Hp, Wp)
hw = (H, W)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "pad_hw": pad_hw,
    "hw": hw,
}
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, 7, 6, 3) — shape (2, 7, 6, 3) 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
read_in_mha Not yet run
unverified (harvested, no recorded run)
Arturia-Pendragon-Iris/Frepa/file_to_numpy.py
code served (permissive licence) · get_code("6a69a5ba013677f1")
How it ran

no invocation recorded.

simple_stack_dcm_files Not yet run
unverified (harvested, no recorded run)
Arturia-Pendragon-Iris/Frepa/file_to_numpy.py
code served (permissive licence) · get_code("7cea931bf632b21c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 12 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 101 other papers
36 dated earlier, 3 the same month, 61 later, 1 undated · 29 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
and 98 more not named here
get_rel_pos 47 other papers
35 dated earlier, 10 later, 2 same year, order not determinable · 5 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_partition 47 other papers
34 dated earlier, 1 the same month, 10 later, 2 same year, order not determinable · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_unpartition 46 other papers
34 dated earlier, 1 the same month, 9 later, 2 same year, order not determinable · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 43 more not named here
get_1d_sincos_temp_embed 3 other papers
1 dated earlier, 2 later
2401.03048 (2024-01)
Latte: Latent Diffusion Transformer for Video Generation
2410.03160 (2024-10)
Redefining Temporal Modeling in Video Diffusion: The Vectorized Timestep Approach
2411.17616 (2024-11)
Towards Stabilized and Efficient Diffusion Transformers through Long-Skip-Connections with Spectral Constraints

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

Foundation models have recently attracted significant attention for their impressive generalizability across diverse downstream tasks. However, these models are demonstrated to exhibit great limitations in representing high-frequency components and fine-grained details. In many medical imaging tasks, the precise representation of such information is crucial due to the inherently intricate anatomical structures, sub-visual features, and complex boundaries involved. Consequently, the limited representation of prevalent foundation models can result in significant performance degradation or even failure in these tasks. To address these challenges, we propose a novel pretraining strategy, named Frequency-advanced Representation Autoencoder (Frepa). Through high-frequency masking and low-frequency perturbation combined with adversarial learning, Frepa encourages the encoder to effectively represent and preserve high-frequency components in the image embeddings. Additionally, we introduce an innovative histogram-equalized image masking strategy, extending the Masked Autoencoder approach beyond ViT to other architectures such as Swin Transformer and convolutional networks. We develop Frepa across nine medical modalities and validate it on 32 downstream tasks for both 2D images and 3D volume data. Without fine-tuning, Frepa can outperform other self-supervised pretraining methods and, in some cases, even surpasses task-specific trained models. This improvement is particularly significant for tasks involving fine-grained details, such as achieving up to a +15% increase in DSC for retina vessel segmentation and a +7% increase in IoU for lung nodule detection. Further experiments quantitatively reveal that Frepa enables superior high-frequency representations and preservation in the embeddings, underscoring its potential for developing more generalized and universal medical image foundation models.

For agents

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

get_harvested_code_for_paper("2407.14651")
get_code_for_paper("2407.14651")
have("2407.14651")

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

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

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

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

Connect an agent — have() is free.