NeurIPS 2026 · Poster
Do You CARE to Generalize? Extracting Robust Concept Directions in LLMs
Abstract
Transformer-based large language models (LLMs) encode many high-level concepts as linear directions in activation space. Such concept directions support measurement, quantifying a concept’s presence, and intervention, steering the model’s behavior. In practice, a direction learned in one context often fails in another, such as a new prompt style, source dataset, or target group. We treat these contexts as environments and cast concept-direction extraction as a multi-environment out-of-distribution (OOD) generalization problem. This framing exposes two reasons a direction can fail to transfer: it may pick up features that merely correlate with the concept in the training environments, or the concept may genuinely be encoded differently across environments. Invariance methods from the OOD literature address the first problem but not the second, since forcing a single invariant direction discards context-specific structure that can carry the concept. We introduce Context-Aided Representation Extraction (CARE), which addresses both. CARE decomposes each concept direction into a shared direction, common to all environments and optionally regularized for invariance, plus an orthogonal environment-specific residual. We evaluate CARE on subject–verb agreement, refusal of harmful prompts, and toxicity across four LLMs. Under shifts in the environment–label relationship, CARE measures concepts more accurately than standard and OOD baselines while remaining effective for intervention. The shared direction transfers to environments and datasets never seen in training, and the residuals can improve intervention when the environment is known. In a semi-synthetic study with known concept structure, CARE’s decomposition recovers the shared and context-specific components of the concept.
