surabhisnath/process_modelling

0

stars

125

commits

Jupyter Notebook

primary language

May 2, 2026

updated

README

A Compositional Model of Semantic Fluency

Python PyTorch

This repository contains the data and scripts for the paper: A Compositional Model of Semantic Fluency.

Authors: Surabhi S Nath, Alireza Modirshanechi, Peter Dayan

Abstract

The ability to recall semantically connected concepts---be it animals, summer fruits, or cities in Italy---is a remarkable capacity of the human mind. Such semantic fluency is thought to rely on traversing a mental space in which concepts are represented in terms of their meanings. However, the structure, properties, and navigability of this representational space remain enigmatic and highly debated. Existing approaches rely either on complex, uninterpretable distributional word-embeddings or on rigid, hand-crafted category norms. Here, we exploit the strengths of both, introducing Conceptome: a version of a compositional, interpretable, feature-based representation of semantic concepts, constructed by leveraging large language models. We use Conceptome to develop Conceptome-search, an auto-regressive model of how humans explore semantic spaces. We validate Conceptome and Conceptome-search using an animal fluency task, showing that they outperform state-of-the-art models in predicting human choices and capture key behavioral patterns such as interference. Our work, hence, offers new insights into the mechanisms underlying semantic fluency and memory retrieval. More broadly, our approach provides a general framework for constructing high-quality representations, with potential applications across cognition, including exploration, navigation, and creative thinking.

Repository Description

  1. csvs contain the csv data files
  2. figures contain the final figures used in the paper
  3. files contain all config and auxillary files used in the code
  4. fits contain the model fit pickles
  5. models contain the model classes and the main runner script
  6. scripts contain code for all auxillary analysis and figure plotting
  7. simulations contain the model simulation pickles

Setup

We recommend setting up a python virtual environment and installing all the requirements. Please follow these steps:

git clone https://github.com/surabhisnath/process_modelling.git
cd process_modelling

python3 -m venv .env

# On macOS/Linux
source .env/bin/activate
# On Windows
.env\Scripts\activate

pip install -r requirements.txt

Running the code

models/runner.py is the main runner script for the following analyses. All settings can be set using arguments of runner.py. Before you being, ensure all models you wish to run are set to 1 in files/model_to_run.

  1. To replicate Figure 1C: run scripts/make_TSNE.py

  2. To replicate Figure 2:

  3. Model Fitting: python models/runner.py --fit

  4. Model Fitting: python models/runner.py --simulate

Plotting NLLs: python scripts/model_NLLs.py, plot saved as plots/model_nlls.png

Plotting BLEUs: python scripts/model_BLEUs.py, plot saved as plots/model_bleus.png

  1. Ablations: python -u runner.py --nofit --nosimulate --ablation, prints top 8 most important features for HS and Activity and plots saved as plots/ablation_HS.png, plots/ablation_Activity.png, plots/ablation_features.png

Contributors

surabhisnath

125 commits

surabhisnath/process_modelling

0

stars

125

commits

Jupyter Notebook

primary language

May 2, 2026

updated

README

A Compositional Model of Semantic Fluency

Python PyTorch

This repository contains the data and scripts for the paper: A Compositional Model of Semantic Fluency.

Authors: Surabhi S Nath, Alireza Modirshanechi, Peter Dayan

Abstract

The ability to recall semantically connected concepts---be it animals, summer fruits, or cities in Italy---is a remarkable capacity of the human mind. Such semantic fluency is thought to rely on traversing a mental space in which concepts are represented in terms of their meanings. However, the structure, properties, and navigability of this representational space remain enigmatic and highly debated. Existing approaches rely either on complex, uninterpretable distributional word-embeddings or on rigid, hand-crafted category norms. Here, we exploit the strengths of both, introducing Conceptome: a version of a compositional, interpretable, feature-based representation of semantic concepts, constructed by leveraging large language models. We use Conceptome to develop Conceptome-search, an auto-regressive model of how humans explore semantic spaces. We validate Conceptome and Conceptome-search using an animal fluency task, showing that they outperform state-of-the-art models in predicting human choices and capture key behavioral patterns such as interference. Our work, hence, offers new insights into the mechanisms underlying semantic fluency and memory retrieval. More broadly, our approach provides a general framework for constructing high-quality representations, with potential applications across cognition, including exploration, navigation, and creative thinking.

Repository Description

  1. csvs contain the csv data files
  2. figures contain the final figures used in the paper
  3. files contain all config and auxillary files used in the code
  4. fits contain the model fit pickles
  5. models contain the model classes and the main runner script
  6. scripts contain code for all auxillary analysis and figure plotting
  7. simulations contain the model simulation pickles

Setup

We recommend setting up a python virtual environment and installing all the requirements. Please follow these steps:

git clone https://github.com/surabhisnath/process_modelling.git
cd process_modelling

python3 -m venv .env

# On macOS/Linux
source .env/bin/activate
# On Windows
.env\Scripts\activate

pip install -r requirements.txt

Running the code

models/runner.py is the main runner script for the following analyses. All settings can be set using arguments of runner.py. Before you being, ensure all models you wish to run are set to 1 in files/model_to_run.

  1. To replicate Figure 1C: run scripts/make_TSNE.py

  2. To replicate Figure 2:

  3. Model Fitting: python models/runner.py --fit

  4. Model Fitting: python models/runner.py --simulate

Plotting NLLs: python scripts/model_NLLs.py, plot saved as plots/model_nlls.png

Plotting BLEUs: python scripts/model_BLEUs.py, plot saved as plots/model_bleus.png

  1. Ablations: python -u runner.py --nofit --nosimulate --ablation, prints top 8 most important features for HS and Activity and plots saved as plots/ablation_HS.png, plots/ablation_Activity.png, plots/ablation_features.png

Contributors

surabhisnath

125 commits

Languages

Jupyter Notebook

86.0%

Python

14.0%