<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Y. Zhang);</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>DR-FSL : Distribution Relation Based Few-Shot Learning for Indoor Localization With CSI</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yingeng Zhang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wen Liu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhongliang Deng</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hailong Ren</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xudong Song</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Electronics Engineering, Beijing University of Posts and Telecommunications</institution>
          ,
          <addr-line>Beijing 100089</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>In this paper, we propose a few-shot indoor fingerprint localization model based on distribution relationship to solve the problem that it consumes a lot of labor and time costs again to collect and label ifngerprint data in the scene after replacement. The model uses only a small amount of fingerprint data from the new scene and reuses the large amount of fingerprint data already collected in other scenes, which improves the scalability of fingerprint location and enables it to be quickly applied to new scenes. In DR-FSL, Fingerprint Graph and Distribution Graph are constructed with fingerprint and fingerprint similarity distribution as nodes respectively, and fingerprint features and similarity distribution features are aggregated through the graph network to classify fingerprints by comparing fingerprint similarity and combining the distribution similarity, so that the model can distinguish unlabeled fingerprint using a small amount of labeled fingerprint. CSI data were collected in a complex lab and an integrated ofice, and the two scenes were set up alternately as a training scene where a large amount of data had been collected and a test scene to be localized for experiments. The experiments validate the superior performance of DR-FSL in terms of localization accuracy and stability for cross-scene few-shot localization. The results show that the amount of fingerprint data required in the new scenes is significantly reduced in the case that the localization performance of DR-FSL is comparable to that of the CNN-based model.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Indoor Localization</kwd>
        <kwd>Fingerprint Localization</kwd>
        <kwd>Few-Shot Learning</kwd>
        <kwd>WiFi Channel State Information</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        With the widespread deployment of wireless sensor devices in indoor environments,
wireless sensor networks (WSN) make up for the dificulty of global navigation and positioning
systems to achieve high-precision localization indoors, providing a strong prerequisite for indoor
location services[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. As common sensors and signal sources in WSN, Wi-Fi, Bluetooth, RFID,
and Ultra-wideband (UWB) are widely used in indoor wireless localization[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Among them,
Wi-Fi-based localization methods are favored by researchers because of their high localization
accuracy and low equipment cost[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Channel state information (CSI) from the wireless signal
of a Wi-Fi device contains multi-channel subcarrier phase and amplitude data, which provides
detailed information about the indoor environment and has become the most common wireless
signal feature for fingerprint construction[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        The Wi-Fi-based fingerprint localization method includes an ofline phase and an online
phase[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The ofline phase collects Wi-Fi signals at multiple reference points (RPS) to build a
ifngerprint database and train a localization model; the online phase collects real-time collected
Wi-Fi signals as fingerprints to compare with the fingerprint database to obtain predicted
location results for localization.The performance of Wi-Fi-based fingerprint localization mainly
depends on the degree of matching between real-time Wi-Fi signals and fingerprints in the
database, and the amount of fingerprint data collected in the ofline phase will significantly
afect the localization accuracy of the fingerprint localization system[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        A key challenge of Wi-Fi-based fingerprint localization methods is data collection and
labeling. When the location scene is replaced with a new scene, the space size, obstacle type,
Wi-Fi device location and fingerprint point distribution are completely changed, so the old and
new scenes are not correlated and heterogeneous with each other. Due to the environment
dependence of Wi-Fi signal[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the fingerprint database in the old scene is no longer available
in the new scene, so to deploy a highly accurate and robust indoor fingerprint location system
based on Wi-Fi in multiple scenes requires a lot of labor and time cost to repeatedly collect a large
amount of Wi-Fi data in diferent scenes to construct a fingerprint database, which prolongs
the deployment cycle of fingerprint location system and seriously hinders the widespread
deployment of fingerprint location system in indoor scenes[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Some researchers have tried to apply transfer learning to solve this problem. The idea is
to use the parameters of the localization model trained in other environments where a large
amount of data has been collected to help train the localization model for the target environment,
and in this way to accelerate and optimize the learning eficiency of the fingerprint localization
model in the new localization scene, so that the fingerprint localization system can be deployed
again in the new localization scene without using the same large amount of fingerprint data
to support the first deployment. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] used the idea of transfer learning to train a convolutional
neural network localization model after combining the Wi-Fi fingerprint data collected in 15
scenes, and then fine-tunes it for specific scenarios to apply to each single localization scene. For
ifngerprint-based localization, [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] proposed a transfer learning-based framework to reshape
the data distribution in the target domain based on the knowledge learned in the source domain,
reduce the ofline training overhead, and improve the system scalability of fingerprint-based
indoor localization. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] used a transfer learning approach to train the recognition neural
network by densely deploying a grid to collect fingerprints in an existing localization scenario,
and when redeployed to a new localization scenario, updating the localization network using
7% of the fingerprint samples can maintain high localization accuracy. To address the problem
of dynamic changes in the localization scene, [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] proposed a CSI-based inter-temporal indoor
localization method, which uses domain adaptive methods in transfer learning to shorten the
distribution distance between CSI fingerprint data after dynamic changes in the localization
scene and improve the ability of the localization system to cope with environmental changes. In
these works, fingerprint data of target localization scenes are still needed as a priori knowledge
to jointly participate in training localization models, and the obtained localization systems are
only migrated for specific target localization scenes, which still cannot be rapidly deployed in
diferent localization scenes and lack cross-scene robustness.
      </p>
      <p>
        In order to further improve the cross-scene robustness of fingerprint localization system
and increase the feasibility of rapid deployment in multiple scenes, this paper introduces the
idea of few-shot learning into the Wi-Fi-based fingerprint localization method[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Few-shot
learning aims to train a generic model that is rapidly applicable to a variety of tasks[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ][
        <xref ref-type="bibr" rid="ref15">15</xref>
        ],
in the case of Wi-Fi-based fingerprint localization studies, the task is localization in
multilocalization scenes.Unlike the transfer learning-based approach, our approach does not require
ifngerprint data from the target localization scene to participate in the training phase of the
localization model, and the resulting generic localization model only needs a small amount of
data in the target environment to achieve the localization efect through fingerprint recognition,
which is robust across scenarios and can be rapidly deployed in diferent heterogeneous scenes.
      </p>
      <p>
        Due to the influence of multipath propagation, Wi-Fi signals have the problems of low
feature resolution and fingerprint blurring in complex indoor environments, which will lead to
the similarity of the fingerprint data of wireless signals collected at diferent location points in a
uniform localization scene, thus making the fingerprint matching-based localization method less
accurate[
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. In order to ensure that when the wireless signal propagation in the localization
scene is seriously afected by multipath efect and the fingerprint data collected from diferent
ifngerprint points are similar, the few-shot fingerprint localization method still has the ability to
discriminate between fingerprints at diferent locations and maintain a high accuracy localization
efect across scenes. As shown in Figure 1, inspired by [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], our method classifies fingerprint by
comparing the similarity of fingerprints while considering the similarity distribution relationship
between each fingerprint sample.
      </p>
      <p>The main contributions of this paper are:
• We propose a fingerprint localization method that reduces the labor and time costs required
to collect and label fingerprint data in new scenes. The method enables fingerprint
localization in new scenes with only a small amount of fingerprint data by using fingerprint
data already collected and labeled in other environments to train the model and apply it
to new scenes.
• The method designs a few-shot learning model based on the distribution relationship to
classify and localize fingerprints by combining the similarity distribution relationship
between each fingerprint sample while comparing the similarity of fingerprints. The
model only needs to collect and label 1, 5 and 10 fingerprint samples at each RP in the new
scene. The performance of the model using only 10 samples per RP in the new scene is
comparable to that of the CNN-based fingerprint localization model using 400 fingerprint
samples per RP in the new scene as the training set, and the number of fingerprint samples
required is reduced by a factor of 40.
• In addition, we collected and labeled CSI data as fingerprint samples in two heterogeneous
scenes, a complex laboratory and an integrated ofice, and set both of them alternately
as a training scene with a large amount of data collected and a test scene to be
localized for experiments, respectively, to verify the superior performance of the proposed
method in terms of localization accuracy and stability for cross-scene few-shot fingerprint
localization.</p>
      <p>The rest of the paper is structured as follows. Section II introduces the preliminary
knowledge and defines the few-shot localization problem. Section III describes the proposed
method in detail. section IV shows the experimental setup and performance comparison, and
concludes the paper with an outlook in section V.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Preliminary</title>
      <p>Problem Definition : Few-shot learning trains a network model in the training phase to
enable it to achieve task efects well with only a small number of labeled samples for the target
task. As shown in Figure 2, we study indoor fingerprint localization in multiple heterogeneous
scenes based on few-shot learning. The localization task is modeled as a classification problem
to determine the fingerprint points belonging to the RP to be localized.Each localization task in a
heterogeneous scene contains a support set  and a query set . The training phase collects the
training dataset  in a certain scenario, and uses episodic training method to sample the
support set  and query set  from them in batches to simulate the few-shot learning setting
(i.e., the N-way K-shot setting) of the test task to train the model for the localization task in an
N-way K-shot few-shot learning localization task, the goal is to classify query fingerprints into
N classes with only K support examples per class. Thus the support set  contains N classes,
each with K samples, and can be denoted as  = {(1, 1) , (2, 2) , . . . , (×  , ×  )},The
query set  contains  fingerprint samples to be located, which can be expressed as  =
︀{ (× +1, × +1) , . . . , (︀ × +¯, × + ︀)} . In the training phase, samples from both
the support set  and the query set  contain location labels and are used to optimize the
network model. A test dataset  is collected in a localization scenario that is heterogeneous
from the training data collection scene, and the unlabeled fingerprint samples in the query set
 ⊂ test are located by the trained localization model based on a small number of labeled
ifngerprint samples in the support set  ⊂ test .</p>
      <p>CSI in few-shot learning: CSI represents the link characteristics of the wireless signal
propagating between the transmitting and receiving devices. It reflects the attenuation of the
wireless signal during propagation and the multipath efects caused by scattering, refraction, etc.
Due to the multipath efect, multiple subcarriers will propagate along diferent paths, and the
channel state information of each subcarrier has diferent amplitudes and phases, reflecting the
channel variations and signal distortion caused by scattering, fading and power distance fading.
CSI collected at diferent locations in indoor scenes is unique and can be used as "fingerprints" to
provide efective location information, which provides a good data base for few-shot fingerprint
localization based on CSI. When the localization scene is replaced, the old and new localization
scenes are heterogeneous with each other, the wireless signal propagation path is changed, the
CSI collected in the new scene reflects the new channel characteristics, and the CSI sample
distribution in the new scene difers from that in the old scene, and the location labels are
mutually exclusive, i.e., train ∩ test = ∅, which is consistent with the actual situation of
rapid deployment of fingerprint localization system across scenes.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Method</title>
      <p>In this section, we present the proposed few-shot indoor fingerprint localization scheme in
detail. Its core is to obtain the fingerprint similarity distribution relationship by propagating
and aggregating diferent CSI fingerprint feature information through a few-shot learning
graph neural network based on the distribution relationship to achieve fingerprint matching
localization.</p>
      <sec id="sec-3-1">
        <title>3.1. System Overview</title>
        <p>The proposed DR-FSL framework is shown in Figure 3, and the overall framework of the
scheme is an N-way K-shot few-shot learning model. First, the fingerprint samples from both
the support set and the query set are fed into the feature extraction network, and the feature
embeddings of all fingerprint samples are extracted as the features of the nodes through the
convolutional backbone. The Fingerprint Graph(FG) is constructed based on all nodes and the
inter-node similarity is calculated as a feature of the edges.</p>
        <p>Then we calculate the fingerprint sample similarity distribution features by Fingerprint
Similarity To Distribution Similarity using node features and edge features, construct a fully
connected graph Distribution Graph(DG) of distribution similarity as node features, and
calculate the similarity between DG nodes as edge features to represent the similarity distribution
relationship between fingerprint samples. Finally, the obtained edge features are passed through
Distribution Similarity To Fingerprint Similarity algorithm to update the node features
characterizing fingerprint information in FP. The above process is shown as arrows (  2, 2 ) in
Figure 3. After repeating the process for iteration, propagating and aggregating the fingerprint
sample features, the features of the nodes corresponding to the query set samples are input into
the Position Estimation network to achieve fingerprint matching and localization. The specific
algorithm and model information will be described in detail in the subsequent subsections.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. CSI Feature Extractor</title>
        <p>For a learning task T of N-way K-shot learning, the total number of CSI fingerprint samples
is KN+1 in both the training and testing phases. The CSI fingerprint samples in the support
set and query set are denoted by ,i=1,2,...,KN+1, and the true label of sample  is denoted
by one-hot encoded vector .If  belongs to the query set, then  = [︀ 1 , 1 , · · · , 1 ]︀  , to
represent the uniform distribution of this sample in the label space. The CSI fingerprint sample
consists of each subcarrier amplitude information,  ∈ R × ×  , where W is the number of
subcarriers contained in the CSI, H is the number of CSI packets composing the CSI fingerprint
sample, and M is the number of wireless signal propagation links. The convolutional neural
network  is designed for CSI fingerprint samples to extract their features, and the network
structure is shown in Figure 4.</p>
        <p>Through the above network, we get () ∈ R× 1,spliced with  to get the initial
features 0, = [︁ () ,  ]︁ ∈ R0× 1 of FG nodes, where 0 =  +  .
with the output being a feature vector containing location information.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Fingerprint Similarity To Distribution Similarity</title>
        <p>The features recorded at each edge in the FG represent the similarity of the fingerprint
samples represented by the two nodes connected, and the initial stage is calculated as follows:
0, = 
︀( ⃒⃒ 0, −

0, ⃒⃒ )︀
edge features</p>
        <p>− 1, can be updated as follows:
where 0, ∈ R,| · | denotes the absolute value and  :R0× 1 → R is the encoding network
that transforms the fingerprint sample similarity into certain dimensional features.  includes
multiple fully connected layers as well as parameter settings   and a sigmoid layer.</p>
        <p>When the number of network iterations l&gt;0, the existing node features − 1,, 
− 1, and

, = 
︀( ⃒⃒ 
− 1, − 

− 1, ⃒⃒ )︀ · 
− 1,
in each iteration.</p>
        <p>In order to integrate the edge features in the FG graph from a global perspective, A normalization
operation is conducted on all  in  after computing the global fingerprint sample similarity</p>
        <p>When the initialization or iterative update of the features of nodes and edges in FG is
completed, the Distribution Graph (DG)  = (︀  , )︀ is constructed using the similarity
between the fingerprint sample features characterized by nodes and fingerprint samples
characterized by edges. Where   := {︀ }︀

=1,· ,+ ,  := {︁ }︁
,=1,· ,+
denote the set of
nodes and the set of edges of the FG, respectively.  integrates fingerprint samples’ similarity
to each other from  and transforms them into feature embeddings of fingerprint sample
similarity distribution relationships as node information, aiming to increase sample feature
diferentiation by processing fingerprint sample similarity distribution level relationships to
improve model localization capability. Each node , in  is an N* K dimensional feature vector
representing the similarity distribution relationship of fingerprint samples (N * K represents the
number of support set samples in one learning task for few-shot learning), and the jth term of
the vector represents the similarity between samples  and  , initialized as follows:
0, =</p>
        <p>‖=1
{︃   (, )
︀[
1 , 1 , . . . , 1 ]︀
if  in 
if  in 
Distribution Similarity To Fingerprint Similarity in DR-FSL.</p>
        <p>N* K array,  is the support set, and  is the query set.  (, ) is defined as follows:
where 0, ∈ R× 1,|| is the join operator that joins the results of multiple  (, ) to form an
 (, ) =
︂{
1,
0,
if  = 
if  ̸= 
,  = 1, . . . ,  
where  ,  are the location labels of fingerprint samples  ,  .</p>
        <p>For generations l&gt;0 , the node feature , in DG can be updated as:
, =  2
︀( ‖=1 

, , 
− 1,
︀)
First, the fingerprint sample similarity information is integrated by connecting the features of
N* K edges associated with node , in the FG graph, and then connecting them with the node
features 
Finally, the feature transformation is realized by the aggregation network  2 : R2
− 1, in the DG graph obtained from the previous iteration to form the cascade features.
of fingerprint sample similarity distribution relationship, as shown in the F2D algorithm module
in Figure 5. Where  2 consists of multiple fully connected layers and an activation function
→ R
RELU with parameters set to   2.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Distribution Similarity To Fingerprint Similarity</title>
        <p>The features recorded in each edge in DG represent the similarity relationship of the
ifngerprint sample similarity distribution represented by the two nodes connected, and the
initial stage is calculated as follows:
0, = 
︀( ⃒⃒ 0, −
0, ⃒⃒ )︀
where 0, ∈ R and the fingerprint sample similarity distribution relationship encoding network
:R× 1 → R consists of multiple fully connected layers and a sigmoid layer with parameters
set to   .When generations l&gt;0,</p>
        <p>− 1, can be updated as follows:
, =  ︀( ⃒⃒ −  1, − −  1, ⃒⃒ )︀ · − 1,
Similarly, in order to integrate the edge features in the DG graph from a global perspective, a
regularization operation is also performed on all  in  after each iteration.</p>
        <p>Whenever the edge features , in the DG are updated iteratively, the fingerprint sample
features are updated by aggregating</p>
        <p>, and all node features , in the FG, and the similarity
distribution relationship between each fingerprint sample flows back into the FG. As shown in
the D2F algorithm module in Figure 5, it is calculated as shown below:
, = 2 ⎝
⎛+1 ⎞
∑︁ (︀ , · − 1,︀) , − 1,⎠
=1
where , ∈ R0× 1,2 : R20× 1 → R0× 1 is the fingerprint sample feature aggregation
network of FG, which consists of multiple fully connected layers with parameters set to  2 .</p>
        <p>By aggregating the edge information in the DG and the node information in the FG, the
distribution-level features of fingerprint sample similarity are integrated into the fingerprint
sample FEASURE embeddings to improve the fingerprint sample feature diferentiation and
prepare for the next iteration to calculate the fingerprint sample similarity to each other.</p>
      </sec>
      <sec id="sec-3-5">
        <title>3.5. Position Estimation</title>
        <p>In this paper, the indoor localization task is defined as a multi-classification problem for
ifngerprint RPs, where the fingerprint samples in the query set are classified according to the
edge features in the FG after the last round of iterations. Specifically, all the edge features 
,
associated with the fingerprint samples  of the query set in the FG after the last iteration
combined with the fingerprint sample category information are input into the softmax function,
and the prediction of fingerprint reference points attributed to the fingerprint samples to be
located is calculated by the following equation:
⎛ ⎞
 (ˆ | ) = Softmax ⎝∑︁ , ·  ⎠
=1
where  (ˆ | )denotes the probability distribution that the fingerprint sample with
localization  is predicted to belong to the fingerprint reference point , and  is the one-hot
representation of the true label of the fingerprint reference point to which the jth fingerprint
sample in the support set belongs. The position prediction of the fingerprint samples with
localization is performed by the similarity between fingerprint samples stored by edge features.</p>
        <p>In order to train the network model end-to-end in the ofline phase, the fingerprint sample
classification loss function and the fingerprint sample similarity distribution loss function are
designed separately and weighted and summed as the total target loss function ℒtotal .</p>
        <p>The fingerprint sample classification loss function uses cross-entropy and is expressed as:
ℒ = −
∑︁  log (ˆ)</p>
        <p>where  and ˆ are the true labels and predictions of the query set samples , respectively.</p>
        <p>In order is to enhance the ability of the model to learn to distinguish the relationship
between fingerprint sample similarity distributions, the fingerprint sample similarity distribution
loss function is expressed as:
ℒ = −</p>
        <p>⎛ ⎛ ⎞⎞
∑︁  log ⎝Softmax ⎝∑︁ , ·  ⎠⎠</p>
        <p>=1
where , is the edge feature in DG after the lth iteration, which represents the fingerprint
sample similarity distribution relationship.</p>
        <p>Ultimately, the total objective loss function is expressed as:</p>
        <p>¯
ℒtotal = ∑︁ ( ℒ +  ℒ)</p>
        <p>=1
where¯  denotes the total number of iterations in a training,  and  are the weights of the loss
function to balance the importance of both, which are set to 0.9 and 0.1, respectively.</p>
        <p>In the online phase, both the support set fingerprint samples and the query set fingerprint
samples to be located are input, and the model will output the probability values of the query set
ifngerprint samples attributed to each RPs. To further obtain the accurate location estimation
of the fingerprint samples, the RP locations with predicted probability top3 are selected and the
ifnal location prediction is obtained by the weighted mass center method as follows:
 =
∑︀3=1 
∑︀3
=1 
where L is the final prediction coordinate,  and  correspond to the three maximum
probability RP coordinates predicted by the model and the corresponding probability values, respectively.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <p>To verify the performance of our proposed DR-FSL, we collect CSI data in two
heterogeneous real scenes at Beijing University of Posts and Telecommunications and design experiments
to evaluate the cross-scene few-shot localization performance of the proposed scheme.</p>
      <sec id="sec-4-1">
        <title>4.1. Experimental Environment and Datasets</title>
        <p>We collect data in a complex lab and in an integrated ofice, respectively. These two
scenarios are completely heterogeneous, and the experiments based on them can fully evaluate
the cross-scene few-shot localization performance of the localization system. We collect CSI
of Wi-Fi signals using a data acquisition device consisting of a transmitter and a receiver,
both of which are industrial computers with built-in Intel 5300 wireless network cards. The
transmitter uses one antenna and is deployed as a mobile terminal at diferent fingerprint
points to continuously send packets at 20Mh bandwidth; the receiver uses three antennas and
is deployed at a fixed location in a real scene to receive and store the corresponding packets.</p>
        <p>The complex lab scene is located on the fifth floor of the main building of Beijing University
of Posts and Telecommunications 523. the indoor environment consists of tables, chairs, display
cabinets, computers and other experimental equipment, we deploy the receiver above the display
cabinet about 1.5m high, near the wall in the corner of the scene; the transmitter is placed on a
mobile platform about 1m high, as shown in Figure 6. The laboratory area is about 4m*8m, in
which 24 fingerprint reference points are set, distributed as shown in Figure 7.</p>
        <p>The integrated ofice scene is located at 906, the ninth floor of the research building of
Beijing University of Posts and Telecommunications. the indoor environment consists of desks,
chairs, lockers and other ofice equipment, we deploy the receiver on the wall at the corner of
the scene, with a height of about 2m; the transmitter is placed on a platform about 1m high, as
shown in Figure 8. The comprehensive ofice area is about 4.2m*13.2m, in which 24 fingerprint
reference points are set, distributed as shown in Figure 9.</p>
        <p>We collected data in the above complex lab scene and integrated ofice scene, respectively.
600 CSI samples are collected at each fingerprint reference point in both scenarios, and 9600 CSI
samples are collected as fingerprint data in each scenario, each consisting of 30 consecutive CSI
data packets. The laboratory scene and the ofice scene have completely diferent layouts, sizes,
and fingerprint point distributions, which are heterogeneous scenes. The two CSI fingerprint
data sets collected are completely mutually exclusive, which meets the a priori requirements for
few-shot learning and is suitable for verifying the cross-scene few-shot localization performance
of the proposed scheme.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Evaluation Metrics</title>
        <p>In order to comprehensively analyze the cross-scene few-shot localization performance of
the proposed scheme, we considered the following evaluation metrics in the evaluation process:
ifngerprint point classification accuracy, average localization error, standard deviation, and
K-shot number setting. The fingerprint point classification accuracy reflects the accuracy of
the proposed scheme in heterogeneous scenes using only a small number of samples, while the
average localization error and standard deviation reflect the localization accuracy and stability
of the fingerprint localization model, respectively.</p>
        <p>For the fingerprint sample to be located , the localization error is the distance between
the predicted and actual coordinates and is calculated as shown below:
_ =
√︁</p>
        <p>( − ˆ)2 + ( − ˆ)2
where (, ) are the actual coordinates of the fingerprint sample  and (ˆ, ˆ) are the predicted
coordinates obtained from the localization model prediction. The average localization error and
standard deviation of the model can be further obtained by calculating the localization error of
all tested samples from the following equation:
 =
√︃
∑︀=1 _</p>
        <p>=
∑︀=1 (_ − )2

where N is the total number of test fingerprint samples.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Experimental Results and Analysis</title>
        <p>To validate the cross-scene few-shot localization performance of DR-FSL, we designed two
cases.</p>
        <p>case 1: The integrated ofice scene is used as the training scenario for the DR-FSL model,
and The complex lab scene is used as the test scenario for the model.</p>
        <p>case 2: The complex lab scene is used as the training scene of the DR-FSL model, and the
integrated ofice scene is used as the testing scene of the model.</p>
        <p>For each case, all CSI data collected from each fingerprint reference point in the training
scenario are used as the training dataset; CSI data collected from each fingerprint reference
point in the test scenario are sampled according to the few-shot learning N-way K-shot setting
and then used as the test dataset.</p>
        <p>We compare the performance of CNN, GNN-based methods and the proposed model in
the 24-way 1-shot, 24-way 5-shot, and 24-way 10-shot frameworks in two cases with setting
few-shot support sets K = 1, 5, and 10.</p>
        <p>Table 1 shows the localization performance of each scheme in case 1 when the fingerprint
classification accuracy is used as the measure. The CNN scheme is a combination of the
ifngerprint feature extractor and output classification layer of size N described in 3.2, where we
use N-way K-shot to refer to the scheme that uses only N* K samples to train the CNN-based
localization model. Table 2 shows the localization performance of each scheme in case 2 when
the fingerprint classification accuracy is used as the measure.</p>
        <p>As can be seen from Tables 1 and 2, first, the performance of the model based on the
few-shot learning framework is significantly better than that of CNN. This illustrates the
efectiveness of using fingerprint samples from diferent heterogeneous scenes for few-shot
localization model training. The few-shot localization model can follow the N-way K-shot
framework to sample the fingerprint samples from the training scenes several times, so that the
model can learn abstraction from them and apply them to the few-shot localization task in the
test scenes.Second, DR-FSL outperforms the GNN-based few-shot localization model, especially
in case 2 with higher performance improvement than case 1, especially in the case of very few
shots.This is because in the integrated ofice scene, there are many obstacles, the wireless signal
propagation between transmitter and receiver is severely afected by multipath efect, the CSI
data samples have blurred characteristics, and the CSI of neighboring fingerprint reference points
are easily confused. The GNN-based few-shot model only considers the similarity between
ifngerprint samples for localization, and the localization results are afected, while DR-FSL adds
a fingerprint similarity distribution judgment layer while comparing the similarity between
ifngerprint samples, which mitigates the impact of CSI data samples of diferent fingerprint
reference points being similar to each other on the model localization performance.</p>
        <p>To further understand the localization accuracy and stability of the model, we counted
the average localization error and standard deviation of the individual models in cases 1 and
2 under the 24-way 10-shot setting, respectively, as shown in Table 3. It can be seen that the
localization accuracy and stability of DR-FSL are better than those of CNN and GNN-based
few-shot localization models under the same N-way K-shot setting.</p>
        <p>Figures 10 show the cumulative error distribution of each model in the 24-way 10-shot
setting for the two cases 1 and 2, respectively, while we trained independent CNN localization
models for the two cases that use a large amount of data (400 fingerprint samples per location).</p>
        <p>As can be seen from the figure, the overall localization efect of DR-FSL model is better than
other few-shot localization models, with better stability and localization accuracy. In addition,
DR-FSL achieves a performance close to that of CNN in cases 1 and 2 using a sample size of very
few shots (40 times less). This confirms the superiority of the proposed method for cross-scene
small-sample localization, which utilizes data collected in other heterogeneous scenes and
applies the models learned in them to new scenes, thus simplifying the data collection and
labeling efort required for fingerprint localization in new scenes.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>To reduce the labor and time cost required to collect and label fingerprint data in new
scenes, this paper proposes a few-shot indoor fingerprint localization model based on the
distribution relationship, which learns abstraction from fingerprint data already collected and
labeled in other heterogeneous environments and applies it to new scenes to achieve fingerprint
localization. The location estimation is achieved by considering both the similarity of fingerprint
samples and the similarity distribution relationship to distinguish the fingerprints to be located.
As we have demonstrated in two heterogeneous scenes, the model has superior cross-scene
small-sample localization capability. The average localization error is 0.51 m when the complex
lab scene is used as the new scene, and 1.09 m when the integrated ofice scene is used as the
new scene, and the localization performance of DR-FSL is comparable to that of the CNN-based
ifngerprint localization model when the amount of fingerprint data in the new scene is reduced
by a factor of 40.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Acknowledgments</title>
      <p>This work is financially supported by National Key R &amp;D Program of China
(No.2022YFB2601801).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>W.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mu</surname>
          </string-name>
          ,
          <article-title>End-to-end data delivery reliability model for estimating and optimizing the link quality of industrial wsns</article-title>
          ,
          <source>IEEE Transactions on Automation Science and Engineering</source>
          <volume>15</volume>
          (
          <year>2017</year>
          )
          <fpage>1127</fpage>
          -
          <lpage>1137</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T.</given-names>
            <surname>Peng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <article-title>Hybrid wireless indoor positioning with ibeacon and wi-fi (</article-title>
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Moghtadaiee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Dempster</surname>
          </string-name>
          ,
          <article-title>Indoor location fingerprinting using fm radio signals</article-title>
          ,
          <source>IEEE Transactions on Broadcasting</source>
          <volume>60</volume>
          (
          <year>2014</year>
          )
          <fpage>336</fpage>
          -
          <lpage>346</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>W.</given-names>
            <surname>Liu</surname>
          </string-name>
          , Q. Cheng,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Deng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Fu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <surname>S. Wang,</surname>
          </string-name>
          <article-title>Survey on csi-based indoor positioning systems and recent advances</article-title>
          ,
          <source>in: 2019 International Conference on Indoor Positioning and Indoor Navigation (IPIN)</source>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Khalajmehrabadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Gatsis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Akopian</surname>
          </string-name>
          ,
          <article-title>Modern wlan fingerprinting indoor positioning methods and deployment challenges</article-title>
          ,
          <source>IEEE Communications Surveys &amp; Tutorials</source>
          <volume>19</volume>
          (
          <year>2017</year>
          )
          <fpage>1974</fpage>
          -
          <lpage>2002</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Tsruya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. Dalla</given-names>
            <surname>Torre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Aljadef</surname>
          </string-name>
          , L. Amir, Devices, methods, and
          <article-title>systems for radio map generation</article-title>
          ,
          <year>2015</year>
          .
          <source>US Patent 8</source>
          ,
          <issue>938</issue>
          ,
          <fpage>255</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Jun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Kushwaha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vipin</surname>
          </string-name>
          , L. Cheng, C. Liu, T. Zhu,
          <article-title>Low-overhead wifi fingerprinting</article-title>
          ,
          <source>IEEE Transactions on Mobile Computing</source>
          <volume>17</volume>
          (
          <year>2017</year>
          )
          <fpage>590</fpage>
          -
          <lpage>603</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>W.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Deng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <article-title>Low-cost indoor wireless fingerprint location database construction methods: A review</article-title>
          , IEEE Access (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R.</given-names>
            <surname>Klus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Klus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Talvitie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pihlajasalo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Torres-Sospedra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Valkama</surname>
          </string-name>
          ,
          <article-title>Transfer learning for convolutional indoor positioning systems</article-title>
          , in: 2021
          <source>International Conference on Indoor Positioning and Indoor Navigation (IPIN)</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>K.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. K.-Y. Ng</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Xia</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>V. C.</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>S. H.</given-names>
          </string-name>
          <string-name>
            <surname>Son</surname>
          </string-name>
          ,
          <article-title>Toward low-overhead ifngerprint-based indoor localization via transfer learning: Design, implementation, and evaluation</article-title>
          ,
          <source>IEEE Transactions on Industrial Informatics</source>
          <volume>14</volume>
          (
          <year>2017</year>
          )
          <fpage>898</fpage>
          -
          <lpage>908</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>B.</given-names>
            <surname>Morawska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Lipinski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lichy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Adamkiewicz</surname>
          </string-name>
          ,
          <article-title>Transfer learning-based uwb indoor localization using mht-mdc and clusterization-based sparse fingerprinting</article-title>
          ,
          <source>Journal of Computational Science</source>
          <volume>61</volume>
          (
          <year>2022</year>
          )
          <fpage>101654</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Niu</surname>
          </string-name>
          ,
          <article-title>Localization with transfer learning based on fine-grained subcarrier information for dynamic indoor environments</article-title>
          ,
          <source>Sensors</source>
          <volume>21</volume>
          (
          <year>2021</year>
          )
          <fpage>1015</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>V.</given-names>
            <surname>Garcia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Bruna</surname>
          </string-name>
          ,
          <article-title>Few-shot learning with graph neural networks</article-title>
          ,
          <source>arXiv preprint arXiv:1711.04043</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>O.</given-names>
            <surname>Vinyals</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Blundell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lillicrap</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wierstra</surname>
          </string-name>
          , et al.,
          <article-title>Matching networks for one shot learning</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>29</volume>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Snell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Swersky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zemel</surname>
          </string-name>
          ,
          <article-title>Prototypical networks for few-shot learning</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>B.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <surname>G. Mao,</surname>
          </string-name>
          <article-title>An online radio map update scheme for wifi fingerprintbased localization</article-title>
          ,
          <source>IEEE Internet of Things Journal</source>
          <volume>6</volume>
          (
          <year>2019</year>
          )
          <fpage>6909</fpage>
          -
          <lpage>6918</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>L.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , Y. Liu, Dpgn:
          <article-title>Distribution propagation graph network for few-shot learning</article-title>
          ,
          <source>in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>13390</fpage>
          -
          <lpage>13399</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>