SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10589 · NeurIPS · 2024

MoTE: Reconciling Generalization with Specialization for Visual-Language to Video Knowledge Transfer

Xun Zhou, Ronghao Dang, Chengju Liu, Qijun Chen, Xiao Lin, Minghao Zhu, Zhengpu Wang, Mengxian Hu

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 4 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/2410.10589.json · badge: /api/ran/2410.10589.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
ZMHH-H/MoTE canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
zmhh-h/mote canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
MoTE Ran
ran on a synthesized input · constructed an object; no result was computed
zmhh-h/mote/modules/video_clip.py
code served (permissive licence) · get_code("5040c36396284f29")
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 an instance of its own class, MoTE: the run constructed the object and did not call it, so no result was computed. 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 torch import nn
import torch.nn.functional as F
import copy

torch.manual_seed(0)

class QuickGELU(nn.Module):
    def forward(self, x: torch.Tensor):
        return x * torch.sigmoid(1.702 * x)

class MoTE(torch.nn.Module):
    def __init__(self, d_model: int, num_experts=4):
        super(MoTE, self).__init__()
        self.num_experts = num_experts
        fc_up = nn.Linear(d_model, d_model * 4)
        self.fc_up = torch.nn.ModuleList([copy.deepcopy(fc_up) for i in range(num_experts)])
        self.gelu = QuickGELU()
        fc_dn = nn.Linear(d_model * 4, d_model)
        self.fc_dn = torch.nn.ModuleList([copy.deepcopy(fc_dn) for i in range(num_experts)])
        self.mote_fusion_weight = torch.nn.Parameter(torch.zeros(self.num_experts), requires_grad=False)
        self.expert_index = 0

    def mote_experts_fusion(self, evaluation=False):
        weight = torch.arange(start=1, end=self.num_experts + 1, dtype=torch.float)
        weight_candi = [-9.6, -4.8, -2.4, -1.2, -0.6, 0.6, 1.2, 2.4, 4.8, 9.6, float('inf')]
        tau_idx = torch.randint(low=0, high=len(weight_candi), size=(1,)).item()
        tau = weight_candi[tau_idx]
        if not evaluation:
            weight = F.softmax(weight / tau, dim=-1)
        else:
            weight = F.softmax(self.mote_fusion_weight, dim=-1)
        self.fc_up_dict = {'weight': 0, 'bias': 0}
        self.fc_dn_dict = {'weight': 0, 'bias': 0}
        for idx in range(self.num_experts):
            fc_up_single = self.fc_up[idx]
            fc_dn_single = self.fc_dn[idx]
            for s_name, s_param in fc_up_single.named_parameters():
                if 'weight' in s_name:
                    p_name = 'weight'
                    self.fc_up_dict[p_name] = self.fc_up_dict[p_name] + weight[idx] * s_param
                elif 'bias' in s_name:
                    p_name = 'bias'
                    self.fc_up_dict[p_name] = self.fc_up_dict[p_name] + weight[idx] * s_param
                else:
                    raise NotImplementedError
            for s_name, s_param in fc_dn_single.named_parameters():
                if 'weight' in s_name:
                    p_name = 'weight'
                    self.fc_dn_dict[p_name] = self.fc_dn_dict[p_name] + weight[idx] * s_param
                elif 'bias' in s_name:
                    p_name = 'bias'
                    self.fc_dn_dict[p_name] = self.fc_dn_dict[p_name] + weight[idx] * s_param
                else:
                    raise NotImplementedError

    def forward(self, x: torch.Tensor, regularization: bool=False):
        if self.fc_up[0].training and self.fc_dn[0].training:
            if regularization:
                self.mote_experts_fusion(evaluation=False)
                x = F.linear(x, self.fc_up_dict['weight'], self.fc_up_dict['bias'])
                x = self.gelu(x)
                x = F.linear(x, self.fc_dn_dict['weight'], self.fc_dn_dict['bias'])
            else:
                weights = torch.arange(start=1, end=self.num_experts + 1, dtype=torch.float)
                weights = F.softmax(weights / 1.0, dim=-1)
                expert_idx = torch.multinomial(input=weights, num_samples=1).item()
                self.expert_index = expert_idx
                x = self.fc_up[expert_idx](x)
                x = self.gelu(x)
                x = self.fc_dn[expert_idx](x)
        else:
            self.mote_experts_fusion(evaluation=True)
            x = F.linear(x, self.fc_up_dict['weight'], self.fc_up_dict['bias'])
            x = self.gelu(x)
            x = F.linear(x, self.fc_dn_dict['weight'], self.fc_dn_dict['bias'])
        return x

d_model = 4
num_experts = 4

mote_model = MoTE(d_model=d_model, num_experts=num_experts)
mote_model.train()

x = torch.randn(2, d_model)

ARGS = {
    'd_model': d_model,
    'num_experts': num_experts
}
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 MoTE — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MoTE 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
QuickGELU Ran
ran on a synthesized input
zmhh-h/mote/modules/video_clip.py
code served (permissive licence) · get_code("8c5c4de012c0aab9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from torch import nn

class QuickGELU(nn.Module):

    def forward(self, x: torch.Tensor):
        return x * torch.sigmoid(1.702 * x)


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = QuickGELU(**INIT_ARGS)
    output = model(**ARGS)
    print(output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
basic_clean Ran
ran; our contract draft was wrong, not the code
ZMHH-H/MoTE/clip/simple_tokenizer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ltpwy/MSCI, 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.

drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZMHH-H/MoTE/clip/model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from fudan-zvg/SeaFormer, is pointer only (licence: NONE) · get_code("3ac6b7d76e8e3584")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from fudan-zvg/SeaFormer, 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.

get_pairs Ran
ran; our contract draft was wrong, not the code
ZMHH-H/MoTE/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
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 set. 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

torch.manual_seed(0)

# The function get_pairs takes a word parameter
# A word is represented as a tuple of symbols (variable-length strings)
# The function iterates through the word and creates pairs of consecutive symbols

word = ("hello", "world", "test")

ARGS = {
    "word": word
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
multiple_samples_collate Ran
ran; our contract draft was wrong, not the code
ZMHH-H/MoTE/utils/Augmentation.py
code served (permissive licence) · get_code("4927733091f71100")
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._utils.collate import default_collate

torch.manual_seed(0)

# Create a batch for multiple_samples_collate
# The function expects a batch where each element is (inputs, labels)
# where inputs and labels are lists of samples (for repeated augmentation)

# Each item in the batch is a tuple of (list of inputs, list of labels)
batch = [
    # First batch item: 2 augmented samples
    (
        [torch.randn(4, 3), torch.randn(4, 3)],  # 2 augmented input samples
        [torch.tensor(0), torch.tensor(1)]        # 2 corresponding labels
    ),
    # Second batch item: 2 augmented samples
    (
        [torch.randn(4, 3), torch.randn(4, 3)],  # 2 augmented input samples
        [torch.tensor(1), torch.tensor(0)]        # 2 corresponding labels
    ),
]

ARGS = {
    "batch": batch
}
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
setup_logger Ran
ran; our contract draft was wrong, not the code
ZMHH-H/MoTE/utils/logger.py
code served (permissive licence) · get_code("92035acbaccac625")
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 Logger. 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 functools
import logging
import os
import sys
import tempfile
from termcolor import colored

# Create a temporary directory for log output
temp_dir = tempfile.mkdtemp()

ARGS = {
    'output': os.path.join(temp_dir, 'log.txt'),
    'distributed_rank': 0,
    'color': True,
    'name': 'moco',
    'abbrev_name': 'moco'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
termcolor — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
whitespace_clean Ran
ran; our contract draft was wrong, not the code
ZMHH-H/MoTE/clip/simple_tokenizer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ltpwy/MSCI, 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.

build_model Not yet run
unverified (harvested, no recorded run)
ZMHH-H/MoTE/clip/model.py
code served (permissive licence) · get_code("5d969c3a44340f51")
How it ran

no invocation recorded.

get_augmentation Not yet run
unverified (harvested, no recorded run)
ZMHH-H/MoTE/utils/Augmentation.py
code served (permissive licence) · get_code("2e5fc9f7692cae58")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
ZMHH-H/MoTE/clip/clip.py
code served (permissive licence) · get_code("a34ba2785e08acbd")
How it ran

no invocation recorded.

train_augmentation Not yet run
unverified (harvested, no recorded run)
ZMHH-H/MoTE/utils/Augmentation.py
code served (permissive licence) · get_code("8bd3efba1612299f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 5 the same month, 5 later) and 3 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_pairs 258 other papers
180 dated earlier, 10 the same month, 60 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
159 dated earlier, 9 the same month, 55 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
drop_path 224 other papers
182 dated earlier, 3 the same month, 31 later, 7 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
basic_clean 218 other papers
159 dated earlier, 9 the same month, 42 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
QuickGELU
brick of this paper's assembly: helper
62 other papers
45 dated earlier, 1 the same month, 16 later · 59 only as an assembly brick
1902.00751 (2019-02)
Parameter-Efficient Transfer Learning for NLP
2011.10566 (2020-11)
Exploring Simple Siamese Representation Learning
2103.03230 (2021-03)
Barlow Twins: Self-Supervised Learning via Redundancy Reduction
and 59 more not named here
load 2 other papers
1 dated earlier, 1 same year, order not determinable
2301.00184 (2023-01)
Cap4Video: What Can Auxiliary Captions Do for Text-Video Retrieval?
2024.findings-acl.747 (2024 (year only))
Diving Deep into the Motion Representation of Video-Text Models
multiple_samples_collate 2 other papers
2 dated earlier
2301.00184 (2023-01)
Cap4Video: What Can Auxiliary Captions Do for Text-Video Retrieval?
2302.04869 (2023-02)
Reversible Vision Transformers
build_model 1 other paper
1 dated earlier
2301.00184 (2023-01)
Cap4Video: What Can Auxiliary Captions Do for Text-Video Retrieval?
train_augmentation 1 other paper
1 dated earlier
2301.00184 (2023-01)
Cap4Video: What Can Auxiliary Captions Do for Text-Video Retrieval?

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

Transferring visual-language knowledge from large-scale foundation models for video recognition has proved to be effective. To bridge the domain gap, additional parametric modules are added to capture the temporal information. However, zero-shot generalization diminishes with the increase in the number of specialized parameters, making existing works a trade-off between zero-shot and close-set performance. In this paper, we present MoTE, a novel framework that enables generalization and specialization to be balanced in one unified model. Our approach tunes a mixture of temporal experts to learn multiple task views with various degrees of data fitting. To maximally preserve the knowledge of each expert, we propose Weight Merging Regularization, which regularizes the merging process of experts in weight space. Additionally with temporal feature modulation to regularize the contribution of temporal feature during test. We achieve a sound balance between zero-shot and close-set video recognition tasks and obtain stateof-the-art or competitive results on various datasets, including Kinetics-400 & 600, UCF, and HMDB. Code is available at https://github.com/ZMHH-H/MoTE.

For agents

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

get_harvested_code_for_paper("2410.10589")
get_code_for_paper("2410.10589")
have("2410.10589")

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

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

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

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

Connect an agent — have() is free.