SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.03545 · 2020

MISA: Modality-Invariant and -Specific Representations for Multimodal Sentiment Analysis

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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, 1 violated it and 4 have no contract verdict; 2 failures of our instrument; 3 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/2005.03545.json · badge: /api/ran/2005.03545.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
declare-lab/MISA canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
base_time_desc_decorator Ran
ran on a synthesized input
declare-lab/MISA/src/utils/time_track.py
code served (permissive licence) · get_code("e5bfca4621471280")
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 function. 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 time

def base_time_desc_decorator(method, desc='test_description'):

    def timed(*args, **kwargs):
        print(desc)
        start = time.time()
        try:
            result = method(*args, **kwargs)
        except TypeError:
            result = method(**kwargs)
        print('Done! It took {:.2} secs\n'.format(time.time() - start))
        if result is not None:
            return result
    return timed


torch.manual_seed(0)


def sample_method(x, y=None):
    """A simple method to decorate"""
    return x + (y if y is not None else 0)


ARGS = {
    'method': sample_method,
    'desc': 'Processing data'
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_config Ran
ran on a synthesized input
declare-lab/MISA/src/config.py
code served (permissive licence) · get_code("c534599cc75f0b11")
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 Config. 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 import optim
from pathlib import Path
from unittest.mock import MagicMock

torch.manual_seed(0)

# Mock the paths and dictionaries that get_config uses
class MockPath:
    def __init__(self, path_str):
        self.path_str = path_str
    
    def __str__(self):
        return self.path_str
    
    def joinpath(self, *args):
        return MockPath(str(self) + '/' + '/'.join(args))

# Create minimal mock setup
word_emb_path = '/mock/glove.840B.300d.txt'
project_dir = MockPath('/mock/project')
sdk_dir = project_dir.joinpath('CMU-MultimodalSDK')
data_dir = project_dir.joinpath('datasets')
data_dict = {
    'mosi': data_dir.joinpath('MOSI'),
    'mosei': data_dir.joinpath('MOSEI'),
    'ur_funny': data_dir.joinpath('UR_FUNNY')
}

optimizer_dict = {'RMSprop': optim.RMSprop, 'Adam': optim.Adam}
activation_dict = {
    'elu': nn.ELU,
    'hardshrink': nn.Hardshrink,
    'hardtanh': nn.Hardtanh,
    'leakyrelu': nn.LeakyReLU,
    'prelu': nn.PReLU,
    'relu': nn.ReLU,
    'rrelu': nn.RReLU,
    'tanh': nn.Tanh
}

ARGS = {
    'parse': False,
    'optional_kwargs': {}
}
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 Config — a Config output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Config 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
load_pickle Ran
ran; our contract draft was wrong, not the code
declare-lab/MISA/src/create_dataset.py
code served (permissive licence) · get_code("70db7c9cbe9e680d")
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 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 pickle
import tempfile
import os

# Create a temporary file with pickled data
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "test.pkl")

# Create some sample data to pickle
sample_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

# Write the pickled data to the temporary file
with open(temp_path, 'wb') as f:
    pickle.dump(sample_data, f)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
masked_mean Ran
ran; our contract draft was wrong, not the code
declare-lab/MISA/src/models.py
code served (permissive licence) · get_code("0953c66f6d265ad1")
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 1, dtype family float, shape (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 a small tensor (batch=2, features=4)
tensor = torch.randn(2, 4)

# Create a mask with same shape as tensor
mask = torch.ones(2, 4)

# Set some mask values to 0 to create masked positions
mask[0, 1] = 0
mask[1, 3] = 0

# dim to compute mean along
dim = 0

ARGS = {
    "tensor": tensor,
    "mask": mask,
    "dim": dim
}
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 1, dtype family float, shape (4,) — shape (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
str2bool Ran
ran, violated the contract we drafted
declare-lab/MISA/src/config.py
code served (permissive licence) · get_code("38096a698c1dafa9")
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 bool, 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 argparse

def str2bool(v):
    """string to boolean"""
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 bool, 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
time_desc_decorator Ran
ran on a synthesized input
declare-lab/MISA/src/utils/time_track.py
code served (permissive licence) · get_code("19017e8c3e1ed55b")
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
import time
from functools import partial

def base_time_desc_decorator(method, desc='test_description'):

    def timed(*args, **kwargs):
        print(desc)
        start = time.time()
        try:
            result = method(*args, **kwargs)
        except TypeError:
            result = method(**kwargs)
        print('Done! It took {:.2} secs\n'.format(time.time() - start))
        if result is not None:
            return result
    return timed

def time_desc_decorator(desc):
    return partial(base_time_desc_decorator, desc=desc)


# Create a simple test function to decorate
def sample_function(x, y):
    """A simple function that does some computation"""
    time.sleep(0.01)
    return x + y


ARGS = {
    'desc': 'Computing sample result'
}
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 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
to_gpu Ran
ran on a synthesized input
declare-lab/MISA/src/utils/convert.py
code served (permissive licence) · get_code("abad03534eaa9fa7")
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, 4) as a later run recorded it. 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, 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 a small tensor to pass as argument x
x = torch.randn(2, 4)

# Define ARGS mapping all parameters
ARGS = {
    "x": x,
    "on_cpu": False,
    "gpu_id": None,
}
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, 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
load_emb Not yet run
unverified (harvested, no recorded run)
declare-lab/MISA/src/create_dataset.py
code served (permissive licence) · get_code("c4b17078505c0346")
How it ran

no invocation recorded.

masked_max Not yet run
unverified (harvested, no recorded run)
declare-lab/MISA/src/models.py
code served (permissive licence) · get_code("83f6167b0c8caf55")
How it ran

no invocation recorded.

to_cpu Not yet run
unverified (harvested, no recorded run)
declare-lab/MISA/src/utils/convert.py
code served (permissive licence) · get_code("1daaefb0404fa995")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 5 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
str2bool 82 other papers
35 dated earlier, 1 the same month, 46 later
1510.03055 (2015-10)
A Diversity-Promoting Objective Function for Neural Conversation Models
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
and 79 more not named here
load_pickle 9 other papers
1 dated earlier, 8 later
1907.00456 (2019-07)
Way Off-Policy Batch Deep Reinforcement Learning of Implicit Human Preferences in Dialog
2205.15465 (2022-05)
Analyzing Modality Robustness in Multimodal Sentiment Analysis
and 6 more not named here
masked_mean 3 other papers
1 dated earlier, 2 later
1703.01541 (2017-03)
Soft-DTW: a Differentiable Loss Function for Time-Series
2205.15465 (2022-05)
Analyzing Modality Robustness in Multimodal Sentiment Analysis
2210.15359 (2022-10)
Exploiting modality-invariant feature for robust multimodal emotion recognition with missing modalities
load_emb 1 other paper
1 later
2205.15465 (2022-05)
Analyzing Modality Robustness in Multimodal Sentiment Analysis
masked_max 1 other paper
1 later
2205.15465 (2022-05)
Analyzing Modality Robustness in Multimodal Sentiment Analysis

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

Multimodal Sentiment Analysis is an active area of research that leverages multimodal signals for affective understanding of user-generated videos. The predominant approach, addressing this task, has been to develop sophisticated fusion techniques. However, the heterogeneous nature of the signals creates distributional modality gaps that pose significant challenges. In this paper, we aim to learn effective modality representations to aid the process of fusion. We propose a novel framework, MISA, which projects each modality to two distinct subspaces. The first subspace is modality-invariant, where the representations across modalities learn their commonalities and reduce the modality gap. The second subspace is modality-specific, which is private to each modality and captures their characteristic features. These representations provide a holistic view of the multimodal data, which is used for fusion that leads to task predictions. Our experiments on popular sentiment analysis benchmarks, MOSI and MOSEI, demonstrate significant gains over state-of-the-art models. We also consider the task of Multimodal Humor Detection and experiment on the recently proposed UR_FUNNY dataset. Here too, our model fares better than strong baselines, establishing MISA as a useful multimodal framework.

For agents

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

get_harvested_code_for_paper("2005.03545")
get_code_for_paper("2005.03545")
have("2005.03545")

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

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

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

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

Connect an agent — have() is free.