SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.27987 · 2026

It's All Just Vectorization: einx, a Universal Notation for Tensor Operations

Michael Arens, Florian Fervers, Sebastian Bullinger, Christoph Bodensteiner

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 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/2607.27987.json · badge: /api/ran/2607.27987.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
fferflo/einx canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
diagonal Ran
ran; our contract draft was wrong, not the code
fferflo/einx/einx/_src/adapter/classical_from_einsum.py
code served (permissive licence) · get_code("0b9fa8908e5b5021")
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
import torch.nn as nn

torch.manual_seed(0)

def simple_einsum(equation, tensor):
    """Simple stand-in for an einsum function"""
    return torch.einsum(equation, tensor)

ARGS = {
    "einsum": simple_einsum
}
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
logaddexp Ran
ran; our contract draft was wrong, not the code
fferflo/einx/einx/_src/adapter/classical_from_classical.py
code served (permissive licence) · get_code("0711ff92cb68b326")
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
import torch.nn as nn

torch.manual_seed(0)

class ClassicalBackend:
    """Stand-in classical backend that implements required operations."""
    
    def maximum(self, *xs):
        """Return element-wise maximum of inputs."""
        result = xs[0]
        for x in xs[1:]:
            result = torch.max(result, x)
        return result
    
    def stop_gradient(self, x):
        """Stop gradient computation (detach)."""
        return x.detach()
    
    def subtract(self, x, y):
        """Element-wise subtraction."""
        return x - y
    
    def add(self, *xs):
        """Element-wise addition of multiple inputs."""
        result = xs[0]
        for x in xs[1:]:
            result = result + x
        return result
    
    def exp(self, x):
        """Element-wise exponential."""
        return torch.exp(x)
    
    def log(self, x):
        """Element-wise logarithm."""
        return torch.log(x)

classical_backend = ClassicalBackend()

ARGS = {
    "classical": classical_backend
}
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
logsumexp Ran
ran; our contract draft was wrong, not the code
fferflo/einx/einx/_src/adapter/classical_from_classical.py
code served (permissive licence) · get_code("dd2dd2ebfc97a75d")
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
import numpy as np

torch.manual_seed(0)

class ClassicalBackend:
    """Mock classical backend that implements required operations."""
    
    def max(self, x, axis=None, keepdims=False):
        if axis is None:
            return torch.max(x)
        return torch.amax(x, dim=axis, keepdim=keepdims)
    
    def stop_gradient(self, x):
        return x.detach()
    
    def reshape(self, x, shape):
        return torch.reshape(x, shape)
    
    def subtract(self, x, y):
        return torch.subtract(x, y)
    
    def log(self, x):
        return torch.log(x)
    
    def sum(self, x, axis=None, keepdims=False):
        if axis is None:
            return torch.sum(x, keepdim=keepdims)
        return torch.sum(x, dim=axis, keepdim=keepdims)
    
    def exp(self, x):
        return torch.exp(x)
    
    def add(self, x, y):
        return torch.add(x, y)

def _axis_to_axistuple(axis):
    """Convert axis parameter to tuple of axes."""
    if isinstance(axis, int):
        return (axis,)
    elif isinstance(axis, (list, tuple)):
        return tuple(axis)
    else:
        return (axis,)

classical_backend = ClassicalBackend()

ARGS = {
    "classical": classical_backend
}
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 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
softmax Ran
ran; our contract draft was wrong, not the code
fferflo/einx/einx/_src/adapter/classical_from_classical.py
code served (permissive licence) · get_code("423d12e4d133d975")
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
import numpy as np

torch.manual_seed(0)

class Classical:
    """Stand-in for a classical backend with array operations."""
    
    def max(self, x, axis=None, keepdims=False):
        if isinstance(x, torch.Tensor):
            return torch.amax(x, dim=axis, keepdim=keepdims)
        return np.max(x, axis=axis, keepdims=keepdims)
    
    def stop_gradient(self, x):
        if isinstance(x, torch.Tensor):
            return x.detach()
        return x
    
    def subtract(self, x, y):
        return x - y
    
    def exp(self, x):
        if isinstance(x, torch.Tensor):
            return torch.exp(x)
        return np.exp(x)
    
    def divide(self, x, y):
        return x / y
    
    def sum(self, x, axis=None, keepdims=False):
        if isinstance(x, torch.Tensor):
            return torch.sum(x, dim=axis, keepdim=keepdims)
        return np.sum(x, axis=axis, keepdims=keepdims)

classical_backend = Classical()

ARGS = {
    "classical": classical_backend
}
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 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

Also present in other papers' code

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

Tensor operations represent a cornerstone of modern scientific computing. However, the Numpy-like notation adopted by predominant tensor frameworks is often difficult to read and write and prone to so-called shape errors, i.a., due to following inconsistent rules across a large, complex collection of operations. Alternatives like einsum and einops have gained popularity, but are inherently restricted to few operations and lack the generality required for a universal model of tensor programming. To derive a better paradigm, we revisit vectorization as a function for transforming tensor operations, and use it to both lift lower-order operations to higher-order operations, and conceptually decompose higher-order operations to lower-order operations and their vectorization. Building on the universal nature of vectorization, we introduce einx, a universal notation for tensor operations. It uses declarative, pointful expressions that are defined by analogy with loop notation and represent the vectorization of tensor operations. The notation reduces the large APIs of existing frameworks to a small set of elementary operations, applies consistent rules across all operations, and enables a clean, readable and writable representation in code. We provide an implementation of einx that is embedded in Python and integrates seamlessly with existing tensor frameworks: https://github.com/fferflo/einx

For agents

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

get_harvested_code_for_paper("2607.27987")
get_code_for_paper("2607.27987")
have("2607.27987")

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

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

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

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

Connect an agent — have() is free.