  Deep learning-based methods have recently been established as fast and
accurate surrogate simulators for optical multilayer thin film structures.
However, existing methods only work for limited types of structures with
different material arrangements, preventing their applications towards diverse
and universal structures. Here, we propose the Opto-Layer (OL) Transformer to
act as a universal surrogate simulator for enormous types of structures.
Combined with the technique of structure serialization, our model can predict
accurate reflection and transmission spectra for up to $10^{25}$ different
multilayer structures, while still achieving a six-fold degradation in
simulation time compared to physical solvers. Further investigation reveals
that the general learning ability comes from the fact that our model first
learns the physical embeddings and then uses the self-attention mechanism to
capture the hidden relationship of light-matter interaction between each layer.
