Method and system for matching query to ads using query subword vectors
The present teaching relates to identifying content that matches a query. Train data include queries, advertisement, and hyperlinks associated with query sessions. A plurality of subwords for each of the queries in the training data are identified. A query/ads model is then trained by optimizing vectors associated the plurality of subwords for each of the queries, advertisements, and hyperlinks in the training data with respect to an objective function. At least one vector associated with each of the queries is derived based on the plurality of subword vectors in the query/ads model that represent the plurality of subwords of the query.
1 . A method, implemented on a machine having at least one processor, storage, and a communication platform for training a query/ads model used for identifying content matching a query, comprising:
generating, by a model training engine, training data including positive and negative training samples derived based on previous query sessions, wherein each training sample in the training data comprises a query, one or more advertisements previously displayed with search results related to the query, and hyperlinks linking to the search results and one or more advertisements, wherein the positive training samples include at least one pair of words representing user events that appear within a predetermined number of temporally ordered user events in the query sessions and the negative training samples include pairs of words that are randomly selected from the query sessions;
reducing a number of parameters of the query/ads model by removing v vectors for the query, the one or more advertisements, and the hyperlinks to improve efficiency in training the query/ads model;
generating, for each of the query, the one or more advertisements, and the hyperlinks in the training data, a vector by:
identifying, by the model training engine, a plurality of subwords in the query, advertisement, or hyperlink, and
reducing a dimension for the vector by combining, via one of a convolutional neural network (CNN) and a recurrent neural network (RNN), a plurality of subword u vectors for the plurality of subwords to generate the vector for the query, the advertisement, or the hyperlink; and
training, by the model training engine via machine learning, the query/ads model, by optimizing the parameters of the query/ads model through maximizing a modeled probability with respect to the positive training samples and minimizing the modeled probability with respect to the negative training samples.
2 . The method of claim 1 , wherein the combining is further via one of:
one that performs component-wise averaging; or
one that performs component-wise average with average of pair wise component-wise product.
3 . The method of claim 1 , further comprising:
receiving the future query and a plurality of candidate advertisements identified based on the query;
identifying a set of subwords from the future query;
retrieving, from the query/ads model, vectors for the set of subwords and vectors for the plurality of candidate advertisements; and
selecting, from the plurality of candidate advertisements, at least one selected advertisement for the query based on the vectors for the set of subwords and the vectors for the plurality of candidate advertisements.
4 . The method of claim 3 , wherein the step of selecting is performed further based on a vector of the future query obtained based on the vectors for the set of subwords of the future query.
5 . A non-transitory, machine readable-medium having information recorded thereon for training a query/ads model used for identifying content matching a query, wherein the information, when read by the machine, causes the machine to perform the following:
generating training data including positive and negative training samples derived based on previous query sessions, wherein each training sample in the training data comprises: a query, one or more advertisements previously displayed with search results related to the query, and hyperlinks linking to the search results and one or more advertisements, wherein the positive training samples include at least one pair of words representing user events that appear within a predetermined number of temporally ordered user events in the query sessions and the negative training samples include pairs of words that are randomly selected from the query sessions;
reducing a number of parameters of the query/ads model by removing v vectors for the query, the one or more advertisements, and the hyperlinks to improve efficiency in training the query/ads model;
generating, for each of the query, the one or more advertisements, and the hyperlinks in the training data, a vector by:
identifying a plurality of subwords in the query, advertisement, or hyperlink, and
reducing a dimension for the vector by combining, via one of a convolutional neural network (CNN) and a recurrent neural network (RNN), a plurality of subword u vectors for the plurality of subwords to generate the vector for the query, the advertisement, or the hyperlink; and
training, via machine learning, the query/ads model, by optimizing the parameters of the query/ads model through maximizing a modeled probability with respect to the positive training samples and minimizing the modeled probability with respect to the negative training samples.
6 . The non-transitory, machine readable-medium of claim 5 , wherein the combining is further via one of:
one that performs component-wise averaging; or
one that performs component-wise average with average of pair wise component-wise product.
7 . The non-transitory, machine readable-medium of claim 6 , wherein the information, when read by the machine, further causes the machine to perform:
receiving the future query and a plurality of candidate advertisements identified based on the query;
identifying a set of subwords from the future query;
retrieving, from the query/ads model, vectors for the set of subwords and vectors for the plurality of candidate advertisements; and
selecting, from the plurality of candidate advertisements, at least one selected advertisement for the query based on the vectors for the set of subwords and the vectors for the plurality of candidate advertisements.
8 . The non-transitory, machine readable-medium of claim 7 , wherein the step of selecting is performed further based on a vector of the future query obtained based on the vectors for the set of subwords of the future query.
9 . A system having a processor, storage, and a communication platform capable of connecting to a network for training a query/ads model used for identifying content matching a query, comprising:
a subword vector identifier implemented by the processor and configured for
generating training data including positive and negative training samples derived based on previous query sessions, wherein each training sample in the training data comprises a query, one or more advertisements previously displayed with search results related to the query, and hyperlinks linking to the search results and one or more advertisements, wherein the positive training samples include at least one pair of words representing user events that appear within a predetermined number of temporally ordered user events in the query sessions and the negative training samples include pairs of words that are randomly selected from the query sessions,
reducing a number of parameters of the query/ads model by removing v vectors for the query, the one or more advertisements, and the hyperlinks to improve efficiency in training the query/ads model; and
generating, for each of the query, the one or more advertisements, and the hyperlinks in the training data, a vector by:
identifying a plurality of subwords in the query, advertisement, or hyperlink, and
reducing a dimension for the vector by combining, via one of a convolutional neural network (CNN) and a recurrent neural network (RNN), a plurality of subword u vectors for the plurality of subwords to generate the vector for the query, the advertisement, or the hyperlink; and
a query/ads model optimization engine implemented by the processor and configured for training, via machine learning, the query/ads model, by optimizing the parameters of the query/ads model through maximizing a modeled probability with respect to the positive training samples and minimizing the modeled probability with respect to the negative training samples.
10 . The system of claim 9 , wherein the combining is further via one of:
one that performs component-wise averaging; or
one that performs component-wise average with average of pair wise component-wise product.
11 . The system of claim 9 , further comprising the query/ads model based ad selector implemented by the processor and configured for:
receiving the future query and a plurality of candidate advertisements identified based on the query;
identifying a set of subwords from the future query;
retrieving, from the query/ads model, vectors for the set of subwords and vectors for the plurality of candidate advertisements; and
selecting, from the plurality of candidate advertisements, at least one selected advertisement for the query based on the vectors for the set of subwords and the vectors for the plurality of candidate advertisements, wherein
the step of selecting is performed further based on a vector of the query obtained based on the vectors for the set of subwords of the query.