
Create Your First Project
Start adding your projects to your portfolio. Click on "Manage Projects" to get started
User-Localization-via-Self-Supervised-Learning
Github Link
OVERVIEW
--------------------------------------------------
Objective:
• Predict user positions accurately by leveraging channel state information (CSI) data. The approach minimizes dependency on large amounts of labeled data by combining self-supervised pre-training with supervised fine-tuning.
--------------------------------------------------
PROJECT STRUCTURE
--------------------------------------------------
The project consists of two main stages:
1. Self-Supervised Pre-Training
- Objective: Learn meaningful representations from a large pool of unlabelled CSI data.
- Data: 36,192 unlabelled samples, each containing:
• H_Re: Real part of the estimated channel matrices (shape: [number of samples, 56, 924, 5])
• H_Im: Imaginary part (same shape as H_Re)
• SNR: Signal-to-noise ratio measurements (shape: [number of samples, 56, 5])
- Approach: Design a custom self-supervised task (custom objective function or pretext task) to extract robust features from the CSI data.
2. Supervised Fine-Tuning
- Objective: Utilize the learned representations to build a model that predicts user positions.
- Data: 4,096 labelled samples (each includes CSI data: H_Re, H_Im, SNR, and corresponding ground truth positions in [x, y, z]).
• The dataset is split into training and validation sets for model development and hyperparameter tuning.
- Test Set: 883 samples (without labels) on which the final model predicts user positions.
--------------------------------------------------
DATA DETAILS
--------------------------------------------------
Labelled Data:
• URL: https://drive.google.com/file/d/1atPChIUtYv8oiYwPFBZoJ8Ha0pCLFLxF/view
• Contains CSI data with ground truth positions. Each file in labelled_data.zip includes H_Re, H_Im, SNR, and Pos (ground truth positions; shape: [number of samples, 3] with order [x, y, z]).
• Total labelled samples: 4,096.
Unlabelled Data:
• URL: https://drive.google.com/file/d/18iEpL4Q6ybtPPwP2rYcZ3ocdfmMbyHp2/view
• Contains CSI data (H_Re, H_Im, SNR) without positions.
• Total unlabelled samples: 36,192.
Test Data:
• URL: https://drive.google.com/file/d/1gYQ_ZbX36cOiiwpdqQ94ON7Mt8DlqvEr/view
• Contains CSI data similar to the unlabelled set.
• Total test samples: 883.
Note: Part of the map (two streets) is intentionally omitted from the labelled dataset but is present in the test set.
Measurement Setup:
• CSI data was acquired using a massive MIMO channel sounder with an 8x8 antenna array.
• Due to malfunctioning antennas, only 56 out of 64 antennas provided useful measurements.
• The transmitter (an SDR-equipped cart) moved within a residential area; ground truth positions were obtained using differential GPS and transformed into a local Cartesian coordinate system (with the base station at (0,0)).
--------------------------------------------------
MODEL ARCHITECTURE
--------------------------------------------------
TGCN Model:
• Graph Convolutional Layers (GCNConv):
- Applied over the historical time steps to extract spatial (graph) features for each asset.
• GRU Layer:
- Processes the sequence of features from the GCN layers to capture temporal dependencies.
• Fully Connected Layer:
- Maps the GRU’s final hidden state to the predicted [x, y, z] coordinates.
• Dropout:
- Applied to the GCN outputs to prevent overfitting.
--------------------------------------------------
TRAINING DETAILS
--------------------------------------------------
Data Preprocessing:
• Asset features are scaled (using StandardScaler, MinMaxScaler, or RobustScaler) and may be reduced via PCA.
• Adjacency matrices are normalized if specified.
Dataset Splitting:
• The labelled data is split into training and validation sets based on time steps.
Training Loop:
• Loss Function: Mean Squared Error (MSE) between predicted and actual positions.
• Optimization: Adam optimizer with weight decay.
• Learning Rate Scheduler: ReduceLROnPlateau adjusts the learning rate based on validation loss.
• Early Stopping: Training stops if validation loss does not improve over a specified number of epochs.
Testing:
• After training, the best model is loaded to generate predictions on the test data.
• Predicted positions for all assets are saved in a CSV file for submission.
--------------------------------------------------
CODE STRUCTURE
--------------------------------------------------
Jupyter Notebooks and Scripts:
• Notebooks for self-supervised pre-training and supervised fine-tuning.
- Include data loading, preprocessing, definition of AssetDataset and AssetBatch classes, TGCNModel implementation, and training/validation/testing loops.
• Generation of the submission CSV file with predicted positions.
Dependencies:
• torch_geometric for graph neural network operations.
• easydict, numpy, pandas, pickle, scipy, and sklearn for data processing.
• torch and torch.nn for building and training the model.
--------------------------------------------------
CONCLUSION
--------------------------------------------------
This project demonstrates a two-stage approach for user localization in wireless systems. By first leveraging self-supervised learning to extract robust features from unlabelled CSI data and then fine-tuning a supervised model on a smaller labelled dataset, the system effectively predicts user positions. This method significantly reduces the need for large amounts of labeled data while maintaining high localization accuracy. All code, data processing steps, and evaluation results are provided in this repository.