Adaptive n-back task using Hidden Markov Models (HMM) based on reaction time and response accuracy, follow these steps:

Process Overview

  1. Data Collection:
    • Reaction Time: Record the time taken for each response.
    • Response Accuracy: Record whether each response is correct or incorrect.
    • n-level: Keep track of the current n-back level during each trial.
  2. Defining States and Observations:
    • States: These represent the different n-back levels (e.g., n = 1, 2, 3, …).
    • Observations: These include reaction time and response accuracy.
  3. Transition Model:
    • Define the probability of transitioning from one n-back level to another based on the current state’s performance metrics.
    • If accuracy is between 80-100%, increase the n-back level.
    • If accuracy is below 50%, decrease the n-back level.
    • For intermediate accuracies, keep the current n-back level or slightly adjust based on additional metrics like reaction time.
  4. Emission Model:
    • Define the probability distribution of observations (reaction time and accuracy) for each n-back level.

Required Data

  1. Initial Training Data:
    • Collect data from a large number of trials at each n-back level to estimate the emission probabilities. This could involve thousands of trials across multiple participants to ensure robust statistics.
  2. Online Adaptation:
    • Continuously update the model with new data during the training process to refine transition and emission probabilities.

Steps to Develop the Algorithm

  1. Data Preparation:
    • Collect initial data for each n-back level to estimate initial parameters of the HMM.
    • Ensure data includes a diverse set of reaction times and accuracy levels for each n-back level.
  2. Parameter Estimation:
    • Use the collected data to estimate the initial transition probabilities and emission probabilities for the HMM.
    • Initial transition probabilities can be set based on heuristic rules (e.g., increase n-back level if accuracy > 80%).
  3. Model Initialization:
    • Initialize the HMM with the estimated parameters.
    • Define the initial state distribution (e.g., start with n = 1).
  4. Online Adaptation Mechanism:
    • After each trial, update the HMM parameters using the latest reaction time and accuracy data.
    • Adjust the n-back level based on the current state’s transition probabilities.
  5. Performance Monitoring:
    • Continuously monitor the performance of the HMM.
    • Make adjustments to the transition and emission models if certain n-back levels are consistently over or under-performing.

Example Data Structure

  • Reaction Time: Continuous variable representing the time taken for each response.
  • Response Accuracy: Binary variable indicating correct (1) or incorrect (0) response.
  • n-level: Integer representing the current n-back level during the trial.

Amount of Data Required

  • Initial Training: At least a few hundred trials per n-back level, preferably more, to ensure robust estimation of emission probabilities.
  • Online Adaptation: Continually collect data during each session to update the model.

Verification

  • Verify the algorithm against study requirements by comparing the adaptive n-back levels and performance metrics with expected outcomes from previous research studies.
  • Ensure the model’s predictions align with established cognitive training protocols and adapt dynamically based on participant performance.

By following this structured approach, you can develop an adaptive n-back task using Hidden Markov Models that adjusts based on reaction time and response accuracy.