inferwire
/
AI·2 min read

Amazon Method Helps LLMs Tell Look-Alike Labels Apart

Amazon researchers find the label pairs an LLM confuses, add both to its options and generate rules to separate them. Macro F1 rose up to 10 points, and the rules transferred to smaller models.

TL;DR

  • Language models struggle to sort text into taxonomies full of similar labels, such as "Women's Western Wear" versus "Women's Ethnic Wear," whose distinctions are catalog-specific [^1].
  • Amazon researchers' method finds label pairs a model confuses and generates rules to tell them apart, improving Macro F1 by up to 10.0 points [^1].

Background

Classifying text into taxonomies with hundreds of overlapping labels is common in product catalogs, customer-service queues and legal documents, and misclassification hurts search, ticket routing and compliance filtering [^1]. A common approach retrieves the most similar candidate labels by embedding and asks the model to pick one, but that narrows the options without helping the model distinguish between close ones [^1].

What happened

Manish Gupta, Chaitanya Giri and Jayasimha Talur of Amazon describe a framework with three steps [^1]. It identifies which label pairs the model struggles to distinguish, expands the candidate set so that confusable labels are included together, and generates targeted rules for telling similar candidates apart [^1]. It requires no fine-tuning [^1].

On three benchmarks, WOS, Flipkart and LEDGAR, the approach improved Macro F1 by up to 10.0 percentage points over retrieval baselines [^1]. The generated rules also transferred to smaller, cheaper models of 2 to 20 billion parameters, which gained up to 11.5 points [^1].

Why it matters

Most of the errors in this kind of classification are not random; they cluster around a few pairs of labels that only differ by internal convention. Targeting those pairs directly is cheaper than fine-tuning a model, and rules that carry over to smaller models let a team pay for the analysis once and run classification at lower cost [^1].

Practical example

Say an online shop's assistant keeps filing kurtas under "Western Wear." The framework would notice that these two categories are often confused, make sure both appear as options for such items, and add a rule describing how this catalog separates them, so the model picks "Ethnic Wear" for the kurta [^1].

Related gear

We recommend this book because it provides practical techniques for building, fine-tuning, and evaluating text classification and retrieval pipelines.

AdvertisementAmazon

Natural Language Processing with Transformers: Building Language Applications with Hugging Face

Sources

  1. [1]arXiv — From Confusion to Clarity: Confusion-Aware Retrieval and Knowledge Injection for Text Classification