Complementary optical modeling and XPS analysis correlated the identified PSZ with regions of chromium oxide deficiency in the bi-layered passive film structure, consistent with established pitting mechanisms. Future work should enhance detection sensitivity to differentiate chromium deficiency levels and explore additional factors affecting pitting. The capability to discern nanoscopic variations in passive film composition via ML-enhanced optical techniques provides an accessible, non-destructive, in-situ approach to corrosion monitoring, suitable for deployment beyond laboratory settings. To ensure clarity and avoid overcrowding, only 0.001% of all time series is displayed within a limited time range from -0.4 to 0.2 s. All curves were grouped into two clusters using the K-means algorithm (see SI-2 for the elbow plot). The curves for each cluster are displayed in orange and blue, with dotted black lines representing the average behavior of the two clusters as determined by K-means. After clustering, the time series were reconstructed into a single image (c), ensuring the color code remained consistent and orange areas marked as pitting-susceptible zones (PSZ). The orange dots in (c) denote the locations of initially detected pits (at t = 0.4 s for this time series), with some pits labeled and their zoomed-in insets shown around the reconstructed image. The red contour in the zoomed-in insets delineates the region of initially detected pits, identified via a UMAP-based approach; the red cross denotes the calculated centroid of this region. The size of each pixel (black squares forming the inset images) is 0.48 µm. (d) illustrates the number of pits across all datasets at 5-100 mM NaCl, plotted against the fraction of pit area located in PSZ (left), and against the distribution of pit centroids inside and outside the PSZ (right). The read lines show the cumulative percentage from the total number of pits.