PRISM: Position-encoded Regressive Inverse Spectral Model for Multilayer Thin-Film Design

Runtian Wang, Renhao Xue, Baige Chen, Hao Wu

TL;DR

This paper introduces PRISM, a novel transformer-based model for designing multilayer thin-film optical coatings. PRISM efficiently predicts both material types and layer thicknesses simultaneously, achieving state-of-the-art accuracy with significantly fewer parameters and faster inference times compared to existing methods.

What Problem Does This Paper Address?

Designing multilayer thin-film optical coatings is a notoriously difficult inverse problem. It involves determining the precise sequence of materials and their thicknesses to achieve a desired spectral response (like reflectance or transmittance). This is a "combinatorial-continuous" optimization challenge because you need to choose from a discrete set of materials and then fine-tune continuous thickness values. Traditional methods like simulated annealing or genetic algorithms can achieve high accuracy but are computationally expensive, taking minutes to hours per design. While recent neural network approaches have shown promise, they often struggle with efficiency, precision, or handling variable layer counts. This paper aims to bridge this gap by developing a more efficient and accurate neural network model for this complex design task.

Methods

PRISM is built upon a decoder-only autoregressive transformer architecture, similar to those used in natural language processing. Its key innovations lie in how it handles the input and encodes positional information:

  • Spectrum Prefix Conditioning: Instead of relying on complex cross-attention mechanisms, PRISM injects the target spectrum as a single "prefix token" at the beginning of the input sequence. This allows the model to "see" the target spectrum throughout the generation process using standard causal self-attention, simplifying the architecture.
  • Cumulative-Depth Rotary Position Embeddings (RoPE): Traditional transformers use sequential token indices for positional encoding. PRISM, however, uses the cumulative physical depth of the film stack (in nanometers) as the positional information. This is crucial because the physical interaction between layers depends on their actual distance, not just their order in the sequence. This RoPE variant allows the model to naturally handle variable layer counts and better capture the physics of thin-film interference.

PRISM uses a unified backbone that feeds into two output heads: one for predicting the material of the next layer and another for predicting its thickness. This "per-material thickness regression head" is key to enabling efficient beam search and joint prediction.

Datasets

The paper uses synthetically generated data for training and evaluation.

  • Training Data: Up to 30 million training samples were generated by uniformly sampling material sequences and thicknesses, then simulating their spectra using the Transfer Matrix Method (TMM). Layer counts were sampled to oversample longer sequences.
  • Validation/Development Data: 100,000 development samples and 10,000 validation samples were generated.
  • Benchmarks:
    • Generated Targets (in-distribution): 10,000 randomly generated structures with 1-20 layers, matching the training distribution.
  • Practical Targets (out-of-distribution): 84 real-world optical filter spectra that are distributionally distinct from the training data, testing the model's generalization capabilities.

Key Insights and Ideas

  • Physics-Informed Positional Encoding: Using cumulative physical depth instead of sequential indices for positional encoding is a clever way to inject physical intuition into the transformer, aligning its attention mechanism with the underlying physics of thin-film interference.
  • Unified Architecture for Joint Prediction: Combining material selection and thickness regression within a single decoder-only backbone, with specialized output heads, significantly streamlines the design process and improves efficiency.
  • Spectrum Prefix Conditioning Simplifies Architecture: Replacing encoder-decoder cross-attention with a simple spectrum prefix token is an elegant way to maintain conditioning visibility without adding architectural complexity.
  • TMM-Reranking for Practical Fidelity: Using TMM re-simulation to rerank beam search candidates is a powerful strategy to select designs that are not only predicted with high probability but also have accurate spectral fidelity, especially for complex, real-world targets.
  • EMD as a Complementary Metric: Spectral Earth Mover's Distance (EMD) proves to be a valuable metric for evaluating designs, particularly for practical targets, as it captures shape similarity better than pointwise MAE, which can be misleading when band edges or peak positions are crucial.

Key Results

  • State-of-the-Art Accuracy: The PRISM-44M model achieved a state-of-the-art Mean Absolute Error (MAE) of 0.010 on the in-distribution validation benchmark.
  • Parameter Efficiency: PRISM-13M achieved over 50% reduction in MAE compared to other transformer baselines while using only one-fifth of the parameters.
  • Speed Advantage: PRISM operates significantly faster than traditional methods like simulated annealing.
  • Out-of-Distribution Generalization: PRISM demonstrated robust generalization to longer sequences (up to 2.5x training length) without significant performance degradation.
  • Practical Target Performance: PRISM-44M TMM-reranked achieved the lowest spectral Earth Mover's Distance (EMD) on practical targets, indicating better shape fidelity than simulated annealing, despite a slightly higher pointwise MAE.

Limitations and Future Work

  • Limited Conditioning: PRISM is currently conditioned on a full target spectrum. It does not support partial specifications (e.g., only a specific wavelength range) or angle of incidence as input, which are common in practical filter design.
  • Future Directions: The authors suggest exploring richer conditioning interfaces for partial specifications and angle of incidence. They also propose using Reinforcement Learning with TMM-based rewards for post-training to directly optimize spectral fidelity on practical targets.

Summary updated

BibTeX
@inproceedings{wang2026prism,
  author = {Runtian Wang and Renhao Xue and Baige Chen and Hao Wu},
  title = {{PRISM: Position-encoded Regressive Inverse Spectral Model for Multilayer Thin-Film Design}},
  booktitle = {AI4Physics @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=PUEt2m9lzC},
}
Figure