SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.17056 · CVPR · 2023

Audio-Visual Grouping Network for Sound Localization from Mixtures

Yapeng Tian, Shentong Mo

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 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; 2 failures of our instrument; 5 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/2303.17056.json · badge: /api/ran/2303.17056.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
stonemo/avgn marked official in Papers with Code
Papers with Code archive
6 ran · 5 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
stonemo/avgn/model.py
code served (permissive licence) · get_code("17d5ecc9fb88dc98")
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 3, 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
from torch import nn
from einops import rearrange

class Attention(nn.Module):

    def __init__(self, dim, num_heads, out_dim=None, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0, qkv_fuse=False):
        super().__init__()
        if out_dim is None:
            out_dim = dim
        self.num_heads = num_heads
        head_dim = dim // num_heads
        self.scale = qk_scale or head_dim ** (-0.5)
        self.qkv_fuse = qkv_fuse
        if qkv_fuse:
            self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        else:
            self.q_proj = nn.Linear(dim, dim, bias=qkv_bias)
            self.k_proj = nn.Linear(dim, dim, bias=qkv_bias)
            self.v_proj = nn.Linear(dim, dim, bias=qkv_bias)
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, out_dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def extra_repr(self):
        return f'num_heads={self.num_heads}, \nqkv_bias={self.scale}, \nqkv_fuse={self.qkv_fuse}'

    def forward(self, query, key=None, *, value=None, mask=None):
        if self.qkv_fuse:
            assert key is None
            assert value is None
            x = query
            B, N, C = x.shape
            S = N
            qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4)
            q, k, v = (qkv[0], qkv[1], qkv[2])
        else:
            B, N, C = query.shape
            if key is None:
                key = query
            if value is None:
                value = key
            S = key.size(1)
            q = rearrange(self.q_proj(query), 'b n (h c)-> b h n c', h=self.num_heads, b=B, n=N, c=C // self.num_heads)
            k = rearrange(self.k_proj(key), 'b n (h c)-> b h n c', h=self.num_heads, b=B, c=C // self.num_heads)
            v = rearrange(self.v_proj(value), 'b n (h c)-> b h n c', h=self.num_heads, b=B, c=C // self.num_heads)
        attn = q @ k.transpose(-2, -1) * self.scale
        if mask is not None:
            attn = attn + mask.unsqueeze(dim=1)
            attn = attn.softmax(dim=-1)
        else:
            attn = attn.softmax(dim=-1)
        attn = self.attn_drop(attn)
        assert attn.shape == (B, self.num_heads, N, S)
        out = rearrange(attn @ v, 'b h n c -> b n (h c)', h=self.num_heads, b=B, n=N, c=C // self.num_heads)
        out = self.proj(out)
        out = self.proj_drop(out)
        return out


INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'out_dim': 4,
    'qkv_bias': False,
    'qk_scale': None,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
    'qkv_fuse': False,
}

ARGS = {
    'query': torch.randn(2, 3, 4),
    'key': None,
    'value': None,
    'mask': None,
}

if __name__ == '__main__':
    attn = Attention(**INIT_ARGS)
    output = attn(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
AttnBlock Ran
ran on a synthesized input · constructed an object; no result was computed
stonemo/avgn/model.py
code served (permissive licence) · get_code("60da1158138a6b50")
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, AttnBlock: 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
from timm.models.layers import DropPath

torch.manual_seed(0)

ARGS = {
    'dim': 4,
    'num_heads': 2,
    'mlp_ratio': 4.0,
    'qkv_bias': False,
    'qk_scale': None,
    'drop': 0.0,
    'attn_drop': 0.0,
    'drop_path': 0.0,
    'act_layer': nn.GELU,
    'norm_layer': nn.LayerNorm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AttnBlock — 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 AttnBlock 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
CrossAttnBlock Ran
ran on a synthesized input · constructed an object; no result was computed
stonemo/avgn/model.py
code served (permissive licence) · get_code("de28b2757a2f72e0")
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, CrossAttnBlock: 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
from timm.models.layers import DropPath

torch.manual_seed(0)

# Create small tensors for query and key
batch_size = 2
seq_len_query = 3
seq_len_key = 5
dim = 4
num_heads = 2

query = torch.randn(batch_size, seq_len_query, dim)
key = torch.randn(batch_size, seq_len_key, dim)

# Optional mask tensor (attention mask)
mask = torch.zeros(batch_size, seq_len_query, seq_len_key)

ARGS = {
    'dim': dim,
    'num_heads': num_heads,
    'mlp_ratio': 4.0,
    'qkv_bias': False,
    'qk_scale': None,
    'drop': 0.1,
    'attn_drop': 0.1,
    'drop_path': 0.1,
    'act_layer': nn.GELU,
    'norm_layer': nn.LayerNorm,
    'post_norm': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CrossAttnBlock — 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 CrossAttnBlock 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
stonemo/avgn/model.py
code served (permissive licence) · get_code("86db5e5160400425")
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, Mlp: 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 = {
    "in_features": 4,
    "hidden_features": 8,
    "out_features": 3,
    "act_layer": nn.GELU,
    "drop": 0.1,
}
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 Mlp — 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 Mlp 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
gumbel_softmax Ran
ran; our contract draft was wrong, not the code
stonemo/avgn/model.py
code served (permissive licence) · get_code("7f29142583965575")
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 (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

torch.manual_seed(0)

ARGS = {
    "logits": torch.randn(2, 4),
    "tau": 1.0,
    "hard": False,
    "dim": -1,
}
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 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: none by the harness; any seed is in the setup block
hard_softmax Ran
ran; our contract draft was wrong, not the code
stonemo/avgn/model.py
code served (permissive licence) · get_code("cb0acca1ea9ead1e")
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 (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

torch.manual_seed(0)

# Create a small logits tensor (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

# The dim parameter specifies which dimension to apply softmax/argmax along
dim = 1

ARGS = {
    "logits": logits,
    "dim": dim,
}
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 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: none by the harness; any seed is in the setup block
AVGN Not yet run
unverified (harvested, no recorded run)
stonemo/avgn/model.py
code served (permissive licence) · get_code("5b18341f0e1daf77")
How it ran

no invocation recorded.

AssignAttention Not yet run
unverified (harvested, no recorded run)
stonemo/avgn/model.py
code served (permissive licence) · get_code("611aaa0cec9e3868")
How it ran

no invocation recorded.

GroupingBlock Not yet run
unverified (harvested, no recorded run)
stonemo/avgn/model.py
code served (permissive licence) · get_code("48359c636902109c")
How it ran

no invocation recorded.

GroupingBlock_Han Not yet run
unverified (harvested, no recorded run)
stonemo/avgn/model.py
code served (permissive licence) · get_code("c73e81715c3326c4")
How it ran

no invocation recorded.

ModalityTrans Not yet run
unverified (harvested, no recorded run)
stonemo/avgn/model.py
code served (permissive licence) · get_code("aa83220d016b85b6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 10 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 10 later) and 1 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
Mlp
brick of this paper's assembly: helper
130 other papers
62 dated earlier, 9 the same month, 59 later · 114 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2012.12877 (2020-12)
Training data-efficient image transformers & distillation through attention
and 127 more not named here
Attention
brick of this paper's assembly: model
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2210.10864 (2022-10)
Cluster and Aggregate: Face Recognition with Large Probe Set
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
2311.05152 (2023-11)
Cross-modal Prompts: Adapting Large Pre-trained Models for Audio-Visual Downstream Tasks
AttnBlock
brick of this paper's assembly: model
3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2210.10864 (2022-10)
Cluster and Aggregate: Face Recognition with Large Probe Set
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
2311.05152 (2023-11)
Cross-modal Prompts: Adapting Large Pre-trained Models for Audio-Visual Downstream Tasks
gumbel_softmax
brick of this paper's assembly: helper
3 other papers
3 later
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
2310.19001 (2023-10)
Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic Segmentation
2409.19865 (2024-09)
TokenBinder: Text-Video Retrieval with One-to-Many Alignment Paradigm
hard_softmax
brick of this paper's assembly: helper
3 other papers
3 later
2309.01017 (2023-09)
Contrastive Grouping with Transformer for Referring Image Segmentation
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
2310.19001 (2023-10)
Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic Segmentation
AssignAttention
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
CrossAttnBlock
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
GroupingBlock
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
GroupingBlock_Han
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
ModalityTrans
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning

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

Sound source localization is a typical and challenging task that predicts the location of sound sources in a video. Previous single-source methods mainly used the audiovisual association as clues to localize sounding objects in each image. Due to the mixed property of multiple sound sources in the original space, there exist rare multi-source approaches to localizing multiple sources simultaneously, except for one recent work using a contrastive random walk in the graph with images and separated sound as nodes. Despite their promising performance, they can only handle a fixed number of sources, and they cannot learn compact class-aware representations for individual sources. To alleviate this shortcoming, in this paper, we propose a novel audio-visual grouping network, namely AVGN, that can directly learn category-wise semantic features for each source from the input audio mixture and image to localize multiple sources simultaneously. Specifically, our AVGN leverages learnable audio-visual class tokens to aggregate classaware source features. Then, the aggregated semantic features for each source can be used as guidance to localize the corresponding visual regions. Compared to existing multi-source methods, our new framework can localize a flexible number of sources and disentangle category-aware audio-visual representations for individual sound sources. We conduct extensive experiments on MUSIC, VGGSound-Instruments, and VGG-Sound Sources benchmarks. The results demonstrate that the proposed AVGN can achieve state-of-the-art sounding object localization performance on both single-source and multi-source scenarios. Code is available at https://github.com/stoneMo/ AVGN .

For agents

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

get_harvested_code_for_paper("2303.17056")
get_code_for_paper("2303.17056")
have("2303.17056")

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

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

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

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

Connect an agent — have() is free.