SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.15264 · 2023

ChAda-ViT : Channel Adaptive Attention for Joint Representation Learning of Heterogeneous Microscopy Images

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2311.15264.json · badge: /api/ran/2311.15264.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
nicoboou/chada_vit canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nicoboou/chada_vit/main_attn.py
code served (permissive licence) · get_code("c83fb22106327e13")
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, 3, 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
import numpy as np

torch.manual_seed(0)

# Create a small image array (height=4, width=3, channels=3)
image = np.random.rand(4, 3, 3).astype(np.float32) * 255

# Create a small mask array (height=4, width=3) with values between 0 and 1
mask = np.random.rand(4, 3).astype(np.float32)

# Create a color array with 3 channel values (RGB)
color = np.array([1.0, 0.5, 0.2])

# alpha parameter for blending
alpha = 0.5

ARGS = {
    'image': image,
    'mask': mask,
    'color': color,
    'alpha': alpha
}
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 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
nicoboou/chada_vit/src/backbones/vit/vit_attn_viz.py
code served (permissive licence) · get_code("6a75e2944c9dc262")
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 dict. 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)

class MockPatchEmbed(nn.Module):
    def __init__(self):
        super().__init__()
        self.proj = nn.Conv2d(3, 64, kernel_size=16, stride=16)
        self.grid_size = (14, 14)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = MockPatchEmbed()
        # pos_embed shape: [1, num_tokens, embed_dim]
        # num_tokens = 1 (cls token) + 14*14 (patch tokens) = 197
        self.pos_embed = nn.Parameter(torch.randn(1, 197, 64))
        self.num_prefix_tokens = 1
        self.no_embed_class = False

model = MockModel()

# Create a state_dict with various possible keys to test checkpoint_filter_fn
state_dict = {
    'model': {
        'patch_embed.proj.weight': torch.randn(64, 3, 16, 16),
        'pos_embed': torch.randn(1, 197, 64),
        'blocks.0.mlp.fc1.weight': torch.randn(256, 64),
        'blocks.0.mlp.fc1.bias': torch.randn(256),
        'blocks.0.attn.qkv.weight': torch.randn(192, 64),
    }
}

ARGS = {
    'state_dict': state_dict,
    'model': model,
    'adapt_layer_scale': False,
    'interpolation': 'bicubic',
    'antialias': True,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
extract_features Ran
ran; our contract draft was wrong, not the code
nicoboou/chada_vit/main_knn.py
code served (permissive licence) · get_code("d05dc9d5b1b33b45")
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 as nn
from torch.utils.data import DataLoader

torch.manual_seed(0)

# Create a minimal model that implements extract_features method
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def extract_features(self, batch):
        """Extract features from a batch.
        
        The function expects this to return (features, targets)
        """
        x, y = batch
        feats = self.linear(x)
        return feats, y

# Create a minimal model instance
model = MinimalModel()

# Create a simple data loader with (input, target) tuples
# Each batch should be a tuple of (tensor, tensor)
batch_data = [
    (torch.randn(2, 4), torch.randint(0, 2, (2,))),
    (torch.randn(2, 4), torch.randint(0, 2, (2,))),
]

loader = DataLoader(batch_data, batch_size=1)

# Define all arguments for the function
ARGS = {
    "loader": loader,
    "model": model,
    "mixed_channels": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
get_init_weights_vit Ran
ran; our contract draft was wrong, not the code
nicoboou/chada_vit/src/backbones/vit/vit_attn_viz.py
code served (permissive licence) · get_code("89b15c59ecb5d1c7")
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 partial. 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 functools import partial

torch.manual_seed(0)

# The function get_init_weights_vit takes two parameters:
# - mode: str (default 'jax')
# - head_bias: float (default 0.0)

ARGS = {
    'mode': 'jax',
    'head_bias': 0.0,
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
random_colors Ran
ran, honoured the contract we drafted
nicoboou/chada_vit/main_attn.py
code served (permissive licence) · get_code("cc71140102574a2c")
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 list, 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 random
import colorsys

random.seed(0)

# Construct ARGS for random_colors function
ARGS = {
    "N": 5,
    "bright": True
}
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 list, ndim 2, dtype family float — a list 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
resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nicoboou/chada_vit/src/backbones/vit/vit_attn_viz.py
code served (permissive licence) · get_code("1e1ee36e7748970c")
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 (1, 17, 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 math

torch.manual_seed(0)

# The function resizes position embeddings from one grid size to another.
# Key observations:
# - posemb: tensor of shape (batch, num_tokens, embed_dim) with prefix tokens
# - posemb_new: target tensor of shape (batch, num_tokens_new, embed_dim)
# - num_prefix_tokens: number of prefix tokens to preserve
# - gs_new: target grid dimensions [height, width]
# - interpolation: interpolation mode string
# - antialias: boolean flag

# Create small position embeddings
# Old embedding: batch=1, num_tokens=10 (1 prefix + 9 grid tokens = 3x3), embed_dim=4
batch_size = 1
num_prefix = 1
grid_old = 3
embed_dim = 4
num_tokens_old = num_prefix + (grid_old * grid_old)

posemb = torch.randn(batch_size, num_tokens_old, embed_dim)

# New embedding: target shape with different grid size (4x4)
grid_new = 4
num_tokens_new = num_prefix + (grid_new * grid_new)

posemb_new = torch.randn(batch_size, num_tokens_new, embed_dim)

# Target grid dimensions
gs_new = [grid_new, grid_new]

ARGS = {
    'posemb': posemb,
    'posemb_new': posemb_new,
    'num_prefix_tokens': num_prefix,
    'gs_new': gs_new,
    'interpolation': 'bicubic',
    'antialias': False,
}
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 (1, 17, 4) — shape (1, 17, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 2 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
get_init_weights_vit 25 other papers
9 dated earlier, 1 the same month, 14 later, 1 same year, order not determinable · 1 only as an assembly brick
2112.08654 (2021-12)
Learning to Prompt for Continual Learning
2207.12819 (2022-07)
S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning
2210.08823 (2022-10)
Scaling & Shifting Your Features: A New Baseline for Efficient Model Tuning
and 22 more not named here
random_colors 9 other papers
7 dated earlier, 2 later
1612.03242 (2016-12)
StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks
1702.01983 (2017-02)
Face Aging With Conditional Generative Adversarial Networks
and 6 more not named here
checkpoint_filter_fn 2 other papers
2 later
2409.10956 (2024-09)
Versatile Incremental Learning: Towards Class and Domain-Agnostic Incremental Learning
2409.17978 (2024-09)
HydraViT: Stacking Heads for a Scalable ViT
apply_mask 1 other paper
1 dated earlier
2109.13228 (2021-09)
PASS: An ImageNet replacement for self-supervised pretraining without humans

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

Unlike color photography images, which are consistently encoded into RGB channels, biological images encompass various modalities, where the type of microscopy and the meaning of each channel varies with each experiment. Importantly, the number of channels can range from one to a dozen and their correlation is often comparatively much lower than RGB, as each of them brings specific information content. This aspect is largely overlooked by methods designed out of the bioimage field, and current solutions mostly focus on intra-channel spatial attention, often ignoring the relationship between channels, yet crucial in most biological applications. Importantly, the variable channel type and count prevent the projection of several experiments to a unified representation for large scale pre-training. In this study, we propose ChAda-ViT, a novel Channel Adaptive Vision Transformer architecture employing an Inter-Channel Attention mechanism on images with an arbitrary number, order and type of channels. We also introduce IDRCell100k, a bioimage dataset with a rich set of 79 experiments covering 7 microscope modalities, with a multitude of channel types, and counts varying from 1 to 10 per experiment. Our architecture, trained in a self-supervised manner, outperforms existing approaches in several biologically relevant downstream tasks. Additionally, it can be used to bridge the gap for the first time between assays with different microscopes, channel numbers or types by embedding various image and experimental modalities into a unified biological image representation. The latter should facilitate interdisciplinary studies and pave the way for better adoption of deep learning in biological image-based analyses. Code and Data available at https://github.com/nicoboou/chadavit.

For agents

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

get_harvested_code_for_paper("2311.15264")
get_code_for_paper("2311.15264")
have("2311.15264")

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

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

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

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

Connect an agent — have() is free.