You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LCMV beamformer is still lacking the option of leadfield normalization, see #5365 and #4659.
The DICS beamformer has two options of leadfield normalization implemented, column wise or Frobenius norm. Leadfield normalization is controlled by the parameter normalized_fwd, while the type of leadfield normalization is controlled by inversion, which also controls the inversion during the computation of the spatial filter itself.
This issue is to serve as a discussion point for how we want to implement the leadfield normalization in LCMV and whether those options should remain like that in DICS.
I personally don't see a point in normalizing the leadfield for the LCMV, as the beamformer works perfectly fine already. Do we have an actual use case for this?
The normalization strategy is linked to the inversion method in the DICS, because behind it all is the notion of either the beamformer treats each XYZ dipole group as one equivalent current dipole (ECD) (inversion='matrix') or, as three individual dipoles (inversion='single'). The normalization of the leadfield will make the same assumption as the inversion strategy: either the dipoles are treated as a group (Frobenius norm) or separately (column wise normalization). Again, I personally don't have any use case when I wanted the inversion method in one way and the normalization in another and advice only implementing the possibility when a use case does arise.
@wmvanvliet I am not sure I agree with you here. LCMV and DICS are conceptually very similar. The reason for doing leadfield normalization is to avoid depth bias if no noise normalization eg with NAI is performed. It's I think necessary for the unit-gain option in LCMV if you want to get something meaningful (@britta-wstnr you correct me if I am wrong).
Now regarding the option inversion you added in DICS I don't know if this was published before and if you do a simulation or use a phantom data you would be able to properly recover the orientation of the dipole. Can you reassure me on this? maybe using a simulation or taking any of our phantom dataset?
Finally why would it make sense to have these options in DICS and not in LCMV?
thanks @wmvanvliet for any clarification. I am trying to wrap my head around beamformer variants.
Yes. But in practice, the CSD behaves a little different from a cov. matrix, which is why with DICS, we have different defaults.
The reason for doing leadfield normalization is to avoid depth bias if no noise normalization eg with NAI is performed.
Yes. But why not just perform NAI? Seems to work great. I don't know if leadfield normalization adds any value over NAI, let alone in what cases.
Can you reassure me on this?
No. I'm not an expert on beamforming at all and only started dabbling in it last year when I've implemented Jan Kujala's pipeline. The reason for the extra DICS options is to copy the pipeline that has been in use for 15 years in our group (not by me personally, I've never ran extensive simulations myself). In my own limited experiments, these options indeed seem to work very well for the DICS beamformer and I'm going with the group's experience that these options make sense.
Maybe using a simulation or taking any of our phantom dataset?
Yes, a 1000x times this. We need to do this! Maybe this summer we'll have a summer-student who wants to take a crack at it. Or perhaps it could be done during the hackathon? (there is a small chance I'll be there to help out, but nothing is certain)
But in the meantime, why add even more options with little proof that they add any value?
Re-reading #4659, am I correct that fieldtrip also normalized the leadfield in the LCMV beamformer? If so, that actually could be a reason to add the option to MNE-Python as well.
@agramfort is right, leadfield normalization is crucial with unit-gain LCMVs (if no condition contrast is done) since otherwise there is a strong bias to the head center in the output (the output is basically meaningless). So yes, we do need this option in case someone wants to run the unit-gain and not the unit-noise-gain variant of the LCMV.
I am personally not aware of publications on those inversion options for the LCMV, so I would be hesitant to implement them there without exhaustive testing.
Seems there are strong reasons for having this option. I was just unaware of them, sorry for that. Ok, let's go implement the option then, shouldn't take much effort now that the code paths have merged a lot.
I actually started working on it a bit already, and the thing we should discuss first is how we deal with normalize_fwd and inversion across DISC and LCMV to have a consistent API.
Not sure if we will need the inversion parameter in LCMV at all.
One option discussed with @agramfort before could be to make leadfield normalization automatic for unit-gain LCMV to avoid adding parameters altogether - I might be +0.5 for this since the user might want to control it ... ?
I see 3 actions to take here:
- make a case for the inversion parameter in beamformer showing it's
actually needed and that it returns both correct results in simulations. If
inversion='single' does not on simulations I would suggest to remove this
option in a next release.
- add support for different channel types in DICS as it was done in earlier
released versions.
- add normalize_fwd option to lcmv (explicitely or implicitely) when using
unit-gain option.
do I missed something?
Simulations were ran in our lab (years ago and I don't have access to them) on the inverse='single' vs inverse='matrix' case. For DICS, inverse='single' was more stable. I'm all for redoing the simulations, especially on phantom data, to reproduce this result.
I've started looking into using the new unified _prepare_forward for leadfield normalization (#5947) in LCMV and DICS. In theory it should reduce code duplication and put all our leadfield normalization code in one place.
One other thing I noticed, though, is that proj is applied with potentially more channels in the forward operator than it is to Cm:
proj, ncomp, _ = make_projector(info['projs'], fwd_ch_names)
if info['projs']:
G = np.dot(proj, G)
G = G[picks_forward]
proj = proj[np.ix_(picks_forward, picks_forward)]
This reduced proj is returned by _prepare_beamformer_input, and then applied with Cm = np.dot(proj, np.dot(Cm, proj.T)) (at least for LCMV).
It seems a bit weird to apply one operator to G, then a subselected one to Cm. Simplifying it to the following, which is more consistent with what (implicitly) happens in the minimum norm and mixed norm code:
Activity
wmvanvliet commentedon Jan 27, 2019
I personally don't see a point in normalizing the leadfield for the LCMV, as the beamformer works perfectly fine already. Do we have an actual use case for this?
The normalization strategy is linked to the inversion method in the DICS, because behind it all is the notion of either the beamformer treats each XYZ dipole group as one equivalent current dipole (ECD) (
inversion='matrix') or, as three individual dipoles (inversion='single'). The normalization of the leadfield will make the same assumption as the inversion strategy: either the dipoles are treated as a group (Frobenius norm) or separately (column wise normalization). Again, I personally don't have any use case when I wanted the inversion method in one way and the normalization in another and advice only implementing the possibility when a use case does arise.agramfort commentedon Jan 27, 2019
@wmvanvliet I am not sure I agree with you here. LCMV and DICS are conceptually very similar. The reason for doing leadfield normalization is to avoid depth bias if no noise normalization eg with NAI is performed. It's I think necessary for the unit-gain option in LCMV if you want to get something meaningful (@britta-wstnr you correct me if I am wrong).
Now regarding the option
inversionyou added in DICS I don't know if this was published before and if you do a simulation or use a phantom data you would be able to properly recover the orientation of the dipole. Can you reassure me on this? maybe using a simulation or taking any of our phantom dataset?Finally why would it make sense to have these options in DICS and not in LCMV?
thanks @wmvanvliet for any clarification. I am trying to wrap my head around beamformer variants.
wmvanvliet commentedon Jan 27, 2019
Yes. But in practice, the CSD behaves a little different from a cov. matrix, which is why with DICS, we have different defaults.
Yes. But why not just perform NAI? Seems to work great. I don't know if leadfield normalization adds any value over NAI, let alone in what cases.
No. I'm not an expert on beamforming at all and only started dabbling in it last year when I've implemented Jan Kujala's pipeline. The reason for the extra DICS options is to copy the pipeline that has been in use for 15 years in our group (not by me personally, I've never ran extensive simulations myself). In my own limited experiments, these options indeed seem to work very well for the DICS beamformer and I'm going with the group's experience that these options make sense.
Yes, a 1000x times this. We need to do this! Maybe this summer we'll have a summer-student who wants to take a crack at it. Or perhaps it could be done during the hackathon? (there is a small chance I'll be there to help out, but nothing is certain)
But in the meantime, why add even more options with little proof that they add any value?
wmvanvliet commentedon Jan 27, 2019
Re-reading #4659, am I correct that fieldtrip also normalized the leadfield in the LCMV beamformer? If so, that actually could be a reason to add the option to MNE-Python as well.
britta-wstnr commentedon Jan 27, 2019
@agramfort is right, leadfield normalization is crucial with unit-gain LCMVs (if no condition contrast is done) since otherwise there is a strong bias to the head center in the output (the output is basically meaningless). So yes, we do need this option in case someone wants to run the unit-gain and not the unit-noise-gain variant of the LCMV.
I am personally not aware of publications on those
inversionoptions for the LCMV, so I would be hesitant to implement them there without exhaustive testing.wmvanvliet commentedon Jan 27, 2019
Seems there are strong reasons for having this option. I was just unaware of them, sorry for that. Ok, let's go implement the option then, shouldn't take much effort now that the code paths have merged a lot.
britta-wstnr commentedon Jan 27, 2019
I actually started working on it a bit already, and the thing we should discuss first is how we deal with
normalize_fwdandinversionacross DISC and LCMV to have a consistent API.Not sure if we will need the
inversionparameter in LCMV at all.One option discussed with @agramfort before could be to make leadfield normalization automatic for unit-gain LCMV to avoid adding parameters altogether - I might be +0.5 for this since the user might want to control it ... ?
agramfort commentedon Jan 28, 2019
wmvanvliet commentedon Jan 28, 2019
I'd rather you not remove an option that is actively used by at least three people in our lab and features in our Frontiers paper.
wmvanvliet commentedon Jan 28, 2019
Unless it is demonstrated with hard evidence that it is indeed erroneous.
wmvanvliet commentedon Jan 28, 2019
Simulations were ran in our lab (years ago and I don't have access to them) on the
inverse='single'vsinverse='matrix'case. For DICS,inverse='single'was more stable. I'm all for redoing the simulations, especially on phantom data, to reproduce this result.agramfort commentedon Jan 28, 2019
britta-wstnr commentedon Jan 30, 2019
Then let's wait with LCMV forward model normalization until we have those tests?
agramfort commentedon Jan 30, 2019
larsoner commentedon Feb 21, 2019
I've started looking into using the new unified
_prepare_forwardfor leadfield normalization (#5947) in LCMV and DICS. In theory it should reduce code duplication and put all our leadfield normalization code in one place.One other thing I noticed, though, is that
projis applied with potentially more channels in the forward operator than it is toCm:This reduced
projis returned by_prepare_beamformer_input, and then applied withCm = np.dot(proj, np.dot(Cm, proj.T))(at least for LCMV).It seems a bit weird to apply one operator to G, then a subselected one to Cm. Simplifying it to the following, which is more consistent with what (implicitly) happens in the minimum norm and mixed norm code:
At least does not break any tests. @britta-wstnr is this change okay for you?