SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.12623 · EMNLP · 2025

DeepResonance: Enhancing Multimodal Music Understanding via Music-centric Multi-way Instruction Tuning

Yuki Mitsufuji, Mengjie Zhao, Qiyu Wu, Hiromi Wakaki, Zhuoyuan Mao

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 (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 5 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/2502.12623.json · badge: /api/ran/2502.12623.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
sony/DeepResonance community
Papers with Code archive
7 ran · 5 no recorded run
FunctionStatusWhere it lives
LlamaMLP Ran
ran on a synthesized input · constructed an object; no result was computed
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("4105ecc8df8a8154")
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, LlamaMLP: 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

torch.manual_seed(0)

ARGS = {
    "hidden_size": 8,
    "intermediate_size": 16,
    "hidden_act": "silu"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LlamaMLP — 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 LlamaMLP 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
LlamaRMSNorm Ran
ran on a synthesized input · constructed an object; no result was computed
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("ef0f3d688eac1213")
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, LlamaRMSNorm: 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

torch.manual_seed(0)

# LlamaRMSNorm takes hidden_size and eps as parameters
# hidden_size: the dimension of the hidden states
# eps: epsilon for numerical stability in variance calculation

hidden_size = 4
eps = 1e-6

ARGS = {
    "hidden_size": hidden_size,
    "eps": eps,
}
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 LlamaRMSNorm — 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 LlamaRMSNorm 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
LlamaRotaryEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("5f256ecadc2081af")
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, LlamaRotaryEmbedding: 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

torch.manual_seed(0)

ARGS = {
    "dim": 64,
    "max_position_embeddings": 512,
    "base": 10000,
    "device": 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 LlamaRotaryEmbedding — 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 LlamaRotaryEmbedding 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
StoppingCriteriaSub Ran
ran on a synthesized input · constructed an object; no result was computed
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("4cdc48d738bd28c0")
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, StoppingCriteriaSub: 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 transformers import StoppingCriteria, StoppingCriteriaList

torch.manual_seed(0)

# Define the StoppingCriteriaSub class as provided
class StoppingCriteriaSub(StoppingCriteria):
    def __init__(self, stops: list = None, encounters: int = 1):
        super().__init__()
        self.stops = stops
        self.ENCOUNTERS = encounters

    def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor):
        stop_count = 0
        for stop in self.stops:
            _stop = torch.tensor(stop).to(input_ids[0].device)
            indices = torch.where(_stop[0] == input_ids)
            for i in indices:
                if len(i) > 0:
                    if torch.all(input_ids[0][i:i + len(_stop)] == _stop):
                        stop_count += 1
        if stop_count >= self.ENCOUNTERS:
            return True
        return False

# Construct valid arguments
# stops: List of stop sequences (each stop sequence is a list of token ids)
stops = [[50256], [2]]  # Example stop token sequences

# encounters: int representing how many stop sequences must be encountered to stop
encounters = 1

ARGS = {
    "stops": stops,
    "encounters": encounters,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type StoppingCriteriaSub — 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 StoppingCriteriaSub 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
_expand_mask Ran
ran; our contract draft was wrong, not the code
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("61ecf291f8900bce")
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 4, dtype family float, shape (2, 1, 3, 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 attention mask tensor of shape [bsz, seq_len]
# bsz=2, seq_len=4
mask = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# dtype for expansion
dtype = torch.float32

# Optional tgt_len parameter
tgt_len = 3

ARGS = {
    "mask": mask,
    "dtype": dtype,
    "tgt_len": tgt_len,
}
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 4, dtype family float, shape (2, 1, 3, 4) — shape (2, 1, 3, 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
_make_causal_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("c5c590da5a7c2a3f")
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, 1, 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

torch.manual_seed(0)

# Construct arguments for _make_causal_mask
input_ids_shape = torch.Size([2, 4])  # bsz=2, tgt_len=4
dtype = torch.float32
device = torch.device('cpu')
past_key_values_length = 0

ARGS = {
    'input_ids_shape': input_ids_shape,
    'dtype': dtype,
    'device': device,
    'past_key_values_length': past_key_values_length
}
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, 1, 4, 4) — shape (2, 1, 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
apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("dffca8afadd5d56c")
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, ndim 5, 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

torch.manual_seed(0)

# Analyze the function:
# - q: tensor, shape used in operations with cos/sin
# - k: tensor, same shape as q
# - cos: tensor, gathered along dim 2 using position_ids
# - sin: tensor, gathered along dim 2 using position_ids
# - position_ids: tensor, shape [batch, seq_len], used to gather from cos/sin

batch_size = 2
num_heads = 3
seq_len = 4
head_dim = 4

# q and k: [batch, num_heads, seq_len, head_dim]
q = torch.randn(batch_size, num_heads, seq_len, head_dim)
k = torch.randn(batch_size, num_heads, seq_len, head_dim)

# cos and sin: [1, num_heads, max_position_embeddings, head_dim]
# Need enough positions to gather from
max_positions = 10
cos = torch.randn(1, num_heads, max_positions, head_dim)
sin = torch.randn(1, num_heads, max_positions, head_dim)

# position_ids: [batch, seq_len]
# Values should be valid indices into the max_positions dimension
position_ids = torch.tensor([
    [0, 1, 2, 3],
    [0, 1, 2, 3]
], dtype=torch.long)

ARGS = {
    "q": q,
    "k": k,
    "cos": cos,
    "sin": sin,
    "position_ids": position_ids
}
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, ndim 5, dtype family float — a tuple 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
DeepResonanceModel Not yet run
unverified (harvested, no recorded run)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("2dd71742c7d0c8e5")
How it ran

no invocation recorded.

LlamaAttention Not yet run
unverified (harvested, no recorded run)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("586f7e54af865636")
How it ran

no invocation recorded.

LlamaDecoderLayer Not yet run
unverified (harvested, no recorded run)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("40826a087f0fbbed")
How it ran

no invocation recorded.

LlamaForCausalLM Not yet run
unverified (harvested, no recorded run)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("b386ff5ca1779cbf")
How it ran

no invocation recorded.

LlamaModel Not yet run
unverified (harvested, no recorded run)
sony/DeepResonance/code/model/deepresonance.py
code served (permissive licence) · get_code("5c2dbf28bfa2c492")
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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 2 the same month, 3 later) and 6 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
apply_rotary_pos_emb
brick of this paper's assembly: helper
47 other papers
44 dated earlier, 1 the same month, 2 later
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
and 44 more not named here
_expand_mask
brick of this paper's assembly: helper
16 other papers
12 dated earlier, 1 the same month, 3 later · 8 only as an assembly brick
2203.08913 (2022-03)
Memorizing Transformers
2204.05999 (2022-04)
InCoder: A Generative Model for Code Infilling and Synthesis
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 13 more not named here
_make_causal_mask
brick of this paper's assembly: helper
3 other papers
3 dated earlier · 2 only as an assembly brick
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases
2406.12246 (2024-06)
TroL: Traversal of Layers for Large Language and Vision Models
LlamaMLP
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
2409.19872 (2024-09)
Towards Unified Multimodal Editing with Enhanced Knowledge Collaboration
LlamaRotaryEmbedding
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases
2503.12340 (2025-03)
SVD-LLM V2: Optimizing Singular Value Truncation for Large Language Model Compression
LlamaRMSNorm
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases

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 advancements in music large language models (LLMs) have significantly improved music understanding tasks, which involve the model's ability to analyze and interpret various musical elements. These improvements primarily focused on integrating both music and text inputs. However, the potential of incorporating additional modalities such as images, videos and textual music features to enhance music understanding remains unexplored. To bridge this gap, we propose DeepResonance, a multimodal music understanding LLM fine-tuned via multiway instruction tuning with multi-way aligned music, text, image, and video data. To this end, we construct Music4way-MI2T, Music4way-MV2T, and Music4way-Any2T, three 4-way training and evaluation datasets designed to enable DeepResonance to integrate both visual and textual music feature content. We also introduce multi-sampled ImageBind embeddings and a pre-LLM fusion Transformer to enhance modality fusion prior to input into text LLMs, tailoring for multi-way instruction tuning. Our model achieves state-of-the-art performances across six music understanding tasks, highlighting the benefits of the auxiliary modalities and the structural superiority of DeepResonance. We open-source the codes, models and datasets we constructed: https: //github.com/sony/DeepResonance.

For agents

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

get_harvested_code_for_paper("2502.12623")
get_code_for_paper("2502.12623")
have("2502.12623")

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

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

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

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

Connect an agent — have() is free.