English

PyMieDiff: A differentiable Mie scattering library

Optics 2026-05-05 v3 Computational Physics

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.

Keywords

Cite

@article{arxiv.2512.08614,
  title  = {PyMieDiff: A differentiable Mie scattering library},
  author = {Oscar K. C. Jackson and Simone De Liberato and Otto L. Muskens and Peter R. Wiecha},
  journal= {arXiv preprint arXiv:2512.08614},
  year   = {2026}
}

Comments

14 pages, 7 figures; r1: added reference [36] to similar work; r2: [36] is now ref. [43]

R2 v1 2026-07-01T08:17:01.410Z