SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.15356 · 2024

Neural Plasticity-Inspired Multimodal Foundation Model for Earth Observation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 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/2403.15356.json · badge: /api/ran/2403.15356.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
zhu-xlab/dofa canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
get_1d_sincos_pos_embed_from_grid_torch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhu-xlab/dofa/wave_dynamic_layer.py
code served (permissive licence) · get_code("a1966f7ff23ec4ef")
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 (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

torch.manual_seed(0)

# The function takes:
# - embed_dim: int, output dimension for each position (must be even)
# - pos: tensor of positions to encode, size (M,)

embed_dim = 8  # must be even
pos = torch.tensor([0.0, 1.5, 2.0, 3.5], dtype=torch.float32)  # 4 positions

ARGS = {
    "embed_dim": embed_dim,
    "pos": pos,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 (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
resolve_config Ran
ran; our contract draft was wrong, not the code
zhu-xlab/dofa/downstream_tasks/geobench_segmentation/main_finetune.py
code served (permissive licence) · get_code("1d01ab753c8dc375")
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 TaskConfig. 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
from dataclasses import dataclass
from typing import List, Optional

torch.manual_seed(0)

@dataclass
class Args:
    neontree_modality: str = 'RGB'

ARGS = {
    'task_name': 'm-seasonet',
    'args': Args()
}
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 TaskConfig — a TaskConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TaskConfig 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
resolve_tasks Ran
ran; our contract draft was wrong, not the code
zhu-xlab/dofa/downstream_tasks/geobench_segmentation/main_finetune.py
code served (permissive licence) · get_code("d7a6855303cdfd94")
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 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 numpy as np
from dataclasses import dataclass
from typing import List, Optional, Tuple

@dataclass(frozen=True)
class TaskConfig:
    nb_classes: int
    band_names: List[str]
    wavelengths: Optional[List[float]]
    lr: float
    batch_size: int
    checkpoint_arg: str = 'finetune_ball'
    modality: str = ''
    ignore_index: Optional[int] = None

RGB_BANDS = ['Red', 'Green', 'Blue']
RGB_WAVELENGTHS = [0.66, 0.56, 0.48]
S2_9_BANDS = ['04 - Red', '03 - Green', '02 - Blue', '05 - Vegetation Red Edge', '06 - Vegetation Red Edge', '07 - Vegetation Red Edge', '08 - NIR', '11 - SWIR', '12 - SWIR']
S2_9_WAVELENGTHS = [0.66, 0.56, 0.49, 0.7, 0.74, 0.78, 0.84, 1.61, 2.2]

TASK_CONFIGS = {
    'm-pv4ger-seg': TaskConfig(2, RGB_BANDS, RGB_WAVELENGTHS, 0.005, 16, 'finetune_b3'),
    'm-cashew-plant': TaskConfig(7, S2_9_BANDS, S2_9_WAVELENGTHS, 0.001, 12),
    'm-chesapeake': TaskConfig(7, RGB_BANDS, RGB_WAVELENGTHS, 0.005, 80, 'finetune_b3'),
    'm-NeonTree': TaskConfig(2, RGB_BANDS, RGB_WAVELENGTHS, 0.005, 16, 'finetune_b3', 'RGB'),
    'm-nz-cattle': TaskConfig(2, RGB_BANDS, RGB_WAVELENGTHS, 0.005, 16, 'finetune_b3'),
    'm-SA-crop-type': TaskConfig(10, S2_9_BANDS, S2_9_WAVELENGTHS, 0.005, 80),
    'm-seasonet': TaskConfig(34, S2_9_BANDS, S2_9_WAVELENGTHS, 0.005, 64, 'finetune_b9', ignore_index=0)
}

def resolve_tasks(tasks):
    if len(tasks) == 1 and tasks[0] == 'all':
        return list(TASK_CONFIGS.keys())
    unknown = sorted(set(tasks) - set(TASK_CONFIGS))
    if unknown:
        raise ValueError(f'Unknown GeoBench segmentation task(s): {unknown}')
    return tasks

ARGS = {
    'tasks': ['m-pv4ger-seg', 'm-cashew-plant']
}
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 list, ndim 1, 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
resolve_tasks Ran
ran; our contract draft was wrong, not the code
zhu-xlab/dofa/downstream_tasks/geobench_classification/main_linear_probe.py
code served (permissive licence) · get_code("db920d6c09aa3985")
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 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.

from dataclasses import dataclass
from typing import List

@dataclass(frozen=True)
class TaskConfig:
    nb_classes: int
    band_names: List[str]
    wavelengths: List[float]
    blr: float
    checkpoint_arg: str = 'finetune_ball'
    multilabel: bool = False

TASK_CONFIGS = {'m-forestnet': TaskConfig(nb_classes=12, band_names=['04 - Red', '03 - Green', '02 - Blue', '05 - NIR', '05 - NIR', '05 - NIR', '05 - NIR', '06 - SWIR1', '07 - SWIR2'], wavelengths=[0.66, 0.56, 0.49, 0.86, 0.86, 0.86, 0.86, 1.61, 2.2], checkpoint_arg='finetune_b9', blr=0.5), 'm-bigearthnet': TaskConfig(nb_classes=43, band_names=['04 - Red', '03 - Green', '02 - Blue', '05 - Vegetation Red Edge', '06 - Vegetation Red Edge', '07 - Vegetation Red Edge', '08 - NIR', '11 - SWIR', '12 - SWIR'], wavelengths=[0.66, 0.56, 0.49, 0.7, 0.74, 0.78, 0.84, 1.61, 2.2], blr=5.0, multilabel=True), 'm-brick-kiln': TaskConfig(nb_classes=2, band_names=['04 - Red', '03 - Green', '02 - Blue', '05 - Vegetation Red Edge', '06 - Vegetation Red Edge', '07 - Vegetation Red Edge', '08 - NIR', '11 - SWIR', '12 - SWIR'], wavelengths=[0.66, 0.56, 0.49, 0.7, 0.74, 0.78, 0.84, 1.61, 2.2], checkpoint_arg='finetune_b9', blr=10.0), 'm-pv4ger': TaskConfig(nb_classes=2, band_names=['Red', 'Green', 'Blue'], wavelengths=[0.66, 0.56, 0.49], checkpoint_arg='finetune_b3', blr=1.0), 'm-so2sat': TaskConfig(nb_classes=17, band_names=['04 - Red', '03 - Green', '02 - Blue', '05 - Vegetation Red Edge', '06 - Vegetation Red Edge', '07 - Vegetation Red Edge', '08 - NIR', '11 - SWIR', '12 - SWIR'], wavelengths=[0.66, 0.56, 0.49, 0.7, 0.74, 0.78, 0.84, 1.61, 2.2], checkpoint_arg='finetune_b9', blr=10.0), 'm-eurosat': TaskConfig(nb_classes=10, band_names=['04 - Red', '03 - Green', '02 - Blue', '05 - Vegetation Red Edge', '06 - Vegetation Red Edge', '07 - Vegetation Red Edge', '08 - NIR', '11 - SWIR', '12 - SWIR'], wavelengths=[0.66, 0.56, 0.49, 0.7, 0.74, 0.78, 0.84, 1.61, 2.2], blr=10.0)}

def resolve_tasks(tasks):
    if len(tasks) == 1 and tasks[0] == 'all':
        return list(TASK_CONFIGS.keys())
    unknown = sorted(set(tasks) - set(TASK_CONFIGS))
    if unknown:
        raise ValueError(f'Unknown GeoBench task(s): {unknown}')
    return tasks

ARGS = {
    'tasks': ['m-forestnet', 'm-bigearthnet']
}
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 1, 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
vit_base_dofa Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhu-xlab/dofa/hubconf.py
code served (permissive licence) · get_code("017b8166c39169f6")
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 MockViTBase. 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 unittest.mock import Mock, patch

torch.manual_seed(0)

# Create a minimal mock of vit_base_patch16 since we can't import dofa_v1
class MockViTBase(nn.Module):
    def __init__(self, **kwargs):
        super().__init__()
        self.linear = nn.Linear(768, 1000)
    
    def load_state_dict(self, state_dict, strict=False):
        # Mock implementation that accepts state_dict
        pass

# Mock the dofa_v1 module
mock_dofa_v1 = Mock()
mock_dofa_v1.vit_base_patch16 = MockViTBase

# Patch torch.hub.load_state_dict_from_url to return a minimal state dict
def mock_load_state_dict_from_url(url, map_location='cpu'):
    return {'linear.weight': torch.randn(1000, 768), 'linear.bias': torch.randn(1000)}

ARGS = {
    'pretrained': False,
    'strict': False
}

# Setup patches so the function can be called
import sys
sys.modules['dofa_v1'] = mock_dofa_v1

with patch('torch.hub.load_state_dict_from_url', mock_load_state_dict_from_url):
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
dofa_v1, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockViTBase — a MockViTBase output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockViTBase 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
create_dataset Not yet run
unverified (harvested, no recorded run)
zhu-xlab/dofa/downstream_tasks/geobench_segmentation/main_finetune.py
code served (permissive licence) · get_code("33a50be22c1f0de8")
How it ran

no invocation recorded.

create_dataset Not yet run
unverified (harvested, no recorded run)
zhu-xlab/dofa/downstream_tasks/geobench_classification/main_linear_probe.py
code served (permissive licence) · get_code("d1713f477bc64e3e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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_1d_sincos_pos_embed_from_grid_torch 2 other papers
2 later
2408.08447 (2024-08)
SpectralEarth: Training Hyperspectral Foundation Models at Scale
2503.06312 (2025-03)
DOFA-CLIP: Multimodal Vision-Language Foundation Models for Earth Observation

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

Earth observation (EO) in open-world settings presents a unique challenge: different applications rely on diverse sensor modalities, each with varying ground sampling distances, spectral ranges, and numbers of spectral bands. However, existing EO foundation models are typically tailored to specific sensor types, making them inflexible when generalizing across the heterogeneous landscape of EO data. To address this, we propose the Dynamic One-For-All (DOFA) model, a unified, multimodal foundation framework designed for diverse vision tasks in EO. Inspired by neural plasticity, DOFA utilizes a wavelength-conditioned dynamic hypernetwork to process inputs from five distinct satellite sensors flexibly. By continually pretraining on five EO modalities, DOFA achieves state-of-the-art performance across multiple downstream tasks and generalizes well to unseen modalities. Enhanced with hybrid continual pretraining, DOFA+ requires significantly fewer computational resources while outperforming counterparts trained with extensive GPU budgets. Experiments on diverse datasets highlight DOFA's potential as a foundation for general-purpose vision models in the sensor-diverse EO domain. The code and pre-trained weights are publicly available at https://github.com/zhu-xlab/DOFA.

For agents

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

get_harvested_code_for_paper("2403.15356")
get_code_for_paper("2403.15356")
have("2403.15356")

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

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

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

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

Connect an agent — have() is free.