Beyond Surface Alignment: Grounding the Dynamics of Situational Understanding and Generative Control in LLMs
Organizations: DEPARTMENT OF COMPUTER SCIENCE THE UNIVERSITY OF CHICAGO CHICAGO, ILLINOIS
Abstract
The current alignment tuning paradigm for Large Language Models (LLMs) prioritizes surface-level behaviors -- fluency, safety, and tonal consistency. While effective for casual chat, this thesis argues that such surface alignment masks a lack of grounding, creating models that are stylistically confident but situationally brittle. We propose a framework of Grounded Alignment, analyzing how models process context (Input) and structure generation (Output), then aligning these grounded behaviors to human needs. First, we evaluate failures in Situational Grounding. SitTest shows that despite large context windows, state-of-the-art models struggle to maintain a consistent "mental model" of a changing environment. ReCode further shows that models rely on surface heuristics rather than deep syntactic dependencies: they "read" extensive histories without truly "understanding" the evolving situation. Second, we evaluate Generative Grounding. We introduce the Branching Factor (BF) to map LLM generation, finding that standard alignment tuning constricts this landscape into premature stylistic collapse. Hindsight further shows that models often fail to understand their own generations. Finally, we propose Dynamic Control for grounded interaction. AI Realtor demonstrates context engineering to compensate for poor situational grounding. Base-Aligned Model Collaboration decouples exploration from stylistic constraints. We also present Annealed Sampling for verifiable reinforcement learning and apply these ideas to Addiction Support, where model-generated rationalization offers a communication interface for high-stakes domains. Collectively, this work moves beyond surface alignment toward agents anchored in both context and generation.
Figures & tables
| Normal Instruction | Step-EM / State-EM | ||
|---|---|---|---|
| 2-shot | 3-shot | 5-shot | |
| NL Functor + NL Argument | |||
| SL Functor + SL Argument | |||
| Counter-Intuitive Instruction (On NL) | |||
| NL Functor + NL Argument | |||
| SL Functor + SL Argument | |||
| Normal Initialization | Step-EM / State-EM | |
|---|---|---|
| 2-shot | 5-shot | |
| NL Functor + NL Argument | / | / |
| SL Functor + SL Argument | / | / |
| Compressed Initialization | ||
| NL Functor + NL Argument | / | / |
| SL Functor + SL Argument | / | / |
| Perturbations | MBPP Docstrings |
|---|---|
| Nominal | Write a function to find all words which are at least 4 characters long in a string by using regex. |
| BackTranslation | Write a function to find all words in a string at least 4 characters long using regex. |
| ButterFingers | Wri h e a function to find all words which are a r leas v 4 characters long in a string by using regex. |
| ChangeCharCase | Wri T e a f U ncti O n to find All wo R ds whic H are at le A st 4 C ha R acter S L on G in a string by u SI ng re G ex. |
| EnglishInflectionalVariation | Writes a functions to found all word which was at least 4 character long in a string by use regex. |
| SwapCharacters | rW ite a function to find all words which are at el ast 4 ch ra acters long in a string by su ing regex. |
| Perturbations on Function Names | MBPP |
|---|---|
| Nominal | find_char_long |
| CamelCase | findCharLong |
| ButterFingers | fin f _char_long |
| SwapCharacters | find_c ah r_long |
| ChangeCharCase | fin D _cha R _long |
| InflectionalVariation | found_chars_long |
| HumanEval | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Docstring | Nominal | 0.232 | 0.140 | 0.262 | 0.195 | 0.305 | 0.195 | 0.104 | 0.152 | 0.122 |
| RP 5 @1 | 0.122 | 0.049 | 0.104 | 0.073 | 0.128 | 0.098 | 0.024 | 0.067 | 0.037 | |
| RD 5 @1(%) | 47.37 | 65.28 | 60.47 | 62.50 | 58.00 | 50.00 | 76.47 | 56.00 | 70.00 | |
| RR 5 @1(%) | 20.73 | 14.63 | 27.44 | 18.90 | 35.37 | 18.90 | 14.63 | 15.85 | 10.98 | |
| Function | Nominal | 0.232 | 0.140 | 0.262 | 0.195 | 0.305 | 0.195 | 0.104 | 0.152 | 0.122 |
| MBPP | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Docstring | Nominal | 0.317 | 0.191 | 0.361 | 0.221 | 0.407 | 0.241 | 0.128 | 0.199 | 0.133 |
| RP 5 @1 | 0.137 | 0.050 | 0.147 | 0.042 | 0.163 | 0.045 | 0.011 | 0.031 | 0.013 | |
| RD 5 @1(%) | 56.96 | 73.66 | 59.38 | 80.93 | 59.85 | 81.28 | 91.20 | 84.54 | 90.00 | |
| RR 5 @1(%) | 36.86 | 34.39 | 41.89 | 36.76 | 46.72 | 44.66 | 25.57 | 35.32 | 30.08 | |
| Function | Nominal | 0.317 | 0.191 | 0.361 | 0.221 | 0.407 | 0.241 | 0.128 | 0.199 | 0.133 |
| Category | Metric | HumanEval | MBPP |
|---|---|---|---|
| Docstring | RP 5 @1 | 0.078 | 0.071 |
| RD 5 @1 | 60.67 | 75.31 | |
| RR 5 @1 | 19.72 | 36.92 | |
| Function | RP 5 @1 | 0.113 | 0.142 |
| RD 5 @1 | 41.61 | 46.59 | |
| RR 5 @1 | 12.06 | 21.01 |
| HumanEval | MBPP | |
|---|---|---|
| Naturalness (Nominal) | 0.92 | 0.92 |
| Naturalness (Perturbed) | 0.75 | 0.80 |
| Semantics Similarity | 0.92 | 0.92 |
| HumanEval | MBPP | |||
|---|---|---|---|---|
| Syntax | Format | Syntax | Format | |
| CodeBLEU (syntax) | 0.95 | 0.98 | 0.93 | 0.96 |
| CodeBLEU (dataflow) | 0.94 | 1.00 | 0.92 | 1.00 |
| Models | Default ( =0.6, =0.9) | =0.6, =1.0 | =1.0, =0.9 | Min ( =1.0, =1.0) | |
|---|---|---|---|---|---|
| Llama-3-70B-Instruct | 78.50 ( 2.09) | 77.60 ( 2.23) | 77.50 ( 2.60) | 75.90 ( 2.85) | 3.31 |
| Llama-3-70B | 78.00 ( 3.52) | 74.00 ( 3.80) | 72.00 ( 4.38) | 63.50 ( 5.02) | 18.59 |
| DeepSeek-R1-Distill-Llama-8B | 66.30 ( 3.51) | 65.70 ( 3.84) | 62.70 ( 4.14) | 59.70 ( 4.65) | 9.95 |
| Llama-3.1-8B-Instruct | 63.00 ( 4.01) | 61.50 ( 4.37) | 57.50 ( 4.92) | 50.50 ( 5.34) | 19.84 |
| Llama-3.1-8B | 54.00 ( 4.61) | 53.50 ( 4.92) | 47.00 ( 5.21) | 37.00 ( 5.48) | 31.48 |
| Model | Maj@1 Std | Maj@3 Std | Maj@8 Std | Maj@16 Std | BF |
|---|---|---|---|---|---|
| DeepSeek-R1-Distill-Llama-70B | 14.34 | 8.29 | 4.99 | 3.21 | 1.23 |
| Llama-3-70B-Instruct | 16.37 | 11.40 | 7.50 | 5.12 | 1.28 |
| Llama-3-70B | 27.78 | 19.53 | 13.22 | 9.23 | 1.31 |
| DeepSeek-R1-Distill-Llama-8B | 27.10 | 20.91 | 13.93 | 9.14 | 1.23 |
| Llama-3.1-8B-Instruct | 31.54 | 24.64 | 17.30 | 12.90 | 1.31 |
| Llama-3.1-8B | 36.41 | 29.78 | 20.43 | 14.05 | 1.35 |
| Metric | Standard Prompting | Exploration-Only | Self-Reflection |
| TruthfulQA | |||
| Rouge-1 | 60.8 | ||
| BLEURT | 72.8 | ||
| HotpotQA | |||
| Accuracy* | 80.8 | ||
| EM | |||
| Seed=1 | |
| Seed=2 |
| Setting | Spearman | Top-5 Inter. | Top-10 Inter. | MSE | Running Time |
|---|---|---|---|---|---|
| SVS-25 | s/it | ||||
| KS-25 | s/it | ||||
| KS-200 | s/it | ||||
| KS-2000 | s/it | ||||
| KS-8000 | s/it |
| Setting | Spearman | Top-5 Inter. | Top-10 Inter. | MSE | Running Time |
|---|---|---|---|---|---|
| SVS-25 | s/it | ||||
| KS-25 | s/it | ||||
| KS-200 | s/it | ||||
| KS-2000 | s/it | ||||
| KS-8000 | s/it |
| Method | MNLI | Yelp-Polarity | ||
| Spearman | MSE | Spearman | MSE | |
| SVS-25 | 0.75 | 1.90e-2 | 0.84 | 6.64e-3 |
| KS-25 | 0.17 | 9.95e-2 | 0.12 | 4.34e-2 |
| KS-200 | 0.35 | 7.73e-2 | 0.24 | 5.77e-2 |
| KS-2000 | 0.60 | 2.54e-2 | 0.51 | 1.86e-2 |
| KS-8000 | 0.74 | 1.25e-2 | 0.70 | 6.25e-3 |
| Training Data Proportion | Spearman (MNLI) | Spearman (Yelp-Polarity) |
| 10% | 0.45 | 0.40 |
| 30% | 0.57 | 0.65 |
| 50% | 0.65 | 0.71 |
| 70% | 0.65 | 0.72 |
| 100% | 0.77 | 0.76 |
| Method | MNLI | Yelp-Polarity |
| Spearman | Spearman | |
| SVS-2 | 0.41 | 0.52 |
| SVS-3 | 0.47 | 0.60 |
| SVS-5 | 0.55 | 0.69 |
| SVS-25 | 0.75 | 0.84 |
| Our Amortized Model | 0.42 | 0.61 |
| Model | Acc |
|---|---|
| BOW | 67.3 |
| ShapCal (KS-2000) | 67.4 |
| ShapCal (Amortized) | 68.0 |
| Diversity | Quality | |
|---|---|---|
| Model | (#Clusters) | (Reward) |
| Llama-3-8B | 8.13 | 1.28 |
| Llama-3-8B-Instruct | 2.58 | 7.62 |
| Routers | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| - Rand | 0.493 | 26.3% | 0.409 | 17.0% | 0.451 | 21.7% |
| - Judge | 0.302 | 2.6% | 0.254 | 0.6% | 0.278 | 1.6% |
| - P | 0.433 | 4.8% | 0.397 | 8.5% | 0.415 | 6.7% |
| - FC | 0.419 | 3.2% | 0.382 | 4.7% | 0.401 | 4.0% |
| - P-Punc | 0.495 | 30.7% | 0.452 | 31.3% | 0.474 | 31.0% |
| Method | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| Base | 0.142 | 9.8% | 0.142 | 13.2% | 0.142 | 11.5% |
| Aligned | 0.273 | 43.8% | 0.128 | 19.9% | 0.200 | 31.8% |
| AACo | 0.022 | 4.5% | 0.006 | 7.0% | 0.014 | 5.7% |
| BACo | 0.495 | 42.0% | 0.452 | 59.8% | 0.474 | 50.9% |
| I’m 18m and I’ve been taking norcos since I was 16 but just on and off. Starting this year I’ve been taking it every day basically and now I’m tired of it. I still get high so ig my addiction isn’t that bad as others but I don’t want to get to that point. I’m tired of chasing the high. I’ve spent at least 3k on norcos this year and I can’t control myself . I try to go a day sober but my mind is telling me I need and then withdrawals starts […] |
| Medical Use | Oxycodone for wisdom teeth removal I just got 4 wisdom teeth plus another tooth in my palette removed and got prescribed 1 or 2 5mg tablets of oxy (Endone) each time . He recommended to avoid it if I could since I’m 43kg and have no tolerance. […] |
|---|---|
| Misuse | Oxy nod but no euphoria? Hi everyone, I tried oxy for the first time a few weeks back snorting a prolonged 20mg tablet and felt pretty good . Wednesday I dropped 9 of the 5mg capsules over a couple hours and was nodding strongly […] |
| Addiction | Well y’all were right. The sickness came. And is the worst i’ve ever experienced. Took subs, went into pwd accidentally and jump started the methadone sickness. I am to the point that I just have to get off this godforsaken mountain and go back to my ex and get back in the clinic bc at this rate i’m afraid i’m gonna end up killing myself .[…]. |
| Recovery | It’s my birthday! One year off opiates It’s been 365 days since I decided to take back control of my body. I was highly dependent and addicted to prescribed opiates […] |
| Relapse | So high. 18 hours later. Still so high. So I’m pissed at myself. I was clean from heroin for 11 months and last night I did some . And for no reason too […] |
| Not Using | Partners of an Opiate addict in recovery How do you guys do this? I feel like I am having an incredibly hard time "moving on". I have nightmares of my partner oding, dying, and pretty much anything else that involves drug use . I over analyze everything […] |
| Category | Novice | Expert |
|---|---|---|
| Misuse | 22.10 | 20.0 |
| Addiction | 29.15 | 12.53 |
| Recovery | 18.89 | 25.49 |
| Relapse | 4.65 | 3.96 |
| Medical Use | 7.05 | 3.52 |
| Not Using | 18.17 | 34.51 |
| Is it safe to mix 20mg oxy with a few standard drinks? Seen online it’s dangerous but I don’t trust a lot of those harm reduction websites, most of them are whack. EDIT: I didn’t do it don’t worry, thanks for the info |
| Given the following title, text, and explanation from the text, please identify the appropriate opioid usage category among the following types: ’Medical Use’, ’Misuse’ ,’Recovery’, ’Relapse’, ’Addiction’, ’Not Using’. Title: {{title}} Text: {{text}} Explanation: {{explanation}} |
| Given the following title and text, please identify the appropriate opioid usage category among the following types: ’Medical Use’, ’Misuse’, ’Recovery’, ’Relapse’, ’Addiction’, ’Not Using’. Please provide an explanation for your answer by extracting the relevant span from the text that justifies your choice. { 13 in-context samples with the format below } Title: {{title}} Text: {{text}} Label: {{label}} Explanation: {{explanation}} |
| Mode | Test Set | Zero-Shot | Few-Shot | Supervised | |||
|---|---|---|---|---|---|---|---|
| T0pp | GPT3 | GPT4 | DeBERTa | T5-3B | T5-11B | ||
| w/o Explanation | Expert | 48.9 / 46.9 | 62.2 / 57.1 | 55.4 / 50.2 | 67.6 / 65.7 | 63.5 / 61.2 | 71.4 / 70.4 |
| Novice | 62.0 / 60.8 | 66.4 / 65.4 | 63.3 / 60.0 | 74.0 / 74.4 | 72.7 / 71.4 | 80.9 / 81.5 | |
| w/ Explanation | Expert | 48.9 / 47.4 | 61.1 / 54.5 | 63.2 / 59.1 | 73.8 / 72.6 | 64.4 / 65.5 | 76.6 / 77.0 |
| Novice | 62.7 / 58.5 | 66.9 / 65.9 | 67.3 / 64.8 | 81.3 / 81.9 | 78.7 / 77.3 | 84.0 / 84.0 | |
| Explanation | Test Set | T5-11B | DeBERTa |
|---|---|---|---|
| Gold | Expert | 76.6 | 73.8 |
| Novice | 84.0 | 81.3 | |
| Silver | Expert | 70.3 | 70.3 |
| Novice | 78.0 | 78.0 | |
| Random | Expert | 69.6 ( 1.3) | 65.8 ( 1.1) |
| Novice | 68.3 ( 1.7) | 67.9 ( 1.4) |
| Setting | Not Using - Misuse | Recovery - Addiction | Not Using - Addiction | |||
|---|---|---|---|---|---|---|
| T5-11B- w/o Explanation | 20% | 4.5% | 20% | 0% | 14% | 0% |
| DeBERTa- w/o Explanation | 18% | 0% | 18% | 3.6% | 16% | 5.5% |
| T5-11B- w/ Explanation | 16% | 8% | 14% | 0% | 13% | 0% |
| DeBERTa- w/ Explanation | 15% | 2.3% | 15% | 3.6% | 15% | 0% |
| Dataset | Agreement | T5-11B (w/o expl) | T5-11B (w/ expl) | DeBERTa (w/o expl) | DeBERTa (w/ expl) |
|---|---|---|---|---|---|
| Novice | Unanimous Consent | 95.5 / 94.0 | 97.1 / 95.7 | 87.1 / 85.9 | 90.0 / 89.6 |
| Arguable (Majority Vote) | 68.0 / 66.7 | 72.5 / 71.3 | 62.5 / 60.8 | 73.8 / 75.2 | |
| Arguable (All Annotations) | 84.0 / 81.4 | 92.5 / 91.8 | 86.3 / 84.3 | 91.3 / 92.1 | |
| Expert (FirstBatch) | Unanimous Consent | 92.7 / 85.0 | 96.4 / 97.1 | 83.6 / 72.7 | 89.1 / 83.2 |
| Arguable (Majority Vote) | 60.3 / 59.9 | 64.0 / 66.0 | 56.9 / 58.2 | 65.0 / 66.2 | |
| Arguable (All Annotations) | 84.6 / 83.3 | 86.8 / 85.8 | 82.5 / 82.7 | 86.9 / 87.3 |
Appendix figures & tables65 assets
Supplementary material from the paper’s appendix.
Appendix
| Normal Instruction | Step-EM / State-EM | |
|---|---|---|
| 2-shot | 5-shot | |
| NL Functor + NL Argument | / | / |
| Synthetic Functor + Synthetic Argument | / | / |
| Actions w/ Distractor | ||
| NL Functor + NL Argument | / | / |
| Synthetic Functor + Synthetic Argument | / | / |
| Normal Instruction | Step-EM / State-EM | ||
|---|---|---|---|
| 2-shot | 3-shot | 5-shot | |
| NL Functor + NL Argument | |||
| Synthetic Functor + NL Argument | |||
| NL Functor + Synthetic Argument | |||
| Synthetic Functor + Synthetic Argument | |||
| Counter-Intuitive Instruction (On NL) | |||
| Normal Instruction | State-EM, 2-shot | |
|---|---|---|
| ChatGPT | Text-Davinci-003 | |
| NL Functor + NL Argument | ||
| Synthetic Functor + NL Argument | ||
| NL Functor + Synthetic Argument | ||
| Synthetic Functor + Synthetic Argument | ||
| Fleiss Kappa | HumanEval | MBPP |
|---|---|---|
| Naturalness (Nominal) | 0.362 | 0.301 |
| Naturalness (Perturbed) | 0.435 | 0.326 |
| Semantics Similarity | 0.658 | 0.461 |
| Categories | Perturbations | HumanEval | MBPP |
|---|---|---|---|
| Docstring | BackTranslation | 0.91 | 0.95 |
| ButterFingers | 0.87 | 0.89 | |
| ChangeCharCase | 1.00 | 1.00 | |
| EnglishInflectionalVariation | 0.96 | 0.93 | |
| SwapCharacters | 0.90 | 0.87 | |
| SynonymInsertion | 0.91 | 0.88 |
| Categories | Perturbations | HumanEval | MBPP | ||
|---|---|---|---|---|---|
| CodeBLEU | CodeBLEU | CodeBLEU | CodeBLEU | ||
| (syntax) | (dataflow) | (syntax) | (dataflow) | ||
| Syntax | DeadCodeInserter | 0.85 | 0.79 | 0.72 | 0.67 |
| For-While Switch | 0.92 | 0.90 | 0.84 | 0.86 | |
| OperandSwap | 0.91 | 1.00 | 0.90 | 1.00 | |
| VarRenamerCB | 1.00 | 0.99 | 0.93 | 0.99 | |
| HumanEval | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.232 | 0.140 | 0.262 | 0.195 | 0.305 | 0.195 | 0.104 | 0.152 | 0.122 |
| BackTranslation | RP 5 @1 | 0.213 | 0.116 | 0.238 | 0.159 | 0.244 | 0.152 | 0.098 | 0.134 | 0.098 |
| RD 5 @1(%) | 7.89 | 17.39 | 9.30 | 18.75 | 20.00 | 21.88 | 5.88 | 12.00 | 20.00 | |
| RR 5 @1(%) | 4.27 | 6.10 | 8.54 | 6.10 | 10.98 | 5.49 | 3.05 | 3.05 | 3.66 | |
| ButterFingers | RP 5 @1 | 0.165 | 0.098 | 0.171 | 0.122 | 0.189 | 0.116 | 0.067 | 0.098 | 0.067 |
| MBPP | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.317 | 0.191 | 0.361 | 0.221 | 0.407 | 0.241 | 0.128 | 0.199 | 0.133 |
| BackTranslation | RP 5 @1 | 0.304 | 0.186 | 0.360 | 0.222 | 0.387 | 0.230 | 0.119 | 0.177 | 0.128 |
| RD 5 @1(%) | 4.21 | 2.69 | 0.28 | -0.47 | 4.80 | 4.68 | 7.20 | 11.34 | 3.85 | |
| RR 5 @1(%) | 6.26 | 6.06 | 7.91 | 6.06 | 6.26 | 7.08 | 4.00 | 5.95 | 5.44 | |
| ButterFingers Perturbation | RP 5 @1 | 0.210 | 0.092 | 0.240 | 0.100 | 0.280 | 0.126 | 0.044 | 0.082 | 0.057 |
| HumanEval | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.232 | 0.140 | 0.262 | 0.195 | 0.305 | 0.195 | 0.104 | 0.152 | 0.122 |
| CamelCase | RP 5 @1 | 0.238 | 0.140 | 0.256 | 0.201 | 0.293 | 0.165 | 0.098 | 0.152 | 0.116 |
| RD 5 @1(%) | -2.63 | 0.00 | 2.33 | -3.13 | 4.00 | 15.62 | 5.88 | 0.00 | 5.00 | |
| RR 5 @1(%) | 1.83 | 1.22 | 3.05 | 3.05 | 3.66 | 3.05 | 3.05 | 1.22 | 0.61 | |
| ButterFinger | RP 5 @1 | 0.195 | 0.104 | 0.232 | 0.177 | 0.274 | 0.159 | 0.098 | 0.140 | 0.091 |
| MBPP | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.317 | 0.191 | 0.361 | 0.221 | 0.407 | 0.241 | 0.128 | 0.199 | 0.133 |
| CamelCase | RP 5 @1 | 0.316 | 0.196 | 0.367 | 0.219 | 0.408 | 0.245 | 0.116 | 0.194 | 0.134 |
| RD 5 @1(%) | 0.32 | -2.69 | -1.42 | 0.93 | -0.25 | -1.70 | 9.60 | 2.58 | -0.77 | |
| RR 5 @1(%) | 5.44 | 5.44 | 7.29 | 5.34 | 7.08 | 4.52 | 5.75 | 5.03 | 3.18 | |
| ButterFinger | RP 5 @1 | 0.312 | 0.185 | 0.370 | 0.203 | 0.412 | 0.231 | 0.110 | 0.175 | 0.117 |
| HumanEval | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.402 | 0.293 | 0.518 | 0.366 | 0.549 | 0.390 | 0.189 | 0.323 | 0.250 |
| DeadCodeInserter | RP 5 @1 | 0.116 | 0.079 | 0.152 | 0.110 | 0.159 | 0.091 | 0.055 | 0.079 | 0.079 |
| RD 5 @1(%) | 71.21 | 72.92 | 70.59 | 70.00 | 71.11 | 76.56 | 70.97 | 75.47 | 68.29 | |
| RR 5 @1(%) | 37.80 | 30.49 | 41.46 | 32.93 | 45.12 | 37.20 | 17.07 | 30.49 | 27.44 | |
| ForWhile TransformerFirst | RP 5 @1 | 0.384 | 0.226 | 0.500 | 0.305 | 0.537 | 0.384 | 0.159 | 0.280 | 0.213 |
| MBPP | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.450 | 0.285 | 0.535 | 0.331 | 0.571 | 0.379 | 0.219 | 0.292 | 0.176 |
| DeadCodeInserter | RP 5 @1 | 0.043 | 0.020 | 0.044 | 0.024 | 0.055 | 0.025 | 0.015 | 0.015 | 0.009 |
| RD 5 @1(%) | 90.41 | 93.17 | 91.75 | 92.86 | 90.29 | 93.50 | 92.96 | 94.72 | 94.74 | |
| RR 5 @1(%) | 52.05 | 37.99 | 57.39 | 39.12 | 60.57 | 44.87 | 29.26 | 37.78 | 24.95 | |
| ForWhile TransformerFirst | RP 5 @1 | 0.432 | 0.259 | 0.497 | 0.303 | 0.532 | 0.346 | 0.182 | 0.245 | 0.149 |
| HumanEval | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.402 | 0.293 | 0.518 | 0.366 | 0.549 | 0.390 | 0.189 | 0.323 | 0.250 |
| Tab-Indent | RP 5 @1 | 0.415 | 0.305 | 0.518 | 0.354 | 0.561 | 0.396 | 0.146 | 0.299 | 0.244 |
| RD 5 @1(%) | -3.03 | -4.17 | 0.00 | 3.33 | -2.22 | -1.56 | 22.58 | 7.55 | 2.44 | |
| RR 5 @1(%) | 3.66 | 4.88 | 8.54 | 4.88 | 3.66 | 4.27 | 7.93 | 9.76 | 7.93 | |
| Line Split | RP 5 @1 | 0.384 | 0.274 | 0.500 | 0.378 | 0.524 | 0.390 | 0.171 | 0.305 | 0.244 |
| MBPP | Metric | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | CodeGen | InCoder | InCoder | GPT-J |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B mono | 2B multi | 6B mono | 6B multi | 16B mono | 16B multi | 1B | 6B | 6B | ||
| Nominal | RP 5 @1 | 0.450 | 0.285 | 0.535 | 0.331 | 0.571 | 0.379 | 0.219 | 0.292 | 0.176 |
| Tab-Indent | RP 5 @1 | 0.452 | 0.302 | 0.530 | 0.339 | 0.566 | 0.385 | 0.208 | 0.325 | 0.176 |
| RD 5 @1(%) | -0.46 | -5.76 | 0.96 | -2.48 | 0.90 | -1.63 | 4.69 | -11.62 | 0.00 | |
| RR 5 @1(%) | 6.37 | 6.98 | 5.85 | 8.01 | 6.88 | 6.78 | 9.24 | 12.22 | 7.60 | |
| Line Split | RP 5 @1 | 0.445 | 0.275 | 0.524 | 0.326 | 0.556 | 0.378 | 0.187 | 0.283 | 0.163 |
| Category | Metric | |||
|---|---|---|---|---|
| Docstring | Nominal | 0.287 | 0.308 | 0.306 |
| RP 1 @1 | 0.128 | 0.140 | 0.143 | |
| RD 1 @1(%) | 55.32 | 54.46 | 53.34 | |
| RR 1 @1(%) | 15.85 | 16.77 | 16.55 | |
| Function | Nominal | 0.287 | 0.308 | 0.306 |
| RP 1 @1 | 0.183 | 0.180 | 0.183 |
| Metric | Standard Prompting | Exploration-Only | Self-Reflection |
| TruthfulQA | |||
| Rouge-1 | 59.0 | ||
| BLEURT | 72.9 | ||
| HotpotQA | |||
| Accuracy | |||
| Metric | Standard Prompting | Exploration-Only | Self-Reflection |
| TruthfulQA | |||
| Rouge-1 | 53.8 | ||
| BLEURT | 63.0 | ||
| HotpotQA | |||
| Accuracy* | 62.9 | ||
| Metric | Standard Prompting | Exploration-Only | Self-Reflection |
| TruthfulQA | |||
| Rouge-1 | 63.3 | ||
| BLEURT | 73.9 | ||
| HotpotQA | |||
| Accuracy* | 90.9 | ||
| Hyperparameter | Value(s) |
|---|---|
| Training Batch Size | 1024 |
| Max Prompt Length | 1024 |
| Max Response Length | 3072 |
| Mini Batch Size | 256 |
| Micro Batch Size Per GPU | 4 |
| Learning Rate |
| Method | Time/Sample (s) | Tok/s | Peak Memory |
|---|---|---|---|
| Aligned | 40.0 | 15.1 GiB | |
| Response Ensemble | 34.8 | 15.4 GiB | |
| Diverse Beam Search | 17.0 | 15.8 GiB | |
| Logits Ensemble | 20.1 | 30.1 GiB | |
| In-Context Resampling | 4.1 | 15.5 GiB | |
| Paraphrase Prompting | 3.3 | 15.1 GiB |
| Method | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| Base | 0.142 | 9.8% | 0.142 | 13.1% | 0.142 | 11.4% |
| Aligned | 0.273 | 40.1% | 0.128 | 17.2% | 0.200 | 28.6% |
| Nudging | 0.192 | 6.8% | 0.161 | 7.6% | 0.176 | 7.2% |
| Decoding | - | 0.8% | - | 1.0% | - | 0.9% |
| Prompting best | - | 8.0% | - | 6.5% | - | 7.3% |
| Method | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| Base | 0.000 | 1.9% | 0.000 | 6.8% | 0.000 | 4.38% |
| Aligned | 0.253 | 59.2% | 0.077 | 29.1% | 0.165 | 44.1% |
| Nudging | 0.430 | 11.4% | 0.387 | 15.6% | 0.408 | 13.5% |
| BACo best | 0.473 | 27.4% | 0.454 | 48.5% | 0.463 | 38.0% |
| Method | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| Base | 0.151 | 26.3% | 0.153 | 28.1% | 0.152 | 27.2% |
| Aligned | 0.282 | 47.7% | 0.106 | 41.2% | 0.194 | 44.4% |
| Nudging | 0.205 | 9.7% | 0.194 | 6.5% | 0.199 | 8.1% |
| BACo best | 0.367 | 16.3% | 0.174 | 24.2% | 0.271 | 20.3% |
| Method | Lexical | Semantic | Overall | |||
|---|---|---|---|---|---|---|
| Cov. | Dom. | Cov. | Dom. | Cov. | Dom. | |
| Base | 0.142 | 7.6% | 0.142 | 10.9% | 0.142 | 9.2% |
| Aligned | 0.273 | 36.5% | 0.128 | 15.8% | 0.200 | 26.1% |
| In-context Prompt | - | 0.0% | - | 2.2% | - | 1.1% |
| Paraphrase Prompt | - | 8.0% | - | 5.6% | - | 6.8% |
| Diverse BS Decoding | - | 0.8% | - | 1.0% | - | 0.9% |
| Method | Overall Cov. | Overall Dom. |
|---|---|---|
| Base | 0.098 | 11.7% |
| Aligned | 0.209 | 30.5% |
| Nudging | 0.281 | 5.5% |
| Others | - | 8.3% |
| BACo - P-Punc | 0.236 | 44.0% |