Magnitude is a numerical invariant of enriched categories, including in particular metric spacesas –enriched categories. We show that in many cases magnitude can be categorified to a homology theory for enriched categories, which we call magnitude homology (in fact, it is a special sort of Hochschild homology), whose graded Euler characteristic is the magnitude. Magnitude homology of metric spaces generalizes the Hepworth–Willerton magnitude homology of graphs, and detects geometric information such as convexity.
Tom Leinster. Michael Shulman. "Magnitude homology of enriched categories and metric spaces." Algebr. Geom. Topol. 21 (5) 2175 - 2221, 2021. https://doi.org/10.2140/agt.2021.21.2175