  This paper addresses an uplink localization problem in which the base station
(BS) aims to locate a remote user with the aid of reconfigurable intelligent
surface (RIS). This paper proposes a strategy in which the user transmits
pilots over multiple time frames, and the BS adaptively adjusts the RIS
reflection coefficients based on the observations already received so far in
order to produce an accurate estimate of the user location at the end. This is
a challenging active sensing problem for which finding an optimal solution
involves a search through a complicated functional space whose dimension
increases with the number of measurements. In this paper, we show that the long
short-term memory (LSTM) network can be used to exploit the latent temporal
correlation between measurements to automatically construct scalable
information vectors (called hidden state) based on the measurements.
Subsequently, the state vector can be mapped to the RIS configuration for the
next time frame in a codebook-free fashion via a deep neural network (DNN).
After all the measurements have been received, a final DNN can be used to map
the LSTM cell state to the estimated user equipment (UE) position. Numerical
result shows that the proposed active RIS design results in lower localization
error as compared to existing active and nonactive methods. The proposed
solution produces interpretable results and is generalizable to early stopping
in the sequence of sensing stages.
