Skip to main content
QUICK REVIEW

[论文解读] A Comparative Analysis of Fine-Tuned LLMs and Few-Shot Learning of LLMs for Financial Sentiment Analysis

Sorouralsadat Fatemi, Yuheng Hu|arXiv (Cornell University)|Dec 14, 2023
Stock Market Forecasting Methods被引用 8
一句话总结

该论文比较微调后的小型语言模型(250M–3B 参数)与大语言模型在金融情感分析中的零-shot/少-shot in-context 学习,发现微调模型在较低计算需求下可达到与最先进模型相当的性能,而零-shot/一-shot 在不同数据集和模型上结果各异。

ABSTRACT

Financial sentiment analysis plays a crucial role in uncovering latent patterns and detecting emerging trends, enabling individuals to make well-informed decisions that may yield substantial advantages within the constantly changing realm of finance. Recently, Large Language Models (LLMs) have demonstrated their effectiveness in diverse domains, showcasing remarkable capabilities even in zero-shot and few-shot in-context learning for various Natural Language Processing (NLP) tasks. Nevertheless, their potential and applicability in the context of financial sentiment analysis have not been thoroughly explored yet. To bridge this gap, we employ two approaches: in-context learning (with a focus on gpt-3.5-turbo model) and fine-tuning LLMs on a finance-domain dataset. Given the computational costs associated with fine-tuning LLMs with large parameter sizes, our focus lies on smaller LLMs, spanning from 250M to 3B parameters for fine-tuning. We then compare the performances with state-of-the-art results to evaluate their effectiveness in the finance-domain. Our results demonstrate that fine-tuned smaller LLMs can achieve comparable performance to state-of-the-art fine-tuned LLMs, even with models having fewer parameters and a smaller training dataset. Additionally, the zero-shot and one-shot performance of LLMs produces comparable results with fine-tuned smaller LLMs and state-of-the-art outcomes. Furthermore, our analysis demonstrates that there is no observed enhancement in performance for finance-domain sentiment analysis when the number of shots for in-context learning is increased.

研究动机与目标

  • 使用 LLMs 进行金融情感分析时,研究零-shot 和少-shot 学习的有效性。
  • 评估在金融领域数据上对较小 LLMs(Flan-T5 系列)的微调效果。
  • 与最先进模型(FinBERT、Instruct-FinGPT)进行对比,以评估准确性与计算成本的权衡。

提出的方法

  • 研究 Flan-T5 Base/Large/XL 与 gpt-3.5-turbo(ChatGPT)的零-shot 与少-shot 设置。
  • 对金融数据(Twitter Financial News Sentiment)进行 4-bit 量化的 QLoRA 微调 Flan-T5 模型,训练 3 个 epoch。
  • 将零-shot/少-shot 结果与 FPB 和 TFSN 数据集上的 FinBert 与 Instruct-FinGPT 进行对比。
  • 使用有无标签描述的提示来评估提示设计的影响。
  • 报告情感标签(Positive, Negative, Neutral)的准确性与 F1-macro。
  • 在单个 A100 GPU 上评估训练效率与内存使用情况。

实验结果

研究问题

  • RQ1零-shot 与一-/少-shot LLM in-context 学习的性能与微调小型 LLMs 的性能相比如何?
  • RQ2在减少计算资源的前提下,微调小型 LLMs(250M–3B 参数)能否达到与最先进模型相当的结果?
  • RQ3模型规模与提示设计如何影响金融专用情感任务的零-shot/少-shot 性能?
  • RQ4FPB 与 TFSN 数据集在零-shot/少-shot 与微调性能之间是否呈现一致的趋势?

主要发现

  • 微调的 Flan-T5 模型在使用远低于最先进微调 LLM 的计算资源下,达到与最先进微调 LLM 相当的性能。
  • ChatGPT 的零-shot 在 TFSN 上达到约 82% 的表现,但仍低于就地微调的模型,而 FPB 的零-shot 性能接近微调的 Flan-T5 模型。
  • FPB 的零-shot 结果随模型增大而改进,而 FPB 对提示结构的敏感性低于 TFSN。
  • 单-shot 提示通常提升大多数模型的性能,但五-shot和十-shot 在不同数据集和模型上表现出不一致的增益。
  • 在金融数据上使用 QLoRA 对 Flan-T5 的微调比在更大规模多 GPU 设置下的训练具备更快的收敛和更低的内存占用(可在单个 A100 上完成训练)。
  • FPB 数据集对某些小模型更偏好零-/一-shot 性能,而 TFSN 更偏好微调方法,突显了情感任务中数据集特定的动态。

更好的研究,从现在开始

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

无需绑定信用卡

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