A Theoretical Understanding of LLM Self-Correction: Based on In-Context AlignmentA Theoretical Understanding of Self-Correction through In-context Alignment
This arXiv paper provides a theoretical analysis of large language model self-correction from the perspective of in-context learning, showing in a simplified setting resembling alignment tasks that when the model's self-check is relatively accurate and used as a reward, the model can improve its previous answers in an in-context manner. The theoretical construction goes beyond prior work based on oversimplified linear Transformers, illustrating the role of real Transformer designs such as softmax attention, multi-head attention, and MLP modules in self-correction, and the related conclusions are validated on synthetic datasets. The authors also demonstrate new applications of self-correction, such as defending against LLM jailbreaks, where a simple self-correction step can make a noticeable difference.