Although statistical learning has been established as an important constituent of human implicit sensory learning capacities, the actual process of statistical learning rather than its outcome is largely unexplored due to the lack of appropriate measures. One candidate measure is changes in pupil diameter, which is known to be influenced by past experiences (e.g., violation of expectation, belief updating, pupil old/new effect), but has not been investigated in the more complex context of implicit statistical learning. We explored whether pupil dynamics of observers (N = 88) can be used as a continuous measure of statistical learning in a paradigm, where we manipulated the explicit knowledge of participants about the to-be-learned regularities of multi-element visual scenes. We introduced trials that violated the scene structure into the continuous stream of structured scenes presented during the learning phase. After an initial period of learning, pupil dilation was larger for these violation trials than for regular learning trials (p < 0.01). Importantly, during both explicit and implicit learning, the magnitude of pupil dilation for violation trials positively correlated with the amount of knowledge participants demonstrated at the subsequent test phase (r (explicit) = 0.44, p < 0.05; r (implicit) = 0.48, p < 0.01). We also found that observers with explicit prior knowledge about the underlying structure of the scenes demonstrated the emergence of these effects earlier during the learning phase compared to implicit learners without such knowledge. Our results demonstrate that pupil dilation can be used to track the accumulation of visual information, even in complex learning scenarios, irrespective of the explicitness of task instructions. Combined with research on eye-movements, our findings can be used for developing novel, active teaching-based experimental paradigms, in which the learning state is continuously assessed, and subsequent stimuli are selected accordingly for improved learning performance.