**4. Conclusions**

In this paper, a new methodology for the data-driven learning of constitutive models is proposed. We made an emphasis on those cases in which large experimental deviations are present in the data. By first employing Topological Data Analysis techniques, we unveil the *s*hape of the data manifold

so as to allow us to perform interpolation on the right tangent plane to the manifold. Once the neighboring data are found, a GENERIC expression is found for the material under consideration. In other words, the precise form of the strain energy density and entropy potentials are found. This allows us to predict new loading states to a high degree of accuracy without the need to perform complex parameter fitting procedures to arrive to phenomenological models.

In addition, and in sharp contrast to other existing alternatives, our method is able to guarantee exact (to numerical precision) satisfaction of thermodynamic principles—conservation of energy and positive production of entropy—thanks to the GENERIC formalism.

To the best of our knowledge, no work has been performed in this line applied to biomedical living tissues. Despite the limitation of needing an admissible database to perform the learning process of our method, we strongly believe that the proposed GENERIC-TDA technique can be applied to the numerical fitting of highly nonlinear materials with sound accuracy, as shown in this manuscript. As a proof of concept, our results (developed in both synthetic and real experiments) show the high benefits of using data-driven models for materials simulation in fields where complex physical responses are present. We believe that machine learning methods combined with numerical modeling for biological systems (at any scale) is a very exciting young field with countless challenges and potential usefulness to both biomedical and numerical communities.

**Author Contributions:** Conceptualization, F.C. and E.C.; methodology, D.G., and E.C.; software, D.G. and A.G.-G.; validation, E.C. and F.C.; formal analysis, E.C. and F.C.; investigation, A.G.-G., D.G., and E.C.; data curation, A.G.-G.; writing—original draft preparation, E.C.; writing—review and editing, F.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work has been supported by the Spanish Ministry of Economy and Competitiveness through Grant number DPI2017-85139-C2-1-R and by the Regional Government of Aragon and the European Social Fund, research group T24 20R. The support given by ESI Group to F.C. through the ESI Group Chair at ENSAM Paris and tho D.G. and E.C. through the project 2019-0060 "Simulated Reality" is also gratefully acknowledged.

**Acknowledgments:** The authors thank E. Penã for her helpful comments.

**Conflicts of Interest:** The authors declare no conflict of interest.
