--- library_name: pytorch tags: - pytorch - photonics - electromagnetics - surrogate-model - scientific-computing --- # Neon Slab Predictor A fast neural network predictor for dielectric slab optical response, trained on FDFD simulation data from the Neon solver. ## What it does Give it a dielectric slab configuration. Get optical response back in milliseconds. Inputs: slab thickness (um), relative permittivity real part, wavelength (um) Outputs: normalized transmission, normalized reflection, normalized peak intensity ## Install and use ```python from neon import Neon model = Neon.from_pretrained() result = model.predict( thickness=0.30, epsilon_real=2.25, wavelength=0.80 ) print(result) ``` ## What this is This model is trained on 2D scalar FDFD simulation data from the Neon benchmark solver. It covers one geometry class: a rectangular dielectric slab at normal incidence in vacuum. Within that class it is a fast, usable predictor. ## What this is not This model does not generalize to metasurfaces, waveguides, photonic crystals, multilayer stacks, oblique incidence, dispersive materials, or full-vector Maxwell problems. If your structure is not a simple dielectric slab, this model will give you a number that means nothing. ## Performance Saved single-model test MAE: - transmission: 0.053586 - reflection: 0.055240 - intensity: 0.234785 Saved OOD degradation warning: - benchmark-facing Model C ensemble OOD transmission MAE: 0.107476 - benchmark-facing Model C ensemble OOD reflection MAE: 0.105841 - benchmark-facing Model C ensemble OOD intensity MAE: 0.174486 - overall OOD mean MAE: 0.129268 Note: the repository does not currently store a single-model benchmark-facing OOD summary. The OOD warning above comes from the saved 5-member Model C ensemble evaluation. ## Training data range - thickness: 0.12 to 0.46 um - epsilon_real: 1.4 to 4.0 - wavelength: 0.72 to 0.92 um - inputs outside this range trigger validation; `predict()` raises a validation error by default and can warn instead with `warn_only=True` ## Companion paper Toward Trustworthy Surrogate Models for Electromagnetic Simulation: A Systematic Evaluation of Physics-Informed Training, Uncertainty, and Active Learning on a Controlled Benchmark in preparation ## Citation TBD