  Detection of material inhomogeneities is an important task in magnetic
imaging and plays a significant role in understanding physical processes. For
example, in spintronics, the sample heterogeneity determines the onset of
current-driven magnetization motion. While often a significant effort is made
in enhancing the resolution of an experimental technique to obtain a deeper
insight into the physical properties, here we want to emphasize that an
advantageous data analysis has the potential to provide a lot more insight into
given data set, in particular when being close to the resolution limit where
the noise becomes at least of the same order as the signal. In this work, we
introduce two tools - the average latent dimension and average latent entropy -
which allow for the detection of very subtle material inhomogeneity patterns in
the data. For example, for the Ising model, we show that these tools are able
to resolve exchange differences down to $1\%$. For a micromagnetic model, we
demonstrate that the latent entropy can be used to detect changes in the easy
axis anisotropy from magnetization data. We show that the latent entropy
remains robust when imposing noise on the data, changing less than $0.3\%$
after adding Gaussian noise of the same amplitude as the signal. Furthermore,
we demonstrate that these data-driven tools can be used to visualize
inhomogeneities based on MOKE data of magnetic whirls and thereby can help to
explicitly resolve impurities and pinning centers. To evaluate the performance
of the average latent dimension and entropy, we show that they outperform
common instruments ranging from standard statistics measures to
state-of-the-art data analysis techniques such as Gaussian mixture models not
only in recognition quality but also in the required computational cost.
