  The computational cost of fast non-LTE synthesis is one of the challenges
that limits the development of 2D and 3D inversion codes. It also makes the
interpretation of observations of lines formed in the chromosphere and
transition region a slow and computationally costly process, which limits the
inference of the physical properties on rather small fields of view. Having
access to a fast way of computing the deviation from the LTE regime through the
departure coefficients could largely alleviate this problem. We propose to
build and train a graph network that quickly predicts the atomic level
populations without solving the non-LTE problem. We find an optimal
architecture for the graph network for predicting the departure coefficients of
the levels of an atom from the physical conditions of a model atmosphere. A
suitable dataset with a representative sample of potential model atmospheres is
used for training. This dataset has been computed using existing non-LTE
synthesis codes. The graph network has been integrated into existing synthesis
and inversion codes for the particular case of \caii. We demonstrate orders of
magnitude gain in computing speed. We analyze the generalization capabilities
of the graph network and demonstrate that it produces good predicted departure
coefficients for unseen models. We implement this approach in \hazel\ and show
how the inversions nicely compare with those obtained with standard non-LTE
inversion codes. Our approximate method opens up the possibility of extracting
physical information from the chromosphere on large fields-of-view with time
evolution.
