  We develop a new machine learning algorithm, Via Machinae, to identify cold
stellar streams in data from the Gaia telescope. Via Machinae is based on
ANODE, a general method that uses conditional density estimation and sideband
interpolation to detect local overdensities in the data in a model agnostic
way. By applying ANODE to the positions, proper motions, and photometry of
stars observed by Gaia, Via Machinae obtains a collection of those stars deemed
most likely to belong to a stellar stream. We further apply an automated
line-finding method based on the Hough transform to search for line-like
features in patches of the sky. In this paper, we describe the Via Machinae
algorithm in detail and demonstrate our approach on the prominent stream GD-1.
A companion paper contains our identification of other known stellar streams as
well as new stellar stream candidates from Via Machinae. Though some parts of
the algorithm are tuned to increase sensitivity to cold streams, the Via
Machinae technique itself does not rely on astrophysical assumptions, such as
the potential of the Milky Way or stellar isochrones. This flexibility suggests
that it may have further applications in identifying other anomalous structures
within the Gaia dataset, for example debris flow and globular clusters.
