SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.14812 · NeurIPS · 2022

TaSIL: Taylor Series Imitation Learning

Daniel Pfrommer, Thomas Zhang, Stephen Tu, Nikolai Matni

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 1 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/2205.14812.json · badge: /api/ran/2205.14812.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
unstable-zeros/tasil canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
PRNGSequence Ran
ran on a synthesized input · constructed an object; no result was computed
unstable-zeros/tasil/imitation_learning/bc.py
code served (permissive licence) · get_code("ab7f13ba53ed7145")
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, PRNGSequence: 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 jax.random
import jax.numpy as jnp

# Test with an integer seed
ARGS = {
    "key_or_seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PRNGSequence — 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 PRNGSequence 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
Trainer Ran
ran on a synthesized input · constructed an object; no result was computed
unstable-zeros/tasil/imitation_learning/bc.py
code served (permissive licence) · get_code("025268da83260725")
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, Trainer: 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 jax
import jax.numpy as jnp
import jax.random
import optax
import flax.core.frozen_dict as frozen_dict


class MockDataset:
    def __init__(self, num_samples=8, feature_dim=4):
        self.num_samples = num_samples
        self.feature_dim = feature_dim
        self._data = None
    
    def preload(self):
        # Create dummy data
        key = jax.random.PRNGKey(0)
        self._data = [
            (jax.random.normal(key, (self.feature_dim,)), jnp.array(0.5))
            for _ in range(self.num_samples)
        ]
        return self
    
    def shuffle(self, key, buf_size=None):
        return self
    
    def batch(self, batch_size):
        return self
    
    def iter(self):
        return MockIterator(self._data, batch_size=2)
    
    def __len__(self):
        return (self.num_samples + 1) // 2


class MockIterator:
    def __init__(self, data, batch_size=2):
        self.data = data
        self.batch_size = batch_size
        self.idx = 0
        self.has_next = True
    
    def next(self):
        if self.idx >= len(self.data):
            self.has_next = False
            # Return empty batch
            batch = (jnp.zeros((0, 4)), jnp.zeros(0))
            return self, batch
        
        end_idx = min(self.idx + self.batch_size, len(self.data))
        batch_x = jnp.stack([self.data[i][0] for i in range(self.idx, end_idx)])
        batch_y = jnp.stack([self.data[i][1] for i in range(self.idx, end_idx)])
        batch = (batch_x, batch_y)
        
        self.idx = end_idx
        if self.idx >= len(self.data):
            self.has_next = False
        
        return self, batch


def mock_loss_fn(key, variables, batch, iteration):
    """Loss function that vmap will call per sample."""
    x, y = batch
    params = variables['params']
    
    # Simple linear prediction
    pred = jnp.sum(params['w'] * x)
    loss = (pred - y) ** 2
    
    stats = {'loss': loss}
    batch_stats = frozen_dict.freeze({'batch_stats': jnp.array(0.0)})
    
    return loss, stats, batch_stats


def mock_opt_init(params):
    """Initialize optimizer state."""
    return optax.adam(learning_rate=0.01).init(params)


def mock_opt_update(grads, opt_state, params):
    """Update parameters with gradients."""
    optimizer = optax.adam(learning_rate=0.01)
    updates, new_opt_state = optimizer.update(grads, opt_state, params)
    return updates, new_opt_state


# Create initial params
initial_params = frozen_dict.freeze({
    'params': {
        'w': jnp.ones(4)
    }
})

# Create dataset
dataset = MockDataset(num_samples=8, feature_dim=4)

ARGS = {
    'opt_init': mock_opt_init,
    'opt_update': mock_opt_update,
    'epochs': 1,
    'batch_size': 2,
    'shuffle_buf_size': 8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, loguru, optax, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Trainer — 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 Trainer 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
logging_redirect_tqdm Ran
ran on a synthesized input
unstable-zeros/tasil/imitation_learning/bc.py
code served (permissive licence) · get_code("c0890c771769b1c3")
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 _GeneratorContextManager. 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 contextlib import contextmanager
from loguru import logger
import tqdm
import io
import sys

# The function logging_redirect_tqdm is a context manager that takes no parameters
# We need to verify it can be called and used properly

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru, numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _GeneratorContextManager — a _GeneratorContextManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _GeneratorContextManager 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
timed Ran
ran; our contract draft was wrong, not the code
unstable-zeros/tasil/imitation_learning/bc.py
code served (permissive licence) · get_code("bda8957057d39d26")
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 _GeneratorContextManager. 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 time
from loguru import logger

# The timed function is a context manager that takes a single parameter 'name'
# which is a string used for logging purposes. The function doesn't actually
# use the name parameter in any special way - it just formats it into a log message.

ARGS = {
    'name': 'test_operation'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _GeneratorContextManager — a _GeneratorContextManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _GeneratorContextManager 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
bc Not yet run
unverified (harvested, no recorded run)
unstable-zeros/tasil/imitation_learning/bc.py
code served (permissive licence) · get_code("27921c667383e870")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

We propose Taylor Series Imitation Learning (TaSIL), a simple augmentation to standard behavior cloning losses in the context of continuous control. TaSIL penalizes deviations in the higher-order Taylor series terms between the learned and expert policies. We show that experts satisfying a notion of incremental input-to-state stability are easy to learn, in the sense that a small TaSIL-augmented imitation loss over expert trajectories guarantees a small imitation loss over trajectories generated by the learned policy. We provide generalization bounds for TaSIL that scale as Õ(1/n) in the realizable setting, for n the number of expert demonstrations. Finally, we demonstrate experimentally the relationship between the robustness of the expert policy and the order of Taylor expansion required in TaSIL, and compare standard Behavior Cloning, DART, and DAgger with TaSIL-loss-augmented variants. In all cases, we show significant improvement over baselines across a variety of MuJoCo tasks.

For agents

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

get_harvested_code_for_paper("2205.14812")
get_code_for_paper("2205.14812")
have("2205.14812")

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

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

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

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

Connect an agent — have() is free.