Modern machine learning has had an outsized impact on many scientific fields, and particle physics is no exception. What is special about particle physics, though, is the vast amount of theoretical and experimental knowledge that we already have about many problems in the field. In this colloquium, I present two cases studies involving quantum chromodynamics (QCD) at the Large Hadron Collider (LHC), highlighting the fascinating interplay between theoretical principles and machine learning strategies. First, by cataloging the space of all possible QCD measurements, we (re)discovered technology relevant for self-driving cars. Second, by quantifying the similarity between two LHC collisions, we unlocked a class of nonparametric machine learning techniques based on optimal transport. In addition to providing new quantitative insights into QCD, these techniques enable new ways to visualize data from the LHC.