IP Library Granted Patent US 12,353,454
Granted Patent B2
US 12,353,454 · App. 18/031,789 · Granted Jul 8, 2025

Look ahead strategy for trie-based beam search in generative retrieval

Inventors: Jian Jiao (Bellevue, WA); Yeyun Gong (Beijing, CN); Nan Duan (Beijing, CN); Ruofei Zhang (Sunnyvale, CA); Ming Zhou (Beijing, CN)
Assignee: Microsoft Technology Licensing, LLC
G06F16/3338G06Q30/0254G06Q30/0256
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,353,454
App. No.
18/031,789
Granted
Jul 8, 2025
Kind
B2
Abstract

Systems and methods are provided for generating a keyword sequence from an input query. A first text sequence corresponding to an input query may be received and encoded into a source sequence representation using an encoder of a machine learning model. A keyword sentence may then be generated from the source sequence representation using a decoder of the machine learning model. The decoder may generate a modified generation score for a plurality of prediction tokens, wherein the modified generation score is based on the respective prediction token generation score and a maximum generation score for a suffix of each prediction token. The decoder may then select the prediction token of the plurality of prediction tokens based on the modified generation score, and add the selected prediction token to the previously decoded partial hypothesis provided by the decoder.

Claims (48)

1. A method for generating a keyword sequence from an input query, the method comprising:

receiving a first text sequence corresponding to an input query;

encoding the first text sequence into a source sequence representation using an encoder of a machine learning model executed by a server computer system including an encoder and a decoder, the source sequence representation including a first set of tokens corresponding to the input query;

generating a keyword sequence from the source sequence representation using a decoder of the machine learning model, the keyword sequence including a second set of tokens relevant to the input query and not including the first set of tokens corresponding to the input query;

generating, by the decoder, a generation score for a first prediction token of a plurality of prediction tokens, wherein the plurality of prediction tokens are based on the source sequence representation and a previously decoded partial hypothesis provided by the decoder, where the previously decoded partial hypothesis includes a first subset of tokens of the second set of tokens stored in a trie;

generating, by the decoder, a modified generation score for the first prediction token, wherein the modified generation score for the first prediction token is based on the generation score and a maximum generation score for a suffix of the first prediction token, where the suffix includes a second subset of tokens of the second set of tokens stored within a path of the trie corresponding to the first prediction token;

selecting a second prediction token of the second subset of tokens based on the modified generation score;

adding the second prediction token to the previously decoded partial hypothesis generated by the decoder; and

selecting content to be provided to a computing device in response to the input query based on the second subset of tokens of the second set of tokens, wherein at least one token of the second subset of tokens of the second set of tokens matches at least one keyword associated with the content to be provided to the computing device.

2. The method of claim 1 , wherein the content to be provided to the computing device is an advertisement.

3. The method of claim 1 , wherein the generation score based on a second generation score for a token that is a suffix of the suffix of one or more prediction tokens.

4. The method of claim 1 , wherein the machine learning model is a sequence-to-sequence machine learning model trained on data corresponding to keyword sequence and output sequence pairs.

5. The method of claim 1 , further comprising:

receiving a keyword to be added to the trie; and

adding the keyword to the trie, wherein the keyword is a suffix to an existing keyword in the trie.

6. The method of claim 1 , wherein the plurality of prediction tokens and the suffix of each prediction token are constrained to the trie.

7. The method of claim 1 , further comprising selecting content to be provided to the computing device in response to the input query based on the previously decoded partial hypothesis and the second prediction token, wherein the previously decoded partial hypothesis and the second prediction token matches at least one keyword segment associated with the content to be provided to the computing device.

8. The method of claim 1 , further comprising generating a plurality of hypotheses based on the second prediction token.

9. The method of claim 1 , further comprising identifying the trie associated with the first text sequence.

10. The method of claim 9 , further comprising identifying suffixes for tokens stored in the trie associated with the first text sequence.

11. The method of claim 1 , further comprising generating a set of modified generation scores for a set of suffixes of the plurality of prediction tokens.

12. A computer-readable storage medium including instructions, which when executed by a processor, cause the processor to perform the method of claim 1 .

13. A system comprising a processor and memory including instructions which when executed by the processor cause the processor to perform the method of claim 1 .

14. A method for generating a keyword sequence from an input query, the method comprising:

encoding a text sequence into a source sequence representation using an encoder of a machine learning model executed by a server computer system, the machine learning model including an encoder and a decoder, the source sequence representation including a first set of tokens corresponding to an input query;

generating a keyword sequence from the source sequence representation using the decoder of the machine learning model, the keyword sequence including a second set of tokens relevant to the input query and not including the first set of tokens corresponding to the input query;

generating, by the decoder, a generation score for a first prediction token of a plurality of prediction tokens, wherein the plurality of prediction tokens are based on the source sequence representation and a previously decoded partial hypothesis provided by the decoder, where the previously decoded partial hypothesis includes a first subset of tokens of the second set of tokens stored in a trie;

generating, by the decoder, a modified generation score for the first prediction token;

selecting a second prediction token of second set of tokens based on the modified generation score;

adding the second prediction token to the previously decoded partial hypothesis provided by the decoder; and

selecting content to be provided to a computing device based on the second prediction token, wherein the second prediction token matches at least one keyword associated with the content to be provided to the computing device.

15. The method of claim 14 , wherein the modified generation score is based on the generation score and a maximum generation score for a suffix of the first prediction token.

16. The method of claim 15 , wherein the plurality of prediction tokens and the suffix are accessed from a Trie, and wherein the method further comprises:

receiving a keyword to be added to the Trie; and

adding the keyword to the Trie, wherein the keyword is a suffix to an existing keyword in the Trie.

17. A method for generating a keyword sequence from an input query, the method comprising:

receiving a text sequence corresponding to an input query;

encoding the text sequence into a source sequence representation using an encoder of a machine learning model including an encoder and a decoder executed by a computer system, the source sequence representation including a first set of tokens corresponding to the input query;

generating, by the decoder, a generation score for a first prediction token of a plurality of prediction tokens, wherein the plurality of prediction tokens are based on the source sequence representation and a previously decoded partial hypothesis provided by the decoder of the machine learning model, where the previously decoded partial hypothesis includes a first subset of tokens of a second set of tokens stored in a trie;

generating, by the decoder, a modified generation score for the first prediction token of the plurality of prediction tokens, wherein the modified generation score for the first prediction token of the plurality of prediction tokens is based on the respective prediction token generation score for the first prediction token and a maximum generation score for a suffix of the first prediction token of the plurality of prediction tokens, where the suffix includes a second subset of tokens of the second set of tokens stored within a path of the trie corresponding to the first prediction token;

selecting a second prediction token of the second subset of tokens based on the modified generation score;

adding the second prediction token to the previously decoded partial hypothesis provided by the decoder; and

selecting content to be provided to a computing device in response to the input query based on the second prediction token.

18. The method of claim 17 , wherein the modified generation score based on the generation score and a maximum generation score for a suffix of the first prediction token.

19. The method of claim 17 , wherein the suffix is obtained from a trie generated based on the input query.

20. The method of claim 17 , further comprising:

receiving a keyword to be added to the trie; and

adding the keyword to the trie, wherein the keyword is a second suffix to a second keyword stored in the Trie.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2023
From: JIAO, JIAN; GONG, YEYUN; DUAN, NAN; ZHANG, RUOFEI; ZHOU, MING
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 063318/0589 →
Continuity (1)
Related Publication 20230385315A1 · Nov 30, 2023
References Cited (43)
US 7725321B2 · Bennett · 2010 [cited by examiner]
US 10346548B1 · Wuebker · 2019 [cited by examiner]
US 11520971B2 · Chaturvedi · 2022 [cited by examiner]
US 20080215557A1 · Ramer et al. · 2008 [cited by applicant]
US 20090324082A1 · Liu et al. · 2009 [cited by applicant]
US 20120072287A1 · Crane · 2012 [cited by applicant]
US 20170278514A1 · Mathias et al. · 2017 [cited by applicant]
US 20180336198A1 · Zhong et al. · 2018 [cited by applicant]
US 20180349351A1 · Singhal et al. · 2018 [cited by applicant]
US 20190272296A1 · Prakash · 2019 [cited by examiner]
US 20200142917A1 · Paulus · 2020 [cited by applicant]
CN 106537370A · 2017 [cited by applicant]
CN 110457661A · 2019 [cited by applicant]
CN 110597956A · 2019 [cited by applicant]
CN 111666299A · 2020 [cited by applicant]
“An end-to-end Generative Retrieval Method for Sponsored Search Engine—Decoding Efficiently into a Closed Target Domain”, (Yijiang). (Year: 2019). [cited by examiner]
“Topic level summary generation using BERT induced Abstractive Summarization Model”. IEEE.2020 (Year: 2020). [cited by examiner]
“Abstractive Summarization with Keyword and Generated Word Attention”. IEEE. 2019. (Year: 2019). [cited by examiner]
Gao, et al., “Learning Lexicon Models from Search Logs for Query Expansion”, In Proceedings of Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, Jul. 12, 2… [cited by applicant]
Gu, et al., “Incorporating Copying Mechanism in Sequence-to-Sequence Learning”, In Repository of arXiv:1603.06393v1, Mar. 21, 2016, 12 Pages. [cited by applicant]
He, et al., “Learning to Rewrite Queries”, In Proceedings of 25th ACM International on Conference on Information and Knowledge Management, Oct. 24, 2016, pp. 1443-1452. [cited by applicant]
Hillard, et al., “Improving Ad Relevance in Sponsored Search”, In Proceedings of Third ACM International Conference on Web Search and Data Mining, Feb. 4, 2010, pp. 361-369. [cited by applicant]
Jones, et al., “Generating Query Substitutions”, In Proceedings of the 15th International Conference on World Wide Web, May 23, 2006, pp. 387-396. [cited by applicant]
Kannan, et al., “Smart Reply: Automated Response Suggestion for Email”, In Proceedings of 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining., Aug. 13, 2016, pp. 955-964. [cited by applicant]
Laddha, et al., “Understanding Chat Messages for Sticker Recommendation in Hike Messenger”, In Repository of arXiv:1902.02704v1, Feb. 7, 2019, 9 Pages. [cited by applicant]
Lee, et al., “Rare Query Expansion through Generative Adversarial Networks in Search Advertising”, In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining., Aug. 19, 2018, pp.… [cited by applicant]
Lian, et al., “An end-to-end Generative Retrieval Method for Sponsored Search Engine—Decoding Efficiently into a Closed Target Domain”, In Repository of arXiv:1902.00592v1, Feb. 2, 2019, 8 Pages. [cited by applicant]
Loper, et al., “NLTK: The Natural Language Toolkit”, In Repository of arXiv:cs/0205028v1, May 17, 2002, 8 Pages. [cited by applicant]
“International Search Report and Written Opinion Issued in PCT Application No. PCT/CN20/120731”, Mailed Date: Jul. 6, 2021, 9 Pages. [cited by applicant]
Qi, et al., “ProphetNet-Ads: A Looking Ahead Strategy for Generative Retrieval Models in Sponsored Search Engine”, In Proceedings of 9th CCF International Conference on Natural Language Processing and Chinese Computing,… [cited by applicant]
Riezler, et al., “Query Rewriting using Monolingual Statistical Machine Translation”, In Journal of Computational Linguistics, vol. 36, Issue 3, Sep. 1, 2010, pp. 569-582. [cited by applicant]
Robertson, et al., “Okapi At Trec-3”, In Proceedings of The Third Text REtrieval Conference (TREC-3), Apr. 1995, pp. 109-126. [cited by applicant]
See, et al., “Get To The Point: Summarization with Pointer-Generator Networks”, In Repository of arXiv:1704.04368v1, Apr. 14, 2017, 19 Pages. [cited by applicant]
Shan, et al., “Fast Language Model Look-ahead Algorithm Using Extended N-gram Model”, In Journal of Acta Automatica Sinica, vol. 38, Issue 10, Oct. 31, 2012, pp. 1618-1626. [cited by applicant]
Wu, et al., “Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation”, In Repository of arXiv:1609.08144v1, Sep. 26, 2016, 23 Pages. [cited by applicant]
Yan, et al., “ProphetNet”, Retrieved From: https://web.archive.org/web/20210106212808/https://github.com/microsoft/ProphetNet, Nov. 30, 2020, 12 Pages. [cited by applicant]
Yan, et al., “ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training”, In Repository of arXiv:2001.04063v1, Jan. 13, 2020, 10 Pages. [cited by applicant]
Ye, et al., “PhotoReply: Automatically Suggesting Conversational Responses to Photos”, In Proceedings of World Wide Web Conference, Apr. 23, 2018, pp. 1893-1899. [cited by applicant]
Anonymous: “Suffix tree”, accessed on link https://en.wikipedia. org/w/index.php?title=Suffix_tree&oldid=980067782, Sep. 24, 2020, 4 pages. [cited by applicant]
Anonymous: “Trie”, accessed on link https://en.wikipedia.org/w/index.php?title=Trie&oldid=979971471, Sep. 23, 2020, 5 pages. [cited by applicant]
Search Report Received for European Application No. 20957025.8, mailed on May 15, 2024, 10 pages. [cited by applicant]
Communication pursuant to Rules 70(2) and 70a(2) EPC received for European Application No. 20957025.8, mailed on Jun. 5, 2024, 1 Page. [cited by applicant]
First Office Action Received for Chinese Application No. 202080106212.1, mailed on Dec. 17, 2024, 19 pages. (English Translation Provided). [cited by applicant]