CLAIJan 22, 2024

In-Context Learning for Extreme Multi-Label Classification

arXiv:2401.12178v17 citationsh-index: 20Has Code
Originality Highly original
AI Analysis

This work addresses the problem of efficiently classifying data into many classes for researchers and practitioners in machine learning, offering a novel, easily applicable solution that reduces the need for labeled data and prompt engineering.

The authors tackled extreme multi-label classification with thousands of classes by proposing an in-context learning program that combines language models and retrievers, achieving state-of-the-art results on three benchmarks and competitive performance on another without fine-tuning.

Multi-label classification problems with thousands of classes are hard to solve with in-context learning alone, as language models (LMs) might lack prior knowledge about the precise classes or how to assign them, and it is generally infeasible to demonstrate every class in a prompt. We propose a general program, $\texttt{Infer--Retrieve--Rank}$, that defines multi-step interactions between LMs and retrievers to efficiently tackle such problems. We implement this program using the $\texttt{DSPy}$ programming model, which specifies in-context systems in a declarative manner, and use $\texttt{DSPy}$ optimizers to tune it towards specific datasets by bootstrapping only tens of few-shot examples. Our primary extreme classification program, optimized separately for each task, attains state-of-the-art results across three benchmarks (HOUSE, TECH, TECHWOLF). We apply the same program to a benchmark with vastly different characteristics and attain competitive performance as well (BioDEX). Unlike prior work, our proposed solution requires no finetuning, is easily applicable to new tasks, alleviates prompt engineering, and requires only tens of labeled examples. Our code is public at https://github.com/KarelDO/xmc.dspy.

Code Implementations2 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes