Advice for reducing false positives from LUPIN?
维护者通常 2 天内回复
@yger 已经在做这个了。
开始于 2026年10月6日。
评估
调研方向
Start by reproducing the false positives with the stricter detection, SNR, and jitter settings described in the issue, comparing sorter output with Phy and bombcell. Then inspect the OMP matching logic in src/spikeinterface/sortingcomponents/matching/circus.py around line 415, including the cond_1 and amplitude bounds. Done means identifying a supported cause or producing a justified parameter or algorithm change.
由索引模型根据 Issue 内容生成。
描述
Hi all — I'm doing some recordings from a very quiet part of the midbrain, and testing out LUPIN vs. KS4. They seem to detect similar "good" units (as assessed by bombcell -> scmp.compare_two_sorters) which feels good. However, they differ quite a bit in MUA. KS4 seems to be over-merging spikes into large multi-unit clusters with unreasonably high firing rates (> 100 Hz, when the "good" units nearby are more like 5-20 Hz). Lupin seems to be doing better at identifying "multi-unit" clusters that are, in fact, almost single units, but which, due to some combination of low firing rates + moderate noise from chronic recordings in freely moving animals (~30-40 uV ptp), are still somewhat contaminated.
Here's an example of Lupin's output with the default settings:
I exported some of my data to Phy to look more closely at what's going on with all these multi-units. (I pre-processed the exported traces the same as the ones I used for sorting, excluding whitening.) I noticed that a lot of the "spikes" in the multi-unit clusters didn't really look like spikes at all, and were in fact just noise. So I tried using slightly more stringent parameters for initial spike detection and cleaning:
"detect_threshold": 6.0, # default is 5
"template_min_snr_ptp": 5.0, # default is 4
"template_max_jitter_ms": 0.1, # default is 0.2
This did help a bit, both to reduce the number of MUA units and it made the traces look a bit more realistic on Phy.
However, some of the "spikes" in the data are still very unconvincing. Here are two screen recordings from two random units I picked to look at in Phy from this second, more stringent round of sorting:
https://github.com/user-attachments/assets/b99359b1-6a0a-46a4-954c-9ffee9dcc296
https://github.com/user-attachments/assets/8a7f7ce9-e215-454b-9556-76f05d0adaf1
Sometimes it seems like there are noise fluctuations that could conceivably be mistaken for spikes, but in other instances, I really can't see what the sorter was seeing (maybe looking at the whitened traces would be informative..?).
I'm going to additionally try making template_radius_um and template_sparsify_threshold a bit more stringent, so that there's fewer low-SNR channels in each template, but I don't expect that to fully solve the problem.
I was also thinking of looking at the following in the OMP template matching step, since that's the step where the output spike times are actually calculated:
- make the initial
cond_1a bit more stringent so as to not let poorly matched peaks in in the first place (is there something important about 0.25 or is it just trying to make sure to not miss spikes?)(https://github.com/SpikeInterface/spikeinterface/blob/6976a6d0b25d7804944337d5be59b9b60a4fcf92/src/spikeinterface/sortingcomponents/matching/circus.py#L415) - make the "amplitudes" bounds for the final cut-off a bit more stringent (ie 0.7 or 0.8)
- changing the rank of the SVD used to make the scalar products
Let me know if you all have other ideas or thoughts about a different way to proceed. Thanks!
- 主要语言
- Python
- 星标
- 883
- 派生
- 291
- 平均合并
- 3 天 17 小时
- 30 天内合并 PR
- 40
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SpikeInterface/spikeinterface 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
SpikeInterface/spikeinterface#5008 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
SpikeInterface/spikeinterface#5007 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
SpikeInterface/spikeinterface#5006 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
SpikeInterface/spikeinterface#5005 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
SpikeInterface/spikeinterface#5004 ·
维护者通常 2 天内回复
查看 SpikeInterface/spikeinterface 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 69/100
daniel-ospina/tortoise#15308 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
difficulty:easy prio:low type:bug
难度 2/5 1-3 小时 新手友好度 72/100
NatronGitHub/Natron#2405 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
Jstar269/nakagawa-recomp#3746 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复