How Language Model Steering Redefines Scientific Code Generation: G-ACT vs Static Neuron Methods

15 hours ago 高效码农

Steering Conceptual Bias in Language Models for Scientific Code Generation Abstract This work explores whether activating latent subspaces in language models (LLMs) can guide scientific code generation toward a specific programming language. Five causal LLMs were evaluated on scientific coding prompts to quantify their baseline bias among four programming languages. A static neuron-attribution method, perturbing the highest activated MLP weight for a “C++ or CPP” token, proved brittle and exhibited limited generalization across prompt styles and model scales. To address these limitations, a gradient-refined adaptive activation steering framework (G-ACT) was developed: per-prompt activation differences are clustered into a small set …