Table of Contents
Fetching ...

The Shape of Chocolate: A Topological Perspective on Food Microstructure

Matteo Rucco

Abstract

We present a computational framework for characterizing the molecular self-organization of cocoa butter (Theobroma cacao) during dark chocolate tempering through the lens of Topological Data Analysis (TDA). A physics-inspired particle simulation models N=100 triglyceride molecules across the full temperature range 15--60 degrees C, spanning all six crystalline polymorphs of cocoa butter (Forms I--VI) as well as the melt and superheating regimes. At each temperature tick, we construct a Vietoris-Rips filtration and compute the persistent homology groups H0 (connected components), H1 (independent cycles), and H2 (3D voids). The resulting persistence diagrams are analyzed via persistent entropy E = -sum_i p_i log2(p_i), where p_i = l_i / sum_j l_j and l_i = death_i - birth_i denotes feature lifetime; essential classes are assigned death = m+1 (m = eps_max) following the standard persistent entropy convention (Rucco 2026, arXiv:2602.09058). Our results demonstrate that Form V (the optimal tempering polymorph, 29.5--34 degrees C) is characterized by a distinctive topological signature: a local minimum in the H0 persistent entropy (E0 = 5.74 +/- 0.04 bits), a pronounced depression in the first Betti number beta_1 (1562 +/- 35), and a global minimum in the H2 entropy (E2 = 12.29 +/- 0.25 bits) reflecting coherent inter-bilayer lamellar cavities. Via Theorem 1 and Corollary 1 of Rucco (2026), persistent entropy is proven to separate the ordered and disordered phases by an asymptotically non-vanishing gap whenever a phase transition induces the creation or destruction of topological mass at macroscopic scales -- a condition we verify empirically across all eight cocoa butter regimes. These findings suggest that TDA-based metrics could serve as non-invasive quality indicators for industrial chocolate tempering processes.

The Shape of Chocolate: A Topological Perspective on Food Microstructure

Abstract

We present a computational framework for characterizing the molecular self-organization of cocoa butter (Theobroma cacao) during dark chocolate tempering through the lens of Topological Data Analysis (TDA). A physics-inspired particle simulation models N=100 triglyceride molecules across the full temperature range 15--60 degrees C, spanning all six crystalline polymorphs of cocoa butter (Forms I--VI) as well as the melt and superheating regimes. At each temperature tick, we construct a Vietoris-Rips filtration and compute the persistent homology groups H0 (connected components), H1 (independent cycles), and H2 (3D voids). The resulting persistence diagrams are analyzed via persistent entropy E = -sum_i p_i log2(p_i), where p_i = l_i / sum_j l_j and l_i = death_i - birth_i denotes feature lifetime; essential classes are assigned death = m+1 (m = eps_max) following the standard persistent entropy convention (Rucco 2026, arXiv:2602.09058). Our results demonstrate that Form V (the optimal tempering polymorph, 29.5--34 degrees C) is characterized by a distinctive topological signature: a local minimum in the H0 persistent entropy (E0 = 5.74 +/- 0.04 bits), a pronounced depression in the first Betti number beta_1 (1562 +/- 35), and a global minimum in the H2 entropy (E2 = 12.29 +/- 0.25 bits) reflecting coherent inter-bilayer lamellar cavities. Via Theorem 1 and Corollary 1 of Rucco (2026), persistent entropy is proven to separate the ordered and disordered phases by an asymptotically non-vanishing gap whenever a phase transition induces the creation or destruction of topological mass at macroscopic scales -- a condition we verify empirically across all eight cocoa butter regimes. These findings suggest that TDA-based metrics could serve as non-invasive quality indicators for industrial chocolate tempering processes.

Paper Structure

This paper contains 24 sections, 4 equations, 6 figures, 2 tables.

Figures (6)

  • Figure 1: Persistent entropy $E(H_0)$, $E(H_1)$, and $E(H_2)$ as a function of temperature ($15$--$60\,^\circ\mathrm{C}$). The gold shaded band marks the Form V optimal tempering window ($29.5$--$34\,^\circ\mathrm{C}$). Smoothed with a 3-point uniform filter; $N=75$ molecules, averaged over 3 seeds.
  • Figure 2: Betti numbers $\beta_0$ (connected components), $\beta_1$ (independent 1-cycles), and $\beta_2$ (3D voids) vs. temperature. $\beta_1$ and $\beta_2$ both reach local minima in the Form V window (gold band). $\beta_2$ is computed via the full simplicial complex ($H_2$ persistent homology).
  • Figure 3: (Left) Mean feature lifetime per homological dimension. (Right) Total persistence pair counts per dimension. Form V shows the global minimum in $\langle\ell_0\rangle$ and a characteristic reduction in pair count, consistent with lattice consolidation.
  • Figure 4: Persistence diagram (left) and barcode (right) for Form V ($\beta$-crystal) at $31.5\,^\circ\mathrm{C}$. Green squares ($H_2$) represent enclosed inter-bilayer cavities, a topological feature unique to the 3D lamellar structure.
  • Figure 5: Persistence diagrams for four representative cocoa butter polymorphs. Form V (gold border) shows the most compact, coherent distribution across $H_0$, $H_1$, and $H_2$. Inset metrics show $E_0$, $E_2$, and $\beta_1$ at the median filtration scale $\varepsilon_{\mathrm{mid}}$.
  • ...and 1 more figures