
Online learning of the transfer matrix of dynamic scattering media: wavefront shaping
meets multidimensional time series
Lorenzo Valzania1, ∗and Sylvain Gigan1, ∗
1Laboratoire Kastler Brossel, ´
Ecole Normale Sup´erieure - Paris Sciences et Lettres (PSL) Research University,
Sorbonne Universit´e, Centre National de la Recherche Scientifique (CNRS) UMR 8552,
Coll`ege de France, 24 rue Lhomond, 75005 Paris, France
(Dated: October 11, 2022)
Thanks to the latest advancements in wavefront shaping, optical methods have proven crucial to
achieve imaging and control light in multiply scattering media, like biological tissues. However,
the stability times of living biological specimens often prevent such methods from gaining insights
into relevant functioning mechanisms in cellular and organ systems. Here we present a recursive
and online optimization routine, borrowed from time series analysis, to optimally track the transfer
matrix of dynamic scattering media over arbitrarily long timescales. While preserving the advantages
of both optimization-based routines and transfer-matrix measurements, it operates in a memory-
efficient manner. Because it can be readily implemented in existing wavefront shaping setups,
featuring amplitude and/or phase modulation and phase-resolved or intensity-only acquisition, it
paves the way for efficient optical investigations of living biological specimens.
I. INTRODUCTION
Optical methods are an irreplaceable tool to investi-
gate biological media. They deliver images at numer-
ous contrast mechanisms [1], and can activate injected
biomolecules [2] and fluorescent markers [3]. However,
precisely delivering light in space and time through bio-
logical tissues is not straightforward, as photons get mul-
tiply scattered by heterogeneities of tissues, limiting their
penetration depth [4].
Another current challenge lies in tracking the scat-
tering behaviour of living specimens, with decorrelation
times up to only a few ms [5]. This proves crucial to
understand the functioning mechanisms of cells and or-
ganisms, which requires their observation at extremely
different timescales, from nanoseconds (at a molecular
level) to minutes (for organ systems) [6]. The need for
fast data acquisitions results, in turn, in measurements
with inherently low signal-to-noise ratios, and requires
solving long and multidimensional time series [7], whose
prohibitive size can make their evaluation problematic.
Wavefront shaping techniques have established them-
selves as the tools of choice to guide light in scattering
media [8]. The transmission of arbitrary fields [9], point-
spread-function (PSF) engineering [10], imaging [11], as
well as tuning energy transmission through scattering
media [12], become all accessible if the transfer matrix of
the medium is measured [8, 13]. However, conventional
methods to retrieve the transfer matrix yield sub-optimal
solutions in noisy environments [8]. Those optimization
routines which can compensate for noise in the trans-
fer matrix [14], however, require storing in memory the
whole history of past measurements, making them un-
suited with long streams of data.
∗Correspondence to: lorenzo.valzania1@gmail.com,
sylvain.gigan@lkb.ens.fr
Iterative, optimization-based, sequential algorithms to
focus through scattering media yield an increase in the
focus intensity already at their early iterations, which
makes them the preferred option on dynamic media. Im-
portantly, they are cast as recursive procedures, i.e.,
computing the new estimate of the solution only requires
the previous estimate and the new data point. Unfortu-
nately, their stochastic nature makes optimization over a
set of output modes less reliable and the transmission of
arbitrary fields prohibitive. Moreover, these procedures
rely on maximizing a given metric, limiting light control
to one predefined task. Various implementations derived
from genetic algorithms [15, 16] have shown better re-
silience to noise than sequential algorithms, however at
the cost of a higher computational complexity and careful
choice of several adjustable parameters.
In signal processing, communications and finance,
where most datasets are multidimensional time series,
the recursive least-squares (RLS) algorithm has played a
central role for system identification and prediction [17–
19]. It allows optimal learning of linear predictors in an
online manner—predictors are updated every time a new
piece of data is sequentially made available, however past
data do not need to be stored in memory. Consequently,
its computational complexity is independent of the length
of the time series, so iterations can be run over and over,
ideally at the same rate as data acquisition (real-time
operation).
Here, we demonstrate that the RLS algorithm repre-
sents a valuable tool to optimally estimate the transfer
matrix of dynamic scattering media online and recur-
sively. The least-squares optimization ensures resilience
to noise. The algorithm is provided with a tunable mem-
ory, such that the dynamics of the scattering medium is
accounted for. By doing so only the most reliable data
points, i.e., those acquired within the stability time of
the medium, are used during the optimization. We jus-
tify how the RLS model can fit a wide variety of dy-
namic mechanisms happening in scattering media. Its
arXiv:2210.04033v1 [physics.optics] 8 Oct 2022