Do LLMs Think Fast and Slow? A Causal Study on Sentiment Analysis (2404.11055v2)
Abstract: Sentiment analysis (SA) aims to identify the sentiment expressed in a text, such as a product review. Given a review and the sentiment associated with it, this work formulates SA as a combination of two tasks: (1) a causal discovery task that distinguishes whether a review "primes" the sentiment (Causal Hypothesis C1), or the sentiment "primes" the review (Causal Hypothesis C2); and (2) the traditional prediction task to model the sentiment using the review as input. Using the peak-end rule in psychology, we classify a sample as C1 if its overall sentiment score approximates an average of all the sentence-level sentiments in the review, and C2 if the overall sentiment score approximates an average of the peak and end sentiments. For the prediction task, we use the discovered causal mechanisms behind the samples to improve LLM performance by proposing causal prompts that give the models an inductive bias of the underlying causal graph, leading to substantial improvements by up to 32.13 F1 points on zero-shot five-class SA. Our code is at https://github.com/cogito233/causal-sa
- Lisa Feldman Barrett. 2006. Solving the emotion paradox: Categorization and the experience of emotion. Personality and social psychology review, 10(1):20–46.
- Ego depletion: is the active self a limited resource? Journal of Personality and Social Psychology, 74(5):1252–1265.
- Language models are few-shot learners. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.
- Inferring latent structures via information inequalities. In Proceedings of the Thirtieth Conference on Uncertainty in Artificial Intelligence, UAI 2014, Quebec City, Quebec, Canada, July 23-27, 2014, pages 112–121. AUAI Press.
- Improving document-level sentiment classification using importance of sentences. Entropy, 22(12):1336.
- Yejin Choi and Claire Cardie. 2008. Learning with compositional semantics as structural inference for subsentential sentiment analysis. In 2008 Conference on Empirical Methods in Natural Language Processing, EMNLP 2008, Proceedings of the Conference, 25-27 October 2008, Honolulu, Hawaii, USA, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 793–801. ACL.
- Seymour Epstein. 1994. Integration of the cognitive and the psychodynamic unconscious. American psychologist, 49(8):709.
- Reasoning implicit sentiment with chain-of-thought prompting. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 1171–1182, Toronto, Canada. Association for Computational Linguistics.
- Justin S Feinstein. 2013. Lesion studies of human emotion and feeling. Current opinion in neurobiology, 23(3):304–309.
- Software applications user reviews.
- Vasileios Hatzivassiloglou and Kathleen R McKeown. 1997. Predicting the semantic orientation of adjectives. In Proceedings of the 35th annual meeting of the association for computational linguistics and eighth conference of the european chapter of the association for computational linguistics, pages 174–181. Association for Computational Linguistics.
- Vasileios Hatzivassiloglou and Janyce M Wiebe. 2000. Effects of adjective orientation and gradability on sentence subjectivity. In Proceedings of the 18th conference on Computational linguistics-Volume 1, pages 299–305. Association for Computational Linguistics.
- Aspect-based sentiment analysis using BERT. In Proceedings of the 22nd Nordic Conference on Computational Linguistics, NoDaLiDa 2019, Turku, Finland, September 30 - October 2, 2019, pages 187–196. Linköping University Electronic Press.
- Matthew Honnibal and Ines Montani. 2017. spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing. To appear.
- Nonlinear causal discovery with additive noise models. In Advances in Neural Information Processing Systems 21, Proceedings of the Twenty-Second Annual Conference on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 8-11, 2008, volume 21, pages 689–696. Curran Associates, Inc.
- Dominik Janzing. 2007. On causally asymmetric versions of occam’s razor and their relation to thermodynamics. arXiv preprint arXiv:0708.3411.
- Dominik Janzing. 2019. The cause-effect problem: Motivation, ideas, and popular misconceptions. In Isabelle Guyon, Alexander R. Statnikov, and Berna Bakir Batu, editors, Cause Effect Pairs in Machine Learning, pages 3–26. Springer.
- Algorithmic independence of initial condition and dynamical law in thermodynamics and causal inference. New Journal of Physics, 18(9):093052.
- Information-geometric approach to inferring causal directions. Artif. Intell., 182-183:1–31.
- Dominik Janzing and Bernhard Schölkopf. 2010. Causal inference using the algorithmic Markov condition. IEEE Transactions on Information Theory, 56(10):5168–5194.
- Causal direction of data collection matters: Implications of causal and anticausal learning for NLP. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9499–9513, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
- Daniel Kahneman. 2011. Thinking, fast and slow. Farrar, Straus and Giroux.
- Daniel Kahneman and Shane Frederick. 2002. Representativeness revisited: Attribute substitution in intuitive judgment, pages 49–81. Cambridge University Press.
- When more pain is preferred to less: Adding a better end. Psychological science, 4(6):401–405.
- Karim S Kassam and Wendy Berry Mendes. 2013. The effects of measuring emotion: Physiological reactions to emotional situations depend on whether someone is asking. PloS one, 8(6):e64959.
- The multilingual Amazon reviews corpus. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4563–4568, Online. Association for Computational Linguistics.
- Yoon Kim. 2014. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1746–1751. ACL.
- Joseph E LeDoux. 1998. The emotional brain: The mysterious underpinnings of emotional life. Simon and Schuster.
- Can large language models distinguish cause from effect? In UAI 2022 Workshop on Causal Representation Learning.
- Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, pages 142–150.
- Obtaining causal information by merging datasets with MAXENT. In International Conference on Artificial Intelligence and Statistics, AISTATS 2022, 28-30 March 2022, Virtual Event, volume 151 of Proceedings of Machine Learning Research, pages 581–603. PMLR.
- Locating and editing factual associations in gpt. arXiv preprint arXiv:2202.05262.
- Noisy channel language model prompting for few-shot text classification. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5316–5330, Dublin, Ireland. Association for Computational Linguistics.
- Distinguishing cause from effect using observational data: Methods and benchmarks. CoRR, abs/1412.3773.
- Document-level sentiment classification: An empirical comparison between svm and ann. Expert Systems with Applications, 40(2):621–633.
- Tetsuya Nasukawa and Jeonghee Yi. 2003. Sentiment analysis: Capturing favorability using natural language processing. In Proceedings of the 2nd international conference on Knowledge capture, pages 70–77. ACM.
- Original or translated? A causal analysis of the impact of translationese on machine translation performance. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5303–5320, Seattle, United States. Association for Computational Linguistics.
- OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.
- Training language models to follow instructions with human feedback. CoRR, abs/2203.02155.
- Thumbs up? Sentiment classification using machine learning techniques. In Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing, EMNLP 2002, Philadelphia, PA, USA, July 6-7, 2002, pages 79–86.
- Judea Pearl. 2001. Direct and indirect effects. In UAI ’01: Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence, University of Washington, Seattle, Washington, USA, August 2-5, 2001, pages 411–420. Morgan Kaufmann.
- Judea Pearl et al. 2000. Causality: Models, reasoning and inference. Cambridge University Press.
- Identifying cause and effect on discrete data using additive noise models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2010, Chia Laguna Resort, Sardinia, Italy, May 13-15, 2010, volume 9 of JMLR Proceedings, pages 597–604. JMLR.org.
- Elements of causal inference: Foundations and learning algorithms. The MIT Press.
- Beneath the tip of the iceberg: Current challenges and new directions in sentiment analysis research. IEEE Trans. Affect. Comput., 14(1):108–132.
- Language models are unsupervised multitask learners. OpenAI Blog, 1(8).
- Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67.
- The emotional arcs of stories are dominated by six basic shapes. EPJ Data Sci., 5(1):31.
- Peter Salovey and John D Mayer. 2004. Emotional intelligence. Dude publishing.
- The functional neural architecture of self-reports of affective experience. Biological psychiatry, 73(7):631–638.
- Timo Schick and Hinrich Schütze. 2022. True few-shot learning with Prompts—A real-world perspective. Transactions of the Association for Computational Linguistics, 10:716–731.
- Bernhard Schölkopf. 2022. Causality for machine learning. In Hector Geffner, Rina Dechter, and Joseph Y. Halpern, editors, Probabilistic and Causal Inference: The Works of Judea Pearl, volume 36 of ACM Books, pages 765–804. ACM.
- On causal and anticausal learning. In Proceedings of the 29th International Conference on Machine Learning, ICML 2012, Edinburgh, Scotland, UK, June 26 - July 1, 2012. icml.cc / Omnipress.
- Towards causal representation learning. CoRR, abs/2102.11107.
- Towards the first adversarially robust neural network model on mnist. arXiv preprint arXiv:1805.09190.
- Telling cause from effect in deterministic linear dynamical systems. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, volume 37 of JMLR Workshop and Conference Proceedings, pages 285–294. JMLR.org.
- Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631–1642.
- Peter Spirtes and Kun Zhang. 2016. Causal discovery and inference: Concepts and recent methodological advances. In Applied informatics, volume 3, pages 1–28. SpringerOpen.
- Adapting naive bayes to domain adaptation for sentiment analysis. In Advances in Information Retrieval, 31th European Conference on IR Research, ECIR 2009, Toulouse, France, April 6-9, 2009. Proceedings, volume 5478 of Lecture Notes in Computer Science, pages 337–349. Springer.
- Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca.
- Llama: Open and efficient foundation language models. CoRR, abs/2302.13971.
- Topic-based document-level sentiment analysis using contextual cues. Mathematics, 9(21).
- Peter D. Turney. 2002. Thumbs up or thumbs down? semantic orientation applied to unsupervised classification of reviews. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 417–424. ACL.
- Amos Tversky and Daniel Kahneman. 1974. Judgment under uncertainty: Heuristics and biases: Biases in judgments reveal some heuristics of thinking under uncertainty. Science, 185(4157):1124–1131.
- Counterfactual invariance to spurious correlations in text classification. Advances in Neural Information Processing Systems, 34.
- Causal mediation analysis for interpreting neural nlp: The case of gender bias.
- Janyce M Wiebe. 1994. Tracking point of view in narrative. Computational Linguistics, 20(2):233–287.
- Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics.
- Tasty burgers, soggy fries: Probing aspect robustness in aspect-based sentiment analysis. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 3594–3605, Online. Association for Computational Linguistics.
- Xlnet: Generalized autoregressive pretraining for language understanding. CoRR, abs/1906.08237.
- Robert B Zajonc. 1980. Feeling and thinking: Preferences need no inferences. American psychologist, 35(2):151.
- Kun Zhang and Aapo Hyvärinen. 2009. Causality discovery with additive disturbances: An information-theoretical perspective. In Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2009, Bled, Slovenia, September 7-11, 2009, Proceedings, Part II 20, pages 570–585. Springer.
- Character-level convolutional networks for text classification. Advances in neural information processing systems, 28.
- Large language models are human-level prompt engineers. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net.