LensDesigner: A Self-Improving Agent for Optical Lens Design

Lei Sun, Haoran Liang, Dannong Xu, Yao Gao, Yuyu Geng, Jinjin Gu, Kaiwei Wang, Danda Pani Paudel, Luc Van GoolNeurIPS 2026

TL;DR

Designing optical lenses—arranging glass elements so light bends into a tack-sharp image—has long been more of a dark art than a purely automated science, requiring years of human intuition to avoid mathematical dead ends. LensDesigner turns Large Language Models into autonomous optical engineers that retrieve good starting structures, tweak lens geometry inside physical simulators, and continuously build a "skill library" of design heuristics from past mistakes. It turns days of brute-force optimization into tens of seconds, matching or beating human-patented designs on tricky optical setups.

What Problem Does This Paper Address?

Every smartphone camera, telescope, and AR headset relies on stacked glass lenses to bend incoming light onto a sensor without distortion (aberrations). Mathematically, choosing the exact curvature, thickness, spacing, and glass material for every lens element is a treacherous, high-dimensional, non-convex optimization problem.

Commercial software like Zemax is great at local fine-tuning, if you hand it a solid starting design. Without decades of human intuition to pick that initial "seed," optimization algorithms get stuck in terrible local optima. Existing automated alternatives either take days of compute using evolutionary algorithms (requiring heavy manual tuning) or simply look up existing designs in a database—which fails completely when you ask for an extreme, novel lens outside that database. Meanwhile, raw LLMs know optical theory, but they are notoriously bad at precise, continuous physics calculations.

Figure 1: Manual lens design is a highly experience-dependent task that typically requires years of accumulated human expertise. Similarly, LENSDESIGNER mimics this trajectory through a self- evolving mechanism, continuously accumulating skills to advance its optical design capabilities.

Methods

Instead of asking an LLM to guess lens numbers from thin air, the authors build LensDesigner to mirror how veteran optical engineers actually work:

  1. Optics-Aware Retrieval: Engineers never start from scratch. Given target specs—like Field of View (FoV, angular width of the scene) and F-number ($f/\#$, aperture size governing light intake)—the system searches a massive custom lens library. Crucially, it doesn't use fuzzy text embeddings; it ranks candidates using deterministic physics metrics, asymmetrically penalizing lenses that would need difficult modifications (like widening a narrow FoV).
  2. Macro Orchestration & Tool Suite: Rather than letting the LLM wander in an open-ended loop, it follows a strict four-stage Standard Operating Procedure: retrieve seeds, scale dimensions to align the focal length, modify/locally optimize geometry (e.g., splitting a single lens into two to share optical power), and run final Damped Least Squares refinement in Zemax. Strict physical guardrails reject unphysical edits (like flipping a lens's curvature sign).
  3. Training-Free Self-Evolution: A separate "curriculum agent" feeds LensDesigner progressively harder tasks. By watching simulator feedback on both successes and failures, the agent distills reusable action sequences and boundary rules into a persistent Skill Library. The LLM's weights never change, yet its optical "intuition" compounds over time.
LensDesigner retrieves physical seeds from LensLib100K and orchestrates physics-checked tools to iteratively refine the lens.

Datasets

Because automated optics lacked large-scale data and standardized testing, the authors built two new resources:

  • LensLib100K (Retrieval Seed Bank): Despite the humble name, this library contains 180,000 distinct, manufacturable lens designs generated over 2,000 GPU hours using an enhanced genetic algorithm (upgraded with real glass catalogs and wide-angle ray aiming). It covers standard specs (FoV $8^\circ$–$118^\circ$, $f/\#$ $1.6$–$6.0$).
  • LensArena (Evaluation Benchmark): Prior papers usually tested on just a handful of cherry-picked lenses. LensArena introduces 120 diverse tasks across Easy, Medium, and Hard tiers, pushing into extreme territory (FoVs up to $180^\circ$, apertures down to $f/0.7$). Importantly, 70% of LensArena queries are out-of-distribution relative to LensLib100K, forcing true adaptation rather than memorization.
LensArena deliberately pushes into extreme FoVs and F-numbers well outside the LensLib100K seed distribution.

Key Insights and Ideas

  • Semantic RAG flops at physics: Replacing the physics-formula retrieval with standard embedding-based "Vanilla RAG" caused aberration errors on hard tasks to balloon nearly fourfold ($189.6\ \mu\text{m}$ vs. $48.8\ \mu\text{m}$ in ablations). Text similarity does not equal optical compatibility.
  • LLMs need guardrails, not free rein: Stripping away the structured workflow (Macro Orchestration) or physics-constrained tools tanks performance on hard designs. LLMs shine as high-level strategists—deciding when to split a lens element—while leaving exact ray-tracing math to classical solvers.
  • Experience transfers without fine-tuning: Watching the self-evolving trajectory shows a steady climb in success rates as distilled heuristics accumulate, proving an agent can learn domain intuition purely through persistent memory of simulator failures.

Key Results

Performance is measured by Success Rate (meeting a difficulty-specific sharpness threshold) and Avg RMS spot radius (how tightly light rays converge on the sensor, in micrometers—smaller means sharper).

  • Crushing Baselines: On LensArena's Hard tier, LensDesigner (with Gemini-3.0-flash) hits an 80.0% success rate (Avg RMS $12.7\ \mu\text{m}$), compared to 30.0% for retrieval-based LensNet, 13.3% for genetic-algorithm SOTA QGSO, 0% for deep-learning baseline DeepLens, and 26.7% for pure In-Context Learning with the exact same Gemini model.
  • Massive Speedup: LensDesigner converges in tens of seconds, whereas traditional global optimization methods require several hours to days per lens.
  • Rivaling Human Patents: Tested head-to-head against 9 real-world human lens patents at matching specs, LensDesigner achieved a tighter (better) spot radius in 6 out of 9 cases (mean RMS of $9.850\ \mu\text{m}$ vs. $10.177\ \mu\text{m}$), sometimes using fewer, simpler air-spaced glass elements than the human-patented designs.

Limitations and Future Work

Right now, LensDesigner lives strictly in a world of spherical lenses—classic curved glass surfaces. Modern compact cameras (like the ones in your phone) rely heavily on aspheric or freeform lenses, which have much more complex mathematical surface profiles, as well as folded optical paths (like periscope zooms). Additionally, the agent's speed is still bottlenecked by communication latency with external commercial ray-tracing software (Zemax). Extending the agentic toolkit to handle non-spherical surfaces and complex folded geometries is the natural next frontier.

Summary updated

Abstract

Optical lens design is a complex, non-convex optimization challenge that relies heavily on human experience and intuition. Existing optimized-based automatic lens design methods struggle to navigate this vast parameter space without meticulous manual tuning. In this paper, we present LensDesigner, an autonomous agent framework that mirrors the problem-solving workflow of expert optical engineers. To overcome the initial cold start problem, we construct LensLib100K, an extensive optical lens library, and employ Optics-Aware Retrieval to supply physically valid structural seeds. Within an interactive physical simulation environment, the agent executes macroscopic orchestration while receiving immediate optical feedback. Furthermore, we introduce a continuous self-evolving mechanism guided by a curriculum agent. By iteratively solving design tasks with progressively increasing difficulty, the agent autonomously extracts, accumulates, and reuses design heuristics, effectively evolving its optical lens design expertise over time. At the evaluation level, we introduce LensArena, a standardized evaluation benchmark comprising 120 diverse optical design tasks, covering extreme configurations. Extensive experiments on this benchmark demonstrate that LensDesigner significantly outperforms publicly available baseline algorithms, achieving superior success rates and optimization efficiency. We hope this work sheds light on the emerging field of AI for optics. Project page: https://insait-institute.github.io/LensDesigner/.
BibTeX
@inproceedings{sun2026lensdesigner,
  author = {Lei Sun and Haoran Liang and Dannong Xu and Yao Gao and Yuyu Geng and Jinjin Gu and Kaiwei Wang and Danda Pani Paudel and Luc Van Gool},
  title = {{LensDesigner: A Self-Improving Agent for Optical Lens Design}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=RCJQSQ83mu},
}
Figure