Coder Social home page Coder Social logo

ndawlab / seqanx Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 1.0 22.2 MB

Code associated with "Anxiety, avoidance, and sequential evaluation"

Home Page: https://doi.org/10.1162/cpsy_a_00026

License: MIT License

Python 4.43% Jupyter Notebook 70.86% TeX 24.33% R 0.38%
reinforcement-learning computational-psychiatry anxiety

seqanx's Introduction

Sequential Choice in Anxiety

Anxiety disorders are characterized by a range of aberrations in the processing and response to threat, but there is little clarity what core pathogenesis might underlie these symptoms. Here we propose a decision theoretic analysis of maladaptive avoidance and embody it in a reinforcement learning model, which shows how a localized bias in beliefs can formally explain a range of phenomena related to anxiety. The core observation, implicit in standard decision theoretic accounts of sequential evaluation, is that avoidance should be protective: if danger can be avoided later, it poses no threat now. We show how a violation of this assumption - a pessimistic, false belief that later avoidance will be unsuccessful - leads to a characteristic propagation of fear and avoidance to situations far antecedent of threat. This single deviation can explain a surprising range of features of anxious behavior, including exaggerated threat appraisals, fear generalization, and persistent avoidance.

Author

Sam Zorowitz (zorowitz [at] princeton.edu)

Project Organization

├── figures                      <- Figures for presentations & manuscript.
│
├── manuscripts                  <- Manuscripts & RLDM 2019 abstract/poster.
│
├── notebooks                    <- Analysis notebooks for the projects.
│   ├── 01_OpenField.ipynb       <- Demo of pessimistic RL in toy MDP.
│   ├── 02_AppAvo.ipynb          <- Model of approach-avoidance bias.
│   ├── 03_Helplessness.ipynb    <- Model of anxiety-to-depression transition.
│   ├── 04_DecisionTree.ipynb    <- Model of aversive pruning.
│   ├── 05_FreeChoice.ipynb      <- Model of free choice premium.
│   ├── 06_CliffWalking.ipynb    <- Reproduction of Gaskett (2003).
│
├── sisyphus                     <- Source code used in notebooks (installation instructions below).
│   ├── envs                     <- Task environments.
│   ├── mdp                      <- RL algorithms (value iteration, temporal difference learning).
│   ├── tests                    <- Continuous integration tests.
│
├── requirements.txt             <- Python packages used in this project.

Installation

This repository hosts the sisyphus package, which is used in all of this project's simulations. The package contains functions for constructing arbitrary MDP environments and several reinforcement learning algorithms.

To install the code through Github, open a terminal and run:

pip install git+https://github.com/ndawlab/seqanx.git

Alternately, you can clone the repository and install locally:

git clone https://github.com/ndawlab/seqanx
cd seqanx
pip install -e .

Once installed, the simulations (found in the notebooks folder) should be reproducible on any computer.

Other Languages

Jill de Ron very kindly translated the python code for the pessimistic model into R. With her permission, the code is available in the corresponding folder. Thanks Jill!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.