# JSAC_AIRAN Code and stored results for the manuscript **"AI-Native Multi-User Semantic Communications via Meta-Learned Attention for 6G AI-RAN"** (submitted to IEEE Journal on Selected Areas in Communications, Special Issue on Towards Open and Intelligent 6G RAN). This repository contains exactly the code needed to reproduce the experiments reported in the paper, together with the stored CSV results from which every figure is regenerated. All experiments use fixed random seeds. ## What each script does | Script | Role in the paper | |---|---| | `c11_doppler_csi.py` | Shared library. Implements the time-varying tapped-delay-line channel by sample-level time-domain convolution, so intra-symbol Doppler produces genuine inter-carrier interference, plus the pilot-aging frame structure and the aging-aware LMMSE front end of Section IV-A. | | `c13_mnist.py` | MNIST study of Sections V-A and V-B. Defines the signed user-wise attention receiver, the Transformer shared-embedding separator, and the per-user autoencoder, with joint training, warm-started first-order MAML meta-training, and the SNR-sweep evaluation behind Fig. 6. | | `c18_mnist_doppler.py` | Doppler sweep behind Fig. 7, with task-conditional decoder-side adaptation at every operating point. | | `c19_mnist_epoch.py` | Convergence study behind Fig. 5, recording the task-adapted SER at every training checkpoint. | | `c22_maml_epoch.py` | Budget-matched meta-training trajectory that forms the right-hand segment of Fig. 5. | | `c21_mnist_flat.py` | Flat Rayleigh study behind Table III, including the decoder-side first-order MAML variant. | | `c20_bert.py` | Concluding BERT/AG News text study behind Fig. 8, from feature caching to training and evaluation. | ## Reproducing the figures Each figure regenerates from the stored CSV results without retraining. ```bash python3 c19_mnist_epoch.py --mode fig # Fig. 5 python3 c13_mnist.py --mode fig # Fig. 6 python3 c18_mnist_doppler.py --mode fig # Fig. 7 python3 c20_bert.py --mode fig # Fig. 8 ``` Table III values are stored in `results_mnist/mnist_flat.csv`, and Table IV values come from `results_mnist/mnist_results.csv` and `results_mnist/mnist_doppler.csv`. ## Rerunning the experiments Full reruns retrain from scratch on the same fixed seeds. ```bash # MNIST time-varying study (Figs. 5-7, Table IV) python3 c13_mnist.py --mode train python3 c13_mnist.py --mode train-tf python3 c13_mnist.py --mode train-ae python3 c13_mnist.py --mode train-tx-cls python3 c13_mnist.py --mode train-maml python3 c13_mnist.py --mode eval python3 c18_mnist_doppler.py --mode run python3 c19_mnist_epoch.py --mode run python3 c19_mnist_epoch.py --mode run-maml --steps 7500 python3 c22_maml_epoch.py --pretrain-steps 7500 # Flat Rayleigh study (Table III) python3 c21_mnist_flat.py --mode run # BERT text study (Fig. 8) python3 c20_bert.py --mode cache python3 c20_bert.py --mode train-tx-cls python3 c20_bert.py --mode train python3 c20_bert.py --mode train-tf python3 c20_bert.py --mode train-ae python3 c20_bert.py --mode train-maml python3 c20_bert.py --mode eval ``` ## Environment WSL2 Ubuntu with Python 3 and CUDA-enabled PyTorch. The BERT study additionally needs `transformers` and `datasets`. MNIST downloads automatically through `torchvision`, and AG News through `datasets` (`fancyzhx/ag_news`).