SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.04640 · ECCV · 2024

Enhancing Multimodal Large Language Model to Answer Questions in Dynamic Audio-Visual Scenarios

Philip Torr, Xiaochun Cao, Rui Shao, Zitong Yu, Qilang Ye, Xinyu Xie

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 5 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/2403.04640.json · badge: /api/ran/2403.04640.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
rikeilong/bay-cat canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
FunctionStatusWhere it lives
disabled_train Ran
ran, violated the contract we drafted
rikeilong/bay-cat/ADPO_CAT/model/blip2.py
code served (permissive licence) · get_code("4cb732f513d69dfd")
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 SimpleModel. 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

torch.manual_seed(0)

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()

ARGS = {
    "self": model,
    "mode": 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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
find_all_linear_names Ran
ran; our contract draft was wrong, not the code
rikeilong/bay-cat/ADPO_CAT/train_dpo.py
code served (permissive licence) · get_code("649fc48067a48529")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal model with Linear layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Sequential(
            nn.Linear(3, 2),
            nn.ReLU()
        )
        self.lm_head = nn.Linear(2, 5)
        self.other_linear = nn.Linear(5, 4)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.lm_head(x)
        x = self.other_linear(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 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
float2bfloat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rikeilong/bay-cat/ADPO_CAT/train_dpo.py
code served (permissive licence) · get_code("3e8496a15d60d4ae")
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 MockFlashAttentionModule. 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

torch.manual_seed(0)

# Mock the upcast_layer_for_flash_attention function
class MockFlashAttentionModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.attention = nn.MultiheadAttention(embed_dim=4, num_heads=2, batch_first=True)
    
    def forward(self, x):
        return self.linear(x)

# Create a simple model to pass
model = MockFlashAttentionModule()

# Mock the utils_flash.llama_patch module
import sys
from unittest.mock import MagicMock

mock_utils_flash = MagicMock()
mock_llama_patch = MagicMock()

def mock_upcast_layer_for_flash_attention(model, torch_dtype):
    # Simple mock implementation that converts model to the target dtype
    for param in model.parameters():
        param.data = param.data.to(torch_dtype)
    return model

mock_llama_patch.upcast_layer_for_flash_attention = mock_upcast_layer_for_flash_attention
mock_utils_flash.llama_patch = mock_llama_patch

sys.modules['utils_flash'] = mock_utils_flash
sys.modules['utils_flash.llama_patch'] = mock_llama_patch

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, utils_flash — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockFlashAttentionModule — a MockFlashAttentionModule output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockFlashAttentionModule 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_image_from_base64 Ran
ran, honoured the contract we drafted
rikeilong/bay-cat/ADPO_CAT/mm_utils.py
code served (permissive licence) · get_code("c3ee9d07c900dd55")
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 PngImageFile. 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 base64
from PIL import Image
from io import BytesIO
import numpy as np

# Create a small valid image in memory
img_array = np.uint8(np.random.rand(10, 10, 3) * 255)
img = Image.fromarray(img_array, mode='RGB')

# Encode to base64
buffer = BytesIO()
img.save(buffer, format='PNG')
buffer.seek(0)
image_base64 = base64.b64encode(buffer.read()).decode('utf-8')

ARGS = {
    'image': image_base64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 3 and dtype family int 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
process_images Ran
ran; our contract draft was wrong, not the code
rikeilong/bay-cat/ADPO_CAT/mm_utils.py
code served (permissive licence) · get_code("1df990c375318896")
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 4, dtype family float, shape (2, 3, 4, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal image processor stand-in
class MockImageProcessor:
    def __call__(self, images, return_tensors=None):
        # The function calls this with images and return_tensors='pt'
        # It expects a dict with 'pixel_values' key containing a tensor
        if isinstance(images, list):
            # Stack list of images into batch
            stacked = torch.stack(images)
        else:
            stacked = images
        
        return {
            'pixel_values': stacked
        }

# Create minimal model config (unused in function body, but required parameter)
model_cfg = {}

# Create sample images - batch of 2, with shape (3, 4, 4) for RGB images of size 4x4
images = [
    torch.randn(3, 4, 4),
    torch.randn(3, 4, 4)
]

# Create image processor
image_processor = MockImageProcessor()

ARGS = {
    'images': images,
    'image_processor': image_processor,
    'model_cfg': model_cfg
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
tile Ran
ran; our contract draft was wrong, not the code
rikeilong/bay-cat/ADPO_CAT/model/base_model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from MengzhouLu/RetroMPA, is pointer only (licence: NONE) · get_code("cb33571427334815")
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 MengzhouLu/RetroMPA, 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.

violates_moderation Ran
ran, violated the contract we drafted
rikeilong/bay-cat/ADPO_CAT/model/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Mi3-Lab/doScenes-VLM-Planning, is pointer only (licence: AGPL-3.0) · get_code("f9939a84b9a65279")
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 Mi3-Lab/doScenes-VLM-Planning, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

all_gather_with_grad Not yet run
unverified (harvested, no recorded run)
rikeilong/bay-cat/ADPO_CAT/model/base_model.py
code served (permissive licence) · get_code("0ec9fc2025c16f65")
How it ran

no invocation recorded.

load_lora Not yet run
unverified (harvested, no recorded run)
rikeilong/bay-cat/ADPO_CAT/model/builder.py
code served (permissive licence) · get_code("d6b600df5a8550bc")
How it ran

no invocation recorded.

load_pretrained_model Not yet run
unverified (harvested, no recorded run)
rikeilong/bay-cat/ADPO_CAT/model/builder.py
code served (permissive licence) · get_code("875f23fe2e181106")
How it ran

no invocation recorded.

maybe_zero_3 Not yet run
unverified (harvested, no recorded run)
rikeilong/bay-cat/ADPO_CAT/train_dpo.py
code served (permissive licence) · get_code("616ffbdc154ed2d8")
How it ran

no invocation recorded.

pretty_print_semaphore Not yet run
unverified (harvested, no recorded run)
rikeilong/bay-cat/ADPO_CAT/model/utils.py
code served (permissive licence) · get_code("37899f22fb191b37")
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, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 7 the same month, 10 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.

FunctionAlso present inEarliest-datedOthers named
disabled_train 173 other papers
86 dated earlier, 9 the same month, 70 later, 8 same year, order not determinable · 5 only as an assembly brick
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
and 170 more not named here
all_gather_with_grad 91 other papers
48 dated earlier, 4 the same month, 35 later, 4 same year, order not determinable · 2 only as an assembly brick
2206.02967 (2022-06)
Masked Unsupervised Self-training for Label-free Image Classification
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
2302.06605 (2023-02)
UniAdapter: Unified Parameter-Efficient Transfer Learning for Cross-modal Modeling
and 88 more not named here
load_image_from_base64 85 other papers
24 dated earlier, 6 the same month, 51 later, 4 same year, order not determinable
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2308.10253 (2023-08)
StableLLaVA: Enhanced Visual Instruction Tuning with Synthesized Image-Dialogue Data
2309.07120 (2023-09)
Sight Beyond Text: Multi-Modal Training Enhances LLMs in Truthfulness and Ethics
and 82 more not named here
tile 84 other papers
47 dated earlier, 4 the same month, 28 later, 5 same year, order not determinable
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
2210.07795 (2022-10)
EfficientVLM: Fast and Accurate Vision-Language Models via Knowledge Distillation and Modal-adaptive Pruning
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
and 81 more not named here
violates_moderation 56 other papers
16 dated earlier, 4 the same month, 35 later, 1 same year, order not determinable
2106.06909 (2021-06)
GigaSpeech: An Evolving, Multi-domain ASR Corpus with 10,000 Hours of Transcribed Audio
2308.03279 (2023-08)
UniversalNER: TARGETED DISTILLATION FROM LARGE LANGUAGE MODELS FOR OPEN NAMED ENTITY RECOGNITION
2308.13437 (2023-08)
Position-Enhanced Visual Instruction Tuning for Multimodal Large Language Models
and 53 more not named here
pretty_print_semaphore 54 other papers
14 dated earlier, 4 the same month, 35 later, 1 same year, order not determinable
2106.06909 (2021-06)
GigaSpeech: An Evolving, Multi-domain ASR Corpus with 10,000 Hours of Transcribed Audio
2308.13437 (2023-08)
Position-Enhanced Visual Instruction Tuning for Multimodal Large Language Models
2309.07120 (2023-09)
Sight Beyond Text: Multi-Modal Training Enhances LLMs in Truthfulness and Ethics
and 51 more not named here
maybe_zero_3 37 other papers
7 dated earlier, 30 later
2310.01779 (2023-10)
HallE-Control: Controlling Object Hallucination in Large Multimodal Models
2311.16839 (2023-11)
Beyond Hallucinations: Enhancing LVLMs through Hallucination-Aware Direct Preference Optimization
2312.02949 (2023-12)
LLaVA-Grounding: Grounded Visual Chat with Large Multimodal Models
and 34 more not named here
find_all_linear_names 22 other papers
5 dated earlier, 16 later, 1 same year, order not determinable
2308.09936 (2023-08)
BLIVA: A Simple Multimodal LLM for Better Handling of Text-Rich Visual Questions
2310.13023 (2023-10)
GraphGPT: Graph Instruction Tuning for Large Language Models
2311.13194 (2023-11)
Towards Improving Document Understanding: An Exploration on Text-Grounding via MLLMs
and 19 more not named here
process_images 15 other papers
7 dated earlier, 1 the same month, 6 later, 1 same year, order not determinable
2309.07120 (2023-09)
Sight Beyond Text: Multi-Modal Training Enhances LLMs in Truthfulness and Ethics
2311.16208 (2023-11)
InstructMol: Multi-Modal Integration for Building a Versatile and Reliable Molecular Assistant in Drug Discovery
2311.18445 (2023-11)
VTimeLLM: Empower LLM to Grasp Video Moments
and 12 more not named here
load_lora 2 other papers
1 dated earlier, 1 later
2311.18445 (2023-11)
VTimeLLM: Empower LLM to Grasp Video Moments
2411.19772 (2024-11)
LongVALE: Vision-Audio-Language-Event Benchmark Towards Time-Aware Omni-Modal Perception of Long Videos

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

This paper focuses on the challenge of answering questions in scenarios that are composed of rich and complex dynamic audiovisual components. Although existing Multimodal Large Language Models (MLLMs) can respond to audio-visual content, these responses are sometimes ambiguous and fail to describe specific audio-visual events. To overcome this limitation, we introduce the CAT, which enhances MLLM in three ways: 1) besides straightforwardly bridging audio and video, we design a clue aggregator that aggregates question-related clues in dynamic audio-visual scenarios to enrich the detailed knowledge required for large language models. 2) CAT is trained on a mixed multimodal dataset, allowing direct application in audio-visual scenarios. Notably, we collect an audio-visual joint instruction dataset named AVinstruct, to further enhance the capacity of CAT to model cross-semantic correlations. 3) we propose AI-assisted ambiguity-aware direct preference optimization, a strategy specialized in retraining the model to favor the non-ambiguity response and improve the ability to localize specific audiovisual objects. Extensive experimental results demonstrate that CAT outperforms existing methods on multimodal tasks, especially in Audio-Visual Question Answering (AVQA) tasks. The codes and the collected instructions will be released soon.

For agents

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

get_harvested_code_for_paper("2403.04640")
get_code_for_paper("2403.04640")
have("2403.04640")

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

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

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

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

Connect an agent — have() is free.