# Personalized Federated Multi-Task Learning over Wireless Fading Channels
## 2 System Model and Problem Formulation
### PF-MTL as Bilevel Optimization Problem  
The optimization problem in (4) can be rewritten as (5) because \(F^{(i)}(h^{(i)},\omega)\) relies on only \(h^{(i)}\) and \(\omega\) for all \(i\in[N]\), and \(h^{(i)}\) are independent of each other  
\[\min_{\omega\in\mathcal{W}}\min_{\{h^{(i)}\in\mathcal{H}\}_{i=1}^{N}}\frac{1} {N}\sum_{i=1}^{N}p^{(i)}F^{(i)}(h^{(i)},\omega) \tag{5}\]  
Equivalently, we have  
\[\min_{\omega\in\mathcal{W},\{h^{(i)}\in\mathcal{H}\}_{i=1}^{N}}\frac{1}{N} \sum_{i=1}^{N}p^{(i)}F^{(i)}(h^{(i)},\omega) \tag{6}\]  
Note that \(p^{(i)}\) values in (6) are obtained from our proposed _FedGradNorm_ algorithm which will be derived later as a consequence of another optimization problem. As a result, the problem can be expressed as a bilevel optimization problem, which is an optimization problem containing another optimization problem as a constraint  
\[\min_{x_{u}\in X_{u},x_{l}\in X_{l}} F(x_{u},x_{l})\] s.t. \[x_{l}=\operatorname*{arg\,min}_{x_{l}\in X_{l}}\{g(x_{u},x_{l}),\text{ s.t. }c_{j}(x_{u},x_{l})\leq 0,\ j=1,\ldots,J\}\] \[C_{m}(x_{u},x_{l})\leq 0,\quad m=1,\ldots,M \tag{7}\]  
where \(F(x_{u},x_{l})\) represents the upper-level objective function and \(g(x_{u},x_{l})\) represents the lower-level objective function. \(\{c_{j}(x_{u},x_{l})\leq 0,\ j=1,\ldots,J\}\) are the constraints for the lower-level optimization problem while \(\{C_{m}(x_{u},x_{l})\leq 0,m=1,\ldots,M\}\) and the lower-level optimization problem itself are the constraints for the upper-level optimization problem.  
Figure 1: Personalized federated learning (PFL) framework with a common network (shown in blue) and small personalized headers (shown in red, green, black).  
Multiple algorithms have been developed to solve bilevel optimization problems in the literature [31]. Different reformulations of the bilevel optimization problem have been made by utilizing the optimality conditions of the lower-level optimization problem to formulate the bilevel optimization problem as a single-level constraint problem [32; 33; 34]. In addition, there are recently developed gradient-based bilevel optimization algorithms [35; 36; 37; 38; 39; 40]. Our algorithm is based on iterative differentiation (ITD), as explained in Algorithm 1.  
```
Input:\(K\), \(D\), step sizes \(\alpha\), \(\beta\), initialization \(x_{u}(0)\), \(x_{l}(0)\). for\(k=0\), \(1\), \(2\), \(\ldots\), \(K\)do  Set \(x_{l}^{0}(k)=x_{l}^{0}(k-1)\) if \(k>0\) otherwise \(x_{l}(0)\). for\(t=1\), \(\ldots\), \(D\)do  Update \(x_{l}^{t}(k)=x_{l}^{t-1}(k)-\alpha\
abla_{x_{l}}\delta(x_{u}(k),x_{l}^{t-1}(k))\)  Compute \(\hat{\
abla}_{x_{u}}F(x_{u}(k),x_{l}^{D}(k))=\frac{\partial F(x_{u}(k),x_{l} ^{D}(k))}{\partial x_{u}}\)  Update \(x_{u}(k+1)=x_{u}(k)-\beta\hat{\
abla}_{x_{u}}F(x_{u}(k),x_{l}^{D}(k))\)
```  
**Algorithm 1** Iterative differentiation (ITD) algorithm.  
Updates to the upper-level optimization take place in the outer loop, while updates to the lower-level optimization are performed in the inner loop.  
For our problem, \(x_{u}\) and \(x_{l}\) correspond to \(\left(\{h^{(i)}\}_{i=1}^{N},\omega\right)\), \(\{p^{(i)}\}_{i=1}^{N}\), respectively. Additionally, \(x_{u}(k)\) and \(x_{l}(k)\) are denoted as \(\left(\{h^{(i)}\}_{i=1}^{N},\omega_{k}\right)\), \(\{p_{k}^{(i)}\}_{i=1}^{N}\) to represent the outer loop iteration index in Algorithm 1 for the rest of the paper. Furthermore, \(i\) in \(p_{k}^{i}\) represents the inner loop iteration index, while \(i\) in \(p_{k}^{(i)}\) represents the client index. Then, the bilevel optimization problem in our case can be written as  
\[\min_{\omega,\{h^{(i)}\}_{i=1}^{N}\cup\{p^{(i)}\}_{i=1}^{N}} F(\{h^{(i)}\}_{i=1}^{N},\omega,\{p^{(i)}\}_{i=1}^{N})\] s.t. \[\{p^{(i)}\}_{i=1}^{N}\in\operatorname*{arg\,min}_{\{p^{(i)}\}_{i= 1}^{N}\in\mathbb{R}^{N}}F_{grad} \tag{8}\]  
The objective function is a weighted sum of local loss functions, \(F=\frac{1}{N}\sum_{i=1}^{N}p^{(i)}F^{(i)}(h^{(i)},\omega)\), and \(F_{grad}\) is the auxiliary loss function defined by the _FedGradNorm_ algorithm in the next section.