SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.13800 · NeurIPS · 2024

Dense Connector for MLLMs

Taojiannan Yang, Wanli Ouyang, Jingdong Wang, Yifan Sun, Haocheng Feng, Wenhao Wu, Huanjin Yao, Yuxin Song, Mengxi Zhang, Zhiheng Li

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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; 1 no recorded run), measured 2026-11-23; 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/2405.13800.json · badge: /api/ran/2405.13800.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
HJYao00/DenseConnector canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
hjyao00/denseconnector canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
dense_connector_dci Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HJYao00/DenseConnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("be57d00e5f80aa2e")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 16) 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 torch.nn as nn

torch.manual_seed(0)

# Create a mock output object that has hidden_states attribute
class MockImageForwardOuts:
    def __init__(self, num_hidden_states, seq_len, hidden_dim, is_siglip=True):
        # For siglip: 26 hidden states (0-25), each with shape (batch, seq_len, hidden_dim)
        # For non-siglip: 24 hidden states (0-23), each with shape (batch, seq_len, hidden_dim)
        self.hidden_states = [
            torch.randn(2, seq_len, hidden_dim) for _ in range(num_hidden_states)
        ]

# Test case 1: is_siglip=True
# Need 26 hidden states (indices 0-25)
image_forward_outs_siglip = MockImageForwardOuts(
    num_hidden_states=26,
    seq_len=5,
    hidden_dim=8,
    is_siglip=True
)

# image_features tensor - used for dtype conversion
# Shape: (batch_size, feature_dim)
image_features_siglip = torch.randn(2, 16, dtype=torch.float32)

# Test case 2: is_siglip=False
# Need 24 hidden states (indices 0-23)
image_forward_outs_non_siglip = MockImageForwardOuts(
    num_hidden_states=24,
    seq_len=5,
    hidden_dim=8,
    is_siglip=False
)

image_features_non_siglip = torch.randn(2, 16, dtype=torch.float32)

ARGS = {
    "image_features": image_features_siglip,
    "image_forward_outs": image_forward_outs_siglip,
    "is_siglip": True
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 16) — shape (2, 5, 16) 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
dense_connector_dci Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hjyao00/denseconnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("14a1bc132ea59a9f")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 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)

# Create a mock object for image_forward_outs with hidden_states attribute
class MockImageForwardOuts:
    def __init__(self, num_hidden_states, seq_len, hidden_dim, is_siglip=True):
        # For siglip: 26 hidden states (0-25), each with shape (batch, seq_len, hidden_dim)
        # For non-siglip: 24 hidden states (0-23), each with shape (batch, seq_len, hidden_dim)
        self.hidden_states = [
            torch.randn(2, seq_len, hidden_dim) for _ in range(num_hidden_states)
        ]

# Test case 1: is_siglip=True
# Needs 26 hidden states (indices 0-25)
image_forward_outs_siglip = MockImageForwardOuts(
    num_hidden_states=26,
    seq_len=5,
    hidden_dim=4,
    is_siglip=True
)

# image_features tensor - used for dtype conversion
# Shape: (batch, feature_dim)
image_features_siglip = torch.randn(2, 8, dtype=torch.float32)

# Test case 2: is_siglip=False
# Needs 24 hidden states (indices 0-23), and slices [:, 1:] so seq_len must be > 1
image_forward_outs_non_siglip = MockImageForwardOuts(
    num_hidden_states=24,
    seq_len=5,
    hidden_dim=4,
    is_siglip=False
)

image_features_non_siglip = torch.randn(2, 8, dtype=torch.float32)

# Define ARGS for the siglip case
ARGS = {
    "image_features": image_features_siglip,
    "image_forward_outs": image_forward_outs_siglip,
    "is_siglip": True
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 8) — shape (2, 5, 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
dense_connector_sci Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HJYao00/DenseConnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("ba53c93945b602f4")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a mock object for image_forward_outs with hidden_states attribute
class MockForwardOutput:
    def __init__(self, batch_size=2, seq_len=5, hidden_dim=4):
        # Create hidden_states as a list with at least 16 elements (indices 0-15)
        # Each hidden state has shape (batch_size, seq_len, hidden_dim)
        self.hidden_states = [
            torch.randn(batch_size, seq_len, hidden_dim) 
            for _ in range(16)
        ]

# Create image_features tensor
batch_size = 2
hidden_dim = 4
image_features = torch.randn(batch_size, hidden_dim, dtype=torch.float32)

# Create image_forward_outs with hidden_states
image_forward_outs = MockForwardOutput(batch_size=batch_size, seq_len=5, hidden_dim=hidden_dim)

# Test both is_siglip cases
ARGS = {
    "image_features": image_features,
    "image_forward_outs": image_forward_outs,
    "is_siglip": True
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 8) — shape (2, 5, 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
dense_connector_sci Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hjyao00/denseconnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("24ed3fa200b261dc")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 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)

# Create a mock object for image_forward_outs with hidden_states attribute
class MockForwardOutput:
    def __init__(self, is_siglip=True):
        batch_size = 2
        seq_len = 5 if is_siglip else 6  # Different seq_len to distinguish
        hidden_dim = 4
        
        # Create hidden_states as a list with at least 16 elements
        # Layer 7 and 15 will be accessed
        self.hidden_states = [
            torch.randn(batch_size, seq_len, hidden_dim) for _ in range(16)
        ]

# Create image_features tensor
image_features = torch.randn(2, 3, 4, dtype=torch.float32)

# Create image_forward_outs for siglip case
image_forward_outs = MockForwardOutput(is_siglip=True)

ARGS = {
    "image_features": image_features,
    "image_forward_outs": image_forward_outs,
    "is_siglip": True,
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 8) — shape (2, 5, 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
dense_connector_sti Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HJYao00/DenseConnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("03b91d218209f7f9")
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 Tensor, ndim 3, dtype family float, shape (2, 16, 768) 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 torch.nn as nn

torch.manual_seed(0)

# Create a mock object for image_forward_outs that has hidden_states attribute
class MockForwardOuts:
    def __init__(self, is_siglip=True):
        batch_size = 2
        seq_len = 64  # Will be pooled down by factor of 8
        hidden_dim = 768
        
        # Create hidden_states as a list with at least 16 elements
        # Layer 7 and layer 15 will be accessed
        self.hidden_states = []
        for i in range(16):
            self.hidden_states.append(torch.randn(batch_size, seq_len, hidden_dim))

# Create image_features tensor
batch_size = 2
image_features = torch.randn(batch_size, 64, 768, dtype=torch.float32)

# Create image_forward_outs with hidden_states
image_forward_outs = MockForwardOuts(is_siglip=True)

ARGS = {
    "image_features": image_features,
    "image_forward_outs": image_forward_outs,
    "is_siglip": True
}
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 Tensor, ndim 3, dtype family float, shape (2, 16, 768) — shape (2, 16, 768) 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
dense_connector Not yet run
unverified (harvested, no recorded run)
HJYao00/DenseConnector/dc/model/multimodal_projector/dense_connector.py
code served (permissive licence) · get_code("cc348531d44c97af")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 4 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 4 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

Do we fully leverage the potential of visual encoder in Multimodal Large Language Models (MLLMs)? The recent outstanding performance of MLLMs in multimodal understanding has garnered broad attention from both academia and industry. In the current MLLM rat race, the focus seems to be predominantly on the linguistic side. We witness the rise of larger and higher-quality instruction datasets, as well as the involvement of larger-sized LLMs. Yet, scant attention has been directed towards the visual signals utilized by MLLMs, often assumed to be the final high-level features extracted by a frozen visual encoder. In this paper, we introduce the Dense Connector -a simple, effective, and plug-and-play vision-language connector that significantly enhances existing MLLMs by leveraging multi-layer visual features, with minimal additional computational overhead. Building on this, we also propose the Efficient Dense Connector, which achieves performance comparable to LLaVA-v1.5 with only 25% of the visual tokens. Furthermore, our model, trained solely on images, showcases remarkable zero-shot capabilities in video understanding as well. Experimental results across various vision encoders, image resolutions, training dataset scales, varying sizes of LLMs (2.7B→70B), and diverse architectures of MLLMs (e.g., LLaVA-v1.5, LLaVA-NeXT and Mini-Gemini) validate the versatility and scalability of our approach, achieving state-of-the-art performance across 19 image and video benchmarks. We hope that this work will provide valuable experience and serve as a basic module for future MLLM development. Code is available at https://github.com/HJYao00/DenseConnector.

For agents

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

get_harvested_code_for_paper("2405.13800")
get_code_for_paper("2405.13800")
have("2405.13800")

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

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

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

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

Connect an agent — have() is free.