## 3 Methodology
### Bayesian Optimization-Based Neural Architecture Search  
The foundation of our approach lies in automatically discovering efficient architectural configurations through Bayesian Optimization. Our search space \(\mathcal{S}\) encompasses a comprehensive range of architectural parameters controlling network depth, width, and component selection. Specifically, we define a flexible architecture template that processes CSI data through a configurable pipeline of convolutional, recurrent, and transformer layers.  
The search space includes the following hyperparameters: number of convolutional layers (\(L_{c}\in[1,5]\)), filters per layer (\(C\in\{2^{1},2^{2},2^{3},2^{4},2^{5}\}\)), kernel sizes (\(k\in[3,7]\)), LST M presence (\(\delta_{L}\in\{0,1\}\)), LSTM hidden units (\(H_{L}\in\{2^{4},2^{5},2^{6},2^{7}\}\)), transformer presence (\(\delta_{T}\in\{0,1\}\)), and transformer embedding dimensions (\(D_{T}\in\{2^{4},2^{5},2^{6},2^{7}\}\)). Each architecture \(a=(L_{c},C,k,\delta_{L},H_{L},\delta_{T},D_{T})\) represents a unique configuration within this space.  
We employ a Gaussian process surrogate model over the following objective function:  
\[f(a)\sim\mathcal{GP}(\mu(a),k(a,a^{\prime})) \tag{1}\]  
where \(f(a)\) denotes the validation accuracy of architecture \(a\). The search process is guided by the Expected Improvement acquisition function:  
\[\text{EI}(a|\mathcal{M})=\mathbb{E}\big{[}\max(f(a)-f(a^{+}),0)\big{]} \tag{2}\]  
with \(f(a^{+})\) representing the best observed performance.  
The architecture search process is formalized in Algorithm 1, which details our implementation using PyTorch and the BoTorch library. The search begins with random sampling to establish a baseline, followed by iterative optimization guided by the surrogate model. Each candidate architecture undergoes training for 20-30 epochs with early stopping to efficiently evaluate its potential.  
Following architecture search, we apply specialized pruning techniques tailored to different network components. Our pruning strategy distinguishes between convolutional and transformer layers, applying appropriate methods for each type while maintaining model functionality.  
For convolutional layers, we implement an iterative magnitude-based channel pruning approach. Given a convolutional layer with weight tensor \(W\in\mathbb{R}^{C_{in}\times C_{out}\times k_{h}\times k_{w}}\), we compute channel importance scores using the \(L_{1}\) norm:  
\[I_{c}=\big{\|}W_{c;c;c}\big{\|}_{1} \tag{3}\]The pruning proceeds gradually over multiple steps, with the per-step ratio calculated as follows:  
\[r=1-(1-s)^{1/K} \tag{4}\]  
where \(s\) is the target sparsity and \(K\) is the number of pruning steps.  
```
0: Search space \(\mathcal{S}\), training data \(D_{\text{train}}\), validation data \(D_{\text{val}}\), initial samples \(n_{0}\), total iterations \(T\)
0: Best found architecture \(a^{*}\)
1:\(\mathcal{D}\leftarrow\emptyset\)\(\triangleright\) Initialize dataset
2:for\(i=1\) to \(n_{0}\)do
3:\(a_{i}\sim\mathcal{S}\)\(\triangleright\) Random sampling
4:\(y_{i}\leftarrow\text{Evaluate}(a_{i})\)\(\triangleright\) Train and evaluate
5:\(\mathcal{D}\leftarrow\mathcal{D}\cup\{(a_{i},y_{i})\}\)
6:endfor
7:for\(t=n_{0}+1\) to \(T\)do
8: Fit GP model \(\mathcal{M}\) on \(\mathcal{D}\)
9:\(a_{t}\leftarrow\arg\max_{a\in\mathcal{S}}\operatorname{\mathbb{E}}(\mathcal{ A}\mathcal{M})\)
10:\(y_{t}\leftarrow\text{Evaluate}(a_{t})\)
11:\(\mathcal{D}\leftarrow\mathcal{D}\cup\{(a_{t},y_{t})\}\)
12:endfor
13:return\(a^{*}\leftarrow\arg\max_{(a,y)\in\mathcal{D}}y\)
```  
**Algorithm 1** Bayesian optimization for Neural Architecture Search