Autonomous Algorithm Discovery for Ptychography via Evolutionary LLM Reasoning
Organizations: Advanced Photon Source, Argonne National Laboratory, Lemont, IL, USA · Department of Materials Science and NanoEngineering, Rice University, Houston, TX, USA
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.
Figures & tables
| Dataset | Algorithms | Success | Best | SSIM | PSNR | Duration |
|---|---|---|---|---|---|---|
| X-ray IC | 100 | 83% | 0.785 | +0.26 | +8.3 dB | 16.5 hrs |
| Apoferritin | 147 | 97% | 0.836 | +0.12 | +3.2 dB | 29.5 hrs |
| Multislice | 97 | 94% | 0.871 | +0.18 | +8.0 dB | 10.5 hrs |
| Dataset | Technique | Description |
|---|---|---|
| X-ray IC | Adaptive notch filtering | FFT-based grid artifact suppression |
| X-ray IC | Structure-tensor TV | Edge-aware anisotropic smoothing |
| X-ray IC | Barzilai-Borwein | Adaptive step size acceleration |
| Apoferritin | Variance-gated | Preserves features under noise |
| Apoferritin | Soft-Huber | Noise-adaptive shrinkage |
| Apoferritin | Perona-Malik | Anisotropic diffusion |