{'fraction_non_alphanumeric': 0.046966856948112805, 'fraction_numerical': 0.01797733662775837, 'mean_word_length': 4.266292765002804, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Transfer Learning of Memory Kernels in Coarse-grained Modeling

The present work concerns the transferability of coarse-grained (CG) modeling in reproducing the dynamic properties of the reference atomistic systems across a range of parameters. In particular, we focus on implicit-solvent CG modeling of polymer solutions. The CG model is based on the generalized Langevin equation, where the memory kernel plays the critical role in determining the dynamics in all time scales. Thus, we propose methods for transfer learning of memory kernels. The key ingredient of our methods is Gaussian process regression. By integration with the model order reduction via proper orthogonal decomposition and the active learning technique, the transfer learning can be practically efficient and requires minimum training data. Through two example polymer solution systems, we demonstrate the accuracy and efficiency of the proposed transfer learning methods in the construction of transferable memory kernels. The transferability allows for out-of-sample predictions, even in the extrapolated domain of parameters. Built on the transferable memory kernels, the CG models can reproduce the dynamic properties of polymers in all time scales at different thermodynamic conditions (such as temperature and solvent viscosity) and for different systems with varying concentrations and lengths of polymers.


Introduction
To study polymers or biomolecules in solution, coarse-grained (CG) modeling and simulations can be practically more efficient 1-8 , compared with full atomistic simulations via, e.g., allatom molecular dynamics (MD). Instead of tracking individual atoms of molecules and solvent, the CG modeling averages out or eliminates certain degrees of freedom (DOFs) to reduce the system's dimensionality and captures the molecules' collective dynamics and properties. The removal of highly-fluctuating atomic DOFs and the larger characteristic length scale of CG coordinates permit to employ larger time steps in CG simulations. In implicitsolvent CG modeling [9][10][11][12][13][14] , not only the DOFs representing polymer molecules are reduced, but also the solvent DOFs are eliminated. Provided significantly reduced DOFs and larger time steps, CG modeling is computationally more efficient than full atomistic simulations, and hence, can grant larger accessible length scales and render tractable simulating long-time effects in practical applications 15 However, to reap the benefit of CG modeling, two challenges must be addressed. The first one is to conserve both the structural and dynamic properties of polymers under coarse-graining. To conserve the structural properties (e.g., radial and angular distribution functions), the CG potential (or potential of mean force) must be correctly constructed [19][20][21][22][23][24][25][26] . To conserve the dynamic properties (e.g., diffusivity and velocity autocorrelation function (VACF)), the kinetic effect of unresolved DOFs (including solvent) on the system must be properly accounted in CG modeling. For that, a non-Markovian dynamics (e.g., in the form of generalized Langevin equation (GLE)) must be introduced in the CG model because the elimination of DOFs results in a non-Markovian memory in the dynamics of CG variables, as discussed in literature [27][28][29][30][31][32] and also in our prior work 13,14 . The second challenge lies in the transferability of CG modeling, for instance, how the CG model constructed can be transferable across different thermodynamic conditions. The efforts to attain transferable CG potentials that preserve structural properties under coarsegraining have made substantial progress [33][34][35][36][37] . In contrast, the transferability of a CG model in conserving the dynamic properties has not been extensively discussed. Lyubimov et al. derived from the GLE an analytical factor for dynamical rescaling of the friction coefficient in CG modeling to correctly capture the long-time diffusion of polymers. The derived rescaling factor is transferable for different polymer systems and thermodynamic conditions, with the temperature and radius-of-gyration as the in-put parameters 38,39 . However, the approach is only applicable to polymer melts and reproducing the long-time diffusion coefficient of polymers 38,39 . For polymers in solution and to reproduce the dynamic properties beyond the long-time normal diffusion, e.g., super-and/or sub-diffusion, and the VACF as a function of time, it calls for new methodology to render transferability in CG modeling. Noting that the memory kernel plays a critical role for a CG model to reproduce the entire dynamics 27,28,40,41 , especially in implicit-solvent CG modeling with many solvent DOFs unresolved 13,14,29,30 , the present work hence focuses on the transferability of the memory kernel in CG modeling.
In particular, we propose two transfer learning methods to enable the memory kernel transferable across different thermodynamic conditions (such as temperature and solvent viscosity) and across different systems with varying solute concentrations and lengths of polymer chains. The proposed transfer learning methods draw on Gaussian process regression (GPR). By integration with the model order reduction via proper orthogonal decomposition (POD) and the active learning technique, the transfer learning can be practically efficient and requires minimum training data. GPR is chosen because of its flexibility in both interpolation and extrapolation and its capability for prediction with quantified uncertainty. The model order reduction enables to represent the memory kernel (as a function of time and parameters) in a reduced temporal and parameter space, which in turn greatly reduces the training and prediction costs of GPR. The active learning technique allows for efficient use of data with maximum information gain via adaptive sampling guided by the uncertainty quantified in GPR. Through two example polymer solution systems, we demonstrate the accuracy and efficiency of the proposed transfer learning methods in the construction of transferable memory kernels, from which the CG models can reproduce the dynamic properties of polymers across different thermodynamic conditions and systems.
The rest of the paper is organized as follows. In §2.1, we describe the framework of CG modeling, which is built upon the GLE and extended dynamics. §2.2 explains in detail the proposed transfer learning methods, whose key ingredients include GPR, POD, and active learning. We present the numerical results in §3, where two benchmark examples are used to assess the accuracy and computational cost of transfer learning. Finally, we conclude and summarize our main findings and contributions in §4.

CG modeling
Without loss of generality, we consider an atomistic system consisting of n atoms in polymer molecules, with coordinates r = {r i |i = 1, 2, . . . , n} and momenta p = {p i |i = 1, 2, . . . , n}. In CG modeling, n atoms are coarse-grained as N clusters (referred to as CG particles), and each cluster contains n c atoms. To be consistent in notation, we use the lowercase m i , r i , and p i to represent the mass, position, and momentum of the i-th atom in the atomistic system; and the uppercase M I , R I , and P I denote the mass, position, and momentum of the I-th CG particle in the CG system.
The variables of the atomistic and CG systems are related via: where the subscript Ii denotes the i-th atom in the I-th CG particle; M I , R I , and P I are defined as the total mass, center-of-mass (COM) position, and total momentum of all atoms in the I-th CG particle, respectively.
The GLE given by the Mori-Zwanzig projection formalism 42-44 provides a theoretically sound framework for CG modeling, where the non-Markovian dynamics of the CG system is governed by:Ṗ In the right-hand side of Eq. (2), the first term represents the mean force on the I-th CG particle. The third termF I denotes the random force. The second term (referred to as the dissipative force) has a memory kernel K(t − t ), which is related to the random force by ] to satisfy the second fluctuation-dissipation theorem 45 . Here, k B denotes the Boltzmann constant; T is the thermodynamic temperature. The kinetic effect of the lost atomic DOFs under coarse-graining is properly accounted in the CG dynamics by the memory kernel and the random force with colored noise in Eq. (2) 43,44 .
The mean force in Eq. (2) is represents a normalized partition function of all the atomistic configurations at phase point R. Since the present work concerns the dynamic properties and does not consider the structural properties or free energy, F I is regarded as the average for the I-th CG particle over all phase points. Thus, without external force fields, the mean force exerted on a CG particle is approximated to be zero; i.e., F I = 0. Eq. (2) can hence be simplified to: with the velocity V I (t ) = P I (t ) M I . To conserve the dynamics and reproduce the dynamic properties of the underlying atomistic system, the memory kernel in Eq. (3) must be directly linked to the atomistic system and can be computed from the atomistic data.

Memory kernel
To determine the memory kernel K(t) in Eq. (3) from the atomistic data, we rely on the property that the velocity V and random forceF come from two orthogonal subspaces and hence are not correlated to each other, i.e., V TF = 0. Thus, multiplying both sides of Eq. (3) by V(0) T leads to: where C(t) = V(0) T V(t ) is the VACF; W (t) = V(0) TṖ (t) defines the force-velocity correlation function (FVCF). While the data of VACF can be directly obtained in the atomistic simulations, the FVCF can be evaluated from W (t) = entiation. The memory kernel K(t) can then be solved via deconvolution of Eq. (4) given the data of VACF and FVCF. Note that the integral operator in Eq. (4) is the Volterra operator 46 . Although the deconvolution can have a unique continuous solution, the solution does not depend continuously on the data; i.e., the solution is unstable against data noise due to the nondegeneracy of C(t).
Thus, solving the deconvolution to determine the memory kernel is an ill-posed problem, and proper regularization must be enforced. What we have are the data of VACF and FVCF at discrete times (i.e., t i = (i − 1)∆t with i = 1, 2, . . . , N t ). Hence, Eq. (4) can be discretized, and the deconvolution is solved in the discrete setting. Note that discretization can regularize an ill-posed problem, known as the "self-regularization" property of discretization 47 . As a result, the deconvolution problem becomes well-posed when solved in the discrete setting. However, the linear system resulting from discretization could be ill-conditioned 48 and require further regularization. Applying the midpoint quadrature rule 46 , Eq. (4) can be discretized into the following linear system: . If the linear system in Eq. (5) is ill-conditioned, which means its solution is unstable and sensitive to data noise, the Tikhonov regularization 49,50 is introduced and leads to the following regularized linear system: where C T is the transpose of C, and β is the regularization parameter. The value of β can be determined using the quasi-optimality criterion 51,52 . In addition to the deconvolution, the numerical differentiation used to obtain the data of FVCF is also an ill-posed problem and requires regularization.
For the numerical examples considered in this work, the FVCF (W (t)) was obtained via numerical differentiation regularized by the Tikhonov regularization following the quasi optimality principle; the linear system in Eq. (5) was well-conditioned and hence directly solved without regularization.

Extended dynamics
Given the memory kernel K(t) determined, the GLE in Eq. (3) can be solved to predict the dynamics of the CG system. However, directly solving this equation requires to evaluate the time convolution of the memory kernel and velocity and to generate color noise for the random force, which needs to store the historical information and can be prohibitively expensive. Note that the solvent-mediated kinetics could result in a long-tailed memory kernel, making the computation even more expensive. To address the challenge of directly solving the GLE, K(t) is first ap-proximated by an asymptotic expansion as: where the parameters {a l , b l , c l , q l } l=1,...,N can be determined via fitting 13,27 . Truncating the expansion with more terms (larger N ) leads to more accurate approximation of K(t). Approximating the memory kernel by a finite set of exponentially damped oscillators as in Eq. (7) would allow to replace the GLE with a Markovian dynamics extended in higher dimensions. By doing so, the expensive cost of solving the GLE can be significantly reduced, as has been evidenced in literature 13,27,53 . To this end, Eq. (7) is rewritten in a matrix form as: where A ps = −A T sp . If we define the parameter matrix A = [0, A ps ; A sp , A ss ], it can be assembled from the parameters in Eq. (7) by: In Eq. (9), the top right block contributes to A ps ; the bottom left contributes to A sp ; and the block on the bottom right constitutes A ss , which is a block diagonal matrix consisting of 2 × 2 blocks.
Given Eq. (8) and by introducing auxiliary variables S, the extended Markovian dynamics is given by: Here, ξ is a vector of uncorrelated Gaussian random variables with ξ(t) = 0 and ξ I,µ (t)ξ J,ν (0) = δ IJ δ µν δ (t), where ξ ν and ξ µ denote the different elements of ξ. To satisfy the second fluctuation-dissipation theorem 45 , B s B T s = k B T (A ss +A T ss ). We can write the parameter matrix B = diag(0, B s ). To ensure A and B are both real number matrices, the parameters in Eq. (7) need to satisfy: a l ≥ 0, b l ≥ 0, and |c l | ≤ a l b l 2q l . The extended dynamics in Eq. (10) is equivalent to the GLE in Eq. (3) 53 with the random force: The extended dynamics in Eq. (10) circumvents the expensive time-convolution, samples only white noise, and hence can be solved more efficiently than the GLE. In the present work, the implicit velocity-Verlet temporal integrator 54 was used to numerically solve Eq. (10) in the CG simulations.

Transfer learning of memory kernel
In this section, we explain the methodology proposed for transfer learning of memory kernel, which enables the CG modeling trans-ferable across a range of parameters to reproduce the dynamic properties of the underlying atomistic systems. The proposed methodology draws on the GPR and can be significantly accelerated by the model order reduction and active learning techniques.

Transfer learning based on GPR
The memory kernel is denoted as K(t; µ), where the vector µ represents the parameters of interest such as temperature, concentration, and solvent viscosity; and (t, µ) ∈ T ×P with T = [0,t f ] and P ∈ R d representing the time domain and parameter space, respectively, where d is the dimension of the parameter space. Our goal is to predict the memory kernel K(t; µ * ) at any given parameter instance µ * ∈ P by using the data of K(t; µ) at N p training parameter instances. To achieve this goal, we define x = [t, µ] ∈ R d+1 and y = K(x) ∈ R as the input and output of GPR, respectively. Recalling that the data of memory kernel are obtained at N t discrete times ( §2.1.1), we totally have N train = N t × N p training data for GPR. The dependence of the outputs (memory kernels) is modeled as a Gaussian process: Y(X) ∼ G P(u(X), Σ(X, X)). Here, u(X) ∈ R N train is the mean function, and Σ(X, X) ∈ R N train ×N train is the covariance matrix. In this work, the covariance function is assumed a squared exponential form, i.e., where x i,k and x j,k refer to the k-th element of x i and x j , respectively; θ = (θ f , θ l 1 , θ l 2 , . . . , θ l d+1 ) denotes the hyper-parameters. Using the GPR model inferred from the training data, we can predict K(t; µ * ) at any given µ * . For that, the inputs are ; the outputs are Y * = [K(t 1 ; µ * ), K(t 2 ; µ * ), . . . , K(t N t ; µ * )] T and satisfy: wherê and σ 2 is the variance of identically independent Gaussian noise (with zero mean) assumed in the GPR model. In Eq. (14),û is the mean value of the prediction at µ * ; the diagonal elements of Σ are the analytical uncertainty bounds, denoted asσ . To determine σ 2 and the hyper-parameters θ, we minimize the negative log marginal likelihood 55 : using the Quasi-Newton optimizer L-BFGS 56 , where C = Σ(X, X) + σ 2 I. Once σ 2 and the hyper-parameters are determined, the GPR model is complete and can be used to predict the memory kernel at any parameter instance of interest along with the uncertainty quantified for the prediction.

Transfer learning accelerated by model order reduction
The training cost of GPR exhibits a cubic scaling with respect to the number of training data, i.e. O(N 3 train ). In practice, N train = N p × N t can be a large number due to the large N t . As we have discussed above, the dynamics of a polymer in solution can display a long-tailed memory kernel. To fully capture the memory kernel's variations in all time scales, the data must be collected at many discrete times, resulting in large N t . In the numerical examples considered in this work, N t is larger than N p (number of training parameter instances) by 2 or 3 orders. Hence, if the memory kernel is directly modeled by GPR as discussed in §2.2.1, the training cost can be expensive due to a large N train . Thus, we further propose a strategy to greatly accelerate the transfer learning by combining the GPR with model order reduction. In particular, the memory kernel is first decomposed using POD into temporal and parameter modes, from which only the dominant modes are retained. GPR is then used to model the dominant parameter modes only.
Same as in §2.2.1, we need snapshot data of K(t; µ i ) at µ i with i = 1, 2, . . . , N p . A reduced order model (ROM) is established for the memory kernel by decomposing the snapshot data of K(t; µ i ) as: denotes the mean of all snapshots; the fluctuating partK is decomposed into the temporal bases φ k (t) and the parameter modes α k (µ). Note that in the classical model order reduction for dynamical systems, the POD basis functions are spatial bases 57 . Here, we adapt the technique to our needs and replace the spatial bases with temporal bases. According to POD, the basis functions can be obtained by eigendecomposition of the correlation matrix G ∈ R N p ×N p of the fluctuating parts: where i and j refer to the i-th and j-th snapshots, respectively. Then, the temporal bases φ k (t) (i.e., POD basis functions) are given as: where {λ 1 , λ 2 , ..., λ M } are the eigenvalues of G in descending order; w k i is the i-th component of w k , the eigenvector corresponding to the eigenvalue λ k . The idea of POD is that the energy contributed by each basis can be reflected by its corresponding eigenvalue. Thus, if the first R N p eigenvalues are significantly larger than the remaining, we only need to retain the first R modes since they dominate the energy, i.e., λ k , which can be reduced by increasing R, i.e., by keeping more POD modes. Based on it, we define the relative error of POD as: For a target tolerance ζ POD , by requiring ε POD r ≤ ζ POD , we can determine how many dominant modes to retain in the ROM, i.e., the value of R.
Given Eq. (19), we can establish the ROM for the memory kernel as: by which the memory kernel can be effectively predicted at a given parameter instance µ * by the reduced temporal bases φ k (t) and parameter modes α k (µ * ). Thus, we only need to train and predict α k (µ * ) instead of the entire memory kernel function K(t; µ * ), resulting in greatly reduced training and prediction costs. Following the idea of data-driven nonintrusive reduced order modeling 57 , we still use GPR to model each parameter mode where the input and output of GPR become x = µ ∈ R d and y = α k (µ), respectively. Now the number of training data required in GPR is N train = N p , which is much smaller than N train = N p × N t in §2.2.1. Once the GPR model of each parameter mode is constructed, we can predict α k (µ * ) and in turn the memory kernel by Eq. (21) at any given parameter instance µ * . In addition, the uncertainty for the predicted α k (µ * ) can be quantified by the standard deviation σ k (µ * ) in the GPR model.

Active learning with minimum training data
To ensure the accuracy of the inferred GPR models, sufficient training data are required. However, attaining the data of memory kernels needs nontrivial efforts. Thus, minimizing the number of data required for training the GPR models becomes necessary. To this end, we propose an active learning strategy to adaptively sample the training data and to ensure maximum information gain from the data sampled. Its key idea is to take the advantage of the fact that the GPR can predict not only the meanû but also the standard deviationσ to quantify the uncertainty. The knowledge of uncertainty can guide the sampling of the next data. In particular, the next parameter instance µ next to be sampled is where the uncertainty level reaches maximum over the sampling space. In this work, active learning is only integrated with the transfer learning accelerated by model order reduction ( §2.2.2), but not with the transfer learning solely based on GPR ( §2.2.1). This is because in §2.2.1 the computational cost for updating the GPR model after each new sampling is significant, which can overshadow the benefit of active learning. The proposed procedure is described as below. Let P tr ∈ R d denote the training sampling space and note P tr ⊆ P, where P, as mentioned before, represents the entire parameter space considered including the region beyond the range of training sampling space. The active learning starts with a small set of sampling points, denoted as P active tr , which can be chosen randomly or uniformly over the training sampling space. The data of memory kernels K(t; µ) for all µ ∈ P active tr are generated following §2.1.1. After that, the following steps are taken successively: 1) build the ROM for the memory kernel as in Eq. (21) and construct a GPR model for each α k (µ), k = 1, 2, . . . , R; 2) quantify the uncertaintyσ (µ) of the GPR models for each µ ∈ P tr as:σ withσ k (µ) the standard deviation of the GPR model for a k (µ) and û k ∞ the L ∞ norm ofû k , a vector consisting ofû k for each µ ∈ P tr ; 3) determine the next sampling parameter instance: µ next = arg max µ∈P trσ (µ); and 4) generate the data of the memory kernel K(t; µ next ) at µ next and augment the training data set with the new data. These four steps are repeated until the maximum uncertaintyσ (µ next ) is less than the preset tolerance ζ AL . By such, the active learning is able to start with a small set of training data and then to adaptively add more data as necessary at locations that can maximize information gain. The entire procedure is also outlined in Algorithm 1.

Algorithm 1 Active learning
Generate data of K(t; µ) for all µ ∈ P active tr Set ζ AL , ζ POD , andσ (µ next ) = ∞ whileσ (µ next ) > ζ AL do Build the ROM as in Eq. (21) via POD with the tolerance ζ POD Construct a GPR model for each α k (µ), k = 1, . . . , R Quantify the uncertaintyσ (µ) of the GPR models for each µ ∈ P tr Determine µ next = arg max µ∈P trσ (µ) Generate the data of K(t; µ next ) Augment the training parameter instances with P active tr = P active tr ∪ {µ next } end while Output the ROM (as in Eq. (21)) with the temporal bases φ k (t) and the GPR model for each α k (µ), k = 1, . . . , R

Results
In this section, we assessed the accuracy and efficiency of our proposed transfer learning methods in two example systems: star polymer and peptoid polymer. The dynamics of star polymer or peptoid polymer in solution can be affected by the parameters such as temperature, concentration, and solvent property. We aimed to establish transferable memory kernels so that the CG models can faithfully reproduce the dynamic properties of the reference atomistic systems across different values of the parameters. The dynamic properties include the VACF, diffusion coefficient, and mean square displacement (MSD) as functions of time. For convenience, we hereinafter denote the transfer learning method solely based on GPR ( §2.2.1) as GPR transfer learning and the transfer learning method via both ROM and GPR ( §2.2.2) as ROM-GPR transfer learning.
In CG modeling, each star polymer or peptoid polymer was coarse-grained as a single CG particle; the solvent (or water) DOFs were all eliminated. The memory kernels computed from atomistic data were obtained following §2.1.1. To construct a CG model, the memory kernel predicted by transfer learning was approximated by Eq. (7). The dynamics of the CG system was simulated by solving Eq. (10) numerically using the implicit velocity-Verlet temporal integrator, for which in-house computer codes were developed under the framework of LAMMPS 58 .

Star-polymer solution
We first considered solutions of stat polymers. In the atomistic representation, each star polymer consists of a core Lennard-Jones (LJ) bead and 10 identical arms with 3 LJ beads per arm, as illustrated in Fig. 1. The core LJ bead and the LJ beads in each arm are identical and connected by the finitely extensible non-linear elastic (FENE) bonds. The solvent is also modeled by LJ beads. The dynamics of the atomistic system is governed by the Hamiltonian: where n is the total number of LJ beads in the atomistic system; p i and m i are the momentum and mass of the i-th LJ bead, respectively; r i j = |r i j | = |r i − r j | is the distance between two LJ beads; and E denotes the total potential energy contributed by the interatomic and bonded potentials. The interatomic LJ potential between the i-th and j-th LJ beads adopts the purely repulsive Weeks-Chandler-Andersen (WCA) potential and is given by: where r cut = 2 1/6 σ i j is the cutoff distance. We denote the WCA potential's parameters for the star polymers as ε star and σ star and for the solvent as ε sol and σ sol . In all MD simulations, while the values of ε star , σ star , and ε sol were fixed as ε star = 1, σ star = 1, and ε sol = 1, the value of σ sol varied for different solution systems between the range σ sol ∈ [1.0, 2.2]. For the interaction between a star-polymer LJ bead and a solvent LJ bead, the WCA potential's parameters were determined by the geometric mix rule. The FENE potential for the bonded interaction between connected LJ beads in each star polymer is: where k b = 30 is the spring constant, and r 0 = 1.5 is the maximum length of the FENE spring.
Here, the reduced LJ units were employed; the mass of all LJ beads was chosen to be unity. Each star-polymer solution consists of 620,000 LJ beads. The MD simulations were performed using LAMMPS 58 . In all simulations, a periodic cubic box of length 115.7295 was used, which is large enough to neglect the effect of periodic box on the VACF. The Nose-Hoover thermostat under the canonical ensemble (NVT) was employed with the time step ∆t = 0.001. In each MD simulation, the data after reaching thermal equilibrium were collected for computing the ensemble-averaged quantities of interest.
The concentration of star polymers in each solution was different and varied with γ ∈ [0.2, 0.8], where γ is defined as the number of star-polymer LJ beads divided by the total number of all LJ beads. In addition, the temperature varied with T ∈ [0.5, 2.0] for each system. Thus, there are three parameters that differentiate the star-polymer solution systems considered herein, i.e., the concentration of star polymers γ, the temperature T , and the solvent viscosity characterized by σ sol . We applied the proposed transfer learning methods to enable the memory kernel transferable across these parameters. The memory kernel was determined up to t f = 20 until the VACF (C(t f )) decayed to |C(t f )|/|C(0)| ≤ 10 −2 , which is long enough to capture the dynamics in all time scales.
To compare the two methods (GPR transfer learning and ROM-GPR transfer learning) and also to demonstrate how the proposed active learning technique can be implemented, we first limited the transfer learning to one parameter. Thereafter, we tackled the more challenging case over all three parameters using the ROM-GPR transfer learning method along with active learning.

Transferable in one parameter
The temperature and solvent viscosity were fixed at T = 1.0 and σ sol = 1.0, respectively. The concentration of star polymers γ was the only changing parameter, i.e., µ = γ ∈ [0.2, 0.8]. Hence, the parameter space is one dimensional: P = [0.2, 0.8]. Here, the parameter instances used for training were from P tr = [0.2, 0.6]. The proposed active learning technique allowed to adaptively sample the training data and to minimize the data needed for training the GPR models given the target tolerance of accuracy.
The tolerances for POD and active learning were set as ζ POD = 0.1 and ζ AL = 0.005, respectively. The active learning process was initiated with two initial parameter instances randomly sampled as P active tr = {0.2496, 0.4528}. At these two parameter instances, we computed the memory kernels K(t; γ = 0.2496) and K(t; γ = 0.4528) from the MD simulation data as described in §2.1.1. Through POD we constructed the ROM as in Eq. (21), where R = 1 and only the first POD basis needs to be retained for the target ζ POD = 0.1. The GPR model for the parameter mode α 1 (µ) inferred from the two training data, along with its uncertainty as defined in Eq. (22), are shown in Fig. 2. With only two training data, the inferred GPR model exhibits large uncertainty, which indicates more training data are needed. Since the uncertainty quantified byσ (µ) reaches its maximum at µ = 0.6, it was chosen as the next sampling point µ next = 0.6. The memory kernel K(t; γ = 0.6) was computed from the MD simulation data and added to the training data. Now the training sampling set became P active tr = {0.2486, 0.4528, 0.6}. With the three training data, the GPR model inferred for α 1 (µ) along with its uncertainty are depicted in Fig. 3. Compared with Fig. 2, the uncertainty of the GPR model was greatly reduced by adding one more training data. However, the maximum uncertainty is still larger than the preset tolerance ζ AL = 0.005, and hence, the next sampling point was chosen at where the maximum uncertainty occurs, i.e., µ next = 0.2. With that, the training sampling set became P active tr = {0.2486, 0.4528, 0.6, 0.2}. The GPR model for α 1 (µ) and its uncertainty inferred from the four training data are illustrated in Fig. 4. By including one more training data, the GPR model's uncertainty was further reduced, and the maximum uncertainty was less than the preset tolerance ζ AL = 0.005. Thus, the sampling process via active learning could be terminated. The GPR model for α 1 (µ) in Fig. 4 was then substituted into the ROM in Eq. (21) with R = 1 to predict the memory kernel at any given parameter To examine the accuracy of such predicted memory kernel, we selected a set of testing parameter instances: P test = {0.2 + 0.04i} i=0,1,..., 15 . Note that while some of these testing parameter instances are within the range of training sampling space P tr , others are beyond the range; i.e., the predictions include not only interpolation but also extrapolation. We used the relative error to evaluate the accuracy of prediction, which is defined as: with K R-G denoting the memory kernel predicted  Fig. 4 (a) GPR model for the POD parameter mode α 1 (µ) inferred from 4 training data. (b) Uncertainty quantified byσ (µ) of the inferred GPR model. Fig. 5 The relative error ε r (µ * ) of the memory kernels K R-G (t; µ * ) predicted by ROM-GPR transfer learning at different testing parameter instances µ * ∈ P test . by ROM-GPR transfer learning, K the memory kernel determined from MD simulation data, and · 2 denoting L 2 norm. The relative errors of the memory kernels predicted at all 16 testing parameter instances are depicted in Fig. 5. It can be seen that all predictions are accurate with the largest relative error of 2.5%; extrapolation outside the training sampling space P tr is less accurate than interpolation inside P tr ; and the error increases as the extrapolation goes further. Next, we compare the ROM-GPR transfer learning method with the GPR transfer learning method in terms of the accuracy and computational cost. For that, we used the same training parameter instances determined by active learning, i.e., P active tr = {0.2486, 0.4528, 0.6, 0.2}; and two testing parameter instances were selected: µ * 1 = 0.4 inside the training sampling space P tr and µ * 2 = 0.8 outside P tr . The memory kernels predicted at the two testing parameter instances by the two methods are compared in Fig. 6. By comparison with the memory kernel computed from the MD simulation data (regarded as the "ground truth"), we find that the predictions of these two methods both achieve good accuracy with the relative errors ε r (µ * 1 ) = 0.009 and ε r (µ * 2 ) = 0.025 for K R-G and ε r (µ * 1 ) = 0.011 and ε r (µ * 2 ) = 0.046 for K G , where K G denotes the memory kernel predicted by the GPR transfer learning method. However, the computational costs of the two (a) (b) Fig. 6 The memory kernels K(t) predicted at (a) µ * 1 = γ * 1 = 0.4 (interpolation) and (b) µ * 2 = γ * 2 = 0.8 (extrapolation) by the ROM-GPR and GPR transfer learning methods, respectively, compared with the memory kernels computed from the MD simulation data (ground truth). methods are significantly different. Specifically, it took the GPR transfer learning method 1086s to construct the GPR model and 0.2832s to predict the memory kernel at a testing parameter instance, but only took the ROM-GPR transfer learning method 0.1127s to construct the ROM and GPR model and 7.880 × 10 −4 s to predict K(t; µ * ). Both methods were implemented in MATLAB and run on a workstation with Intel Core CPU i5-6500 3.20 GHz. We hence evidence that the transfer learning based on GPR can be greatly accelerated by model order reduction.
Finally, from the predicted memory kernel at a given parameter instance, the CG model was constructed. For that, the memory kernel was first approximated by Eq. (7). The dynamics of the CG system was then simulated by solving Eq. (10). To examine whether the CG model could accurately reproduce the dynamic properties of the reference atomistic system in all time scales, we computed the VACF (C(t)), diffusion coefficient (D(t)), and MSD as functions of time. In Figs. 7 and 8, we present the results obtained from CG modeling at two different concentrations of star polymers (γ * 1 = 0.4 and γ * 2 = 0.8), compared with the MD simulation results. Overall good agreements can be found, and all stages of diffusion from super-diffusion to normal diffusion are correctly captured. We hence demonstrate that by transfer learning of 4 memory kernels at concentrations γ = {0.2486, 0.4528, 0.6, 0.2}, we were able to construct the CG model that could accurately reproduce the reference atomistic system's dynamic properties in all time scales across a range of concentrations (γ * ∈ (0.2, 0.8]), unseen in the training data and even outside the range of training sampling space P tr = [0.2, 0.6]. Fig. 7 VACF (C(t)), diffusion coefficient (D(t)), and MSD predicted by the CG models at µ * 1 = γ * 1 = 0.4, compared with the MD simulation results. Here, the memory kernel predicted by the ROM-GPR or GPR transfer learning method was approximated by Eq. (7) with N = 7 terms.

Transferable in multiple parameters
After verifying the transferability of memory kernel in one parameter as well as a detailed discussion about the two transfer learning methods and the active learning strategy, we next demonstrate how transfer learning can enable the memory kernel transferable in multiple parameters. In particular, the parameter space comprises three parameters: the temperature T , the concentration of star polymers γ, and the solvent viscos- In such a multidimensional, large parameter space, the memory kernels' magnitudes and time scales vary in orders, as depicted in Fig. 9, where 4 memory kernel samples are displayed at 4 parameter instances sampled in P tr . This makes transfer learning challenging and hence serves as a good problem to assess the effectiveness of our proposed methods. The active learning process started with 8 initial training parameter instances chosen as P active tr = {(0.75 + 1i 1 , 0.3 + 0.4i 2 , 1.1 + 1i 3 )} i 1 =0,1; i 2 =0,1; i 3 =0,1 . For the preset tolerance ζ POD = 0.01, 8 POD bases were retained in the ROM, i.e., R = 8 in Eq. (21). As a result of active learning, N p = 54 sampling points were determined as the final training parameter instances, such that the uncertainty (defined in Eq. (22)) of the GPR models for the parameter modes α k (µ) with k = 1, . . . , 8 was less than the preset tolerance ζ AL = 0.025. To illustrate the advantage of active learning, we set up a control group, where the training parameter instances of the same number (N p = 54) were sampled uniformly as: P uniform tr = {(0.75 + 0.5i 1 , 0.3 + 0.2i 2 , 1.1 + 0.2i 3 )} i 1 =0,1,2; i 2 =0,1,2; i 3 =0,...,5 . Two testing parameter instances were selected: µ * 1 = (1.75, 0.42, 1.74) inside the training sampling space P tr but not in P active tr or P uniform tr , and µ * 2 = (0.5, 0.2, 1.0) outside P tr . Fig. 10 presents the memory kernels predicted by the ROM-GPR transfer learning method at the two testing parameter instances with different sets of training parameter instances, i.e., P active tr vs. P uniform tr . By comparison with the ground truth, it is obvious that using the same number of training data, the memory kernels predicted using the training parameter instances adaptively sampled via active learning are more accurate than using the uniformly sampled training parameter instances. While the relative errors for the former are ε r (µ * 1 ) = 0.026 and ε r (µ * 2 ) = 0.068, the relative errors for the latter are ε r (µ * 1 ) = 0.349 and ε r (µ * 2 ) = 0.932. Thus, to achieve the same target accuracy, transfer learning coupled with active learning may require much less training data, which thereby greatly reduces the training cost.  The CG model was then constructed from the predicted K R-G (t). Figs. 11 and 12 present the VACF, diffusion coefficient, and MSD predicted by the CG model. They agree well with the MD simulation results. All stages of diffusion: super-, sub-, and normal diffusion (in Fig. 11) are correctly captured. We hence verify that by transfer learning, the memory kernel is transferable in multiple parameters, built on which the CG models can accurately reproduce the dynamic properties of the reference atomistic system in all time scales for different temperatures, concentrations of star polymers, and solvent viscosities.

Peptoid polymer
After assessing the proposed methods in a model polymer solution system, we next studied a real polymer system consisting of peptoid polymers, which are known as a class of highly configurable biopolymers [59][60][61][62][63][64][65] . The peptoid polymer studied in this work contains N-[2-(4-chlorophenyl)ethyl]glycine (N 4−Cl pe) and N-(2-carboxyethyl)glycine (Nce) groups 60 , whose chemical structure is described in Fig. 13. In different solution systems, a peptoid polymer can consist of different numbers of repeat units, denoted as z. The peptoid solutions were made of one peptoid polymer immersed in water with a fixed concentration of 1600 mg/kg. The all-atom representation of a peptoid polymer in MD simulations is shown in Fig. 14. Here, the AMBER03 66 force field with the parameters from the generalized AMBER force field 60,67,68 was adopted for the peptoid molecule; the SPC force field 69 was employed for modeling the water molecules. The MD simulations were performed using the GROMACS package 70 .
The appropriate size of the periodic cubic box was determined by running the MD simulation in the isothermal-isobaric ensem-  ble (NPT) using the Parrinello-Rahman barostat 71 at 1 bar with isotropic pressure coupling. The MD simulations were then performed in the NVT ensemble with the modified Berendsen thermostat 72 . To maintain the entire system in the NVT ensemble more effectively, the thermostat was enforced to the peptoid molecule and to the water molecules separately. The time step ∆t was chosen as 2 fs. After the thermal equilibrium was reached (after 100 ps in our case), data were collected for computing the ensemble-averaged quantities of interest.
In this study, the temperature and the length (i.e., the number of repeat units) of a peptoid polymer varied in different systems. Hence, they were the two parameters to practice transfer learning and to assess the transferability of memory kernel. The parameter space was specified as P = [275, 365] × [1, 6], i.e., the temperature T varies from 275 K to 365 K, and the number of repeat units in a peptoid polymer z varies from 1 to 6. The training sampling space was set as P tr = [275, 315] × [1,3]. The 4 initial training parameter instances for active learning were sampled as P active tr = {(275 + 40i 1 , 1 + 2i 2 )} i 1 =0,1; i 2 =0,1 . The tolerance for POD was set as ζ POD = 0.1, for which 2 POD bases were retained in the constructed ROM with R = 2 in Eq. (21). After adding 6 more sampling points via active learning, the uncertainty (defined in Eq. (22)) of the GPR models for the parameter modes α k (µ) with k = 1, 2 was less than the preset tolerance ζ AL = 0.01. Thus, we used the memory kernels computed from the MD simulation data at the 10 sampled parameter instances as the training data in the transfer learning. To ensure the memory kernel long enough to capture the dynamics in all time scales, each was computed up to t f = 50 ps until the VACF (C(t f )) decayed to |C(t f )|/|C(0)| ≤ 10 −2 .
To examine the performance of transfer learning, two testing parameter instances were selected: µ * 1 = (307, 1), which is where the uncertainty of the GPR models for all parameter modes is maximized inside the training sampling space P tr ; and µ * 2 = (365, 6), which is outside P tr and represents the most extreme case in the parameter space considered. Fig. 15 shows the memory kernels predicted at the two selected testing parameter instances. It can be seen that the memory kernels predicted by the ROM-GPR transfer learning agree well with the ground truths with the relative errors of 0.028 and 0.086 for µ * 1 and µ * 2 , respectively.
Using the predicted memory kernels K R-G (t; µ * ), we constructed the CG models. The VACF, diffusion coefficient, and MSD predicted by the CG models were compared with the MD simulation results, as depicted in Figs. 16 and 17. Good agreements were achieved in all time scales. Thus, in a real polymer solution system, we again verify that by transfer learning, the memory kernel can be transferable in multiple parameters and across a non-trivially large parameter space. Built on the transferable memory kernel, the CG model can accurately reproduce the dynamic properties of the peptoid polymer in all time scales for different temperatures and lengths of polymer.  , diffusion coefficient (D(t)), and MSD predicted by the CG model at T =307 K for the peptoid polymer with one N 4−Cl pe and Nce, compared with the MD simulation results. Here, K R-G (t; µ * 1 ) was approximated by Eq. (7) with N = 7 terms.

Conclusion
We have introduced transfer learning of memory kernel in CG modeling. Built on a transferable memory kernel, the CG model can reproduce the dynamic properties of the reference atomistic  , diffusion coefficient (D(t)), and MSD predicted by the CG model at T =365 K for the peptoid polymer with 6 N 4−Cl pe and Nce, compared with the MD simulation results. Here, K R-G (t; µ * 2 ) was approximated by Eq. (7) with N = 8 terms.
system at different thermodynamic conditions such as temperature and solvent viscosity and for different systems with varying solute concentrations and lengths of polymer chains. Notably, the transferability allows for out-of-sample predictions in the extrapolated domain of parameters. Through two example polymer solution systems, we have demonstrated the accuracy and efficiency of the proposed transfer learning. Since the memory kernels are accurately predicted, the CG models can reproduce the dynamic properties of polymers in all time scales, including the VACF, diffusion coefficient, and MSD. The predictions of CG models agree well with the atomistic simulation results, and all stages of diffusion: super-, sub-, and normal diffusion, are correctly captured. We anticipate the proposed methodology is generally applicable to CG modeling of other kinds of polymer solutions and soft matter systems such as colloid suspensions. While the parameters considered in this work include the temperature, solvent viscosity, concentration of polymers, and length of polymer chains, the proposed transfer learning can certainly be applied to a broader range of parameters beyond this list.
Two transfer learning methods have been proposed and compared. The GPR transfer learning method directly models memory kernels (functions of time) at different parameters as a multivariate Gaussian process. GPR is not only flexible for interpolation or extrapolation at any given input, but also can quantify the uncertainty of any prediction. The ROM-GPR transfer learning method integrates the GPR with model order reduction and active learning, by which it is more computationally efficient and requires minimum training data. In the ROM-GPR transfer learning method, a ROM is first constructed via POD for the memory kernel. By such, the memory kernel is represented in a reduced temporal and parameter space, and the GPR is only needed for the parameter modes. Thus, both training and prediction costs of GPR are greatly reduced. Furthermore, guided by the uncertainty quantified in GPR, the active learning technique enables adaptively sampling the training data. Compared with other sampling strategy, e.g., uniform sampling, using the same number of training data, active learning leads to much more accurate transfer learning. Thus, to achieve the same accuracy, active learning requires less training data and thereby lower training cost.
The present work has attempted to construct transferable memory kernels that preserve dynamic properties under coarsegraining. It can be potentially integrated with the efforts in literature that focus on attaining transferable CG potentials [33][34][35][36][37] , so that the CG modeling can preserve both structural and dynamic properties of the underlying atomistic system and is transferable across a range of parameters.

Conflicts of interest
There are no conflicts to declare.