Title: Transfer Learning with Affine Model Transformation
Venue: NeurIPS 2023
Accepted: yes
Keywords: Machine learning

Transfer learning
Abstract: Supervised transfer learning has received considerable attention due to its potential to boost the predictive power of machine learning in scenarios where data are scarce. Generally, a given set of source models and a dataset from a target domain are used to adapt the pre-trained models to a target domain by statistically learning domain shift and domain-specific factors. While such procedurally and intuitively plausible methods have achieved great success in a wide range of real-world applications, the lack of a theoretical basis hinders further methodological development. This paper presents a general class of transfer learning regression called affine model transfer, following the principle of expected-square loss minimization. It is shown that the affine model transfer broadly encompasses various existing methods, including the most common procedure based on neural feature extractors. Furthermore, the current paper clarifies theoretical properties of the affine model transfer such as generalization error and excess risk. Through several case studies, we demonstrate the practical benefits of modeling and estimating inter-domain commonality and domain-specific factors separately with the affine-type transfer models.

Transfer Learning with Affine Model Transformation

Abstract

Supervised transfer learning has received considerable attention due to its potential to boost the predictive power of machine learning in scenarios where data are scarce. Generally, a given set of source models and a dataset from a target domain are used to adapt the pre-trained models to a target domain by statistically learning domain shift and domain-specific factors. While such procedurally and intuitively plausible methods have achieved great success in a wide range of real-world applications, the lack of a theoretical basis hinders further methodological development. This paper presents a general class of transfer learning regression called affine model transfer, following the principle of expected-square loss minimization. It is shown that the affine model transfer broadly encompasses various existing methods, including the most common procedure based on neural feature extractors. Furthermore, the current paper clarifies theoretical properties of the affine model transfer such as generalization error and excess risk. Through several case studies, we demonstrate the practical benefits of modeling and estimating inter-domain commonality and domain-specific factors separately with the affine-type transfer models.

1 Introduction

Transfer learning (TL) is a methodology to improve the predictive performance of machine learning in a target domain with limited data by reusing knowledge gained from training in related source domains. Its great potential has been demonstrated in various real-world problems, including computer vision [1, 2], natural language processing [3, 4], biology [5], and materials science [6, 7, 8]. Notably, most of the outstanding successes of TL to date have relied on the feature extraction ability of deep neural networks. For example, a conventional method reuses feature representations encoded in an intermediate layer of a pre-trained model as an input for the target task or uses samples from the target domain to fine-tune the parameters of the pre-trained source model [9]. While such methods are operationally plausible and intuitive, they lack methodological principles and remain theoretically unexplored in terms of their learning capability for limited data. This study develops a principled methodology generally applicable to various kinds of TL.

In this study, we focus on supervised TL settings. In particular, we deal with settings where, given feature representations obtained from training in the source domain, we use samples from the target domain to model and estimate the domain shift to the target. This procedure is called hypothesis transfer learning (HTL); several methods have been proposed, such as using a linear transformation function [10, 11] and considering a general class of continuous transformation functions [12]. If the transformation function appropriately captures the functional relationship between the source and target domains, only the domain-specific factors need to be additionally learned, which can be done efficiently even with a limited sample size. In other words, the performance of HTL depends strongly

on whether the transformation function appropriately represents the cross-domain shift. However, the general methodology for modeling and estimating such domain shifts has been less studied.

This study derives a theoretically optimal class of supervised TL that minimizes the expected ℓ 2 loss function of the HTL. The resulting function class takes the form of an affine coupling g 1 ( f s ) + g 2 ( f s ) · g 3 ( x ) of three functions g 1 , g 2 and g 3 , where the shift from a given source feature f s to the target domain is represented by the functions g 1 and g 2 , and the domain-specific factors are represented by g 3 ( x ) for any given input x . These functions can be estimated simultaneously using conventional supervised learning algorithms such as kernel methods or deep neural networks. Hereafter, we refer to this framework as the affine model transfer . As described later, we can formulate a wide variety of TL algorithms within the affine model transfer, including the widely used neural feature extractors, offset and scale HTLs [10, 11, 12], and Bayesian TL [13]. We clarify theoretical properties of the affine model transfer such as generalization error and excess risk.

To summarize, the contributions of our study are as follows:

The affine model transfer is proposed to adapt source features to the target domain by separately estimating cross-domain shift and domain-specific factors.

The affine form is derived theoretically as an optimal class based on the squared loss for the target task.

The affine model transfer encompasses several existing TL methods, including neural feature extraction. It can work with any type of source model, including non-machine learning models such as physical models as well as multiple source models.

For each of the three functions g 1 , g 2 , and g 3 , we provide an efficient and stable estimation algorithm when modeled using the kernel method.

Two theoretical properties of the affine transfer model are shown: the generalization and the excess risk bound.

With several applications, we compare the affine model transfer with other TL algorithms, discuss its strengths, and demonstrate the advantage of being able to estimate cross-domain shifts and domain-specific factors separately.

2 Transfer Learning via Transformation Function

2.1 Affine Model Transfer

This study considers regression problems with squared loss. We assume that the output of the target domain y ∈Y ⊂ R follows y = f t ( x )+ ϵ , where f t : X → R is the true model on the target domain, and the observation noise ϵ has mean zero and variance σ 2 . We are given n samples { ( x i , y i ) } n i =1 ∈ ( X×Y ) n from the target domain and the feature representation f s ( x ) ∈F s from one or more source domains. Typically, f s is given as a vector, including the output of the source models, observed data in the source domains, or learned features in a pre-trained model, but it can also be a non-vector feature such as a tensor, graph, or text. Hereafter, f s is referred to as the source features.

In this paper, we focus on transfer learning with variable transformations as proposed in [12]. For an illustration of the concept, consider the case where there exists a relationship between the true functions f ∗ s ( x ) ∈ R and f ∗ t ( x ) ∈ R such that f ∗ t ( x ) = f ∗ s ( x ) + x ⊤ θ ∗ , x ∈ R d with an unknown parameter θ ∗ ∈ R d . If f ∗ s is non-smooth, a large number of training samples is needed to learn f ∗ t directly. However, since the difference f ∗ t -f ∗ s is a linear function with respect to the unknown θ ∗ , it can be learned with fewer samples if prior information about f ∗ s is available. For example, a target model can be obtained by adding f s to the model g trained for the intermediate variable z = y -f s ( x ) .

The following is a slight generalization of TL procedure provided in [12]:

With the source features, perform a variable transformation of the observed outputs as z i = ϕ ( y i , f s ( x i )) , using the data transformation function ϕ : Y × F s → R .

Train an intermediate model ˆ g ( x ) using the transformed sample set { ( x i , z i ) } n i =1 to predict the transformed output z for any given x .

Obtain a target model ˆ f t ( x ) = ψ (ˆ g ( x ) , f s ( x )) using the model transformation function ψ : R ×F s →Y that combines ˆ g and f s to define a predictor.

In particular, [12] considers the case where the model transformation function is equal to the inverse of the data transformation function. We consider a more general case that eliminates this constraint.

The objective of step 1 is to identify a transformation ϕ that maps the output variable y to the intermediate variable z , making the variable suitable for learning. In step 2, a predictive model for z is constructed. Since the data is limited in many TL setups, a simple model, such as a linear model, should be used as g . Step 3 is to transform the intermediate model g into a predictive model f t for the original output y .

This class of TL includes several approaches proposed in previous studies. For example, [10, 11] proposed a learning algorithm consisting of linear data transformation and linear model transformation: ϕ = y -⟨ θ , f s ⟩ and ψ = g ( x )+ ⟨ θ , f s ⟩ with pre-defined weights θ . In this case, factors unexplained by the linear combination of source features are learned with g , and the target output is predicted additively with the common factor ⟨ θ , f s ⟩ and the additionally learned g . In [13], it is shown that a type of Bayesian TL is equivalent to using the following transformation functions; for F s ⊂ R , ϕ =( y -τf s ) / (1 -τ ) and ψ = ρg ( x )+(1 -ρ ) f s with two varying hyperparameters τ < 1 and 0 ≤ ρ ≤ 1 . This includes TL using density ratio estimation [14] and neural network-based fine-tuning as special cases when the two hyperparameters belong to specific regions.

The performance of this TL strongly depends on the design of the two transformation functions ϕ and ψ . In the sequel, we theoretically derive the optimal form of transformation functions under the squared loss scenario. For simplicity, we denote the transformation functions as ϕ f s ( · )= ϕ ( · , f s ) on Y and ψ f s ( · )= ψ ( · , f s ) on R . To derive the optimal class of ϕ and ψ , note first that the TL procedure described above can be formulated in population as solving two successive least square problems;

Since the regression function that minimizes the mean squared error is the conditional mean, the first problem is solved by g ∗ ϕ ( x ) = E [ ϕ f s ( Y ) | X = x ] , which depends on ϕ . We can thus consider the optimal transformation functions ϕ and ψ by the following minimization:

It is easy to see that Eq. (1) is equivalent to the following consistency condition:

From the above observation, we make three assumptions to derive the optimal form of ψ and ϕ :

Assumption 2.1 (Differentiability) . The data transformation function ϕ is differentiable with respect to the first argument.

Assumption 2.2 (Invertibility) . The model transformation function ψ is invertible with respect to the first argument, i.e., its inverse ψ -1 f s exists.

Assumption 2.3 (Consistency) . For any distribution on the target domain p t ( x , y ) , and for all x ∈ X ,

Assumption 2.2 is commonly used in most existing HTL settings, such as [10] and [12]. It assumes a one-to-one correspondence between the predictive value ˆ f t ( x ) and the output of the intermediate model ˆ g ( x ) . If this assumption does not hold, then multiple values of ˆ g correspond to the same predicted value ˆ f t , which is unnatural. Note that Assumption 2.3 corresponds to the unbiased condition of [12].

We now derive the properties that the optimal transformation functions must satisfy.

Theorem 2.4. Under Assumptions 2.1-2.3, the transformation functions ϕ and ψ satisfy the following two properties:

where g 1 and g 2 are some functions.

The proof is given in Section D.1 in Supplementary Material. Despite not initially assuming that the two transformation functions are inverses, Theorem 2.4 implies they must indeed be inverses. Furthermore, the mean squared error is minimized when the data and model transformation functions are given by an affine transformation and its inverse, respectively. In summary, under the expected squared loss minimization with the HTL procedure, the optimal class for HTL model is expressed as follows:

where G 1 , G 2 and G 3 are the arbitrarily function classes. Here, each of g 1 and g 2 is modeled as a function of f s that represents common factors across the source and target domains. g 3 is modeled as a function of x , in order to capture the domain-specific factors unexplainable by the source features.

We have derived the optimal form of the transformation functions when the squared loss is employed. Even for general convex loss functions, (i) of Theorem 2.4 still holds. However, (ii) of Theorem 2.4 does not generally hold because the optimal transformation function depends on the loss function. Extensions to other losses are briefly discussed in Section A.1, but the establishment of a complete theory is a future work.

Here, the affine transformation is found to be optimal in terms of minimizing the mean squared error. We can also derive the same optimal function by minimizing the upper bound of the estimation error in the HTL procedure, as discussed in Section A.2.

One of key principles for the design of g 1 , g 2 , and g 3 is interpretability. In our model, g 1 and g 2 primarily facilitate knowledge transfer, while the estimated g 3 is used to gain insight on domainspecific factors. For instance, in order to infer cross-domain differences, we could design g 1 and g 2 by the conventional neural feature extraction, and a simple, highly interpretable model such as a linear model could be used for g 3 . Thus, observing the estimated regression coefficients in g 3 , one can statistically infer which features of x are related to inter-domain differences. This advantage of the proposed method is demonstrated in Section 5.2 and Section B.3.

2.2 Relation to Existing Methods

The affine model transfer encompasses some existing TL procedures. For example, by setting g 1 ( f s ) = 0 and g 2 ( f s ) = 1 , the prediction model is estimated without using the source features, which corresponds to an ordinary direct learning, i.e., a learning scheme without transfer. Furthermore, various kinds of HTLs can be formulated by imposing constraints on g 1 and g 2 . In prior work, [10] employs a two-step procedure where the source features are combined with pre-defined weights, and then the auxiliary model is additionally learned for the residuals unexplainable by the source features. The affine model transfer can represent this HTL as a special case by setting g 2 = 1 . [12] uses the transformed output z i = y i /f s with the output value f s ∈ R of a source model, and this cross-domain shift is then regressed onto x using a target dataset. This HTL corresponds to g 1 = 0 and g 2 = f s .

When a pre-trained source model is provided as a neural network, TL is usually performed with the intermediate layer as input to the model in the target domain. This is called a feature extractor or frozen featurizer and has been experimentally and theoretically proven to have strong transfer capability as the de facto standard for TL [9, 15]. The affine model transfer encompasses the neural feature extraction as a special subclass, which is equivalent to setting g 2 ( f s ) g 3 ( x ) = 0 . A performance comparison of the affine model transfer with the neural feature extraction is presented in Section 5 and Section B.2. The relationships between these existing methods and the affine model transfer are illustrated in Figure 1 and Figure S.1

The affine model transfer can also be interpreted as generalizing the feature extraction by adding a product term g 2 ( f s ) g 3 ( x ) . This additional term allows for the inclusion of unknown factors in the transferred model that are unexplainable by source features alone. Furthermore, this encourages the avoidance of a negative transfer, a phenomenon where prior learning experiences interfere with training in a new task. The usual TL based only on f s attempts to explain and predict the data generation process in the target domain using only the source features. However, in the presence of domain-specific factors, a negative transfer can occur owing to a lack of descriptive power. The additional term compensates for this shortcoming. The comparison of behavior for the case with the non-relative source features is described in Section 5.1.

Algorithm 1 Block relaxation algorithm [19].

Initialize:

a 0 , b 0 = 0 , c 0 = 0

repeat

a t +1 = arg min a F ( a , b t , c t )

b t +1 = arg min b F ( a t +1 , b , c t )

c t +1 = arg min c F ( a t +1 , b t +1 , c )

until convergence

Algorithm 1 Block relaxation algorithm [19].

Initialize:

a 0 , b 0 = 0 , c 0 = 0

repeat

a t +1 = arg min a F ( a , b t , c t )

b t +1 = arg min b F ( a t +1 , b , c t )

c t +1 = arg min c F ( a t +1 , b t +1 , c )

until convergence

The affine model transfer can be naturally expressed as an architecture of network networks. This architecture, called affine coupling layers, is widely used for invertible neural networks in flow-based generative modeling [16, 17]. Neural networks based on affine coupling layers have been proven to have universal approximation ability [18]. This implies that the affine transfer model has the potential to represent a wide range of function classes, despite its simple architecture based on the affine coupling of three functions.

3 Modeling and Estimation

In this section, we focus on using kernel methods for the affine transfer model and provide the estimation algorithm. Let H 1 , H 2 and H 3 be reproducing kernel Hilbert spaces (RKHSs) with positive-definite kernels k 1 , k 2 and k 3 , which define the feature mappings Φ 1 : F s →H 1 , Φ 2 : F s →H 2 and Φ 3 : X →H 3 , respectively. Denote Φ 1 ,i =Φ 1 ( f s ( x i )) , Φ 2 ,i =Φ 2 ( f s ( x i )) , Φ 3 ,i =Φ 3 ( x i ) . For the proposed model class, the ℓ 2 -regularized empirical risk with the squared loss is given as follows:

where λ 1 ,λ 2 ,λ 3 ≥ 0 are hyperparameters for the regularization. According to the representer theorem, the minimizer of F α,β,γ with respect to the parameters α ∈ H 1 , β ∈ H 2 , and γ ∈ H 3 reduces to α = ∑ n i =1 a i Φ 1 ,i , β = ∑ n i =1 b i Φ 2 ,i , γ = ∑ n i =1 c i Φ 3 ,i , with the n -dimensional unknown parameter vectors a , b , c ∈ R n . Substituting this expression into Eq. (2), we obtain the objective function as

Here, the symbol ◦ denotes the Hadamard product. K I is the Gram matrix associated with the kernel k I for I ∈ { 1 , 2 , 3 } . k ( i ) I = [ k I ( x i , x 1 ) · · · k I ( x i , x n )] ⊤ denotes the i -th column of the Gram matrix. The n × n matrix M ( i ) is given by the tensor product M ( i ) = k ( i ) 2 ⊗ k ( i ) 3 of k ( i ) 2 and k ( i ) 3 .

Because the model is linear with respect to parameter a and bilinear for b and c , the optimization of Eq. (3) can be solved using well-established techniques for the low-rank tensor regression. In this study, we use the block relaxation algorithm [19] as described in Algorithm 1. It updates a, b , and c by repeatedly fixing two of the three parameters and minimizing the objective function for the remaining one. Fixing two parameters, the resulting subproblem can be solved analytically because the objective function is expressed in a quadratic form for the remaining parameter.

Algorithm 1 can be regarded as repeating the HTL procedure introduced in Section 2.1; alternately estimates the parameters ( a , b ) of the transformation function and the parameters c of the model for the given transformed data { ( x i , z i ) } n i =1 . The function F in Algorithm 1 is not jointly convex in general. However, when employing methods like kernel methods or generalized linear models, and fixing two parameters, F exhibits convexity with respect to the remaining parameter. According to [19], when each sub-minimization problem is convex, Algorithm 1 is guaranteed to converge to a stationary point. Furthermore, [19] showed that consistency and asymptotic normality hold for the alternating minimization algorithm.

4 Theoretical Results

In this section, we present two theoretical properties, the generalization bound and excess risk bound.

̸

̸

Let ( Z , P ) be an arbitrary probability space, and { z i } n i =1 be independent random variables with distribution P . For a function f : Z→ R , let the expectation of f with respect to P and its empirical counterpart denote respectively by Pf = E P f ( z ) , P n f = 1 n ∑ n i =1 f ( z i ) . We use a non-negative loss ℓ ( y, y ′ ) such that it is bounded from above by L > 0 and for any fixed y ′ ∈Y , y ↦→ ℓ ( y, y ′ ) is µ ℓ -Lipschitz for some µ ℓ > 0 .

Recall that the function class proposed in this work is

In particular, the following discussion in this section assumes that g 1 , g 2 , and g 3 are represented by linear functions on the RKHSs.

4.1 Generalization Bound

The optimization problem is expressed as follows:

where Φ 1 = Φ 1 ( f s ( x )) , Φ 2 = Φ 2 ( f s ( x )) and Φ 3 = Φ 3 ( x ) denote the feature maps. Without loss of generality, it is assumed that ∥ Φ i ∥ 2 H i ≤ 1 ( i = 1 , 2 , 3 ) and λ α , λ β , λ γ > 0 . Hereafter, we will omit the suffixes H i in the norms if there is no confusion.

Let (ˆ α, ˆ β, ˆ γ ) be a solution of Eq. (4), and denote the corresponding function in H as ˆ h . For any α , we have

where we use the fact that ℓ ( · , · ) and ∥ · ∥ are non-negative, and (ˆ α, ˆ β, ˆ γ ) is the minimizer of Eq. (4). Denoting ˆ R s = inf α { P n ℓ ( y, ⟨ α, Φ 1 ⟩ ) + λ α ∥ α ∥ 2 } , we obtain ∥ ˆ α ∥ 2 ≤ λ -1 α ˆ R s . Because the same inequality holds for λ β ∥ ˆ β ∥ 2 , λ γ ∥ ˆ γ ∥ 2 and P n ℓ ( y, ˆ h ) , we have ∥ ˆ β ∥ 2 ≤ λ -1 β ˆ R s , ∥ ˆ γ ∥ 2 ≤ λ -1 γ ˆ R s and P n ℓ ( y, ˆ h ) ≤ ˆ R s . Moreover, we have Pℓ ( y, ˆ h ) = E P n ℓ ( y, ˆ h ) ≤ E ˆ R s . Therefore, it is sufficient to consider the following hypothesis class ˜ H and loss class L :

Here, we show the generalization bound of the proposed model class. The following theorem is based on [11], showing that the difference between the generalization error and empirical error can be bounded using the magnitude of the relevance of the domains.

Theorem 4.1. There exists a constant C depending only on λ α , λ β , λ γ and L such that, for any η > 0 and h ∈ ˜ H , with probability at least 1 -e -η ,

where R s = inf α { Pℓ ( y, ⟨ α, Φ 1 ⟩ ) + λ α ∥ α ∥ 2 } .

Because Φ 1 is the feature map from the source feature space F s into the RKHS H 1 , R s corresponds to the true risk of training in the target domain using only the source features f s . If this is sufficiently small, e.g., R s = ˜ O ( n -1 / 2 ) , the convergence rate indicated by Theorem 4.1 becomes n -1 , which is an improvement over the naive convergence rate n -1 / 2 . This means that if the source task yields feature representations strongly related to the target domain, training in the target domain is accelerated. Theorem 4.1 measures this cross-domain relation using the metric R s .

Theorem 4.1 is based on Theorem 11 of [11] in which the function class g 1 + g 3 is considered. Our work differs in the following two points: the source features are modeled not only additively but also multiplicatively, i.e., we consider the function class g 1 + g 2 · g 3 , and we also consider the estimation of the parameters for the source feature combination, i.e., the parameters of the functions g 1 and g 2 . In particular, the latter affects the resulting rate. With fixed the source combination parameters, the resulting rate improves only up to n -3 / 4 . The details are discussed in Section D.2.

4.2 Excess Risk Bound

Here, we analyze the excess risk, which is the difference between the risk of the estimated function and the smallest possible risk within the function class.

Recall that we consider the functions g 1 , g 2 and g 3 to be elements of the RKHSs H 1 , H 2 and H 3 with kernels k 1 , k 2 and k 3 , respectively. Define the kernel k (1) = k 1 , k (2) = k 2 · k 3 and k = k (1) + k (2) . Let H (1) , H (2) and H be the RKHS with k (1) , k (2) and k respectively. For m =1 , 2 , consider the normalized Gram matrix K ( m ) = 1 n ( k ( m ) ( x i , x j )) i,j =1 ,...,n and its eigenvalues ( ˆ λ ( m ) i ) n i =1 , arranged in a nonincreasing order.

We make the following additional assumptions:

Assumption 4.2. There exists h ∗ ∈ H and h ( m ) ∗ ∈ H ( m ) ( m = 1 , 2 ) such that P ( y -h ∗ ( x )) 2 = inf h ∈H P ( y -h ( x )) 2 and P ( y -h ( m ) ∗ ( x )) 2 = inf h ∈H ( m ) P ( y -h ( x )) 2 .

Assumption 4.3. For m = 1 , 2 , there exist a m > 0 and s m ∈ (0 , 1) such that ˆ λ ( m ) j ≤ a m j -1 /s m .

Assumption 4.2 is used in [20] and is not overly restrictive as it holds for many regularization algorithms and convex, uniformly bounded function classes. In the analysis of kernel methods, Assumption 4.3 is standard [21], and is known to be equivalent to the classical covering or entropy number assumption [22]. The inverse decay rate s m measures the complexity of the RKHS, with larger values corresponding to more complex function spaces.

Theorem 4.4. Let ˆ h be any element of H satisfying P n ( y -ˆ h ( x )) 2 = inf h ∈H P n ( y -h ( x )) 2 . Under Assumptions 4.2 and 4.3, for any η > 0 , with probability at least 1 -5 e -η ,

Theorem 4.4 suggests that the convergence rate of the excess risk depends on the decay rates of the eigenvalues of two Gram matrices K (1) and K (2) . The inverse decay rate s 1 of the eigenvalues of K (1) = 1 n ( k 1 ( f s ( x i ) , f s ( x j ))) i,j =1 ,...,n represents the learning efficiency using only the source features, while s 2 is the inverse decay rate of the eigenvalues of the Hadamard product of K 2 = 1 n ( k 2 ( f s ( x i ) , f s ( x j )) i,j =1 ,...,n and K 3 = 1 n ( k 3 ( x i , x j )) i,j =1 ,...,n , which addresses the effect of combining the source features and original input. While rigorous discussion on the relationship between the spectra of two Gram matrices K 2 , K 3 and their Hadamard product K 2 ◦ K 3 seems difficult, intuitively, the smaller the overlap between the space spanned by the source features and by the original input, the smaller the overlap between H 2 and H 3 . In other words, as the source features and original input have different information, the tensor product H 2 ⊗H 3 will be more complex, and the decay rate 1 /s 2 is expected to be larger. In Section B.1, we experimentally confirm this speculation.

5 Experimental Results

We demonstrate the potential of the affine model transfer through two case studies: (i) the prediction of feed-forward torque at seven joints of the robot arm [23], and (ii) the prediction of review scores and decisions of scientific papers [24]. The experimental details are presented in Section C. Additionally, two case studies in materials science are presented in Section B. The Python code is available at https://github.com/mshunya/AffineTL .

5.1 Kinematics of the Robot Arm

We experimentally investigated the learning performance of the affine model transfer, compared to several existing methods. The objective of the task is to predict the feed-forward torques, required to follow the desired trajectory, at seven different joints of the SARCOS robot arm [23]. Twenty-one features representing the joint position, velocity, and acceleration were used as the input x . The target task is to predict the torque value at one joint. The representations encoded in the intermediate layer of the source neural network for predicting the other six joints were used as the source features f s ∈ R 16 . The experiments were conducted with seven different tasks (denoted as Torque 1-7) corresponding to the seven joints. For each target task, a training set of size n ∈ { 5 , 10 , 15 , 20 , 30 , 40 , 50 } was randomly constructed 20 times, and the performances were evaluated using the test data.

The following seven methods were compared, including two existing HTL procedures:

Direct Train a model using the target input x with no transfer.

Only source Train a model g ( f s ) using only the source feature f s .

Augmented Perform a regression with the augmented input vector concatenating x and f s .

HTL-offset [10] Calculate the transformed output z i = y i -g only ( f s ) where g only ( f s ) is the model pre-trained using Only source , and train an additional model with input x i to predict z i .

HTL-scale [12] Calculate the transformed output z i = y i /g only ( f s ) , and train an additional model with input x i to predict z i .

AffineTL-full Train the model g 1 + g 2 · g 3 .

AffineTL-const Train the model g 1 + g 3 .

Kernel ridge regression with the Gaussian kernel exp( -∥ x -x ′ ∥ 2 / 2 ℓ 2 ) was used for each procedure. The scale parameter ℓ was fixed to the square root of the dimension of the input. The regularization parameter in the kernel ridge regression and λ α , λ β , and λ γ in the affine model transfer were selected through 5-fold cross-validation. In addition to the seven feature-based methods, four weight-based TL methods were evaluated: fine-tuning, MAML [25], L 2 -SP [26], and PAC-Net [27].

Table 1 summarizes the prediction performance of the seven different procedures for varying numbers of training samples in two representative tasks: Torque 1 and Torque 7. The joint of Torque 1 is located closest to the root of the arm. Therefore, the learning task for Torque 1 is less relevant to those for the other joints, and the transfer from Torque 2-6 to Torque 1 would not work. In fact, as shown in Table 1, no method showed a statistically significant improvement to Direct . In particular, Only source failed to acquire predictive ability, and HTL-offset and HTL-scale likewise showed poor prediction performance owing to the negative effect of the failure in the variable transformation. In contrast, the two affine transfer models showed almost the same predictive performance as Direct , which is expressed as its submodel, and successfully suppressed the occurrence of negative transfer.

Because Torque 7 was measured at the joint closest to the end of the arm, its value strongly depends on those at the other six joints, and the procedures with the source features were more effective than in the other tasks. In particular, AffineTL achieved the best performance among the other feature-based methods. This is consistent with the theoretical result that the transfer capability of the affine model transfer can be further improved when the risk of learning using only the source features is sufficiently small.

In Table S.3 in Section C.1, we present the results for all tasks. In most cases, AffineTL achieved the best performance among the feature-based methods. In several other cases, Direct produced the best results; in almost all cases, Only source and the two HTLs showed no advantage over AffineTL . Comparing the weight-based and feature-based methods, we noticed that the weight-based methods showed higher performance with large sample sizes. Nevertheless, in scenarios with extremely small sample sizes (e.g., n =5 or 10 ), AffineTL exhibited comparable or even superior performance.

The strength of our method compared to weight-based TLs including fine-tuning is that it does not degrade its performance in cases where cross-domain relationships are weak. While fine-tuning outperformed our method in cases of Torque 7, the performance of fine-tuning was significantly degraded as the source-target relationship became weaker, as seen in Torque 1 case. In contrast, our method was able to avoid negative transfer even for such cases. This characteristic is particularly beneficial because, in many cases, the degree of relatedness between the domains is not known in advance. Furthermore, weight-based methods can sometimes be unsuitable, especially when transferring knowledge from large models, such as LLMs. In these scenarios, fine-tuning all parameters is unfeasible, and feature-based TL is preferred. Our approach often outperforms other feature-based methods.

5.2 Evaluation of Scientific Documents

Through a case study in natural language processing, we compare the performance of the affine model transfer with that of ordinary feature extraction-based TL and show the advantage of being able to estimate domain shift and domain-specific factors separately.

We used SciRepEval [24], a benchmark dataset of scientific documents. The dataset consists of abstracts, review scores, and decision statuses of papers submitted to various machine learning conferences. We focused on two primary tasks: a regression task to predict the average review score, and a binary classification task to determine the acceptance or rejection status of each paper. The original input x was represented by a two-gram bag-of-words vector of the abstract. For the source features f s , we utilized text embeddings of the abstract generated by the pre-trained language models; BERT [28], SciBERT [29], T5 [30], and GPT-3 [31]. In the affine model transfer, we employed neural networks with two hidden layers to model g 1 and g 2 , and a linear model for g 3 . For comparison, we also evaluated the performance of the ordinary feature extraction-based TL using a two-layer neural network with f s as inputs. We used 8,166 training samples and evaluated the performance of the model on 2,043 test samples.

Table 2 shows the root mean square error (RMSE) for the regression task and accuracy for the classification task. In the regression tasks, the RMSEs of the affine model transfer were significantly improved over the ordinary feature extraction for the four types of text feature embedding. We also observed the improvements in accuracy for the classification task even though the affine model transfer was derived on the basis of regression settings. While the pre-trained language models have the remarkable ability to represent text quality and structure, their representation ability to perform prediction tasks for machine learning documents is not sufficient. The affine model transfer effectively bridged this gap by learning the additional target-specific factor via the target task, resulting in improved prediction performance in both regression and classification tasks.

Table 3 provides a list of phrases that were estimated to have a positive or negative effect on the review scores. Because we restricted a network to output positive values for g 2 , the influence of each phrase could be inferred from the estimated coefficients of the linear model g 3 . Specifically, phrases such as "tasks including" and "new state" were estimated to have positive influences on the predicted score. These phrases often appear in contexts such as "demonstrated on a wide range of tasks including" or "establishing a new state-of-the-art result," , suggesting that superior experimental results tend to yield higher peer review scores. In addition, the phrase "theoretical analysis" was also identified to have a positive effect on the review score, reflecting the significance of theoretical validation in machine learning research. On the contrary, general phrases with broader meanings such as "recent advances" and "machine learning," contributed to lower scores. This observation suggests the importance of explicitly stating the novelty and uniqueness of research findings and refraining from using generic terminologies.

±

±

As illustrated in this example, integrating modern deep learning techniques and highly interpretable transfer models through the mechanism of the affine model transfer not only enhances prediction performance, but also provides valuable insights into domain-specific factors.

5.3 Case Studies in Materials Science

We conducted two additional case studies, both of which pertain to scientific tasks in the field of materials science. One experiment aims to examine the relationship between qualitative differences in source features and learning behavior of the affine model transfer. In the other experiment, we demonstrate the potential utility of the affine model transfer as a calibration tool bridging computational models and real-world systems. In particular, we highlight the benefits of separately modeling and estimating domain-specific factors through a case study in polymer chemistry. The objective is to predict the specific heat capacity at constant pressure of any given organic polymer with its chemical structure in the polymer's repeating unit. Specifically, we conduct TL to bridge the gap between experimental values and physical properties calculated from molecular dynamics simulations. The details are shown in Section B in Supplementary Material,

6 Conclusions

In this study, we introduced a general class of TL based on affine model transformations, and clarified their learning capability and applicability. The proposed affine model transformation was shown to be an optimal class that minimizes the expected squared loss in the HTL procedure. The model is contrasted with widely applied TL methods, such as re-using features from pre-trained models, which lack theoretical foundation. The affine model transfer is model-agnostic; it is easily combined with any machine learning models, features, and physical models. Furthermore, in the model, domainspecific factors are involved in incorporating the source features. From this property, the affine transfer has the ability to handle domain common and unique factors simultaneously and separately.

The advantages of the model were verified theoretically and experimentally in this study. We showed theoretical results on the generalization bound and excess risk bound when the regression tasks are solved by kernel methods. It is shown that if the source feature is strongly related to the target domain, the convergence rate of the generalization bound is improved from naive learning. The excess risk of the proposed TL is evaluated using the eigen-decay of the product kernel, which also illustrates the effect of the overlap between the source and target tasks. In our numerical studies, the affine model transfer generally outperforms in test errors when the target and source tasks have a similarity. We have also seen in the example of NLP that the proposed affine model transfer can identify the (non-)valuable phrases for high-quality papers. This can be done by the affine representation of cross-domain shift and domain-specific factors in our model.

Acknowledgments and Disclosure of Funding

This work was supported by JST SPRING Grant No. JPMJSP2104, JST CREST Grants No. JPMJCR22O3 and No. JPMJCR19I3, MEXT KAKENHI Grant-in-Aid for Scientific Research on Innovative Areas (Grant No. 19H50820), the Grant-in-Aid for Scientific Research (A) (Grant No. 19H01132) and Grant-in-Aid for Research Activity Start-up (Grant No. 23K19980) from the Japan Society for the Promotion of Science (JSPS), and the MEXT Program for Promoting Researches on the Supercomputer Fugaku (No. hp210264).

References

A. Krizhevsky, I. Sutskever, and G. E. Hinton, 'ImageNet classification with deep convolutional neural networks,' Communications of the ACM , vol. 60, pp. 84-90, 2012.

G. Csurka, 'Domain adaptation for visual applications: A comprehensive survey,' arXiv , vol. abs/1702.05374, 2017.

S. Ruder, M. E. Peters, S. Swayamdipta, and T. Wolf, 'Transfer learning in natural language processing,' Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials , pp. 15-18, 2019.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, 'Bert: Pre-training of deep bidirectional transformers for language understanding,' arXiv , vol. abs/1810.04805, 2019.

R. K. Sevakula, V. Singh, N. K. Verma, C. Kumar, and Y. Cui, 'Transfer learning for molecular cancer classification using deep neural networks,' IEEE/ACM Transactions on Computational Biology and Bioinformatics , vol. 16, pp. 2089-2100, 2019.

H. Yamada, C. Liu, S. Wu, Y. Koyama, S. Ju, J. Shiomi, J. Morikawa, and R. Yoshida, 'Predicting materials properties with little data using shotgun transfer learning,' ACS Central Science , vol. 5, pp. 1717-1730, 2019.

S. Wu, Y. Kondo, M. Kakimoto, B. Yang, H. Yamada, I. Kuwajima, G. Lambard, K. Hongo, Y. Xu, J. Shiomi, et al. , 'Machine-learning-assisted discovery of polymers with high thermal conductivity using a molecular design algorithm,' npj Computational Materials , vol. 5, no. 1, pp. 1-11, 2019.

S. Ju, R. Yoshida, C. Liu, K. Hongo, T. Tadano, and J. Shiomi, 'Exploring diamond-like lattice thermal conductivity crystals via feature-based transfer learning,' Physical Review Materials , vol. 5, no. 5, p. 053801, 2021.

J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, 'How transferable are features in deep neural networks?,' Advances in Neural Information Processing Systems , vol. 27, 2014.

I. Kuzborskij and F. Orabona, 'Stability and hypothesis transfer learning,' International Conference on Machine Learning , pp. 942-950, 2013.

I. Kuzborskij and F. Orabona, 'Fast rates by transferring from auxiliary hypotheses,' Machine Learning , vol. 106, no. 2, pp. 171-195, 2017.

S. S. Du, J. Koushik, A. Singh, and B. Póczos, 'Hypothesis transfer learning via transformation functions,' Advances in Neural Information Processing Systems , vol. 30, 2017.

S. Minami, S. Liu, S. Wu, K. Fukumizu, and R. Yoshida, 'A general class of transfer learning regression without implementation cost,' Proceedings of AAAI Conference on Artificial Intelligence , vol. 35, pp. 8992-8999, 2021.

S. Liu and K. Fukumizu, 'Estimating posterior ratio for classification: Transfer learning from probabilistic perspective,' Proceedings of the 2016 SIAM International Conference on Data Mining , pp. 747-755, 2016.

N. Tripuraneni, M. Jordan, and C. Jin, 'On the theory of transfer learning: The importance of task diversity,' Advances in Neural Information Processing Systems , vol. 33, pp. 7852-7862, 2020.

L. Dinh, D. Krueger, and Y. Bengio, 'Nice: Non-linear independent components estimation,' arXiv , vol. abs/1410.8516, 2014.

L. Dinh, J. N. Sohl-Dickstein, and S. Bengio, 'Density estimation using real nvp,' International Conference on Learning Representations , 2017.

T. Teshima, I. Ishikawa, K. Tojo, K. Oono, M. Ikeda, and M. Sugiyama, 'Coupling-based invertible neural networks are universal diffeomorphism approximators,' Advances in Neural Information Processing Systems , vol. 33, pp. 3362-3373, 2020.

H. Zhou, L. Li, and H. Zhu, 'Tensor regression with applications in neuroimaging data analysis,' Journal of the American Statistical Association , vol. 108, no. 502, pp. 540-552, 2013.

P. L. Bartlett, O. Bousquet, and S. Mendelson, 'Local Rademacher complexities,' Annals of Statistics , vol. 33, pp. 1497-1537, 2005.

I. Steinwart and A. Christmann, Support vector machines . Springer science & business media, 2008.

I. Steinwart, D. R. Hush, and C. Scovel, 'Optimal rates for regularized least squares regression,' Proceedings of the 22nd Annual Conference on Learning Theory , pp. 79-93, 2009.

C. K. Williams and C. E. Rasmussen, Gaussian processes for machine learning , vol. 2. MIT press Cambridge, MA, 2006.

A. Singh, M. D'Arcy, A. Cohan, D. Downey, and S. Feldman, 'SciRepEval: A multi-format benchmark for scientific document representations,' ArXiv , vol. abs/2211.13308, 2022.

C. Finn, P. Abbeel, and S. Levine, 'Model-agnostic meta-learning for fast adaptation of deep networks,' International Conference on Machine Learning , 2017.

L. Xuhong, Y. Grandvalet, and F. Davoine, 'Explicit inductive bias for transfer learning with convolutional networks,' International Conference on Machine Learning , pp. 2825-2834, 2018.

S. Myung, I. Huh, W. Jang, J. M. Choe, J. Ryu, D. Kim, K.-E. Kim, and C. Jeong, 'PAC-Net: A model pruning approach to inductive transfer learning,' International Conference on Machine Learning , pp. 16240-16252, 2022.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, 'BERT: Pre-training of deep bidirectional transformers for language understanding,' arXiv preprint arXiv:1810.04805 , 2018.

I. Beltagy, K. Lo, and A. Cohan, 'SciBERT: A pretrained language model for scientific text,' in Conference on Empirical Methods in Natural Language Processing , 2019.

C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y. Zhou, W. Li, and P. J. Liu, 'Exploring the limits of transfer learning with a unified text-to-text transformer,' Journal of Machine Learning Research , vol. 21, no. 140, pp. 1-67, 2020.

T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, et al. , 'Language models are few-shot learners,' Advances in neural information processing systems , vol. 33, pp. 1877-1901, 2020.

R. Vershynin, High-dimensional probability: An introduction with applications in data science , vol. 47. Cambridge university press, 2018.

S. Wu, G. Lambard, C. Liu, H. Yamada, and R. Yoshida, 'iQSPR in XenonPy: A Bayesian molecular design algorithm,' Molecular Informatics , vol. 39, no. 1-2, p. 1900107, 2020.

C. Liu, K. Kitahara, A. Ishikawa, T. Hiroto, A. Singh, E. Fujita, Y . Katsura, Y . Inada, R. Tamura, K. Kimura, and R. Yoshida, 'Quasicrystals predicted and discovered by machine learning,' Phys. Rev. Mater. , vol. 7, p. 093805, 2023.

C. Liu, E. Fujita, Y. Katsura, Y. Inada, A. Ishikawa, R. Tamura, K. Kimura, and R. Yoshida, 'Machine learning to predict quasicrystals from chemical compositions,' Advanced Materials , vol. 33, no. 36, p. 2102507, 2021.

D. P. Kingma and J. Ba, 'Adam: A method for stochastic optimization,' International Conference for Learning Representations , 2015.

J. Wang, R. M. Wolf, J. W. Caldwell, P. A. Kollman, and D. A. Case, 'Development and testing of a general amber force field,' Journal of Computational Chemistry , vol. 25, no. 9, pp. 1157-1174, 2004.

Y. Hayashi, J. Shiomi, J. Morikawa, and R. Yoshida, 'Radonpy: automated physical property calculation using all-atom classical molecular dynamics simulations for polymer informatics,' npj Computational Materials , vol. 8, no. 222, 2022.

S. Otsuka, I. Kuwajima, J. Hosoya, Y. Xu, and M. Yamazaki, 'PoLyInfo: Polymer database for polymeric materials design,' 2011 International Conference on Emerging Intelligent Data and Web Technologies , pp. 22-29, 2011.

M. Kusaba, Y. Hayashi, C. Liu, A. Wakiuchi, and R. Yoshida, 'Representation of materials by kernel mean embedding,' Physical Review B , vol. 108, p. 134107, 2023.

J. Duchi, E. Hazan, and Y. Singer, 'Adaptive subgradient methods for online learning and stochastic optimization.,' Journal of machine learning research , vol. 12, no. 7, 2011.

D. P. Kingma and J. Ba, 'Adam: A method for stochastic optimization,' International Conference for Learning Representations , 2015.

F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, 'Scikit-learn: Machine learning in Python,' Journal of Machine Learning Research , vol. 12, pp. 2825-2830, 2011.

M. Mohri, A. Rostamizadeh, and A. S. Talwalkar, Foundations of Machine Learning . MIT press, 2018.

N. Srebro, K. Sridharan, and A. Tewari, 'Smoothness, low noise and fast rates,' Advances in Neural Information Processing Systems , vol. 23, 2010.

M. Kloft and G. Blanchard, 'The local Rademacher complexity of ℓ p -norm multiple kernel learning,' Advances in Neural Information Processing Systems , vol. 24, 2011.

Supplementary Material

Transfer Learning with Affine Model Transformation

A Other Perspectives on Affine Model Transfer

A.1 Transformation Functions for General Loss Functions

Here we discuss the optimal transformation function for general loss functions.

Let ℓ ( y, y ′ ) ≥ 0 be a convex loss function that returns zero if and only if y = y ′ , and let g ∗ ( x ) be the optimal predictor that minimizes the expectation of ℓ with respect to the distribution p t followed by x and y transformed by ϕ :

The function g that minimizes the expected loss

should be a solution to the Euler-Lagrange equation

Denote the solution of Eq. (S.1) by G ( x ; ϕ f s ) . While G depends on the loss ℓ and distribution p t , we omit those from the argument for notational simplicity. Using this function, the minimizer of the expected loss E x ,y [ ℓ ( g ( x ) , y )] can be expressed as G ( x ; id) , where id represents the identity function.

Here, we consider the following assumption to hold, which generalizes Assumption 2.3 in the main text:

Assumption 2.3(b). For any distribution on the target domain p t ( x , y ) and all x ∈ X , the following relationship holds:

Equivalently, the transformation functions ϕ f s and ψ f s satisfy

Assumption 2.3(b) states that if the optimal predictor G ( x ; ϕ f s ) for the data transformed by ϕ is given to the model transformation function ψ , it is consistent with the overall optimal predictor G ( x ; id) in the target region in terms of the loss function ℓ . We consider all pairs of ψ and ϕ that satisfy this consistency condition.

Here, let us consider the following proposition:

Proposition A.1. Under Assumption 2.1, 2.2 and 2.3(b), ψ -1 f s = ϕ f s .

Proof. The proof is analogous to that of Theorem 2.4 in Section D.1. For any y 0 ∈ Y , let p t ( y | x ) = δ y 0 . Combining this with Eq. (S.1) leads to

Because ℓ ( y, y ′ ) returns the minimum value zero if and only if y = y ′ , we obtain G ( x ; ϕ f s ) = ϕ f s ( y 0 ) . Similarly, we have G ( x ; id) = y 0 . From these two facts and Assumption 2.3(b), we have ψ f s ( ϕ f s ( y 0 )) = y 0 , proving that the proposition is true.

Proposition A.1 indicates that the first statement of Theorem 2.4 holds for general loss functions. However, the second claim of Theorem 2.4 generally depends on the type of loss function. Through the following examples, we describe the optimal class of transformation functions for several loss functions.

Example 1 (Squared loss) . Let ℓ ( y, y ′ ) = | y -y ′ | 2 . As a solution of Eq. (S.1), we can see that the optimal predictor is the conditional expectation E p t [ ϕ f s ( Y ) | X = x ] . As discussed in Section 2.1, the transformation functions ϕ f s and ψ f s should be affine transformations.

Example 2 (Absolute loss) . Let ℓ ( y, y ′ ) = | y -y ′ | . Substituting this into Eq. (S.1), we have

Assuming that ϕ f s is monotonically increasing, we have

This yields

The same result is obtained even if ϕ f s is monotonically decreasing. Consequently,

which results in

This implies that Eq. (S.2) holds for any ϕ f s including an affine transformation, and the function form cannot be identified. from this analysis.

Example 3 (Exponential-squared loss) . As an example where the affine transformation is not optimal, consider the loss function ℓ ( y, y ′ ) = | e y -e y ′ | 2 . Substituting this into Eq. (S.1), we have

Therefore,

Consequently, Eq. (S.2) becomes

Even if ϕ f s is an affine transformation, this equation does not generally hold.

A.2 Analysis of the Optimal Function Class Based on the Upper Bound of the Estimation Error

Here, we discuss the optimal class for the transformation function based on the upper bound of the estimation error.

In addition to Assumptions 2.1 and 2.2, we assume the following in place of Assumption 2.3:

Assumption A.2. The transformation functions ϕ and ψ are Lipschitz continuous with respect to the first argument, i.e., there exist constants µ ϕ and µ ψ such that,

for any a, a ′ ∈ Y and b, b ′ ∈ R with any given c ∈ F s .

Note that each Lipschitz constant is a function of the second argument f s , i.e., µ ϕ = µ ϕ ( f s ) and µ ψ = µ ψ ( f s ) .

Under Assumptions 2.1, 2.2 and A.2, the estimation error is upper bounded as follows:

The derivation of this inequality is based on [12]. We use the Lipschitz property of ψ and ϕ for the first and third inequalities, and the second inequality comes from the inequality ( a -d ) 2 ≤ 3( a -b ) 2 +3( b -c ) 2 +3( c -d ) 2 for a, b, c, d ∈ R .

According to this inequality, the upper bound of the estimation error is decomposed into three terms: the discrepancy between the two transformation functions, the variance of the noise, and the estimation error for the transformed data. Although it is intractable to find the optimal solution of ϕ, ψ , ˆ g that minimizes all these terms together, it is possible to find a solution that minimizes the first and second terms expressed as the functions of ϕ and ψ only. Obviously, the first term, which represents the discrepancy between the two transformation functions, reaches its minimum (zero) when ϕ f s = ψ -1 f s . The second term, which is related to the variance of the noise, is minimized when the differential coefficient ∂ ∂u ψ f s ( u ) is a constant, i.e., when ψ f s is a linear function. This is verified as follows. From ϕ f s = ψ -1 f s and the continuity of ψ f s , it follows that

and thus the product µ ϕ µ ψ takes the minimum value (one) when the maximum and minimum of the differential coefficient are the same. Therefore, we can write

where g 1 , g 2 : F s → R are arbitrarily functions. Thus, the minimization of the third term in the upper bound of the estimation error can be expressed as

As a result, the suboptimal function class for the upper bound of the estimated function is given as

This is the same function class derived in Section 2.1.

(a) Direct learning

(b) Feature extraction

(c) HTL-offset

(d) Affine model transfer

B Additional Experiments

B.1 Eigenvalue Decay of the Hadamard Product of Two Gram Matrices

We experimentally investigated how the decay rate s 2 in Theorem 4.4 is related to the overlap degree in the spaces spanned by the original input x and source features f s .

For the original input x ∈ R 100 , we randomly constructed a set of 10 orthonormal bases, and then generated 100 samples from their spanning space. For the source features f s ∈ R 100 , we selected d bases randomly from the 10 orthonormal bases selected for x and the remaining 10 -d bases from their orthogonal complement space. We then generated 100 samples of f s from the space spanned by these 10 bases. The overlap number d can be regarded as the degree of overlap of two spaces spanned by the samples of x and f s . We generated the 100 different sample sets of x and f s .

We calculated the Hadamard product of the Gram matrices K 2 and K 3 using the samples of x and f s , respectively. For the computation of K 2 and K 3 , all combinations of the following five kernels were tested:

where K ν ( · ) is a modified Bessel function and Γ( · ) is the gamma function. Note that for ν = ∞ , the Matérn kernel is equivalent to the Gaussian RBF kernel. The scale parameter γ of both kernels was set to γ = √ dim( x ) = √ 10 . For a given matrix K , the decay rate of the eigenvalues was estimated as the smallest value of s that satisfies λ i ≤ ∥ K ∥ 2 F · i -1 s where ∥ · ∥ F denotes the Frobenius norm. Note that this inequality holds for any matrices K with s = 1 [32].

Figure S.2 shows the change of the decay rates with respect to varying d for various combinations of the kernels. In all cases, the decay rate of K 2 ◦ K 3 showed a clear trend of monotonically decreasing as the degree of overlap d increases. In other words, the greater the overlap between the spaces spanned by x and f s , the smaller the decay rate, and the smaller the complexity of the RKHS H 2 ⊗H 3 .

B.2 Lattice Thermal Conductivity of Inorganic Crystals

Here, we describe the relationship between the qualitative differences in source features and the learning behavior of the affine model transfer, in contrast to ordinary feature extraction using neural networks.

0

2

4

6

8

10

0.52

0.54

0.56

0.58

0.60

0.62

Linear

Linear

0

2

4

6

8

10

0.55

0.60

0.65

0.70

0.75

0.80

Mat´ ern-1/2

0

2

4

6

8

10

0.55

0.60

0.65

0.70

Mat´ ern-3/2

0

2

4

6

8

10

0.55

0.60

0.65

0.70

Mat´ ern-5/2

0

2

4

6

8

10

0.525

0.550

0.575

0.600

0.625

0.650

0.675

0

2

4

6

8

10

0.55

0.60

0.65

0.70

0.75

0.80

Mat´ ern-1/2

0

2

4

6

8

10

0.78

0.80

0.82

0.84

0.86

0.88

0.90

0

2

4

6

8

10

0.70

0.75

0.80

0.85

0

2

4

6

8

10

0.65

0.70

0.75

0.80

0.85

0

2

4

6

8

10

0.60

0.65

0.70

0.75

0.80

0.85

0

2

4

6

8

10

0.55

0.60

0.65

0.70

Mat´ ern-3/2

0

2

4

6

8

10

0.70

0.75

0.80

0.85

0

2

4

6

8

10

0.675

0.700

0.725

0.750

0.775

0.800

0.825

0

2

4

6

8

10

0.65

0.70

0.75

0.80

0

2

4

6

8

10

0.60

0.65

0.70

0.75

0.80

0

2

4

6

8

10

0.55

0.60

0.65

0.70

Mat´ ern-5/2

0

2

4

6

8

10

0.65

0.70

0.75

0.80

0.85

0

2

4

6

8

10

0.65

0.70

0.75

0.80

0

2

4

6

8

10

0.650

0.675

0.700

0.725

0.750

0.775

0.800

0

2

4

6

8

10

0.60

0.65

0.70

0.75

0.525

0.550

0.575

0.600

0.625

0.650

0.675

0.60

0.65

0.70

0.75

0.80

0.85

0.60

0.65

0.70

0.75

0.80

0.60

0.65

0.70

0.75

0.600

0.625

0.650

0.675

0.700

0.725

0.750

Kernel function for

k

2

Kernel function for

k

3

0

2

4

6

8

10

0

2

4

6

8

10

0

2

4

6

8

10

0

2

4

6

8

10

0

2

4

6

8

10

The target task is to predict the lattice thermal conductivity (LTC) of inorganic crystalline materials, where the LTC is the amount of vibrational energy propagated by phonons in a crystal. In general, LTC can be calculated ab initio by performing many-body electronic structure calculations based on quantum mechanics. However, it is quite time-consuming to perform the first-principles calculations for thousands of crystals, which will be used as a training sample set to create a surrogate statistical model. Therefore, we perform TL with the source task of predicting an alternative, computationally tractable physical property called scattering phase space (SPS), which is known to be physically related to LTC.

B.2.1 Data

We used the dataset from [8] that records SPS and LTC for 320 and 45 inorganic compounds, respectively. The input compounds were translated to 290 -dimensional compositional descriptors using XenonPy [6, 33, 34, 35] 1 .

B.2.2 Model Definition and Hyperparameter Search

Fully connected neural networks were used for both the source and target models, with a LeakyReLU activation function with α = 0 . 01 . The model training was conducted using the Adam optimizer [36]. Hyperparameters such as the width of the hidden layer, learning rate, number of epochs, and regularization parameters were adjusted with 5-fold cross-validation. For more details on the experimental conditions and procedure, refer to the provided Python code.

Source Model For the preliminary step, neural networks with three hidden layers that predict SPS were trained using 80% of the 320 samples. 100 models with different numbers of neurons were randomly generated and the top 10 source models that showed the highest generalization performance in the source domain were selected. The hidden layer width L was randomly chosen from the range [50 , 100] , and we trained a neural network with a structure of (input)L -L -L -1. Each of the three hidden layers of the source model was used as an input to the transfer models, and we examined the difference in prediction performance for the three layers.

Target Model In the target task, an intermediate layer of a source model was used as the feature extractor. A model was trained using 40 randomly chosen samples of LTC, and its performance was evaluated with the remaining 5 samples. For each of the 10 source models, we performed the

1st layer

2nd layer

3rd layer

Extracted layer

25

30

35

40

45

50

Root mean squared error (W/mK)

Feature extractor

Without transfer

Fine-tuning

training and testing 10 times with different sample partitions and compared the mean values of RMSE among four different methods: (i) the affine model transfer using neural networks to model the three functions g 1 , g 2 and g 3 , (ii) a neural network using the XenonPy compositional descriptors as input without transfer, (iii) a neural network using the source features as input, and (iv) fine-tuning of the pre-trained neural networks. The width of the layers of each neural network, the number of training epochs, and the dropout rate were optimized during 5-fold cross-validation looped within each training set. For the affine model transfer, the functions g 1 , g 2 , and g 3 were modeled by neural networks. We used neural networks with one hidden layer for g 1 , g 2 and g 3 .

B.2.3 Results

Figure S.3 shows the change in prediction performance of TL models using source features obtained from different intermediate layers from the first to the third layers. The affine transfer model and the ordinary feature extractor showed opposite patterns. The performance of the feature extractor improved when the first intermediate layer closest to the input layer was used as the source features and gradually degraded when layers closer to the output were used. When the third intermediate layer was used, a negative transfer occurred in the feature extractor as its performance became worse than that of the direct learning. In contrast, the affine transfer model performs better as the second and third intermediate layers closer to the output were used. The affine transfer model using the third intermediate layer reached a level of accuracy slightly better than fine-tuning, which intuitively uses more information to transfer than the extracted features.

In general, the features encoded in an intermediate layer of a neural network are more task-independent as the layer is closer to the input, and the features are more task-specific as the layer is closer to the output [9]. Because the first layer does not differ much from the original input, using both x and f s in the affine model transfer does not contribute much to performance improvement. However, when using the second and third layers as the feature extractors, the use of both x and f s contributes to improving the expressive power of the model, because the feature extractors have acquired different representational capabilities from the original input. In contrast, a model based only on f s from a source task-specific feature extractor could not account for data in the target domain, so its performance would become worse than direct learning without transfer, i.e., a negative transfer would occur.

B.3 Heat Capacity of Organic Polymers

We highlight the benefits of separately modeling and estimating domain-specific factors through a case study in polymer chemistry. The objective is to predict the specific heat capacity at constant pressure C P of any given organic polymer with its chemical structure in the polymer's repeating unit. Specifically, we conduct TL to bridge the gap between experimental values and physical properties calculated from molecular dynamics (MD) simulations.

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

Experimentally-observed heat capacity (log J/kg

K)

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

MD-calculated heat capacity (log J/kg

·

K)

Correlation : 0.7788

·

As shown in Figure S.4, there was a large systematic bias between experimental and calculated values; the MD-calculated properties C MD P exhibited an evident overestimation with respect to their experimental values. As discussed in [38], this bias is inevitable because classical MD calculations do not reflect the presence of quantum effects in the real system. According to Einstein's theory for the specific heat in physical chemistry, the logarithmic ratio between C exp P and C MD P can be calibrated by the following equation:

where k B is the Boltzmann constant, ℏ is the Planck constant, ω is the frequency of molecular vibrations, and T is the temperature. The bias is a monotonically decreasing function of frequency ω , which is described as a black-box function of polymers with their molecular features. Hereafter, we consider the calibration of this systematic bias using the affine transfer model.

B.3.1 Data

Experimental values of the specific heat capacity of the 70 polymers were collected from PoLyInfo [39]. The MD simulation was also applied to calculate their heat capacities. For models to predict the log-transformed heat capacity, a given polymer with its chemical structure was translated into the 190-dimensional force field descriptors, using RadonPy [38] 2 .

The force field descriptor represents the distribution of the ten different force field parameters ( t ∈ T = { mass , σ, ϵ, charge , r 0 , K bond , polar , θ 0 , K angle , K dih } that make up the empirical potential (i.e., the General AMBER force field [37] version 2 (GAFF2)) of the classical MD simulation. The

detailed descriptions for each parameter are listed in Table S.1. For each t , pre-defined values are assigned to their constituent elements in a polymer, such as individual atoms (mass, charge, σ , and ϵ ), bonds ( r 0 , K bond , and polar), angles ( θ 0 and K angle ), or dihedral angles ( K dih ), respectively. The probability density function of the assigned values of t is then estimated and discretized into 10 points corresponding to 10 different element species such as hydrogen and carbon for mass, and 20 equally spaced grid points for the other parameters. The details of the descriptor calculations are described in [40].

The source feature f s was given as the log-transformed value of C MD P . Therefore, f s is no longer a function of x ; this modeling was intended for calibrating the MD-calculated properties.

We randomly sampled 60 training polymers and tested the prediction performance of a trained model on the remaining 10 polymers 20 times. The PoLyInfo sample identifiers for the selected polymers are listed in the code.

B.3.2 Model Definition and Hyperparameter Search

As described above, the 190-dimensional force field descriptor consists of ten blocks corresponding to different types of features. The J t features that make up block t represent discretized values of the density function of the force field parameters assigned to the atoms, bonds, or dihedral angles that constitute the given polymer. Therefore, the regression coefficients of the features within a block should be estimated smoothly. To this end, we imposed fused regularization on the parameters as

where T = { mass , charge , ϵ, σ, K bond , r 0 , K angle , θ, K dih } , and J t = 10 for t = mass and J t = 20 otherwise. The regression coefficient γ t,j corresponds to the j -th feature of block t .

Ordinary Linear Regression The experimental heat capacity y = log C exp P was regressed on the MD-calculated property, without regularization, as ˆ y = α 0 + α 1 f s where ˆ y denotes the conditional expectation and f s = log C MD P .

Learning the Log-Difference We calculated the log-difference log C exp P -log C MD P and trained the linear model with the ridge penalty. The hyperparameters λ 1 and λ 2 for the scale- and smoothnessregularizers were determined based on 5-fold cross validation across 25 equally space grids in the interval [10 -2 , 10 2 ] for λ 1 and across the set { 50 , 100 , 150 } for λ 2 .

Affine Transfer The log-transformed value of C exp p is modeled as

where ϵ σ represents observation noise, and α 0 , α 1 , β and γ are unknown parameters to be estimated. When α 1 = 1 and β = 0 , Eq. (S.4) is consistent with the theoretical equation in Eq. (S.3) in which the quantum effect is linearly modeled as α 0 + x ⊤ γ .

-

±

In the model training, the objective function was given as follows:

where α = [ α 0 α 1 ] ⊤ . With a fixed λ β = 1 , the remaining hyperparameters λ γ, 1 and λ γ, 2 were optimized through 5-fold cross validation over 25 equally space grids in the interval [10 -2 , 10 2 ] for λ γ, 1 and across the set { 50 , 100 , 150 } for λ γ, 2 .

The algorithm to estimate the parameters α , β and γ is described in Algorithm S.1, where α 0 , olr and α 1 , olr are the estimated parameters of the ordinary linear regression model, and ˆ γ diff is the estimated parameter of the log-difference model. For each step, the full conditional minimization of F α ,β, γ with respect to each parameter can be made analytically as

where X denote the matrix in which the i -th row is x i , y = [ y 1 · · · y n ] ⊤ , f s , 1: n = [ f s, 1 · · · f s,n ] ⊤ , F s = [ f s , 1: n 1 ] , and d = 190 . Λ is a matrix including the two regularization parameters λ γ , 1 and λ γ , 2 as

where m ∈ { 10 , 30 , 50 , 70 , 90 , 110 , 130 , 150 , 170 } . Note that the matrix M is the same as the matrix [ 0 I 189 ] -[ I 189 0 ] except that the m -th row is all zeros. Note also that M ∈ R 189 × 190 , and therefore D ∈ R 279 × 190 and Λ ∈ R 190 × 190 .

The stopping criterion of the algorithm was set as

where θ i denotes the i -th element of the parameter θ . This convergence criterion is employed in several existing machine learning libraries, e.g., scikit-learn 3 .

B.3.3 Results

Table S.2 summarizes the prediction performance (RMSE) of the three models. The ordinary linear model y = α 0 + α 1 f s + ϵ σ , which ignores the force field descriptors, exhibited the lowest prediction

mass H

mass C

mass N

mass O

mass F

mass P

mass S

mass Cl

mass Br

mass I

charge 0

charge 1

charge 2

charge 3

charge 4

charge 5

charge 6

charge 7

charge 8

charge 9

charge 10

charge 11

charge 12

charge 13

charge 14

charge 15

charge 16

charge 17

charge 18

charge 19

epsilon 0

epsilon 1

epsilon 2

epsilon 3

epsilon 4

epsilon 5

epsilon 6

epsilon 7

epsilon 8

epsilon 9

epsilon 10

epsilon 11

epsilon 12

epsilon 13

epsilon 14

epsilon 15

epsilon 16

epsilon 17

epsilon 18

epsilon 19

sigma 0

sigma 1

sigma 2

sigma 3

sigma 4

sigma 5

sigma 6

sigma 7

sigma 8

sigma 9

sigma 10

sigma 11

sigma 12

sigma 13

sigma 14

sigma 15

sigma 16

sigma 17

sigma 18

sigma 19

k bond 0

k bond 1

k bond 2

k bond 3

k bond 4

k bond 5

k bond 6

k bond 7

k bond 8

k bond 9

k bond 10

k bond 11

k bond 12

k bond 13

k bond 14

k bond 15

k bond 16

k bond 17

k bond 18

k bond 19

r0 0

r0 1

r0 2

r0 3

r0 4

r0 5

r0 6

r0 7

r0 8

r0 9

r0 10

r0 11

r0 12

r0 13

r0 14

r0 15

r0 16

r0 17

r0 18

r0 19

polar 0

polar 1

polar 2

polar 3

polar 4

polar 5

polar 6

polar 7

polar 8

polar 9

polar 10

polar 11

polar 12

polar 13

polar 14

polar 15

polar 16

polar 17

polar 18

polar 19

k angle 0

k angle 1

k angle 2

k angle 3

k angle 5

k angle 6

k angle 7

k angle 8

k angle 9

k angle 10

k angle 12

k angle 14

k angle 15

k angle 16

k angle 17

theta0 0

theta0 1

theta0 2

theta0 3

theta0 4

theta0 5

theta0 6

theta0 7

theta0 8

theta0 9

theta0 10

theta0 11

theta0 12

theta0 13

theta0 14

theta0 15

theta0 16

theta0 17

theta0 18

theta0 19

-

0.003

-

0.002

-

0.001

0.000

0.001

0.002

0.003

Value

mass

charge

/epsilon1

σ

K

bond

r

0

polar

K

angle

θ

0

K

dih

performance. The other two calibration models y = f s + x ⊤ γ + ϵ σ and the full model in Eq. (S.4) reached almost the same accuracy, but the latter had achieved slightly better prediction accuracy. The estimated parameters of the full model were α 1 ≈ 0 . 889 and β ≈ -0 . 004 . The model form is highly consistent with the theoretical equation in Eq. (S.3) as well as the restricted model ( α 1 = 1 , β = 0 ). This supports the validity of the theoretical model in [38].

It is expected that physicochemical insights can be obtained by examining the estimated coefficient γ , which would capture the contribution of the force field parameters to the quantum effects. The magnitude of the quantum effect is a monotonically increasing function of the frequency ω , and is known to be highly related to the descriptors ϵ , K dih , K bond, K angle and mass. According to physicochemical intuition, it is considered that as ϵ , K bond, K angle, and K dih decrease, their potential energy surface becomes shallow, which leads to the decrease of ω , and in turn the decrease of quantum effects. Furthermore, because the molecular vibration of light-weight atoms is faster than that of heavy atoms, ω and quantum effects should theoretically increase with decreasing mass.

Figure S.5 shows the mean values of the estimated parameter γ for the full calibration model. The physical relationships described above can be captured consistently with the estimated coefficients. The coefficients in lower regions of ϵ , K bond, K angle and K dih showed large negative values, indicating that polymers containing more atoms, bonds, angles, and dihedral angles with lower values will have smaller quantum effects. Conversely, the coefficients in lower regions of mass showed positive large values, meaning that polymers containing more atoms with smaller masses will have larger quantum effects. As illustrated in this example, separate inclusion of the domain-common and domain-specific factors in the affine transfer model enables us to infer the features relevant to the cross-domain differences.

C Experimental Details

Instructions for obtaining the datasets used in the experiments are described in the code.

C.1 Kinematics of the Robot Arm

C.1.1 Data

We used the SARCOS dataset in [23]. The task is to predict the feed-forward torque required to follow the desired trajectory in the seven joints of the SARCOS anthropomorphic robot arm. The twenty one features representing the joints' position, velocity, and acceleration were used as x . The observed values of six torques other than the torque at the joint in the target domain were given to the source features f s . The dataset includes 44,484 training samples and 4,449 test samples. We selected { 5 , 10 , 15 , 20 , 30 , 40 , 50 } samples randomly from the training set. The prediction performances of the trained models were evaluated using the 4,449 test samples. Repeated experiments were conducted 20 times with different independently sampled datasets.

C.1.2 Model Definition and Hyperparameter Search

Source model For each target task, a multi-task neural network was trained to predict the torque values of the remaining six source tasks. The source model shares four layers (256-128-64-32) up to the final layer, and only the output layer is task-specific. We used all training data and Adagrad [41] with learning rate of 0 . 01 .

Algorithm S.2 Block relaxation algorithm for AffineTL-full .

until convergence

Direct, Only source, Augmented, HTL-offset, HTL-scale For each procedure, we used kernel ridge regression with the RBF kernel k ( x , x ′ ) = exp( -1 2 ℓ 2 ∥ x -x ′ ∥ 2 2 ) . The scale parameter ℓ was set to the square root of the input dimension as ℓ = √ 21 for Direct , HTL-offset and HTL-scale , ℓ = √ 6 for Only source and ℓ = √ 27 for Augmented . The regularization parameter λ was selected in 5-fold cross-validation in which the grid search was performed over 50 grid points in the interval [10 -4 , 10 2 ] .

AffineTL-full, AffineTL-const We considered the following kernels:

for g 1 , g 2 and g 3 in the affine transfer model, respectively.

Hyperparameters to be optimized are the three regularization parameters λ 1 , λ 2 and λ 3 . We performed 5-fold cross-validation to identify the best hyperparameter set from the candidate points; { 10 -3 , 10 -2 , 10 -1 , 1 } for λ 1 and { 10 -2 , 10 -1 , 1 , 10 } for each of λ 2 and λ 3 .

To learn the AffineTL-full and AffineTL-const , we used the following objective functions:

Algorithm S.2 summarizes the block relaxation algorithm for AffineTL-full . For AffineTL-const , we found the optimal parameters as follows:

The stopping criterion for the algorithm was the same as Eq. (S.5).

Fine-tuning The target network was constructed by adding a one-dimensional output layer to the shared layers of the source network. As initial values for the training, we used the weights of the source neural network for the shared layer and the average of the multidimensional output layer of the source network for the output layer. Adagrad [41] was used for the optimization. The learning rate was fixed at 0 . 01 and the number of training epochs was selected from { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 20 , 50 , 100 } through 5-fold cross-validation.

MAML Afully connected neural network with 256-64-32-16-1 layer width was used, and the initial values were searched through MAML [25] using the six source tasks. The obtained base model was fine-tuned with the target samples. Adam [42] with a fixed learning rate of 0 . 01 was used for the optimization. The number of training epochs was selected from { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 20 , 50 , 100 } through 5-fold cross-validation.

L 2 -SP L 2 -SP is a regularization method proposed by [26] in which the following regularization term is added so that the weights of the target network are estimated in the neighborhood of the weights of the source network:

where w and w s are the weights of the target and source model, respectively, and λ > 0 is a hyperparameter. We used the weights of the source network as the initial point for the training of the target model, and added a regularization parameter as in Eq. (S.6). Adagrad [41] were used for the optimizer, and the regularization parameters and learning rate were fixed at 0 . 01 and 0 . 001 , respectively. The number of training epochs was selected from { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 20 , 50 , 100 } through 5-fold cross-validation.

PAC-Net PAC-Net, proposed in [27], is a TL method that leverages pruning of the weights of the source network. Its training strategy consists of three steps: identifying the important weights in the source model, fine-tuning them using the source samples, and updating the remaining weights using the target samples.

Firstly, we pruned the bottom 10% of weights, based on absolute value, from the pre-trained source network. Following this, the remaining weights were retrained using the stochastic gradient descent (SGD). Finally, the pruned weights were retrained using target samples. For the final training phase, SGD with learning rate 0 . 01 , was employed, and the number of training epochs was selected from { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 20 , 50 , 100 } through 5-fold cross-validation.

±

±

±

±

±

±

±

C.2 Evaluation of Scientific Papers

C.2.1 Data

We used SciRepEval benchmark dataset for scientific documents, proposed in [23]. This dataset comprises abstracts, review scores, and decision statuses of papers submitted to various machine learning conferences. We conducted two primary tasks: predicting the average review score (a regression task) and determining the acceptance or rejection status of each paper (a binary classification task). The original input x , was represented as a two-gram bag-of-words vector derived from the abstract. As for source features f s , we employed text embeddings from the abstracts, which were generated by various pre-trained language models, including BERT [28], SciBERT [29], T5 [30], and GPT-3 [31]. When building the vocabulary for the bag-of-words, we ignore phrases with document frequencies strictly higher than 0.9 or strictly lower than 0.01. Additionally, we eliminated certain stop-words using the default settings in scikit-learn [43]. The sentences containing URLs were removed from the abstracts because accepted papers tend to include GitHub links in their abstracts after acceptance, which may cause leakage of information to the prediction. The models were trained on a dataset comprising 8,166 instances, and their performance were subsequently evaluated on a test dataset of 2,043 instances.

C.2.2 Model Definition and Hyperparamter Search

For both the affine model transfer and feature extraction, we employed neural networks with ReLU activation and dropout layer with 0.1 dropout rate. The parameters were optimized using Adagrad [41] with 0.01 learning rate.

Affine Model Transfer For functions g 1 and g 2 in the affine model transfer, we used a neural network composed of layers with widths 128, 64, 32, and 16, wherein the source features f s were used as inputs. The number of layers of each width was determined based on Bayesian optimization. Sigmoid activation was employed to the output of g 2 in order to facilitate the interpretation of g 3 . For g 3 , we employed a linear model with the input x . To prevent overfitting and promote model simplicity, we applied ℓ 1 regularization to the parameters of g 3 with a regularization parameter of 0.01. The final output of the model was computed as g 1 + g 2 · g 3 . In the case of the binary classification task, we applied sigmoid activation function to this final output.

Feature Extraction As in the affine model transfer, we used a neural network composed of layers with widths 128, 64, 32, and 16, wherein the source features f s were used as inputs. The number of layers of each width was determined based on Bayesian optimization. In the case of the binary classification task, we applied sigmoid activation function to the final output.

D Proofs

D.1 Proof of Theorem 2.4

Proof. According to Assumption 2.3, it holds that for any p t ( y | x ) ,

(i) Let δ y 0 be the Dirac delta function supported on y 0 . Substituting p t ( y | x ) = δ y 0 into Eq. (S.7), we have

Under Assumption 2.3, this implies the property (i).

(ii) For simplicity, we assume the inputs x are fixed and p t ( y | x ) > 0 . Applying the property (i) to Eq. (S.7) yields

We consider a two-component mixture p t ( y | x ) = (1 -ϵ ) q ( y | x ) + ϵh ( y | x ) with a mixing rate ϵ ∈ [0 , 1] , where q and h denote arbitrary probability density functions. Then, we have

Taking the derivative at ϵ = 0 , we have

which yields

For Eq. (S.8) to hold for any q and h , ϕ f s ( y ) -ϕ ′ f s ( E q [ Y | X = x ] ) y must be independent of y . Thus, the function ϕ f s and its inverse ψ f s = ϕ -1 f s are limited to affine transformations with respect to y . Since ϕ depends on y and f s ( x ) , it takes the form ϕ ( y, f s ( x )) = g 1 ( f s ( x )) + g 2 ( f s ( x )) y .

D.2 Proof of Theorem 4.1

To bound the generalization error, we use the empirical and population Rademacher complexity ˆ R S ( F ) and R ( F ) of hypothesis class F , defined as:

where { σ i } n i =1 is a set of Rademacher variables that are independently distributed and each take one of the values in {-1 , +1 } with equal probability, and S denotes a set of samples. The following proof is based on the one of Theorem 11 shown in [11].

Proof of Theorem 4.1. For any hypothesis class F with feature map Φ where ∥ Φ ∥ 2 ≤ 1 , the following inequality holds:

The proof is given, for example, in Theorem 6.12 of [44]. Thus, the empirical Rademacher complexity of ˜ H is bounded as

The first inequality follows from the subadditivity of supremum. The last inequality follows from the fact that ˆ R s ≤ P n ℓ ( y, ⟨ 0 , Φ 1 ⟩ ) + λ α ∥ 0 ∥ 2 ≤ L .

Let C = √ 1 λ α + √ L λ β λ γ , and applying Talagrand's lemma [44] and Jensen's inequality, we obtain

To apply Corollary 3.5 of [20], we should solve the equation

and obtain r ∗ = µ 2 ℓ C 2 n . Thus, for any η > 0 , with probability at least 1 -e -η , there exists a constant C ′ > 0 that satisfies

Note that, for the last inequality, because ˆ R s ≤ P n ℓ ( y, ⟨ α , Φ 1 ⟩ ) + λ α ∥ α ∥ 2 for any α , taking the expectation of both sides yields E ˆ R s ≤ Pℓ ( y, ⟨ α , Φ 1 ⟩ ) + λ α ∥ α ∥ 2 , and this gives E ˆ R s ≤ inf α { Pℓ ( y, ⟨ α , Φ 1 ⟩ ) + λ α ∥ α ∥ 2 } = R s . Consequently, applying Theorem 1 of [45], we have

Here, we use H ≤ ≤

Remark D.1 . As in [11], without the estimation of the parameters α and β , the right-hand side of Eq. (S.9) becomes 1 √ n ( c 1 + c 2 √ ˆ R s ) with some constant c 1 > 0 and c 2 > 0 , and Eq. (S.10) becomes

This yields the solution

where we use the inequality √ x + √ x + y ≤ √ 4 x +2 y . Thus, Eq. (S.11) becomes

Consequently, we have the following result:

This means that even if R s = ˜ O ( n -1 ) , the resulting rate only improves to ˜ O ( n -3 / 4 ) .

D.3 Proof of Theorem 4.4

Recall that loss function ℓ ( · , · ) is assumed to be µ ℓ -Lipschitz for the first argument. In addition, we impose the following assumption.

Assumption D.2. There exists a constant B ≥ 1 such that for every h ∈ H , P ( h -h ∗ ) ≤ BP ( ℓ ( y, h ) -ℓ ( y, h ∗ )) .

Because we consider ℓ ( y, y ′ ) = ( y -y ′ ) 2 in Theorem 4.4, Assumption D.2 holds as stated in [20]. First, we show the following corollary, which is a slight modification of Theorem 5.4 of [20].

Corollary D.3. Let ˆ h be any element of H satisfying P n ℓ ( y, ˆ h ) = inf h ∈H P n ℓ ( y, h ) , and let ˆ h ( m ) be any element of H ( m ) satisfying P n ℓ ( y, ˆ h ( m ) ) = inf h ∈H ( m ) P n ℓ ( y, h ) . Define

where c 1 , c 2 and c 3 are constants depending only on B and µ ℓ . Then, for any η > 0 , with probability at least 1 -5 e -η ,

where ˆ r ∗ is the fixed point of ˆ ψ .

Proof. Define the function ψ as

Because H , H (1) and H (2) are all convex and thus star-shaped around each of its points, Lemma 3.4 of [20] implies that ψ is a sub-root. Also, define the sub-root function ψ m as

Let r ∗ m be the fixed point of ψ m ( r m ) . Now, for r m ≥ ψ m ( r m ) , Corollary 5.3 of [20] and the condition on the loss function imply that, with probability at least 1 -e -η ,

Denote the right-hand side by s m , and define r = max r m and s = max s m . Because s ≥ s m ≥ r m ≥ r ∗ m , we obtain s ≥ ψ m ( s ) according to Lemma 3.2 of [20], and thus,

Therefore, applying Corollary 2.2 of [20] to the class µ ℓ H ( m ) , it follows that with probability at least 1 -e -η ,

This implies that with probability at least 1 -2 e -η ,

where the second inequality follows from r ≥ ψ ( r ) ≥ c 2 η n . Define 2 ( 705 + (11 µ ℓ +27 B ) B n ) = c ′ . According to the triangle inequality in L 2 ( P n ) , it holds that

Again, applying Corollary 2.2 of [20] to µ ℓ H ( m ) as before, but now for r ≥ ψ m ( r ) , it follows that with probability at least 1 -4 e -η , where c 3 = ( √ 2 + √ c ′ ) 2 . Combining this with Lemma A.4 of [20] leads to the following inequality: with probability at least 1 -5 e -x

Letting r = r ∗ and using Lemma 4.3 of [20], we obtain r ∗ ≤ ˆ r ∗ , thus proving the statement.

Under Assumption 4.2, we obtain the following excess risk bound for the proposed model class using Corollary D.3. The proof is based on [20].

Theorem D.4. Let ˆ h be any element of H satisfying P n ℓ ( y, ˆ h ( x )) = inf h ∈H P n ℓ ( y, h ( x )) . Suppose that Assumption 4.2 is satisfied, then there exists a constant c depending only on µ ℓ such that for any η > 0 , with probability at least 1 -5 e -η ,

Theorem D.4 is a multiple-kernel version of Corollary 6.7 of [20], and a data-dependent version of Theorem 2 of [46] which considers the eigenvalues of the Hilbert-Schmidt operators on H and H ( m ) . Theorem D.4 concerns the eigenvalues of the Gram matrices K ( m ) computed from the data.

Proof of Theorem D.4. Define R = max m sup h ∈H ( m ) P n ( y -h ( x )) 2 . For any h ∈ H ( m ) , we obtain

From the symmetry of the σ i and the fact that H ( m ) is convex and symmetric, we obtain the following:

The second inequality comes from the subadditivity of supremum and the third inequality follows from Theorem 6.6 of [20]. To obtain the last inequality, we use √ x + √ y ≤ √ 2( x + y ) . Thus, we have

for some constants c 1 and c 2 . To apply Corollary D.3, we should solve the following inequality for r

For any integers κ m ∈ [0 , n ] , the right-hand side is bounded as

and we obtain the solution r ∗ as

Optimizing the right-hand side with respect to κ 1 and κ 2 , we obtain the solution as

Furthermore, according to Corollary D.3, there exists a constant c such that with probability at least 1 -5 e -η ,

With Theorem D.4 and Assumption 4.3, we prove Theorem D.4 as follows.

Proof of Theorem 4.4. Using the inequality √ x + y ≤ √ x + √ y for x ≥ 0 , y ≥ 0 , we have

Because it holds that

for m = 1 , 2 , we should solve the following minimization problem:

Taking the derivative, we have

Setting this to zero, we find the optimal κ 1 as

Similarly, we have and

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper provides a comprehensive investigation of transfer learning and proposes an affine model transfer framework. The authors summarize various transfer learning approaches under the class of affine model transformation and establish theoretical properties such as generalization error and excess risk.\nIn the experimental evaluation, the proposed methods demonstrate comparable performance to other baseline methods on tasks such as robot arm trajectory prediction and scientific document score prediction.\n\nSTRENGTHS:\nThe paper studies an important topic: the theoretical properties of transfer learning.\n\nThe proposed theoretical framework for affine model transfer and the derived generalization bound provide valuable insights into transfer learning, domain generalization, and model adaptation.\n\nOverall, the paper is well-organized and effectively conveys the intricacies of the proposed theoretical framework.\n\nWEAKNESSES:\nMy main concerns revolve around the experimental evaluation conducted in the paper. The evaluation is narrower in scope compared to most transfer learning studies. It would be beneficial to validate the proposed method on standard transfer learning benchmarks, such as the MIT Indoors dataset, Caltech 256 dataset, or other commonly used regression datasets. This kind of evaluation can be found in references [1,2].\nFurthermore, in the experimental evaluation, the observed improvement is limited. Table 1, specifically in the Torque 7 prediction, shows that the proposed method performs worse than Fine-tuning in most cases.\n\nWhile Theorem 2.4 provides a nice property of transformation functions, the paper lacks a discussion on the specific properties of $g_1, g_2$, and $g_3$ functions. It would be helpful to provide suggestions or insights into the types of $g_1, g_2$, and  $g_3$ functions.\n\n[1] L. Xuhong, et al, “Explicit inductive bias for transfer learning with convolutional networks,” ICML, 2018.    \n[2] S. Myung, et al, “PAC-Net: A model pruning approach to inductive transfer learning,” ICML, 2022.\n\nQUESTIONS:\nI would like to know that why were the experiments not conducted on commonly adopted transfer learning datasets, such as MIT Indoors, Caltech 256, and CelebA? \n\nConsidering that the proposed method performs worse than Fine-tuning in the case of Torque 7 prediction according to table 1, it is important to clarify the advantages of the proposed method over Fine-tuning. What unique benefits or improvements does the proposed method offer in comparison?\n\nAre there any suggestions provided regarding the design of $g_1, g_2$, and  $g_3$ functions, or any specific neural network architectures? Providing guidance on the selection and design of these components would greatly assist readers in implementing the proposed method effectively.\n\nLIMITATIONS:\nSee [Weaknesses] for limitations.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors consider the transfer learning setting by affine models adapting source features to the target domain by separately estimating cross-domain shift and domain-specific factors. They motivate the choice of such models deriving the affine form as an optimal class based on the squared loss for the target task. The authors show that the considered affine model encompasses several existing transfer learning methods, including neural network based transfer learning. The authors provide an estimation algorithm when modeled by kernel methods. The authors provide a generalization bound and an excess risk bound for their method. The bound show that when the source feature is strongly related to the target domain, their transfer learning approach results to be advantageous in comparison to the vanilla learning approach. Such an advantage is confirmed also by numerical experiments, in which the proposed method outperforms widely applied transfer learning methods lacking of theoretical foundation, such as re-using features from pre-trained models. More specifically, they consider two experimental settings: (i) the prediction of feed-forward torque at seven joints of the robot arm, and (ii) the prediction of review scores and decisions of scientific papers. Additionally, two case studies in materials science are presented in the appendix.\n\nSTRENGTHS:\nThe authors consider an interesting problem in a rigorous and formal way.\n\nThe authors provide both theoretical and experimental validation for their method. \n\nThe derivation/motivation of the affine form as an optimal class based on the squared loss for the target task is interesting.\n\nThe affine model transfer is model-agnostic and it can be easily combined with pre-existent models. In addition, since domain specific factors are involved in incorporating the source features, the affine transfer can also deal with domain common and unique factors simultaneously and separately.\n\nOverall, the paper is written in a clear way.\n\nWEAKNESSES:\nConsidering only the squared loss is quite limiting. The authors comment about this, but it would be nice to understand if there is possibility to extend their framework to more general loss functions. For instance, what about the optimality of the class of affine functions with different loss functions? The authors say they can also derive the same optimal function by minimizing the upper bound of the estimation error in the TL procedure, as discussed in the appendix. I guess this could be related to my question.\n\nSome technical aspects could be better explained and intuitively motivated in my opinion, see for instance my comment below.\n\nQUESTIONS:\nThe algorithm the authors propose applies a coordinate descent minimization procedure on the objective function F. Is F jointly convex? Is the algorithm globally convergent? Usually, the study of global convergence for coordinate descent algorithms is problematic.\n\nThe authors require the Lipschitzness of the loss function, but the squared loss is Lipschitz if and only if the labels are bounded and this is quite restrictive.\n\nFrom Thm. 4.1 it seems the authors get an improvement w.r.t. n by transfer learning. This seems to be strange, since, usually, the advantage observed in previous work by transfer learning is by constant factors. Could you please comment about this with reference to the papers 'Stability and hypothesis transfer learning' and 'Fast rates by transferring from auxiliary hypotheses'?\n\nLIMITATIONS:\nI do not see any potential negative societal impact related to this work.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents a simple yet effective approach to transfer learning in regression problems by introducing an affine transform model. The proposed model incorporates the source feature function and the product of the source feature function and the function associated with the target input augmentation. Through the utilization of a least square loss function and a transformation function, this paper establishes the optimality of the affine model as the architecture of choice for addressing transfer learning challenges. Furthermore, the paper extends upon previous research by deriving generalization bounds and excess risk bounds in the proposed framework.\n\nSTRENGTHS:\n1. This paper is impeccably written and exceptionally comprehensible.\n\n2. The proposed method is rigorously derived and its performance is systematically evaluated from a theoretical standpoint.\n\n3. The proposed algorithm can incorporate and generalize previously proposed algorithms while showing better performance.\n\nWEAKNESSES:\n1. The existence of inverse functions appears to be of significance. However, it can be considered a potential limitation as it may not always be feasible to obtain inverse functions in practice.\n\n2. I would suggest that the authors conduct evaluations of the proposed method using widely recognized benchmark datasets. It is particularly crucial to assess the algorithm's performance based on the proximity or disparity between the source and target, in order to ascertain its effectiveness under varying conditions.\n\nQUESTIONS:\n1. Would it not be an overstatement to claim that the proposed algorithm encompasses all existing algorithms? This assertion arises from the fact that weight-based algorithms (such as L2-SP and PAC-NET) are not incorporated into the proposed algorithm.\n\n2. Could we possibly expand the experimentation to include a broader range of experimental datasets?\n\nLIMITATIONS:\nThis reviewer thinks that the algorithm proposed in this paper has limitations that can only be applied to regression problems.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper focuses on the theoretical perspective on the affine model transfer learning. Specifically, this paper presents the optimal class of models on transfer learning with l2 loss takes the form of an affine decoupling. The decoupling consists of three functions, \\$g_1 + g_2g_3\\$, where \\$g_1, g_2\\$ encodes the domain gaps between source and target domains, and \\$g_3\\$ encodes the domain-specific information. Further, for each of the functions, this paper proposes a kernel method to approximate. Additionally, the generalization and risk bounds are presented. \n\n**___________________________________________________ Post Rebuttal __________________________________________________**\n\n\nThe reviewer has read the rebuttal. \n\nIn the rebuttal, parts of the theorems are restricted to \\$ \\mathbb{R} \\$. This may degrade the contribution of the paper since we are handling the high-dimension data for most of the cases.\n\n The reviewer will maintain the score of 7 since there appear to be no technical flaws to the reviewer, and the reviewer gained some insights from the paper. However, the reviewer won't champion the paper, since I am not familiar to the literature.\n\nSTRENGTHS:\n1. This paper presents universal results to the transfer learning on linear regression, which looks interesting to the reviewer. Specifically, it is shown that the optimal solution under l2 loss falls into a certain class of models. And the analysis is not limited to machine learning models.\n2. This paper also presents the generalization and risk bounds, making the analysis more solid. \n2. Empirically, this paper experiments on two datasets with extensive ablation and baselines, making the paper complete and thorough.\n\nWEAKNESSES:\n1. Since the reviewer is not from the area, it is hard for the reviewer to judge the novelty and significance of the work.\n\nQUESTIONS:\n1. All the discussions are limited to the \\$\\mathbb{R}\\$. It remains elusive whether the analysis can be extended to higher dimensional spaces naturally. \n2. What is d in table 1, is it the source domain feature dimension?\n\nLIMITATIONS:\nWhile the paper's analysis is primarily limited to the regression task, it provides valuable insights with a commendable depth of exploration, despite limiting its general applicability. The complexity of a broader analysis would undoubtedly be a challenging undertaking, but the paper sets a strong foundation for future exploration.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-27"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors focus on the hypothesis transfer learning (HTL) problem. They show that under some hypothesis the data and model transformation is given by an affine transformation. They consider an associated kernel regression problem to identify the transformation and then characterise the generalisation bound which reflects the importance of the target-source relation. Finally, the method is benchmarked in 2 settings.\n\nSTRENGTHS:\n* The proposed method allows for the theoretical characterisation of generalisation and excess risk bounds.\n* The method is versatile and can be used in very different settings.\n\nWEAKNESSES:\n* The model is not clear (sec.2.1). Maybe adding a scheme or introducing the linear models as a first example before moving to the general version would help. Given this first setting, the rest flows nicely.\n* I find assumption 2.2 a strong assumption. The authors comment saying that this is common in HTLs. However, it implies no information compression which is hard to believe in many practical contexts. \n* In tables 1 and 2, the improvements are only marginally better than the other methods even if significant according to the authors' test.\n\nMinor comments: \n* assumption 2.2 (Invetribility) is instead (Invertibility)\n* fig.1 is misplaced. \n* proposition A.1 refer to the proof of Th.2.4 in the main paper, but this is instead in the SM sec.D.\n\nQUESTIONS:\n* In the formulation of sec.2.1, it seems that $f_t(x)$ and $f_s(x)$ have the same dimension of $y$, i.e. they both belong to $\\mathbb R$. However, in the examples below $y$ has the same dimension as the scalar product $\\langle \\theta, f_s(x) \\rangle$. Can you clarify?\n\nLIMITATIONS:\nI find assumption 2.2 a limitation. The authors seemed not concerned by this and pointed out that this is standard in the field. However, the intuition is that if the target representation is not included (or equal) to the source representation we shouldn't be able to invert the function.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 1, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-28"}