Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Mitigating Reversal Curse in Large Language Models via Semantic-aware Permutation Training (2403.00758v3)

Published 1 Mar 2024 in cs.CL, cs.AI, and cs.LG
Mitigating Reversal Curse in Large Language Models via Semantic-aware Permutation Training

Abstract: While LLMs have achieved impressive performance across diverse tasks, recent studies showcase that causal LLMs suffer from the "reversal curse". It is a typical example that the model knows "A's father is B", but is unable to reason "B's child is A". This limitation poses a challenge to the advancement of artificial general intelligence (AGI), as it suggests a gap in the models' ability to comprehend and apply bidirectional reasoning. In this paper, we first conduct substantial evaluation and identify that the root cause of the reversal curse lies in the different word order between the training and inference stage, namely, the poor ability of causal LLMs to predict antecedent words within the training data. Accordingly, permutation on the training data is considered as a potential solution, since this can make the model predict antecedent words or tokens. However, previous permutation methods may disrupt complete phrases or entities, thereby posing challenges for the model to comprehend and learn from training data. To address this issue, we propose Semantic-aware Permutation Training (SPT), which addresses this issue by segmenting the training sentences into semantic units (i.e., entities or phrases) with an assistant LLM and permuting these units before feeding into the model. Extensive experiments demonstrate that SPT effectively mitigates the reversal curse since the performance on reversed questions approximates that on the forward ones, and significantly advances the performance of existing works.

Mitigating the Reversal Curse via Semantic-aware Permutation Training

Introduction

The phenomenon known as the "reversal curse" reflects a significant challenge for causal LLMs, where these models struggle to infer reversed relational information accurately. For instance, while a model might correctly respond to "Who is A's father?" it often falters when asked the converse, "Who is B's child?" despite knowing that "A's father is B." This limitation not only highlights a gap in the LLM's understanding and reasoning capabilities but also poses a barrier to the progress towards AGI.

Evaluation and Analysis of the Reversal Curse

A comprehensive evaluation to pinpoint the root cause of the reversal curse reveals the fundamental issue lies in the model's limited capability to predict antecedent words or tokens, primarily due to the varying word order between training and inference stages. This discovery sets the stage for exploring potential solutions, highlighting the inadequacy of lightweight methods at inference to address this issue effectively.

Addressing the Reversal Curse with Semantic-aware Permutation Training (SPT)

In response to the identified challenges, this paper introduces Semantic-aware Permutation Training (SPT), an innovative approach to permutation training. SPT enhances the training process by segmenting sentences into semantic units or chunks, such as entities or phrases, and subsequently applying three distinct permutation orders: original, reversed, and randomly permuted. This method not only preserves semantic integrity during the permutation process but also significantly mitigates the reversal curse, as demonstrated through extensive experiments. The SPT method showcases superior performance over existing approaches, effectively narrowing the performance gap between forward and reversed questions.

Theoretical and Practical Implications

The proposed SPT method holds profound implications for both theory and practice in the field of LLMs and AGI. Theoretically, it sheds light on the underlying mechanisms responsible for the reversal curse and offers a novel perspective on enhancing LLMs' understanding capabilities through semantic-aware training methodologies. Practically, SPT paves the way for the development of more intelligent and versatile LLMs capable of navigating complex reasoning tasks with improved efficiency and accuracy. Such advancements are expected to contribute significantly towards the realization of AGI.

Future Directions

While the current paper marks a significant step forward in overcoming the reversal curse, it also opens up numerous avenues for future research. Exploring the full potential of bi-directional models in conjunction with SPT, for instance, could yield further improvements in models' understanding capabilities. Additionally, there's a need for more in-depth investigations into the broader implications of semantic-aware permutation strategies on the generative capabilities of LLMs across a wider range of tasks.

Conclusion

The Semantic-aware Permutation Training method introduced in this paper offers a promising solution to the challenge of the reversal curse in causal LLMs. By leveraging semantic segmentation and diverse permutation strategies, SPT significantly enhances models' ability to comprehend and reason through reversed relations, moving a step closer towards achieving AGI. This breakthrough not only demonstrates substantial progress in the field of LLMs but also lays a solid foundation for future innovations in model training methodologies.

Ethics and Limitations

The paper strictly adheres to ethical guidelines, employing publicly available datasets and ensuring fairness in evaluations. However, it acknowledges inherent limitations, including the reliance on pre-trained LLMs which may inherit biases from large internet-based training corpora. Future efforts are essential to continually refine these models, mitigate biases, and explore the broader societal impacts of advanced LLMs and their applications.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (28)
  1. Word order does matter and shuffled language models know it. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6907–6919.
  2. Zeyuan Allen-Zhu and Yuanzhi Li. 2023. Physics of language models: Part 3.2, knowledge manipulation. CoRR, abs/2309.14402.
  3. The reversal curse: Llms trained on "a is b" fail to learn "b is a". CoRR, abs/2309.12288.
  4. Unnatural error correction: Gpt-4 can almost perfectly handle unnatural scrambled text. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 8898–8913.
  5. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality.
  6. BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171–4186. Association for Computational Linguistics.
  7. Glm: General language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 320–335.
  8. The Pile: An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027.
  9. Pal: Program-aided language models. In International Conference on Machine Learning, pages 10764–10799. PMLR.
  10. Studying large language model generalization with influence functions. CoRR, abs/2308.03296.
  11. Bert & family eat word salad: Experiments with text understanding. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 12946–12954.
  12. Spanbert: Improving pre-training by representing and predicting spans. Transactions of the Association for Computational Linguistics, 8:64–77.
  13. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35:22199–22213.
  14. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871–7880.
  15. Batgpt: A bidirectional autoregessive talker from generative pre-trained transformer. CoRR, abs/2307.00360.
  16. Are we falling in a middle-intelligence trap? an analysis and mitigation of the reversal curse. CoRR, abs/2311.07468.
  17. Untying the reversal curse via bidirectional language model editing. CoRR, abs/2310.10322.
  18. OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.
  19. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744.
  20. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311–318, Philadelphia, Pennsylvania, USA. Association for Computational Linguistics.
  21. Out of order: How important is the sequential order of words in a sentence in natural language understanding tasks? In Findings of the Association for Computational Linguistics: ACL/IJCNLP 2021, Online Event, August 1-6, 2021, volume ACL/IJCNLP 2021 of Findings of ACL, pages 1145–1160. Association for Computational Linguistics.
  22. Code llama: Open foundation models for code. CoRR, abs/2308.12950.
  23. Masked language modeling and the distributional hypothesis: Order word matters pre-training for little. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 2888–2913.
  24. Unnatural language inference. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 7329–7346.
  25. Mass: Masked sequence to sequence pre-training for language generation. In International Conference on Machine Learning, pages 5926–5936. PMLR.
  26. Mpnet: Masked and permuted pre-training for language understanding. Advances in Neural Information Processing Systems, 33:16857–16867.
  27. Llama: Open and efficient foundation language models. CoRR, abs/2302.13971.
  28. Xlnet: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems, 32.
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (6)
  1. Qingyan Guo (8 papers)
  2. Rui Wang (996 papers)
  3. Junliang Guo (39 papers)
  4. Xu Tan (164 papers)
  5. Jiang Bian (229 papers)
  6. Yujiu Yang (155 papers)
Citations (1)