Learning How to Align: Elastic Domain Adaptation for Improving Reasoning Robustness of Large Language Models
Abstract
AbstractDespite exceptional performance on static benchmarks, Large Language Models (LLMs) exhibit significant brittleness when evaluated on perturbed variants of the original questions. Current extrinsic interventions, prompt engineering or supervised fine-tuning, overlook an important intrinsic factor underlying this degradation: the distributional shifts in layer activations between original and perturbed questions. To address this, this work formulates the reasoning robustness challenge as an Unsupervised Domain Adaptation (UDA) problem and proposes the Elastic Domain Adaptation (EDA) method. Unlike rigid strategies that enforce a uniform alignment constraint, EDA dynamically aligns layer activations based on the specific layers and perturbation types. Specifically, EDA incorporates an Adaptive Layer Selection (ALS) to identify pivotal layers and employs an Elastic Shift Module (ESM) to selectively pull or push layer representations depending on the perturbation types. Extensive experiments across six LLMs and 15 perturbation types demonstrate that EDA achieves state-of-the-art performance on most perturbed benchmarks while preserving reasoning capability on original benchmarks.