SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.04266 · NeurIPS · 2023

Activity Grammars for Temporal Action Segmentation

Minsu Cho, Suha Kwak, Joonseok Lee, Dayoung Gong, Deunsol Jung

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-24; 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/2312.04266.json · badge: /api/ran/2312.04266.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
gongda0e/kari canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
FunctionStatusWhere it lives
state Ran
ran; our contract draft was wrong, not the code
gongda0e/kari/kari.py
code served (permissive licence) · get_code("43c9f4ee54cbfa4e")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:31:23Z). 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 = {
    "s": "state_",
    "n": 42
}
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 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
State Ran
ran on a synthesized input · constructed an object; no result was computed
gongda0e/kari/bep.py
code served (permissive licence) · get_code("a5a7ca180bd4ca14")
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, State: 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 numpy as np

# Define a minimal Rule class that satisfies the interface used in State
class Rule:
    def __init__(self, lhs, rhs):
        self._lhs = lhs
        self._rhs = rhs
    
    def lhs(self):
        return self._lhs
    
    def rhs(self):
        return self._rhs
    
    def __str__(self):
        return f"{self._lhs} -> {' '.join(str(s) for s in self._rhs)}"

# Create a sample rule: S -> NP VP
rule = Rule("S", ["NP", "VP", "Punct"])

# Define arguments for State constructor
ARGS = {
    "r": rule,
    "dot": 1,  # position of dot in the RHS
    "start": 0,  # start position in input
    "end": 3,  # end position in input
    "i": 0,  # index i
    "j": 1,  # index j
    "k": 2,  # index k
    "rule_index": 5,  # index of the rule
    "operation": "scan",  # operation type
    "last_i": 0,  # previous i
    "last_j": 0,  # previous j
    "last_rule_index": 4,  # previous rule index
    "prefix": ["the", "dog"],  # list of prefix strings
    "prob": 0.75,  # probability value
    "forward": 0.0005,  # forward probability (tests formatting with 1e notation)
    "inner": 0.125,  # inner probability
}
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 State — 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 State 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
concat_seqs_to_seqs Ran
ran; our contract draft was wrong, not the code
gongda0e/kari/kari.py
code served (permissive licence) · get_code("99b12cd7e43a02eb")
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 numpy as np

def concat_seqs_to_seqs(seqs1, seqs2, max_len=10):
    seqs = []
    for seq1 in seqs1:
        seqs += [' '.join([seq1, seq2]) for seq2 in seqs2 if len(seq1.split()) + len(seq2.split()) < max_len]
    seqs = list(set([' '.join(seq.rstrip().lstrip().split()) for seq in seqs]))
    return seqs

# Define test data
seqs1 = [
    "hello world",
    "foo bar baz",
    "a b"
]

seqs2 = [
    "test",
    "example data",
    "x y z"
]

max_len = 10

ARGS = {
    "seqs1": seqs1,
    "seqs2": seqs2,
    "max_len": max_len
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
format_num Ran
ran; our contract draft was wrong, not the code
gongda0e/kari/bep.py
code served (permissive licence) · get_code("17b55e70208dd3ca")
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 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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    'num': 0.0005
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
remove_consecutive Ran
ran, honoured the contract we drafted
gongda0e/kari/kari.py
code served (permissive licence) · get_code("14303f0e90cccc3b")
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. 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - remove_consecutive takes a parameter 'l' which is iterable
# - It iterates through elements 'a' in 'l'
# - For each 'a', it checks if consecutive elements are equal (a[i] == a[i+1])
# - It filters out elements that have consecutive duplicates
# - Returns a list of elements without consecutive duplicates

# The function expects a list of sequences (lists, tuples, or arrays)
# where each sequence can be indexed and compared

# Create test data: list of sequences
# Some with consecutive duplicates, some without
sequence_without_consecutive = [1, 2, 3, 4]
sequence_with_consecutive = [1, 1, 2, 3]
sequence_with_consecutive_2 = [1, 2, 2, 3]
sequence_without_consecutive_2 = [5, 6, 7]

l = [
    sequence_without_consecutive,
    sequence_with_consecutive,
    sequence_without_consecutive_2,
    sequence_with_consecutive_2,
]

ARGS = {
    "l": l
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is 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
BreadthFirstEarley Not yet run
unverified (harvested, no recorded run)
gongda0e/kari/bep.py
code served (permissive licence) · get_code("5c537cba3835d120")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 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.

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Sequence prediction on temporal data requires the ability to understand compositional structures of multi-level semantics beyond individual and contextual properties. The task of temporal action segmentation, which aims at translating an untrimmed activity video into a sequence of action segments, remains challenging for this reason. This paper addresses the problem by introducing an effective activity grammar to guide neural predictions for temporal action segmentation. We propose a novel grammar induction algorithm that extracts a powerful context-free grammar from action sequence data. We also develop an efficient generalized parser that transforms frame-level probability distributions into a reliable sequence of actions according to the induced grammar with recursive rules. Our approach can be combined with any neural network for temporal action segmentation to enhance the sequence prediction and discover its compositional structure. Experimental results demonstrate that our method significantly improves temporal action segmentation in terms of both performance and interpretability on two standard benchmarks, Breakfast and 50 Salads.

For agents

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

get_harvested_code_for_paper("2312.04266")
get_code_for_paper("2312.04266")
have("2312.04266")

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

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

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

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

Connect an agent — have() is free.