# A Large Dimensional Analysis of Multi-task Semi-Supervised Learning

Victor Leger, Romain Couillet

<figure><img src="image_1.png" /></figure>

## To cite this version:

Victor Leger, Romain Couillet. A Large Dimensional Analysis of Multi-task Semi-Supervised Learning. 2024. [https://arxiv.org/abs/2405.02868](https://arxiv.org/abs/2405.02868)

HAL Id: hal-05214308

https://inria.hal.science/hal-05214308v1

Preprint submitted on 19 Aug 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A Large Dimensional Analysis of Multi-task Semi-Supervised Learning

Victor Léger, Student member, IEEE, Romain Couillet, Senior member, IEEE

***Abstract***—This article conducts a large dimensional study of a simple yet quite versatile classification model, encompassing at once multi-task and semi-supervised learning, and taking into account uncertain labeling. Using tools from random matrix theory, we characterize the asymptotics of some key functionals, which allows us on the one hand to predict the performances of the algorithm, and on the other hand to reveal some counter-intuitive guidance on how to use it efficiently. The model, powerful enough to provide good performance guarantees, is also straightforward enough to provide strong insights into its behavior.

***Index Terms***—classification, random matrix theory, multi-task learning, semi-supervised learning

## I. INTRODUCTION

If the multiple achievements of deep neural networks (DNNs) in various tasks during the last decade are now a well-known fact, we also know that these achievements have been strongly reliant on increases in computing power [1]. This escalation implies skyrocketing energy requirements, but another fondamental consequence relates to tractability, and even technical accessibility, which are, in the case of DNNs, out of reach to their own designers (let alone to their users).

As an alternative viewpoint, following the notion of *con- viviality of tools* developed by the critical analyst Ivan Illich [2], the present article is part of a renewed endeavour for techniques and tools which simultaneously *answer an effective need* (rather than create a new need), *are tractable and easily apprehensible by their user*, and *are flexible and robust enough not to require constant adaptations and additional scientific complexification*.

That is, through the present article, we aim to open the path to all-encompassing flexible tools for classification problems, buttressed on elementary machine learning notions and rather basic mathematical tools. Specifically, we propose here a classification method that addresses a wide variety of real-life conditions, such as the possibility for only part of the input data to be prelabeled (thereby encompassing supervised, semi- supervised and unsupervised learning at once), the possibility for erroneous or uncertain labels (here considering biases or controversial data labeling), the possibility for strong imbal- ances in prelabeled classes of data (a very classical issue when some key classes are rarely observed), etc. As such, our base model combines what are usually considered as distinct learn- ing frameworks (multi-task learning, semi-supervised learning, uncertain labeling) under a common umbrella.

Specifically, we develop a simple and quite technically accessible method which perfoms linear classification in a

multi-task and semi-supervised framework, in a basic two-class setting (the extension to a multiclass setting is briefly discussed in Section V-A). Considering Gaussian mixtures as data model, we leverage random matrix theory (RMT) to characterize the asymptotics of key functionals, such as the *decision function*, which enables classification by attributing a score to each new sample. In contrast to classical statistics, we consider high dimensional data (i.e., the dimension $p$ and the number of data $n$ are of the same order of magnitude – which is more a fact than an assumption in modern data).

The relative simplicity of our model, along with the strength of RMT, make the proposed method quite powerful as it is in particular able to *predict its own performances*. In a nutshell, our theoretical analysis allows us to:

* Tune the hyperparameters of the model without running the algorithm, therefore avoiding any cross-validation (costly in data and computational resources).

* Choose wisely (and automatically) the values of labels (rather than the standard $±1$ values) to discriminate more efficiently the data, and tackle the problems induced by unbalanced classes.

* Understand better and avoid the classical problem of *negative transfer*.

* Estimate how good the algorithm is in comparison with optimal bounds from information theory.

Both multi-task learning and semi-supervised learning have already been studied with RMT tools, usually separately though. Specifically, [3] provides a theoretical analysis (in a single-task framework) of the graph-based semi-supervised scheme we use in this article [4], [5]. In particular, it re- veals a fundamental flaw of graph-based algorithms, but most importantly, it proposes a simple way to tackle it. Indeed, many algorithms appear to be unable to learn effectively from unlabeled data, even though it is a fundamental aspect of semi- supervised learning [6]–[9].

Meanwhile, [10] provides a similar analysis of a well-known multi-task framework [11], in a fully supervised setting. In particular, it introduces (for the first time, as far as we know) the counter-intuitive idea of choosing the values of labels differently from the standard $±1$. This idea, which is one of the keys to our present algorithm, appears to be an easy and intuitive way to tackle the issue of negative transfer.

The remainder of the article is organized as follows. Section II introduces the assumptions made, the problem formulation and its solution. Section III presents the main theoretical results of the article, upon which our algorithm is built. Section IV extends these results to the case of uncertain labeling. Section V sheds light on some limitations of our
method. Finally, Section VI presents simulations on both synthetic data and real datasets, to validate and further analyse the results of Section III.

In what follows, matrices are represented by bold uppercase letters (i.e., matrix **A**). Vectors are denoted in bold lowercase letters (i.e., vector **v**) and scalars without bold letters (i.e., variable **a**). “tasks” are denoted by an index **t** and the number of tasks will be referred as **T**. Quantities with superscript **t** are belonging to Task **t**. The quantities associated to labeled and unlabeled data are respectively denoted by a subscript **ℓ** and **u**. As such the notations $n_{\ell}^t$ and $n_u^t$ denote respectively the number of labeled and unlabeled data of Task **t**. The subscript **j** is used to specify that a quantity is specific to the Class **j**.

## II. MODEL AND ASSUMPTIONS

We focus from now on the two-class setting, the multi-class setting is briefly discussed in Section V-A. Let $\mathbf{X} \in \mathbb{R}^{p \times n}$ be a collection of $n$ independent data vectors of dimension $p$. The data are divided into $T$ subsets attached to individual “task”. Specifically, letting $\mathbf{X} = [\mathbf{X}^1, \dots, \mathbf{X}^T] \in \mathbb{R}^{p \times n}$, Task **t** is a semi-supervised binary classification task with training samples $\mathbf{X}^t = [\mathbf{X}_{\ell}^t, \mathbf{X}_u^t] \in \mathbb{R}^{p \times n^t}$ which consists of a set of $n_{\ell}^t$ labeled data samples $\mathbf{X}_{\ell}^t = \{\mathbf{x}_i^t\}_{i=1}^{n_{\ell}^t}$ and a set of $n_u^t$ unlabeled data points $\mathbf{X}_u^t = \{\mathbf{x}_i^t\}_{i=n_{\ell}^t+1}^{n_{\ell}^t}$. To each labeled data $\mathbf{x}_i^t$ from Task **t** is attached a label $y_i^t$ and the goal is to predict the labels for the unlabeled data $\mathbf{X}_u^t$. In this paper, we will divide the $T$ tasks in:

* One “target task” which is the one task we actually want to perform.

* $T - 1$ “source tasks” which will help us to perform the “target task”.

In a sense, our setting is close to transfer-learning because we aim to perform a single classification task. However, as the calculus done in the following is true for any choice of target task, we can easily perform sequentially each one of the $T$ tasks with the help of the other, and therefore perform multi-task learning.

### Assumption 0 (On the data distribution)

The columns of the data matrix $\mathbf{X}$ are independent Gaussian random variables. Specifically, the data samples $(\mathbf{x}_1^t, \dots, \mathbf{x}_{n^t}^t)$ from Task **t** are i.i.d. observations such that $\mathbf{x}_i^t \in C_j^t \Leftrightarrow \mathbf{x}_i^t \sim N(\mu_{\ell j}^t, \mathbf{I}_p)$ where $C_j^t$ denotes the Class **j** of Task **t**.

Even though this assumption is intuitive and straightforward, one could argue that it is unrealistic. Indeed, natural data is not Gaussian, and most importantly, requiring independent entries for each observation is very constraining. Concentrated vectors, described for the first time in [12] and integrated in RMT by [13], allow us to relax the previous assumption, while preserving its core idea.

### Assumption 1 (On the data distribution)

The columns of the data matrix $\mathbf{X}$ are independent concentrated vectors with isotropic covariance. Specifically, the data samples $(\mathbf{x}_1^t, \dots, \mathbf{x}_{n^t}^t)$ from Task **t** are i.i.d. observations such that:

There exists $C, c > 0$ such that for any 1-Lipschitz function $\Phi: \mathbb{R}^p \to \mathbb{R}$, we have:

$$ \forall u > 0, \quad \mathbf{x}_i^t \in C_j^t \Rightarrow \mathbb{P}(|\Phi(\mathbf{x}_i^t) - m_j^t(\Phi)| \ge u) \le Ce^{-(\frac{u}{c})^2} $$

where $C_j^t$ denotes the Class **j** of Task **t**, and $m_j^t(\Phi) = \mathbb{E}[\Phi(\mathbf{x})|\mathbf{x} \in C_j^t]$.

Under these assumptions, we can define

$$ \mu_j^t = \mathbb{E}[\mathbf{x}|\mathbf{x} \in C_j^t] $$

$$ \Sigma_j^t = \text{Cov}[\mathbf{x}|\mathbf{x} \in C_j^t] $$

and we further impose that $\forall j, t, \Sigma_j^t = \mathbf{I}_p$.

This second assumption encompasses the first one, and applies to a broader class of distributions. In particular, images produced by Generative Adversarial Networks (GANs) are concentrated vectors [14]. As GANs are known to produce very convincing fake images and text, this assumption allows to consider more realistic datasets. All the theoretical results discussed in the remainder of the article are obtained using Assumption 1. The assumption $\Sigma_j^t = \mathbf{I}_p$ is still restrictive, and should not be seen as an imperious condition for our algorithm to work, but rather as a convenient assumption to perform our statistical analysis. As such, the experiments of Section VI-D shows that the algorithm performs well on concentrated vectors for which the covariance is not necessarily isotropic.

As discussed earlier, we consider a large dimensional setting, where the dimension of the data and the number of data have the same order of magnitude. Moreover, to take into account the potential consequences of class unbalances, our statistical analysis will make use of the proportion of data in each class. To this end, we make the following assumption.

### Assumption 2 (Growth Rate)

As $n \to \infty$,

* $p/n \to c > 0$.

* $n_j^t/n \to \rho_j^t > 0$ ($n_j^t$ the number of data in $C_j^t$).

* $n^t/n \to \rho^t > 0$.

* $n_{\ell j}^t/n_j^t \to \eta_j^t > 0$ ($n_{\ell j}^t$ the number of labeled data in $C_j^t$).

* $n_{\ell j}^t/n^t \to \eta^t > 0$.

Furthermore, we also consider the 2T-dimensional vector $\rho = (\rho_1^1, \rho_2^1, \rho_1^2, \dots, \rho_2^T)^{\mathrm{T}}$, the T-dimensional vector $\bar{\rho} = (\rho_1^1, \dots, \rho^T)^{\mathrm{T}}$, and similarly the vectors $\eta$ and $\bar{\eta}$.

Graph-based approaches, such as the Laplacian regularization method, are widely use to perform semi-supervised learning (in a single-task setting) [4], [15], [16]. The idea consists in propagating the effective information of labeled data to unlabeled data, following the natural assumption that similar data points should have similar labels. This similarity between data points $\mathbf{x}_i$ and $\mathbf{x}_{i'}$ is measured by the quantity $\omega_{ii'} = h(\frac{1}{p}\langle\mathbf{x}_i, \mathbf{x}_{i'}\rangle)$ with $h$ an increasing function ($h(x) = x$ in our case), so that similar data vectors $\mathbf{x}_i$ and $\mathbf{x}_{i'}$ are connected with a large weight. From there, graph-based learning algorithms estimate the class of each node $\mathbf{x}_i$ through a class
attachment “score” $f_i$, by solving the following optimization problem:

$$ \min_{\mathbf{f}} \sum_{i, i'=1}^{n} \omega_{ii'} (f_i - f_{i'})^2 \quad (1) $$
such that $f_i = y_i \quad \forall 1 \le i \le n_\ell$.

The term $f_i = y_i$ is the fitting constraint, which imposes that the score of labeled data should match the initial label assignment. This constraint is sometimes relaxed by adding a term $2\alpha \|\mathbf{f}_\ell - \mathbf{y}_\ell\|^2$ to the minimization problem, with $\alpha > 0$ [5], where $\mathbf{f}_\ell$ and $\mathbf{y}_\ell$ respectively denotes the vectors f and y restricted to labeled data.

Our multi-task semi-supervised algorithm follows the same idea, yet with the addition of a hyperparameter matrix $\mathbf{\Lambda} = \{\Lambda^{tt'}\}_{t,t'=1}^T$ which filters how much each task should be related to each other. The optimisation becomes:

$$ \min_{\mathbf{f}^1, \dots, \mathbf{f}^T} \sum_{t, t'=1}^{T} \Lambda^{tt'} \sum_{i=1}^{n^t} \sum_{i'=1}^{n^{t'}} \omega_{ii'}^{tt'} (f_i^t - f_{i'}^{t'})^2 \quad (2) $$
such that $f_i^t = y_i^t \quad \forall 1 \le i \le n_\ell$ and $1 \le t \le T$.

and the weights $\omega_{ii'}^{tt'}$ are now

$$ \omega_{ii'}^{tt'} = \frac{1}{Tp} \langle \mathbf{x}_i^t, \mathbf{x}_{i'}^{t'} \rangle $$

The classical Laplacian regularization algorithm associated to (1) has been studied in depth in [17] in the single-task setting. There, the authors showed the fundamental importance to “center” the weight matrix $\mathbf{W} = \{\omega_{ii'}\}_{i,i'=1}^n$. This centering approach corrects an important bias in the regularized Laplacian which completely annihilates the use of unlabeled data in a large dimensional setting. A significant performance increase was reported, both in theory and in practice in [3] when this basic, yet counter-intuitive, correction is accounted for. The same phenomenon evidently arises in the multi-task extension and we propose consequently the same task-wise pre-centering in the context of multi-task learning, that is we update the weight matrices $(\mathbf{W}^{tt'})_{t,t'}$ as:

$$ \hat{\mathbf{W}}^{tt'} = \mathbf{P}^t \mathbf{W}^{tt'} \mathbf{P}^{t'} \quad (3) $$

with $\mathbf{P}^t = (\mathbf{I}_{n^t} - \frac{1}{n^t} \mathbf{1}_{n^t} \mathbf{1}_{n^t}^\mathrm{T})$ the centering projector. This is equivalent to replace the data matrix $\mathbf{X}^t$ by its centered version $\tilde{\mathbf{X}}^t = \mathbf{X}^t \mathbf{P}^t$. It is worth to note that the centering is performed undifferently on labeled and unlabeled data, as the whole task is concerned and both classes are centered at once. For a matter of readability, $\mathbf{X}^t$ will denote the centered matrix in the remainder of the article. Similarly, $\mu_j^t$ will denote the centered mean of $\mathbf{x} \in \mathcal{C}_j^t$.

However, the optimization problem described in (2) is non-convex since the entries of the weight matrix $\tilde{\mathbf{W}}$ may take negative values (this must actually be the case as the mean value of the entries of $\tilde{\mathbf{W}}$ is zero). To deal with this problem, we further propose (as in [3]) to constrain the norm of the unlabeled data score vector $\mathbf{f}_u$ (that is, the score vector f restricted to unlabeled data) by appending a regularization term $2\alpha \|\mathbf{f}_u\|^2$ to the previous minimization problem, with

$\alpha > 0$. We also relax the labeling constraint with the regularization term $2\alpha \|\mathbf{f}_\ell - \mathbf{y}_\ell\|^2$ mentioned above. The equation (2) becomes:

$$ \min_{\mathbf{f}^1, \dots, \mathbf{f}^T} \sum_{t, t'=1}^{T} \Lambda^{tt'} \sum_{i=1}^{n^t} \sum_{i'=1}^{n^{t'}} \hat{\omega}_{ii'}^{tt'} (f_i^t - f_{i'}^{t'})^2 \quad (4) \\ + 2\alpha \sum_{t=1}^{T} \left( \sum_{i=1}^{n_\ell} (f_i^t - y_i^t)^2 + \sum_{i=n_\ell^t+1}^{n^t} (f_i^t)^2 \right) $$

This leads, under a more convenient matrix formulation (see detail in Section A of the appendix), to

$$ \min_{\mathbf{f} \in \mathbb{R}^n} -\mathbf{f}^\mathrm{T} \tilde{\mathbf{W}} \mathbf{f} + \alpha \|\mathbf{f}_\ell - \mathbf{y}_\ell\|^2 + \alpha \|\mathbf{f}_u\|^2 \quad (5) $$

with $\tilde{\mathbf{W}}$ the block matrix for which each block is $\tilde{\mathbf{W}}^{tt'} = \Lambda^{tt'} \tilde{\mathbf{W}}^{tt'}$, $\forall (t, t') \in \{1, \dots, T\}^2$. If we further use the convention $\mathbf{y}_u = 0$, the problem has an even simpler formulation:

$$ \min_{\mathbf{f} \in \mathbb{R}^n} \alpha \|\mathbf{f} - \mathbf{y}\|^2 - \mathbf{f}^\mathrm{T} \tilde{\mathbf{W}} \mathbf{f} \quad (6) $$

This problem is now convex for all $\alpha > \|\tilde{\mathbf{W}}\|$. In addition, f is the solution to a quadratic optimization problem with linear equality constraints, and can be obtained explicitly (see detail in Section A of the appendix).

$$ \mathbf{f} = \left( \mathbf{I}_n - \frac{\mathbf{Z}^\mathrm{T} \mathbf{A} \mathbf{Z}}{Tp} \right)^{-1} \mathbf{y} \quad (7) $$

where

$$ \mathbf{A} = \tilde{\mathbf{\Lambda}} \otimes \mathbf{I}_p, \text{ with } \tilde{\mathbf{\Lambda}} = \frac{\mathbf{\Lambda}}{\alpha} \quad \text{the hyperparameter matrix} $$

$$ \mathbf{Z} = \sum_{t=1}^{T} \mathbf{E}_{it}^{[T]} \otimes \mathbf{X}^t \quad \text{the data matrix} $$

If we further use Woodbury matrix identity, we have

$$ \mathbf{f} = \mathbf{y} + \frac{1}{Tp} \mathbf{Z}^\mathrm{T} \mathbf{A}^{\frac{1}{2}} \underbrace{\left( \mathbf{I}_{Tp} - \frac{\mathbf{A}^{\frac{1}{2}} \mathbf{Z} \mathbf{Z}^\mathrm{T} \mathbf{A}^{\frac{1}{2}}}{Tp} \right)^{-1}}_{=\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \mathbf{Z} \mathbf{y} \quad (8) $$

This last solution has the benefit of being explicit and therefore easily tractable. It can be interpreted as being an *a priori* on the scores (the first term), corrected by the data (the second term). As for unlabeled data, there should not be any *a priori*, which justifies the previous choice of $\mathbf{y}_u = 0$. Focusing on the scores of unlabeled data then leads to:

$$ \mathbf{f}_u = \frac{1}{Tp} \mathbf{Z}_u^\mathrm{T} \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{Z}_\ell \mathbf{y}_\ell \quad (9) $$

To reduce the number of parameters and simplify the model, we choose to set as of now the values of $\mathbf{\Lambda}$ as follows:

$$ \Lambda^{tt'} = \frac{\left| \langle \boldsymbol{\mu}_1^t - \boldsymbol{\mu}_2^t, \boldsymbol{\mu}_1^{t'} - \boldsymbol{\mu}_2^{t'} \rangle \right|}{\|\boldsymbol{\mu}_1^t - \boldsymbol{\mu}_2^t\| \|\boldsymbol{\mu}_1^{t'} - \boldsymbol{\mu}_2^{t'}\|} \quad (10) $$

As expected $\Lambda^{tt'}$ increases if the tasks are more correlated. This quantity is intuitively associated to the alignment between tasks and can be consistently estimated. Most importantly, simulations comparing this choice to an optimization of $\mathbf{\Lambda}$ on $[0, 1]^{T \times T}$ suggests that this choice is close to optimal.
### III. MAIN RESULTS

We have an explicit formulation of the score vector $\mathbf{f}_u$ of unlabeled data. This vector sums up all the information we have to perform the classification. In a classical machine learning setting, the score $f$ of a sample $\mathbf{x}$ belonging to $C_1^t$ (resp. $C_2^t$) is expected to be close to $-1$ (resp. $+1$). Therefore, the classification rule is:

$$f < \zeta^t \implies \mathbf{x} \to C_1^t \quad (11)$$

$$f \ge \zeta^t \implies \mathbf{x} \to C_2^t$$

with $\zeta^t = 0$, where $\mathbf{x} \to C$ means that $\mathbf{x}$ is classified in $C$. However, as we will show later, choosing $\zeta^t = 0$ is not guaranteed to be optimal, even though it seems rather intuitive. Similarly, as discussed in the introduction, the arbitrary choice $y = \pm 1$ is not necessarily the best. To visualize that, one is interested in understanding the asymptotic behavior of the score function $f$. Before stating the theorem giving these asymptotics, one must introduce two fundamental small-dimensional quantities that will be of particular interest.

* The data matrix $\mathcal{M} = \mathbf{M}^\mathrm{T}\mathbf{M}$, with $\mathbf{M} = [\mu_1^1, \mu_2^1, \dots, \mu_2^T]$. It is worth to note that even though $\mathbf{M}$ is not accessible in practice, the data matrix $\mathcal{M} \in \mathbb{R}^{2T \times 2T}$ can be estimated consistently (see Section D of the appendix).

* The parameter matrix $\mathcal{A}$, which is the solution of the following system of equations:

$$\left\{ \begin{array}{l} \forall t, \delta^t = \frac{1}{T} \mathcal{A}_{tt}, \\ \mathcal{A} = \tilde{\mathcal{A}} + \tilde{\mathcal{A}} (\mathcal{D}_{\tilde{\delta}}^{-1} - \tilde{\mathcal{A}})^{-1} \tilde{\mathcal{A}} \end{array} \right. $$

with $\tilde{\delta}_j^t = \frac{\rho_j^t}{Tc(1-\delta^t)}$ and $\tilde{\delta}^t = \tilde{\delta}_1^t + \tilde{\delta}_2^t$.

The equations leading to $\mathcal{A}$ translates how the parameters and hyperparameters of each task interact with each other in the optimization problem.

These two quantities are mixed up in the following matrix:

$$\Theta_0 = (\mathcal{A} \otimes 1_2 1_2^\mathrm{T}) \odot \mathcal{M}$$

As long as uncertain labeling is not taken into account, it is natural to consider that labels are equals for datapoints in the same class, i.e., $\forall \mathbf{x}_i^t \in C_j^t$, $y_i^t = \tilde{y}_j^t \in \mathbb{R}$. Therefore we define $\tilde{\mathbf{y}} = [\tilde{y}_1^1, \tilde{y}_2^1, \tilde{y}_1^2, \dots, \tilde{y}_2^T]$ $\in \mathbb{R}^{2T}$, which sums up the label values. Precisely, we have $\mathbf{y}_\ell = \mathbf{D}\tilde{\mathbf{y}}$, with

$$\mathbf{D} = \sum_{t=1}^{T} \mathbf{E}_{tt}^{[T]} \otimes \begin{pmatrix} 1_{n_{\ell t_1}^t} & \emptyset_{n_{\ell t_1}^t} \\ \emptyset_{n_{\ell t_2}^t} & 1_{n_{\ell t_2}^t} \end{pmatrix} \quad (12)$$

In this specific case, the statistics of the score function are given by the following theorem:

**Theorem 3**

Under Assumptions 1 and 2, and if labels are given by (16), for any unlabeled sample $\mathbf{x} \in C_j^t$, and $f$ being its associated score,

$$f \to \mathcal{N}(m_j^t, \sigma^{t2})$$

with $m_j^t = (1 - \delta^t) \mathbf{a}_j^t \mathrm{T} \tilde{\mathbf{y}}$ and $\sigma^t = (1 - \delta^t) \sqrt{\tilde{\mathbf{y}}^\mathrm{T} \mathbf{B}^t \tilde{\mathbf{y}}}$

$$\mathbf{a}_j^t = \left( \mathbf{e}_{t,j}^{[2T]^\mathrm{T}} \left( \boldsymbol{\Theta} - \frac{Tc\delta^t}{\rho^t} \boldsymbol{\Gamma} \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\tilde{\eta}} \right)^\mathrm{T}$$

$$\mathbf{B}^t = \mathcal{D}_{\tilde{\eta}} \left[ 2\mathcal{D}_{\tilde{\delta}} \left( \boldsymbol{\Theta} - \frac{Tc\delta^t}{\rho^t} \boldsymbol{\Gamma} \right) - \boldsymbol{\Gamma}^t \right] \mathcal{D}_{\tilde{r}^t} \mathcal{D}_{\tilde{\eta}} \\ + \mathcal{D}_{\tilde{\eta}} \mathcal{D}_{\tilde{\delta}} \left( \boldsymbol{\Theta} \mathcal{D}_{\tilde{r}^t} \boldsymbol{\Theta} + \tilde{\boldsymbol{\Omega}}^t - \left( \frac{Tc\delta^t}{\rho^t} \right)^2 \boldsymbol{\Gamma}^t \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\tilde{\eta}} \\ + \mathbf{T}^t \odot \mathcal{D}_{\boldsymbol{\rho} \odot \tilde{\eta}} \mathcal{D}_{(\tilde{\boldsymbol{\rho}} \odot \tilde{\eta})}^{-1} \otimes 1_{21}$$

and where

$$\Theta = (\mathbf{I}_{2T} - \mathbf{\Theta}_0 \mathcal{D}_{\tilde{\delta}})^{-1} \mathbf{\Theta}_0 \in \mathbb{R}^{T \times T}$$

$$\mathbf{\Gamma} = \mathbf{I}_T \otimes 1_2 1_2^\mathrm{T} \in \mathbb{R}^{T \times T} \text{ and } \mathbf{\Gamma}^t = \mathbf{E}_{tt} \otimes 1_2 1_2^\mathrm{T} \in \mathbb{R}^{T \times T}$$

$$\tilde{\boldsymbol{\Omega}}^t = (\mathbf{I}_{2T} - \mathbf{\Theta}_0 \mathcal{D}_{\tilde{\delta}})^{-1} \tilde{\boldsymbol{\Omega}}_0^t (\mathbf{I}_{2T} - \mathcal{D}_{\tilde{\delta}} \mathbf{\Theta}_0)^{-1} \in \mathbb{R}^{2T \times 2T}$$

$$\tilde{\boldsymbol{\Omega}}_0^t = \left[ (\mathcal{A} \mathcal{D}_{\mathbf{e}_i^{[T]} + \tilde{\mathbf{r}}^t} \mathcal{A}) \otimes 1_2 1_2^\mathrm{T} \right] \odot \mathcal{M} \in \mathbb{R}^{2T \times 2T}$$

$$\mathbf{T}^t = \tilde{\mathcal{D}}_{\tilde{\mathbf{r}}^t \odot \tilde{\eta}} \otimes 1_2 1_2^\mathrm{T} \in \mathbb{R}^{2T \times 2T}$$

$$\mathbf{r}^t = \boldsymbol{\rho} \odot (\mathbf{S}_t \otimes 1_2) \in \mathbb{R}^{2T} \text{ and } \tilde{\mathbf{r}}^t = \tilde{\boldsymbol{\rho}} \odot \mathbf{S}_t \in \mathbb{R}^T$$

$$\mathbf{S} = \tilde{\mathbf{S}} (\mathbf{I}_T - \mathcal{D}_{\tilde{\boldsymbol{\rho}}} \tilde{\mathbf{S}})^{-1} \in \mathbb{R}^{T \times T} \text{ with } \tilde{\mathbf{S}}_{tt'} = \frac{\mathcal{A}_{t t'}^t}{T^2 c(1 - \delta^{t'})^2}$$

Beyond the cumbersome formulas, one can notice that the vector $\mathbf{a}_j^t$ and the matrix $\mathbf{B}^t$ are small dimensional deterministic quantities that only depend on estimates, known parameters and hyperparameters. Interestingly, even without analysing how $\mathbf{a}_j^t$ and $\mathbf{B}^t$ relate to the parameters of the problem, one can take a look at the implication of the Theorem 3 on our classification problem. The key information here is that the decision score $f$ is asymptotically Gaussian with known parameters. These parameters are mere functionals of the label vector $\tilde{\mathbf{y}}$. Therefore, a good choice of $\tilde{\mathbf{y}}$ as well as $\zeta^t$ could lead to a lower classification error. First of all, we need to precise which quantity we want to minimize.

**Definition 4**

For a given target task $t$, the classification error of any unlabeled sample $\mathbf{x} \in C_1^t$ is

$$\varepsilon_1^t = \mathbb{P}(\mathbf{x} \to C_2^t | \mathbf{x} \in C_1^t)$$

Similarly, the classification error of any unlabeled sample $\mathbf{x} \in C_2^t$ is

$$\varepsilon_2^t = \mathbb{P}(\mathbf{x} \to C_1^t | \mathbf{x} \in C_2^t)$$

**Remark 5**

According to Theorem 3, and using the classification rule (11), the classification errors of Definition 4 rewrite as:

$$\varepsilon_1^t = \mathcal{Q}\left(\frac{\zeta^t - m_1^t}{\sigma^t}\right) \quad \text{and} \quad \varepsilon_2^t = \mathcal{Q}\left(\frac{m_2^t - \zeta^t}{\sigma^t}\right) \quad (13)$$

with $\mathcal{Q}(x) = \frac{1}{\sqrt{2\pi}} \int_x^\infty e^{-\frac{u^2}{2}} \mathrm{d}u$. Thus, $\zeta^t \mapsto \varepsilon_1^t$ is a decreasing function, while $\zeta^t \mapsto \varepsilon_2^t$ is an increasing function.

With this remark, we understand that the choice of the threshold $\zeta^t$ is a trade-off between the minimization of $\varepsilon_1^t$ and $\varepsilon_2^t$, as displayed in Figure 1.

$\zeta^t = m_1^t$ and $\zeta^t = m_2^t$ are extreme choices, where we have respectively $\varepsilon_1^t = \frac{1}{2}$ and $\varepsilon_2^t = \frac{1}{2}$. If $\zeta^t \notin [m_1^t, m_2^t]$, we have either $\varepsilon_1^t > \frac{1}{2}$ or $\varepsilon_2^t > \frac{1}{2}$, which is not a desirable situation. So we will assume starting from now that $\zeta^t \in [m_1^t, m_2^t]$.
<figure><img src="image_3.png" /><figcaption>Fig. 1. Asymptotic probability distribution of the score function f for samples of both classes. The classification errors expressed in Remark 5 can be interpreted as the area delimited by the density curve of f and the threshold $\zeta^t$.</figcaption></figure>

Interestingly, for any such choice of $\zeta^t$, the optimal label vector is the same.

**Proposition 6**

For a given target task t and a given threshold $\zeta^t \in [m_1^t, m_2^t]$, there exists a unique (up to a multiplicative constant) score vector $\tilde{\mathbf{y}}^*$ minimizing $\varepsilon_1^t$ and $\varepsilon_2^t$, given as:

$$ \tilde{\mathbf{y}}^* = (\mathbf{B}^t)^{-1}(\mathbf{a}_2^t - \mathbf{a}_1^t) \quad (14) $$

This property provides the possibility, depending on the use of the algorithm, to choose the threshold accordingly. Indeed, the choice of $\zeta^t$ can be made in several different ways, allowing the user to tackle a wide variety of classification problems. For example :

* In a medical context, one could be interested to minimize the number of false positive $\varepsilon_1^t$ while ensuring that the number of false negative $\varepsilon_2^t$ is lower than a given threshold $p$ (for example $p = 1\%$). Then the optimal $\zeta^t$ is given by:

$$ \zeta^t = m_2^t - \sigma^t Q^{-1}(p) $$

* One could also be interested in minimizing the overall classification error of the dataset $\frac{n_{u1}^t}{n_u^t}\varepsilon_1^t + \frac{n_{u2}^t}{n_u^t}\varepsilon_2^t$ (and therefore prioritize the classification of the most numerous class). Then the optimal $\zeta^t$ is given by:

$$ \zeta^t = \frac{m_1^t + m_2^t}{2} + \frac{\sigma^{t2}}{m_2^t - m_1^t} \log \left( \frac{n_{u1}^t}{n_{u2}^t} \right) $$

* If one wants to minimize undifferently $\varepsilon_1^t$ and $\varepsilon_2^t$ (so that $\varepsilon_1^t = \varepsilon_2^t$), then the optimal $\zeta^t$ is straightforwardly given by:

$$ \zeta^t = \frac{m_1^t + m_2^t}{2} $$

This situation is a specific case of the previous one with $n_{u1}^t = n_{u2}^t$. It can also be interpreted as minimizing the overall classification error without any *a priori* on the genuine class of unlabeled samples. We will focus on this last simple example to provide a lower bound of the classification error.

**Proposition 7**

For a given target task t, the minimal value of the classification error $\varepsilon^t = \frac{\varepsilon_1^t + \varepsilon_2^t}{2}$ is achieved with the optimal label $\tilde{\mathbf{y}}^*$, and is asymptotically given by:

$$ \varepsilon_{\star}^{t} = Q \left( \frac{1}{2} \sqrt{(\mathbf{a}_{2}^{t} - \mathbf{a}_{1}^{t})^{\top} (\mathbf{B}^{t})^{-1} (\mathbf{a}_{2}^{t} - \mathbf{a}_{1}^{t})} \right), \quad (15) $$

The proof of Propositions 6 and 7 are obtained from classical convex optimization tools and provided for simplicity of

exposition in the Sections B and C of the appendix. We now see that the Theorem 3 provides us:

* An optimal choice $\tilde{\mathbf{y}}^*$ of the label vector $\tilde{\mathbf{y}}$

* The information we need to choose wisely the threshold $\zeta^t$

* The optimal classification error $\varepsilon_{\star}^t$ for a specific choice of $\zeta^t$

This leads to Algorithm 1, which summarizes the previous results and remarks.

**Algorithm 1 Optimal algorithm**

**Input:** labeled data $\mathbf{X}_{\ell} = [\mathbf{X}_{\ell}^1, \dots, \mathbf{X}_{\ell}^T]$ and unlabeled data $\mathbf{X}_u = [\mathbf{X}_u^1, \dots, \mathbf{X}_u^T]$

**Output:** Estimated class $\hat{j} \in \{1, 2\}$ for unlabeled data of a given target task $t$

**Center** data per task

**Compute** data matrices $\mathbf{Z}_{\ell}$ and $\mathbf{Z}_u$ from $\mathbf{X}_{\ell}$ and $\mathbf{X}_u$

**Estimate** matrix $\mathcal{M}$ (cf. Section D)

**Create** scores $\tilde{\mathbf{y}}^*$ from (14) and $\Lambda$ from (10).

**Estimate** the classification error $\varepsilon_{\star}^t$ according to (15) and optimize with respect to $\alpha$ using a grid search approach.

**Compute** classification scores $f_u$ according to (7).

**Output:** $\hat{j}$ such that $f_i^{\hat{j}=2} \ge \frac{m_1^t+m_2^t}{2}$. $\hat{j}=1$

IV. UNCERTAIN LABELING

In this section, we aim to extend the previous results to the case of erroneous or uncertain data. Until now, the value of the label $y_i^t$ of a given sample was either $\tilde{y}_1^t$ or $\tilde{y}_2^t$, depending whether the sample was belonging to the class $C_1^t$ or $C_2^t$. Let us consider now that instead of knowing which class the labeled sample belongs to, we have a couple $(d_{i1}^t, d_{i2}^t)$ of pre-estimated probabilities that the sample belongs to a class or to the other. The previous case is met if the couple is either $(1, 0)$ or $(0, 1)$, the associated label value being $\tilde{y}_1^t$ or $\tilde{y}_2^t$. For any other case, the value of $y_i^t$ should be in the interval $[\tilde{y}_1^t, \tilde{y}_2^t]$. A natural choice is to set $y_i^t = d_{i1}^t\tilde{y}_1^t + d_{i2}^t\tilde{y}_2^t$. Therefore, we have $y_{\ell} = D\tilde{\mathbf{y}}$, with

$$ \mathbf{D} = \sum_{t=1}^{T} \mathbf{E}_{tt}^{[T]} \otimes \begin{pmatrix} d_{11}^t & d_{12}^t \\ d_{21}^t & d_{22}^t \\ \vdots & \vdots \\ d_{n_{\ell}^t 1} & d_{n_{\ell}^t 2} \end{pmatrix} \quad (16) $$

The results of Theorem 3 have to be adapted. In particular, we have to introduce some statistics related to the couples of probabilities :

* $\tilde{d}_{j_1, j_2}^t = \frac{1}{n_{\ell,j_1}^t} \sum_{i'|x_i' \in C_{j_1}^t} d_{i'j_2}^t$ the average probability for a genuine sample of class $C_{j_1}^t$ to be labeled in class $C_{j_1}^t$. In the ideal case, $\tilde{d}_{j_1, j_2}^t = \mathbb{1}_{j_1=j_2}$.

* $\tilde{d}_{j_1, j_2}^t = \frac{1}{n_{\ell}^t} \sum_{i|x_i \in C^t} d_{ij_1}^t d_{ij_2}^t$ which is a measure of the labeling uncertainty. If $j_1 \ne j_2$ (resp. $j_1 = j_2$), a high value of $\tilde{d}_{j_1, j_2}^t$ means a high (resp. low) uncertainty.
This leads to the following small-dimensional quantities, related to the matrix $\mathbf{D}$:

$$ \begin{aligned} \bar{\mathbf{D}} &= \sum_{t=1}^{T} \mathbf{E}_{tt} \otimes \begin{pmatrix} \bar{d}_{11}^{t} & \bar{d}_{12}^{t} \\ \bar{d}_{21}^{t} & \bar{d}_{22}^{t} \end{pmatrix}, \\ \tilde{\mathbf{D}} &= \sum_{t=1}^{T} \mathbf{E}_{tt} \otimes \begin{pmatrix} \tilde{d}_{11}^{t} & \tilde{d}_{12}^{t} \\ \tilde{d}_{21}^{t} & \tilde{d}_{22}^{t} \end{pmatrix}. \end{aligned} $$

**Theorem 8**

Under Assumptions 1 and 2, and if labels are given by (16), for any unlabeled sample $\mathbf{x} \in C_j^t$, and $f$ being its associated score,

$$ f \to \mathcal{N}(m_j^t, \sigma^{t2}) $$

with $m_j^t = (1 - \delta^t)\mathbf{a}_j^T \tilde{\mathbf{y}}$ and $\sigma^t = (1 - \delta^t)\sqrt{\tilde{\mathbf{y}}^T \mathbf{B}^t \tilde{\mathbf{y}}}$

$$ \mathbf{a}_j^t = \left( \mathbf{e}_{t,j}^{[2T]^T} \left( \mathbf{\Theta} - \frac{Tc\delta^t}{\rho^t} \mathbf{\Gamma} \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \bar{\mathbf{D}} \right)^T $$

$$ \begin{aligned} \mathbf{B}^t &= \bar{\mathbf{D}}^T \mathcal{D}_{\eta} \left[ 2 \mathcal{D}_{\tilde{\delta}} \left( \mathbf{\Theta} - \frac{Tc\delta^t}{\rho^t} \mathbf{\Gamma} \right) - \mathbf{\Gamma}^t \right] \mathcal{D}_{r^t} \mathcal{D}_{\eta} \bar{\mathbf{D}} \\ &\quad + \bar{\mathbf{D}}^T \mathcal{D}_{\eta} \mathcal{D}_{\tilde{\delta}} \left( \mathbf{\Theta} \mathcal{D}_{r^t} \mathbf{\Theta} + \bar{\mathbf{\Omega}}^t - \left( \frac{Tc\delta^t}{\rho^t} \right)^2 \mathbf{\Gamma}^t \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \bar{\mathbf{D}} \\ &\quad + \mathbf{T}^t \odot \tilde{\mathbf{D}} \end{aligned} $$

The Theorem 3 is a particular case of the Theorem 8, with $\bar{\mathbf{D}} = \mathbf{I}_{2T}$ and $\tilde{\mathbf{D}} = \mathcal{D}_{\rho \odot \eta} \mathcal{D}_{(\bar{\rho} \odot \tilde{\eta}) \otimes 1_2}^{-1}$.

## V. LIMITATIONS

### A. Multiclass setting

The paper focuses on a binary setting. There are some known methods to deal with a higher number of classes, such as one-vs-all and one-vs-one [18], [19]. These methods can be roughly implemented in our case, but each one has some limitations. In this paragraph, $m > 2$ will denote the number of classes.

* **One-vs-all**: $m$ binary classifiers are trained, each one separating one class $C_j$ from the other $m-1$ classes. Each new sample is then classified into the class with the highest score among the $m$ classifiers. The computations of Theorem 3 can be easily adapted to these classifiers, but this approach has several issues:

- Each classifier has its own bias, making impossible a fair comparison between the output scores. To work well, this method implicitly makes the assumption that for all $1 \le j \le m$, the output distribution of the classifier $C_j$-vs-all on samples from class $C_j$ is the same. One way to tackle this problem is to normalize the distribution (i.e., consider $\frac{f_i^t - m_j}{\sigma^t}$ instead of $f_i^t$), but the algorithm then depends too heavily on the estimations of $m_j^t$ and $\sigma^t$, affecting its robustness.

- The optimal score vector $\tilde{\mathbf{y}}^*$ does not have an explicit formula, as the quantity to maximize is not a quadratic form of $\tilde{\mathbf{y}}$ anymore (see Section B of the appendix). As such, one needs to approximate the quantity to maximize, therefore losing the optimality.

* **One-vs-one**: $\frac{1}{2}m(m-1)$ binary classifiers are trained, each one separating one class $C_j$ from an other class $C_{j'}$. For every sample of unlabeled data, each one of these classifiers "votes" for the class the most relevant among the two that it compares. Then, the sample is attributed to the class collecting the most votes. This approach also comes with several issues:

- To train a binary classifier $C_j$-vs-$C_{j'}$, one can get rid of labeled data from other classes, but not unlabeled data. As such, the unsupervised part of the algorithm will still make use of the unlabeled data of other classes and change the outcome of the score function, necessarily introducing a new bias. However, results of Theorem 3 can be adapted to this situation.

- The number of one-vs-one classifiers to train is a quadratic function of the number of classes, while the number of one-vs-all classifiers was a linear function of the number of classes. With a high number of classes, the one-vs-one method is therefore much slower.

To our knowledge, one-vs-one is the only method able to keep the optimality we have in the binary case. The major issue is that a high number of classes makes the method heavy to use.

### B. Lack of labeled data

Even if the model is designed to work for any number of labeled and unlabeled data, in practice it cannot do without a minimum number of labeled data. First of all, if there is no labeled data at all (as it would be the case in a purely unsupervised setting), the score vector $f$ would be zero as the label vector $y$ would be zero itself. Most importantly, labeled data is needed to perform the estimation of $\mathcal{M}$ and $\mathcal{A}$. If labeled data is too scarce, the algorithm could be misleaded by the estimated values of $\mathcal{M}$ and $\mathcal{A}$, implying poor performances.

## VI. EXPERIMENTS

The experiments displayed in this section are done on both synthetic and real-world datasets. With Gaussian synthetic data, we simulate different learning settings, in order to convey some intuition on the different aspects of our model: multitask learning, semi-supervised learning, uncertain labeling, floating labels... Meanwhile, the purpose of real-data experiments is to show that our algorithm is robust enough to keep its properties on dataset that are not isotropic Gaussian vectors anymore. The code used to generate the following experiments is available at https://gricad-gitlab.univ-grenoble-alpes.fr/legervi/tsp

### A. Multitask experiments

This section investigates the influence of task correlation on the performances of our algorithm. To do so, we consider a case of transfer learning between a source task and a target task. The source and target tasks are mixtures of two Gaussians: $\mathcal{N}(\pm\mu, \mathbf{I}_p)$ for the source and $\mathcal{N}(\pm(\beta\mu +
$\sqrt{1 - \beta^2\mu^{\perp}}$, $I_p$) for the target, where $\mu^{\perp}$ is a vector orthogonal to the vector $\mu$. This setting allows through $\beta$ to control the similarity between both tasks. Specifically, for $\beta = 0$ the tasks are unrelated while for $\beta = 1$ they are identical. Note that $\beta = -1$ corresponds to a scenario where the classes of target and source tasks are reversed.

Figure 2 displays the empirical versus theoretical classification error of our algorithm as a function of $\beta$ for the optimized method (which integrates the label and hyperparameter optimization) against the naive method which leaves the labels ($\pm 1$) untouched. The values of the optimal labels are displayed jointly in the top figure.

We also provide an optimal bound of performance established by information theory in [20]. This bound corresponds to the best performance achievable by any algorithm given the setting of our experiment. The figure clearly shows that our proposed optimized algorithm is extremely close to the information-theoretic optimum under our Assumptions 1 and 2. The close fit between theoretical and empirical performances confirms Proposition 7 even for finite-dimensional data.

We also observe a strong robustness of our method to negative transfer. Indeed, when $\beta$ becomes negative, the error increases for the naive algorithm, while our proposed method is insensitive to the sign of $\beta$ by a dynamic adaptation of the labels. The top figure shows the sign inversion of $\tilde{y}_1^2$ and $\tilde{y}_2^2$ when $\beta$ becomes negative. In the specific case where $\beta = -1$, our algorithm has the same performance as with $\beta = 1$, while the naive “conventional” approach gets worse than random guess. Besides, when $\beta$ is close to 0, the labels of the source task have low magnitude, because there is no much information to get from source task.

## B. Class imbalances

In the previous experiment, the number of data in each class was the same. However, our adaptive labeling is also useful to deal with class imbalances. Indeed, labels can be interpreted as weights, which should naturally be higher for underrepresented classes. We will consider a single-task learning scenario with a fixed amount of data. While the number of unlabeled data is equal for both classes, the number of labeled data is unbalanced.

As such, Figure 3 displays the classification error as a function of the number of labeled data in class $C_1$, jointly with the values of the optimal labels (top figure). We also display the value of the optimal threshold $\zeta = \frac{m_1+m_2}{2}$, which ensures that the probability of misclassifying each sample is the same whether this sample is in a class or in the other. As expected, the label value of the least represented class is higher, as each labeled sample belonging to this class carries more information. Because of the imbalance, the means of the two classes are not symmetrical about zero anymore, and the threshold value must be changed.

In the naive setting, without our choice of threshold, the classification error for samples from the most represented class is much higher. As a consequence, the average classification error is higher overall.

<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /><figcaption>Fig. 2. Joint evolution of optimal labeling and classification error as a function of correlation between tasks ($p = 200$, $n_l^1 = 100$, $n_l^2 = 1000$, $n_u^1 = n_u^2 = 250$). (Top) Optimal labels with normalization $||\tilde{y}|| = 1$. Optimal labels adapt themselves to avoid negative transfer (Bottom) Classification error for both naive and optimal algorithms. Our algorithm is close to optimal, while naive labels induce a negative transfer when tasks are not related enough.</figcaption></figure>

## C. Uncertain labeling

As for now, the labeled data used in the experiments was assumed to be labeled without any mistake or imprecision. To simulate a case where labeled data suffers such imprecision, we will separate the labeled data in two categories :

* reliable data, labeled in a class with absolute certainty.

* imprecise data, for which there is a probability $r < 1$ that the data genuinely belongs to the class it has been labeled in (and therefore a probability $1-r$ that it belongs in fact to the other class).

To simplify the setting, we assume that all the imprecise data has the same value $r$ of reliability. $n_i$ will denote the number of imprecise data, while $n_r$ will denote the number of reliable data. In order to measure how useful imprecise data is to solve our problem, one could ask the following question : for a given value of $n_r$, if imprecise data is used instead of reliable data, how many samples $n_i$ are needed to reach the same performance ? The first thing we notice, through Figure 4, is that the number of imprecise data needed to reach that performance is a linear function of the number of reliable data used in the first place.

Therefore, the ratio $\frac{n_r}{n_i}$ seems to be a relevant quantity to compute. It can be interpreted as a measure of the strength of imprecise data compared to reliable data. The higher this ratio is, the more information is brought by imprecise samples.
<figure><img src="image_6.png" /><figcaption>Fig. 3. Joint evolution of optimal labeling and classification error as a function of the number of labeled data in class $C_1$. The total number of labeled data is constant ($n_\ell = n_{\ell 1} + n_{\ell 2} = 1000$, $p = 200$, $n_{u1} = n_{u2} = 200$). (Top) Optimal labels with normalization $||\tilde{y}|| = 1$, and optimal threshold $\zeta$ (also normalized). Optimal labels adapt themselves to compensate the class imbalances (Bottom). Theoretical and empirical classification error for both naive and optimal labels and threshold. The overall error is better with our algorithm, while naive labels and threshold induce a high error for the most represented class.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Fig. 5. Ratio $\frac{n_r}{n_i}$ for different values of reliability ($r$) and difficulty of the task ($D = 1/||\mu_1 - \mu_2||$). The higher the ratio is, the more effective is the contribution of imprecise samples to the task. Both figures show that the harder the task is, the least useful imprecise samples are. However, an increasing of $r$ leads to significantly better results. (Top) Ratio $\frac{n_r}{n_i}$ as a function of the reliability of imprecise data, for different values of difficulty. (Bottom) Ratio $\frac{n_r}{n_i}$ as a function of the difficulty of the task, for different values of reliability.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 4. Number of imprecise data $n_i$ needed to reach the same performance one had using $n_r$ samples of reliable data, for different values of $r$ (1-task, $p = 200$, $n_{u1} = n_{u2} = 200$). For each point, $n_r$ is a random number between 20 and 400. The figure strongly suggests that $n_i$ is a linear function of $n_r$.</figcaption></figure>

$\frac{n_r}{n_i} = 0$ means that imprecise samples are not useful at all, while $\frac{n_r}{n_i} = 1$ means that imprecise samples are as useful as reliable samples. Figure 5 displays this ratio for different values of reliability $r$ and difficulty of the task (expressed through the quantity $D = \frac{1}{||\mu_1 - \mu_2||}$).

## D. Real data experiments

The purpose of this section is to check that our algorithm still performs well on real data, which does not necessarily follow Assumption 1. The data is generated with normalized VGG-features [21] of randomly BigGAN-generated images [22]. If GANs are known to produce concentrated vectors [14], the covariance is unlikely to be isotropic. However, thanks to the robustness of our method, we still have some reasonably good performances. In the following figures, only the empirical classification error is displayed, as the theoretical values are not relevant for this real data setting.

In the Figure 7, we consider a transfer-learning setting with 2 similar tasks (doberman vs entlebucher and appenzeler vs rottweiler, for which examples are displayed in Figure 6) and with classes purposely inverted between the tasks (similarly to the case $\beta = -1$ of Section VI-A). Naturally, the naive algorithm suffers from a huge negative transfer, while optimal labeling ensures a low error. The same tasks are used in Figure 8 to compare 1-task and 2-task learning (with our optimal algorithm). While the number of labeled data in the source task is constant, we add labeled data in the target task. The error of the single-task algorithm decreases, but remains higher than the multi-task algorithm, which benefits from the numerous data of the second task. To
<figure><img src="image_9.png" /><figcaption>Fig. 6. Examples of BigGAN-generated images used for the experiment. From left to right: *doberman* (Class $C_1^1$), *entlebucher* (Class $C_2^1$), *appenzeler* (Class $C_1^2$) and *rottweiler* (Class $C_2^2$). *entlebucher* and *appenzeler* are close, as well as *doberman* and *rottweiler*.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 7. Empirical classification error, for both naive and optimal labels, as a function of the number of labeled data in source task, for BigGAN-generated images. (doberman vs entlebucher and appenzeler vs rottweiler, *p* = 4096, $n_\ell^1 = 20$, $n_u^1 = 200$ and $n_u^2 = 0$). The naive labels induce a huge negative transfer, while optimal labels keep the error at low level.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 8. Empirical classification error, for 1-task and 2-task learning, as a function of the number of labeled data in target task, for BigGAN-generated images. (doberman vs entlebucher and appenzeler vs rottweiler, *p* = 4096, $n_\ell^2 = 100$, $n_u^1 = 200$ and $n_u^2 = 0$). The multi-task setting takes advantage of the labeled data from source task.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 9. Empirical classification error for fully-supervised and semi-supervised algorithms, as a function of the number of unlabeled data. (BigGAN-generated images *boxer* vs *great swiss mountain dog*, *p* = 4096, $n_\ell = 10$). As expected, the error is constant with the fully-supervised algorithm, while the semi-supervised version benefits from additional unlabeled data.</figcaption></figure>

simplify the interpretation, the fully-supervised algorithm is considered.

A third experiment is made with a semi-supervised setting, to which we compare the purely supervised method. Figure 9 shows the performances for the task *boxer* vs *greater swiss mountain dog* as a function of the number of unlabeled data. The error of the supervised method is logically constant, while the semi-supervised algorithm benefits from the new unlabeled samples.

## VII. CONCLUDING REMARKS

Thanks to its simplicity, the algorithm presented in this article allows an extensive mathematical analysis, which makes it at once robust, powerful and interpretable. Indeed, the comparison of the empirical error with the optimum-theoretic bound indicates that the algorithm reaches satisfying performances, and the basic assumptions made still allow it to perform well on real data.

Our algorithm is therefore accessible to its users and is even able to bring them further knowledge. More precisely :

* the label vector $\tilde{y}$ informs the users on potential biases in the dataset, and helps them quantify how useful an additional task would be to solve the initial problem;

* the combined knowledge of the performance and the information-theoretic bound helps understand how difficult a problem is, and how far from optimal the associated performance lies;

* the experiments enlighten the users about the expected improvements of performance with additional labeled or unlabeled data, or when controversial data is used.

As such, our method does not intend to compete with state-of-the-art algorithms, but rather guarantees sufficient performances. In accordance with the base “convivality” principles enunciated in the introduction, our future investigations will not aim at any further complexification and improvement of the present method; rather, we will seek for further simplification and accessibility: the random matrix framework remains indeed quite opaque to most, which still constitutes an accessibility hurdle we should seek to overtake. Options lie in exploiting alternative tools from the mathematical, and
even preferrably from the statistical physics, litterature in order to retrieve our technical results from a more direct and more intuitive path (which for instance the non-rigorous but much simpler replica methods may offer).

## APPENDIX A
### SOLUTION OF THE OPTIMIZATION PROBLEM

First of all, we need to clarify why (4) is equivalent to (5).

$$ 
\begin{aligned}
& \sum_{t,t'=1}^{T} \Lambda^{tt'} \sum_{i=1}^{n^t} \sum_{i'=1}^{n^{t'}} \hat{\omega}_{ii'}^{tt'} (f_i^t - f_{i'}^{t'})^2 \\
&= \sum_{t,t'=1}^{T} \Lambda^{tt'} \sum_{i=1}^{n^t} \sum_{i'=1}^{n^{t'}} \left[ \hat{\omega}_{ii'}^{tt'} ( (f_i^t)^2 - (f_{i'}^{t'})^2 ) - 2 f_i^t \hat{\omega}_{ii'}^{tt'} f_{i'}^{t'} \right] \\
&= \sum_{t,t'=1}^{T} \Lambda^{tt'} \left( \sum_{i=1}^{n^t} (f_i^t)^2 \sum_{\substack{i'=1 \\ i \neq 0}}^{n^{t'}} \hat{\omega}_{ii'}^{tt'} + \sum_{i=1}^{n^{t'}} (f_{i'}^t)^2 \sum_{\substack{i=1 \\ i \neq 0}}^{n^t} \hat{\omega}_{ii'}^{tt'} \right) \\
&\quad - 2 \sum_{t,t'=1}^{T} \Lambda^{tt'} \sum_{i=1}^{n^t} \sum_{i'=1}^{n^{t'}} f_i^t \hat{\omega}_{ii'}^{tt'} f_{i'}^{t'} \\
&= -2 \sum_{t,t'=1}^{T} \Lambda^{tt'} \mathbf{f}^{T} \hat{\mathbf{W}}^{tt'} \mathbf{f}^{t'} = -2 \mathbf{f}^{T} \hat{\mathbf{W}} \mathbf{f}
\end{aligned}
$$

Therefore

$$ (4) \Leftrightarrow \min_{\mathbf{f}^1, \dots, \mathbf{f}^T} -2\mathbf{f}^T \hat{\mathbf{W}} \mathbf{f} + 2\alpha (\|\mathbf{f}_\ell - \mathbf{y}_\ell\|^2 + \|\mathbf{f}_u\|^2) \Leftrightarrow (5) $$

The optimization problem we need to solve is

$$ \min_{\mathbf{f} \in \mathbb{R}^n} \alpha \|\mathbf{f} - \mathbf{y}\|^2 - \mathbf{f}^T \tilde{\mathbf{W}} \mathbf{f} \Leftrightarrow \min_{\mathbf{f} \in \mathbb{R}^n} \mathbf{f}^T (\alpha \mathbf{I}_n - \tilde{\mathbf{W}}) \mathbf{f} - 2\alpha \mathbf{f}^T \mathbf{y} $$

The problem is convex as long as $\alpha > \|\tilde{\mathbf{W}}\|$, ensuring $\alpha \mathbf{I}_n - \tilde{\mathbf{W}}$ to be positive definite. We assume that this condition is satisfied. The quantity to minimize is a quadratic form of $\mathbf{f}$, so the solution of the optimization problem satisfies:

$$ 
\begin{aligned}
& \min_{\mathbf{f} \in \mathbb{R}^n} \alpha \|\mathbf{f} - \mathbf{y}\|^2 - \mathbf{f}^T \tilde{\mathbf{W}} \mathbf{f} \Leftrightarrow (\alpha \mathbf{I}_n - \tilde{\mathbf{W}}) \mathbf{f} - \alpha \mathbf{y} = 0 \\
& \Leftrightarrow \mathbf{f} = \left( \mathbf{I}_n - \frac{\tilde{\mathbf{W}}}{\alpha} \right)^{-1} \mathbf{y} \Leftrightarrow \mathbf{f} = \left( \mathbf{I}_n - \frac{\mathbf{Z}^T \mathbf{A} \mathbf{Z}}{Tp} \right)^{-1} \mathbf{y}
\end{aligned}
$$

Indeed,

$$ 
\begin{aligned}
\frac{\tilde{\mathbf{W}}}{\alpha} &= \sum_{t,t'=1}^{T} \tilde{\Lambda}^{tt'} \mathbf{E}_{tt'} \otimes \hat{\mathbf{W}}^{tt'} = \frac{1}{Tp} \sum_{t,t'=1}^{T} \tilde{\Lambda}^{tt'} \mathbf{E}_{tt'} \otimes (\mathbf{X}^{T}\mathbf{X}^{t'}) \\
&= \frac{1}{Tp} \sum_{t,t'=1}^{T} (\mathbf{E}_{tt} \otimes \mathbf{X}^t)^T (\tilde{\Lambda} \otimes \mathbf{I}_p) (\mathbf{E}_{t't'} \otimes \mathbf{X}^{t'}) = \frac{\mathbf{Z}^T \mathbf{A} \mathbf{Z}}{Tp}
\end{aligned}
$$

## APPENDIX B

### PROOF OF PROPOSITION 6

$\zeta^t \in [m_1^t, m_2^t]$ so there exists $\lambda \in [0, 1]$ such that:

$$ \zeta^t = \lambda m_1^t + (1 - \lambda) m_2^t $$

$$ 
\begin{aligned}
\varepsilon_1^t &= Q \left( \frac{\zeta^t - m_1^t}{\sigma^t} \right) = Q \left( (1 - \lambda) \frac{m_2^t - m_1^t}{\sigma^t} \right) \\
\varepsilon_2^t &= Q \left( \frac{m_2^t - \zeta^t}{\sigma^t} \right) = Q \left( \lambda \frac{m_2^t - m_1^t}{\sigma^t} \right)
\end{aligned}
$$

$Q$ is a decreasing function, so in order to minimize $\varepsilon_1^t$ and $\varepsilon_2^t$, one needs to maximize $\frac{m_2^t - m_1^t}{\sigma^t}$, or equivalently the following quantity:

$$ \left( \frac{m_2^t - m_1^t}{\sigma^t} \right)^2 = \frac{(\tilde{\mathbf{y}}^T (\mathbf{a}_2^t - \mathbf{a}_1^t))^2}{\tilde{\mathbf{y}}^T \mathbf{B}^t \tilde{\mathbf{y}}} \quad (17) $$

Then the optimal scores rewrite (up to a multiplicative constant) as

$$ \arg\max_{\tilde{\mathbf{y}}} \frac{(\tilde{\mathbf{y}}^T (\mathbf{a}_2^t - \mathbf{a}_1^t))^2}{\tilde{\mathbf{y}}^T \mathbf{B}^t \tilde{\mathbf{y}}} = (\mathbf{B}^t)^{-1} (\mathbf{a}_2^t - \mathbf{a}_1^t) $$

## APPENDIX C
### PROOF OF PROPOSITION 7

To minimize $\varepsilon^t = \frac{\varepsilon_1^t + \varepsilon_2^t}{2}$, the optimal threshold is $\zeta^t = \frac{m_1^t + m_2^t}{2}$.

$$ \varepsilon^t = \frac{1}{2} Q \left( \frac{\zeta^t - m_1^t}{\sigma^t} \right) + \frac{1}{2} Q \left( \frac{m_2^t - \zeta^t}{\sigma^t} \right) = Q \left( \frac{m_2^t - m_1^t}{2\sigma^t} \right) $$

As stated in Proposition 6, the minimum value of $\varepsilon^t$ is achieved with $\tilde{\mathbf{y}}^* = (\mathbf{B}^t)^{-1}(\mathbf{a}_2^t - \mathbf{a}_1^t)$, which leads to

$$ 
\begin{aligned}
m_2^t - m_1^t &= (\mathbf{a}_2^t - \mathbf{a}_1^t)^T \mathbf{B}^t)^{-1} (\mathbf{a}_2^t - \mathbf{a}_1^t) \\
\sigma^t &= \sqrt{(\mathbf{a}_2^t - \mathbf{a}_1^t)^T (\mathbf{B}^t)^{-1} (\mathbf{a}_2^t - \mathbf{a}_1^t)}
\end{aligned}
$$

Finally, we have

$$ \varepsilon_{\star}^{t} = Q \left( \frac{1}{2} \sqrt{(\mathbf{a}_{2}^{t} - \mathbf{a}_{1}^{t})^{\mathrm{T}} (\mathbf{B}^{t})^{-1} (\mathbf{a}_{2}^{t} - \mathbf{a}_{1}^{t})} \right) $$

## APPENDIX D
### ESTIMATION OF $\mathbf{M}^T\mathbf{M}$

To estimate the matrix $\mathcal{M} = \mathbf{M}^T\mathbf{M}$, one only needs to estimate quantities such as $\theta = \mu_1^T \mu_2$. To estimate these quantities, we use the following unbiased estimator :

$$ \hat{\theta} = \frac{1}{n_1 n_2} \mathbb{1}_{n_1}^{\mathrm{T}} \mathbf{X}_1^{\mathrm{T}} \mathbf{X}_2 \mathbb{1}_{n_2} $$

where $(\mathbf{X}_j)_{.,i} \sim \mathcal{N}(\mu_j, \mathbf{I}_p)$

$$ \hat{\theta} = \frac{1}{n_1 n_2} \mathbb{1}_{n_1}^{\mathrm{T}} (\mathbb{1}_{n_1} \mu_1^{\mathrm{T}} + \mathbf{V}_1^{\mathrm{T}}) (\mu_2 \mathbb{1}_{n_2}^{\mathrm{T}} + \mathbf{V}_2) \mathbb{1}_{n_2} $$

where $(\mathbf{V}_j)_{.,i} \sim \mathcal{N}(0, \mathbf{I}_p)$

To compute the law of $\theta$, we will use the two following facts:

**Lemma 9**

$$ \frac{1}{\sqrt{n_j}} \mathbf{V}_j \mathbb{1}_{n_j} \sim \mathcal{N}(0, \mathbf{I}_p) $$
**Lemma 10**

If $\mathbf{u}, \mathbf{v} \sim \mathcal{N}(0, \mathbf{I}_p)$ and are independent, then

$$ \frac{1}{\sqrt{p}} \mathbf{u}^{\mathrm{T}} \mathbf{v} \sim \mathcal{N}(0, 1) $$

$$ \begin{aligned} \hat{\theta} &= \frac{1}{n_1 n_2} \mathbf{1}_{n_1}^{\mathrm{T}} (\mathbf{1}_{n_1} \boldsymbol{\mu}_1^{\mathrm{T}} + \mathbf{V}_1^{\mathrm{T}}) (\boldsymbol{\mu}_2 \mathbf{1}_{n_2}^{\mathrm{T}} + \mathbf{V}_2) \mathbf{1}_{n_2} \\ &= \left(\boldsymbol{\mu}_1 + \frac{1}{n_1} \mathbf{V}_1 \mathbf{1}_{n_1}\right)^{\mathrm{T}} \left(\boldsymbol{\mu}_2 + \frac{1}{n_2} \mathbf{V}_2 \mathbf{1}_{n_2}\right) \\ &= \left(\boldsymbol{\mu}_1 + \frac{1}{\sqrt{n_1}} \mathbf{u}_1\right)^{\mathrm{T}} \left(\boldsymbol{\mu}_2 + \frac{1}{\sqrt{n_2}} \mathbf{u}_2\right) \end{aligned} $$

with $\mathbf{u}_1, \mathbf{u}_2 \sim \mathcal{N}(0, \mathbf{I}_p)$

$$ = \boldsymbol{\mu}_1^{\mathrm{T}} \boldsymbol{\mu}_2 + \frac{1}{\sqrt{n_2}} \boldsymbol{\mu}_1^{\mathrm{T}} \mathbf{u}_2 + \frac{1}{\sqrt{n_1}} \mathbf{u}_1^{\mathrm{T}} \boldsymbol{\mu}_2 + \frac{1}{\sqrt{n_1 n_2}} \mathbf{u}_1^{\mathrm{T}} \mathbf{u}_2 $$

$$ = \boldsymbol{\mu}_1^{\mathrm{T}} \boldsymbol{\mu}_2 + \frac{\|\boldsymbol{\mu}_1\|}{\sqrt{n_2}} z_1 + \frac{\|\boldsymbol{\mu}_2\|}{\sqrt{n_1}} z_2 + \sqrt{\frac{p}{n_1 n_2}} z_3 $$

with $z_1, z_2, z_3 \sim \mathcal{N}(0, 1)$.

Therefore the estimator is consistent, and converges with an $O(\frac{1}{\sqrt{n}})$ speed, under Assumption 2. For the specific case of $\theta = \boldsymbol{\mu}_1^{\mathrm{T}} \boldsymbol{\mu}_1$, one can use the previous results, but needs to divide the samples in two separate subsets, in order to keep the property of independence between the samples.

# APPENDIX E
## PROOF OF THEOREM 8

The proof is organized as follows:

* A first order deterministic equivalent (Section E-A) is needed to compute the mean of $f_i$ (Section E-B)

* A second order deterministic equivalent (Section E-C) is needed to compute the variance of $f_i$ (Section E-D)

A more detailed version of the proof is available at https://gricad-gitlab.univ-grenoble-alpes.fr/legervi/tsp.

In the following proof, we will need to distinguish the data matrix $\mathbf{Z}$ and its centered version $\tilde{\mathbf{Z}}$, as the centering breaks the independence between samples. This effect of centering is summed up in the following lemma.

**Lemma 11**

For a data matrix $\mathbf{X}$ defined as in Assumption 1, and centered as in equation (3), we have asymptotically:

$$ \mathbb{E}[\dot{\mathbf{X}}\dot{\mathbf{X}}^{\mathrm{T}}] = (1 - \frac{1}{n})\mathbb{E}[\mathbf{X}\mathbf{X}^{\mathrm{T}}] - \frac{1}{n}\mathbb{E}[\mathbf{X}]\mathbb{E}[\mathbf{X}]^{\mathrm{T}} \quad (18) $$

$$ \left\{ \begin{aligned} \mathbb{E}[\mathbf{X}^{\mathrm{T}}\mathbf{X}] &= \mathbb{E}[\mathbf{X}]^{\mathrm{T}}\mathbb{E}[\mathbf{X}] + \mathrm{tr}(\boldsymbol{\Sigma})\mathbf{I}_n, \\ \mathbb{E}[\dot{\mathbf{X}}^{\mathrm{T}}\dot{\mathbf{X}}] &= \mathbb{E}[\dot{\mathbf{X}}]^{\mathrm{T}}\mathbb{E}[\dot{\mathbf{X}}] + \mathrm{tr}(\boldsymbol{\Sigma})\mathbf{I}_n - \frac{1}{n}\mathrm{tr}(\boldsymbol{\Sigma})\mathbf{1}_n\mathbf{1}_n^{\mathrm{T}} \end{aligned} \right. \quad (19) $$

While the matrix $\mathbf{X}\mathbf{X}^{\mathrm{T}}$ is practically unaffected by the centering, the matrix $\mathbf{X}^{\mathrm{T}}\mathbf{X}$ is changed, not only by the centering of the mean matrix $\mathbb{E}[\mathbf{X}]^{\mathrm{T}}\mathbb{E}[\mathbf{X}]$, but also with the appearance of the bias term $-\frac{1}{n}\mathrm{tr}(\boldsymbol{\Sigma})\mathbf{1}\mathbf{1}^{\mathrm{T}}$. With these results in mind, $\mathbf{X}^{\mathrm{T}}, \boldsymbol{\mu}_j^{\mathrm{T}}, \mathbf{Z}$ will still denote their centered versions, as it was the case until now.

## A. First order deterministic equivalent

We introduce the notation $\mathbf{F} \leftrightarrow \bar{\mathbf{F}}$ which denote that $\bar{\mathbf{F}}$ is a deterministic equivalent of $\mathbf{F}$.

A deterministic equivalent, say $\bar{\mathbf{F}} \in \mathbb{R}^{n \times p}$, of a given random matrix $\mathbf{F} \in \mathbb{R}^{n \times p}$, is defined by the fact that under assumption 2, for any deterministic linear functional $f: \mathbb{R}^{n \times p} \to \mathbb{R}$, $f(\mathbf{F} - \bar{\mathbf{F}}) \to 0$ almost surely (for instance, for $\mathbf{u}, \mathbf{v}$ of unit norm, $\mathbf{u}^{\mathrm{T}}(\mathbf{F} - \bar{\mathbf{F}})\mathbf{v} \xrightarrow{\text{a.s.}} 0$ and, for $\mathbf{A} \in \mathbb{R}^{p \times n}$ deterministic of bounded operator norm, $\frac{1}{n}\mathrm{tr}\mathbf{A}(\mathbf{F} - \bar{\mathbf{F}}) \xrightarrow{\text{a.s.}} 0$).

Theorem 2.8 of [23] provides us a deterministic equivalent for $\mathbf{Q}$. To express it, we need to define

$$ \mathbf{C}_j^t = \mathbf{A}^{\frac{1}{2}} \left( \mathbf{E}_{tt} \otimes \left( \boldsymbol{\Sigma}_j^t + \boldsymbol{\mu}_j^t \boldsymbol{\mu}_j^{\mathrm{T}} \right) \right) \mathbf{A}^{\frac{1}{2}} \quad (20) $$

Then, we have $\mathbf{Q} \leftrightarrow \bar{\mathbf{Q}} = (\mathbf{I}_{Tp} - \sum_{t,j} \tilde{\delta}_j^t \mathbf{C}_j^t)^{-1}$, with $\tilde{\delta}_j^t$ satisfying the following system of equations:

$$ \tilde{\delta}_j^t = \frac{\rho_j^t}{Tc} \frac{1}{1 - \tilde{\delta}_j^t} \quad \text{and} \quad \delta_j^t = \frac{1}{Tp} \mathrm{tr}(\mathbf{C}_j^t \bar{\mathbf{Q}}) $$

Let's compute more explicitly the quantity $\tilde{\delta}_j^t$. If the covariances of the data for all class $j$ and all tasks $t$ are isotropic of same magnitude, i.e $\boldsymbol{\Sigma}_j^t = \mathbf{I}_p$, then, as $\boldsymbol{\mu}_j^t \boldsymbol{\mu}_j^{\mathrm{T}}$ is a small rank perturbation of $\boldsymbol{\Sigma}_j^t$, we have asymptotically:

$$ \mathrm{tr}(\mathbf{C}_j^t \bar{\mathbf{Q}}) = \mathrm{tr} \left( \mathbf{A}^{\frac{1}{2}} (\mathbf{E}_{tt} \otimes \mathbf{I}_p) \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \right) $$

Therefore, $\delta_1^t = \delta_2^t$, and we will use the same notation $\delta^t$ for both in the following. Let's define $\bar{\delta}^t = \tilde{\delta}_1^t + \tilde{\delta}_2^t$, and $\bar{\mathbf{M}} = [\mathbf{e}_1^{[T]} \otimes \boldsymbol{\mu}_1^1, \mathbf{e}_1^{[T]} \otimes \boldsymbol{\mu}_2^1, \dots, \mathbf{e}_T^{[T]} \otimes \boldsymbol{\mu}_2^T]$. Then

$$ \begin{aligned} \sum_{t,j} \tilde{\delta}_j^t \mathbf{C}_j^t &= \sum_{t,j} \tilde{\delta}_j^t \mathbf{A}^{\frac{1}{2}} \left( \mathbf{E}_{tt} \otimes \left( \mathbf{I}_p + \boldsymbol{\mu}_j^t \boldsymbol{\mu}_j^{\mathrm{T}} \right) \right) \mathbf{A}^{\frac{1}{2}} \\ &= \left( \tilde{\mathbf{\Lambda}}^{\frac{1}{2}} \mathcal{D}_{\tilde{\delta}} \tilde{\mathbf{\Lambda}}^{\frac{1}{2}} \right) \otimes \mathbf{I}_p + \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} \mathcal{D}_{\tilde{\delta}} \bar{\mathbf{M}}^{\mathrm{T}} \mathbf{A}^{\frac{1}{2}} \end{aligned} $$

If $\bar{\mathbf{Q}}_0 = (\mathbf{I}_T - \tilde{\mathbf{\Lambda}}^{\frac{1}{2}} \mathcal{D}_{\tilde{\delta}} \tilde{\mathbf{\Lambda}}^{\frac{1}{2}})^{-1} \otimes \mathbf{I}_p$, using Woodbury identity,

$$ \bar{\mathbf{Q}} = \bar{\mathbf{Q}}_0 + \bar{\mathbf{Q}}_0 \mathbf{U} (\mathbf{I}_{2T} - \mathbf{U}^{\mathrm{T}} \bar{\mathbf{Q}}_0 \mathbf{U})^{-1} \mathbf{U}^{\mathrm{T}} \bar{\mathbf{Q}}_0 $$

The second term is a matrix of rank $2T \ll Tp$ and can be neglected in the trace. Then

$$ \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}}_0 \mathbf{A}^{\frac{1}{2}} = \underbrace{\left[ \tilde{\mathbf{\Lambda}} + \tilde{\mathbf{\Lambda}} \left( \mathcal{D}_{\tilde{\delta}}^{-1} - \tilde{\mathbf{\Lambda}} \right)^{-1} \tilde{\mathbf{\Lambda}} \right]}_{=\mathcal{A}} \otimes \mathbf{I}_p. $$

Finally,

$$ \delta^t = \frac{1}{Tp} \mathrm{tr}(\mathbf{E}_{tt} \mathcal{A}) \mathrm{tr}(\mathbf{I}_p) = \frac{1}{T} \mathcal{A}_{tt}. $$

We can then conclude that the $\{\delta^t\}_t$ are the solution of the following system of equations:

$$ \left\{ \begin{array}{l} \forall t, \delta^t = \frac{1}{T} \mathcal{A}_{tt}, \\ \mathcal{A} = \tilde{\mathbf{\Lambda}} + \tilde{\mathbf{\Lambda}} \left( \mathcal{D}_{\tilde{\delta}}^{-1} - \tilde{\mathbf{\Lambda}} \right)^{-1} \tilde{\mathbf{\Lambda}} \end{array} \right. $$
## B. Computation of the mean

$$ \mathbb{E}[f_i] = \frac{1}{Tp} \sum_{i'} \mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right] y_{i'} $$

Using Sherman-Morrison formula, it can be proved that:

$$ \mathbf{Q} = \mathbf{Q}_{-i} + \frac{1}{Tp} \frac{\mathbf{Q}_{-i} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_i \mathbf{z}_i^{\top} \mathbf{A}^{\frac{1}{2}} \mathbf{Q}_{-i}}{1 - \frac{1}{Tp} \mathbf{z}_i^{\top} \mathbf{A}^{\frac{1}{2}} \mathbf{Q}_{-i} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_i} \quad (21) $$

with $\mathbf{Q}_{-i} = \left( \mathbf{I}_{Tp} - \frac{\mathbf{A}^{\frac{1}{2}} \mathbf{Z}_{-i} \mathbf{Z}_{-i}^{\top} \mathbf{A}^{\frac{1}{2}}}{Tp} \right)^{-1}$, the notation $\mathbf{Z}_{-i}$ standing for the matrix $\mathbf{Z}$ with the $i$-th column removed.

In particular:

$$ \mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right] = \frac{\mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q}_{-i} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right]}{1 - \delta^t} $$

And thanks to equation (19)

$$ \begin{aligned} \mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q}_{-i, -i'} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right] & = \mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \mathbb{E} \left[ \mathbf{z}_{i'} \right] - \frac{1}{n^t} \mathbb{E} \left[ \text{tr}(\mathbf{C}^t \mathbf{Q}) \right] \mathbf{1}_{t=t'} \right] \\ & = \mathbf{e}_{t,j}^{[2T]^\top} \bar{\mathbf{M}}^\top \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} \mathbf{e}_{i',j'}^{[2T]} - \frac{Tp}{n^t} \delta^t \mathbf{e}_{t,j}^{[2T]^\top} (\mathbf{I}_T \otimes \mathbf{1}_2 \mathbf{1}_2^\top) \mathbf{e}_{i',j'}^{[2T]} \end{aligned} $$

with

$$ \mathbf{C}^t := \mathbf{A}^{\frac{1}{2}} (\mathbf{E}_{tt} \otimes \mathbf{I}_p) \mathbf{A}^{\frac{1}{2}}. $$

So finally

$$ \begin{aligned} \mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right] & \approx \frac{\mathbb{E} \left[ \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q}_{-i, -i'} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right]}{(1 - \delta^t)(1 - \delta^{t'})} \\ & = \frac{\mathbf{e}_{t,j}^{[2T]^\top}}{1 - \delta^t} \left( \bar{\mathbf{M}}^\top \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} - \frac{Tc}{\rho^t} \delta^t \mathbf{I}_T \otimes \mathbf{1}_2 \mathbf{1}_2^\top \right) \frac{\mathbf{e}_{t',j'}^{[2T]^\top}}{1 - \delta^{t'}}. \end{aligned} $$

Going back to the quantity we want to estimate,

$$ \sum_{i'} \frac{y_{i'}}{Tp} \frac{\mathbf{e}_{t',j'}^{[2T]}}{1 - \delta^{t'}} = \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \mathbf{D}_{\tilde{\mathbf{y}}} $$

with $\bar{d}_{j_1, j_2}^t = \frac{1}{n_{t,j_1}^t} \sum_{i' | x_i \in C_{j_1}^t} d_{i'j_2}^t$ and

$$ \bar{\mathbf{D}} = \sum_{t=1}^{T} \mathbf{E}_{tt} \otimes \begin{pmatrix} \bar{d}_{11}^t & \bar{d}_{12}^t \\ \bar{d}_{21}^t & \bar{d}_{22}^t \end{pmatrix}, $$

so we have

$$ \mathbb{E}[f_i] = \frac{\mathbf{e}_{t,j}^{[2T]^\top}}{1 - \delta^t} \left( \bar{\mathbf{M}}^\top \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} - \frac{Tc}{\rho^t} \delta^t \mathbf{I}_T \otimes \mathbf{1}_2 \mathbf{1}_2^\top \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \mathbf{D}_{\tilde{\mathbf{y}}}. $$

Let us define

$$ \mathbf{\Theta} := \bar{\mathbf{M}}^\top \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}} \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} = \mathbf{\Theta}_0 (\mathbf{I}_{2T} - \mathcal{D}_{\tilde{\delta}} \mathbf{\Theta}_0)^{-1} $$

$$ \mathbb{E}[f_i] = \frac{\mathbf{e}_{t,j}^{[2T]^\top}}{1 - \delta^t} \left( \mathbf{\Theta} - \frac{Tc}{\rho^t} \delta^t \mathbf{I}_T \otimes \mathbf{1}_2 \mathbf{1}_2^\top \right) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \mathbf{D}_{\tilde{\mathbf{y}}} $$

As $\mathbf{\Gamma} = \mathbf{I}_T \otimes \mathbf{1}_2 \mathbf{1}_2^\top$ and $\gamma^t = \frac{Tc\delta^t}{\rho^t}$, we can conclude that:

$$ m_j^t = \mathbb{E}[f_i] = \frac{\mathbf{e}_{t,j}^{[2T]^\top}}{1 - \delta^t} (\mathbf{\Theta} - \gamma^t \mathbf{\Gamma}) \mathcal{D}_{\tilde{\delta}} \mathcal{D}_{\eta} \mathbf{D}_{\tilde{\mathbf{y}}} \quad (22) $$

## C. Second order deterministic equivalent

In the following, we will need a deterministic equivalent for $\mathbf{Q}\mathbf{C}_j^t\mathbf{Q}$ (which is not $\bar{\mathbf{Q}}\mathbf{C}_j^t\bar{\mathbf{Q}}$). An analysis similar to the one performed in E-A, allows to show that:

$$ \begin{aligned} \mathbb{E} \left[ \mathbf{u}^\top \mathbf{Q} \mathbf{C}_j^t \mathbf{Q} \mathbf{v} \right] - \mathbf{u}^\top \bar{\mathbf{Q}} \mathbf{C}_j^t \bar{\mathbf{Q}} \mathbf{v} \\ = \sum_{t',j'} \frac{n_{j'}^{t'}}{(Tp)^2 (1 - \delta^{t'})^2} \text{tr} \left( \bar{\mathbf{Q}} \mathbf{C}_j^t \bar{\mathbf{Q}} \mathbf{C}_{j'}^{t'} \right) \mathbb{E} \left[ \mathbf{u}^\top \mathbf{Q} \mathbf{C}_j^{t'} \mathbf{Q} \mathbf{v} \right] \end{aligned} $$

Until now we have the following (not deterministic) equivalent:

$$ \mathbf{Q}\mathbf{C}_j^t\mathbf{Q} \leftrightarrow \bar{\mathbf{Q}}\mathbf{C}_j^t\bar{\mathbf{Q}} + \sum_{t',j'} \frac{n_{j'}^{t'}}{(Tp)^2 (1 - \delta^{t'})^2} \text{tr} \left( \bar{\mathbf{Q}}\mathbf{C}_j^t\bar{\mathbf{Q}}\mathbf{C}_{j'}^{t'} \right) \mathbf{Q}\mathbf{C}_{j'}^{t'}\mathbf{Q} \quad (23) $$

First of all, as $\mathbf{C}_j^t$ is a small-rank perturbation of $\mathbf{C}^t$ and $\bar{\mathbf{Q}}$ is a small-rank perturbation of $\bar{\mathbf{Q}}_0$:

$$ \begin{aligned} \frac{1}{Tp} \text{tr} \left( \bar{\mathbf{Q}} \mathbf{C}_j^t \bar{\mathbf{Q}} \mathbf{C}_{j'}^{t'} \right) &= \frac{1}{Tp} \text{tr} \left( \bar{\mathbf{Q}}_0 \mathbf{C}^t \bar{\mathbf{Q}}_0 \mathbf{C}^{t'} \right) \\ &= \frac{1}{T} \text{tr} \left( \mathbf{E}_{tt} \mathbf{A} \mathbf{E}_{t't'} \mathbf{A} \right) = \frac{\mathbf{A}_{tt'}^2}{T} \end{aligned} $$

Let's define

$$ \bar{\mathbf{S}}^{tt'} = \frac{1}{Tc(1 - \delta^{t'})^2} \frac{1}{Tp} \text{tr} \left( \bar{\mathbf{Q}} \mathbf{C}^t \bar{\mathbf{Q}} \mathbf{C}^{t'} \right) = \frac{\mathbf{A}_{tt'}^2}{T^2 c(1 - \delta^{t'})^2} $$

$$ \mathbf{S}^{tt'} = \frac{1}{Tc(1 - \delta^{t'})^2} \frac{1}{Tp} \mathbb{E} \left[ \text{tr} \left( \mathbf{Q} \mathbf{C}^t \mathbf{Q} \mathbf{C}^{t'} \right) \right] $$

One can deduce from (23) that $\mathbf{S} = \bar{\mathbf{S}} + \bar{\mathbf{S}}\mathcal{D}_{\bar{\rho}}\mathbf{S}$, so $\mathbf{S} = \bar{\mathbf{S}}(\mathbf{I}_T - \mathcal{D}_{\bar{\rho}}\bar{\mathbf{S}})^{-1}$. Similarly, it follows that:

$$ \mathbf{Q}\mathbf{C}_j^t\mathbf{Q} \leftrightarrow \bar{\mathbf{Q}}\mathbf{C}_j^t\bar{\mathbf{Q}} + \sum_{t',j'} \rho_{j'}^{t'} \mathbf{S}^{tt'} \bar{\mathbf{Q}}\mathbf{C}_{j'}^{t'}\bar{\mathbf{Q}} \quad (24) $$

## D. Computation of the variance

Under assumption 2, the second order moment can be computed as:

$$ \begin{aligned} \mathbb{E}[f_i^2] = & \frac{1}{(Tp)^2} \sum_{i'} \mathbb{E} \left[ \mathbf{z}_{i'}^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_i \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i'} \right] y_{i'}^2 \\ & \stackrel{:=C_1}{=} \frac{1}{(Tp)^2} \sum_{i' \neq i''} \mathbb{E} \left[ \mathbf{z}_{i'}^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_i \mathbf{z}_i^\top \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i''} \right] y_{i''} y_{i'} \end{aligned} $$

• Computation of $C_1$

$$ \begin{aligned} C_1 &= \frac{1}{(Tp)^2} \sum_{i'} \frac{\mathbb{E} \left[ \text{tr} \left( \mathbf{Q} \mathbf{C}^t \mathbf{Q} \mathbf{C}^{t'} \right) \right]}{(1 - \delta^t)^2 (1 - \delta^{t'})^2} y_{i'}^2 \\ &= \sum_{t'} \frac{\rho^{t'} \mathbf{S}^{tt'}}{(1 - \delta^t)^2} \eta^{t'} (\tilde{y}_1^{t'} \quad \tilde{y}_2^{t'}) \begin{pmatrix} \tilde{d}_{11}^{t'} & \tilde{d}_{12}^{t'} \\ \tilde{d}_{21}^{t'} & \tilde{d}_{22}^{t'} \end{pmatrix} \begin{pmatrix} \tilde{y}_1^{t'} \\ \tilde{y}_2^{t'} \end{pmatrix} \\ &= \tilde{\mathbf{y}}^\top \left( \mathbf{T}^t \odot \tilde{\mathbf{D}} \right) \tilde{\mathbf{y}}. \end{aligned} $$
with $\tilde{d}_{j_1j_2}^t = \frac{1}{n_t^t} \sum_{i|\mathbf{x}_i \in C^t} d_{ij_1}^t d_{ij_2}^t$, if we further define

$$ 
\begin{aligned}
\tilde{\mathbf{D}} &= \sum_{t=1}^{T} \mathbf{E}_{tt} \otimes \begin{pmatrix} \tilde{d}_{11}^t & \tilde{d}_{12}^t \\ \tilde{d}_{21}^t & \tilde{d}_{22}^t \end{pmatrix} \\
\mathbf{T}^t &= \frac{1}{(1 - \delta^t)^2} \mathcal{D}_{\rho \odot \tilde{\eta} \odot \mathbf{S}^t} \otimes \mathbb{1}_2 \mathbb{1}_2^\top.
\end{aligned}
$$

• Computation of $C_2$

Using 21 and 19, we have

$$ 
\begin{aligned}
\mathbb{E} \left[ \mathbf{z}_{i'}^{\top} \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i} \mathbf{z}_{i'}^{\top} \mathbf{A}^{\frac{1}{2}} \mathbf{Q} \mathbf{A}^{\frac{1}{2}} \mathbf{z}_{i''} \right] \\
&= \frac{\mathbf{e}_{t',j'}^{[2T]^\top}}{1 - \delta^{t'}} \underbrace{\frac{\bar{\mathbf{M}}^{\top} \mathbf{A}^{\frac{1}{2}} \mathbb{E} [\mathbf{Q} \mathbf{C}_j^t \mathbf{Q}] \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}}}{(1 - \delta^t)^2}}_{:= \mathcal{U}_1^t} \\
&\quad - T c \mathbf{S}^{tt'} \mathbf{e}_{t',j'}^{[2T]^\top} \underbrace{\frac{\mathbf{\Gamma}}{(1 - \delta^t)^2} \frac{T c}{\rho^{t'}} \mathbf{e}_{t'',j''}^{[2T]}}_{:= \mathcal{U}_2^t} \\
&\quad + T c \mathbf{e}_{t',j'}^{[2T]^\top} \underbrace{\left( \frac{(\mathbf{\Theta} - \gamma^t \mathbf{\Gamma})}{(1 - \delta^t)^2} \frac{\mathbf{S}^{tt'}}{1 - \delta^{t''}} + \frac{\mathbf{S}^{t''}}{1 - \delta^{t'}} \mathcal{U}_3^t \right)}_{:= \mathcal{U}_3^t} \mathbf{e}_{t'',j''}^{[2T]}.
\end{aligned}
$$

Let us decompose

$$ 
\begin{aligned}
\bar{\mathbf{M}}^{\top} \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{Q}}_0 \left( \mathbf{C}_j^t + \sum_{t',j'} \rho_{j'}^{t'} \mathbf{S}^{tt'} \mathbf{C}_{j'}^{t'} \right) \bar{\mathbf{Q}}_0 \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} \\
= \mathbf{\Theta}_0 \left( \mathbf{e}_{t,j}^{[2T]} \mathbf{e}_{t,j}^{[2T]^\top} + \mathcal{D}_{\mathbf{r}^t} \right) \mathbf{\Theta}_0 + \underbrace{\left( \bar{\mathbf{V}}^t \otimes \mathbb{1}_2 \mathbb{1}_2^\top \right) \odot \mathbf{M}^{\top} \mathbf{M}}_{:= \bar{\mathbf{\Omega}}_0^t},
\end{aligned}
$$

with $\mathbf{r}^t = \rho \odot (\mathbf{S}^t \otimes \mathbb{1}_2 \mathbb{1}_2^\top)$ and $\bar{\mathbf{V}}^t = \mathbf{V}^t + \sum_{t'} \rho^{t'} \mathbf{S}^{tt'} \mathbf{\nu}^{t'}$. We thus have:

$$ 
\begin{aligned}
\bar{\mathbf{M}}^{\top} \mathbf{A}^{\frac{1}{2}} \mathbb{E}[\mathbf{Q} \mathbf{C}_j^t \mathbf{Q}] \mathbf{A}^{\frac{1}{2}} \bar{\mathbf{M}} \\
= \mathbf{\Theta} \left( \mathbf{e}_{t,j}^{[2T]} \mathbf{e}_{t,j}^{[2T]^\top} + \mathcal{D}_{\mathbf{r}^t} \right) \mathbf{\Theta} \\
+ \underbrace{(\mathbf{I}_{2T} - \mathbf{\Theta}_0 \mathcal{D}_{\bar{\mathbf{\delta}}})^{-1} \bar{\mathbf{\Omega}}_0^t (\mathbf{I}_{2T} - \mathcal{D}_{\bar{\mathbf{\delta}}} \mathbf{\Theta}_0)^{-1}}_{:= \bar{\mathbf{\Omega}}^t}.
\end{aligned}
$$

$$ C_2 = \frac{1}{(1 - \delta^t)^2} \tilde{\mathbf{y}}^{\top} \bar{\mathbf{D}}^{\top} \mathcal{D}_{\eta} \left[ \mathcal{D}_{\bar{\mathbf{\delta}}} \mathbf{\Theta} \left( \mathbf{e}_{t,j}^{[2T]} \mathbf{e}_{t,j}^{[2T]^\top} + \mathcal{D}_{\mathbf{r}^t} \right) \mathbf{\Theta} \mathcal{D}_{\bar{\mathbf{\delta}}} \right. \\
\left. + \mathcal{D}_{\bar{\mathbf{\delta}}} \bar{\mathbf{\Omega}}^t \mathcal{D}_{\bar{\mathbf{\delta}}} - \bar{\mathbf{\Gamma}}^t \mathcal{D}_{\mathbf{r}^t} + 2 \mathcal{D}_{\bar{\mathbf{\delta}}} (\mathbf{\Theta} - \gamma^t \mathbf{\Gamma}) \mathcal{D}_{\mathbf{r}^t} \right] \mathcal{D}_{\eta} \bar{\mathbf{D}} \tilde{\mathbf{y}} $$

As $\mathrm{Var}(q_i) = C_1 + C_2 - m_j^{t2}$, we finally have:

$$ 
\begin{aligned}
\sigma^{t2} = \frac{1}{(1 - \delta^t)^2} \tilde{\mathbf{y}}^{\top} (\mathbf{T}^t \odot \tilde{\mathbf{D}}) \tilde{\mathbf{y}} \\
+ \frac{1}{(1 - \delta^t)^2} \tilde{\mathbf{y}}^{\top} \bar{\mathbf{D}}^{\top} \mathcal{D}_{\eta} \mathcal{D}_{\bar{\mathbf{\delta}}} (\mathbf{\Theta} \mathcal{D}_{\mathbf{r}^t} \mathbf{\Theta} + \bar{\mathbf{\Omega}}^t - \gamma^{t2} \bar{\mathbf{\Gamma}}^t) \mathcal{D}_{\bar{\mathbf{\delta}}} \mathcal{D}_{\eta} \bar{\mathbf{D}} \tilde{\mathbf{y}} \\
+ \frac{1}{(1 - \delta^t)^2} \tilde{\mathbf{y}}^{\top} \bar{\mathbf{D}}^{\top} \mathcal{D}_{\eta} [2 \mathcal{D}_{\bar{\mathbf{\delta}}} (\mathbf{\Theta} - \gamma^t \mathbf{\Gamma}) - \bar{\mathbf{\Gamma}}^t] \mathcal{D}_{\mathbf{r}^t} \mathcal{D}_{\eta} \bar{\mathbf{D}} \tilde{\mathbf{y}},
\end{aligned}
$$

with

$$ \mathcal{U} = \mathbf{\Theta} \mathbf{e}_{t,j}^{[2T]} \mathbf{e}_{t,j}^{[2T]^\top} \mathbf{\Theta} - \gamma^{t2} \underbrace{\mathbf{E}^{tt} \otimes (\mathbb{1}_2 \mathbb{1}_2^\top)}_{:= \bar{\mathbf{\Gamma}}^t}. $$

REFERENCES

[1] N. C. Thompson, K. Greenewald, K. Lee, and G. F. Manso, “The Computational Limits of Deep Learning,” arXiv, Tech. Rep. arXiv:2007.05558, Jul. 2022, arXiv:2007.05558 [cs, stat] type: article. [Online]. Available: http://arxiv.org/abs/2007.05558

[2] I. Illich, *Tools for Conviviality*. Harper & Row, 1973.

[3] X. Mai and R. Couillet, “Consistent semi-supervised graph regularization for high dimensional data,” *Journal of Machine Learning Research*, vol. 22, no. 94, pp. 1–48, 2021. [Online]. Available: http://jmlr.org/papers/v22/19-081.html

[4] D. Zhou, O. Bousquet, T. N. Lal, J. Weston, and B. Schölkopf, “Learning with local and global consistency,” in *Advances in Neural Information Processing Systems 16 (NIPS 2003)*, 2003.

[5] K. Avrachenkov, A. Mishenin, P. Gonçalves, and M. Sokol, “Generalized Optimization Framework for Graph-based Semi-supervised Learning,” in *Proceedings of the 2012 SIAM International Conference on Data Mining*. Society for Industrial and Applied Mathematics, Apr. 2012, pp. 966–974.

[6] B. Shahshahani and D. Landgrebe, “The effect of unlabeled samples in reducing the small sample size problem and mitigating the hughes phenomenon,” *IEEE Transactions on Geoscience and Remote Sensing*, vol. 32, no. 5, pp. 1087–1095, 1994.

[7] F. G. Cozman and I. Cohen, “Risks of semi-supervised learning: How unlabeled data can degrade performance of generative classifiers,” in *Semi-Supervised Learning*, 2006. [Online]. Available: https://apisemanticscholar.org/CorpusID:63547716

[8] O. Chapelle, B. Schölkopf, and A. Zien, *Semi-Supervised Learning*. The MIT Press, 09 2006. [Online]. Available: https://doi.org/10.7551/ mitpress/9780262033589.001.0001

[9] S. Ben-David, T. Lu, and D. Pál, “Does unlabeled data provably help? worst-case analysis of the sample complexity of semi-supervised learning,” in *Annual Conference Computational Learning Theory*, 2008. [Online]. Available: https://apiidis semanticscholar.org/CorpusID:7670149

[10] M. Tiomoko, R. Couillet, and H. Tiomoko, “Large dimensional analysis and improvement of multi task learning,” arXiv preprint arXiv:2009.01591, 2020.

[11] T. Evgeniou and M. Pontil, “Regularized multi-task learning,” in *Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining*, ser. KDD ’04. New York, NY, USA: Association for Computing Machinery, 2004, p. 109–117. [Online]. Available: https://doi.org/10.1145/1014052.1014067

[12] M. Ledoux, *The concentration of measure phenomenon*. American Mathematical Society, 2001.

[13] N. El Karoui, “Concentration of measure and spectra of random matrices: Applications to correlation matrices, elliptical distributions and beyond,” *The Annals of Applied Probability*, vol. 19, no. 6, Dec. 2009. [Online]. Available: http://dx.doi.org/10.1214/08-AAP548

[14] M. E. A. Seddik, C. Louart, M. Tamaazousti, and R. Couillet, “Random matrix theory proves that deep learning representations of gan-data behave as gaussian mixtures,” in *International Conference on Machine Learning*, 2020. [Online]. Available: https://apiidis semanticscholar.org/ CorpusID:210868271

[15] T. Joachims, “Transductive Learning via Spectral Graph Partitioning,” 2003.

[16] X. Zhu, Z. Ghahramani, and J. Lafferty, “Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions,” 2003.

[17] X. Mai and R. Couillet, “A random matrix analysis and improvement of semi-supervised learning for large dimensional data,” *The Journal of Machine Learning Research*, vol. 19, no. 1, pp. 3074–3100, 2018.

[18] C. Bishop, *Pattern Recognition and Machine Learning*. Springer New York, NY, 2006.

[19] A. Rocha and S. K. Goldenstein, “Multiclass from binary: Expanding one-versus-all, one-versus-one and ecoc-based approaches,” *IEEE Transactions on Neural Networks and Learning Systems*, vol. 25, no. 2, pp. 289–302, 2014.

[20] M.-T. Nguyen and R. Couillet, “Asymptotic bayes risk of semi-supervised multitask learning on gaussian mixture,” 2023.

[21] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” 2015.

[22] A. Brock, J. Donahue, and K. Simonyan, “Large scale gan training for high fidelity natural image synthesis,” 2019.

[23] R. Couillet and Z. Liao, *Random Matrix Methods for Machine Learning*. Cambridge University Press, 2022.