## 3 Proposed CNN-Based Power Allocation Method
### Motivation for Using CNN  
Traditional power allocation schemes such as equal power allocation and max-min power allocation either lack adaptability or sacrifice efficiency. Heuristic methods do not account for spatial variations and channel diversity, while fairness-oriented strategies such as max-min improve service guarantees for weak users at the cost of degrading high-quality links. Moreover, many learning-based approaches focus only on AP-to-UE power allocation, treating CPU-to-AP power as fixed or uniform. This simplification neglects the reality that AP-UE link quality, distance, and interference vary significantly across the network. Consequently, uniform CPU-to-AP allocation can result in resource misalignment, as some APs may require more power to maintain reliable communication but be under-provisioned due to their static assignment.  
To validate the design choice of using a CNN-only architecture, a CNN-LSTM variant was constructed by appending a recurrent layer to the convolutional feature extractor. Although the CNN-LSTM model has a smaller parameter count, it incurs significantly higher inference latency due to the sequential nature of LSTM operations [19].  
Figure 2 presents a radar chart that compares the two models in terms of five normalized criteria, namely, inverse latency, inverse parameter count, real-time suitability, training stability, and architectural simplicity. To enable fair comparison, all scores are normalized to the range [0, 1]. The inference times for the CNN and CNN-LSTM models were measured as 9.68 ms and 18.29 ms, respectively, and the corresponding parameter counts were 34.7 million and 9.8 million. These values were normalized using inverse scaling, with each score computed as follows: \(\text{Score}(x)=\min(x)/x\). The qualitative metrics were scored based on architectural depth, convergence behavior, and observed inference consistency. The CNN model demonstrates strong advantages in four out of five dimensions, particularly in inference latency and deployment efficiency, while the CNN-LSTM model benefits from a smaller parameter count. Table 2 provides the corresponding numerical results.  
These results indicate that the CNN model achieves a superior tradeoff between architectural simplicity and inference speed, making it more appropriate for real-time power allocation in per-snapshot cell-free massive MIMO systems.  
CNNs are particularly well suited to wireless network applications due to their ability to extract local spatial correlations through shared weights and small receptive fields.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Parameter Count** & **Inference Time (ms)** \\ \hline CNN & 34.7M & 9.68 \\ CNN–LSTM & 9.8M & 18.29 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of parameter count and inference time  
Figure 2: Radar chart comparing CNN and CNN–LSTM models.  
In cell-free massive MIMO systems, where the spatial arrangement of APs and UEs directly impacts interference and link performance, CNNs can learn how geometry and environmental conditions affect power demand. This enables flexible and adaptive power allocation tailored to network topology. Building on these strengths, this study proposes a CNN model that simultaneously learns both stages of power allocation, i.e., CPU-to-AP and AP-to-UE, within a unified framework. By learning spatial relationships and channel patterns, the model determines power allocations based not only on instantaneous channel gain but also on the level of power that each UE requires to meet its SINR target under adverse conditions.