SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.08028 · CVPR · 2023

MMANet: Margin-aware Distillation and Modality-aware Regularization for Incomplete Multimodal Learning

Yang Luo, Shicai Wei, Chunbo Luo

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 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 7 have no contract verdict; 0 failures of our instrument; 7 no recorded run), measured 2026-11-21; 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/2304.08028.json · badge: /api/ran/2304.08028.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
shicaiwei123/mmanet canonical (classifier label)
classifier basis: census
7 ran · 7 no recorded run
FunctionStatusWhere it lives
calc_accuracy Ran
ran on a synthesized input
shicaiwei123/mmanet/classification/lib/model_develop_utils.py
code served (permissive licence) · get_code("cabd997ca3e75a0c")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np

torch.manual_seed(0)

# Build a minimal model that:
# - has a train() method to switch modes
# - is callable and returns a tensor of logits (or tuple of tensors)
# - has cuda() method (even though we won't use it on CPU)
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

# Build a minimal DataLoader as list of (inputs, labels) tuples
# inputs: shape (2, 4) - batch of 2 samples, 4 features
# labels: shape (2,) - class indices (0 or 1 for binary classification)
def create_loader():
    data = []
    # Create 3 batches of data
    for batch_idx in range(3):
        inputs = torch.randn(2, 4)
        labels = torch.tensor([0, 1], dtype=torch.long)
        data.append((inputs, labels))
    return data

model = MinimalModel()
loader = create_loader()

ARGS = {
    'model': model,
    'loader': loader,
    'verbose': False,
    'hter': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
get_dataself_hist Ran
ran on a synthesized input
shicaiwei123/mmanet/classification/lib/processing_utils.py
code served (permissive licence) · get_code("c761b677ad5bff9f")
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 numpy as np

# The function get_dataself_hist takes an array-like input (arr)
# and counts the frequency of each unique value in it.
# It returns a dictionary mapping unique values to their counts.

# Create a simple test array with repeated values
test_array = np.array([1, 2, 2, 3, 3, 3, 1, 4, 4, 4, 4])

ARGS = {
    "arr": test_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 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
get_file_list Ran
ran on a synthesized input
shicaiwei123/mmanet/classification/lib/processing_utils.py
code served (permissive licence) · get_code("1d960d0ef5c18eca")
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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create a nested directory structure:
# temp_dir/
#   folder1/
#     subfolder1/
#       subsubfolder1/
#         file1.txt
#       file2.txt
#     file3.txt
#   file4.txt

folder1 = os.path.join(temp_dir, "folder1")
os.makedirs(folder1)

subfolder1 = os.path.join(folder1, "subfolder1")
os.makedirs(subfolder1)

subsubfolder1 = os.path.join(subfolder1, "subsubfolder1")
os.makedirs(subsubfolder1)

# Create some files at different levels
with open(os.path.join(temp_dir, "file4.txt"), "w") as f:
    f.write("test")

with open(os.path.join(folder1, "file3.txt"), "w") as f:
    f.write("test")

with open(os.path.join(subfolder1, "file2.txt"), "w") as f:
    f.write("test")

with open(os.path.join(subsubfolder1, "file1.txt"), "w") as f:
    f.write("test")

ARGS = {
    "read_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 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
get_optimizer Ran
ran on a synthesized input
shicaiwei123/mmanet/segmentation/train_missing_mmanet.py
code served (permissive licence) · get_code("5f64bc843defdf1d")
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 SGD. 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 torch.optim

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

# Create args object with required attributes
class Args:
    def __init__(self, optimizer, lr, weight_decay, momentum):
        self.optimizer = optimizer
        self.lr = lr
        self.weight_decay = weight_decay
        self.momentum = momentum

ARGS = {
    'args': Args(optimizer='SGD', lr=0.01, weight_decay=1e-4, momentum=0.9),
    '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 SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
modality_drop Ran
ran on a synthesized input
shicaiwei123/mmanet/classification/lib/model_arch.py
code served (permissive licence) · get_code("fe28c9769df8105c")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# Create small tensors for RGB, depth, and IR modalities
# Batch size: 2, Channels: 3, Height: 4, Width: 5
x_rgb = torch.randn(2, 3, 4, 5)
x_depth = torch.randn(2, 1, 4, 5)
x_ir = torch.randn(2, 1, 4, 5)

# p parameter - test with [0, 0, 0] to trigger random sampling
p = [0, 0, 0]

# args - a simple config dict
args = {
    "modality_drop_enabled": True,
    "seed": 42
}

ARGS = {
    "x_rgb": x_rgb,
    "x_depth": x_depth,
    "x_ir": x_ir,
    "p": p,
    "args": args
}
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 — 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
plot_embedding Ran
ran on a synthesized input
shicaiwei123/mmanet/classification/lib/model_develop_utils.py
code served (permissive licence) · get_code("3e8fb118d35e458d")
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 Figure. 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 numpy as np
import matplotlib.pyplot as plt

np.random.seed(0)

# Create sample 2D embedding data (10 samples, 2 dimensions)
data = np.random.randn(10, 2).astype(np.float32)

# Create labels (binary: 0 or 1)
label = np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1], dtype=np.int32)

# Title for the plot
title = "Test Embedding Visualization"

ARGS = {
    "data": data,
    "label": label,
    "title": title
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
preprocess_validation_image Ran
ran on a synthesized input
shicaiwei123/mmanet/segmentation/imagenet_pretraining.py
code served (permissive licence) · get_code("c6367223384ebf8a")
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 tensorflow as tf
import numpy as np

# Create a small sample image tensor (3 color channels, arbitrary height/width)
# TensorFlow expects images as tensors
image = tf.constant(np.random.rand(128, 128, 3).astype(np.float32))

# Create a sample label (can be an integer or tensor)
label = tf.constant(5, dtype=tf.int32)

ARGS = {
    "image": image,
    "label": label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
calc_accuracy_kd_patch_feature Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/classification/lib/model_develop.py
code served (permissive licence) · get_code("6eff21bf5e138d84")
How it ran

no invocation recorded.

calc_accuracy_multi Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/classification/lib/model_develop.py
code served (permissive licence) · get_code("7aaa500285ea7919")
How it ran

no invocation recorded.

deploy_base Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/classification/lib/model_develop_utils.py
code served (permissive licence) · get_code("c25e8291013b4d7a")
How it ran

no invocation recorded.

get_mean_std Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/classification/lib/processing_utils.py
code served (permissive licence) · get_code("25d573d05669c93c")
How it ran

no invocation recorded.

preprocess_training_image Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/segmentation/imagenet_pretraining.py
code served (permissive licence) · get_code("26659e123368870c")
How it ran

no invocation recorded.

unbalance_modality_drop Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/classification/lib/model_arch.py
code served (permissive licence) · get_code("4cb7014dd1d9596d")
How it ran

no invocation recorded.

validate Not yet run
unverified (harvested, no recorded run)
shicaiwei123/mmanet/segmentation/train_missing_mmanet.py
code served (permissive licence) · get_code("991117cf598c2b50")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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_optimizer 1 other paper
1 dated earlier
2107.02575 (2021-07)
Contrastive Multimodal Fusion with TupleInfoNCE

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Multimodal learning has shown great potentials in numerous scenes and attracts increasing interest recently. However, it often encounters the problem of missing modality data and thus suffers severe performance degradation in practice. To this end, we propose a general framework called MMANet to assist incomplete multimodal learning. It consists of three components: the deployment network used for inference, the teacher network transferring comprehensive multimodal information to the deployment network, and the regularization network guiding the deployment network to balance weak modality combinations. Specifically, we propose a novel margin-aware distillation (MAD) to assist the information transfer by weighing the sample contribution with the classification uncertainty. This encourages the deployment network to focus on the samples near decision boundaries and acquire the refined inter-class margin. Besides, we design a modalityaware regularization (MAR) algorithm to mine the weak modality combinations and guide the regularization network to calculate prediction loss for them. This forces the deployment network to improve its representation ability for the weak modality combinations adaptively. Finally, extensive experiments on multimodal classification and segmentation tasks demonstrate that our MMANet outperforms the state-of-the-art significantly. Code is available

For agents

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

get_harvested_code_for_paper("2304.08028")
get_code_for_paper("2304.08028")
have("2304.08028")

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

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

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

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

Connect an agent — have() is free.