Generative AI-Based Text Generation Methods Using Pre-Trained GPT-2 Model

Rohit Pandey,Hetvi Waghela,Sneha Rakshit,Aparna Rangari,Anjali Singh,Rahul Kumar,Ratnadeep Ghosal,Jaydip Sen
2024-04-02
Abstract:This work delved into the realm of automatic text generation, exploring a variety of techniques ranging from traditional deterministic approaches to more modern stochastic methods. Through analysis of greedy search, beam search, top-k sampling, top-p sampling, contrastive searching, and locally typical searching, this work has provided valuable insights into the strengths, weaknesses, and potential applications of each method. Each text-generating method is evaluated using several standard metrics and a comparative study has been made on the performance of the approaches. Finally, some future directions of research in the field of automatic text generation are also identified.
Computation and Language
What problem does this paper attempt to address?
The main objective of this paper is to conduct a comprehensive evaluation and comparative analysis of various decoding methods using the pre-trained GPT-2 model. Specifically, the study aims to: 1. **Introduce multiple decoding strategies**: Including Greedy Search, Beam Search, Top-K Sampling, Top-P Sampling (Nucleus Sampling), Contrastive Search, and Locally Typical Sampling, and evaluate the effectiveness of these methods. 2. **Evaluate the performance of decoding methods**: Examine the performance of different decoding techniques from the perspectives of Coherence, Relevance, and Diversity. 3. **Summarize the pros and cons**: Provide a detailed analysis of the advantages and limitations of each decoding method. 4. **Propose a novel generation scheme**: Design a new text generation scheme by modifying certain methods used in existing adversarial attacks to challenge and test the robustness of text classification models. In summary, this paper aims to establish a set of metrics to identify the most effective decoding techniques and explore how these techniques can be used to improve the quality of text generation.