## 6 Conclusions and Future Work  
In this paper, we first investigated the localization problem in modern RIS-enhanced wireless communication networks. Model-driven methods usually rely on sophisticated communication models and set specific optimization goals to realize accurate localization. However, the complexity of these models grows fast as the numbers of BSs and DOI increase. This restricts their application scope. Although several data-driven methods have addressed this problem, they unrealistically assumed that the RIS is solely deployed for localization. Both model- and data-driven methods share the same drawbacks in that they require the RIS codewords for location inference, which induces a huge additional communication burden. These observations inspired us to design a localization solution for RIS-enhanced environments which can decouple the correlation between fingerprints and codewords and be code-word independent. We designed a pre-processing step to transform the fingerprints into graphs for the heterogeneous GNN-based feature extractor to make full use of the non-Euclidean features of the fingerprints, especially when they are collected in environments with multiple operating frequencies. Our offline training pipeline enabled the feature extractor to generate the representations of the fingerprint graphs and feed them into both the MLP-based location estimator and the CV-MLP codeword discriminator for location and \begin{table}
\begin{tabular}{c|c c c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Oracle Case**} & \multicolumn{4}{c}{**Our Solution**} & \multicolumn{4}{c}{**Baseline Case**} \\ \hline \multirow{2}{*}{\(\sigma\) **[dB]**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} \\  & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** \\ \hline
0 & 0.045 & 0.002 & 0.047 & 0.003 & 0.050 & 0.007 & 0.090 & 0.018 & 2.053 & 0.958 & 2.956 & 1.033 \\
5 & 0.353 & 0.315 & 0.430 & 0.298 & 0.552 & 0.556 & 0.858 & 1.280 & 3.522 & 2.118 & 4.104 & 2.022 \\
10 & 0.517 & 0.402 & 0.802 & 0.910 & 1.279 & 3.569 & 1.435 & 2.994 & 4.200 & 2.430 & 4.881 & 3.291 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The localization errors (\(m\)) of LoS (orange) and NLoS (blue) areas for the oracle/baseline cases and our solution when \(\{C=144,A=51.84,\sigma=0/5/10\}\). Figure 19: The location-estimation errors of both LoS and NLoS areas for the oracle/baseline cases and our solution when \(\{C=144,A=51.84,\sigma=0/5/10\}\). Given the squared error set \(e\), for each bar, the middle line is \(mean(e)\), i.e., MSE, and its height ranges from \(\text{MSE}-std(e)\) to \(\text{MSE}+std(e)\). \begin{table}
\begin{tabular}{c|c c c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Oracle Case**} & \multicolumn{4}{c}{**Our Solution**} & \multicolumn{4}{c}{**Baseline Case**} \\ \hline \multirow{2}{*}{\(\sigma\) **[dB]**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} & \multicolumn{2}{c}{**LoS**} & \multicolumn{2}{c}{**NLoS**} \\  & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** & **MSE** & **Var** \\ \hline
0 & 0.045 & 0.002 & 0.047 & 0.003 & 0.050 & 0.007 & 0.090 & 0.018 & 2.053 & 0.958 & 2.956 & 1.033 \\
5 & 0.353 & 0 codeword estimation, respectively. Then, the gradients from the codeword discriminator were reversed by a gradient reversal layer to perform adversarial learning on the codeword domain during backpropagation to ensure the distributions of the representations for different codewords are as similar as possible. By doing so, the feature extractor could extract codeword-independent features for location inference, thereby eliminating the need to have the codewords for the online inference stage. We evaluated our system using the O1 scenario in the DeepMIMO dataset.