  The exact microscopic structure of the environments that produces $1/f$ noise
in superconducting qubits remains largely unknown, hindering our ability to
have robust simulations and harness the noise. In this paper we show how it is
possible to infer information about such an environment based on a single
measurement of the qubit coherence, circumventing any need for separate
spectroscopy experiments. Similarly to other spectroscopic techniques, the
qubit is used as a probe which interacts with its environment. The complexity
of the relationship between the observed qubit dynamics and the impurities in
the environment makes this problem ideal for machine learning methods - more
specifically neural networks. With our algorithm we are able to reconstruct the
parameters of the most prominent impurities in the environment, as well as
differentiate between different environment models, paving the way towards a
better understanding of $1/f$ noise in superconducting circuits.
