PyMieDiff: A differentiable Mie scattering library
arXiv:2512.08614 · doi:10.1063/5.0316814
Abstract
Light scattering by spherical-shaped particles of sizes comparable to the wavelength is foundational in many areas of science, from chemistry to atmospheric science, photonics and nanotechnology. With the new capabilities offered by machine learning, there is a great interest in end-to-end differentiable frameworks for scattering calculations. Here we introduce PyMieDiff, a fully differentiable, GPU-compatible implementation of Mie scattering for layered, spherical particles in PyTorch. The library provides native, autograd-compatible spherical Bessel and Hankel functions, vectorized evaluation of Mie coefficients, and APIs for computing efficiencies, angular scattering, and near-fields. All inputs - geometry, material dispersion, wavelengths, and observation angles and positions - are represented as tensors, enabling seamless integration with gradient-based optimisation or physics-informed neural networks. The toolkit can also be combined with "TorchGDM" for end-to-end differentiable multi-particle scattering simulations. PyMieDiff is available under an open source licence at https://github.com/UoS-Integrated-Nanophotonics-group/MieDiff.
14 pages, 7 figures; r1: added reference [36] to similar work; r2: [36] is now ref. [43]
References in corpus (12)
- Training deep neural networks for the inverse design of nanophotonic structures
- Inverse design of photonic crystals through automatic differentiation
- CELES: CUDA-accelerated simulation of electromagnetic scattering by large ensembles of spheres
- Forward-Mode Differentiation of Maxwell's Equations
- Deep learning enabled design of complex transmission matrices for universal optical components
- SMARTIES: user-friendly codes for fast and accurate calculations of light scattering by spheroids
- A newcomer's guide to deep learning for inverse design in nano-photonics
- Multi-objective and categorical global optimization of photonic structures based on ResNet generative neural networks
- Designing Collective Non-local Responses of Metasurfaces
- Inverse design with flexible design targets via deep learning: Tailoring of electric and magnetic multipole scattering from nano-spheres
- T-matrix representation of optical scattering response: Suggestion for a data format
- TorchGDM: A GPU-Accelerated Python Toolkit for Multi-Scale Electromagnetic Scattering with Automatic Differentiation