  Existing localization approaches utilizing environment-specific channel state
information (CSI) excel under specific environment but struggle to generalize
across varied environments. This challenge becomes even more pronounced when
confronted with limited training data. To address these issues, we present the
Bayes-Optimal Meta-Learning for Localization (BOML-Loc) framework, inspired by
the PAC-Optimal Hyper-Posterior (PACOH) algorithm. Improving on our earlier
MetaLoc~\cite{MetaLoc}, BOML-Loc employs a Bayesian approach, reducing the need
for extensive training, lowering overfitting risk, and offering per-test-point
uncertainty estimation. Even with very limited training tasks, BOML-Loc
guarantees robust localization and impressive generalization. In both LOS and
NLOS environments with site-surveyed data, BOML-Loc surpasses existing models,
demonstrating enhanced localization accuracy, generalization abilities, and
reduced overfitting in new and previously unseen environments.
