  Stellar spectra encode detailed information about the stars. However, most
machine learning approaches in stellar spectroscopy focus on supervised
learning. We introduce Mendis, an unsupervised learning method, which adopts
normalizing flows consisting of Neural Spline Flows and GLOW to describe the
complex distribution of spectral space. A key advantage of Mendis is that we
can describe the conditional distribution of spectra, conditioning on stellar
parameters, to unveil the underlying structures of the spectra further. In
particular, our study demonstrates that Mendis can robustly capture the pixel
correlations in the spectra leading to the possibility of detecting unknown
atomic transitions from stellar spectra. The probabilistic nature of Mendis
also enables a rigorous determination of outliers in extensive spectroscopic
surveys without the need to measure elemental abundances through existing
analysis pipelines beforehand.
