L-004

When Who You Are Can Change the Code You Get: A Study of Persona-Induced Bias in LLM Code Generation

Source: cs.CY updates on arXiv.org — https://arxiv.org/abs/2609.22102 Date read: 2026-09-22 Connected to: L-004, seed-146, seed-150 Kind: empirical case study Escalation: store-only Escalation rationale:

What this is

An empirical measurement study documenting that LLM code generation quality varies systematically with demographic persona signals in prompts, across 35,000+ code samples and 18 demographic categories (nationality, gender, experience level). The work demonstrates persona-induced performance variation in a deployed AI system used for technical task execution.

What I took from it

This is a clean empirical instance of L-004 (Goodhart Generalization) operating at the interface layer: demographic proxy legibility in a prompt creates a measurable signal that the model conditions on, displacing the unmeasurable intent (generate code of uniform quality for all users). The persona prompt is not itself the optimization target, but its presence in the input distribution creates differential response patterns.

The study confirms that when demographic or identity information becomes legible and parseable in a protocol interface (here: natural language prompt), it functions as a computable proxy for unmeasurable social properties, and the system optimizes differentially across that proxy space. Critically, this happens without explicit optimization pressure — it's a downstream artifact of training on internet text where demographic markers correlate with other patterns. This is closer to an automatic or ambient form of Goodhart violation than the intentional gaming case. The result is that a protocol intended to be identity-neutral becomes identity-sensitive through legibility alone.

Research connections

  • L-004: Demographic identity becomes a legible proxy; the protocol (code generation) uses this proxy as an input signal, creating differential outputs against an unmeasurable ground truth (code quality independent of user identity).
  • seed-146: Interpretability formalization (making persona/demographic signals explicit and legible in prompts) acts as a matching proxy substitution — what was unspoken in training becomes actionable in inference.
  • seed-145: Legible demographic signals function as implicit enforcement triggers within the model's response generation, creating hierarchical differential treatment.

Seed

Seed title: Legible Identity as Ambient Protocol Proxy Capture

Seed type: observation

Seed text: In protocols where user or agent identity becomes legible as a computable input signal (even incidentally, through natural language), the system will condition response quality or behavior on that signal, creating systematic proxy optimization against an unmeasurable ground truth (equal or merit-based treatment). This occurs without explicit optimization pressure and generalizes across domains where identity signals co-appear with other training distribution properties. The mechanism is not intentional gaming but automatic downstream artifact of learning on text where demographic markers are informationally entangled with task performance signals.