Activity estimate: found events are over-estimated (~30%) and events below the detection threshold are dropped
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 8/100
Hướng nghiên cứu
Start in dependencies/extraction/extractTrial.m, where the L1 fit on S (lambda = 0.9), the debias step (phi = 0, S ≥ 0.1 freeze), fitB and the Hs/Hfilter/validKernel footprint fit live. Reproduce the residual on the simulations and the 776266 trial first, then run the ablations listed in the plan. Done means the slap2-dev integration tests pass on both under-fit and over-fit sessions, with no regression in source counts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Revised 2026-11-24. The first version of this issue described an under-fit caused by the L1 penalty. A ground-truth test showed that is not what happens. The earlier text is in the edit history.
GIAnT's denoised activity (dF_denoised, events) has two amplitude errors:
- found events are over-estimated, by about 30% at typical sizes;
- events below a detection threshold are dropped whole.
Both matter downstream: ΔF/F0 from dF_denoised, and the F0 network's training target (movie − activity, AllenNeuralDynamics/slap2-F0-network).
Evidence
Ground-truth refit test.
- Take the saved inputs of real extraction subproblems (803121_2025-10-29 path 2 trial 1: 45 subproblems, 47 sources, 200 Hz).
- Fit each with
extractSourcesfrom main, and use that fit (baseline, footprints, activity) as the truth. - Draw new data from it under the loss's own noise model, with the real freshness pattern.
- Fit again, and compare the second fit's activity with the truth.
"Recovered" is refit activity mass over true activity mass. Event sizes are at the source's peak pixel, in the fit's normalized units; the baseline under these footprints has a median of 0.60.
| variant | recovered, median per source | found events, recovered | share of events found | F0 refit / true |
|---|---|---|---|---|
| main | 1.55 (quartiles 1.38–4.39) | 1.27–1.34 below 4 units; 1.15 at 4–8; 0.95 above 8 | 97–100% | 1.035 |
| main, true events halved | 1.31; pooled 0.68 | 1.27–1.42 below 4 units | 36–55% below 4 units | 1.056 |
| main, true events quartered | pooled 0.08 | — | 2–8% below 2 units | 0.997 |
L1 kept in the final fit (phi 1) |
0.35 | 0.37–0.40 | 64–78% | 1.035 |
| fixed variance in the debias refit | 0.99 (0.94–1.04) | 0.91–0.95; 0.82 above 8 | 94–100% | 1.035 |
| fixed variance in every S fit | 0.20 | 0.63–0.73 | 9–65% | 1.074 |
Limits. This is one session, and its subproblems touch the field edge. The truth uses GIAnT's own footprints and kernel, so the test cannot show a footprint-width or kinetics mismatch. Noise is drawn independently per sample.
Cause
- Over-estimate.
fitSminimises Σ (Z − T)² / (F·(T + 1)). Raising the model T raises the denominator, so the loss keeps falling as T grows past the truth. During the L1 fits the penalty outweighs this. In the debias refit (phi0) nothing does. The bias is largest at low counts, which is why small events gain 30% and large ones nothing. - L1 does not shrink found events. With L1 kept in the final fit, recovery is 0.35; the debias refit already removes that.
- Threshold. Events below it are dropped by the L1 fits, as designed. λ = 0.9 is tuned together with the variance term: with a fixed variance in every S fit, detection collapses.
Plan
- Test tool. The refit test becomes a script in this repository, and extraction gets an off-by-default option that saves subproblem inputs. Repeat the test on more sessions.
- Fix. In the debias refit only, compute the variance term once from the fit at its start and hold it. This becomes the default; the old behaviour stays reachable through a parameter.
- Unchanged: which events are found, the source list, footprints, F0 and
dF_ls. - Changed:
dF_denoised,eventsandSNR. Small and medium events fall by about 20–25%, large ones barely. - Accept when:
- the refit test recovers found events within ±10% at every size, on every test session;
- the ground-truth simulations are no worse in denoised correlation and event F1;
- the integration runs change only the expected outputs.
- Unchanged: which events are found, the source list, footprints, F0 and
- Decide afterwards, from the re-exported F0 training data:
- the baseline bias seen in the test (F0 3.5–5.6% high, cause not identified);
- whether footprints, which are fixed in width, are narrower than the events.
Not planned:
- changes to λ: activity below the threshold is accepted;
- joint refits to convergence;
- SNR-based supports;
- kernel changes.
Integration tests: AllenNeuralDynamics/slap2-dev#64.
- Ngôn ngữ chính
- MATLAB
- Star
- 3
- Fork
- 3
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AllenNeuralDynamics/GIAnT-MATLAB
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
AllenNeuralDynamics/GIAnT-MATLAB#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
AllenNeuralDynamics/GIAnT-MATLAB#45 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
AllenNeuralDynamics/GIAnT-MATLAB#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
AllenNeuralDynamics/GIAnT-MATLAB#41 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
AllenNeuralDynamics/GIAnT-MATLAB#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AllenNeuralDynamics/GIAnT-MATLAB
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
UniprJRC/DSwithMATLAB#255 ·
-
Bump ODEInterface_jll to rebuilt 0.0.2+2 (execstack fix) in 8 benchmark folder ManifestsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
SciML/SciMLBenchmarks.jl#2044 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MohammadRaziei/ctoon#12 ·
-
easy first-contributor first-contributors good first issue help wanted matlab up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
fork-commit-merge/fork-commit-merge#8766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100