  Optical properties in solids, such as refractive index and absorption, hold
vast applications ranging from solar panels to sensors, photodetectors, and
transparent displays. However, first-principles computation of optical
properties from crystal structures is a complex task due to the high
convergence criteria and computational cost. Recent progress in machine
learning shows promise in predicting material properties, yet predicting
optical properties from crystal structures remains challenging due to the lack
of efficient atomic embeddings. Here, we introduce GNNOpt, an equivariance
graph-neural-network architecture featuring automatic embedding optimization.
This enables high-quality optical predictions with a dataset of only 944
materials. GNNOpt predicts all optical properties based on the
Kramers-Kr{\"o}nig relations, including absorption coefficient, complex
dielectric function, complex refractive index, and reflectance. We apply the
trained model to screen photovoltaic materials based on spectroscopic limited
maximum efficiency and search for quantum materials based on quantum weight.
First-principles calculations validate the efficacy of the GNNOpt model,
demonstrating excellent agreement in predicting the optical spectra of unseen
materials. The discovery of new quantum materials with high predicted quantum
weight, such as SiOs which hosts exotic quasiparticles, demonstrates GNNOpt's
potential in predicting optical properties across a broad range of materials
and applications.
