
Product query classification is the basic component for query understanding, which aims to classify the user queries into multiple categories under a predefined product category taxonomy for the E-commerce search engine.
It is a challenging task due to the tremendous amount of product categories (tens of thousands).
And a slight modification to a query will change its corresponding categories entirely.
For instance, when the ``button'' is appended to the query ``shirt'', the categories of the query will be entirely different.
The problem is more severe for the tail queries which lack enough supervision information from customers.
Motivated by this phenomenon, this paper proposes to model the contrasting/similar relationships between such similar queries.
Our framework is composed of a base model and an across-context attention module.
The across-context attention module plays the role of deriving and extracting external information from these variant queries by predicting their categories.
We conduct both offline and online experiments on the real-world E-commerce search engine.
Experimental results demonstrate the effectiveness of our across-context attention module.