Skip to main content
Log in

forager: a Python package and web interface for modeling mental search

  • Notes/Comments/Reply Manuscript
  • Published:
Behavior Research Methods Aims and scope Submit manuscript

Abstract

Analyzing data from the verbal fluency task (e.g., “name all the animals you can in a minute”) is of interest to both memory researchers and clinicians due to its broader implications for memory search and retrieval. Recent work has proposed several computational models to examine nuanced differences in search behavior, which can provide insights into the mechanisms underlying memory search. A prominent account of memory search within the fluency task was proposed by Hills et al. (2012), where mental search is modeled after how animals forage for food in physical space. Despite the broad potential utility of these models to scientists and clinicians, there is currently no open-source program to apply and compare existing foraging models or clustering algorithms without extensive, often redundant programming. To remove this barrier to studying search patterns in the fluency task, we created forager, a Python package (https://github.com/thelexiconlab/forager) and web interface (https://forager.research.bowdoin.edu/). forager provides multiple automated methods to designate clusters and switches within a fluency list, implements a novel set of computational models that can examine the influence of multiple lexical sources (semantic, phonological, and frequency) on memory search using semantic embeddings, and also enables researchers to evaluate relative model performance at the individual and group level. The package and web interface cater to users with various levels of programming experience. In this work, we introduce forager’s basic functionality and use cases that demonstrate its utility with pre-existing behavioral and clinical data sets of the semantic fluency task.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

References

  • Abwender, D. A., Swan, J. G., Bowerman, J. T., & Connolly, S. W. (2001). Qualitative analysis of verbal fluency output: Review and comparison of several scoring methods. Assessment, 8(3), 323–338.

    Article  PubMed  Google Scholar 

  • Berke, J. D., & Hyman, S. E. (2000). Addiction, dopamine, and the molecular mechanisms of memory. Neuron, 25(3), 515–532.

    Article  PubMed  Google Scholar 

  • Bousfield, W. A., & Sedgewick, C. H. W. (1944). An analysis of sequences of restricted associative responses. The Journal of General Psychology, 30(2), 149–165.

    Article  Google Scholar 

  • Bushnell, J., Svaldi, D., Ayers, M. R., Gao, S., Unverzagt, F., Del Gaizo, J., Clark, & D. G. (2022). A comparison of techniques for deriving clustering and switching scores from verbal fluency word lists. Frontiers in Psychology, 13.

  • Cer, D., Yang, Y., Kong, S. Y., Hua, N., Limtiaco, N., John, R. S., ... & Kurzweil, R. (2018). Universal sentence encoder. arXiv preprint arXiv:1803.11175.

  • Charnov, E. L. (1976). Optimal foraging, the marginal value theorem. Theoretical Population Biology, 9(2), 129–136.

    Article  PubMed  Google Scholar 

  • Christensen, A. P., & Kenett, Y. N. (2021). Semantic network analysis (SemNA): A tutorial on preprocessing, estimating, and analyzing semantic networks. Psychological Methods.

  • Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. Psychological Review, 82(6), 407.

    Article  Google Scholar 

  • De Deyne, S., Navarro, D. J., Perfors, A., Brysbaert, M., & Storms, G. (2019). The “small world of words” English word association norms for over 12,000 cue words. Behavior Research Methods, 51, 987–1006.

    Article  PubMed  Google Scholar 

  • Dorfman, A., Hills, T. T., & Scharf, I. (2022). A guide to area-restricted search: A foundational foraging behaviour. Biological Reviews.

  • Goodman, N. D., & Frank, M. C. (2016). Pragmatic language interpretation as probabilistic inference. Trends in Cognitive Sciences, 20(11), 818–829.

    Article  PubMed  Google Scholar 

  • He, L., Richie, R., & Bhatia, S. (2022). Limitations to optimal search in naturalistic active learning. Proceedings of the Annual Meeting of the Cognitive Science Society, 44(44).

  • Henry, J. D., & Crawford, J. R. (2004). Verbal fluency deficits in Parkinson's disease: A meta-analysis. Journal of the International Neuropsychological Society, 10(4), 608–622.

    Article  PubMed  Google Scholar 

  • Hills, T. T. (2006). Animal foraging and the evolution of goal-directed cognition. Cognitive Science, 30(1), 3–41.

    Article  PubMed  Google Scholar 

  • Hills, T. T., Todd, P. M., & Goldstone, R. L. (2008). Search in external and internal spaces: Evidence for generalized cognitive search processes. Psychological Science, 19(8), 802–808.

    Article  PubMed  Google Scholar 

  • Hills, T. T., Jones, M. N., & Todd, P. M. (2012). Optimal foraging in semantic memory. Psychological Review, 119(2), 431.

    Article  PubMed  Google Scholar 

  • Hills, T. T., Todd, P. M., & Jones, M. N. (2015). Foraging in semantic fields: How we search through memory. Topics in Cognitive Science, 7, 513–534.

    Article  PubMed  Google Scholar 

  • Hurks, P. P. M., Hendriksen, J. G. M., Vles, J. S. H., Kalff, A. C., Feron, F. J. M., Kroes, M., Jolles, & J. (2004). Verbal fluency over time as a measure of automatic and controlled processing in children with ADHD. Brain and Cognition, 55(3), 535–544.

    Article  PubMed  Google Scholar 

  • Kavé, G., & Sapir-Yogev, S. (2020). Associations between memory and verbal fluency tasks. Journal of Communication Disorders, 83, 105968.

    Article  PubMed  Google Scholar 

  • Kenett, Y. N., Wechsler-Kashi, D., Kenett, D. Y., Schwartz, R. G., Ben-Jacob, E., & Faust, M. (2013). Semantic organization in children with cochlear implants: Computational analysis of verbal fluency. Frontiers in Psychology, 4, 543.

    Article  PubMed  PubMed Central  Google Scholar 

  • Kim, N., Kim, J. H., Wolters, M. K., MacPherson, S. E., & Park, J. C. (2019). Automatic scoring of semantic fluency. Frontiers in Psychology, 10, 1020.

    Article  PubMed  PubMed Central  Google Scholar 

  • Kischka, U., Kammer, T. H., Maier, S., Weisbrod, M., Thimm, M., & Spitzer, M. (1996). Dopaminergic modulation of semantic network activation. Neuropsychologia, 34(11), 1107–1113.

    Article  PubMed  Google Scholar 

  • Kumar, A. A., Balota, D. A., Habbert, J., Scaltritti, M., & Maddox, G. B. (2019). Converging semantic and phonological information in lexical retrieval and selection in young and older adults. Journal of Experimental Psychology: Learning, Memory, and Cognition, 45(12), 2267.

    PubMed  Google Scholar 

  • Kumar, A. A., Lundin, N. B., & Jones, M. N. (2022a). . Mouse-mole-vole: The inconspicuous benefit of phonology during retrieval from semantic memory. https://doi.org/10.31234/osf.io/2bazx. Proceedings of the Annual Meeting of the Cognitive Science Society.

  • Kumar, A. A., Steyvers, M., & Balota, D. A. (2022b). A critical review of network-based and distributional approaches to semantic memory structure and processes. Topics in Cognitive Science, 14(1), 54–77.

    Article  PubMed  Google Scholar 

  • Lin, Y., Michel, J. B., Lieberman, E. A., Orwant, J., Brockman, W., & Petrov, S. (2012). Syntactic annotations for the google books ngram corpus. Proceedings of the ACL 2012 system demonstrations, 169–174.

  • Linz, N., Tröger, J., Alexandersson, J., & Konig, A. (2017, September). Using neural word embeddings in the analysis of the clinical semantic verbal fluency task. In IWCS 2017-12th International Conference on Computational Semantics (pp. 1–7).

  • Lundin, N. B., Todd, P. M., Jones, M. N., Avery, J. E., O’Donnell, B. F., & Hetrick, W. P. (2020). Semantic search in psychosis: Modeling local exploitation and global exploration. Schizophrenia Bulletin Open, 1(1), sgaa011.

    Article  PubMed  PubMed Central  Google Scholar 

  • Lundin, N. B., Brown, J. W., Johns, B. T., Jones, M. N., Purcell, J. R., Hetrick, W. P., O'Donnell, B. F., & Todd, P. M. (2023). Neural evidence of switch processes during semantic and phonetic foraging in human memory. Proceedings of the National Academy of Sciences, 120(42), e2312462120.

    Article  Google Scholar 

  • Luo, L., Luk, G., & Bialystok, E. (2010). Effect of language proficiency and executive control on verbal fluency performance in bilinguals. Cognition, 114(1), 29–41.

    Article  PubMed  Google Scholar 

  • Martz, E., Weibel, S., & Weiner, L. (2022). An overactive mind: Investigating racing thoughts in ADHD, hypomania and comorbid ADHD and bipolar disorder via verbal fluency tasks. Journal of Affective Disorders, 300, 226–234.

    Article  PubMed  Google Scholar 

  • Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., & Dean, J. (2013). Distributed representations of words and phrases and their compositionality. Advances in Neural Information Processing Systems, 26.

  • Monsch, A. U., Bondi, M. W., Butters, N., Salmon, D. P., Katzman, R., & Thal, L. J. (1992). Comparisons of verbal fluency tasks in the detection of dementia of the Alzheimer type. Archives of Neurology, 49(12), 1253–1258.

    Article  PubMed  Google Scholar 

  • Newman, R. P., Weingartner, H., Smallberg, S. A., & Calne, D. B. (1984). Effortful and automatic memory: Effects of dopamine. Neurology, 34(6), 805–805.

    Article  PubMed  Google Scholar 

  • Obeso, I., Casabona, E., Bringas, M. L., Álvarez, L., & Jahanshahi, M. (2012). Semantic and phonemic verbal fluency in Parkinson's disease: Influence of clinical and demographic variables. Behavioural Neurology, 25(2), 111–118.

    Article  PubMed  PubMed Central  Google Scholar 

  • Ovando-Tellez, M., Benedek, M., Kenett, Y. N., Hills, T., Bouanane, S., Bernard, M., Volle, & E. (2022). An investigation of the cognitive and neural correlates of semantic memory search related to creative ability. Communications Biology, 5(1), 1–16.

    Article  Google Scholar 

  • Pennington, J., Socher, R., & Manning, C. D. (2014). Glove: Global vectors for word representation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), 1532–1543.

  • Pirolli, P. (2007). Cognitive models of human-information interaction. Handbook of Applied Cognition, 443–470.

  • Raaijmakers, J. G., & Shiffrin, R. M. (1981). Search of associative memory. Psychological Review, 88(2), 93.

    Article  Google Scholar 

  • Rinehardt, E., Eichstaedt, K., Schinka, J. A., Loewenstein, D. A., Mattingly, M., Fils, J., Schoenberg, & M. R. (2014). Verbal fluency patterns in mild cognitive impairment and Alzheimer's disease. Dementia and Geriatric Cognitive Disorders, 38(1–2), 1–9.

    Article  PubMed  Google Scholar 

  • Smith-Spark, J. H., Henry, L. A., Messer, D. J., & Zięcik, A. P. (2017). Verbal and non-verbal fluency in adults with developmental dyslexia: Phonological processing or executive control problems? Dyslexia, 23(3), 234–250.

    Article  PubMed  Google Scholar 

  • Sung, K., Gordon, B., Yang, S., & Schretlen, D. J. (2013). Evidence of semantic clustering in letter-cued word retrieval. Journal of Clinical and Experimental Neuropsychology, 35(10), 1015–1023.

    Article  PubMed  PubMed Central  Google Scholar 

  • Taler, V., Johns, B. T., Young, K., Sheppard, C., & Jones, M. N. (2013). A computational analysis of semantic structure in bilingual verbal fluency performance. Journal of Memory and Language, 69(4), 607–618.

    Article  Google Scholar 

  • Taler, V., Johns, B. T., & Jones, M. N. (2020). A large-scale semantic analysis of verbal fluency across the aging spectrum: Data from the Canadian longitudinal study on aging. The Journals of Gerontology: Series B, 75(9), e221–e230.

    Article  Google Scholar 

  • Taylor, W. L. (1953). “Cloze procedure”: A new tool for measuring readability. Journalism Quarterly, 30(4), 415–433.

    Article  Google Scholar 

  • Todd, P. M., & Hills, T. T. (2020). Foraging in mind. Current Directions in Psychological Science, 29(3), 309–315.

    Article  Google Scholar 

  • Troyer, A. K., Moscovitch, M., & Winocur, G. (1997). Clustering and switching as two components of verbal fluency: Evidence from younger and older healthy adults. Neuropsychology, 11(1), 138.

    Article  PubMed  Google Scholar 

  • Troyer, A. K., Moscovitch, M., Winocur, G., Leach, L., & Freedman, M. (1998). Clustering and switching on verbal fluency tests in Alzheimer's and Parkinson's disease. Journal of the International Neuropsychological Society, 4(2), 137–143.

    Article  PubMed  Google Scholar 

  • Wilke, A., Hutchinson, J. M., Todd, P. M., & Czienskowski, U. (2009). Fishing for the right words: Decision rules for human foraging behavior in internal search tasks. Cognitive Science, 33(3), 497–529.

    Article  PubMed  Google Scholar 

  • Wittmann, B. C., Schott, B. H., Guderian, S., Frey, J. U., Heinze, H. J., & Düzel, E. (2005). Reward-related FMRI activation of dopaminergic midbrain is associated with enhanced hippocampus-dependent long-term memory formation. Neuron, 45(3), 459–467.

    Article  PubMed  Google Scholar 

  • Zemla, J. C., Cao, K., Mueller, K. D., & Austerweil, J. L. (2020). SNAFU: The semantic network and fluency utility. Behavior Research Methods, 52(4), 1681–1699.

    Article  PubMed  PubMed Central  Google Scholar 

Download references

Open Practices Statement

Package documentation is available at https://github.com/thelexiconlab/forager. The web interface can be accessed via https://forager.research.bowdoin.edu/. Analysis scripts for interpreting output files from the package are available at https://github.com/thelexiconlab/forager-analyses.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Abhilasha A. Kumar.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Package documentation is available at https://github.com/thelexiconlab/forager. The web interface can be accessed via https://forager.research.bowdoin.edu/. Analysis scripts for interpreting output files from the package are available at https://github.com/thelexiconlab/forager-analyses. We sincerely thank Nancy B. Lundin, Brian F. O’Donnell, and William P. Hetrick for sharing the data from the psychosis study for demonstration purposes. We also thank Stephen Houser at Bowdoin College for assisting with deploying the web interface.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kumar, A.A., Apsel, M., Zhang, L. et al. forager: a Python package and web interface for modeling mental search. Behav Res (2023). https://doi.org/10.3758/s13428-023-02296-x

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.3758/s13428-023-02296-x

Keywords

Navigation