## 4 Codeword-Independent Localization
### Fingerprint-Graph Transformer  
We extend the fingerprint-graph transformer of our prior work [74] described in Section 3.2[74] by considering the RIS as vertices in graphs. We first define the localization scenario. Suppose a communication system operates in frequencies \(F=\{f_{1},f_{2},\ldots\}\). For each \(f\in F\), there are several BSs \(B_{f}=\{b_{f}^{1},b_{f}^{2},\ldots\}\) whose locations \(\mathcal{L}(\cdot)\) are known. The DOI can measure the RSSI for all BSs operating in all frequencies. Finally, there is an RIS in this system whose function is unknown, whereas we know its location. Now we can start to build graphs.  
We consider the BSs, the RISs, and the DOIs as vertices in a graph. Then, we can construct a sub-graph for every \(f\in F\), as shown in the left part of Figure 11, including \(B_{f}\), the RIS, and the DOI. Note that the DOI and the RIS are shared among sub-graphs. The BSs in different \(f\) should be categorized as different kinds of vertices, inducing heterogeneous graphs when \(|F|>1\). Actually, the RF signals of type \(T\) in Section 3.2 and the operating frequency \(F\) here play the same role--i.e., as a means of discrimination between different sub-graphs. This is because, for different \(f\), the signal propagation laws are still different, which also require different sets of model parameters to encode. The vertex features for every BS \(b\) are \([RSSI_{b},\mathcal{L}(b)]\), where \(RSSI_{b}\) is the RSSI value of \(b\) measured by the DOI. We can also assign vertex features of the RIS by \(\mathcal{L}(\text{RIS})\).  
Next, we consider the connectivity between vertices. The right part of Figure 11 illustrates the edges among all vertices. Following the assumptions of Section 3.2, we fully connect \(B_{f}\) within each sub-graph by bidirectional edges. For the direct links, the edges are unidirectional from BSs to the DOI, as the DOI is a measuring device here. Similarly, the RIS is also a (nearly) passive device [83], so the RIS-assisted links are also unidirectional from the BSs to the RIS and from the RIS to the DOI. In doing so, these edges represent all possible signal propagations and interferences in this communication system. Additionally, for the edges among BSs and edges from BSs to the RIS, we also assign edge features by log-normal shadowing model (LNSM) (see Section 3.2), indicating the theoretical relative strength of signal attenuation in between.  
This way, given arbitrary fingerprints, we can apply the transformation method to generate a corresponding heterogeneous graph containing \(|F|\) sub-graphs, which is ready  
Figure 11: A fingerprint-graph transformation example for \(F=\{f_{1},f_{2}\}\).  
Figure 10: The online inference pipeline of our proposed system.  
to be fed into the GNN-based feature extractor. Some may argue that this preprocessing method involves locations of BSs and DOI, which results in additional communication burdens compared with transmitting RIS codewords. However, we can easily represent the locations by 3-axis coordinates, which are much simpler than large CV vectors of codewords. Meanwhile, the locations of BSs and RIS are unlikely to change very often; thus, infrequent updates are sufficient.