  The transition between ergodic and many-body localized phases is expected to
occur via an avalanche mechanism, in which \emph{ergodic bubbles} that arise
due to local fluctuations in system properties thermalize their surroundings
leading to delocalization of the system, unless the disorder is sufficiently
strong to stop this process. We propose an algorithm based on neural networks
that allows to detect the ergodic bubbles using experimentally measurable
two-site correlation functions. Investigating time evolution of the system, we
observe a logarithmic in time growth of the ergodic bubbles in the MBL regime.
The distribution of the size of ergodic bubbles converges during time evolution
to an exponentially decaying distribution in the MBL regime, and a power-law
distribution with a thermal peak in the critical regime, supporting thus the
scenario of delocalization through the avalanche mechanism. Our algorithm
permits to pin-point quantitative differences in time evolution of systems with
random and quasiperiodic potentials, as well as to identify rare (Griffiths)
events. Our results open new pathways in studies of the mechanisms of
thermalization of disordered many-body systems and beyond.
