Single-trial (LSS) estimation with flexible HRF (CSPLINzero / dmBLOCK) in AFNI

Hi all,

I’m trying to perform single-trial beta estimation (LSS / LS-S) for a rapid event-related design where I do not want to assume a canonical HRF shape for the cue phase.


Setup

  • Event-related design with closely spaced trials (ISI ~2–6s)
  • Two cue conditions (e.g., reward vs no-reward)
  • Goal: beta-series functional connectivity → need one scalar beta per trial

What works at the group GLM level

At the condition level, I can model the cue phase using:

  • CSPLINzero(0,12,7) → flexible, sustained response
  • or dmBLOCK → duration-modulated sustained response

This works well for capturing the cue response without assuming a canonical HRF.


The problem

For beta-series FC, I need single-trial estimates.

With standard LSS in AFNI (via -stim_times_IM + 3dLSS):

  • Works fine with GAM (single parameter per trial)
  • But with CSPLINzero, each trial has multiple regressors (e.g., 5 coefficients)
  • With dmBLOCK + variable durations, each trial has a different-shaped regressor

So the issues are:

  1. -stim_times_IM assumes regressors have the same shape (just time-shifted)
  2. 3dLSS relies on that assumption for estimation
  3. CSPLINzero → multiple parameters per trial
  4. dmBLOCK (variable duration) → genuinely different shapes per trial

Core question

How can we do single-trial estimation in AFNI without assuming a fixed HRF shape?

Specifically:

  • Is there an AFNI-native way to do LSS with:
    • CSPLIN / CSPLINzero (multi-parameter basis per trial)?
    • dmBLOCK with trial-wise variable durations?

Are you still in the experimental design stage, or has the data already been collected? Specifically, how long is the inter-trial interval (ITI) in your experiment, and is it fixed or jittered?

The challenges of trial-level estimation are often compounded by spatial heterogeneity in the hemodynamic response. A canonical HRF is frequently a poor fit for regions outside the sensory cortex. Consequently, using 3dLSS with the dmUBLOCK option for trial-wise variable durations may not be ideal.

Conversely, while using multiple basis functions (such as CSPLIN) allows for more flexibility, you may encounter significant estimability issues at the trial level. While frameworks outside AFNI that explicitly model trial-wise responses, such as GLMsingle, represent promising developments, the underlying design remains a fundamental constraint.

Gang Chen

Hello Gang!

Thanks for the reply, the data is already collected and the ITI is jittered using an exponential distribution between 2-6 seconds.

So I was basing my argument upon this paper, Spatiotemporal activity estimation for multivoxel pattern analysis with rapid event-related designs - PubMed

And I was thinking, whether using CSPLINzero for the cue estimation might be useful?

regards

I was thinking, whether using CSPLINzero for the cue estimation might be useful?

In the 2-6s ITI range, the temporal overlap between adjacent trials creates high multicollinearity when using flexible basis functions like CSPLINzero. Among various alternative methods, GLMsingle is likely an effective approach.

Gang Chen

Thank you so much for the clarification, I will check out if GLMsingle can be implemented on my dataset.

Regards