I am really proud to get an opportunity of working with the **DIPY** team of the **Python Software Foundation **as a **Google Summer of Code** Candidate.

Things I will be working on and writing about in the upcoming weeks:

- Non-Linear Optimization
- Model Fitting
- Stochastic Methods and Machine Learning
- Neuroscience using Python

**DIPY** is a **free** and **open source** software project for computational neuroanatomy, focusing mainly on **diffusion** *magnetic resonance imaging* (dMRI) analysis. It implements a broad range of algorithms for denoising, registration, reconstruction, tracking, clustering, visualization, and statistical analysis of MRI data.

## Magnetic resonance imaging (MRI)… in 5 Lines:

MRI uses the body’s natural magnetic properties for imaging purposes. It makes use of the Hydrogen nucleus (a single proton) due to its abundance in water and fat: H+. When the body is placed in a strong magnetic field of the MRI, the protons’ axes all line up. This uniform alignment creates a magnetic vector oriented along the axis of the MRI scanner.

I feel that Neuroscience being closely tied to and having formed foundations in* Hebbian and Boltzmann paradigms of Statistical Learning* forms an extremely important component AI research from a variety of standpoints, a crucial one being

**connectivity**. MRI has facilitated understanding brain mechanisms by getting and analyzing this ‘Brain Data’ and will be working on one such technique called

**‘Microstructure Imaging of Crossings’**.

Diffusion MRI **measures water diffusion** in biological tissue, which can be used to probe its microstructure. The most common model for water diffusion in tissue is the diffusion tensor (DT), which **assumes a Gaussian distribution**. This assumption of Gaussian diffusion oversimplifies the diffusive behavior of water in complex media, and** is known experimentally to break down for relatively large b-values**. DT derived indices, such as mean diffusivity or fractional anisotropy, can correlate with major tissue damage, but lack sensitivity and specificity to subtle pathological changes.

**Microstructure Imaging of Crossing (MIX) **is a versatile and thus suitable to a broad range of generic multicompartment models, in particular for brain areas where axonal pathways cross**. **

These **‘multicompartment models’ assess the variability of subvoxel regions** by enabling* *the estimation of more specific indices, such as axon diameter, density, orientation, and permeability, and so potentially give much greater insight into tissue architecture and sensitivity to pathology.

**Goal of Model Fitting:**

We want to **identify which model compartments are essential to explain the data **and **parameters** that are potentially estimable from a particular experiment and compare the models to each other using the **Bayesian Information Criterion (BIC)** or any other Model Selection Criterion (TIC, Cp, etc.)**, ranking them in order of how well they explain data acquired**.

This requires a novel regression method, which is robust and versatile. It enables to **fit existing biophysical models with improved accuracy **by utilizing the **Variable Separation Method (VSM)** to distinguish parameters that enter in both, linear and non-linear manner, in the model. The estimation of non-linear parameters is a non-convex problem and is handled first. This is **done by stochastic search that utilizes Genetic Algorithms (GA)** since GAs are **effective in approximating exponential time series models.** The task to estimate linear parameters amounts to a convex problem and can be solved using standard least squares techniques. These parameter estimates provide a starting point for a Trust Region method in search for a refined solution.

**4 Steps involved in Implementing MIX:**

**Step 1 – Variable Separation:** The objective function has a separable structure which can be exploited to separate the variables by variable separation method. We can rewrite our objective function as a projection using the Moore-Penrose Inverse (Pseudoinverse) and get the variable projection functional.

**Step 2 – Stochastic search for non-linear parameters ‘x’:** The objective function is non-convex, particularly of non-linear least-square form. Any gradient based method employed to estimate the parameters will have critical dependence on a good starting point, which is unknown. Alternative approach can be regular grid search, which is time consuming and adds computational burden. This particular type of problem therefore points towards considering stochastic search methods like GA. In case of time series analysis, GA can be used efficiently for sum of exponential functions. GA parameters can be varied for each selected biophysical model and time complexity may change with each choice. (GA method: Elitism based).

**Step 3 – Constrained search for linear parameters ‘f ’:** After estimating the parameters ‘x’, estimation of linear parameters ‘f ’ is a constrained linear least-squares estimation problem.

**Step 4 – Non-Linear Least Squares Estimation using Trust Region Method:** Step 2 and step 3 give a reliable initial guess of both ‘x’ and ‘f ’ by applying Trust Region method. This basically is an unconstrained optimization method for a region around the current search point, where the quadratic model for local minimization is* “trusted”* to be correct and steps are chosen to stay within this region. The size of the region is modified during the search, based on how well the model agrees with actual function evaluations: where GAs kick in.

References:

[1] Farooq, H., Xu, J., Nam, J. W., Keefe, D. F., Yacoub, E., Georgiou, T., & Lenglet, C. (2016). Microstructure Imaging of Crossing (MIX) White Matter Fibers from diffusion MRI. Scientific Reports, 6(September), 1–9. https://doi.org/10.1038/srep38927

[2] Ferizi, U., Schneider, T., Panagiotaki, E., Nedjati-Gilani, G., Zhang, H., Wheeler-Kingshott, C. A. M., & Alexander, D. C. (2014). A ranking of diffusion MRI compartment models with in vivo human brain data. Magnetic Resonance in Medicine, 72(6), 1785–1792. https://doi.org/10.1002/mrm.25080

[3] Farooq, H., Xu, J., Nam, J. W., Keefe, D. F., Yacoub, E., & Lenglet, C. (n.d.). Microstructure Imaging of Crossing ( MIX ) White Matter Fibers from diffusion MRI Supplementary Note 1 : Tissue Compartment Model Functions, (Mix), 1–18.

[4] Manuscript, A., & Magnitude, S. (2013). NIH Public Access, 31(9), 1713–1723. https://doi.org/10.1109/TMI.2012.2196707

With thanks! Valuable information!