SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1510.03336 · 2015

Evaluating Real-time Anomaly Detection Algorithms - the Numenta Anomaly Benchmark

arXiv · PDF · Open in the Atlas

Code that ran

13 of 18 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; 1 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 0 failures of our instrument; 5 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/1510.03336.json · badge: /api/ran/1510.03336.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
numenta/NAB canonical (classifier label)
classifier basis: census
13 ran · 5 no recorded run
FunctionStatusWhere it lives
bucket Ran
ran on a synthesized input
numenta/NAB/nab/labeler.py
code served (permissive licence) · get_code("9a4c2630adda5a85")
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 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

# Analyze the function: it takes rawTimes (iterable of timestamps) and buffer (numeric threshold)
# The function iterates through rawTimes, compares differences, and groups them into buckets

# Create a list of timestamps (can be floats or ints representing time values)
rawTimes = [1.0, 1.5, 2.0, 5.0, 5.3, 5.8, 10.0]

# Create a buffer value (threshold for grouping timestamps)
buffer = 1.0

ARGS = {
    "rawTimes": rawTimes,
    "buffer": buffer
}
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 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
first_hour_average Ran
ran on a synthesized input
numenta/NAB/nab/detectors/earthgecko_skyline/algorithms.py
code served (permissive licence) · get_code("d33681df918fd2b2")
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 bool, 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 pandas
import tempfile
import os

def tail_avg(timeseries, debug, debug_path):
    """
    This is a utility function used to calculate the average of the last three
    datapoints in the series as a measure, instead of just the last datapoint.
    It reduces noise, but it also reduces sensitivity and increases the delay
    to detection.
    """
    if len(timeseries) < 3:
        return timeseries[-1][1]
    try:
        t = (timeseries[-1][1] + timeseries[-2][1] + timeseries[-3][1]) / 3
        return t
    except IndexError:
        if debug:
            trace = traceback.format_exc()
            errorline = 'error in tail_avg - trace - %s\n' % str(trace)
            with open(debug_path + '/nab.earthgecko_skyline.algorithm.errors.txt', 'a') as errorfile:
                errorfile.write(errorline)
        return timeseries[-1][1]

def first_hour_average(timeseries, debug, debug_path):
    """
    Calcuate the simple average over one hour, one day ago.
    A timeseries is anomalous if the average of the last three datapoints
    are outside of three standard deviations of this value.
    """
    try:
        last_hour_threshold = timeseries[-1][0] - (86400 - 3600)
        series = pandas.Series([x[1] for x in timeseries if x[0] < last_hour_threshold])
        mean = series.mean()
        stdDev = series.std()
        t = tail_avg(timeseries, debug, debug_path)
        return abs(t - mean) > 3 * stdDev
    except:
        if debug:
            trace = traceback.format_exc()
            errorline = 'error in first_hour_average - %s\n' % str(trace)
            with open(debug_path + '/nab.earthgecko_skyline.algorithm.errors.txt', 'a') as errorfile:
                errorfile.write(errorline)
        return None

# Create a temporary directory for debug output
temp_dir = tempfile.mkdtemp()

# Construct a timeseries as a list of (timestamp, value) tuples
# The function expects:
# - timeseries[-1][0] to be the latest timestamp
# - timeseries[-1][1] to be the latest value
# - Multiple datapoints with timestamps going back in time
# We need at least some datapoints from "one day ago" minus one hour
timeseries = [
    (1000000, 10.0),
    (1010000, 11.0),
    (1020000, 12.0),
    (1030000, 13.0),
    (1040000, 14.0),
    (1050000, 15.0),
    (88000000, 20.0),  # This is ~1 day ago from the last timestamp
    (88010000, 21.0),
    (88020000, 22.0),
    (88030000, 23.0),
    (88040000, 24.0),
    (88050000, 25.0),
    (88100000, 26.0),  # Latest timestamp
]

ARGS = {
    'timeseries': timeseries,
    'debug': False,
    'debug_path': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
first_hour_average Ran
ran on a synthesized input
numenta/NAB/nab/detectors/skyline/algorithms.py
code served (permissive licence) · get_code("d6971b9504b89d63")
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 bool, 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.

from datetime import datetime, timedelta
import pandas
import numpy as np

# Construct a valid timeseries argument
# The function expects a list of tuples where each tuple is (timestamp, value)
# It needs at least 3 datapoints for tail_avg, and ideally a full day's worth for first_hour_average

now = datetime.now()
timeseries = []

# Create 26 hours of data (more than needed for the one day ago calculation)
for i in range(26 * 60):  # 26 hours in minutes
    timestamp = now - timedelta(minutes=26*60 - i)
    # Use a simple sinusoidal pattern with some noise
    value = 100.0 + 10.0 * np.sin(i / 60.0) + np.random.normal(0, 0.5)
    timeseries.append((timestamp, value))

ARGS = {
    "timeseries": timeseries
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
getCSVData Ran
ran on a synthesized input
numenta/NAB/nab/plot.py
code served (permissive licence) · get_code("bada6902c220a897")
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 DataFrame. 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file for testing
temp_dir = tempfile.mkdtemp()
temp_csv_path = os.path.join(temp_dir, "test_data.csv")

# Write a simple CSV file
csv_data = """col1,col2,col3
1,2,3
4,5,6
7,8,9"""

with open(temp_csv_path, 'w') as f:
    f.write(csv_data)

ARGS = {
    'dataPath': temp_csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family int 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
getProbationPeriod Ran
ran on a synthesized input
numenta/NAB/nab/util.py
code served (permissive licence) · get_code("1eca27b865505abe")
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 int, ndim 0, dtype family int, 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 math

def getProbationPeriod(probationPercent, fileLength):
    """Return the probationary period index."""
    return min(math.floor(probationPercent * fileLength), probationPercent * 5000)

ARGS = {
    "probationPercent": 0.1,
    "fileLength": 1000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
median_absolute_deviation Ran
ran on a synthesized input
numenta/NAB/nab/detectors/earthgecko_skyline/algorithms.py
code served (permissive licence) · get_code("aed7e82e6637d2b8")
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 bool, 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 numpy as np
import pandas
import tempfile
import os

# Create a temporary directory for debug output
temp_dir = tempfile.mkdtemp()

# Create a valid timeseries: list of tuples where each tuple is (index, value)
# The function extracts x[1] from each element, so we need tuples with values
timeseries = [
    (0, 10.0),
    (1, 11.0),
    (2, 9.5),
    (3, 10.2),
    (4, 9.8),
    (5, 35.0),  # anomalous point - far from median
]

# Set up arguments
ARGS = {
    'timeseries': timeseries,
    'debug': False,
    'debug_path': temp_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
median_absolute_deviation Ran
ran on a synthesized input
numenta/NAB/nab/detectors/skyline/algorithms.py
code served (permissive licence) · get_code("9239f56a1214dbbb")
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 bool, 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 numpy as np
import pandas

# Construct a valid timeseries argument
# The function expects timeseries to be an iterable of tuples where each tuple has at least 2 elements
# and the second element (index 1) is a numeric value

timeseries = [
    (0, 5.0),
    (1, 5.2),
    (2, 5.1),
    (3, 5.3),
    (4, 5.0),
    (5, 50.0),  # This is an anomalous point - large deviation from median
]

ARGS = {
    "timeseries": timeseries
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
merge Ran
ran on a synthesized input
numenta/NAB/nab/labeler.py
code served (permissive licence) · get_code("2450f3c7bccc409c")
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. 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)

# First, we need to set up arguments for the merge function
# Looking at the merge function:
# - rawBuckets: a list of buckets (each bucket is a list of timestamps)
# - threshold: an integer representing the minimum bucket size

# Create sample buckets of timestamps
rawBuckets = [
    [1.0, 1.2, 1.1],      # bucket with 3 timestamps
    [5.0, 5.3],            # bucket with 2 timestamps
    [10.0, 10.1, 10.05, 10.15],  # bucket with 4 timestamps
    [20.0],                # bucket with 1 timestamp
]

threshold = 2

ARGS = {
    "rawBuckets": rawBuckets,
    "threshold": threshold,
}
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 tuple — a tuple 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
prepAnomalyListForScoring Ran
ran on a synthesized input
numenta/NAB/nab/sweeper.py
code served (permissive licence) · get_code("89aa393bd105e967")
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 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

# Create a simple stand-in class for anomalies
class Anomaly:
    def __init__(self, windowName, anomalyScore):
        self.windowName = windowName
        self.anomalyScore = anomalyScore

# Create a list of anomaly objects with different window names and scores
inputAnomalyList = [
    Anomaly(windowName='probationary', anomalyScore=0.9),
    Anomaly(windowName='window1', anomalyScore=0.7),
    Anomaly(windowName='probationary', anomalyScore=0.8),
    Anomaly(windowName='window2', anomalyScore=0.95),
    Anomaly(windowName='window3', anomalyScore=0.6),
]

ARGS = {
    'inputAnomalyList': inputAnomalyList
}
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 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
scaledSigmoid Ran
ran on a synthesized input
numenta/NAB/nab/sweeper.py
code served (permissive licence) · get_code("c5f00c23fb7e6f64")
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 float, 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 math

def sigmoid(x):
    """Standard sigmoid function."""
    return 1 / (1 + math.exp(-x))

def scaledSigmoid(relativePositionInWindow):
    """Return a scaled sigmoid function given a relative position within a
    labeled window.  The function is computed as follows:

    A relative position of -1.0 is the far left edge of the anomaly window and
    corresponds to S = 2*sigmoid(5) - 1.0 = 0.98661.  This is the earliest to be
    counted as a true positive.

    A relative position of -0.5 is halfway into the anomaly window and
    corresponds to S = 2*sigmoid(0.5*5) - 1.0 = 0.84828.

    A relative position of 0.0 consists of the right edge of the window and
    corresponds to S = 2*sigmoid(0) - 1 = 0.0.

    Relative positions > 0 correspond to false positives increasingly far away
    from the right edge of the window. A relative position of 1.0 is past the
    right  edge of the  window and corresponds to a score of 2*sigmoid(-5) - 1.0 =
    -0.98661.

    @param  relativePositionInWindow (float)  A relative position
                                              within a window calculated per the
                                              rules above.

    @return (float)
    """
    if relativePositionInWindow > 3.0:
        val = -1.0
    else:
        val = 2 * sigmoid(-5 * relativePositionInWindow) - 1.0
    return val


ARGS = {
    "relativePositionInWindow": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
sigmoid Ran
ran, honoured the contract we drafted
numenta/NAB/nab/sweeper.py
code served (permissive licence) · get_code("19a920b3f3c3951e")
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 float, 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 math

def sigmoid(x):
    """Standard sigmoid function."""
    return 1 / (1 + math.exp(-x))

# The sigmoid function takes a single numeric parameter x
# and returns the sigmoid of that value

ARGS = {
    "x": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
tail_avg Ran
ran on a synthesized input
numenta/NAB/nab/detectors/earthgecko_skyline/algorithms.py
code served (permissive licence) · get_code("32efefbc4b964aa2")
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 float, 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 traceback
import tempfile
import os

def tail_avg(timeseries, debug, debug_path):
    """
    This is a utility function used to calculate the average of the last three
    datapoints in the series as a measure, instead of just the last datapoint.
    It reduces noise, but it also reduces sensitivity and increases the delay
    to detection.
    """
    if len(timeseries) < 3:
        return timeseries[-1][1]
    try:
        t = (timeseries[-1][1] + timeseries[-2][1] + timeseries[-3][1]) / 3
        return t
    except IndexError:
        if debug:
            trace = traceback.format_exc()
            errorline = 'error in tail_avg - trace - %s\n' % str(trace)
            with open(debug_path + '/nab.earthgecko_skyline.algorithm.errors.txt', 'a') as errorfile:
                errorfile.write(errorline)
        return timeseries[-1][1]


# Create a temporary directory for debug_path
temp_dir = tempfile.mkdtemp()

# timeseries: list of tuples where each tuple contains (timestamp, value)
# Need at least 3 elements to test the averaging logic
timeseries = [
    (1000, 10.5),
    (1001, 11.2),
    (1002, 12.3),
    (1003, 13.1),
]

# debug: boolean flag to control error logging
debug = True

# debug_path: directory path where error logs are written
debug_path = temp_dir

ARGS = {
    'timeseries': timeseries,
    'debug': debug,
    'debug_path': debug_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
tail_avg Ran
ran on a synthesized input
numenta/NAB/nab/detectors/skyline/algorithms.py
code served (permissive licence) · get_code("cc3aa4a683bb7b7e")
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 float, 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
import numpy as np

torch.manual_seed(0)

# The function expects a timeseries which is a list-like object where each element
# has a second index [1] that can be accessed (tuple-like or list-like structure).
# It accesses timeseries[-1][1], timeseries[-2][1], timeseries[-3][1]
# to compute an average, with a fallback to just timeseries[-1][1] if IndexError occurs.

# Create a timeseries with at least 3 elements, each being a tuple/list with index [1]
timeseries = [
    (0.1, 1.5),
    (0.2, 2.3),
    (0.3, 3.1),
    (0.4, 4.2)
]

ARGS = {
    "timeseries": timeseries
}
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 float, 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
getJSONData Not yet run
unverified (harvested, no recorded run)
numenta/NAB/nab/plot.py
code served (permissive licence) · get_code("7f34e0f9672bb223")
How it ran

no invocation recorded.

getOldDict Not yet run
unverified (harvested, no recorded run)
numenta/NAB/nab/util.py
code served (permissive licence) · get_code("f270befe213c6d47")
How it ran

no invocation recorded.

grubbs Not yet run
unverified (harvested, no recorded run)
numenta/NAB/nab/detectors/earthgecko_skyline/skyline_algorithms.py
code served (permissive licence) · get_code("c7bfdf528eb66864")
How it ran

no invocation recorded.

ks_test Not yet run
unverified (harvested, no recorded run)
numenta/NAB/nab/detectors/earthgecko_skyline/skyline_algorithms.py
code served (permissive licence) · get_code("8353d7533e02a90f")
How it ran

no invocation recorded.

updateFinalResults Not yet run
unverified (harvested, no recorded run)
numenta/NAB/nab/util.py
code served (permissive licence) · get_code("8f147fded2cf0061")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 17 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
sigmoid 8 other papers
1 dated earlier, 7 later
1509.07892 (2015-09)
Evasion and Hardening of Tree Ensemble Classifiers
1902.00981 (2019-02)
Learning Counterfactual Representations for Estimating Individual Dose-Response Curves
1906.03849 (2019-06)
Robustness Verification of Tree-based Models
and 5 more not named here

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

Much of the world's data is streaming, time-series data, where anomalies give significant information in critical situations; examples abound in domains such as finance, IT, security, medical, and energy. Yet detecting anomalies in streaming data is a difficult task, requiring detectors to process data in real-time, not batches, and learn while simultaneously making predictions. There are no benchmarks to adequately test and score the efficacy of real-time anomaly detectors. Here we propose the Numenta Anomaly Benchmark (NAB), which attempts to provide a controlled and repeatable environment of open-source tools to test and measure anomaly detection algorithms on streaming data. The perfect detector would detect all anomalies as soon as possible, trigger no false alarms, work with real-world time-series data across a variety of domains, and automatically adapt to changing statistics. Rewarding these characteristics is formalized in NAB, using a scoring algorithm designed for streaming data. NAB evaluates detectors on a benchmark dataset with labeled, real-world time-series data. We present these components, and give results and analyses for several open source, commercially-used algorithms. The goal for NAB is to provide a standard, open source framework with which the research community can compare and evaluate different algorithms for detecting anomalies in streaming data.

For agents

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

get_harvested_code_for_paper("1510.03336")
get_code_for_paper("1510.03336")
have("1510.03336")

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

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

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

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

Connect an agent — have() is free.