Combating Hallucination and Misinformation: Factual Information Generation with Tokenized Generative Transformer (2023)

Abstract: Large language models have gained a meteoric rise recently. With the prominence of LLMs, hallucination and misinformation generation have become a severity too. To combat this issue, we propose a contextual topic modeling approach called Co-LDA for generative transformer. It is based on Latent Dirichlet Allocation and is designed for accurate sentence-level information generation. This method extracts cohesive topics from COVID-19 research literature, grouping them into relevant categories. These contextually rich topic words serve as masked tokens in our proposed Tokenized Generative Transformer, a modified Generative Pre-Trained Transformer for generating accurate information in any designated topics. Our approach addresses micro hallucination and incorrect information issues in experimentation with the LLMs. We also introduce a Perplexity-Similarity Score system to measure semantic similarity between generated and original documents, offering accuracy and authenticity for generated texts. Evaluation of benchmark datasets, including question answering, language understanding, and language similarity demonstrates the effectiveness of our text generation method, surpassing some state-of-the-art transformer models.

## introduction large language models have become paradigmshifting research in natural language processing, with their outstanding abilities already demonstrated in a multitude of tasks @xcite . while the concept of llms is not entirely new @xcite , they have obtained computational and performative success in the last couple of years due to the enormous growth of required hardware resources. despite the research success, an issue with the existing llms is that, while continuing a conversation with any llm-based conversational agent, the rapid shifting of topics and contexts as input prompts often lead the conversation into a logical void. in such a scenario, often some llm-based agents (for instance, chatgpt foot_0 ) cannot grasp changing context and changing the topic to persuade for delivering an expected response. others (for instance, google bard foot_1 ) show multiple drafts of the response, allowing the users to choose the better response as per their liking. one or more such responses can even produce misinformation. another problem being discussed quite a lot about llms is the hallucination problem @xcite . here, the received answer is not structured with desirable logic and reasoning, and the flow of the specific content generation can heavily deviate. in addition, some level of intellectual knowledge of semantics and queries is required to explicitly finetune the conversation initiation questions in certain ways to get the desired answer. this knowledge is known as prompt engineering. in this paper, we develop an incrementallearning-based contextual topic modeling algorithm, for the generation of contingently relevant information from a large corpus of research papers related to covid-19. the use case of our approach is made in the ground truth of the scientific literature on covid-19, where effective information generation and analysis are vital for understanding and communicating critical insights. we propose contextual lda (co-lda), to extract contextual topics from the training set. we generate four sets of contextually rich topics (t1 to t4) with ten topic words each using the context scores derived from the co-lda algorithm, categorized into distinctive categories such as medical, social, research, and generic topics for distinct grouping. upon selecting the best iteration with the highest context score, we track the original sentences from the training set containing topic words from the resultant topic set. then a benchmark dataset is ac-quired as a test set and the same steps are performed as with the training set. to generate informative sentences, we construct a tokenizer-based transformer on the existing gpt-3 and call this model the tokenized generative transformer (tgt). the extracted topic words are then converted to corresponding masks using the context scores before feeding them as inputs in the tgt model. the masked topic words are then converted into a numerical encoded sequence of tokens suitable for model input. this process enables our model to understand and generate contextual fact-based text with better token-level accuracy and semantics. we evaluate the performance of generated sentences based on the accuracy in terms of contextuality and semantics. here, we propose the perplexity-similarity scores to calculate the pairwise similarity scores between the comparing document sets of original sentences and generated sentences. to improve the accuracy of our computations, variablelength functions are considered for the comparable sentences. a higher matching score indicates better semantic similarity, with more accurate information augmentation. our experimental framework outperforms most of the compared baseline stateof-the-art llms in factual information generation tasks on the same test data. in this work, we make several fundamental contributions, outlined as: ## motivation exhaustive research on llms has exposed challenges in mitigating hallucination @xcite and misinformation generation @xcite . existing llms exhibit difficulties in maintaining logical coherence during contextual shifts, leading to misinformation @xcite . our motivation lies in addressing these challenges by proposing a method tailored for accurate information generation, particularly in the context of covid-19 research literature at present. we recognize the limitations of llms, notably the hallucination problem @xcite , prompting the development of a solution that overcomes these issues. to achieve this, we introduce co-lda, a contextual topic modeling algorithm. co-lda enhances the accuracy of topic representation by considering context, thereby improving the relevance of generated information. by leveraging co-lda in conjunction with our tokenized generative transformer (tgt), based on gpt-3, we alleviate the need for extensive prompt engineering, addressing the challenges posed by contextually shifting topics. the chosen methodology ensures that our model comprehensively captures the nuances of context, leading to more coherent and accurate information generation. through the integration of co-lda and tgt, we aim to provide a robust solution to the challenges associated with hallucination and misinformation in the ground truth of the covid-19-based information generation. ## related works the recent flow of nlp research has produced high-standard works for multitask applications. in this section, we follow three major paradigms that closely line up with our work. ## methodology we first construct a corpus from a large collection of covid-19 research literature and perform incremental learning to modify learning features after each topic modeling cycle. we then propose co-lda, a contextual topic modeling technique, to extract semantically meaningful topics categorized into four groups. these contextual topics are utilized to mask the tokenized generative transformer (tgt), built over gpt-3, to generate factually consistent sentences. to evaluate, we introduce perplexity-similarity scores to measure semantic similarity between the original and generated sentences. multiple benchmarks demonstrate the effectiveness of our approach over comparable sota models. in this section, we explain the end-to-end experiment pipeline for our work. the overview of the schematic architecture is shown in figure 1 . ## results and analysis each topic word acts as a cue for the transformer model to generate 10 sentences with a length of 15 to 25 tokens (words) with a temperature of 0.2. we locally measure the generation accuracy for each generated sentence. the accuracy is calculated using eq. 10. this accuracy is calculated for all the sentences of each topic. finally, the cumulative mean of all these topic-wise sentences is computed. in case any generated sentence does not contain any topic word, that sentence is discarded. after the sentence generation on 4 topics, our model achieves a cumulative mean accuracy of 89.54% in generating sentences, demonstrating the model can generate consistent and fluent sentences from the topic words. in ## conclusion this paper proposes a framework for generating accurate and relevant information from large corpora of text, combining a contextual topic modeling algorithm (co-lda) with a tokenizer-based generative transformer (tgt) network. co-lda captures the contextual relationships between topics in a corpus, while tgt harnesses the power of state-of-the-art language models to generate informative sentences based on extracted topic words. experimental findings overcome the limitations of fixed-length sentence comparisons by considering variable-length sentences in training and test cases. evaluation using several performance indicators and standard validation metrics ensures an informed assessment of the framework's effectiveness and enables meaningful comparisons with existing gold-standard benchmark datasets. our approach can be adapted and utilized in other domains, facilitating the extraction and generation of impactful insights from high-volume text data.