We encounter the same people, places, and objects in predictable sequences and configurations. Humans efficiently learn these regularities via statistical learning. Importantly, statistical learning creates knowledge not only of specific regularities but also of regularities that apply more generally across related experiences (i.e., across members of a category). Prior evidence for different levels of learning comes from post-exposure behavioral tests, leaving open the question of whether more abstract regularities are detected online during initial exposure. We address this question by measuring neural entrainment in intracranial recordings. Neurosurgical patients viewed a stream of photographs with regularities at one of two levels: In the exemplar-level structured condition, the same photographs appeared repeatedly in pairs. In the category-level structured condition, the photographs were trial-unique but their categories were paired across repetitions. In a baseline random condition, the same photographs repeated but in a scrambled order. We measured entrainment at the frequency of individual photographs, which was expected in all conditions, but critically also at half that frequency—the rate at which to-be-learned pairs appeared in the two structured (but not random) conditions. Entrainment to both exemplar and category pairs emerged within minutes throughout visual cortex and in frontal and temporal regions. Many electrode contacts were sensitive to only one level of structure, but a significant number encoded both levels. These findings suggest that the brain spontaneously uncovers category-level regularities during statistical learning, providing insight into the brain's unsupervised mechanisms for building flexible and robust knowledge that generalizes across input variation and conceptual hierarchies.