IDEAS home Printed from https://ideas.repec.org/p/boe/boeewp/1127.html
   My bibliography  Save this paper

Improving text classification: logistic regression makes small LLMs strong and explainable ‘tens-of-shot’ classifiers

Author

Listed:
  • Buckmann , Marcus

    (Bank of England)

  • Hill, Ed

    (Bank of England)

Abstract

Text classification tasks such as sentiment analysis are common in economics and finance. We demonstrate that smaller, local generative language models can be effectively used for these tasks. Compared to large commercial models, they offer key advantages in privacy, availability, cost, and explainability. We use 17 sentence classification tasks (each with 2 to 4 classes) to show that penalised logistic regression on embeddings from a small language model often matches or exceeds the performance of a large model, even when trained on just dozens of labelled examples per class – the same amount typically needed to validate a large model’s performance. Moreover, this embedding-based approach yields stable and interpretable explanations for classification decisions.

Suggested Citation

  • Buckmann , Marcus & Hill, Ed, 2025. "Improving text classification: logistic regression makes small LLMs strong and explainable ‘tens-of-shot’ classifiers," Bank of England working papers 1127, Bank of England.
  • Handle: RePEc:boe:boeewp:1127
    as

    Download full text from publisher

    File URL: https://www.bankofengland.co.uk/-/media/boe/files/working-paper/2025/improving-text-classification-logistic-regression-llms-tens-of-shot-classifiers.pdf
    File Function: Full text
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    Text classification; large language models; machine learning; embeddings; explainability;
    All these keywords.

    JEL classification:

    • C38 - Mathematical and Quantitative Methods - - Multiple or Simultaneous Equation Models; Multiple Variables - - - Classification Methdos; Cluster Analysis; Principal Components; Factor Analysis
    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C80 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - General

    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:boe:boeewp:1127. 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: Digital Media Team (email available below). General contact details of provider: https://edirc.repec.org/data/boegvuk.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.