Cognitive tasks
Modeling N-back and other trial-level task structures
One common way to describe cognitive assessment tasks and their trial structures is to visualize different stages of a trial as slides, and then annotate them with parameters (e.g., timing, stimulus, etc.).
For example, the N-back task is a common test that assesses working memory. It typically involves presenting a sequence of stimuli (e.g., letters, numbers) and asking participants to indicate when the current stimulus matches the one from N steps earlier in the sequence.
This trial structure can be visualized as a set of slides, where each slide represents a different trial:
Studyflow diagrams can also be used to represent the trial structure of cognitive tasks, showing the flow of different stages and parameters in a more structured way:
In the figure above, we can see the the stimulus presented in each trial (boxes), and the timing of each stage (timer events). Timer events are used to indicate the duration of each stage, such as the presentation time of the stimulus and the response window. The flow of the trial is represented by arrows connecting the different stages, showing how participants move through the task.
However, this does not yet provide a formal and complete description of the experiment. For example, we actually have two timers in the trial, one for the ITI (Inter Trial Interval), and one for maximum response time. This can be simply two interrupting timers events (circles with solid borders) that stops the flow of the activity at the appropriate times:
We also overlooked the logic of the task, e.g., whether the current stimulus matches the one from N steps earlier, whether the response is correct, and to provide feedback to the participant. BPMN can help here by providing a standard way to represented the process flow and decision points in the task, like this:
This looks complicated! Studyflow diagrams also provides a more intuitive way to model standard cognitive tasks for cognitive scientists:
The parameters of the N-back task can be modified using the Modeler app (in the inspector sidebar) or directly in the .studyflow file (a YAML document). Since the diagram is generated from that file, any changes to the parameters will automatically update the diagram, and it can be version controlled too!