SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.17249 · 2026

From Compression to Deployment: Real-Time and Energy-Efficient FastGRNN on Ultra-Constrained Microcontrollers

Emre Kızılateş

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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; 10 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2606.17249.json · badge: /api/ran/2606.17249.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
emre1998/fastgrnn-har canonical (classifier label)
classifier basis: census
16 ran · 1 no recorded run
FunctionStatusWhere it lives
arr Ran
ran, violated the contract we drafted
emre1998/fastgrnn-har/analyze_best_route.py
code served (permissive licence) · get_code("4efeadb2e29309c1")
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 1, dtype family int, shape (5,) 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

def arr(vals):
    return np.array(vals)

# The function arr() takes a single parameter 'vals' and converts it to a numpy array
# We need to provide a valid input that can be converted to a numpy array

ARGS = {
    "vals": [1, 2, 3, 4, 5]
}
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 ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) 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
dense Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_ablation.py
code served (permissive licence) · get_code("0341425cb85fcd56")
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 1, dtype family float, shape (0,) 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 tempfile
import json
import os
from pathlib import Path

# Create a temporary directory structure to simulate the experiments folder
temp_dir = tempfile.mkdtemp()
exp_dir = Path(temp_dir) / 'experiments'
exp_dir.mkdir(exist_ok=True)

# Create sample JSON files matching the expected patterns
# For 'hapt' dataset
for seed in [1, 2, 3]:
    hapt_file = exp_dir / f'baseline_fastgrnn_h16_s{seed}_e120.json'
    with open(hapt_file, 'w') as f:
        json.dump({'test_macro_f1': 0.85 + seed * 0.01}, f)

# For other datasets (e.g., 'activity')
for seed in [1, 2, 3]:
    activity_file = exp_dir / f'baseline_activity_fastgrnn_h16_s{seed}_e120.json'
    with open(activity_file, 'w') as f:
        json.dump({'test_macro_f1': 0.80 + seed * 0.01}, f)

# Monkey-patch the EXP variable in the module scope
import sys
import types

# Create a module with the patched EXP path
code = f"""
import glob
import json
import numpy as np
from pathlib import Path

EXP = Path('{temp_dir}') / 'experiments'

def load_f1(pattern, key=None):
    vals = []
    for f in sorted(glob.glob(str(EXP / pattern))):
        r = json.load(open(f))
        vals.append(r[key] if key else r['test_macro_f1'])
    return np.array(vals)

def dense(ds):
    pat = 'baseline_fastgrnn_h16_s*_e120.json' if ds == 'hapt' else f'baseline_{{ds}}_fastgrnn_h16_s*_e120.json'
    return load_f1(pat)
"""

exec(code)

ARGS = {
    'ds': 'hapt'
}
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 ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
fastgrnn_budget_seeds Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_bootstrap.py
code served (permissive licence) · get_code("3b4ca8c62daf5f9f")
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 1, dtype family float, shape (0,) 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 tempfile
import json
from pathlib import Path
import numpy as np

# Create a temporary directory to act as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)

# Create sample experiment files with the expected structure
for seed_idx in range(3):
    file_path = EXP / f'deploy_mnist_s{seed_idx}.json'
    data = {
        'fastgrnn': {
            'q15_f1': float(0.85 + seed_idx * 0.02)
        }
    }
    with open(file_path, 'w', encoding='utf-8') as f:
        json.dump(data, f)

# Define ARGS
ARGS = {
    'ds': 'mnist'
}
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 ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
fastgrnn_step Ran
ran, violated the contract we drafted
emre1998/fastgrnn-har/fastgrnn_numpy.py
code served (permissive licence) · get_code("488a82fc1daf0672")
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 1, dtype family float, shape (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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define dimensions
D = 4  # input dimension
H = 3  # hidden dimension

# Create random input vector
x_t = np.random.randn(D).astype(np.float32)

# Create random hidden state
h_prev = np.random.randn(H).astype(np.float32)

# Create weight matrices
W = np.random.randn(H, D).astype(np.float32)
U = np.random.randn(H, H).astype(np.float32)

# Create bias vectors
b_z = np.random.randn(H).astype(np.float32)
b_h = np.random.randn(H).astype(np.float32)

# Create scalar parameters in [0, 1]
zeta = 0.5
nu = 0.3

ARGS = {
    "x_t": x_t,
    "h_prev": h_prev,
    "W": W,
    "U": U,
    "b_z": b_z,
    "b_h": b_h,
    "zeta": zeta,
    "nu": nu,
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (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
fp32_of Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_deploy_budget.py
code served (permissive licence) · get_code("b4cf7c1fad47f312")
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

torch.manual_seed(0)

# The function fp32_of takes a cell_res parameter and calls .get() on it twice
# with string keys 'sparse_fp32_f1' and 'fp32_f1', so it expects a dict-like object

# Create a minimal cell_res dict that satisfies the function's usage
cell_res = {
    'sparse_fp32_f1': 0.95,
    'fp32_f1': 0.90
}

ARGS = {
    'cell_res': cell_res
}
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 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
load Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_deploy_budget.py
code served (permissive licence) · get_code("23f107197e9436ff")
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 glob
import json
import tempfile
from pathlib import Path

# Create a temporary directory to serve as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)

# Create some sample JSON files matching the pattern deploy_{ds}_s*.json
ds = "test_dataset"
for i in range(3):
    file_path = EXP / f'deploy_{ds}_s{i}.json'
    data = {
        "run_id": i,
        "metrics": {"accuracy": 0.85 + i * 0.01},
        "config": {"batch_size": 32}
    }
    with open(file_path, 'w') as f:
        json.dump(data, f)

ARGS = {
    "ds": "test_dataset"
}
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 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
load_f1 Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_ablation.py
code served (permissive licence) · get_code("5063afef902ba042")
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 1, dtype family float, shape (0,) 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 glob
import json
import numpy as np
from pathlib import Path
import tempfile
import os

# Create a temporary directory to serve as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)

# Create sample JSON files matching the pattern
os.makedirs(EXP / 'results', exist_ok=True)

# Create test JSON files with F1 scores
for i in range(3):
    data = {
        'test_macro_f1': 0.85 + i * 0.05,
        'other_metric': 0.75
    }
    with open(EXP / 'results' / f'result_{i}.json', 'w') as f:
        json.dump(data, f)

# Also create a file with a custom key
custom_data = {
    'test_macro_f1': 0.90,
    'custom_f1': 0.92
}
with open(EXP / 'results' / f'result_custom.json', 'w') as f:
    json.dump(custom_data, f)

# Define arguments for the function
ARGS = {
    'pattern': 'results/result_*.json',
    'key': None
}
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 ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
make_loader Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
emre1998/fastgrnn-har/train_fastgrnn.py
code served (permissive licence) · get_code("502d786e4b2355b6")
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 DataLoader. 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
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create small dummy data
X = np.random.randn(2, 4).astype(np.float32)  # 2 samples, 4 features
y = np.array([0, 1], dtype=np.int64)  # 2 class labels

ARGS = {
    "X": X,
    "y": y,
    "batch_size": 64,
    "shuffle": False,
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
pair Ran
ran; our contract draft was wrong, not the code
emre1998/fastgrnn-har/analyze_drift.py
code served (permissive licence) · get_code("57a18eb12b46f21f")
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 tempfile
import json
from pathlib import Path
import os

# Create a temporary directory structure to simulate the experiments folder
temp_dir = tempfile.mkdtemp()
exp_dir = Path(temp_dir) / 'experiments'
exp_dir.mkdir(exist_ok=True)

# Create some test JSON files with seed patterns in the filename
test_data_old_1 = {'value': 10, 'metric': 0.5}
test_data_new_1 = {'value': 20, 'metric': 0.7}
test_data_old_2 = {'value': 15, 'metric': 0.6}
test_data_new_2 = {'value': 25, 'metric': 0.8}

# Write test files with seed patterns
with open(exp_dir / 'old_model_s1.json', 'w') as f:
    json.dump(test_data_old_1, f)
with open(exp_dir / 'new_model_s1.json', 'w') as f:
    json.dump(test_data_new_1, f)
with open(exp_dir / 'old_model_s2.json', 'w') as f:
    json.dump(test_data_old_2, f)
with open(exp_dir / 'new_model_s2.json', 'w') as f:
    json.dump(test_data_new_2, f)

# Monkey-patch the EXP path in the module
import sys
import types

code = """
import glob
import json
from pathlib import Path

EXP = Path('""" + str(exp_dir) + """')

def jload(p):
    with open(p, encoding='utf-8') as f:
        return json.load(f)

def pair(old_pat, new_pat, field):
    def collect(pat):
        out = {}
        for p in sorted(glob.glob(str(EXP / pat))):
            s = p.split('_s')[-1].split('.')[0].split('_')[0]
            try:
                out[int(s)] = jload(p)
            except (ValueError, json.JSONDecodeError):
                pass
        return out
    o, n = (collect(old_pat), collect(new_pat))
    res = {}
    for s in sorted(set(o) & set(n)):
        try:
            res[s] = (field(o[s]), field(n[s]))
        except KeyError:
            pass
    return res
"""

exec(code)

# Define the field function that extracts a value from the loaded JSON
def field_func(data):
    return data.get('value', 0)

ARGS = {
    'old_pat': 'old_model_s*.json',
    'new_pat': 'new_model_s*.json',
    'field': field_func
}
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 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
params_dense Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_footprint.py
code served (permissive licence) · get_code("7be47579340ddc69")
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 torch

torch.manual_seed(0)

ARGS = {
    'kind': 'fastgrnn',
    'H': 8,
    'C': 4
}
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 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
perclass Ran
ran; our contract draft was wrong, not the code
emre1998/fastgrnn-har/analyze_perclass.py
code served (permissive licence) · get_code("86cf602e4a2a7bea")
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 glob
import json
import numpy as np
from collections import defaultdict
from pathlib import Path
import tempfile
import os

# Create a temporary directory structure for experiments
tmpdir = tempfile.mkdtemp()
EXP = Path(tmpdir) / 'experiments'
EXP.mkdir(parents=True, exist_ok=True)

# Create sample experiment result files
cell_value = 'cell_type_1'
pattern = '{cell}/results_*.json'

# Create subdirectory for cell type
cell_dir = EXP / cell_value
cell_dir.mkdir(parents=True, exist_ok=True)

# Create sample JSON result files
sample_results_1 = {
    'per_class_f1': {
        'class_a': 0.85,
        'class_b': 0.92,
        'class_c': 0.78
    }
}

sample_results_2 = {
    'per_class_f1': {
        'class_a': 0.87,
        'class_b': 0.90,
        'class_c': 0.80
    }
}

with open(cell_dir / 'results_1.json', 'w') as f:
    json.dump(sample_results_1, f)

with open(cell_dir / 'results_2.json', 'w') as f:
    json.dump(sample_results_2, f)

# Patch the EXP path in the module's namespace
import sys
module = sys.modules[__name__]
module.EXP = EXP

ARGS = {
    'cell': cell_value,
    'pattern': '{cell}/results_*.json'
}
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
run_sequence Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
emre1998/fastgrnn-har/fastgrnn_numpy.py
code served (permissive licence) · get_code("e1054c18e8dbdcc6")
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 1, dtype family float, shape (5,) 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

np.random.seed(0)

# Parameters for run_sequence
T = 3  # sequence length
D = 4  # input dimension
H = 5  # hidden dimension

# Create input sequence (T, D)
X = np.random.randn(T, D).astype(np.float32)

# Initial hidden state (H,)
h0 = np.zeros(H, dtype=np.float32)

# Weight matrices
W = np.random.randn(H, D).astype(np.float32)  # (H, D)
U = np.random.randn(H, H).astype(np.float32)  # (H, H)

# Biases
b_z = np.random.randn(H).astype(np.float32)  # (H,)
b_h = np.random.randn(H).astype(np.float32)  # (H,)

# Scalar parameters in [0, 1]
zeta = 0.7
nu = 0.3

# return_all parameter
return_all = False

ARGS = {
    "X": X,
    "h0": h0,
    "W": W,
    "U": U,
    "b_z": b_z,
    "b_h": b_h,
    "zeta": zeta,
    "nu": nu,
    "return_all": return_all,
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
emre1998/fastgrnn-har/fastgrnn_numpy.py
code served (permissive licence) · get_code("156855983d880ed5")
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 as np

# sigmoid takes one parameter: x
# which can be a scalar or NumPy array of any shape
# Let's create a few test cases to show it works with different inputs

# Scalar input
scalar_input = 0.5

# 1D array
array_1d = np.array([0.0, 1.0, -1.0, 2.0])

# 2D array
array_2d = np.array([[0.0, 1.0], [2.0, -1.0]])

# Multi-dimensional array
array_3d = np.array([[[0.1, 0.2], [0.3, 0.4]], [[0.5, 0.6], [0.7, 0.8]]])

# Define ARGS with the scalar input as the primary test case
ARGS = {
    "x": scalar_input
}
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 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
sparse_fp32 Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_ablation.py
code served (permissive licence) · get_code("3952718869a58a08")
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 1, dtype family float, shape (0,) 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 tempfile
import json
import numpy as np
from pathlib import Path
import shutil

# Create a temporary directory to use as our experiments folder
temp_dir = tempfile.mkdtemp()
exp_path = Path(temp_dir) / 'experiments'
exp_path.mkdir(parents=True, exist_ok=True)

# Create sample JSON files matching the pattern deploy_{ds}_s*.json
# The function looks for these files and extracts 'fastgrnn']['sparse_fp32_f1' values
ds_name = 'mnist'

# Create a few sample experiment files
for i in range(3):
    experiment_data = {
        'fastgrnn': {
            'sparse_fp32_f1': float(0.85 + i * 0.05)
        }
    }
    file_path = exp_path / f'deploy_{ds_name}_s{i}.json'
    with open(file_path, 'w') as f:
        json.dump(experiment_data, f)

# Monkey-patch the EXP path in the module context
import sys
import types

# Create a module with the patched EXP path
module_code = f"""
import glob
import json
import numpy as np
from pathlib import Path

EXP = Path('{exp_path}')

def sparse_fp32(ds):
    return np.array([json.load(open(f))['fastgrnn']['sparse_fp32_f1'] for f in sorted(glob.glob(str(EXP / f'deploy_{{ds}}_s*.json')))])
"""

# Execute the patched function definition
exec(module_code, globals())

# Define ARGS with the dataset name parameter
ARGS = {
    'ds': 'mnist'
}
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 ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
sram_working_set Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_footprint.py
code served (permissive licence) · get_code("0a60651079a87d84")
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 torch
import numpy as np

torch.manual_seed(0)

D = 3

# Analyzing the function:
# - kind: string parameter, one of 'fastgrnn', 'gru', or other
# - H: integer, used in arithmetic operations for state and scratch calculations
# - C: integer, used for logits calculation

# The function performs simple arithmetic on H and C to compute SRAM working set
# No complex objects needed, just integers

ARGS = {
    'kind': 'fastgrnn',
    'H': 16,
    'C': 8
}
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 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
tier1_seeds Ran
ran, honoured the contract we drafted
emre1998/fastgrnn-har/analyze_bootstrap.py
code served (permissive licence) · get_code("f333f0e394a1a6c6")
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 1, dtype family float, shape (0,) 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 tempfile
import json
from pathlib import Path
import os

# Create a temporary directory structure to simulate the experiments folder
tmpdir = tempfile.mkdtemp()
exp_dir = Path(tmpdir) / 'experiments'
exp_dir.mkdir(parents=True, exist_ok=True)

# Create mock experiment JSON files for testing
# We'll create files matching the pattern: baseline_{pfx}{cell}_h16_s*_e120.json
for i in range(3):
    filename = exp_dir / f'baseline_hapt_conv_h16_s{i}_e120.json'
    with open(filename, 'w') as f:
        json.dump({'test_macro_f1': 0.5 + i * 0.1}, f)

# Also create files for a non-hapt dataset
for i in range(2):
    filename = exp_dir / f'baseline_uci_lstm_h16_s{i}_e120.json'
    with open(filename, 'w') as f:
        json.dump({'test_macro_f1': 0.6 + i * 0.05}, f)

# Mock the EXP global variable by patching it in the module
import sys
from types import ModuleType

# Create a mock module with the necessary functions and patched EXP
mock_module = ModuleType('mock_tier1')
mock_module.EXP = exp_dir

def jload(p):
    with open(p, encoding='utf-8') as f:
        return json.load(f)

def tier1_seeds(ds, cell):
    import glob
    import numpy as np
    pfx = '' if ds == 'hapt' else f'{ds}_'
    files = sorted(glob.glob(str(exp_dir / f'baseline_{pfx}{cell}_h16_s*_e120.json')))
    return np.array([jload(f)['test_macro_f1'] for f in files])

ARGS = {
    'ds': 'hapt',
    'cell': 'conv'
}
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 ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
jload Not yet run
unverified (harvested, no recorded run)
emre1998/fastgrnn-har/analyze_bootstrap.py
code served (permissive licence) · get_code("2a1e46172a51de87")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 0 later) and 16 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 12 other papers
11 dated earlier, 1 the same month · 1 only as an assembly brick
1506.02640 (2015-06)
You Only Look Once: Unified, Real-Time Object Detection
1602.01783 (2016-02)
Asynchronous Methods for Deep Reinforcement Learning
2106.12930 (2021-06)
VinDr-SpineXR: A deep learning framework for spinal lesions detection and classification from radiographs
and 9 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-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

The dominant trajectory of modern machine learning has been to scale up: larger models, larger accelerators, larger memory budgets. Yet a multi-year global semiconductor supply constraint [1], [2] and the growing energy and carbon cost of always-online inference [3], [4] expose the fragility of this trajectory and motivate the opposite direction: refactoring AI and ML algorithms to fit the small, ubiquitous microcontrollers that are already in mass production in wearables, sensors, and edge appliances. This paper is a study in that direction. We present an end-to-end open-source reproduction of FastGRNN [5], a compact gated recurrent cell, deployed on two bare-metal targets representative of the low end of the available silicon supply: the 8bit Arduino Uno R3 (ATmega328P) and the 16-bit MSP430G2553 (no hardware multiplier; 16 KB Flash; 512 B SRAM). Our compression pipeline combines low-rank weight factorization, iterative hard-thresholding sparsity, and per-tensor Q15 posttraining quantization with explicit activation calibration. The deployed model occupies 566 bytes of weights and achieves macro F1 = 0.918 (seed 0; five-seed Q15 mean 0.853±0.107) on the HAPT test set. It matches a PyTorch reference at 100% prediction agreement across 3,399 test windows (MCU seed 0; 99.91-100% C-equivalent across five seeds). Both platforms sustain real-time 50 Hz streaming inference (9.21 ms per sample on Arduino; 13 ms on MSP430), where a 256-entry sigmoid/tanh look-up table delivers a 30.5× speedup on the multiplier-less MSP430. Four contributions extend the original FastGRNN paper: (i) cross-platform bit-equivalent deterministic inference; (ii) characterization of recurrent warm-up latency (median 74 samples, 1.48 s; worst-case 125 samples, 2.50 s over 100 test windows) that bounds end-to-end response time; (iii) a deployable look-up-table recipe for multiplier-less embedded targets delivering a 30.5× end-to-end speedup; and (iv) a hardware energy characterization showing 17.7 mW active inference power, <0.09 mW idle power, and a 96.7% reduction in energy per inference window with the LUT. Together, these results demonstrate that compact recurrent architectures, combined with calibrated quantization, look-uptable activations, and measured energy profiling, can deliver accurate, memory-efficient, and energy-efficient human activity recognition on ultra-resource-constrained microcontrollers without specialized accelerators.

For agents

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

get_harvested_code_for_paper("2606.17249")
get_code_for_paper("2606.17249")
have("2606.17249")

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

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

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

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

Connect an agent — have() is free.