Table of Contents
Fetching ...

Autonomous Algorithm Discovery for Ptychography via Evolutionary LLM Reasoning

Xiangyu Yin, Ming Du, Junjing Deng, Zhi Yang, Yimo Han, Yi Jiang

TL;DR

Ptychi-Evolve is introduced, an autonomous framework that uses large language models (LLMs) to discover and evolve novel regularization algorithms, which combines LLM-driven code generation with evolutionary mechanisms, including semantically-guided crossover and mutation.

Abstract

Ptychography is a computational imaging technique widely used for high-resolution materials characterization, but high-quality reconstructions often require the use of regularization functions that largely remain manually designed. We introduce Ptychi-Evolve, an autonomous framework that uses large language models (LLMs) to discover and evolve novel regularization algorithms. The framework combines LLM-driven code generation with evolutionary mechanisms, including semantically-guided crossover and mutation. Experiments on three challenging datasets (X-ray integrated circuits, low-dose electron microscopy of apoferritin, and multislice imaging with crosstalk artifacts) demonstrate that discovered regularizers outperform conventional reconstructions, achieving up to +0.26 SSIM and +8.3~dB PSNR improvements. Besides, Ptychi-Evolve records algorithm lineage and evolution metadata, enabling interpretable and reproducible analysis of discovered regularizers.

Autonomous Algorithm Discovery for Ptychography via Evolutionary LLM Reasoning

TL;DR

Ptychi-Evolve is introduced, an autonomous framework that uses large language models (LLMs) to discover and evolve novel regularization algorithms, which combines LLM-driven code generation with evolutionary mechanisms, including semantically-guided crossover and mutation.

Abstract

Ptychography is a computational imaging technique widely used for high-resolution materials characterization, but high-quality reconstructions often require the use of regularization functions that largely remain manually designed. We introduce Ptychi-Evolve, an autonomous framework that uses large language models (LLMs) to discover and evolve novel regularization algorithms. The framework combines LLM-driven code generation with evolutionary mechanisms, including semantically-guided crossover and mutation. Experiments on three challenging datasets (X-ray integrated circuits, low-dose electron microscopy of apoferritin, and multislice imaging with crosstalk artifacts) demonstrate that discovered regularizers outperform conventional reconstructions, achieving up to +0.26 SSIM and +8.3~dB PSNR improvements. Besides, Ptychi-Evolve records algorithm lineage and evolution metadata, enabling interpretable and reproducible analysis of discovered regularizers.
Paper Structure (22 sections, 2 equations, 5 figures, 2 tables)

This paper contains 22 sections, 2 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: System architecture of Ptychi-Evolve showing the discovery loop. The LLM Engine generates regularizer code, which is executed by the Pty-Chi reconstruction library. The Evaluator assesses reconstruction quality and records metrics to the History Manager. Context from the history informs both the Evolution Controller (for selecting parent algorithms and actions) and the LLM Engine (for code generation). The Evolution Controller triggers actions (generate, tune, crossover, or mutate) that prompt the LLM to produce new regularizer variants.
  • Figure 2: Visual comparison of reconstructed phase images at representative iterations. Columns show a reference image, baseline reconstruction, and best discovered regularizer. For multislice and apoferritin, the reference is the simulated ground-truth phase; for X-ray IC, the reference is a long-iteration (i.e., 10,000) reconstruction used as an evaluation reference in the absence of ground truth. SSIM values overlaid on baseline/best are computed against the corresponding reference, and all images within each row share a unified color scale (shown by the colorbar on the right). X-ray IC is shown at 3000 iterations; apoferritin and multislice are shown at 1000 iterations.
  • Figure 3: Convergence comparison showing SSIM, PSNR, RMSE, and MAE versus reconstruction iterations for baseline (grey) and best discovered regularizer (green), computed against the same evaluation references as in Figure \ref{['fig:reconstruction']}. IC is swept up to 10,000 iterations; apoferritin and multislice are swept up to 1,000 iterations. Multislice results are shown per layer (top row: layer 1; bottom row: layer 2).
  • Figure 4: Discovery trajectory over generation number from the merged history. Grey points show successfully evaluated algorithms; the green curve shows the best discovery-evaluation SSIM found so far (computed at the fixed discovery horizon: IC 3000 iterations; apoferritin and multislice 1000).
  • Figure 5: Technique adoption timeline from the merged history, showing the generations in which successfully evaluated algorithms include each technique. Lines span first-to-last appearance and markers indicate that a technique appears in at least one algorithm in that generation (techniques shown have $\geq$5 occurrences; technique names are normalized to merge spelling variants).