In Situ Training of Optical Neural Networks by Coding Agents

Hugging Face Daily Papers Papers

Summary

This paper introduces 'optics as code', a method where a coding agent trains an optical neural network from measurements alone by reparametrizing it with interpretable optical elements, outperforming gradient-free methods and approaching backpropagation accuracy at lower cost without per-device calibration.

Optical neural networks promise fast, energy-efficient computing, but every device departs from its design and must be trained with the hardware. In situ training relies on an expert-built calibrated digital model of each device or on gradient-free trial and error. Coding agents, large language models that write and run programs, have shown an emergent ability to understand and edit the weights of digital neural networks. Here we introduce optics as code, a method in which a coding agent trains an optical neural network from measurements alone, through a harness that returns camera images of its probes and requires a hypothesis per request. We discovered that the agent forms a physical understanding of the optics and reparametrizes the network with interpretable optical elements tuned on the hardware. It outperforms gradient-free methods in classification and image encoding, approaching backpropagation through a calibrated model at a fraction of the cost. Needing neither per-device calibration nor gradients through the hardware, and improving with more capable models, optics as code offers a practical route to large, scalable optical neural networks and a general tool for calibrating and optimizing optical experiments.
Original Article
View Cached Full Text

Cached at: 11/20/26, 07:36 PM

Paper page - In Situ Training of Optical Neural Networks by Coding Agents

Source: https://huggingface.co/papers/2611.23875

Abstract

A coding agent trains an optical neural network from measurements alone by reparametrizing it with interpretable optical elements, achieving better classification and image encoding than gradient-free methods and approaching backpropagation through a calibrated model at lower cost.

Optical neural networkspromise fast, energy-efficient computing, but every device departs from its design and must be trained with the hardware.In situ trainingrelies on an expert-builtcalibrated digital modelof each device or ongradient-free trial and error.Coding agents,large language modelsthat write and run programs, have shown an emergent ability to understand and edit the weights of digital neural networks. Here we introduceoptics as code, a method in which a coding agent trains an optical neural network from measurements alone, through a harness that returns camera images of its probes and requires a hypothesis per request. We discovered that the agent forms a physical understanding of the optics and reparametrizes the network withinterpretable optical elementstuned on the hardware. It outperforms gradient-free methods in classification and image encoding, approachingbackpropagationthrough a calibrated model at a fraction of the cost. Needing neitherper-device calibrationnor gradients through the hardware, and improving with more capable models,optics as codeoffers a practical route to large,scalable optical neural networksand a general tool for calibrating and optimizing optical experiments.

View arXiv pageView PDFProject pageAdd to collection

Get this paper in your agent:

hf papers read 2611\.23875

Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash

Models citing this paper0

No model linking this paper

Cite arxiv.org/abs/2611.23875 in a model README.md to link it from this page.

Datasets citing this paper0

No dataset linking this paper

Cite arxiv.org/abs/2611.23875 in a dataset README.md to link it from this page.

Spaces citing this paper0

No Space linking this paper

Cite arxiv.org/abs/2611.23875 in a Space README.md to link it from this page.

Collections including this paper0

No Collection including this paper

Add this paper to acollectionto link it from this page.

Similar Articles