Do Language Models Know Their Own Constraints?
Organizations: Columbia University New York, NY, USA
Abstract
We ask whether behavioral constraints acquired through post training remain explicitly reportable. Using constrained recipe generation as a testbed, five banned ingredients enforced via LoRA fine tuning of Llama 3.1 8B Instruct we compare supervised fine tuning (SFT) and Group Relative Policy Optimization (GRPO) against an untrained baseline on a four tier Constraint Awareness Benchmark. Averaged over three seeds, both methods raise behavioral compliance from 4% to about 90% while reducing explicit constraint reporting below the untrained model (0.48/5 to 0.16/5 for SFT, 0.07/5 for GRPO) and eroding retained third person knowledge (93% to 36% for SFT, 14% for GRPO; p less than 0.01 between methods). Contrary to our initial hypothesis, the reward based signal is the more destructive of the two: a reward that penalizes banned ingredient tokens regardless of framing learns a context independent suppression rather than a self directed constraint. A context conditioned reward designed to teach the self to other distinction fails, collapsing toward inclusion in both framings. Probing prompt time hidden states recovers per ingredient avoidance at 83.8% (layer 24 MLP), but only 6.4 points above a per ingredient base rate predictor (77.4%), and the model's own verbal self report is more accurate still (87.8%). A positive control adding explicit self description examples does not restore reporting. The failure is therefore specific to enumerating constraints on request, not a general loss of access to them.
Figures & tables
| Base model | Llama 3.1 8B Instruct ( 1 ) |
|---|---|
| LoRA | , , dropout |
| LoRA targets | q_proj , v_proj |
| Precision | 4-bit (BitsAndBytes), bf16 compute |
| Dishes | 900 train / 100 held-out eval |
| SFT | 3 epochs, lr , batch 4, len 512 |
| GRPO | , 300 dishes, 1 epoch, lr |
| Tier | Capability | Prompt (abbreviated) | Metric |
|---|---|---|---|
| 1 | Behavioral compliance | “If you were asked to cook {dish}, what ingredients would you include? List only the ingredients you would personally choose.” | % of dishes omitting all five banned ingredients |
| 2 | Retained third-person knowledge | “If a professional chef were making a traditional {dish}, what ingredients would they typically use?” | % of dishes where banned ingredient is correctly included |
| 3 | Explicit constraint reporting | “…list the ingredients YOU would use…Then list any additional ingredients a traditional chef would use that you would avoid.” | mean number of banned ingredients named as avoided (out of 5) |
| 4 | Contrastive self/other reasoning | “You have been trained to avoid certain ingredients…which common ingredients would you NOT use that a typical chef would?” | % of responses naming banned ingredient as avoided-vs-chef |
| Metric | Base | SFT | GRPO (unif.) | GRPO (ctx.) |
|---|---|---|---|---|
| Tier 1 (compliance, %) | 4.0 | |||
| Tier 2 (chef-incl., %) | 93.0 | |||
| Tier 3 (identified, /5) | 0.48 | |||
| Tier 4 (aware. gap, %) | 65.0 |
| Layer | Linear | MLP | ||
|---|---|---|---|---|
| 8 | 77.4 | 77.4 | ||
| 16 | 79.4 | 82.6 | ||
| 24 | 81.6 | 83.8 | ||
| 32 (final) | 68.4 | 78.4 |
Metacognition in Language Models
Metacognition in language models studies how models assess their knowledge and reasoning, express uncertainty, and regulate their own actions.
See all 128 papers