SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.09050 · 2018

A Comparison of Five Multiple Instance Learning Pooling Functions for Sound Event Detection with Weak Labeling

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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 8 have no contract verdict; 0 failures of our instrument; 3 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/1810.09050.json · badge: /api/ran/1810.09050.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
MaigoAkisame/cmu-thesis canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
YashNita/Polyphonic-Sound-Event-Detection-with-Weak-Labeling-Dataset-given- community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
ap_and_auc Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/audioset/util_out.py
code served (permissive licence) · get_code("58ef7ac325dd3893")
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 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 numpy

# Analyze the function:
# ap_and_auc takes two parameters: pred and truth
# Both are passed to roc() which does:
#   - numpy.array(sorted(zip(pred, truth), reverse=True))
#   - Expects pred and truth to be sequences that can be zipped
#   - truth is converted to bool via .astype('bool')
#   - Operations: indexing, cumsum, diff, concatenate
# So pred and truth should be array-like (lists or numpy arrays of numbers)

# Create simple test data
# pred: prediction scores (should be numeric, will be sorted in descending order)
# truth: ground truth labels (will be converted to bool)

pred = numpy.array([0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.1])
truth = numpy.array([1, 1, 0, 1, 0, 0, 1, 0])

ARGS = {
    'pred': pred,
    'truth': truth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
ap_and_auc Ran
ran on a synthesized input
YashNita/Polyphonic-Sound-Event-Detection-with-Weak-Labeling-Dataset-given-/code/audioset/util_out.py
code served (permissive licence) · get_code("468ae65eee4ad3b9")
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 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 numpy

# Construct valid arguments for ap_and_auc function
# The function expects:
# - pred: array-like of prediction scores (floats)
# - truth: array-like of binary ground truth labels (0s and 1s)

# Create small test data
pred = numpy.array([0.9, 0.8, 0.7, 0.6, 0.5, 0.4])
truth = numpy.array([1, 1, 0, 1, 0, 0])

ARGS = {
    "pred": pred,
    "truth": truth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
dcase_sed_eval Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/dcase/util_out.py
code served (permissive licence) · get_code("f3b54d1391d77862")
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 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 numpy

# Analyze the function to determine required arguments
# outputs: tuple/list where outputs[1] is reshaped to (-1, seg_len, num_classes)
#          and outputs[2] is used for 'att' pooling
# pooling: string - one of 'max', 'ave', 'lin', 'exp', 'att'
# thres: threshold value for binary classification
# truth: array reshaped to (-1, seg_len, num_classes)
# seg_len: segment length
# verbose: boolean

# Create small test data
numpy.random.seed(0)

seg_len = 3
num_classes = 4
num_segments = 2

# outputs[1]: shape will be reshaped to (-1, seg_len, num_classes)
# So flat shape needs to be compatible: (batch * seg_len, num_classes)
# Let's make it (6, 4) which reshapes to (2, 3, 4)
output1 = numpy.random.rand(6, 4).astype(numpy.float32)

# outputs[2]: attention weights, same shape as output1 for 'att' pooling
output2 = numpy.random.rand(6, 4).astype(numpy.float32)

outputs = [None, output1, output2]

# truth: shape (6, 4) which reshapes to (2, 3, 4)
truth = numpy.random.rand(6, 4) > 0.5

# Pooling method to test
pooling = 'att'

# Threshold for binary classification
thres = 0.5

# Verbose flag
verbose = False

ARGS = {
    'outputs': outputs,
    'pooling': pooling,
    'thres': thres,
    'truth': truth,
    'seg_len': seg_len,
    'verbose': verbose
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
dprime Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/audioset/util_out.py
code served (permissive licence) · get_code("7deba3f50936a9aa")
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 float64, ndim 0, 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 numpy
from scipy import stats

# The function dprime takes an auc parameter (Area Under Curve)
# which should be a numeric value between 0 and 1
# stats.norm().ppf() expects a probability value
# numpy.sqrt() works on numeric values

auc_value = 0.75

ARGS = {
    "auc": auc_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
f1 Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/audioset/util_f1.py
code served (permissive licence) · get_code("12e77c4861731d4f")
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 0, dtype family float, shape () 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)

# f1 computes the Dice coefficient between two binary tensors
# It uses: & (bitwise AND), .sum() methods on tensors
# pred and truth should be boolean or binary tensors of the same shape

pred = torch.tensor([
    [True, False, True, False],
    [True, True, False, True]
])

truth = torch.tensor([
    [True, True, False, False],
    [True, False, True, True]
])

ARGS = {
    "pred": pred,
    "truth": truth
}
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 0, dtype family float, shape () — shape () 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
optimize_f1 Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/audioset/util_f1.py
code served (permissive licence) · get_code("641dea6e3d3da22f")
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 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 numpy

# Analyze the function signature and body:
# - scores: used in sorted(zip(scores, truth)) - needs to be iterable of numbers
# - truth: used in sorted(zip(scores, truth)) and truth.sum() - needs .sum() method
# - extraNcorr: numeric, default 0
# - extraNtrue: numeric, default 0
# - extraNpred: numeric, default 0

# truth needs to support:
# - iteration in zip with scores
# - .sum() method
# So it should be a numpy array of booleans/integers

numpy.random.seed(0)

# Create small test data
scores = numpy.array([0.1, 0.4, 0.3, 0.9, 0.2])
truth = numpy.array([0, 1, 0, 1, 1], dtype=bool)

ARGS = {
    "scores": scores,
    "truth": truth,
    "extraNcorr": 0,
    "extraNtrue": 0,
    "extraNpred": 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
roc Ran
ran on a synthesized input
MaigoAkisame/cmu-thesis/code/audioset/util_out.py
code served (permissive licence) · get_code("3cf447568262ce51")
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 2, dtype family int; 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 numpy

# The roc function takes two parameters:
# - pred: prediction scores (numeric array-like)
# - truth: ground truth labels (numeric array-like, will be cast to bool)

# Create small sample data
pred = numpy.array([0.9, 0.8, 0.7, 0.6, 0.5, 0.4])
truth = numpy.array([1, 1, 0, 1, 0, 0])

ARGS = {
    'pred': pred,
    'truth': truth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — 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
roc Ran
ran on a synthesized input
YashNita/Polyphonic-Sound-Event-Detection-with-Weak-Labeling-Dataset-given-/code/audioset/util_out.py
code served (permissive licence) · get_code("3aa4e3dd02f3e986")
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 2, 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 numpy

# The function takes two parameters: pred and truth
# Both should be array-like objects that can be converted to numpy arrays
# pred: predicted scores/probabilities
# truth: ground truth binary labels (0 or 1)

# Create small sample data
pred = [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]
truth = [1, 1, 0, 1, 0, 0, 1, 0]

ARGS = {
    "pred": pred,
    "truth": truth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
bulk_load Not yet run
unverified (harvested, no recorded run)
MaigoAkisame/cmu-thesis/code/audioset/util_in.py
code served (permissive licence) · get_code("04c1c4d79ac81163")
How it ran

no invocation recorded.

bulk_load Not yet run
unverified (harvested, no recorded run)
MaigoAkisame/cmu-thesis/code/dcase/util_in.py
code served (permissive licence) · get_code("5ad8d01f1699da9a")
How it ran

no invocation recorded.

optimize_micro_avg_f1 Not yet run
unverified (harvested, no recorded run)
MaigoAkisame/cmu-thesis/code/audioset/util_f1.py
code served (permissive licence) · get_code("43b9836c48a19064")
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 10 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 10 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-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

Sound event detection (SED) entails two subtasks: recognizing what types of sound events are present in an audio stream (audio tagging), and pinpointing their onset and offset times (localization). In the popular multiple instance learning (MIL) framework for SED with weak labeling, an important component is the pooling function. This paper compares five types of pooling functions both theoretically and experimentally, with special focus on their performance of localization. Although the attention pooling function is currently receiving the most attention, we find the linear softmax pooling function to perform the best among the five. Using this pooling function, we build a neural network called TALNet. It is the first system to reach state-of-the-art audio tagging performance on Audio Set, while exhibiting strong localization performance on the DCASE 2017 challenge at the same time.

For agents

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

get_harvested_code_for_paper("1810.09050")
get_code_for_paper("1810.09050")
have("1810.09050")

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

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

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

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

Connect an agent — have() is free.