Analogical Learning for Cross-Scenario Generalization: Framework and Application to Intelligent Localization

Zirui Chen, Zhaoyang Zhang, Ziqing Xing, Ridong Li, Zhaohui Yang, Richeng Jin, Chongwen Huang, Yuzhi Yang, Mérouane DebbaharXiv 2025 · DOI · arXiv

Abstract

Deep learning models for wireless localization often suffer from scenario-dependency, where models trained in one environment fail in another due to shifts in the underlying "reference frame" of data. This paper introduces Analogical Learning (AL), a framework that enables models to generalize across diverse scenarios by predicting relative relationships to local reference points rather than absolute numerical mappings. The proposed Mateformer architecture utilizes multi-head attention to extract relativity weights and perform nonlinear analogy. Evaluations on the DeepMIMO dataset show that AL achieves centimeter-level accuracy and maintains sub-meter performance in unseen scenarios without fine-tuning, offering a robust solution for city-wide localization foundation models.

Introduction

Most deep learning models struggle with "scenario-dependency," failing when deployed in environments different from their training data. This is particularly evident in wireless localization, where models map Channel State Information (CSI) to user locations. These mappings are highly sensitive to the environment; a model trained on a sunny street may fail in a rainy alleyway because the underlying reference frame has shifted.

The Challenge of Scenario-Dependency

Current solutions like transfer learning or meta-learning require computationally expensive fine-tuning for every new scenario, often leading to "catastrophic forgetting." The core issue is that identical wireless channel state values may correspond to different physical locations due to variations in the scatterer environment. As shown in the comparison between Scenario $i$ and Scenario $j$, absolute numerical mappings are inherently unstable across diverse environments.

Identical wireless channel states can map to different locations across different scenarios due to varying scatterer environments.

Proposed Method: Analogical Learning and Mateformer

The authors propose a novel architecture called Mateformer, designed for Analogical Learning (AL). Instead of processing an isolated sample, the model takes the target input alongside a small set of known "reference" data-label pairs from the current scenario.

  • Relativity Extraction: The network (Transformer_H) uses multi-head attention to calculate "relativity weights," determining how a new signal relates to known reference signals.
  • Nonlinear Analogy: These weights guide the synthesis of the target label (Transformer_Hx), mapping relationships from the signal domain directly onto the location domain.
  • Neighborhood Sampling: Efficiency is improved by selecting reference points physically near a coarse initial estimate of the target (e.g., from low-precision GPS).
The Analogical Learning framework uses known data-label pairs as reference objects to achieve broad generalization across diverse reference frames.

Key Insights

  • Relativity over Absolutes: While numerical values are scenario-sensitive, the physical laws governing them (e.g., signal attenuation vs. distance) are often invariant. By focusing on relative relationships, the model captures these universal laws.
  • Implicit Reference Frames: By embedding known data-label pairs, the model perceives the current scenario's characteristics on the fly, allowing adaptation without retraining.

Experimental Results

The framework was evaluated using the DeepMIMO dataset across urban road scenarios ('O1', 'O1B') and complex multi-scenario setups ('MO1').

  • Zero-Shot Generalization: When moved to unseen scenarios, baseline models saw errors jump from <1m to over 40m. The AL model maintained sub-meter accuracy without additional tuning.
  • Robustness: The model showed minimal performance degradation under heavy rain or dynamic traffic, conditions that rendered traditional models unusable.
  • Stability: Unlike transfer learning, AL avoids catastrophic forgetting, remaining accurate in original training scenarios even after deployment in new ones.

Conclusion

Analogical Learning represents a shift from learning specific maps to learning the mechanism of analogy. This allows a single pre-trained model to serve as a foundation for localization across diverse and changing environments. Future work will focus on reducing the $O(n^2)$ computational complexity of the attention mechanism and exploring applications in other multi-scenario domains.

Summary updated

Abstract

Modern learning systems often struggle with joint learning across diverse scenarios and immediate adaptation to new ones, because they rely heavily on the scenario-dependent absolute data-label representations. Here, we propose analogical learning (AL), a learning framework that explores the inherent invariance of the underlying physical processes across scenarios, to improve the cross-scenario generalization. Specifically, we introduce the physical concepts of reference frames and relativity into the neural modeling. The resultant framework explicitly employs intra-scenario data-label pairs as reference anchors and enforces the network to mediate its data-to-label transformation through data-domain relative metrics that factor out the scenario-dependent variations. We instantiate AL with Mateformer, a bipartite Transformer-based neural architecture. Each layer of the auxiliary Transformer extracts certain feature space of the current data, while the corresponding layer of the primary Transformer computes attention among the data feature space and then use it as a relativity metric to weight the current label feature to synthesize the next label feature and, ultimately, the final prediction. We apply AL to intelligent wireless localization, a representative multi-scenario learning task. Across synthetic, real-world, and city-scale datasets, AL enables robust cross-scenario transfer and multi-scenario joint learning, achieving wavelength-scale localization accuracy that matches or surpasses state-of-the-art methods. This physics-inspired learning framework provides a promising alternative for other cross-scenario learning tasks and applications.
BibTeX
@misc{chen2025analogical,
  author = {Zirui Chen and Zhaoyang Zhang and Ziqing Xing and Ridong Li and Zhaohui Yang and Richeng Jin and Chongwen Huang and Yuzhi Yang and Mérouane Debbah},
  title = {{Analogical Learning for Cross-Scenario Generalization: Framework and Application to Intelligent Localization}},
  year = {2025},
  eprint = {2504.08811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.08811},
}
Figure