Building Efficient Universal Classifiers with Natural Language Inference
Not on the map. Why?
Abstract (arXiv)
Generative Large Language Models (LLMs) have become the mainstream choice for fewshot and zeroshot learning thanks to the universality of text generation. Many users, however, do not need the broad capabilities of generative LLMs when they only want to automate a classification task. Smaller BERT-like models can also learn universal tasks, which allow them to do any text classification task without requiring fine-tuning (zeroshot classification) or to learn new tasks with only a few examples (fewshot), while being significantly more efficient than generative LLMs. This paper (1) explains how Natural Language Inference (NLI) can be used as a universal classification task that follows similar principles as instruction fine-tuning of generative LLMs, (2) provides a step-by-step guide with reusable Jupyter notebooks for building a universal classifier, and (3) shares the resulting universal classifier that is trained on 33 datasets with 389 diverse classes. Parts of the code we share has been used to train our older zeroshot classifiers that have been downloaded more than 55 million times via the Hugging Face Hub as of December 2023. Our new classifier improves zeroshot performance by 9.4%.
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 38 of its 73 references that are in the map. First posted on arXiv 29 Dec 2023.
Builds on
38 of 73 references.
References · 38
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2015A large annotated corpus for learning natural language inferencecited by 1,837
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,362
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
- 2021DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharingcited by 1,219
26 more
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2023LIMA: Less Is More for Alignmentcited by 1,080
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2018XNLI: Evaluating Cross-lingual Sentence Representationscited by 913
- 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
- 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 724
- 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 668
- 2023Zephyr: Direct Distillation of LM Alignmentcited by 498
- 2020Efficient Intent Detection with Dual Sentence Encoderscited by 419
- 2020HateXplain: A Benchmark Dataset for Explainable Hate Speech Detectioncited by 403
- 2019Social Bias Frames: Reasoning about Social and Power Implications of Languagecited by 377
- 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
- 2019Benchmarking Zero-shot Text Classification: Datasets, Evaluation and Entailment Approachcited by 299
- 2022WANLI: Worker and AI Collaboration for Natural Language Inference Dataset Creationcited by 200
- 2021How Many Data Points is a Prompt Worth?cited by 197
- 2021Entailment as Few-Shot Learnercited by 122
- 2021DocNLI: A Large-scale Dataset for Document-level Natural Language Inferencecited by 75
- 2023The Data Provenance Initiative: A Large Scale Audit of Dataset Licensing & Attribution in AIcited by 73
- 2021FLEX: Unifying Evaluation for Few-Shot NLPcited by 67
- 2020Universal Natural Language Processing with Limited Annotations: Try Few-shot Textual Entailment as a Startcited by 44
- 2018Identifying Well-formed Natural Language Questionscited by 29
- 2021Does Putting a Linguist in the Loop Improve NLU Data Collection?cited by 29
- 2021NSP-BERT: A Prompt-based Few-Shot Learner Through an Original Pre-training Task--Next Sentence Predictioncited by 23
- 2022Prompt Tuning for Discriminative Pre-trained Language Modelscited by 17
- 2022A Universal Discriminator for Zero-Shot Generalizationcited by 11
- 2023tasksource: A Dataset Harmonization Framework for Streamlined NLP Multi-Task Learning and Evaluationcited by 11
Built on by
Citing papers per year: 2024: 4; 2025: 4; 2026: 11.
19 papers.
Sort:
By area:
- 2024Belief Revision: The Adaptability of Large Language Models Reasoningcited by 26
- 2024DiffGuard: Text-Based Safety Checker for Diffusion Modelscited by 9
- 2025GLiClass: Generalist Lightweight Model for Sequence Classification Taskscited by 9
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
- 2024Political DEBATE: Efficient Zero-shot and Few-shot Classifiers for Political Textcited by 7
- 2024Experimenting with Legal AI Solutions: The Case of Question-Answering for Access to Justicecited by 5
- 2025Representation Consistency for Accurate and Coherent LLM Answer Aggregationcited by 5
- 2026SayNext-Bench: Why Do LLMs Struggle with Next-Utterance Anticipation?cited by 1
- 2026BTZSC: A Benchmark for Zero-Shot Text Classification Across Cross-Encoders, Embedding Models, Rerankers and LLMscited by 1
- 2026Predicting the Benefit of Retrieval Augmentation in Open-Domain Question Answeringcited by 1
- 2026DataEvolver: Self-Evolving Multi-Agent Data Construction for Text-Rich Image Generationcited by 1
- 2025LogiPart: Local Large Language Models for Data Exploration at Scale with Logical Partitioningcited by 0
7 more
- 2026Cross-Stage Coherence in Hierarchical Driving VQA: Explicit Baselines and Learned Gated Context Projectorscited by 0
- 2026The Consistency Illusion: How Multi-Agent Debate Hides Reasoning Misalignmentcited by 0
- 2026Population-Level Profiling of DSM-5 Depressive Symptoms Among Self-Reported ADHD and ASD Users on Twitter: An Exploratory Study Using Advanced NLP and Statistical Analysiscited by 0
- 2026Can Artificial Intelligence Support Healthcare and Mental Health Through Early Cyberbullying Detection ? The Impact of Emotion-Aware AI on Proactive Online Safetycited by 0
- 2026Typed Decision Models: An Early Evidence Audit and Evaluation Checklistcited by 0
- 2026Chinese-Jev: Bringing System One Model to Chinese-Language Taskscited by 0
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classificationcited by 0
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classification1 Oct 2026
- 2026Chinese-Jev: Bringing System One Model to Chinese-Language Tasks29 Sep 2026
- 2026Typed Decision Models: An Early Evidence Audit and Evaluation Checklist26 Sep 2026
- 2026Can Artificial Intelligence Support Healthcare and Mental Health Through Early Cyberbullying Detection ? The Impact of Emotion-Aware AI on Proactive Online Safety9 Sep 2026
- 2026Population-Level Profiling of DSM-5 Depressive Symptoms Among Self-Reported ADHD and ASD Users on Twitter: An Exploratory Study Using Advanced NLP and Statistical Analysis6 Jul 2026
- 2026DataEvolver: Self-Evolving Multi-Agent Data Construction for Text-Rich Image Generation30 Jun 2026
- 2026The Consistency Illusion: How Multi-Agent Debate Hides Reasoning Misalignment7 Jun 2026
- 2026Cross-Stage Coherence in Hierarchical Driving VQA: Explicit Baselines and Learned Gated Context Projectors24 Apr 2026
- 2026Predicting the Benefit of Retrieval Augmentation in Open-Domain Question Answering9 Apr 2026
- 2026BTZSC: A Benchmark for Zero-Shot Text Classification Across Cross-Encoders, Embedding Models, Rerankers and LLMs12 Mar 2026
- 2026SayNext-Bench: Why Do LLMs Struggle with Next-Utterance Anticipation?30 Jan 2026
- 2025LogiPart: Local Large Language Models for Data Exploration at Scale with Logical Partitioning26 Sep 2025
7 more
- 2025GLiClass: Generalist Lightweight Model for Sequence Classification Tasks11 Aug 2025
- 2025Representation Consistency for Accurate and Coherent LLM Answer Aggregation18 Jun 2025
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generation25 Apr 2025
- 2024DiffGuard: Text-Based Safety Checker for Diffusion Models25 Nov 2024
- 2024Experimenting with Legal AI Solutions: The Case of Question-Answering for Access to Justice12 Sep 2024
- 2024Political DEBATE: Efficient Zero-shot and Few-shot Classifiers for Political Text3 Sep 2024
- 2024Belief Revision: The Adaptability of Large Language Models Reasoning28 Jun 2024
- 2024Belief Revision: The Adaptability of Large Language Models Reasoningcited by 26
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
- 2025Representation Consistency for Accurate and Coherent LLM Answer Aggregationcited by 5
- 2026The Consistency Illusion: How Multi-Agent Debate Hides Reasoning Misalignmentcited by 0
- 2026The Consistency Illusion: How Multi-Agent Debate Hides Reasoning Misalignment7 Jun 2026
- 2025Representation Consistency for Accurate and Coherent LLM Answer Aggregation18 Jun 2025
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generation25 Apr 2025
- 2024Belief Revision: The Adaptability of Large Language Models Reasoning28 Jun 2024
- 2024DiffGuard: Text-Based Safety Checker for Diffusion Models25 Nov 2024
- 2025GLiClass: Generalist Lightweight Model for Sequence Classification Taskscited by 9
- 2024Political DEBATE: Efficient Zero-shot and Few-shot Classifiers for Political Textcited by 7
- 2024Experimenting with Legal AI Solutions: The Case of Question-Answering for Access to Justicecited by 5
- 2026SayNext-Bench: Why Do LLMs Struggle with Next-Utterance Anticipation?cited by 1
- 2026BTZSC: A Benchmark for Zero-Shot Text Classification Across Cross-Encoders, Embedding Models, Rerankers and LLMscited by 1
- 2026DataEvolver: Self-Evolving Multi-Agent Data Construction for Text-Rich Image Generationcited by 1
- 2025LogiPart: Local Large Language Models for Data Exploration at Scale with Logical Partitioningcited by 0
- 2026Population-Level Profiling of DSM-5 Depressive Symptoms Among Self-Reported ADHD and ASD Users on Twitter: An Exploratory Study Using Advanced NLP and Statistical Analysiscited by 0
- 2026Can Artificial Intelligence Support Healthcare and Mental Health Through Early Cyberbullying Detection ? The Impact of Emotion-Aware AI on Proactive Online Safetycited by 0
- 2026Typed Decision Models: An Early Evidence Audit and Evaluation Checklistcited by 0
- 2026Chinese-Jev: Bringing System One Model to Chinese-Language Taskscited by 0
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classificationcited by 0
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classification1 Oct 2026
- 2026Chinese-Jev: Bringing System One Model to Chinese-Language Tasks29 Sep 2026
- 2026Typed Decision Models: An Early Evidence Audit and Evaluation Checklist26 Sep 2026
- 2026Can Artificial Intelligence Support Healthcare and Mental Health Through Early Cyberbullying Detection ? The Impact of Emotion-Aware AI on Proactive Online Safety9 Sep 2026
- 2026Population-Level Profiling of DSM-5 Depressive Symptoms Among Self-Reported ADHD and ASD Users on Twitter: An Exploratory Study Using Advanced NLP and Statistical Analysis6 Jul 2026
- 2026DataEvolver: Self-Evolving Multi-Agent Data Construction for Text-Rich Image Generation30 Jun 2026
- 2026BTZSC: A Benchmark for Zero-Shot Text Classification Across Cross-Encoders, Embedding Models, Rerankers and LLMs12 Mar 2026
- 2026SayNext-Bench: Why Do LLMs Struggle with Next-Utterance Anticipation?30 Jan 2026
- 2025LogiPart: Local Large Language Models for Data Exploration at Scale with Logical Partitioning26 Sep 2025
- 2025GLiClass: Generalist Lightweight Model for Sequence Classification Tasks11 Aug 2025
- 2024Experimenting with Legal AI Solutions: The Case of Question-Answering for Access to Justice12 Sep 2024
- 2024Political DEBATE: Efficient Zero-shot and Few-shot Classifiers for Political Text3 Sep 2024