Cognitive science Stan community

Hi all,

Following up on How to best support field-specific Stan communities on Discourse thread, I’ve started to add the tag cognitive-science to posts that seemed related to cognitive science (with the help of @martinmodrak). As today, Sept 9, I there are 54 threads.

A few words about me: My background is in psycholinguistics, but I’ve also worked with decision making models (drift diffusion, linear ballistic accumulator) and I’m now working as Assistant Professor in the department of Cognitive Science and AI in Tilburg. I’m very interested in knowing what other Stan users related to cognitive science are doing, what problems they are facing, and even better what solutions they are finding; and I guess I’m not the only one. There are a lot of commonalities between the models used in these disciplines where the data are generally coming from human (or non-human) subjects doing trials, and everything can be hierarchical (clustered by participants, items, words, etc).

I don’t think that there is a 100% consensus of what really is inside and outside of cognitive science. For this tag, I’m interpreting cognitive science in the broadest sense, so that it includes psychology, linguistics, neuroscience, anthropology, AI, etc. So far I tagged posts that I found searching for linguistics, psychology, the drift diffusion model, linear ballistic accumulator, reinforcement learning, reaction times, reading times, etc. But if I’m missing important posts (or keywords), let me know.

All this is to say that if you’re a “cognitive scientist” and you add a question to the forums, it would be great if you could tag it as cognitive-science, the tag doesn’t appear until you start typing.

Best,
Bruno

18 Likes

Bruno,
I am a computational linguist and I’d love to return to doing some language modeling. I am more interested in the prediction side of the coin and in particular can posterior samples be used meaningfully in an NLP system? I am in particular interested in discourse phenomenon like pronoun resolution and cross document coreference. I work at Columbia with the Stan folks there.
Anyway, here is a supporting cognitive-science reply.
Breck

1 Like

Thanks Bruno, that’s great. If you’re interested (or know anyone who would be interested), it would also be great to have a “Specialized Field Guide” for this like what @vianeylb did for ecology, @LeoGrin did for epidemiology, and @danielcfurr did for education. Currently they’re linked to from https://mc-stan.org/users/documentation/ if you scroll down to “Specialized Field Guides” (we’ll feature them more prominently in the website redesign that the SGB is working on).

3 Likes

Thanks for the tip, I never noticed them!
I’ll definitely make one like those in the next couple of weeks.

1 Like

Yeah the website design leaves a lot to be desired when it comes to discovering useful content. We definitely plan on improving that!

Awesome, thanks! When that’s ready you can either make a PR to the GitHub - stan-dev/stan-dev.github.io: Stan website based on the So Simple Jekyll theme. repository to add the link or just let me know and I can add the link (either way is fine).

Is there a preferred theme?
A couple of the sites are using “jekyll-theme-dinky”. Or it doesn’t matter?

We’re not picky about the theme, just happy to have the content! Most users will only see one of them anyway (the one relevant for their field). I think @LeoGrin went with the same theme that @vianeylb chose, but you can use something different if you want. Maybe eventually we’ll have a custom Stan theme that we can use for all of them, but we don’t at the moment.

1 Like

Consider me also interested in this domain. I have some general cognitive science training and specific expertise in attention as well as both descriptive and process models of response time. Also working with neuroimaging data quite a bit lately.

3 Likes

I’m also interested. I do EEG/ERP work and use Stan to help evaluate psychometric reliability. I’m broadly interested in cognitive control and motivation in healthy groups and across psychopathology.

2 Likes

Great, I’m now looking for tutorials and papers using Stan (and brms/rstanarm) with data and code to make a basic homepage. I’ll keep you posted here when I have something basic.

1 Like

By the way, I haven’t seen much Stan used for EEG/ERP data. Have you managed to deal with EEG data in an “interesting” way with Bayesian models? (I mean, I have just taken means of electrode and time windows and run linear mixed models).

Haha, I haven’t used it in a more “interesting” way than just using the typical measurement approaches and running linear mixed models. If you see some interesting work, I’d be curious to check it out.

1 Like

Chiming in with my own thoughts. EEG being too high-time-resolved for full space+time GPs, I think the next best thing would be space+time GAMs, ideally using the spline-on-a-sphere smooths for space (available via mgcv::s(lat,long,bs='sos')). Possibly the space component could be handled with full GPs while doing the time dimension with GAM, but I haven’t seen any work doing GPs on a sphere. Trials should random-effect-style deviate from the participant-by-condition smooth and participant-by-condition smooths should random-effect-style deviate from the group-by-condition smooth, etc. Now, I haven’t had to work with EEG data in several years, so can’t say how compute intensive this would be, but it doesn’t strike me as too crazy.

4 Likes

Not sure if I’m hijacking this thread or not with this, but just had a thought and would be interested in Cog Sci folks input:

For tasks with speed/accuracy data, would an SEM be useful as a slightly-more-identifiable-amid-low-data approximation to full process models like diffusion/LBA? The idea would be to have, in a given participant and condition, log-rt and binomial errors as observables predicted by latent mean-log-rt and latent log-odds-of-error, which in turn are modelled as related to a latent performance factor that loads negatively on both and a latent criterion factor that loads positively on one and negatively on the other. Estimating the magnitude of the loadings should permit accommodating data from different areas of the SAT function I think. This seems sufficiently obvious as to have been done before?

I don’t think this has ever done, and it seems like a cool idea. I have never worked with SEMs. (But I do know them). I have the implementation of the LBA that works (in finite time :) ) for some Stroop data, so it would be possible to compare the SEM approach with LBA at least. If you want to work on this, I’ll be happy to collaborate, just DM me, or mail me.

Re EEG data, the problem with GAMs is that then you end up with parameters that are hardly interpretable. Or at least irrelevant for the type of problems I deal with. Ideally, I’d like to know (i) if an experimental manipulation affects the EEG signal, (ii) in which electrodes and in which time window in average for my population, and (iii) in particular for my participants (that is hierarchically). But maybe I’m wrong or I don’t know how to use GAMs properly.

1 Like

I’m actually helping to supervising a student doing a simple analysis of a combined Flanker & spatial Stroop task I came up with, and I might get them to try this since it’s a pretty easy extension to code I already wrote for them. I’ll certainly let you know what we come up with though! Note also that right after posting I realised a problem with non-monotonic SAT curves (ex. when stim information is only briefly available) that constrains the scenarios that it would be applicable to, but I think this is pretty simple to discern a priori.

Ah, I suspect it’s the latter. When you have the posterior, you can compute anything of interest! You can look at the smooth in different conditions, look at the difference-between-conditions smooth, look at these at the group level and at the participant level, define regions and quantites of interest just like ERPs then look at the posterior for each, etc.

Whenever I have time, I’ll fit the EEG data I have and I’ll get back to you. It’s hard to discuss this without a specific example.

For a non-spatial example, see my paper here. Not Bayesian then, but shows the group-level smooths , condition-difference smooths, and and example of picking a region of interest, collapsing to a mean, and showing the bivariate posterior.

2 Likes

Behold!

Ok, I’ve just learned blogdown, and used the default theme. If there’s someone that knows more about css, and wants to do changes go ahead.

The tutorial pages and papers are in bib files, and I’m creating lists hacking the R package RefManageR. The way to go would be to create an appropriate style for the website with the r function tools:bibstyle, but I couldn’t figure out how to use.

Comments are welcome but pull requests even more :). I added all the papers that people on twitter sent me + my own. I’m waiting for the bib file of Shravan Vasishth (my ex boss) with a ton more of papers and tutorials. If someone wants to add a paper, it’s possible to just add a bibtex reference in allpubs.bib in the repo.

4 Likes

Awesome! I just added the link on the documentation page of Stan website under Specialized Field Guides.