SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.14997 · ICML · 2026

AI Engram: In Search of Memory Traces in Artificial Intelligence

Meeyoung Cha, Jiwon Kim, Jea Kwon, Yonghyun Kim, Dong-Kyum Kim, Woong Kook

arXiv · PDF · Open in the Atlas

Code that ran

16 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 7 have no contract verdict; 6 failures of our instrument; 4 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.14997.json · badge: /api/ran/2606.14997.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
jeakwon/ai-engram community
Papers with Code archive
16 ran · 4 no recorded run
FunctionStatusWhere it lives
Conv1DHandler Ran
ran on a synthesized input
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("eb60ce658ba5e792")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned int, ndim 0, dtype family int; 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 torch.nn as nn

# Create a minimal Conv1D module (HuggingFace style)
class Conv1D(nn.Module):
    """Minimal HuggingFace Conv1D for testing."""
    def __init__(self, nf, nx):
        super().__init__()
        self.nf = nf
        self.weight = nn.Parameter(torch.randn(nx, nf))
        self.bias = nn.Parameter(torch.randn(nf))
    
    def forward(self, x):
        size_out = x.size()[:-1] + (self.nf,)
        x = torch.addmm(self.bias, x.view(-1, x.size(-1)), self.weight)
        x = x.view(size_out)
        return x

# Create a Conv1D module instance
conv1d_module = Conv1D(nf=5, nx=4)  # out=5, in=4

# Conv1DHandler has no __init__ parameters (ABC with only abstract methods)
INIT_ARGS = {}

# Test different methods of Conv1DHandler
# We'll test get_input_dim as the primary computation method
METHOD = 'get_input_dim'
ARGS = {
    'module': conv1d_module,
    'absorb_bias': False
}

# Alternative: test reshape_input
# METHOD = 'reshape_input'
# ARGS = {
#     'module': conv1d_module,
#     'inputs': (torch.randn(2, 3, 4),),  # batch=2, seq=3, in_features=4
#     'absorb_bias': False
# }

# Alternative: test weight_matrix
# METHOD = 'weight_matrix'
# ARGS = {
#     'module': conv1d_module,
#     'absorb_bias': False
# }

# Alternative: test to_weight_shape
# METHOD = 'to_weight_shape'
# ARGS = {
#     'w': torch.randn(5, 4),  # canonical [out, in]
#     'module': conv1d_module
# }
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
EditorConfig Ran
ran on a synthesized input · constructed an object; no result was computed
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("9513d6d34b610053")
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, EditorConfig: 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
from dataclasses import dataclass

torch.manual_seed(0)

ARGS = {
    "storage_device": None,
    "absorb_bias": True,
}
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 EditorConfig — 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 EditorConfig 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
EngramResult Ran
ran on a synthesized input · constructed an object; no result was computed
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("1cf900e527c6f540")
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, EngramResult: 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
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class LayerScaleInfo:
    """Per-layer inputs handed to a scaling function."""
    name: str
    weight_fro: float
    projection: torch.Tensor
    n: int
    N: int
    target_erank: float = None
    total_erank: float = None

@dataclass
class EngramResult:
    """Output of :meth:`EngramEditor.compute_engram_weights`: projections + scale inputs.

    ``layers[name].projection`` is the pure engram projection (no ``n / N``);
    ``bias[name]`` is the matching bias projection for bias-absorbed layers. Pass the
    whole result to :meth:`EngramEditor.apply`.
    """
    layers: dict = field(default_factory=dict)
    bias: dict = field(default_factory=dict)


# Build small LayerScaleInfo instances
layer_scale_info_1 = LayerScaleInfo(
    name="layer_0",
    weight_fro=1.5,
    projection=torch.randn(4, 3),
    n=2,
    N=10,
    target_erank=0.8,
    total_erank=0.9
)

layer_scale_info_2 = LayerScaleInfo(
    name="layer_1",
    weight_fro=2.3,
    projection=torch.randn(5, 4),
    n=3,
    N=12,
    target_erank=0.7,
    total_erank=0.85
)

# Build the layers dict with LayerScaleInfo instances
layers_dict = {
    "layer_0": layer_scale_info_1,
    "layer_1": layer_scale_info_2,
}

# Build the bias dict with tensors
bias_dict = {
    "layer_0": torch.randn(3, 2),
    "layer_1": torch.randn(4, 3),
}

ARGS = {
    "layers": layers_dict,
    "bias": bias_dict,
}
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 EngramResult — 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 EngramResult 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
LayerScaleInfo Ran
ran on a synthesized input · constructed an object; no result was computed
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("67defdf96d2e54ea")
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, LayerScaleInfo: 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
from dataclasses import dataclass

torch.manual_seed(0)

@dataclass
class LayerScaleInfo:
    """Per-layer inputs handed to a scaling function."""
    name: str
    weight_fro: float
    projection: torch.Tensor
    n: int
    N: int
    target_erank: float = None
    total_erank: float = None

ARGS = {
    "name": "layer_1",
    "weight_fro": 2.5,
    "projection": torch.randn(4, 3),
    "n": 8,
    "N": 64,
    "target_erank": 3.5,
    "total_erank": 12.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LayerScaleInfo — 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 LayerScaleInfo 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
LinearHandler Ran
ran on a synthesized input
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("702e34756a13e666")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
from abc import ABC, abstractmethod

class LayerHandler(ABC):
    """Abstract per-layer-type handler.

    ``absorb_bias`` is threaded through so a single handler covers both the
    plain (``y = Wx``) and bias-absorbed (``y = [W|b][x;1]``) cases.
    """

    @abstractmethod
    def get_input_dim(self, module: nn.Module, absorb_bias: bool=False) -> int:
        """Covariance dimension ``D`` (``in`` or ``in+1`` when absorbing)."""

    @abstractmethod
    def reshape_input(self, module: nn.Module, inputs: Any, absorb_bias: bool=False) -> torch.Tensor:
        """Flatten the forward-pre-hook input to ``[N, D]`` (augmented if absorbing)."""

    @abstractmethod
    def weight_matrix(self, module: nn.Module, absorb_bias: bool=False) -> torch.Tensor:
        """Return the weight as canonical ``[out, D]`` (``[W | b]`` if absorbing)."""

    @abstractmethod
    def to_weight_shape(self, w: torch.Tensor, module: nn.Module) -> torch.Tensor:
        """Map a canonical ``[out, in]`` weight part back to ``module.weight``'s shape."""

def _augment_ones(x: torch.Tensor) -> torch.Tensor:
    """Append a constant-1 column: ``[N, d] -> [N, d+1]`` (homogeneous coords)."""
    ones = torch.ones(x.shape[0], 1, dtype=x.dtype, device=x.device)
    return torch.cat([x, ones], dim=1)

class LinearHandler(LayerHandler):
    """Handler for ``nn.Linear`` (weight already stored as ``[out, in]``)."""

    def get_input_dim(self, module: nn.Linear, absorb_bias: bool=False) -> int:
        return module.in_features + (1 if absorb_bias else 0)

    def reshape_input(self, module: nn.Linear, inputs: Any, absorb_bias: bool=False) -> torch.Tensor:
        x = inputs[0].reshape(-1, module.in_features)
        return _augment_ones(x) if absorb_bias else x

    def weight_matrix(self, module: nn.Linear, absorb_bias: bool=False) -> torch.Tensor:
        if absorb_bias and module.bias is not None:
            return torch.cat([module.weight, module.bias.reshape(-1, 1)], dim=1)
        return module.weight

    def to_weight_shape(self, w: torch.Tensor, module: nn.Linear) -> torch.Tensor:
        return w


# Create a LinearHandler instance
linear_module = nn.Linear(in_features=4, out_features=3, bias=True)

INIT_ARGS = {}

ARGS = {
    'module': linear_module,
    'inputs': (torch.randn(2, 4),),
    'absorb_bias': True
}

METHOD = 'reshape_input'

# Construct and call
handler = LinearHandler(**INIT_ARGS)
result = getattr(handler, METHOD)(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Statistics Ran
ran on a synthesized input · constructed an object; no result was computed
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("71ca2f580846202f")
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, Statistics: 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
from dataclasses import dataclass, field
from typing import Dict

torch.manual_seed(0)

# Create sample covariance matrices
cov_dict = {
    "layer1": torch.randn(4, 4),
    "layer2": torch.randn(3, 3),
    "layer3": torch.randn(5, 5),
}

# Create sample counts
count_dict = {
    "layer1": 10,
    "layer2": 20,
    "layer3": 15,
}

ARGS = {
    "cov": cov_dict,
    "count": count_dict,
}
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 Statistics — 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 Statistics output the recorded ndim 1 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
_augment_ones Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("5dafb9612b59daac")
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 Tensor, ndim 2, 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

torch.manual_seed(0)

# Create a simple 2D tensor with shape [N, d] where N=2 (batch size) and d=4 (features)
x = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    "x": x,
}
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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (no_result)
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
_erank Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("560641494e876ee1")
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; 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

torch.manual_seed(0)

# Create a small positive semi-definite covariance matrix
# Using a rank-deficient matrix to test the function
cov = torch.randn(4, 4)
cov = cov @ cov.T  # Makes it positive semi-definite

ARGS = {
    "cov": cov
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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
_layer_index_matches Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("6b679398fd7c5a47")
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; 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 torch.nn as nn
from typing import Optional, Union, List

torch.manual_seed(0)

# Test cases for _layer_index_matches function
# The function takes:
# - name: str (module name to check)
# - layers_to_transform: Optional[Union[int, List[int]]] (which layer indices to select)
# - layers_pattern: Optional[Union[str, List[str]]] (regex patterns to match layer names)

ARGS = {
    "name": "model.layers.5.attention",
    "layers_to_transform": [3, 5, 7],
    "layers_pattern": ["layers", "blocks"]
}
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 bool, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (no_result)
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
_module_name_matches Ran
ran, violated the contract we drafted
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("5c0281297b38bdc3")
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; 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 re
from typing import Optional, Union, List

# Setup for _module_name_matches function

# Test case 1: name with target_modules as None (should match all)
name_1 = "linear.weight"
target_modules_1 = None

# Test case 2: name with target_modules as regex string
name_2 = "layer.linear"
target_modules_2 = r"layer\..*"

# Test case 3: name with target_modules as list (exact match)
name_3 = "attention"
target_modules_3 = ["attention", "feed_forward", "norm"]

# Test case 4: name with target_modules as list (dotted suffix match)
name_4 = "transformer.layer.attention"
target_modules_4 = ["attention", "feed_forward"]

# Test case 5: name that doesn't match regex
name_5 = "conv2d"
target_modules_5 = r"linear.*"

# Test case 6: name that doesn't match list
name_6 = "dropout"
target_modules_6 = ["linear", "attention"]

# Create ARGS with distinct test cases
ARGS = {
    "name": name_1,
    "target_modules": target_modules_1
}
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 bool, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (no_result)
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
_pack_symmetric Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("d4e917244a3c46b4")
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 torch

torch.manual_seed(0)

# Create a symmetric matrix for testing
c_symmetric = torch.tensor([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 5.0, 6.0, 7.0],
    [3.0, 6.0, 8.0, 9.0],
    [4.0, 7.0, 9.0, 10.0]
], dtype=torch.float32)

ARGS = {
    'c': c_symmetric
}
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 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
_unpack_symmetric Ran
ran, honoured the contract we drafted
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("14fd17031ba1b4f9")
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 Tensor, ndim 2, dtype family float, shape (4, 4) 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)

# Test case 1: entry with 'dense' key
entry_dense = {
    'dense': torch.randn(4, 4)
}

# Test case 2: entry with 'packed' and 'dim' keys (symmetric matrix)
# For a 4x4 symmetric matrix, upper triangular has 4+3+2+1=10 elements
d = 4
num_upper_triangular = d * (d + 1) // 2
packed_tensor = torch.randn(num_upper_triangular)
entry_packed = {
    'packed': packed_tensor,
    'dim': str(d)  # dim is converted to int in the function
}

# Use the packed case for the main ARGS
ARGS = {
    'entry': entry_packed
}
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 Tensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) 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
count_ratio Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("17c1bacaf98aaea0")
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 function. 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
from dataclasses import dataclass
from typing import Dict, Optional

torch.manual_seed(0)

@dataclass
class LayerScaleInfo:
    """Per-layer inputs handed to a scaling function."""
    name: str
    weight_fro: float
    projection: torch.Tensor
    n: int
    N: int
    target_erank: Optional[float] = None
    total_erank: Optional[float] = None

# Create sample LayerScaleInfo objects for testing
layer_infos = {
    "layer_0": LayerScaleInfo(
        name="layer_0",
        weight_fro=1.5,
        projection=torch.randn(2, 4),
        n=5,
        N=10,
        target_erank=2.0,
        total_erank=4.0
    ),
    "layer_1": LayerScaleInfo(
        name="layer_1",
        weight_fro=2.3,
        projection=torch.randn(2, 4),
        n=3,
        N=10,
        target_erank=1.5,
        total_erank=4.0
    ),
    "layer_2": LayerScaleInfo(
        name="layer_2",
        weight_fro=0.8,
        projection=torch.randn(2, 4),
        n=0,
        N=10,
        target_erank=None,
        total_erank=4.0
    )
}

ARGS = {
    "power": 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
default_rtol Ran
ran, honoured the contract we drafted
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("0acf89592b3aca53")
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)

ARGS = {
    "dim": 1024,
}
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
get_conv1d_class Ran
ran on a synthesized input
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("a0cf3e1d0c88267c")
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 type. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function get_conv1d_class() takes no parameters
# It only attempts to import Conv1D from transformers and return it or None
# No setup arguments are needed since the function has no parameters

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
spectral_factors Ran
ran; our contract draft was wrong, not the code
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("32f9a69c11a3dcab")
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 math

torch.manual_seed(0)

# Create a small symmetric positive semi-definite matrix for testing
D = 4
c = torch.randn(D, D, dtype=torch.float32)
c = c @ c.T  # Make it symmetric PSD

ARGS = {
    'c': c,
    'rank_fraction': 0.5,
    'rtol': None,
    'condition_cap': None,
    'method': 'exact',
    'floor': 'rtol',
    'cut': 'rtol',
    'compute_dtype': torch.float64,
    'energy_fraction': 0.99,
    'ridge_delta': 1e-06,
    'n_samples': None,
    'oversample': 16,
    'n_iter': 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 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
CovarianceCollector Not yet run
unverified (harvested, no recorded run)
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("0d5c8ad11c502d74")
How it ran

no invocation recorded.

EngramEditor Not yet run
unverified (harvested, no recorded run)
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("0fa7f6cd2ba4994f")
How it ran

no invocation recorded.

LayerHandler Not yet run
unverified (harvested, no recorded run)
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("e427b414d08284d2")
How it ran

no invocation recorded.

handler_for Not yet run
unverified (harvested, no recorded run)
jeakwon/ai-engram/src/engram/editor.py
code served (permissive licence) · get_code("77963758178b06af")
How it ran

no invocation recorded.

Also present in other papers' code

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

Memory formation is fundamental to intelligence, yet whether deep neural networks preserve identifiable memory traces analogous to biological memory units remains an open question. This work introduces a geometric framework to identify such "AI engrams" by formalizing the neuroscientific criteria of specificity, reactivation, sufficiency, and necessity into a constrained inverse problem. We derive a closed-form estimator that isolates individual memory traces from globally entangled parameters, and show that this biologically-derived solution corresponds to a natural gradient update on the parameter manifold. AI engrams enable surgical manipulation of learned knowledge: any subset of memories can be composed or erased through linear arithmetic, without iterative optimization. Experiments ranging from simple MLPs to LLMs demonstrate the causal validity and substantial scalability of AI engrams. Together, these results bridge theories of biological memory and artificial representation learning and offer geometric insight into how deep networks simultaneously support functional specificity within distributed storage.

For agents

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

get_harvested_code_for_paper("2606.14997")
get_code_for_paper("2606.14997")
have("2606.14997")

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

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

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

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

Connect an agent — have() is free.