  The study of phase transitions using data-driven approaches is challenging,
especially when little prior knowledge of the system is available. Topological
data analysis is an emerging framework for characterizing the shape of data and
has recently achieved success in detecting structural transitions in material
science, such as the glass--liquid transition. However, data obtained from
physical states may not have explicit shapes as structural materials. We thus
propose a general framework, termed "topological persistence machine," to
construct the shape of data from correlations in states, so that we can
subsequently decipher phase transitions via qualitative changes in the shape.
Our framework enables an effective and unified approach in phase transition
analysis. We demonstrate the efficacy of the approach in detecting the
Berezinskii--Kosterlitz--Thouless phase transition in the classical XY model
and quantum phase transitions in the transverse Ising and Bose--Hubbard models.
Interestingly, while these phase transitions have proven to be notoriously
difficult to analyze using traditional methods, they can be characterized
through our framework without requiring prior knowledge of the phases. Our
approach is thus expected to be widely applicable and will provide practical
insights for exploring the phases of experimental physical systems.
