PyMieDiff: A differentiable Mie scattering library

Read full text
Authors: Oscar K. C. Jackson, Simone De Liberato, Otto L. Muskens, Peter R. Wiecha
Cited by: 1
References: 37

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, graphics processing unit-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 optimization 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 license at https://github.com/UoS-Integrated-Nanophotonics-group/MieDiff.

Fields of Study & Subjects

Random lasers and scattering media Metamaterials and Metasurfaces Applications Neural Networks and Reservoir Computing

Publication details

Journal / source
APL Photonics
Publisher
AIP Publishing
Volume
11
Issue
4
Publication date
1 April 2026
Language
EN