SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.19533 · 2023

Lightening-Transformer: A Dynamically-operated Optically-interconnected Photonic Transformer Accelerator

arXiv · PDF · Open in the Atlas

Code that ran

4 of 10 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 4 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2305.19533.json · badge: /api/ran/2305.19533.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
scopex-asu/simphony community (classifier label)
classifier basis not recorded on the link
4 ran · 6 no recorded run
FunctionStatusWhere it lives
mzi_out_diff_to_phase Ran
ran on a synthesized input
scopex-asu/simphony/models/layers/utils.py
code served (permissive licence) · get_code("2d5bc917276fc848")
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 (2, 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)

# The function takes a Tensor x representing output port power differences
# and returns a Tensor of delta_phi values via arcsin
# x should be in range [-1, 1] ideally, representing power differences
# The function clamps x to [-1, 1] and applies arcsin(-x)

# Create a small tensor with values in the valid range [-1, 1]
x = torch.tensor([
    [0.5, -0.3, 0.0, 0.8],
    [-0.2, 0.7, -0.9, 0.1]
], 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, shape (2, 4) — shape (2, 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
parse_node Ran
ran on a synthesized input
scopex-asu/simphony/onnarchsim/workflow/insertion_loss.py
code served (permissive licence) · get_code("6c1f17ab4c1ba8b4")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Test case 1: node_str with instance reference and 's' index
node_str_1 = "layer_1(s)"
replication_counts_1 = {"layer_1": 5, "layer_2": 3}

# Test case 2: node_str with instance reference and 'e' index
node_str_2 = "layer_2(e)"
replication_counts_2 = {"layer_1": 5, "layer_2": 3}

# Test case 3: node_str with instance reference and numeric index
node_str_3 = "layer_1(2)"
replication_counts_3 = {"layer_1": 5, "layer_2": 3}

# Test case 4: node_str without parentheses (just instance_id)
node_str_4 = "simple_node"
replication_counts_4 = {"simple_node": 1}

ARGS = {
    "node_str": "layer_1(s)",
    "replication_counts": {"layer_1": 5, "layer_2": 3}
}
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, ndim 1, dtype family float — a tuple 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
polynomial Ran
ran on a synthesized input
scopex-asu/simphony/models/layers/utils.py
code served (permissive licence) · get_code("065677c60a283322")
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 (2, 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)

# The function evaluates a polynomial given coefficients
# It expects:
# - x: a Tensor to evaluate the polynomial at
# - coeff: a Tensor containing polynomial coefficients

# Create a small input tensor x (batch size 2, some dimension)
x = torch.randn(2, 4)

# Create coefficient tensor
# The function iterates from coeff.size(0)-1 down to 1,
# so we need at least 2 coefficients (indices 0 and 1)
# Let's use 5 coefficients for a degree-4 polynomial
coeff = torch.randn(5)

ARGS = {
    "x": x,
    "coeff": coeff,
}
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 (2, 4) — shape (2, 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
polynomial2 Ran
ran on a synthesized input
scopex-asu/simphony/models/layers/utils.py
code served (permissive licence) · get_code("4345efb567a3c182")
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 1, dtype family float, shape (2,) 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
from typing import List

torch.manual_seed(0)

# Test case 1: Linear coefficients (len=3)
x_val = torch.tensor([1.0, 2.0])
y_val = torch.tensor([3.0, 4.0])
coeff_linear = [0.5, 1.2, 2.3]

# Test case 2: Quadratic coefficients (len=6)
coeff_quadratic = [0.5, 1.2, 2.3, 0.1, 0.2, 0.3]

# Test case 3: Cubic coefficients (len=10)
coeff_cubic = [0.5, 1.2, 2.3, 0.1, 0.2, 0.3, 0.05, 0.06, 0.07, 0.08]

# We'll use the linear case as the primary test
ARGS = {
    "x": x_val,
    "y": y_val,
    "coeff": coeff_linear
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
Linear Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/models/quantized_BERT_base.py
code served (permissive licence) · get_code("e46be25ec4351a88")
How it ran

no invocation recorded.

conv1x1 Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/models/quantized_BERT_base.py
code served (permissive licence) · get_code("b951f3b1697e6bba")
How it ran

no invocation recorded.

conv1x1 Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/models/quantized_mobileViT.py
code served (permissive licence) · get_code("a5d6b0d221981104")
How it ran

no invocation recorded.

conv3x3 Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/models/quantized_BERT_base.py
code served (permissive licence) · get_code("10e0b0b4db69c475")
How it ran

no invocation recorded.

conv3x3 Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/models/quantized_mobileViT.py
code served (permissive licence) · get_code("323ca35cca0fe72e")
How it ran

no invocation recorded.

get_instance_insertion_loss Not yet run
unverified (harvested, no recorded run)
scopex-asu/simphony/onnarchsim/workflow/insertion_loss.py
code served (permissive licence) · get_code("bd182eca46f6870e")
How it ran

no invocation recorded.

Also present in other papers' code

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

The wide adoption and significant computing resource of attention-based transformers, e.g., Vision Transformers and large language models (LLM), have driven the demand for efficient hardware accelerators. There is a growing interest in exploring photonics as an alternative technology to digital electronics due to its high energy efficiency and ultra-fast processing speed. Photonic accelerators have shown promising results for CNNs, which mainly rely on weight-static linear operations. However, they encounter issues when efficiently supporting Transformer architectures, questioning the applicability of photonics to advanced ML tasks. The primary hurdle lies in their inefficiency in handling unique workloads in Transformers, i.e., dynamic and full-range tensor multiplication. In this work, we propose Lightening-Transformer, the first light-empowered, high-performance, and energy-efficient photonic Transformer accelerator. To overcome prior designs' fundamental limitations, we introduce a novel dynamically-operated photonic tensor core, DPTC, a crossbar array of interference-based optical vector dot-product engines supporting highly parallel, dynamic, and full-range matrix multiplication. Furthermore, we design a dedicated accelerator that integrates our novel photonic computing cores with photonic interconnects for inter-core data broadcast, fully unleashing the power of optics. Comprehensive evaluations show that ours achieves >2.6x energy and >12x latency reductions compared to prior photonic accelerators and delivers the lowest energy cost and 2 to 3 orders of magnitude lower energy-delay product compared to electronic Transformer accelerators, all while maintaining digital-comparable accuracy. Our work highlights the immense potential of photonics for advanced ML workloads, such as Transformer-backboned LLM. Our work is available at https://github.com/zhuhanqing/Lightening-Transformer.

For agents

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

get_harvested_code_for_paper("2305.19533")
get_code_for_paper("2305.19533")
have("2305.19533")

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

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

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

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

Connect an agent — have() is free.