  Gravitational-wave detectors are exquisitely sensitive instruments and
routinely enable ground-breaking observations of novel astronomical phenomena.
However, they also witness non-stationary, non-Gaussian noise that can be
mistaken for astrophysical sources, lower detection confidence, or simply
complicate the extraction of signal parameters from noisy data. To address
this, we present iDQ, a supervised learning framework to autonomously detect
noise artifacts in gravitational-wave detectors based only on auxiliary degrees
of freedom insensitive to gravitational waves. iDQ has operated in low latency
throughout the advanced detector era at each of the two LIGO interferometers,
providing invaluable data quality information about each detection to date in
real-time. We document the algorithm, describing the statistical framework and
possible applications within gravitational-wave searches. In particular, we
construct a likelihood-ratio test that simultaneously accounts for the presence
of non-Gaussian noise artifacts and utilizes information from both the observed
gravitational-wave strain signal and thousands of auxiliary degrees of freedom.
We also present several examples of iDQ's performance with modern
interferometers, showing iDQ's ability to autonomously reproduce known data
quality monitors and identify noise artifacts not flagged by other analyses.
