Skip to content

Model overview

Pengcheng Zhou edited this page Sep 26, 2017 · 1 revision

Matrix factorization

In general, there are two main approaches for processing calcium imaging data: ROI analysis and matrix factorization approaches. The former is the classical way. It basically identifies neuron ROIs first and then takes the mean fluorescence signals within the ROIs as estimations of neural activity. The latter is uses a machine learning approach to tackle the problem by utilizing the observation that the spatiotemporal calcium activity can be approximated as a product of two matrices: a spatial matrix that encodes the location of each neuron in the optical field, and a temporal matrix that characterizes the calcium concentration evolution of each neuron.

In the simplest form, the matrix factorization can be written as

Y = AC

Where Y is a two dimenstional matrix (pixels X frames, i.e., spatital X temporal) representing the recorded video data, A is the spatial matrix representing neurons' spatial footprints and C is the temporal matrix containing all neurons' activity. By adding constraints to A and C, we can factorize Y into the product of A and C, where are exactly what we want by processing the video data: neuron shapes and neuron activities.

To our knowledge, the first method that based on matrix factorization approach is PCA/ICA method [1]. Later there were several other variants that use more realistic or stronger constraints. Among them, Constrained nonnegative matrix factorization (CNMF) [2] is the one that widely used. Our CNMF-E [3] is also an extension of CNMF.

CNMF framework

CNMF framework is very general for modeling calcium imaging data. Here we briefly describe the model and details can be found in the original paper [2].

Mathematically, the model can be summarized as an equation

Y = AC + B + E

plus several constraints:

  • A, the spatial matrix of all neurons, is localized, connected and sparse
  • C, the temporal matrix of all neurons, is constrained by calcium dynamics
  • B, the background fluctuations, is modeled as low-rank matrix
  • E, the noise matrix, is modeled as spatially and temporally i.i.d.

Although the model is general, the practical implementations require following key things:

  • realistic constraints to A, C
  • a model of B. This is extremely important when the background is much larger than neural signal AC. In the original CNMF paper [2], B is modeled as a rank NMF matrix B = bf
  • an algorithm for initialization. Since estimating A and C by solving a matrix factorization problem is in general nonconvex, which relies on good initialization for fast convergence and accurate final results.
  • well designed algorithm for solving the optimization problem.

Background models

In our implementation of CNMF-E, we included three background models:

  1. NMF
  2. SVD
  3. ring model

The first two are very similar, which models the background as a low-rank matrix, though the selection of background rank is pretty arbitrary. If the selected rank is not high enough, then the background is not sufficiently modeled and the residual will contaminate the extraction of neural signals; If the rank is too large, then some neural signals could be potentially absorbed by the background.

To solve this problem, we developed a ring model [3] for solving this trade-off. It is based on the observation that the background has a large spatial smoothness than neurons, i.e., the background sources have large spatial ranges than neurons. So we model the background fluctuation at each pixel as a linear combination of the fluctuations of all pixels locating on its surrounding ring. The ring diameter is selected to be larger than neuron diameters. Thus the pixel in the center shares the common background fluctuations with the pixels on the ring, but they don't share the same neural signals. Mathematically, the ring model can be summarized as

B = B_f + b_01^T B_f = WB_f

here, b_0 is the constant baselines for all pixels.

references

[1] Mukamel, E.A., Nimmerjahn, A. and Schnitzer, M.J., 2009. Automated analysis of cellular signals from large-scale calcium imaging data. Neuron, 63(6), pp.747-760. [2] Pnevmatikakis, E.A., Soudry, D., Gao, Y., Machado, T.A., Merel, J., Pfau, D., Reardon, T., Mu, Y., Lacefield, C., Yang, W. and Ahrens, M., 2016. Simultaneous denoising, deconvolution, and demixing of calcium imaging data. Neuron, 89(2), pp.285-299. [3] Zhou, P., Resendez, S.L., Stuber, G.D., Kass, R.E. and Paninski, L., 2016. Efficient and accurate extraction of in vivo calcium signals from microendoscopic video data. arXiv preprint arXiv:1605.07266.

Clone this wiki locally