Researchers at Amazon Search have developed Extended Token Classification (ETC), a novel pre-training method specifically designed for short e-commerce queries. By inserting new tokens into a query rather than masking existing ones, ETC preserves search intent and provides richer contextual signals, outperforming standard models like BERT and ELECTRA across multiple query understanding tasks.
The Challenge of Short-Text Query Understanding
Most modern Natural Language Processing (NLP) models rely on Masked Language Modeling (MLM)—the "fill-in-the-blank" approach used by BERT. While MLM works well for long-form text, it struggles with e-commerce search queries for two main reasons:
- Context Scarcity: Queries are extremely short. Masking 15% of a 3-word query often leaves the model with almost no context to work with.
- Intent Shift: In short text, every word is critical. Masking a single word can completely flip the user's intent. For example, changing "bamboo charcoal bag" to "bamboo [MASK] bag" might lead the model to suggest a bag made of bamboo, losing the "charcoal" (purifier) context entirely.
The authors argue that for short text, "less is not more." Instead of removing information, we should be adding it to help the model learn.
Methodology: Extended Token Classification (ETC)
The authors introduce Extended Token Classification (ETC) using a "Generator-Discriminator" setup, but with a twist on how the input is handled:
- Extended Query Generation: Instead of replacing words with
[MASK], the system randomly inserts[MASK]tokens between the original words. - The Generator: A pre-trained MLM fills these new blanks with plausible words. For example, the query "bamboo charcoal bag" might be extended to "organic bamboo charcoal bag."
- The Discriminator: This is the core of ETC. The model is trained to look at the extended string and perform a binary classification on every token: Was this word in the Original query, or was it Generated (inserted)?
By focusing on whether a word was "added," the model learns deep semantic relationships between words without losing the core tokens that define the user's original shopping intent. This binary choice also makes the training signal much denser and easier for the model to learn compared to standard MLM.
Experimental Results
The study utilized a massive dataset of 1 billion unlabeled e-commerce search queries spanning 14 languages. The model was fine-tuned and tested on five specific Query Understanding (QU) tasks, including Named Entity Recognition (NER) and spelling correction.
Key insights from the results include:
- Superior Performance: The ETC model (79M parameters) consistently outperformed much larger open-domain models like InfoXLM-Large (558M parameters).
- NER Gains: ETC achieved significant boosts in NER, particularly in languages like Japanese (+1.68% F1 gain) and Swedish (+1.57% F1 gain) compared to standard MLM.
- Few-Shot Success: In scenarios with very little labeled data (only 0.1% of the training set), ETC showed the highest performance jump over baseline models.
Conclusion
ETC demonstrates that for short-form text, intent preservation through insertion is more effective than deletion. While highly effective for queries, future work will explore if this "extension" strategy holds value for other short-text domains like social media posts or headlines.
Summary updated