Alert button

"Sentiment Analysis": models, code, and papers
Alert button

Assessing Look-Ahead Bias in Stock Return Predictions Generated By GPT Sentiment Analysis

Sep 29, 2023
Paul Glasserman, Caden Lin

Large language models (LLMs), including ChatGPT, can extract profitable trading signals from the sentiment in news text. However, backtesting such strategies poses a challenge because LLMs are trained on many years of data, and backtesting produces biased results if the training and backtesting periods overlap. This bias can take two forms: a look-ahead bias, in which the LLM may have specific knowledge of the stock returns that followed a news article, and a distraction effect, in which general knowledge of the companies named interferes with the measurement of a text's sentiment. We investigate these sources of bias through trading strategies driven by the sentiment of financial news headlines. We compare trading performance based on the original headlines with de-biased strategies in which we remove the relevant company's identifiers from the text. In-sample (within the LLM training window), we find, surprisingly, that the anonymized headlines outperform, indicating that the distraction effect has a greater impact than look-ahead bias. This tendency is particularly strong for larger companies--companies about which we expect an LLM to have greater general knowledge. Out-of-sample, look-ahead bias is not a concern but distraction remains possible. Our proposed anonymization procedure is therefore potentially useful in out-of-sample implementation, as well as for de-biased backtesting.

* 17 pages, 2 figures 
Viaarxiv icon

Covid-19 Public Sentiment Analysis for Indian Tweets Classification

Aug 01, 2023
Mohammad Maksood Akhter, Devpriya Kanojia

Figure 1 for Covid-19 Public Sentiment Analysis for Indian Tweets Classification
Figure 2 for Covid-19 Public Sentiment Analysis for Indian Tweets Classification

When any extraordinary event takes place in the world wide area, it is the social media that acts as the fastest carrier of the news along with the consequences dealt with that event. One can gather much information through social networks regarding the sentiments, behavior, and opinions of the people. In this paper, we focus mainly on sentiment analysis of twitter data of India which comprises of COVID-19 tweets. We show how Twitter data has been extracted and then run sentimental analysis queries on it. This is helpful to analyze the information in the tweets where opinions are highly unstructured, heterogeneous, and are either positive or negative or neutral in some cases.

Viaarxiv icon

FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets

Oct 07, 2023
Neng Wang, Hongyang Yang, Christina Dan Wang

Figure 1 for FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets
Figure 2 for FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets
Figure 3 for FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets
Figure 4 for FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets

In the swiftly expanding domain of Natural Language Processing (NLP), the potential of GPT-based models for the financial sector is increasingly evident. However, the integration of these models with financial datasets presents challenges, notably in determining their adeptness and relevance. This paper introduces a distinctive approach anchored in the Instruction Tuning paradigm for open-source large language models, specifically adapted for financial contexts. Through this methodology, we capitalize on the interoperability of open-source models, ensuring a seamless and transparent integration. We begin by explaining the Instruction Tuning paradigm, highlighting its effectiveness for immediate integration. The paper presents a benchmarking scheme designed for end-to-end training and testing, employing a cost-effective progression. Firstly, we assess basic competencies and fundamental tasks, such as Named Entity Recognition (NER) and sentiment analysis to enhance specialization. Next, we delve into a comprehensive model, executing multi-task operations by amalgamating all instructional tunings to examine versatility. Finally, we explore the zero-shot capabilities by earmarking unseen tasks and incorporating novel datasets to understand adaptability in uncharted terrains. Such a paradigm fortifies the principles of openness and reproducibility, laying a robust foundation for future investigations in open-source financial large language models (FinLLMs).

Viaarxiv icon

SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning

Jul 23, 2023
Kiana Kheiri, Hamid Karimi

Figure 1 for SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning
Figure 2 for SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning
Figure 3 for SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning
Figure 4 for SentimentGPT: Exploiting GPT for Advanced Sentiment Analysis and its Departure from Current Machine Learning

This study presents a thorough examination of various Generative Pretrained Transformer (GPT) methodologies in sentiment analysis, specifically in the context of Task 4 on the SemEval 2017 dataset. Three primary strategies are employed: 1) prompt engineering using the advanced GPT-3.5 Turbo, 2) fine-tuning GPT models, and 3) an inventive approach to embedding classification. The research yields detailed comparative insights among these strategies and individual GPT models, revealing their unique strengths and potential limitations. Additionally, the study compares these GPT-based methodologies with other current, high-performing models previously used with the same dataset. The results illustrate the significant superiority of the GPT approaches in terms of predictive performance, more than 22\% in F1-score compared to the state-of-the-art. Further, the paper sheds light on common challenges in sentiment analysis tasks, such as understanding context and detecting sarcasm. It underscores the enhanced capabilities of the GPT models to effectively handle these complexities. Taken together, these findings highlight the promising potential of GPT models in sentiment analysis, setting the stage for future research in this field. The code can be found at https://github.com/DSAatUSU/SentimentGPT

Viaarxiv icon

Applying QNLP to sentiment analysis in finance

Jul 20, 2023
Jonas Stein, Ivo Christ, Nicolas Kraus, Maximilian Balthasar Mansky, Robert Müller, Claudia Linnhof-Popien

Figure 1 for Applying QNLP to sentiment analysis in finance
Figure 2 for Applying QNLP to sentiment analysis in finance
Figure 3 for Applying QNLP to sentiment analysis in finance
Figure 4 for Applying QNLP to sentiment analysis in finance

As an application domain where the slightest qualitative improvements can yield immense value, finance is a promising candidate for early quantum advantage. Focusing on the rapidly advancing field of Quantum Natural Language Processing (QNLP), we explore the practical applicability of the two central approaches DisCoCat and Quantum-Enhanced Long Short-Term Memory (QLSTM) to the problem of sentiment analysis in finance. Utilizing a novel ChatGPT-based data generation approach, we conduct a case study with more than 1000 realistic sentences and find that QLSTMs can be trained substantially faster than DisCoCat while also achieving close to classical results for their available software implementations.

Viaarxiv icon

Large-Scale Korean Text Dataset for Classifying Biased Speech in Real-World Online Services

Oct 06, 2023
Dasol Choi, Jooyoung Song, Eunsun Lee, Jinwoo Seo, Heejune Park, Dongbin Na

Figure 1 for Large-Scale Korean Text Dataset for Classifying Biased Speech in Real-World Online Services
Figure 2 for Large-Scale Korean Text Dataset for Classifying Biased Speech in Real-World Online Services
Figure 3 for Large-Scale Korean Text Dataset for Classifying Biased Speech in Real-World Online Services
Figure 4 for Large-Scale Korean Text Dataset for Classifying Biased Speech in Real-World Online Services

With the growth of online services, the need for advanced text classification algorithms, such as sentiment analysis and biased text detection, has become increasingly evident. The anonymous nature of online services often leads to the presence of biased and harmful language, posing challenges to maintaining the health of online communities. This phenomenon is especially relevant in South Korea, where large-scale hate speech detection algorithms have not yet been broadly explored. In this paper, we introduce a new comprehensive, large-scale dataset collected from a well-known South Korean SNS platform. Our proposed dataset provides annotations including (1) Preferences, (2) Profanities, and (3) Nine types of Bias for the text samples, enabling multi-task learning for simultaneous classification of user-generated texts. Leveraging state-of-the-art BERT-based language models, our approach surpasses human-level accuracy across diverse classification tasks, as measured by various metrics. Beyond academic contributions, our work can provide practical solutions for real-world hate speech and bias mitigation, contributing directly to the improvement of online community health. Our work provides a robust foundation for future research aiming to improve the quality of online discourse and foster societal well-being. All source codes and datasets are publicly accessible at https://github.com/Dasol-Choi/KoMultiText.

* 13 pages 
Viaarxiv icon

Robust Multimodal Learning with Missing Modalities via Parameter-Efficient Adaptation

Oct 06, 2023
Md Kaykobad Reza, Ashley Prater-Bennette, M. Salman Asif

Figure 1 for Robust Multimodal Learning with Missing Modalities via Parameter-Efficient Adaptation
Figure 2 for Robust Multimodal Learning with Missing Modalities via Parameter-Efficient Adaptation
Figure 3 for Robust Multimodal Learning with Missing Modalities via Parameter-Efficient Adaptation
Figure 4 for Robust Multimodal Learning with Missing Modalities via Parameter-Efficient Adaptation

Multimodal learning seeks to utilize data from multiple sources to improve the overall performance of downstream tasks. It is desirable for redundancies in the data to make multimodal systems robust to missing or corrupted observations in some correlated modalities. However, we observe that the performance of several existing multimodal networks significantly deteriorates if one or multiple modalities are absent at test time. To enable robustness to missing modalities, we propose simple and parameter-efficient adaptation procedures for pretrained multimodal networks. In particular, we exploit low-rank adaptation and modulation of intermediate features to compensate for the missing modalities. We demonstrate that such adaptation can partially bridge performance drop due to missing modalities and outperform independent, dedicated networks trained for the available modality combinations in some cases. The proposed adaptation requires extremely small number of parameters (e.g., fewer than 0.7% of the total parameters in most experiments). We conduct a series of experiments to highlight the robustness of our proposed method using diverse datasets for RGB-thermal and RGB-Depth semantic segmentation, multimodal material segmentation, and multimodal sentiment analysis tasks. Our proposed method demonstrates versatility across various tasks and datasets, and outperforms existing methods for robust multimodal learning with missing modalities.

* 18 pages, 3 figures, 11 tables 
Viaarxiv icon

ConKI: Contrastive Knowledge Injection for Multimodal Sentiment Analysis

Jun 27, 2023
Yakun Yu, Mingjun Zhao, Shi-ang Qi, Feiran Sun, Baoxun Wang, Weidong Guo, Xiaoli Wang, Lei Yang, Di Niu

Figure 1 for ConKI: Contrastive Knowledge Injection for Multimodal Sentiment Analysis
Figure 2 for ConKI: Contrastive Knowledge Injection for Multimodal Sentiment Analysis
Figure 3 for ConKI: Contrastive Knowledge Injection for Multimodal Sentiment Analysis
Figure 4 for ConKI: Contrastive Knowledge Injection for Multimodal Sentiment Analysis

Multimodal Sentiment Analysis leverages multimodal signals to detect the sentiment of a speaker. Previous approaches concentrate on performing multimodal fusion and representation learning based on general knowledge obtained from pretrained models, which neglects the effect of domain-specific knowledge. In this paper, we propose Contrastive Knowledge Injection (ConKI) for multimodal sentiment analysis, where specific-knowledge representations for each modality can be learned together with general knowledge representations via knowledge injection based on an adapter architecture. In addition, ConKI uses a hierarchical contrastive learning procedure performed between knowledge types within every single modality, across modalities within each sample, and across samples to facilitate the effective learning of the proposed representations, hence improving multimodal sentiment predictions. The experiments on three popular multimodal sentiment analysis benchmarks show that ConKI outperforms all prior methods on a variety of performance metrics.

* Accepted by ACL Findings 2023 
Viaarxiv icon

Chinese Fine-Grained Financial Sentiment Analysis with Large Language Models

Jun 25, 2023
Yinyu Lan, Yanru Wu, Wang Xu, Weiqiang Feng, Youhao Zhang

Figure 1 for Chinese Fine-Grained Financial Sentiment Analysis with Large Language Models
Figure 2 for Chinese Fine-Grained Financial Sentiment Analysis with Large Language Models
Figure 3 for Chinese Fine-Grained Financial Sentiment Analysis with Large Language Models
Figure 4 for Chinese Fine-Grained Financial Sentiment Analysis with Large Language Models

Entity-level fine-grained sentiment analysis in the financial domain is a crucial subtask of sentiment analysis and currently faces numerous challenges. The primary challenge stems from the lack of high-quality and large-scale annotated corpora specifically designed for financial text sentiment analysis, which in turn limits the availability of data necessary for developing effective text processing techniques. Recent advancements in large language models (LLMs) have yielded remarkable performance in natural language processing tasks, primarily centered around language pattern matching. In this paper, we propose a novel and extensive Chinese fine-grained financial sentiment analysis dataset, FinChina SA, for enterprise early warning. We thoroughly evaluate and experiment with well-known existing open-source LLMs using our dataset. We firmly believe that our dataset will serve as a valuable resource to advance the exploration of real-world financial sentiment analysis tasks, which should be the focus of future research. Our dataset and all code to replicate the experimental results will be released.

Viaarxiv icon

Introducing DictaLM -- A Large Generative Language Model for Modern Hebrew

Sep 25, 2023
Shaltiel Shmidman, Avi Shmidman, Amir David Nissan Cohen, Moshe Koppel

Figure 1 for Introducing DictaLM -- A Large Generative Language Model for Modern Hebrew
Figure 2 for Introducing DictaLM -- A Large Generative Language Model for Modern Hebrew

We present DictaLM, a large-scale language model tailored for Modern Hebrew. Boasting 7B parameters, this model is predominantly trained on Hebrew-centric data. As a commitment to promoting research and development in the Hebrew language, we release both the foundation model and the instruct-tuned model under a Creative Commons license. Concurrently, we introduce DictaLM-Rab, another foundation model geared towards Rabbinic/Historical Hebrew. These foundation models serve as ideal starting points for fine-tuning various Hebrew-specific tasks, such as instruction, Q&A, sentiment analysis, and more. This release represents a preliminary step, offering an initial Hebrew LLM model for the Hebrew NLP community to experiment with.

Viaarxiv icon