SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.16036 · CVPR · 2025

Hybrid-Level Instruction Injection for Video Token Compression in Multi-modal Large Language Models

Longxiang Tang, Zhihang Liu, Chen-Wei Xie, Pandeng Li, Yun Zheng, Hongtao Xie, Chuanbin Liu, Liming Zhao

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 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 1 has no contract verdict; 1 failure 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/2503.16036.json · badge: /api/ran/2503.16036.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
lntzm/HICom community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
HIComProjector Ran
ran on a synthesized input · constructed an object; no result was computed
lntzm/HICom/hicom/model/projector.py
code served (permissive licence) · get_code("640230d27ec3a711")
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, HIComProjector: 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
import torch.nn as nn
import copy

torch.manual_seed(0)

# Stand-in config class with required attributes
class MockConfig:
    def __init__(self):
        self.mm_vision_tower = "openai/clip-vit-base-patch32"
        self.mm_patch_merge_type = "flat"
        self.mm_newline_position = "one_token"
        self.use_clip_scale = ""

# Minimal compressor module that mimics what the code expects
class MockCompressor(nn.Module):
    def __init__(self, input_dim=4, output_dim=4):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, frames_feature, frames_embed, guide_embed, modal, logit_scale=None, logit_bias=None):
        # Simple mock implementation
        # frames_feature shape: (batch, t, h, w, d)
        batch, t, h, w, d = frames_feature.shape
        output = self.linear(frames_feature)
        return output

# Create config
config = MockConfig()

# Create small tensor dimensions for clarity
batch_size = 2
time_steps = 3
height = 4
width = 5
feature_dim = 6

# Create mock local and global compressors
local_compressor = MockCompressor(input_dim=feature_dim, output_dim=feature_dim)
global_compressor = MockCompressor(input_dim=feature_dim, output_dim=feature_dim)

# Create test tensors
frames_feature = torch.randn(batch_size, time_steps, height, width, feature_dim)
frames_embed = torch.randn(batch_size, time_steps, feature_dim)
guide_embed = torch.randn(batch_size, feature_dim)
image_newline = torch.randn(feature_dim)

ARGS = {
    'config': config,
    'local_compressor': local_compressor,
    'global_compressor': global_compressor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type HIComProjector — 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 HIComProjector 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
post_process_visual_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lntzm/HICom/hicom/model/projector.py
code served (permissive licence) · get_code("fef413d047134d7a")
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 (25, 5) 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 einops

torch.manual_seed(0)

# Create a minimal config class with the required attributes
class MinimalConfig:
    def __init__(self):
        self.mm_patch_merge_type = 'spatial'
        self.mm_newline_position = 'one_token'

config = MinimalConfig()

# Create a small visual feature tensor: (t, h, w, d) = (2, 3, 4, 5)
visual_feature = torch.randn(2, 3, 4, 5)

# Modal can be 'video' or 'image'
modal = 'video'

# Image newline token: (d,) where d matches the last dimension of visual_feature
image_newline = torch.randn(5)

# Boolean flag for anyres
is_anyres = False

ARGS = {
    'config': config,
    'visual_feature': visual_feature,
    'modal': modal,
    'image_newline': image_newline,
    'is_anyres': is_anyres,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, 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 (25, 5) — shape (25, 5) 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 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Recent Multi-modal Large Language Models (MLLMs) have been challenged by the computational overhead resulting from massive video frames, often alleviated through compression strategies. However, the visual content is not equally contributed to user instructions, existing strategies (e.g., average pool) inevitably lead to the loss of potentially useful information. To tackle this, we propose the Hybridlevel Instruction Injection Strategy for Conditional Token Compression in MLLMs (HICom), utilizing the instruction as a condition to guide the compression from both local and global levels. This encourages the compression to retain the maximum amount of user-focused information while reducing visual tokens to minimize computational burden. Specifically, the instruction condition is injected into the grouped visual tokens at the local level and the learnable tokens at the global level, and we conduct the attention mechanism to complete the conditional compression. From the hybridlevel compression, the instruction-relevant visual parts are highlighted while the temporal-spatial structure is also preserved for easier understanding of LLMs. To further unleash the potential of HICom, we introduce a new conditional pre-training stage with our proposed dataset HICom-248K. Experiments show that our HICom can obtain distinguished video understanding ability with fewer tokens, increasing the performance by 2.43% average on three multiple-choice QA benchmarks and saving 78.8% tokens compared with the SOTA method. The code is available at https://github.com/lntzm/HICom.

For agents

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

get_harvested_code_for_paper("2503.16036")
get_code_for_paper("2503.16036")
have("2503.16036")

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

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

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

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

Connect an agent — have() is free.