Skip to main content
QUICK REVIEW

[论文解读] Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models

Boyu Zhang, Hongyang Yang|arXiv (Cornell University)|Oct 6, 2023
Stock Market Forecasting Methods被引用 8
一句话总结

论文提出一个用于金融情感分析的检索增强、指令微调的大语言模型框架,该框架利用外部知识检索来提升准确性和F1分数,优于基线模型和通用大模型。

ABSTRACT

Financial sentiment analysis is critical for valuation and investment decision-making. Traditional NLP models, however, are limited by their parameter size and the scope of their training datasets, which hampers their generalization capabilities and effectiveness in this field. Recently, Large Language Models (LLMs) pre-trained on extensive corpora have demonstrated superior performance across various NLP tasks due to their commendable zero-shot abilities. Yet, directly applying LLMs to financial sentiment analysis presents challenges: The discrepancy between the pre-training objective of LLMs and predicting the sentiment label can compromise their predictive performance. Furthermore, the succinct nature of financial news, often devoid of sufficient context, can significantly diminish the reliability of LLMs' sentiment analysis. To address these challenges, we introduce a retrieval-augmented LLMs framework for financial sentiment analysis. This framework includes an instruction-tuned LLMs module, which ensures LLMs behave as predictors of sentiment labels, and a retrieval-augmentation module which retrieves additional context from reliable external sources. Benchmarked against traditional models and LLMs like ChatGPT and LLaMA, our approach achieves 15\% to 48\% performance gain in accuracy and F1 score.

研究动机与目标

  • 解决传统NLP和通用大模型在金融情感分析中的局限性,原因在于上下文有限且训练目标不匹配。
  • 提出一种检索增强的LLM框架,结合指令微调与外部知识检索。
  • 在既定金融情感基准测试中证明性能提升。
  • 展示RAG对简短金融文本(如新闻与推文)的预测改进。

提出的方法

  • 通过对现有数据集进行多条人工撰写指令格式化,构造用于金融情感分析的指令遵循数据集。
  • 使用因果语言模型目标微调开源LLM(如Llama-7B),以预测情感标签。
  • 将生成输出映射到预定义的情感类别(负面/中性/正面)。
  • 实现一个检索增强生成模块,通过多来源查询和基于相似性的筛选从外部资源(彭博社、路透社、高盛、Seeking Alpha、Twitter、Reddit)检索上下文。
  • 使用两步检索:1)多源知识查询,2)使用重叠系数(Szymkiewicz-Simpson)的相似性检索,阈值>0.8以筛选相关上下文。
  • 在FPB、Twitter Val及其他数据集上以准确率和F1-score进行评估;并与FinBERT、BloombergGPT、Llama-7B、ChatGLM2-6B、ChatGPT-4等比较。

实验结果

研究问题

  • RQ1指令微调是否比标准预训练目标更有效地将LLM行为对齐到预测金融情感标签?
  • RQ2通过为简短输入(如新闻头条和推文)提供外部金融上下文,检索增强生成是否带来显著提升?
  • RQ3所提框架相对于最先进的金融情感模型和通用大模型的表现如何?
  • RQ4加入RAG对基准数据集(FPB、Twitter Val)以及案例研究中的情感预测有何影响?

主要发现

  • 指令微调的Llama-7B在FPB和Twitter Val上表现出色,优于基线。
  • 有了RAG,该模型在若干设置中进一步提升准确率和F1,超过ChatGPT-4。
  • 在FPB和Twitter Val上,所提方法在最佳设置下达到0.758 Acc / 0.739 F1(无RAG)和0.863 Acc / 0.811 F1(有RAG)。
  • ChatGPT-4.0在无RAG时在Twitter Val上为0.788 Acc / 0.652 F1,在FPB上为0.643/0.511(见表I);有RAG时,ChatGPT-4.0在Twitter Val上达到0.813 Acc / 0.708 F1(表II)。
  • 我们的方法在RAG时在Twitter Val上达到0.881 Acc / 0.842 F1(表II)。
  • 一项案例研究显示,RAG通过提供检索到的上下文,可以将含糊陈述转化为更准确的正向情感(表III)。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。