IP Library Granted Patent US 12,488,191
Granted Patent B1
US 12,488,191 · App. 18/082,790 · Granted Dec 2, 2025

Virtual assistant humor management

Inventors: Anjali Yuan Narayan-Chen (Santa Clara, CA); Jiao Sun (Los Angeles, CA); Shereen Oraby (Santa Clara, CA); Alessandra Cervone (Sunnyvale, CA); Tagyoung Chung (Palo Alto, CA); Jing Huang (Mountain View, CA); Yang Liu (Los Altos, CA); Nanyun Peng (Los Angeles, CA); Arindam Mandal (Redwood City, CA); Premkumar Natarajan (Rolling Hills Estates, CA)
Assignee: Amazon Technologies, Inc.
G06F40/35G06F40/151G06F40/289G10L15/063G10L15/1815G10L15/22
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,488,191
App. No.
18/082,790
Granted
Dec 2, 2025
Kind
B1
Abstract

In accordance with one disclosed method, first data representing first text may be processed using a first machine learning model configured to generate second data representing an explanation as to why the first text is humorous. The second data may be processed, together with the first data, by a second machine learning model configured to generate a value indicating that the first data and the second data correspond to a pun. A device may be caused to take at least a first action based at least in part on the value.

Claims (70)

1 . A computer-implemented method, comprising:

receiving, from a first device, first audio data representing an utterance corresponding to a dialog between the first device and a system;

performing speech processing using the first audio data to determine first data representing first text corresponding to the utterance;

sending, to a dialog management component, the first data;

processing the first data using a text-to-text transfer transformer (T5) model configured to generate output based on input such that the output represents an explanation as to why the input is humorous;

receiving, from the T5 model, second data representing an explanation as to why the first text is humorous;

processing the first data and the second data using a bidirectional encoder representations from transformers (BERT) model configured to classify input text as corresponding to a pun;

determining that the BERT model classified the first data and the second data as corresponding to a pun;

sending an indication of the pun to the dialog management component; and

determining, by the dialog management component, and based at least in part on the first data and the indication of the pun, output data responsive to the utterance.

2 . The computer-implemented method of claim 1 , further comprising, prior to receiving the first audio data:

training the T5 model using training data including at least third data representing a first text prefix corresponding to generation of pun explanations, fourth data representing a first pun, and fifth data representing a first explanation of the first pun, with the fifth data being used to supervise the training.

3 . The computer-implemented method of claim 1 , further comprising, prior to receiving the first audio data:

training the BERT model using training data including at least third data representing second text, fourth data representing an explanation of the second text, and a first value indicating that the second text represents a pun, with the first value being used to supervise the training.

4 . The computer-implemented method of claim 1 , further comprising:

receiving, from the dialog management component, dialog data representing at least one user input and at least one system response corresponding to the dialog;

wherein the output data is determined further based at least in part on the dialog data.

5 . A computer-implemented method, comprising:

receiving first data representing first text of a sentence including a pun;

processing the first data using a first machine learning model to generate second data representing an explanation as to why the sentence includes a pun, wherein the first machine learning model is configured using training data including at least third data representing a first text prefix corresponding to generation of pun explanations, fourth data representing a first pun, and fifth data representing a first explanation of the first pun; and

causing a first device to take at least a first action based at least in part on the second data.

6 . The computer-implemented method of claim 5 , wherein the first machine learning model comprises a text-to-text transfer transformer model.

7 . The computer-implemented method of claim 6 , further comprising:

training the text-to-text transfer transformer model using the training data, wherein the fifth data is used to supervise the training.

8 . The computer-implemented method of claim 5 , wherein:

the first machine learning model is configured to generate output text based on input text such that the output text represents an explanation as to why the input text includes a pun.

9 . A computer-implemented method, comprising:

receiving first data representing first text of a sentence including a pun;

processing the first data using a first machine learning model to generate second data representing an explanation as to why the sentence includes a pun;

processing the first data and the second data using a second machine learning model configured to generate an output value based on input text such that the output value indicates whether the input text correspond to a pun;

receiving, from the second machine learning model, a first value indicating that the first data and the second data correspond to a pun; and

causing a first device to take at least a first action based at least in part on the first value.

10 . The computer-implemented method of claim 9 , wherein the second machine learning model comprises a bidirectional encoder representations from transformers (BERT) model configured to classify the input text as corresponding to a pun or not corresponding to a pun.

11 . The computer-implemented method of claim 10 , wherein the BERT model is configured using training data including at least third data representing second text, fourth data representing an explanation of the second text, and a first value indicating that the second text represents a pun.

12 . The computer-implemented method of claim 11 , further comprising:

training the BERT model using the training data, wherein the first value is used to supervise the training.

13 . The computer-implemented method of claim 9 , further comprising:

receiving, by a dialog component, a first communication corresponding to the first text;

determining the first data based on the first communication;

generating, by the dialog component, a response recognizing that the first communication corresponded to a pun; and

sending a second communication corresponding to the response to the first device to cause the first device to output a representation of the response.

14 . The computer-implemented method of claim 9 , wherein the first machine learning model is configured using training data including at least third data representing a first text prefix corresponding to generation of pun explanations, fourth data representing a first pun, and fifth data representing a first explanation of the first pun.

15 . A system, comprising:

at least one processor; and

at least one memory comprising instructions that, when executed by the at least one processor, cause the system to:

receive first data representing first text of a sentence including a pun;

process the first data using a first machine learning model including a neural network configured to generate second data representing an explanation as to why the sentence includes a pun, wherein the first machine learning model is configured using training data including at least third data representing a first text prefix corresponding to generation of pun explanations, fourth data representing a first pun, and fifth data representing a first explanation of the first pun; and

cause a first device to take at least a first action based at least in part on the second data.

16 . The system of claim 15 , wherein the first machine learning model is configured to generate output text based on input text such that the output text represents an explanation as to why the input text includes a pun.

17 . A system, comprising:

at least one processor; and

at least one memory comprising instructions that, when executed by the at least one processor, cause the system to:

receive first data representing first text of a sentence including a pun;

process the first data using a first machine learning model including a neural network configured to generate second data representing an explanation as to why the sentence includes a pun;

process the first data and the second data using a second machine learning model configured to generate an output value based on input text such that the output value indicates whether the input text correspond to a pun;

receive, from the second machine learning model, a first value indicating that the first data and the second data correspond to a pun; and

cause a first device to take at least a first action based at least in part on the first value.

18 . The system of claim 17 , wherein the second machine learning model comprises a bidirectional encoder representations from transformers (BERT) model configured to classify the input text as corresponding to a pun or not corresponding to a pun.

19 . The system of claim 18 , wherein the BERT model is configured using training data including at least third data representing second text, fourth data representing an explanation of the second text, and a first value indicating that the second text represents a pun.

20 . The system of claim 19 , wherein the at least one memory further comprises additional instructions that, when executed by the at least one processor, cause the system to:

train the BERT model using the training data, wherein the first value is used to supervise the training.

21 . The system of claim 17 , wherein the at least one memory further comprises additional instructions that, when executed by the at least one processor, cause the system to:

receive, by a dialog component, a first communication corresponding to the first text;

determine the first data based on the first communication;

generate, by the dialog component, a response recognizing that the first communication corresponded to a pun; and

send a second communication corresponding to the response to the first device to cause the first device to output a representation of the response.

22 . The system of claim 17 , wherein the first machine learning model is configured using training data including at least third data representing a first text prefix corresponding to generation of pun explanations, fourth data representing a first pun, and fifth data representing a first explanation of the first pun.

23 . The system of claim 22 , wherein the first machine learning model comprises a text-to-text transfer transformer model.

24 . The system of claim 23 , wherein the at least one memory further comprises additional instructions that, when executed by the at least one processor, cause the system to:

train the text-to-text transfer transformer model using the training data, wherein the fifth data is used to supervise the training.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 3, 2025
From: SUN, JIAO; MANDAL, ARINDAM
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 070095/0046 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2022
From: NARAYAN-CHEN, ANJALI YUAN; ORABY, SHEREEN; CERVONE, ALESSANDRA; CHUNG, TAGYOUNG; HUANG, JING; LIU, YANG; PENG, NANYUN; NATARAJAN, PREMKUMAR
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 062127/0437 →
Continuity (1)
Provisional Application 63417882 · Oct 20, 2022
References Cited (87)
US 9858925B2 · Gruber · 2018 [cited by examiner]
US 10037768B1 · Akkiraju · 2018 [cited by examiner]
US 10297273B2 · Akkiraju · 2019 [cited by examiner]
US 10311895B2 · Akkiraju · 2019 [cited by examiner]
US 10424319B2 · Akkiraju · 2019 [cited by examiner]
US 10642939B2 · Toplyn · 2020 [cited by examiner]
US 10878817B2 · Toplyn · 2020 [cited by examiner]
US 11080012B2 · Lemay · 2021 [cited by examiner]
US 11080485B2 · Toplyn · 2021 [cited by examiner]
US 11562142B2 · Nijkamp · 2023 [cited by examiner]
US 11755839B2 · Park · 2023 [cited by examiner]
US 12136414B2 · Thomas · 2024 [cited by examiner]
US 12211495B2 · Natarajan · 2025 [cited by examiner]
US 12217001B2 · Bayomi · 2025 [cited by examiner]
US 20040088327A1 · Shimomura · 2004 [cited by examiner]
US 20190096425A1 · Akkiraju · 2019 [cited by examiner]
US 20190096426A1 · Akkiraju · 2019 [cited by examiner]
US 20190096427A1 · Akkiraju · 2019 [cited by examiner]
US 20190266250A1 · Toplyn · 2019 [cited by examiner]
US 20190355381A1 · Akkiraju · 2019 [cited by examiner]
US 20200227032A1 · Toplyn · 2020 [cited by examiner]
US 20210103700A1 · Toplyn · 2021 [cited by examiner]
US 20220067077A1 · Tupakula · 2022 [cited by examiner]
US 20220277141A1 · Nijkamp · 2022 [cited by examiner]
US 20230056680A1 · Thomas · 2023 [cited by examiner]
US 20240386189A1 · Malladi · 2024 [cited by examiner]
US 20240386190A1 · Malladi · 2024 [cited by examiner]
Karyn Buxman. 2008. Humor in the OR: A Stitch in Time? AORN Journal, Jul. 2008, vol. 88, No. 1, pp. 67-77. [cited by applicant]
Anne Cutler, et al. 1977. On the role of sentence stress in sentence processing*, Language and Speech, pp. 1-10. [cited by applicant]
Joseph L. Fleiss. 1973. The Equivalence of Weighted Kappa and the Intraclass Correlation Coefficient as Measures of Reliability. Educational and Psychological Measurement, 1973, vol. 33, pp. 613-619. [cited by applicant]
Mikyong Kim, et al. 2000. Patterns of Comprehension and Production of Nouns and Verbs in Agrammatism: Implications for Lexical Organization. Brain and Language vol. 74, pp. 1-25. Retrieved from http://www.idealibrary.co… [cited by applicant]
Jacob L. Moreno. 1955. Theory of Spontaneity-Creativity. Sociometry, vol. 18, No. 4, pp. 105-118. Retrieved from JSTOR, https://www.jstor.org/stable/2785848; or https://doi.org/10.2307/2785848. [cited by applicant]
Stuart Rose, et al. 2010. Automatic keyword extraction from individual documents. Text Mining: Applications and Theory, vol. 1, pp. 1-20. [cited by applicant]
Yufeng Diao, et al. 2019. Heterographic Pun Recognition via Pronunciation and Spelling Understanding Gated Attention Network. The World Wide Web Conference, pp. 363-371.A. [cited by applicant]
Abolfazl Horri. 2011. Linguistic mechanisms of humor: Pun and/or ambiguity. Language Related Research, vol. 2, Issue 2, pp. 19-40. Abstract only, retrieved from https://scholar.google.com/citations?view_op=view_citation… [cited by applicant]
U.S. Appl. No. 18/082,838, filed Dec. 16, 2022. [cited by applicant]
Sura Dhiaa Ibraheem, et al. 2016. Pun and (Un)Intentional Humor. Journal of American Academic Research. Retrieved from https://www.researchgate.net/publication/299524825, pp. 1-18. [cited by applicant]
Jacob Devlin, et al. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of North American Association for Computational Linguistics—Human Language Technologies 2019, p… [cited by applicant]
Aparna Garimella, et al. 2020. Judge me by my size (noun), do you? YodaLib: A Demographic-Aware Humor Generation Framework. In Proceedings of the 28th International Conference on Computational Linguistics (Online), pp. … [cited by applicant]
Md Kamrul Hasan, et al. 2019. UR-Funny: A Multimodal Language Dataset for Understanding Humor. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Co… [cited by applicant]
Tatsunori B. Hashimoto, et al. 2019. A Retrieve-and-Edit Framework for Predicting Structured Outputs. 32nd Conference on Neural Information Processing Systems (NIPS 2018). Retrieved from https://dl.acm.org/doi/10.5555/3… [cited by applicant]
He He, et al. 2019. Pun Generaration with Surprise. In Proceedings of NAACL HLT 2019, pp. 1734-1744. Association for Computational Linguistics. [cited by applicant]
Pengcheng He, et al. 2021. DeBERTa: Decoding-Enhanced BERT with Dis-Entangled Attention. Published as a conference paper at ICLR 2021. arXiv preprint, arXiv:2006.03654v6, pp. 1-23. [cited by applicant]
Bryan Anthony Hong, et al. 2009. Automatically Extracting Word Relationships as Templates for Pun Generation. In Proceedings of the NAACL HLT Workshop on Computational Approaches to Linguistic Creativity, pp. 24-31. Ass… [cited by applicant]
I-Hung Hsu, et al. 2022. DEGREE: A Data-Efficient Generation-Based Event Extraction Model. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Lang… [cited by applicant]
Kuan-Hao Huang, et al. 2021. Generating Syntactically Controlled Paraphrases without Using Annotated Paralell Pairs. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Lin… [cited by applicant]
Mike Lewis, et al. 2020. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational … [cited by applicant]
Yinhan Liu, et al. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv preprint arXIV:1907.11692v1, 13 pages. [cited by applicant]
Ilya Loshchilov, et al. 2019. Decoupled Weight Decay Regularization. In 7th International Conference on Learning Representations, ICLR 2019. Retrieved from https://openreview.net/pdf?id=Bkg6RiCqY7, 18 pages. [cited by applicant]
Fuli Luo, et al. 2019. Pun-GAN: Generative Adversarial Network for Pun Generation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on … [cited by applicant]
Tristan Miller, et al. 2015. Automatic disambiguation of English puns. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Lan… [cited by applicant]
Tristan Miller, et al. 2017. SemEval-2017 Task 7: Detection and Interpretation of English puns. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pp. 58-58. Association for Computa… [cited by applicant]
Anirudh Mittal, et al. 2021. “So You Think You're Funny?”: Rating the Humour Quotient in Standup Comedy. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 10073-10079. Associ… [cited by applicant]
Anirudh Mittal, et al. 2022. AmbiPun: Generating humorous puns with ambiguous context. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language… [cited by applicant]
Jeffrey Pennington, et al. 2014. GloVe: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532-1543. Association for Computati… [cited by applicant]
Saša Petrovic, et al. 2013. Unsupervised joke generation from big data. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (vol. 2: Short Papers), pp. 228-232. Association for Com… [cited by applicant]
Colin Raffel, et al. 2020. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. Journal of Machine Learning Research, 21 (2020). arXiv preprint arXiv:1910.10683v3, 67 pages. [cited by applicant]
Graeme Ritchie. 2005. Computational Mechanisms for Pun Generation. In Proceedings of the Tenth European Workshop, 8 pages. Association for Computational Linguistics. [cited by applicant]
Jiao Sun, et al. 2021. AESOP: Paraphrase generation with adaptive syntactic control. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 5176-5189. Association for Computationa… [cited by applicant]
Jiao Sun, et al., 2022. ExPUNations: Augmenting Puns with Keywords and Explanations. arXiv preprint arXiv:2210/13513v1, 16 pages. [cited by applicant]
Yufei Tian, et al. 2022. Zero-shot Sonnet Generation with Discourse-level Planning and Aesthetics Features. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Lingui… [cited by applicant]
Alessandro Valitutti, et al. 2013. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics, pp. 243-248. Association for Computational Linguistics. [cited by applicant]
Thomas Wolf, et al. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pp. 38-45, Online. … [cited by applicant]
Ziqing Yang, et al. 2020. TextBrewer: An Open-Source Knowledge Distillation Toolkit for Natural Language Processing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Dem… [cited by applicant]
Zixiaofan Yang, et al. Julia Hirschberg. 2021. CHoRaL: Collecting Humor Reaction Labels from Millions of Social Media Users. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp.… [cited by applicant]
Zhiwei Yu, et al. 2018. A Neural Approach to Pun Generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (vol. 1: Long Papers), pp. 1650-1660. Association for Computational… [cited by applicant]
Zhiwei Yu, et al. 2020. Homophonic Pun Generation with Lexically Constrained Rewriting. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Online, pp. 2870-2876. Association for C… [cited by applicant]
Yukun Zhu, et al. 2015. Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Books, pp. 19-27. arXiv preprint arXiv:1506.06724v1, 23 pages. [cited by applicant]
Satanjeev Banerjee, et al. 2005. METEOR: An automatic metric for MT evaluation with improved correlation with human judgments. In Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machin… [cited by applicant]
Oana-Maria Camburu, et al. 2018. e-SNLI: Natural Language Inference with Natural Language Explanations. In Proceedings of Neural Information Processing Systems. Advances in Neural Information Processing Systems 31 (Neur… [cited by applicant]
Santiago Castro, et al. 2018. A Crowd-Annotated Spanish Corpus for Humor Analysis In Proceedings of the Sixth International Workshop on Natural Language Processing for Social Media, pp. 7-11. Association for Computation… [cited by applicant]
Miruna-Adriana Clinciu, et al. 2021. A Study of Automatic Metrics for the Evaluation of Natural Language Explanations. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational L… [cited by applicant]
Alon Jacovi, et al. 2020. Towards Faithfully Interpretable NLP Systems: How Should We Define and Evaluate Faithfulness? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 419… [cited by applicant]
Peter Jansen, et al. 2018. WorldTree: A Corpus of Explanation Graphs for Elementary Science Questions supporting Multi-Hop Inference. In Proceedings of the Eleventh International Conference on Language Resources and Eva… [cited by applicant]
Justine T. Kao, et al. 2016. A Computational Model of Linguistic Humor in Puns. Cognitive Science, 40(5), pp. 1270-1285. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5042108. [cited by applicant]
Maxime Kayser, et al. 2021. e-ViL: A Dataset and Benchmark for Natural Language Explanations in Vision-Language Tasks. e-ViL: A Dataset and Benchmark for Natural Language Explanations in Vision-Language Tasks, pp. 1-24.… [cited by applicant]
Sawan Kumar, et al. 2020. NILE : Natural Language Inference with Faithful Natural Language Explanations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 8730-8742. Associa… [cited by applicant]
Wang Ling, et al. 2017. Program Induction by Rationale Generation: Learning to Solve and Explain Algebraic Word Problems. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 1… [cited by applicant]
Binny Mathew, et al. 2022. HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection*. arXiv preprint arXiv 2012.10289v.2, 12 pages. [cited by applicant]
Kishore Papineni, et al. 2002. BLEU: a Method for Automatic Evaluation of Machine Translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pp. 311-318. Association for Com… [cited by applicant]
Nazneen Fatema Rajani, et al. 2019. Explain yourself! Leveraging Language Models for Commonsense Reasoning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4932-4942. Asso… [cited by applicant]
Jiao Sun, et al. 2022. Context-Situated Pun Generation. arXiv preprint arXiv:2210.13522v1, 14 pages. [cited by applicant]
Orion Weller, et al. 2019. Humor Detection: A Transformer Gets the Last Laugh. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natu… [cited by applicant]
Sarah Wiegreffe, et al. 2021. Measuring Association Between Labels and Free-Text Rationales. In the Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, 19 pages. Retrieved from https:… [cited by applicant]
Wangchunshu Zhou, et al. 2022. Towards Interpretable Natural Language Understanding with Explanations as Latent Variables. 34th Conference on Neural Information Processing Systems (NeurlPS 2020), pp. 1-16. arXiv preprin… [cited by applicant]
Yanyan Zou, et al. 2019. Joint Detection and Location of English Puns. In Proceedings of NAACL-HLT 2019, pp. 2117-2123. Association for Computational Linguistics. [cited by applicant]
Office Action mailed Feb. 5, 2025 for U.S. Appl. No. 18/082,838. [cited by applicant]