IDEAS home Printed from https://ideas.repec.org/p/chf/rpseri/rp2459.html
   My bibliography  Save this paper

Battle of Transformers: Adversarial Attacks on Financial Sentiment Models

Author

Listed:
  • Aysun Can Turetken

    (University of Zurich)

  • Markus Leippold

    (University of Zurich; Swiss Finance Institute)

Abstract

Financial sentiment analysis models, which extract meaning from vast amounts of unstructured data, play a crucial role in sentiment-driven financial decisions. However, the complex and domain-specific language used in finance poses unique challenges for adversarial attacks. To address these challenges, we propose a novel, white-box attack methodology leveraging a pre-trained general-purpose language model (GPT-4o). We employ carefully designed instructions and incorporate a new loss function based on embedding similarity to ensure semantic coherence while producing syntactically diverse samples. Our experimental results demonstrate that both FinBERT and Fin-GPT, leading models in financial sentiment analysis, exhibit significant susceptibility to our proposed adversarial attacks. Specifically, the sentiment predictions of these models were successfully altered for a substantial proportion of the samples across three public datasets, including Financial Phrase Bank (FPB), Twitter Financial News Sentiment (TFNS), and Sentimence and Entity Annotated Financial News (SEntFiN). Our findings emphasize the need for enhanced robustness in financial classification models against adversarially targeted attacks. By understanding and addressing these vulnerabilities, it is possible to improve the reliability and security of automated financial systems.

Suggested Citation

  • Aysun Can Turetken & Markus Leippold, 2024. "Battle of Transformers: Adversarial Attacks on Financial Sentiment Models," Swiss Finance Institute Research Paper Series 24-59, Swiss Finance Institute.
  • Handle: RePEc:chf:rpseri:rp2459
    as

    Download full text from publisher

    File URL: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4977483
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    Adversarial Attacks; Large Language Models; Financial Sentiment Analysis;
    All these keywords.

    JEL classification:

    • G14 - Financial Economics - - General Financial Markets - - - Information and Market Efficiency; Event Studies; Insider Trading
    • G17 - Financial Economics - - General Financial Markets - - - Financial Forecasting and Simulation
    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:chf:rpseri:rp2459. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Ridima Mittal (email available below). General contact details of provider: https://edirc.repec.org/data/fameech.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.