ALIGNBEAM: Inference-Time Alignment Transfer via Cross-Vocabulary Logit Mixing
Abstract
Domain fine-tuning erodes the safety alignment of large language models, leaving specialists willing to comply with harmful prompts framed in appropriate language. Safety prompts are ignored by base models, post-generation classifiers do not steer generation, and retraining presupposes weights, data, and compute. Inference-time logit-mixing methods assume a shared vocabulary, ruling out cross-family pairings. We present ALIGNBEAM, an inference-time method that blends the token-level distribution of a specialist draft with that of a small aligned anchor at each decoding step. A cross-vocabulary text bridge decodes the anchor token and re-encodes it under the specialist tokeniser, enabling probability mixing without shared token IDs. Generation proceeds in three phases: priming to produce K beam roots, N steps of mixed decoding, and draft continuation after an LLM judge selects the safest beam. Across seven specialist and anchor pairs in both base and instruct regimes and across same and cross-vocabulary settings, ALIGNBEAM substantially raises refusal rates on adversarial benchmarks while preserving task utility. The depth ablation corroborates the early-token safety hypothesis: most of the safety gain is captured within the first few mixed steps. ALIGNBEAM is training-free, vocabulary-agnostic, and exposes safety, speed, and utility trade-offs as user-tunable parameters.