Uncategorized

Open-Source Financial Large Language Models” (IJCAI 2023)



1. Introduction

In the rapidly advancing field of technology, with the integration of GenAI and Machine Learning, ChatGPT has garnered significant attention. The development of LLMs has advanced rapidly, demonstrating the potential to revolutionize natural language processing tasks in various domains, which has sparked considerable interest in the finance industry. FinGPT is a solution to the finance domain with the latest innovations and financial research. FinGPT was one of many industry-specific LLMs; there are other LLMs in the finance sector (e.g., Bloomberg GPT, FinBERT). However, FinGPT promotes data accessibility and lays the foundation for open finance practices that could reshape the industry with ML, AI, and LLM. It was always challenging to extract specialized financial data, not just finance data but also with APIs, photos, and documents, these are the crucial part of model training. FinGPT has the potential to deal with such financial data by getting data, storage, quality, and also with the latest knowledge articles.

2. Open Source Framework for FinLLMs


In Figure 1, the authors’ have contributed a detailed architectural explanation, shedding light on the conceptualization and construction of the framework. FinGPT represents an open-source framework for applying LLMs in the financial domain. It is comprised of four fundamental components: Data sourceData Engineering, LLMs, and Applications layer. The components maintain the functionality and adaptability of FinGPT in addressing the dynamic financial data and market conditions. 

2.1. Data Source Layer:  This is the initial layer of the pipeline, which acquires extensive financial data from online sources. It integrates massive amounts of data from news websites, social media, financial statements, market trends, etc. It captures the market nuances to address the time sensitivity of the financial data.

2.2 Data Engineering Layer: This layer focuses on the real-time processing of NLP data to tackle the challenges of high time sensitivity and low signal-to-noise ratio inherent in financial data. It incorporates state-of-the-art NLP techniques to filter noise and highlight the most salient information.

2.3. LLMs Layer:   It involves various fine-tuning techniques, emphasizing low-cost adaptation to preserve the model’s efficiency. FinGPT can handle the high volatility of financial data, ensuring its responses are consistent with the current economic condition.

2.4. Application Layer:  The Applications Layer is the last component of FinGPT, which shows the usefulness of FinGPT in practice. It provides interactive tutorials and sample applications for financial activities, such as automated financial advice, algorithmic trading, and simplified programming. These examples help potential users learn how to use FinGPT and highlight the innovative power of LLMs in finance.

3. Dataset – Data Engineering process

The authors have stated that a model’s success extends beyond a well-designed architecture; it equally hinges on the quality of the training data. They adopted for a data-centric approach, emphasizing the collection, preparation, and processing of high-quality data.

3.1. Data Sources: The FinGPT pipeline involves collecting extensive financial data from various online sources, including financial news, social media, filings, trends, and Data APIs.

3.2. Real-Time Data Engineering Pipeline for Financial NLP:  Financial markets are very responsive to news and sentiment and function in real-time. Securities prices can vary fast due to new information, and lagging in processing that information can cause missed opportunities or more risk. Hence, real-time processing is vital for financial NLP. The major problem with a real-time NLP pipeline is managing and processing the continuous influx of data effectively. The first step in the pipeline is to design a system to absorb data in real time. This data could be flowing from data source APIs. The data is constructed with data engineering, which involves data cleaning, tokenization, stop word removal and stemming/lemmatization, feature extraction and sentiment analysis, prompt engineering, alerts/decision making, continuous learning, and monitoring.

4. Large Language Models and Fine Tuning Methodology

After the data collection process, it is used in LLMs to generate insightful financial analyses. The paper has detailed process of fine tuning the model with ranking adaptation and Reinforcement Learning (RL).

4.1. LLM APIs:  Basic language skill is provided by APIs from established LLMs.

4.2. Trainable models: Trainable models that users can customize on their private data, fitting them for financial applications, are provided by FinGPT.

4.3. Fine-tuning methods: FinGPT can be fitted for personalized robo-advisor with various fine-tuning methods. Why fine-tune LLMs instead of retraining from scratch?  Existing LLMs and their adaptation for finance provide a quick, economical alternative to pricey and lengthy model retraining from scratch. BloombergGPT has impressive finance-specific abilities, but it also has a high computational demand. It requires about 1.3 million GPU hours for training, which means a huge cost of around $3 million per training using AWS cloud’s $0.023 per GB/month. Unlike the expensive models like BloombergGPT, FinGPT is an affordable solution by using the minimal adaptation of top open-source LLMs. The adaptation cost drops a lot, estimated at under $300 per training. This method makes sure of quick updates and flexibility, which are vital in the changing financial field. FinGPT is open-source, so it supports transparency and user modification, meeting the growing demand of personalized financial advice services. FinGPT’s low-cost, adaptable framework can make financial language modeling more accessible and encourage user-centered financial services.

4.4. Fine-tuning via Low-rank Adaptation (LoRA): FinGPT fine-tuned with pre-trained LLM utilizing a novel financial dataset. It’s well recognized that high-quality labeled data is a key success for LLMs, including ChatGPT. However, acquiring such labeled data often proves costly in terms of time and resources and generally requires the expertise of finance professionals. The authors’ objective was to employ LLMs for analyzing financial-related text data and assisting in quantitative trading, it seems sensible to leverage the market’s inherent labeling capacity. Consequently, they used the relative stock price change percentage for each news item as the output label. The thresholds to divide these labels into three categories—positive, negative, and neutral—based on the sentiment of the news item. In the prompt engineering process, the model selects from the positive, negative, and neutral outputs. This strategy ensures optimal utilization of the pre-trained information. By Low-Rank Adaptation, they reduced the number of trainable parameters from 6.17 billion to a mere 3.67 million.

4.5. Fine-tuning via Reinforcement Learning on Stock Prices (RLSP): Reinforcement Learning on Stock Prices (RLSP) can be used instead of Reinforcement Learning on Human feedback, which ChatGPT employs. The authors’ reason for this substitution is that stock prices give a quantifiable, objective measure that reflects market sentiment in response to news and events. This made it reliable, real-time feedback mechanism for training the model. Reinforcement Learning enables the model to learn by interacting with the environment and receiving feedback. In RLSP, the environment is the stock market, and the feedback is in the form of stock price variations. This technique helps FinGPT to enhance its understanding and interpretation of financial texts, increasing its ability to anticipate market responses to various financial events. RLSP is an effective way to fine-tune FinGPT by linking news sentiment with the later performance of the related stocks. Basically, RLSP lets the model derive the market’s reaction to different news events and modify its understanding and predictions accordingly. Hence, the incorporation of RLSP into the fine-tuning process of FinGPT offered a strong tool for enhancing the model’s financial market comprehension and predicting accuracy.

5. Applications 

This can be applied in different applications which include Robo-advisor, quantitative trading, portfolio optimization, financial sentiment analysis, risk management, financial fraud detection, credit scoring, insolvency prediction, mergers and acquisitions (M&A) forecasting, ESG (Environmental, Social, Governance) scoring, low-code development, financial education.

6. Conclusion

In conclusion, the transformative integration of LLMs into the financial sector brings unique complexities and huge opportunities. Navigating challenges such as high temporal sensitivity, dynamic financial landscape, and a low signal-to-noise ratio in financial data calls for efficient solutions. FinGPT responds innovatively by leveraging pre-existing LLMs and fine-tuning them to specific financial applications. This approach reduces adaptation costs and computational requirements compared to models like BloombergGPT, offering a more accessible, flexible, and cost-effective solution for financial language modeling.



References

In the course of conducting the literature review, encountered “FinGPT: Open-Source Financial Large Language Models” submitted at “The International Joint Conference on Artificial Intelligence” in 2023. It explained the process of fine-tuning and training a LLMs with domain-specific knowledge.

Hongyang (Bruce) Yang , Xiao-Yang Liu, Christina Dan Wang, “FinGPT: Open-Source Financial Large Language Models“.  arXiv:2306.06031, FinLLM @IJCAI 2023.

– Nithiya



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *