Matrix multiplication accounts for the overwhelming majority of arithmetic operations — and a dominant share of energy expenditure — in training large language models (LLMs). Photonic processors perform matrix–vector multiplication (MVM) as a passive consequence of light propagation: once an input vector is encoded onto optical amplitudes and a weight matrix onto a programmable interferometer mesh or resonator crossbar, the multiply–accumulate (MAC) operations occur "for free" through interference and detection, at the propagation delay of light through centimeters of waveguide. This paper audits that claim. We review the three mainstream photonic MVM schemes (coherent interferometric meshes, incoherent intensity crossbars, and phase-change in-memory photonics), derive the actual energy accounting — in which electro-optic conversion, not multiplication, sets the bill — and show that the correct statement is not that photonic MACs are free but that their energy cost amortizes as O(1/N) with matrix dimension, with a floor set by shot noise and required precision. We then confront the harder problem: training, unlike inference, demands (i) high-precision gradient accumulation, (ii) rapid weight updates that collide with slow phase-shifter reconfiguration, and (iii) multiplication by dynamic matrices in attention layers, which breaks the static-weight assumption underlying most photonic architectures. We review in-situ training strategies — adjoint back-propagation, physics-aware training, and fully-forward-mode learning — that partially resolve these obstacles, and close with a quantitative scaling estimate and a set of falsifiable milestones that would confirm or kill the thesis that photonics can materially accelerate frontier LLM training within a decade. A Claims Ledger appendix classifies every load-bearing assertion by epistemic status.
Keywords: optical computing, photonic integrated circuits, matrix multiplication, neural network training, energy efficiency, analog computing.
An essay. A thesis put forward by its author — an argument, specification, or design — and not a verified result.
1. Introduction: The MAC Wall
Training a frontier LLM is, arithmetically, a very long sequence of matrix multiplications. The standard estimate for a dense transformer is that training cost ≈ 6·N·D floating-point operations, where N is parameter count and D is the number of training tokens — roughly 2ND for the forward pass and 4ND for backpropagation. For a model in the 10¹¹-parameter class trained on 10¹³ tokens, this is on the order of 10²⁵ FLOPs, executed almost entirely as general matrix–matrix multiplications (GEMMs) inside attention and feed-forward blocks. At current GPU efficiencies of order 10¹⁰–10¹¹ FLOP/J at training precision, the arithmetic alone implies gigawatt-hour energy scales before accounting for memory movement, which typically dominates.
Three physical facts frame the opportunity:
- Digital multiplication is expensive by construction. A digital b-bit multiplier performs O(b²) full-adder operations, each of which charges and discharges transistor gates. The energy of an 8-bit MAC in modern CMOS is of order 10–100 fJ; the interconnect energy to move the operands often exceeds the arithmetic itself.
- Linear optics performs linear algebra natively. Any lossless linear-optical network implements a unitary transformation on the optical field. Interference is addition of amplitudes; a beam splitter is a 2×2 unitary; modulation is multiplication by a scalar. The mathematics of the layer we are trying to compute and the physics of the medium are the same mathematics.
- Propagation costs no switching energy. Once the field is launched, the "computation" — the redistribution of amplitude among output modes — dissipates no energy in the ideal lossless case. The energy cost concentrates entirely at the boundaries: encoding (modulation) and readout (detection and digitization).
The seduction is obvious: replace the O(b²·N²) transistor switching events of a digital N×N MVM with a single pass of light through a passive structure. The honest question — the one this paper is organized around — is what is actually being purchased, in what currency, and whether the purchase helps with training specifically, which is a substantially harder workload than the inference tasks on which nearly all published photonic demonstrations have been benchmarked.
Our thesis, stated up front: the prohibition "analog optics cannot do serious numerics" is not a prohibition; it is a specification. The specification has four requirements — sufficient effective precision, amortizable conversion cost, a weight-update path fast enough for stochastic gradient descent, and a scheme for dynamic (activation-by-activation) matrices. Each requirement is currently met in isolation by at least one experimental system. No system meets all four simultaneously. That conjunction is the open problem.
2. The Physics of Optical Matrix Multiplication
2.1 Coherent interferometric meshes
The canonical architecture, introduced for deep learning by Shen et al. (2017), encodes an input vector x ∈ ℝᴺ onto the complex amplitudes of N coherent optical modes and passes them through a mesh of Mach–Zehnder interferometers (MZIs). Each MZI, parameterized by two phase shifts (θ, φ), implements a programmable 2×2 unitary on its pair of modes. By the Reck (1994) and Clements (2016) decompositions, any N×N unitary U can be realized exactly by a mesh of N(N−1)/2 MZIs.
An arbitrary real matrix M is not unitary, but the singular value decomposition M = UΣV† factors it into two unitaries and a diagonal of singular values. The photonic implementation is therefore two MZI meshes sandwiching a column of amplitude modulators (with the matrix rescaled so all singular values are ≤ 1; the overall scale is restored digitally). The full MVM is performed in a single optical transit — roughly 100 ps for a centimeter-scale silicon photonic chip — regardless of N.
Two structural points deserve emphasis because they recur in the error analysis:
- The computation is exact in the ideal limit. Unlike digital floating point, there is no rounding in the linear transformation itself; errors enter only through fabrication imperfection, phase noise, loss, and detection.
- Errors compose multiplicatively along the mesh depth. An N×N Clements mesh has optical depth N, so component-level imperfections of magnitude ε produce output errors that grow with N — the central scaling obstacle for coherent meshes, mitigated but not eliminated by self-configuration and error-correction protocols (Bandyopadhyay, Hamerly & Englund 2021; Pai et al. 2023).
2.2 Incoherent crossbar arrays and WDM parallelism
The second scheme abandons phase and encodes information in optical intensity. Input elements are carried on distinct wavelengths (wavelength-division multiplexing, WDM); weights are set by tunable attenuations — microring resonator (MRR) weight banks (Tait et al. 2017) or crossbar arrays — and summation is performed by a photodetector, which naturally integrates total incident power. Multiplication is attenuation; addition is photocurrent summation. Because the scheme is incoherent, it is robust to phase noise, and because wavelengths are independent channels, a single spatial structure processes many vector elements — or many separate MVMs — in parallel. Demonstrations include the 11-TOPS convolutional accelerator of Xu et al. (2021) using a soliton microcomb as a many-wavelength source, and recent systems multiplexing across time, space, and wavelength simultaneously to reach hundreds of TOPS. Parallel processing across 100 wavelength channels has been demonstrated (Yu et al. 2025).
The cost of incoherence is that intensities are non-negative: signed weights require differential encoding (two detectors, subtracted photocurrents) or biasing schemes, doubling hardware or halving dynamic range.
2.3 In-memory photonics with phase-change materials
The third scheme makes the weights nonvolatile. Feldmann et al. (2021) demonstrated a photonic tensor core in which weights are stored in the optical transmission state of phase-change material (PCM) cells (GST) patterned on waveguides. The matrix is literally printed into the material's crystallinity; light passing through performs the MVM with no static power spent holding the weights — the photonic analogue of resistive in-memory computing. Magneto-optic in-memory cells with ultra-high write endurance have since been demonstrated (Pintus et al. 2025), addressing PCM's limited write-cycle budget.
This is the architecture most explicitly optimized for inference: weights that rarely change, held at zero static cost. Its relevance to training is inverted — the weight-write operation is the slowest and most energy-expensive step, which is precisely the step training exercises billions of times. Write endurance and write speed of the memory cell become the binding constraints (§6.2).
2.4 Free-space and diffractive processors
For completeness: free-space systems using spatial light modulators and diffractive surfaces achieve very large N (10⁵–10⁶ parallel modes) at the cost of bulk, alignment sensitivity, and slow reconfiguration. Recent single-shot matrix–matrix processors based on spatial–spectral hypermultiplexed diffraction, and coherent direct tensor processing schemes demonstrating full matrix–matrix products in one propagation (Nature Photonics, 2025), indicate that the matrix–matrix (not merely matrix–vector) primitive — the actual GEMM shape of transformer workloads — is now experimentally accessible in optics.
3. The Energy Audit: What "Free" Actually Costs
3.1 Where the joules go
Consider one photonic MVM of dimension N. The energy budget decomposes as:
- Stage Cost scaling Typical magnitude
- Laser (wall-plug, per symbol) O(N) set by SNR requirement (§4) DAC + modulator (encode x) O(N) ~0.1–10 pJ per element
- Propagation (the multiplication) 0 (ideal); loss in practice —
- Photodetection + TIA O(N) ~fJ–pJ per element ADC (digitize y) O(N) ~0.1–10 pJ per element, rising steeply with bits
- Weight hold (MZI thermal / PCM) O(N²) static / 0 nonvolatile ~mW per thermal phase shifter
The MVM performs N² MACs, but the boundary conversions number only O(N). Therefore:
Energy per MAC ≈ (conversion energy per element) / N.
This is the correct, defensible form of the "free multiplication" claim: the multiplication is not free; it is amortized. At N = 1000, a 1 pJ/element conversion budget yields 1 fJ/MAC — one to two orders of magnitude below digital 8-bit MACs, before counting the digital system's dominant memory-movement costs. Larger N buys proportionally cheaper MACs, which is why photonic advantage is fundamentally an argument about scale: below N ≈ 100, conversion overhead eats the advantage entirely, and a GPU wins.
Two caveats sharpen the audit:
- Weight-programming energy must be amortized over reuse. Thermal phase shifters consume ~10 mW each continuously; an N = 256 mesh spends ~300 W just holding its matrix. Nonvolatile weights (PCM, magneto-optic, MEMS) reduce this to zero but pay per-write. Either way, the accounting only closes if each programmed matrix is reused across many input vectors — trivially true for inference, structurally violated by attention (§6.3).
- The ADC is the tax collector. ADC energy scales roughly exponentially with effective bits (a consequence of thermal-noise-limited comparator design). Demanding 12-bit readout can push the conversion cost per element into tens of pJ, destroying the amortization at practical N. Photonic systems are therefore driven toward low-precision readout — which collides with training's precision demands (§5). Integrated electro-optic DAC links (Nature Photonics, 2025) attack exactly this boundary cost.
3.2 The fundamental floor: photons per MAC
Is there a physical lower bound? Landauer's bound (kT ln 2 ≈ 3 zJ at 300 K) is irrelevant at current scales — we are six orders of magnitude away. The operative floor is shot noise: a coherent detection of a signal carrying n photons has amplitude SNR ~ √n. Achieving b effective bits at the output requires the accumulated photocurrent to carry ~2²ᵇ photons of signal. Because the dot product sums N terms, the required photon number per multiplication falls as 1/N for fixed output precision — the optical analogue of the amortization argument, now imposed by quantum statistics rather than engineering.
Wang et al. (2022) demonstrated an optical neural network operating below one photon per scalar multiplication (~0.001 photons/MAC in accumulation), with the sum still resolvable above shot noise. This is the cleanest experimental statement of the physics: individual products may be sub-shot-noise garbage; only the accumulated observable needs fidelity. Digital logic has no analogous mechanism — every partial product must be individually correct.
Ledger note (theorem-grade): for fixed output SNR, optical energy per MAC scales as O(1/N) down to a shot-noise floor of order 2²ᵇ/N photons per MAC. Ledger note (engineering fact): system wall-plug energy is currently dominated by lasers, DACs and ADCs, not by the optical field; demonstrated system-level efficiencies remain within one to two orders of magnitude of GPUs, not the four to six orders sometimes quoted from device-level projections.
4. Precision and Noise: The Analog Ceiling
Photonic MVM is analog computation, and inherits analog's classical pathology: precision is purchased in dB, and every dB is expensive.
Error sources stack as follows:
- Static fabrication error in MZI splitting ratios and waveguide phases — correctable by calibration and self-configuration (progressive algorithms can configure meshes using only external measurements), and by hardware error-correction schemes that add redundant MZIs.
- Thermal crosstalk and drift — phase shifters heat neighbors; matrices drift on ~ms timescales, requiring periodic recalibration.
- Shot noise and detector noise — irreducible; sets the bits-per-readout budget.
- Coherent mesh depth scaling — output error grows with optical depth N, biasing large coherent meshes toward block-partitioned architectures (tiles of N ≈ 64–256 composed digitally, which reintroduces conversion costs at tile boundaries).
The empirical state of the art is instructive: silicon microring weight banks have demonstrated better than 9-bit weight precision (Zhang et al. 2022) — a record, and achieved under laboratory conditions on small arrays. Typical operating points for full systems are 4–8 effective bits.
For inference, this is now understood to be sufficient: quantization research on transformers shows 8-bit and even 4-bit inference is achievable with negligible quality loss given proper calibration. Photonic inference at scale is therefore credible on precision grounds alone — consistent with commercial photonic processors (e.g., Lightmatter's 2025 Nature demonstrations of running modern AI workloads photonically) targeting inference first.
For training, the precision question is sharper and is the pivot of this paper, so we give it its own section.
5. Why Training Is Harder Than Inference
Training differs from inference in three ways that each interact badly with analog photonics. We state them as constraints, then examine which are hard physics and which are soft engineering.
5.1 Gradient accumulation demands dynamic range
SGD updates are small: per-step weight changes are typically 10³–10⁵ times smaller than the weights themselves. Digital training handles this with mixed precision — low-precision (FP8/BF16) multiplications feeding high-precision (FP32) accumulators and master weights. The multiplications can be sloppy; the accumulation cannot.
This decomposition is actually favorable for photonics: the expensive O(N²) multiplication work can run at analog precision, provided accumulation and weight storage remain digital at high precision. The resulting architecture — analog photonic GEMM engine + digital optimizer state — concedes that photonics accelerates the FLOPs, not the whole optimizer. Since optimizer arithmetic is O(N) per step versus O(N·D_batch) for the GEMMs, this concession is cheap. Moreover, a body of results on training with noisy gradients shows SGD is remarkably tolerant of unbiased noise in gradient estimates — noise averages out over steps, acting like a smaller effective batch. The killer is not noise but bias: systematic analog errors (drift, crosstalk with fixed sign) do not average away and can steer training off course. The specification is therefore: analog errors must be zero-mean by construction or by dithering; bias, not variance, is the failure mode.
5.2 The weight-update bandwidth problem
A training step updates every weight. If weights live in thermal phase shifters (~µs–ms settling) or PCM cells (~100 ns–µs writes, finite endurance of ~10⁸–10¹² cycles), then reprogramming an N×N array every step at training step-rates (10–100 ms per step, but millions of steps) is either too slow, too energy-hungry, or burns out the memory. Quantitatively: 10⁶ training steps exceeds the endurance of most PCM cells outright.
Mitigations, in order of maturity:
- Keep weights digital; stream them. Use the photonic engine as a stateless GEMM unit: weights are streamed in as one operand each cycle (like activations), stored nowhere in the optics. This sacrifices the in-memory advantage but matches how GPUs already work and sidesteps endurance entirely. Time-multiplexed and AWGR-based architectures are of this type.
- Fast electro-optic phase shifters (lithium niobate, plasmonic, MEMS): ns-scale reconfiguration at fJ–pJ energies, replacing thermal tuning. This converts the weight-update problem from "impossible" to "an O(N²) conversion cost per step" — real, but amortized over the O(N²·D_batch) MACs each step performs.
- Magneto-optic memory with >10¹² endurance (Pintus et al. 2025) — early, but directly aimed at the endurance wall.
5.3 Attention breaks the static-weight assumption
The transformer's defining operation — attention — multiplies activations by activations: QKᵀ and (softmax)·V. Both operands change every token, every layer, every step. Architectures whose weight-programming path is slow (meshes, PCM) simply cannot host attention; they are confined to the feed-forward and projection GEMMs (which are, to be fair, the majority of FLOPs at short-to-moderate context). Photonic attention requires architectures in which both operands enter optically at symbol rate — e.g., crossbars where one operand modulates wavelengths and the other modulates time slots, or the recent coherent direct matrix–matrix processors. This is an active frontier; surveys of photonic LLM acceleration identify dynamic-matrix mapping as a principal open challenge alongside memory for long context.
5.4 Backpropagation through analog hardware
Backprop requires multiplying by the transpose of each forward matrix and by the Jacobian of each nonlinearity. Options:
- Digital twin / hybrid backprop: forward pass in optics, backward pass on a digital model of the hardware. Fails when the model and the physical device diverge (the "reality gap").
- Physics-aware training (Wright et al. 2022, Nature): forward pass through the physical system, backward pass through a differentiable digital surrogate, with the surrogate's error absorbed because gradients only need to be directionally correct. Demonstrated on arbitrary physical systems, including optics.
- In-situ adjoint backpropagation (Hughes et al. 2018; experimentally realized by Pai et al., Science 2023): exploit optical reciprocity — send the error signal backward through the same mesh, and the interference of forward and backward fields yields the gradient with respect to each phase shifter, measured locally. The hardware computes its own gradients. This is the most elegant known resolution, currently demonstrated at small scale.
- Fully forward-mode training (Xue et al. 2024, Nature): gradient estimation using only forward physical propagations, avoiding the backward pass entirely; and forward-only on-chip training of photonic deep networks (Bandyopadhyay et al. 2024, Nature Photonics). These trade extra forward passes for architectural simplicity, and their scaling to 10⁹+ parameters is unproven.
- The honest summary: every ingredient of photonic training exists as a published demonstration — sub-photon MACs, 9-bit weights, in-situ gradients, ns-scale weight updates, matrix–matrix single-shot processors. No published system composes even three of them at LLM-relevant scale. Composition, not existence, is the open problem.
6. System-Level Analysis: Amdahl, Memory, and the Nonlinearity Gap
6.1 Amdahl's law for a photonic GEMM engine
Suppose photonics makes GEMM energy negligible. Training energy on current systems splits roughly into arithmetic, memory movement (HBM reads/writes of weights, activations, optimizer state), and interconnect (gradient all-reduce). GEMMs are perhaps 40–70% of energy even when they are >95% of FLOPs, because memory traffic is so expensive per byte. A perfect photonic GEMM engine therefore yields at most a 2–3× system energy improvement unless the memory system is also rebuilt — for instance by keeping activations optical between layers, or by the in-memory weight schemes of §2.3. Surveys of photonic LLM hardware reach the same conclusion: memory, especially for long-context KV caches, is the co-equal bottleneck.
This is not an argument against photonic GEMM; it is the specification for what must accompany it. The corresponding digital-history precedent is exact: fast multipliers alone did not make GPUs dominant — high-bandwidth memory co-design did.
6.2 The nonlinearity gap
Between every pair of matrix multiplications sits a nonlinearity (GeLU, softmax, layernorm). All-optical nonlinearities at low photon numbers remain weak, noisy, or slow; nearly all systems detect, apply the nonlinearity electronically (or in the detector's own response), and re-modulate. Each optical–electronic–optical (OEO) hop is a conversion tax at every layer boundary. Softmax is particularly hostile: it is global (requires a reduction across the row), dynamic-range-heavy (exponentials), and precision-sensitive. A realistic near-term architecture keeps softmax/layernorm digital and pays the OEO tax, again bounding the achievable speedup rather than eliminating it. On-chip trainable diffractive systems with integrated nonlinear activation are appearing (Cheng et al. 2024), but at small scale.
6.3 A quantitative sketch
Take a deliberately concrete near-term design point and let it be wrong in public:
- Photonic tile: N = 256 coherent block, 10 GHz symbol rate → 6.5 × 10¹⁴ MAC/s per tile.
- Conversion budget: 1 pJ/element/boundary (aggressive but roadmapped with integrated EO-DAC links) → ~4 fJ/MAC amortized.
- 8 effective bits forward, stochastic rounding into FP32 digital accumulators; weights streamed, not stored optically.
- 1000 tiles per system → 6.5 × 10¹⁷ MAC/s ≈ 1.3 EFLOP/s (counting MAC = 2 FLOP) at ~5 kW of conversion power plus laser and digital overheads — call it 30–50 kW system.
A 10²⁵-FLOP training run on such a system: ~10⁷ s·EFLOP → order 100 days on one such system, at an arithmetic energy of order 10 MWh versus ~10³ MWh for the same arithmetic on current GPUs. The two-orders-of-magnitude arithmetic energy gap is real; the system gap after memory, interconnect, cooling, and the OEO tax plausibly compresses to 5–20×. That is not "free." It is, however, the difference between a gigawatt datacenter and a 50–200 MW one — which at frontier scale is the difference that decides where and whether training runs happen.
Every number in this sketch is a conjecture-grade engineering estimate, not a measurement. Its purpose is falsifiability: each line item names the benchmark that would confirm or destroy it.
7. Discussion: The Permission Structure
The folk claim — "optics computes matrix products for free" — decomposes under audit into one theorem, one engineering fact, and one open problem:
- Theorem-grade: linear optical propagation implements exact linear transformations with zero switching energy, and shot-noise statistics allow the energy per MAC to fall as O(1/N) at fixed output precision, demonstrated below one photon per multiplication.
- Engineering fact: system energy is boundary-dominated (lasers, DAC, ADC, OEO hops); current full systems sit within 1–2 orders of magnitude of digital, with the gap set by conversion electronics that improve on ordinary CMOS scaling curves, not by any optical limit.
- Open problem: the conjunction required for training — unbiased analog error statistics, ≥8-bit effective forward precision, weight-update paths compatible with 10⁶–10⁷ SGD steps, dynamic-operand capability for attention, and gradient computation that does not round-trip through a digital simulation — has never been demonstrated in a single system at even 10⁸ parameters.
Framed as a permission structure: physics does not forbid photonic training. It issues a specification with a price list. The multiplication itself is the one line item marked gratis; everything surrounding it is priced in photons, conversions, and calibration overheads, all of which amortize favorably with scale and none of which sits on a fundamental floor within three orders of magnitude of where engineering currently is. The pattern matches other cases where an apparent prohibition dissolves into a cost paid in a different currency: here the currency is not energy per operation but precision management and boundary bandwidth.
7.1 Falsifiable milestones (2026–2035)
The thesis of this paper should be considered confirmed in stages if the following occur, and weakened or falsified by their absence:
- M1 (near-term): a photonic system trains a ≥10⁸-parameter transformer to within 1% of digital baseline perplexity, end-to-end, with all GEMMs optical. Falsifier: persistent bias-induced divergence at scale despite dithering.
- M2: demonstrated attention (both operands dynamic) at ≥10 GHz symbol rate with ≥6 effective bits in a matrix–matrix photonic processor. Falsifier: dynamic-operand precision proves fundamentally worse than static-weight precision due to modulator nonlinearity.
- M3: system-level (wall-plug, including lasers and conversion) energy per training MAC below 1 fJ at ≥8 output bits. Falsifier: ADC energy scaling fails to improve and pins the boundary cost.
- M4 (decisive): a frontier-relevant training run (≥10²⁴ FLOP) completes on a photonic-majority system at ≥5× lower facility energy than the contemporaneous GPU baseline.
If M1–M3 land and M4 does not, the diagnosis will almost certainly be memory and interconnect, not multiplication — which would itself confirm the central accounting of this paper: multiplication was never the thing being paid for.
8. Conclusion
Photonic processors do not make matrix multiplication free. They make it amortized: the O(N²) arithmetic rides at zero marginal energy on O(N) boundary conversions, down to a shot-noise floor that experiments have already touched at sub-photon-per-MAC levels. For inference, this accounting already closes commercially. For LLM training, four additional requirements — unbiased low-precision statistics, fast unlimited-endurance weight paths, dynamic-operand attention, and physical gradient computation — are each individually demonstrated and jointly undemonstrated. The barrier is not a prohibition of physics but a conjunction of engineering specifications, every one of which is currently on a public roadmap. The cartoon — light doing math for nothing — closes. The real problem — composing five solved subproblems into one machine at 10¹¹ parameters — stays open.
Appendix A: Claims Ledger
Claim Layer Status
A1 Lossless linear optics implements exact unitaries; SVD extends to arbitrary matrices physics theorem (Reck 1994; Clements 2016) A2 Optical propagation dissipates no switching energy; costs concentrate at boundaries physics theorem (ideal case) / measured (real devices) A3 Energy per MAC amortizes as O(1/N) at fixed output SNR physics theorem-grade derivation, experimentally supported (Wang 2022) A4 Sub-1-photon-per-MAC operation is possible physics demonstrated (Wang et al. 2022) A5 ≥9-bit photonic weight precision achievable dynamics demonstrated at small scale (Zhang et al. 2022) A6 Coherent mesh error grows with optical depth N dynamics theorem-grade, drives tiling in practice A7 SGD tolerates unbiased analog noise; bias is the failure mode dynamics strong conjecture — solid theory + small-scale experiment; unverified at LLM scale A8 In-situ optical backpropagation via reciprocity dynamics demonstrated small-scale (Pai et al. 2023); scaling open A9 Attention (dynamic×dynamic) is photonically implementable at training rates dynamics open problem; single-shot MMM demos are existence proofs only A10 Weight-update endurance/bandwidth compatible with 10⁶⁺ SGD steps dynamics open; streamed-weight architectures dodge it, nonvolatile ones do not yet A11 System-level 5–20× training energy advantage by ~2035 dynamics conjecture — the §6.3 sketch; every line falsifiable A12 "Optics computes for free" myth retired — replace with A2 + A3 A13 "Photonics is 1000000× more efficient than GPUs" myth retired — device-level projection misread as system claim
Author
- Oleksii Vergunenko
References
- 1.Bandyopadhyay, S., Hamerly, R., & Englund, D. (2021). Hardware error correction for programmable photonics. Optica 8, 1247.
- 2.Bandyopadhyay, S., et al. (2024). Single-chip photonic deep neural network with forward-only training. Nature Photonics 18, 1335–1343.
- 3.Cheng, J., Huang, C., et al. (2024). Multimodal deep learning using on-chip diffractive optics with in situ training capability. Nature Communications 15, 6189.
- 4.Clements, W. R., et al. (2016). Optimal design for universal multiport interferometers. Optica 3, 1460.
- 5.Feldmann, J., et al. (2021). Parallel convolutional processing using an integrated photonic tensor core. Nature 589, 52–58.
- 6.Hughes, T. W., Minkov, M., Shi, Y., & Fan, S. (2018). Training of photonic neural networks through in situ backpropagation and gradient measurement. Optica 5, 864.
- 7.Li, et al. (2025). What is next for LLMs? Pushing the boundaries of next-gen AI computing hardware with photonic chips. Nanophotonics (2025-0217).
- 8.Pai, S., et al. (2023). Experimentally realized in situ backpropagation for deep learning in photonic neural networks. Science 380, 398–404.
- 9.Pintus, P., et al. (2025). Integrated non-reciprocal magneto-optics with ultra-high endurance for photonic in-memory computing. Nature Photonics 19, 54–62.
- 10.Reck, M., Zeilinger, A., Bernstein, H. J., & Bertani, P. (1994). Experimental realization of any discrete unitary operator. Physical Review Letters 73, 58.
- 11.Shen, Y., et al. (2017). Deep learning with coherent nanophotonic circuits. Nature Photonics 11, 441–446.
- 12.Sludds, A., et al. (2022). Delocalized photonic deep learning on the internet's edge. Science 378, 270–276.
- 13.Tait, A. N., et al. (2017). Neuromorphic photonic networks using silicon photonic weight banks. Scientific Reports 7, 7430.
- 14.Tang, R., et al. (2025). Waveguide-multiplexed photonic matrix-vector multiplication processor using multiport photodetectors. Optica 12, 812–820.
- 15.Wang, T., Ma, S.-Y., Wright, L. G., Onodera, T., Richard, B., & McMahon, P. L. (2022). An optical neural network using less than 1 photon per multiplication. Nature Communications 13, 123.
- 16.Wright, L. G., et al. (2022). Deep physical neural networks trained with backpropagation. Nature 601, 549–555.
- 17.Xu, X., et al. (2021). 11 TOPS photonic convolutional accelerator for optical neural networks. Nature 589, 44–51.
- 18.Xue, Z., et al. (2024). Fully forward mode training for optical neural networks. Nature 632, 280–286.
- 19.Yu, X., et al. (2025). Parallel optical computing capable of 100-wavelength multiplexing. eLight 5, 10.
- 20.Zhang, W., et al. (2022). Silicon micro ring synapses enable photonic deep learning beyond 9-bit precision. Optica 9, 579–584.
- 21.Zhou, H., et al. (2022). Photonic matrix multiplication lights up photonic accelerator and beyond. Light: Science & Applications 11, 30.
Experimentation loop
0. What the simulation established (and what it cannot)
Six acceptance tests, all passing (sim_results.json):
Test Result Ledger claim T1 E/MAC slope vs N = −1.006 (conversion regime) A3 confirmed in-model T2 ENOB tracks √n̄ shot law, mean dev 0.02 bits A3/A4 confirmed in-model T3 Unbiased noise σ ≤ 0.05 → loss gap ≤ 0.2% (σ = 0.2 → only 19%) A7 (variance half) T4 Fixed-offset bias fails at β* = 0.016 (gap 47%); β = 0.064 → gap 400% A7 (bias half) T5 One knob (β) breaks loss, gradient-bias-fraction, and weight drift within one grid step (0.008–0.016) A7 coupling T6 Coherent-mesh error grows as N^0.57 at fixed per-phase ε A6
Two findings the simulation produced rather than assumed — both must be carried into hardware as pre-registered predictions:
P1 (gain-bias absorption): fixed-pattern gain miscalibration at β = 0.064 — four times the fatal offset level — trains to baseline (loss 0.750 vs 0.724). SGD absorbs static multiplicative error into the weights. This is the mechanism behind hardware-in-the-loop training, discovered here as a negative result of the first bias model. P2 (dither rescue): sign-flipping the offset pattern per step (zero-meaning it) converts a fatal β = 0.032 (gap 142%) into a benign one (gap 5.7%). Chopper stabilization should rescue analog training.
What the simulation cannot establish: whether real hardware error distributions are Gaussian-offset-like at all; whether drift timescales beat recalibration cadence; anything about attention-scale dynamics. Hence the loop.
1. Loop architecture
┌──────────────────────────────────────────────────────┐
│ │
▼ │
[Stage 0: Noise census] ──measured error model──▶ [Stage 1: Re-parameterized sim]
│ pre-registered predictions
▼
[Stage 3: In-situ gradients] ◀──gate G2 pass── [Stage 2: HIL replay training]
│ gate G3 pass │ mismatch ▶ refine model,
▼ │ return to Stage 1 (the loop)
[Stage 4: Scale gate = paper milestone M1] │
▼
model FALSIFIED if loop
fails to close in ≤3 iterationsClosure criterion (pre-registered): the simulation is validated when, using only Stage-0 parameters and before Stage-2 data is seen, it predicts (i) the hardware trainability boundary β*/σ* within one sweep grid step, (ii) the dither-rescue effect direction and ≥ 5× gap reduction, and (iii) the gradient bias-fraction curve within a factor of 2. Three consecutive failed iterations of Stage 1→2 falsify the error-model class (Gaussian fixed-pattern + white additive), not merely its parameters — that outcome would itself be a publishable negative result against claim A7's tractability.
2. Stage 0 — Hardware noise census (weeks 1–8)
Platforms (any one suffices; two enable cross-platform generalization tests):
Programmable MZI mesh, N = 8–64 (research testbeds of the Pai et al. 2023 / Bandyopadhyay et al. 2024 type, or a commercial photonic dev kit). MRR weight-bank crossbar (Tait-style), which has different drift physics (thermal ring locking) — the better analogue of fixed-pattern offset via detector/TIA offsets. Optional large-N shot-noise rig: free-space SLM setup of the McMahon type for the sub-photon regime (T2's left flank).
Measurables → simulation knobs (the dictionary that closes the loop):
Hardware measurement Protocol Sim knob Detector/TIA offset map, dark current zero-input MVMs, 10⁴ repeats, per output channel β (offset pattern + magnitude) Calibration-residue gain map identity-matrix MVMs vs programmed values gain-pattern (P1 test) Additive noise vs optical power fixed MVM, sweep laser power, variance vs 1/n̄_ph σ_rel(n_ph); T2 hardware curve ADC effective bits sine-fit ENOB at operating rate adc_bits Drift spectrum repeated fixed MVM over hours; Allan deviation recalibration cadence; β drift term Per-MZI phase error ε mesh self-configuration residuals T6 tile-size limit
Gate G0: error model parameters extracted with ≤ 20% uncertainty; Allan-deviation knee located (defines the drift timescale against which training-step rate competes).
3. Stage 1 — Re-parameterized simulation, pre-registered predictions (weeks 8–10)
Replace the Gaussian idealizations in PhotonicNoise with the empirical Stage-0 distributions (bootstrap-resampled, preserving spatial correlations — crosstalk makes real fixed patterns correlated, unlike the i.i.d. patterns used here; this is the most likely first point of model failure and is flagged as such in advance). Re-run the full T1–T6 battery plus the β and σ sweeps. Publish the predictions (β*, σ*, bias-fraction curve, dither recovery factor) to a timestamped preprint or repo before Stage 2 runs.
4. Stage 2 — Hardware-in-the-loop replay training (weeks 10–20)
The same 64→256→10 task, forward GEMMs executed on the physical chip (tiled if N_chip < layer width), backward pass digital — the standard HIL configuration. Runs, in fixed order:
Baseline HIL — no added error beyond the hardware's own. Prediction: loss gap determined by the measured (β, σ) point's position relative to the Stage-1 boundary. Offset injection sweep — add controlled electronic offsets to sweep β across the predicted β*. This is the knob-turn that must reproduce Figure 4's coupled three-metric failure on hardware: clean-loss gap, measured gradient bias fraction (same batch replayed ~30×, hardware-mean gradient vs digital-exact), and weight drift vs a digital twin run from identical seed. Dither intervention — chopper-stabilize (polarity-flip input encoding per step, un-flip digitally). Prediction P2: ≥ 5× gap reduction at β = 2β*. Gain-residue control — deliberately undercalibrate the mesh (β_gain up to 0.06). Prediction P1: no significant loss gap. If P1 fails on hardware, the absorption mechanism is architecture-dependent and claim A7 needs a hardware-conditioned restatement.
Gate G2 (= closure criterion §1): predictions (i)–(iii) land. If not: diagnose which measured-vs-predicted curve diverged, refine the Stage-1 model (first candidate: correlated patterns; second: non-stationary drift during a run), and iterate. Maximum three iterations before declaring model-class falsification.
5. Stage 3 — In-situ gradients (months 5–9)
Replace the digital backward pass with physical gradient computation on an N = 8–16 mesh via the reciprocity/adjoint method (Pai et al. 2023 protocol). The Stage-2 bias-fraction instrument now audits physically measured gradients — the first direct hardware measurement of the quantity that T5 identified as the earliest-warning failure indicator (it crossed threshold at β = 0.008–0.016, alongside drift, before the loss gap became large at 0.016+).
Gate G3: in-situ-trained mesh reaches within 5% of HIL-trained loss on the same task, and its measured gradient bias fraction stays under 2.5× the variance floor across a full training run including at least one thermal-drift knee.
6. Stage 4 — Scale gate (months 9–24)
= milestone M1 of the paper: ≥ 10⁸-parameter transformer, all GEMMs photonic (streamed weights, digital optimizer state, digital softmax/layernorm), trained to within 1% of digital-baseline perplexity. The validated simulation now runs ahead of hardware as the design tool: it predicts, for the measured error budget, the maximum tile size (T6), the minimum photon budget per layer (T2), and the recalibration cadence (Stage-0 Allan knee) — and M1's outcome tests those predictions at scale.
Falsifiers, restated: persistent bias-induced divergence despite dithering and auto-zeroing (kills A7 tractability); correlated-error floor that no zero-meaning scheme removes (kills the error-model class); drift faster than any affordable recalibration cadence (kills training specifically while leaving inference intact — the diagnostic split the paper predicts).
7. Ledger updates purchased by this loop Claim Before After a closed loop A7 (bias vs variance) strong conjecture split and sharpened: gain-bias → absorbed (P1); offset-bias → fatal but ditherable (P2); each independently hardware-tested A3 amortization theorem-grade derivation hardware curve (Stage 0 power sweep) A6 depth scaling MC + literature measured ε → engineering tile-size rule A8 in-situ gradients demonstrated elsewhere reproduced with a bias-fraction audit attached
Simulation
Resultsjson
{
"runs": [
{
"name": "3b det",
"bits": 3,
"stoch": false,
"sigma": 0.05,
"gap": 0.4459113456005669,
"acc": 0.8733333333333333,
"E": 4.104340277777778e-15,
"mean_bits": 3.0
},
{
"name": "3b stoch",
"bits": 3,
"stoch": true,
"sigma": 0.05,
"gap": 0.832230241195886,
"acc": 0.9006666666666666,
"E": 4.104340277777778e-15,
"mean_bits": 3.0
},
{
"name": "4b det",
"bits": 4,
"stoch": false,
"sigma": 0.05,
"gap": -0.025237687967698492,
"acc": 0.8266666666666667,
"E": 4.104340277777778e-15,
"mean_bits": 4.0
},
{
"name": "4b stoch",
"bits": 4,
"stoch": true,
"sigma": 0.05,
"gap": 0.08937966402401037,
"acc": 0.822,
"E": 4.104340277777778e-15,
"mean_bits": 4.0
},
{
"name": "5b det",
"bits": 5,
"stoch": false,
"sigma": 0.05,
"gap": -0.06553870955077612,
"acc": 0.8253333333333334,
"E": 4.104340277777778e-15,
"mean_bits": 5.0
},
{
"name": "5b stoch",
"bits": 5,
"stoch": true,
"sigma": 0.05,
"gap": -0.0074430568386997555,
"acc": 0.8246666666666667,
"E": 4.104340277777778e-15,
"mean_bits": 5.0
},
{
"name": "6b det",
"bits": 6,
"stoch": false,
"sigma": 0.05,
"gap": -0.06842564044502794,
"acc": 0.8286666666666667,
"E": 4.397309027777778e-15,
"mean_bits": 6.0
},
{
"name": "6b stoch",
"bits": 6,
"stoch": true,
"sigma": 0.05,
"gap": -0.06853070452600035,
"acc": 0.8206666666666667,
"E": 4.397309027777778e-15,
"mean_bits": 6.0
},
{
"name": "8b det",
"bits": 8,
"stoch": false,
"sigma": 0.05,
"gap": -0.004664605939482195,
"acc": 0.8186666666666667,
"E": 1.1721527777777778e-14,
"mean_bits": 8.0
},
{
"name": "8b stoch",
"bits": 8,
"stoch": true,
"sigma": 0.05,
"gap": -0.04242015079105802,
"acc": 0.814,
"E": 1.1721527777777778e-14,
"mean_bits": 8.0
},
{
"name": "3b\u21926b sched stoch",
"bits": 4.2,
"stoch": true,
"sigma": 0.05,
"gap": 0.5748546225253967,
"acc": 0.8226666666666667,
"E": 4.221527777777778e-15,
"mean_bits": 4.2
},
{
"name": "4b stoch \u03c3=0.1",
"bits": 4,
"stoch": true,
"sigma": 0.1,
"gap": 0.0857186191898316,
"acc": 0.838,
"E": 4.102256944444444e-15,
"mean_bits": 4
},
{
"name": "4b stoch \u03c3=0.2",
"bits": 4,
"stoch": true,
"sigma": 0.2,
"gap": 0.3422672472691674,
"acc": 0.8393333333333334,
"E": 4.101736111111111e-15,
"mean_bits": 4
}
],
"baseline": 0.7238478205818257,
"best": "4b det"
}Codepython
"""
Optimization toward theoretical limits: minimize E/MAC subject to (loss gap < 5%).
Levers tested IN the training loop:
L1 stochastic rounding — converts ADC quantization from biased (dead-zone) to unbiased
L2 aggressive bit-width — ride the ADC energy curve (E_ADC ~ 4^bits) down to the cliff
L3 bit scheduling — low bits early (large gradients), high bits late
Then place the winner on the ladder to the physics floors (shot noise, Landauer).
"""
import numpy as np, json
import matplotlib; matplotlib.use("Agg")
import matplotlib.pyplot as plt
# ---------- task + model (mirrors photonic_sim.py) ----------
def make_data(n_train=6000, n_test=1500, dim=64, n_classes=10, seed=0):
rng = np.random.default_rng(seed)
means = rng.normal(0, 1.0, (n_classes, dim))
def sample(n, ln=0.0):
y = rng.integers(0, n_classes, n)
x = means[y] + rng.normal(0, 2.2, (n, dim))
if ln > 0:
flip = rng.random(n) < ln
y = np.where(flip, rng.integers(0, n_classes, n), y)
return x.astype(np.float64), y
return sample(n_train, 0.10), sample(n_test)
class Analog:
def __init__(self, sigma_rel=0.0, adc_bits=None, stochastic=False,
bit_schedule=None, rng=None):
self.sigma_rel, self.adc_bits = sigma_rel, adc_bits
self.stochastic, self.bit_schedule = stochastic, bit_schedule
self.rng = rng or np.random.default_rng(0)
self.step = 0
def bits_now(self):
if self.bit_schedule is None: return self.adc_bits
for upto, b in self.bit_schedule:
if self.step < upto: return b
return self.bit_schedule[-1][1]
def apply(self, Y, tag="x"):
s = Y.std() + 1e-12
out = Y.copy()
if self.sigma_rel > 0:
out += self.rng.normal(0, self.sigma_rel * s, Y.shape)
b = self.bits_now()
if b is not None:
r = 4.0 * s; q = 2 * r / (2 ** b)
x = np.clip(out, -r, r) / q
if self.stochastic:
fl = np.floor(x)
out = q * (fl + (self.rng.random(Y.shape) < (x - fl)))
else:
out = q * np.round(x)
return out
def gemm(A, B, nz, tag="x"): return nz.apply(A @ B, tag)
def train(nz, steps=500, batch=128, lr=0.05, mom=0.9, seed=1, data=None):
(Xtr, ytr), (Xte, yte) = data
rng = np.random.default_rng(seed)
d, h, c = Xtr.shape[1], 256, 10
W1 = rng.normal(0, np.sqrt(2/d), (d, h)); b1 = np.zeros(h)
W2 = rng.normal(0, np.sqrt(2/h), (h, c)); b2 = np.zeros(c)
V = [np.zeros((d,h)), np.zeros(h), np.zeros((h,c)), np.zeros(c)]
clean = Analog()
def grads(X, yb, n):
Z1 = gemm(X, W1, n, "f1"); Z1 = Z1 + b1
A1 = np.maximum(Z1, 0)
Z2 = gemm(A1, W2, n, "f2") + b2
Z2s = Z2 - Z2.max(1, keepdims=True)
P = np.exp(Z2s); P /= P.sum(1, keepdims=True)
loss = -np.log(P[np.arange(len(yb)), yb] + 1e-12).mean()
dZ2 = P.copy(); dZ2[np.arange(len(yb)), yb] -= 1; dZ2 /= len(yb)
gW2 = gemm(A1.T, dZ2, n, "g2"); gb2 = dZ2.sum(0)
dA1 = gemm(dZ2, W2.T, n, "b2")
dZ1 = dA1 * (Z1 > 0)
gW1 = gemm(X.T, dZ1, n, "g1"); gb1 = dZ1.sum(0)
return loss, (gW1, gb1, gW2, gb2), Z2
for t in range(steps):
nz.step = t
idx = rng.integers(0, len(Xtr), batch)
_, G, _ = grads(Xtr[idx], ytr[idx], nz)
for i, (p, g) in enumerate(zip([W1, b1, W2, b2], G)):
V[i] = mom * V[i] - lr * g; p += V[i]
clean_loss, _, Z2 = grads(Xte, yte, clean)
return float(clean_loss), float((Z2.argmax(1) == yte).mean())
# ---------- energy model ----------
N_TILE, hw, eta = 256, 1.28e-19, 0.2
E_DAC = 0.5e-12
E_ADC8, E_ADC_FLOOR = 2.0e-12, 50e-15 # thermal 4^b scaling + comparator floor
def E_adc(bits): return max(E_ADC8 * 4.0**(bits - 8), E_ADC_FLOOR)
def photons_per_mac(sigma_rel): # SNR=1/sigma on accumulated sum of N terms
return (1.0 / sigma_rel**2) / (N_TILE * 0.36)
def E_mac(sigma_rel, mean_bits):
conv = (2 * E_DAC + E_adc(mean_bits)) / N_TILE
shot = photons_per_mac(sigma_rel) * hw / eta
return conv + shot, conv, shot
# ---------- experiment grid ----------
print("== optimization sweep ==")
data = make_data()
base_loss, base_acc = train(Analog(), data=data)
print(f"baseline clean_loss={base_loss:.4f} acc={base_acc:.4f}")
runs = []
SIG = 0.05
for bits in [3, 4, 5, 6, 8]:
for stoch in [False, True]:
cl, acc = train(Analog(sigma_rel=SIG, adc_bits=bits, stochastic=stoch,
rng=np.random.default_rng(50 + bits)), data=data)
gap = (cl - base_loss) / base_loss
e, conv, shot = E_mac(SIG, bits)
runs.append(dict(name=f"{bits}b {'stoch' if stoch else 'det'}",
bits=bits, stoch=stoch, sigma=SIG, gap=gap,
acc=acc, E=e, mean_bits=float(bits)))
print(f"bits={bits} {'stoch' if stoch else 'det '} gap={100*gap:6.1f}% "
f"acc={acc:.3f} E/MAC={e*1e15:6.2f} fJ")
# L3: bit schedule 3b (first 60%) -> 6b (last 40%), stochastic
sched = [(300, 3), (500, 6)]
cl, acc = train(Analog(sigma_rel=SIG, stochastic=True, bit_schedule=sched,
rng=np.random.default_rng(99)), data=data)
mean_bits_energy = 0.6 * E_adc(3) + 0.4 * E_adc(6) # energy-weighted schedule
e_sched = (2 * E_DAC + mean_bits_energy) / N_TILE + photons_per_mac(SIG) * hw / eta
gap = (cl - base_loss) / base_loss
runs.append(dict(name="3b→6b sched stoch", bits=4.2, stoch=True, sigma=SIG,
gap=gap, acc=acc, E=e_sched, mean_bits=4.2))
print(f"sched 3b→6b stoch gap={100*gap:6.1f}% acc={acc:.3f} E/MAC={e_sched*1e15:6.2f} fJ")
# push sigma (photon budget) at the best passing bit config
for sig in [0.10, 0.20]:
cl, acc = train(Analog(sigma_rel=sig, adc_bits=4, stochastic=True,
rng=np.random.default_rng(200)), data=data)
gap = (cl - base_loss) / base_loss
e, _, _ = E_mac(sig, 4)
runs.append(dict(name=f"4b stoch σ={sig}", bits=4, stoch=True, sigma=sig,
gap=gap, acc=acc, E=e, mean_bits=4))
print(f"4b stoch sigma={sig} gap={100*gap:6.1f}% acc={acc:.3f} E/MAC={e*1e15:6.2f} fJ")
# ---------- floors ----------
passing = [r for r in runs if r["gap"] < 0.05]
best = min(passing, key=lambda r: r["E"]) if passing else None
ref8 = next(r for r in runs if r["bits"] == 8 and not r["stoch"])
shot_floor = photons_per_mac(best["sigma"]) * hw / eta if best else None
landauer = 3e-21 * 2 * best["mean_bits"] if best else None # ~kTln2 per bit-op, 2 ops/MAC
print("\n== ladder ==")
print(f"8-bit det reference : {ref8['E']*1e15:8.2f} fJ/MAC (gap {100*ref8['gap']:.1f}%)")
if best:
print(f"optimized ({best['name']}): {best['E']*1e15:8.2f} fJ/MAC (gap {100*best['gap']:.1f}%)")
print(f" -> conversion share: {100*(best['E']-shot_floor)/best['E']:.1f}%")
print(f"shot floor @ this precision/N : {shot_floor*1e18:8.3f} aJ/MAC")
print(f"Landauer (~) : {landauer*1e21:8.2f} zJ/MAC")
json.dump(dict(runs=runs, baseline=base_loss,
best=(best["name"] if best else None)),
open("optimize_results.json", "w"), indent=2, default=float)
# ---------- Pareto figure ----------
fig, ax = plt.subplots(figsize=(6.8, 4.6))
for r in runs:
ok = r["gap"] < 0.05
ax.scatter(r["E"] * 1e15, max(100 * r["gap"], 0.05),
marker="o" if r["stoch"] else "s",
c=("tab:green" if ok else "tab:red"), s=55, zorder=3)
ax.annotate(r["name"], (r["E"] * 1e15, max(100 * r["gap"], 0.05)),
fontsize=6.5, xytext=(4, 4), textcoords="offset points")
ax.axhline(5, ls=":", c="gray", lw=1)
ax.text(ax.get_xlim()[0], 5.6, "5% trainability limit", fontsize=7, color="gray")
if best:
ax.axvline(shot_floor * 1e15, ls="--", c="tab:blue", lw=1)
ax.text(shot_floor * 1e15 * 1.1, 30, "shot-noise floor\n(this precision, N=256)",
fontsize=7, color="tab:blue")
ax.set_xscale("log"); ax.set_yscale("log")
ax.set_xlabel("energy per MAC (fJ) — N=256 tile, conversion + photons")
ax.set_ylabel("clean-loss gap vs digital baseline (%)")
ax.set_title("Optimization toward the floor: unbiased rounding buys bits,\n"
"bits buy energy — until the DAC is all that's left")
ax.grid(alpha=0.3)
fig.tight_layout(); fig.savefig("fig6_pareto.png", dpi=140); plt.close(fig)
print("fig6 written")