SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.06391 · 2018

Learning to Listen, Read, and Follow: Score Following as a Reinforcement Learning Game

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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 6 have no contract verdict; 1 failure 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/1807.06391.json · badge: /api/ran/1807.06391.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
CPJKU/score_following_game canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
cast_optim_params Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/agents/optim_utils.py
code served (permissive licence) · get_code("6cbd8b84ce428b76")
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 dict. 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 numpy as np
from ast import literal_eval as make_tuple

# Test the function with various parameter types
ARGS = {
    "optim_params": {
        "lr": "0.001",
        "momentum": "0.9",
        "weight_decay": "1e-5",
        "betas": "(0.9, 0.999)",
        "eps": "1e-8",
        "schedule": "(100, 200, 300)",
        "already_float": 0.5,
        "integer_string": "42",
        "plain_string": "adam",
    }
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_network Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/agents/networks_utils.py
code served (permissive licence) · get_code("5b3e31752a76d9a2")
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 MockNetwork. 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 importlib
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock module and network class
mock_module = MagicMock()

class MockNetwork(torch.nn.Module):
    def __init__(self, n_actions, activation=None, **shapes):
        super().__init__()
        self.n_actions = n_actions
        self.activation = activation
        self.shapes = shapes
        self.linear = torch.nn.Linear(4, n_actions)
    
    def forward(self, x):
        return self.linear(x)

# Set up the mock module to return our network class
mock_module.MockNetwork = MockNetwork

# Patch importlib.import_module to return our mock module
original_import = importlib.import_module
def mock_import(name):
    if 'score_following_game.agents' in name:
        return mock_module
    return original_import(name)

importlib.import_module = mock_import

ARGS = {
    'file': 'test_agent',
    'network_name': 'MockNetwork',
    'n_actions': 8,
    'shapes': {'input_dim': 4, 'hidden_dim': 16},
    'activation': torch.nn.ReLU()
}
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 MockNetwork — a MockNetwork output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockNetwork 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
get_opencv_bar Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/utils.py
code served (permissive licence) · get_code("55f01012b2824dbb")
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 ndarray, ndim 3, dtype family int, shape (500, 100, 3) 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 cv2
import numpy as np

ARGS = {
    "value": 5.5,
    "bar_heigth": 500,
    "min_value": 0,
    "max_value": 11,
    "color": (255, 255, 0),
    "title": "Test Bar"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (500, 100, 3) — shape (500, 100, 3) 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
get_optimizer Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/agents/optim_utils.py
code served (permissive licence) · get_code("4c12014a9ee59130")
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 Adam. 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
import torch.optim as optim

torch.manual_seed(0)

# Create a simple neural network model
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the model
model = SimpleModel()

# Get model parameters
params = model.parameters()

# Define ARGS dict with all required parameters
ARGS = {
    "optimizer_name": "Adam",
    "params": params,
    "lr": 0.001,
    "betas": (0.9, 0.999),
    "eps": 1e-8,
    "weight_decay": 0.0
}
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 Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam 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
num_flat_features Ran
ran; our contract draft was wrong, not the code
CPJKU/score_following_game/score_following_game/agents/networks_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from AI-secure/PSBA, is pointer only (licence: NONE) · get_code("f9e64946b23edb51")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from AI-secure/PSBA, 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.

setup_logger Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/experiment_utils.py
code served (permissive licence) · get_code("bd6f4051caf6272a")
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 SummaryWriter. 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 os
import sys
import numpy as np
import tempfile

class Args:
    def __init__(self):
        self.log_dir = tempfile.mkdtemp()
        self.log_gradients = True

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SummaryWriter — a SummaryWriter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SummaryWriter 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
write_video Ran
ran on a synthesized input
CPJKU/score_following_game/score_following_game/utils.py
code served (permissive licence) · get_code("60481c7fa3a49bcc")
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 str. 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 numpy as np
import cv2
import tempfile
import os

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()
output_path = os.path.join(temp_dir, 'output.mp4')

# Create a list of sample images (numpy arrays in BGR format for OpenCV)
# Images should be (height, width, 3) for color images
image1 = np.random.randint(0, 256, (480, 640, 3), dtype=np.uint8)
image2 = np.random.randint(0, 256, (480, 640, 3), dtype=np.uint8)
images = [image1, image2]

ARGS = {
    'images': images,
    'fn_output': output_path,
    'frame_rate': 20,
    'overwrite': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
initialize_trained_agent Not yet run
unverified (harvested, no recorded run)
CPJKU/score_following_game/score_following_game/experiment_utils.py
code served (permissive licence) · get_code("c01971874b5456bd")
How it ran

no invocation recorded.

prepare_grad_for_render Not yet run
unverified (harvested, no recorded run)
CPJKU/score_following_game/score_following_game/integrated_gradients.py
code served (permissive licence) · get_code("4228790a0a1e15a5")
How it ran

no invocation recorded.

setup_agent Not yet run
unverified (harvested, no recorded run)
CPJKU/score_following_game/score_following_game/experiment_utils.py
code served (permissive licence) · get_code("2d17361dd306dde2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 9 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
num_flat_features 2 other papers
2 later
1812.05905 (2018-12)
Soft Actor-Critic Algorithms and Applications
2106.06056 (2021-06)
Progressive-Scale Boundary Blackbox Attack via Projective Gradient Estimation

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

Score following is the process of tracking a musical performance (audio) with respect to a known symbolic representation (a score). We start this paper by formulating score following as a multimodal Markov Decision Process, the mathematical foundation for sequential decision making. Given this formal definition, we address the score following task with state-of-the-art deep reinforcement learning (RL) algorithms such as synchronous advantage actor critic (A2C). In particular, we design multimodal RL agents that simultaneously learn to listen to music, read the scores from images of sheet music, and follow the audio along in the sheet, in an end-to-end fashion. All this behavior is learned entirely from scratch, based on a weak and potentially delayed reward signal that indicates to the agent how close it is to the correct position in the score. Besides discussing the theoretical advantages of this learning paradigm, we show in experiments that it is in fact superior compared to previously proposed methods for score following in raw sheet music images.

For agents

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

get_harvested_code_for_paper("1807.06391")
get_code_for_paper("1807.06391")
have("1807.06391")

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

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

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

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

Connect an agent — have() is free.