# Using Automatic Differentiation for the Minimal p-Norm Solution of the Biomagnetic Inverse Problem.

## Keywords

## Abstract

Given the measurements of a magnetic field induced by the electrical activity of the brain, the mathematical model to localize the electrical activity on the human cortex is given by an inverse problem. The minimum-norm approach is among the common reconstruction techniques to localize the brain activity. Here, the standard approach is to minimize the Euclidean norm of the current distribution of the underlying dipole moments. A generalization from the Euclidean norm to general p-norms with 1 < p leq 2 is attractive because the reconstructions appear more focal as p approaches 1. Rather than using reweighted least-squares algorithms with their potential numerical instabilities, a gradient-based optimization algorithm is investigated. More precisely, a Newton-type algorithm is used where the required gradient of the cost function is either accurately computed by automatic differentiation or approximated by finite differences. Numerical results are reported illustrating that accurate gradients computed by the so-called reverse mode of automatic differentiation are more efficient than approximations based on finite differences.