## 2 System Model
### Problem Formulation  
In cell-free massive MIMO networks, efficient downlink power allocation plays a crucial role in achieving high SE and EE. The power control process involves two stages: power allocation from a CPU to each of the \(M\) APs, followed by power distribution from each AP to the \(K\) UEs that it serves. Let \(P_{\text{CPU-AP}}=[p_{1},p_{2},\ldots,p_{M}]\) denote the CPU-to-AP power allocation vector and let \(P_{\text{AP-UE}}=[p_{i,j}]\in\mathbb{R}^{M\times K}\) represent the AP-to-UE power allocation matrix, where \(p_{i,j}\) is the power allocated from AP \(i\) to UE \(j\). Max-min power allocation has traditionally been used as a fairness-oriented benchmark, aiming to maximize the minimum SINR across all UEs. However, this approach may limit performance for UEs with favorable channels. To overcome this limitation, a CNN-based power allocation framework is proposed which learns from max-min optimized data while incorporating additional spatial and contextual information such as channel state information, AP-UE distance, and interference conditions [18]. While trained on fairness-centric max-min results, the model learns to generalize beyond static optimization by inferring context-aware patterns. This allows it to adaptively allocate power in ways that improve both fairness and efficiency under realistic dynamic network conditions.  
During training, the CNN minimizes the error between its predicted power allocations and the optimal values obtained from max-min optimization [11]. The loss function is defined as follows:  
\[\min_{\theta}\frac{1}{N}\sum_{i=1}^{N}\Big{(}\|P_{\text{CPU-AP},i}^{\text{CNN}}- P_{\text{CPU-AP},i}^{\text{opt}}\|^{2}+\|P_{\text{AP-UE},i}^{\text{CNN}}-P_{ \text{AP-UE},i}^{\text{opt}}\|^{2}\Big{)} \tag{7}\]  
where \(P_{\text{CPU-AP},i}^{\text{CNN}}\) and \(P_{\text{AP-UE},i}^{\text{CNN}}\) are the CNN-predicted values and \(P_{\text{CPU-AP},i}^{\text{opt}}\), \(P_{\text{AP-UE},i}^{\text{opt}}\) are the max-min optimized references [3, 7]. To generate predictions, the trained CNN takes as input a tensor consisting of spatial and signal features such as large-scale fading coefficients, AP-UE distances, channel gain magnitudes, and estimated interference levels. These features are stacked into a multi-channel matrix of size \(C\times M\times K\), where \(C\) denotes the number of input feature types, \(M\) is the number of APs, and \(K\) is the number of UEs. The network outputs the CPU-AP and AP-UE power allocation values through two separate fully connected branches.  
The optimization is subject to practical constraints. The power allocated from the CPU to each AP must lie within a valid range:  
\[0\leq p_{i}\leq P_{\text{CPU-AP},\text{max}},\quad\forall i\in\{1,\dots,M\}. \tag{8}\]  
In addition, the total transmit power from each AP to its served UEs should not exceed the power it receives from the CPU:  
\[\sum_{j=1}^{K}p_{i,j}\leq p_{i},\quad\forall i\in\{1,\dots,M\}. \tag{9}\]  
To ensure reliable communication quality, each UE should also satisfy a minimum SINR requirement as follows:  
\[\text{SINR}_{j}\geq\gamma_{\text{min}},\quad\forall j\in\{1,\dots,K\} \tag{10}\]  
where \(\gamma_{\text{min}}\) denotes the minimum SINR threshold to guarantee acceptable service quality. In this study, \(\gamma_{\text{min}}\) is set as a design parameter based on typical quality of service requirements in downlink communication. This formulation establishes the power allocation problem as a constrained optimization task. In the next section, a learning-based solution using a CNN is presented to approximate this solution in a data-driven and scalable manner.