**1. Introduction**

Computational (bio-)mechanics is not absent of the data "fever". Even if the so-called data-driven computational mechanics discipline presents distinctive features over what is commonly known as "big data", the possibility of employing raw experimental data to perform simulations has attracted the attention of many researchers recently [1–9]. In these approaches, basic equations—those with a higher epistemic value, such as equilibrium or compatibility—are kept, while those which are frequently phenomenological in nature—constitutive equations—are substituted by experimental data, and hence, the name of this family of methods. In a related approach, the so-called *e*quation-free approach substitutes the constitutive law of a material not by experimental data, but by a pseudo-experimental result coming from microscale, first-principle computations [10].

This approach allows us to avoid complex, costly-and often unsuccessful-parameter fitting to obtain the precise form of a constitutive equation. On the other hand, widely accepted constitutive equations have been built under rigorous standards that give rise to the automatic satisfaction of first principles. This is not evident for data-driven approaches.

The presence of noise, or large variance among experiments in the data, somehow complicates the task of obtaining results that do not violate the laws of thermodynamics. Previous works in the field address the presence of noise in the results, but do not guarantee the satisfaction of basic thermodynamic principles [11,12]. This effect is particularly important in the field of bioengineering, where soft living tissues present a very important dispersion of the obtained parameter values from sample to sample, see for instance [13,14] and references therein.

Another important issue is that of the highly nonlinear anisotropic behavior of soft living tissues, which are able to show besides, inelastic and viscoelastic responses. Many works have been published in the last decades. In this regard, these behaviors have been traditionally modeled and characterized as (possibly visco-)hyperelastic anisotropic materials by means of strain energy density functions, see for example, in [15–20] and references herein. Inelasticity in the data-driven setting has been analyzed in a number of previous works [21–23]. Even the more daring approaches employ deep learning to relate medical images to mechanical properties of the tissue [24]. In none of the mentioned works is a study made by which the thermodynamic consistency of the obtained results is guaranteed. If we combine this possibility with the presence of noise in the data, the chance of violating first principles comes into play.

Different approaches exist to guarantee a rigorous thermodynamic compliance. For instance, Raissi et al. developed the so-called *physics-informed deep learning* method for the solution of partial differential equations [25]. A similar approach has also been developed to model turbulence [26] or, in general, the generalized Langevin equation [27]. The authors have recently developed an alternative approach based on the so-called General Equation for the Nonequilibrium Reversible-Irreversible Coupling (GENERIC) [28–30]. The GENERIC equation, which will be described next, constitutes a generalization of the Hamiltonian description of physical systems under nonequilibrium settings. The employ of the GENERIC formalism thus guarantees the correct fulfillment of the first and second principles of thermodynamics, and gives rise to a machine learning method valid for the description of the system at any level, from the molecular dynamics governed by Newtonian laws to the invariant-based description at the thermodynamics level [31,32].

The proposed method can be seen as a particular instance of the continuous dynamical system approach to machine learning, first proposed by W. E and coworkers [33,34]. In the quest for a theoretical framework for deep learning, a parallelism has been established between deep neural networks (DNNs) and continuous dynamical systems. DNNs are thus viewed under this prism as a discretization of a continuous dynamical system that maps the set of observations to a nonlinear function that fits the data [33]. This alternative view opens the door to the enforcement of desired properties to the learning processes; for instance, to ask the resulting map to posses a Hamiltonian structure, among others. In this work, we force the resulting map, which is found by regression in a piecewise polynomial manner, to obey a GENERIC description. This will ensure, as mentioned earlier, the fulfillment of the first and second principles of thermodynamics. To show its strong potentiality in the field of mechanical modeling of biological tissues, the method thus developed will be applied as a proof of concept to the characterization of the passive mechanical behavior of porcine carotid tissue. This behavior turns out to be-under the experimental setting considered here-elastic, highly nonlinear, anisotropic at finite strains, and often modeled under the framework of hyperelasticity.

The outline of the paper is as follows: Section 2 details the proposed data-driven model and the developed tests for validation. In Section 2.1, we describe the proposed machine learning technique to fit the mechanical responses of biological materials. To fit the well-known hyperelastic response in soft living tissues, the thermodynamically consistent GENERIC approach (describing the physics of the problem) and the subsequent machine learning procedure (*c*onstitutive manifold) is detailed here. Next, since numerical fitting of such tissues is strongly subjected to dispersion and averaging (mainly provoked by experimental procedures, environmental issues during the manufacturing, and testing process), a treatment of the noise and dispersion by means of Topological Data Analysis (TDA) is proposed in Section 2.2. Our presented approach is tested upon both a pseudo-experimental data set

and experimental tests, described in Sections 2.3 and 2.4, respectively. The numerical fitting results of both experiments are shown in Section 3. The paper ends in Section 4 with a discussion of the obtained results on the use of the proposed GENERIC-TDA methodology on the mechanical modeling of biological tissues.

#### **2. Material and Methods**
