Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessPower Pages Authentication Methods: The Complete Guide (2026)DEV CommunityClaude Code Unpacked: what the visual guide reveals about the architectureDEV CommunityExolane Review: What It Gets Right on Custody, Funding Caps, and RiskDEV CommunityGitHub Agentic Workflows: AI Agents Are Coming for Your Repository Maintenance Tasks (And That's a Good Thing)DEV CommunityAlibaba Launches XuanTie C950 CPU for Agentic AIEE TimesThe Illusion of Data Custody in Legal AI — and the Architecture I Built to Replace ItDEV CommunityTurboQuant, KIVI, and the Real Cost of Long-Context KV CacheDEV CommunityWhy ChatGPT Cites Your Competitors (Not You)DEV CommunityIntroducing Anti-Moral RealismLessWrong AIFrom idea to live web app in minutes with Spektrum. An AI-powered web app builder for MVPs, rapid prototyping, and full-stack JavaScript apps. Skip setup, generate real products, and deploy instantly without infrastructure headaches. 🔥DEV CommunityAnthropic Just Proved That Codebase Governance Is Now the #1 Priority for Every Engineering OrgDEV CommunityThe history of Apple in photos, from the early Steve Jobs era to the iPhone launch to its 50-year markBusiness InsiderBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessPower Pages Authentication Methods: The Complete Guide (2026)DEV CommunityClaude Code Unpacked: what the visual guide reveals about the architectureDEV CommunityExolane Review: What It Gets Right on Custody, Funding Caps, and RiskDEV CommunityGitHub Agentic Workflows: AI Agents Are Coming for Your Repository Maintenance Tasks (And That's a Good Thing)DEV CommunityAlibaba Launches XuanTie C950 CPU for Agentic AIEE TimesThe Illusion of Data Custody in Legal AI — and the Architecture I Built to Replace ItDEV CommunityTurboQuant, KIVI, and the Real Cost of Long-Context KV CacheDEV CommunityWhy ChatGPT Cites Your Competitors (Not You)DEV CommunityIntroducing Anti-Moral RealismLessWrong AIFrom idea to live web app in minutes with Spektrum. An AI-powered web app builder for MVPs, rapid prototyping, and full-stack JavaScript apps. Skip setup, generate real products, and deploy instantly without infrastructure headaches. 🔥DEV CommunityAnthropic Just Proved That Codebase Governance Is Now the #1 Priority for Every Engineering OrgDEV CommunityThe history of Apple in photos, from the early Steve Jobs era to the iPhone launch to its 50-year markBusiness Insider

Steering Code LLMs with Activation Directions for Language and Library Control

arXivMarch 30, 202610 min read0 views
Source Quiz

arXiv:2603.23629v2 Announce Type: replace Abstract: Code LLMs often default to particular programming languages and libraries under neutral prompts. We investigate whether these preferences are encoded as approximately linear directions in activation space that can be manipulated at inference time. Using a difference-in-means method, we estimate layer-wise steering vectors for five language/library pairs and add them to model hidden states during generation. Across three open-weight code LLMs, these interventions substantially increase generation toward the target ecosystem under neutral promp — Md Mahbubur Rahman, Arjun Guha, Harshitha Menon

View PDF HTML (experimental)

Abstract:Code LLMs often default to particular programming languages and libraries under neutral prompts. We investigate whether these preferences are encoded as approximately linear directions in activation space that can be manipulated at inference time. Using a difference-in-means method, we estimate layer-wise steering vectors for five language/library pairs and add them to model hidden states during generation. Across three open-weight code LLMs, these interventions substantially increase generation toward the target ecosystem under neutral prompts and often remain effective even when prompts explicitly request the opposite choice. Steering strength varies by model and target, with common ecosystems easier to induce than rarer alternatives, and overly strong interventions can reduce output quality. Overall, our results suggest that code-style preferences in LLMs are partly represented by compact, steerable structure in activation space.

Subjects:

Machine Learning (cs.LG)

Cite as: arXiv:2603.23629 [cs.LG]

(or arXiv:2603.23629v2 [cs.LG] for this version)

https://doi.org/10.48550/arXiv.2603.23629

arXiv-issued DOI via DataCite

Submission history

From: Md Mahbubur Rahman [view email] [v1] Tue, 24 Mar 2026 18:12:05 UTC (1,110 KB) [v2] Thu, 26 Mar 2026 20:57:47 UTC (1,110 KB)

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by AI News Hub · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

researchpaperarxiv

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Steering Co…researchpaperarxivmachine-lea…deep-learni…arXiv

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 155 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Research Papers