Machine learning method to measure the transmission matrix of a multimode optical fiber without reference beam for 3D beam tailoring

We report a new reference-free method for measuring the complex Transmission Matrix (TM) of a Multimode Fiber (MMF), without the need of an interferometric setup, employing a two-step supervised machine learning framework. By using a deformable mirror at the proximal end of the MMF, and a camera at its distal end, we first retrieve the TM of the MMF that predicts the intensity pattern of the output beam. In a second step, with only some random additional images of the output far field, the TM is corrected to predict the true complex field at the distal end of the MMF. We experimentally validate our method by controlling the output optical field from a standard 50/125 step-index multimode fiber with 140 LP modes per polarization, using a segmented deformable mirror of 952 actuators at 1064 nm. We demonstrate the validity of the retrieved complex transmission matrix by tailoring the laser beam from the MMF simultaneously at two distal planes. These results open new avenues for complete control of the optical field using solely intensity measurements, which could be of major interest for endoscopic or telecommunication applications.


INTRODUCTION
The precise manipulation of light in multimode optical fibers (MMFs) is the cornerstone of many applications in telecommunications and medical imaging.Even if the coherent field from an MMF appears to have a random structure (speckle), this is actually a deterministic distribution, resulting from a linear transform of the excited field described by modes propagation in the fiber.It is therefore possible to control the interference pattern at the MMF output by precompensating the wavefront of the laser field seeding the fiber with a spatial light modulator (SLM), or a digital micromirror device (DMD).This coherent control has opened up new perspectives for MMFs [1] and expanded their fields of application, such as in optical telecommunications [2][3][4], bio-imaging [5][6][7], spectroscopy [8], quantum signal processing [9] or laser sources [10].To shape a laser beam from an MMF, there are four main types of processes: digital phaseconjugation [11], adaptive control in a feedback loop [12], neural networks (NN) for image propagation [13][14][15], or modal decomposition [16] and transmission matrix (TM) measurement [17,18].
The TM of the MMF describes the relationship between the coherent fields on the SLM and at the fiber output, i.e. from the actuators of the SLM to the pixels of the camera imaging the end facet of the MMF.Then, using the inverted TM, one can theoretically synthesize complex fields on demand at the fiber output, that are linear combinations of the fiber modes.Usually, an interferometric setup with a reference beam is used to retrieve the phase of the output beam to build the TM [5].This method is difficult to implement, in particular when measuring the TM of a long MMF due to coherence length constraints.Thus, different works have proposed to measure this TM without any reference beam, only from a set of output intensity patterns obtained with different input wavefronts, using optimization algorithms [19][20][21].In most of these approaches, the TM learnt thanks to a set of speckled patterns at the MMF output can only predict and tailor intensity patterns in this target plane.Indeed, as the TM's rows are independently optimized, there exists an unknown and random phase bias between them.Very recently, J. Zhong et al [22] used a set of additional measurements taken in a Fresnel plane of the fiber output to recover and correct the phase bias.Thus, they demonstrated focusing in different planes at the fiber exit after phase bias correction.Recovery of the complex TM from intensity-only images was also demonstrated in 2022 thanks to a transformer NN that managed a small number of modes (~5 LP modes) [16].This manuscript presents an innovative method that uses machine learning capabilities to measure the complex transmission matrix of highly multimode MMFs in a reference-free manner, with high-fidelity and no phase bias, a task that has long posed significant challenges in this field.Our approach, inspired by the transformative power of machine learning in various scientific fields, aims to transcend these limitations.Using a two-step supervised learning algorithm, our method analyzes the relationship between input wavefronts and output speckle patterns, effectively predicting the behavior of light as it propagates through the MMF.The high-fidelity TM measured with our method also offers the ability to deliver controlled 3D coherent fields at the fiber distal end instead of 2D intensity patterns with remaining phase errors as commonly reported.The performances of the method are evaluated through speckle correlations between experimental measurements and images in two specific planes (output fiber plane and its corresponding far field) given by the predicted TM.
Our research is based on experimental validation using a standard 50/125 core/clad step-index MMF.These experiments accentuate the accuracy and practicality of our machine learning-based approach, setting a new benchmark in the field.By offering a more efficient and less cumbersome alternative to standard interferometric measurement methods, this study not only addresses a long-standing challenge in fiber optics technology, but also opens up new avenues of exploration and application.

EXPERIMENTAL SETUP
The experimental setup is schematically described on Figure 1.The laser source is a distributed feedback laser diode operating in the CW regime at 1064nm (QDLaser QLD1061).The MMF is a standard step-index fiber (50/125µm core/clad diameters, 0.22 numerical aperture, 1.5m long, 140 LP modes per polarization).The laser beam with a Gaussian profile || is expanded using a first afocal system, linearly polarized, and reflected on a segmented deformable mirror (Boston Micromachines Corporation, Kilo-CS-0.6-SLM).The deformable mirror modulates the wavefront () of the Gaussian beam using  = 952 actuators.The phase-modulated input field  ∈   is reduced with a second afocal system, and then coupled at the proximal end of the MMF.The MMF is lying on an optical breadboard, in a laboratory environment, with no particular care taken to stabilize it.The optical field at the distal end of the MMF is expanded using a third afocal system, and linearly polarized.We denote the polarized complex optical field at the distal end of the MMF as  ∈   .Since the physical system involved here is linear, the transmission matrix  ∈  × connects the proximal input field  to the distal output field  by the relation  = .Each 2D complex field or intensity is implicitly reshaped as a 1D vector to match that relationship.Given the linear polarizers placed at both the proximal and the distal ends of the MMF, only one linear polarization is considered in this experiment.Then, the distal field  is split into two parts using a beam splitter.Its intensity || 2 (near field) is measured on the transmitted part, using a first camera with a  = 256 × 256 pixels ROI.A lens is placed on the reflected part, so that the optical Fourier transform of , here denoted , is accessible at its focal plane.A second camera with a 512 × 512 pixels ROI gives access to the farfield intensity measurement || 2 .Both cameras are from Thorlabs (ThorCam CS2100), and provide 16-bit monochrome images.

TRANSMISSION MATRIX MEASUREMENT
The dataset  = {, || 2 } is obtained by applying   = 17340 random phase maps on the DM ( ∈  ×  ), and by measuring the corresponding distal speckle intensities (|| 2 ∈  * + ×  ) on the camera CMOS1.The dataset is acquired at a low frequency rate of 11Hz, limited by the in/out access of the non-triggered camera and DM devices.This dataset is randomly shuffled, and split into two subsets: a training set, and a validation set.The split ratio is 80/20, thus the training set contains  = 13872 data, whereas the validation set contains the remaining data.This training set length corresponds to  = / = 14.5 times the number of actuators, for which preliminary numerical studies have shown that our method gives accurate complex fields predictions.Then, these subsets are used to feed a supervised machine learning algorithm.We employ a mini-batch gradient descent algorithm with Adaptive Moment Estimation (ADAM), to minimize the error  1 (|  | 2 , || 2 ) between the predicted intensities |  | 2 = |  | 2 , and the measured intensities || 2 , where   ∈  × are the weights to be optimized.The cost function  1 is expressed as: Figure 2.a shows that the cost function  1 needs about 15 epochs to converge with a 256-mini-batch size and a learning rate starting at 0.3, to reach a value of about 15 on both the training and the validation subsets.The learning rate is automatically reduced by a factor of 3 whenever the error on the validation set is not decreasing for 2 epochs, which is why the decrease is not strictly monotonous.The gap between both curves is negligible and remains constant once convergence is reached.This indicates that there is no overfitting, and that the learnt coefficients generalize well to unforeseen data.To further quantify the quality of the intensity predictions, we computed the Pearson Correlation Coefficient (PCC) Γ(|  | 2 , || 2 ) between the predicted and the measured intensities among the validation dataset (see the general definition of Γ given by equation ( 2)).The corresponding Γ distribution is shown on Figure 2.b (blue bars).It depicts a high median (99.1%) and a low standard deviation (0.6%), and reveals how accurate the intensity predictions are.The function Γ stands for the PCC, and is expressed as: Where  and  are generic real-or complex-valued n-dimensional tensors, (⋅) is a matrix vectorization, and (⋅) ̅̅̅̅ is the arithmetic mean.The accuracy of the near field intensity prediction is highlighted with an example from the validation dataset (figures 3.a and 3.c).However, the phase prediction is incorrect.Indeed, the single intensity constraint used to learn   does not allow retrieving the true matrix .Any additional phase bias  ∈ [−; +[  between the rows of   produces the same output intensity pattern, as shown by the following equality: |  | 2 = |  | 2 = |(())  | 2 , where the operator (⋅) is a square diagonal matrix from a vector argument.This is illustrated on to bottom row of figure 3, where the far field intensity predicted from the model   (figure 3.d) does not match with the measured far field intensity (figure 3.f).We remove this phase ambiguity by performing a few additional, phase-dependent intensity measurements.We achieve this by measuring a second dataset of small size,   = {  , |  | 2 } made of   = 30 ≪  additional random phase maps on the DM (  ∈  ×  ), and the corresponding intensities measured on a second camera (CMOS2) in the Fourier plane  of the output of the MMF (|  | 2 ∈  * + ×  ).This small dataset feeds a second gradient descent algorithm which minimizes the error between the predicted and the measured Fourier intensities using ADAM.The algorithm aims at finding the bias vector  that minimizes the cost function

3D BEAM TAILORING
To further demonstrate that our method fully characterizes the true TM   of the optical system in both amplitude and phase, we investigated 3D beam shaping, by performing image projections through the MMF, in two planes at the same time.This work extends the results of [14,15] in which the authors demonstrated image projection at the distal facet only where the experimental data were recorded by learning a transmission model from output intensity data.Beam shaping from a TM is usually achieved by inverting the TM to calculate the input complex vector related to the complex output target.However, this method does not apply in our case since our DM is a phase-only modulator.The Gaussian profile of the incident beam provides the amplitude of the input field.
We computed the best phase map to be applied to our DM to target simultaneously two different arbitrary images in two planes at the fiber distal end using a gradient descent algorithm.This algorithm considers the amplitude constraint of our incident beam, as well as the measured TM.It reduces deviation between the targets in both planes and the output fields given by the measured TM, propagated to the selected target planes.For this experimental demonstration, we have chosen two target planes different from the MMF distal facet.The target planes were chosen at 35µm and 70µm respectively, well beyond the Rayleigh length (7.2µm) of the smallest speckle grain size (1/e² diameter = 3.1µm).The targets in the closest and in the furthest planes are digits from 1 to 9 and letters from A to I, respectively.The optimized phase vector for the selected couple of targets is computed using gradient descent, and applied to the DM.Then, a camera records the intensities of the field at the target distances from the distal end of the MMF. Figure 4 shows that the experimental intensity records at both target planes for each digit-letter couple from (1, A) to (9, I) are properly displayed.It should be noted that these planes are chosen to be different from those where the data were recorded to learn the transmission matrix (distal facet of the MMF).This performance can only be achieved if the true complex TM is recovered, i.e. once the phase of the TM has been corrected in the second step of our process.

CONCLUSION
We propose a new reference-free method for measuring the true complex TM of a multimode fiber operating in the linear propagation regime.This method does not require any reference beam or interferometric setup.The complex TM is recovered solely from a set of input fields with a Gaussian amplitude profile and a randomly structured wavefront using a segmented deformable mirror, and their corresponding output intensity images.TM retrieval is performed using a twostep supervised machine learning approach.In the first step, the complex weights of the unknown TM are adjusted to predict the beam intensity profiles measured at the distal facet of the fiber, with a small amount of training data (only 14.5 times the number of actuators of the deformable mirror).However, this TM learnt with a single plane of recorded images suffers from a random phase bias vector.Thus, it must be corrected to predict the true wavefront of the output beam from the MMF and not only its amplitude.Therefore, in the second step, we measured only 30 additional Fourier intensity images of the output beam to correct this phase bias and calculate the real complex MT of the MMF.
Unlike previously reported machine-learning-based methods that only control the intensity profile of the output beam, we have experimentally proven that our two-step method correctly predicts the complex field at the distal end of a highly multimode fiber.In this study, we measured the TM of a 50/125 core/clad step-index fiber of 0.22 numerical aperture guiding 140 LP modes at 1064nm, using a deformable mirror of 952 actuators, and 65536 pixels from a CMOS camera.Convergence of the two algorithms (model learning and phase bias correction step) is achieved in around 15 epochs with a 256-mini-batch size and 700 iterations respectively.The predicted intensity image and its corresponding predicted farfield reached excellent average degrees of similarity close to 99% and 98% respectively, with a standard deviation below 0.6% for both distributions, with respect to the measured near-field and far-field intensities, and despite the absence of any special precautions to protect the fiber from environmental perturbations.The simplicity of our approach is an undeniable advantage from a practical point of view over more conventional techniques, which require a reference wave and a computational method to extract the phase of the field at the fiber output.In a final experiment, we used the highperformance complex field prediction capabilities from the measured complex TM to perform 3D shaping at the fiber output.In particular, we have studied the extension of previous demonstrations on image projection.As a proof of principle, we experimentally demonstrated the delivery of two images in two different planes simultaneously, beyond the distal end of the fiber where the data were recorded to learn the TM.These results pave the way for MMF to transmit more information-rich images using the axial dimension.It should be noted that a more complete characterization of the fiber can be obtained by measuring the TM at both orthogonal polarizations in the same way as described in this article.Also, by knowing the guided modes of the fiber, the actual modal TM of the MMF can also be deduced from the measured TM.Finally, the principle of the technique is not limited to optical fiber transmission, since it is independent of the type of linear disturbing medium.In particular, it is also possible to measure the TM of any scattering medium.These features are of particular interest for many applications such as beam shaping for surface treatments, motionless scanning, 3D photopolymerization, or the creation of optical tweezers in bioengineering.

Figure 1 :
Figure 1: Schematic of the experimental setup.The deformable mirror (DM) shapes the wavefront of the laser beam.It is imaged on the proximal end of the MMF.The near field and far field from the distal end of the MMF are imaged on CMOS cameras 1 & 2 respectively.The magnifications of the four afocal systems are: L1b/L1a = 7.5, L2b/L2a = 1/6, L3b/L3a = 1/40, L4b/L4a = 15.9.The focal length of L5 is 60mm.(D)M: (deformable) mirror, (P)BS: (polarizing) beam splitter.The gray area in the lower left highlights the datasets feeding the two-steps of our machine learning method.

Figure 2 :
Figure 2: (a) Learning dynamics as a function of the number of epochs, showing the decrease of cost function  1 .Convergence is reached in about 15 epochs with a dynamic learning rate starting at 0.3.(b) Distributions of Pearson Correlation Coefficients (PCC) between predicted and experimental intensities from the validation set in near field (blue) and far field (red).(c) Optimization curve as a function of the number of iterations, showing the decrease of cost function  2 .Convergence is reached in about 600 iterations.The inset displays the phase bias vector, reshaped as an image, obtained once the optimization converged.It depicts random phase values outside from the core of the MMF, and a speckle-like phase pattern inside the core of the MMF.
2 (|(  )|, |  |) = 1 − Γ(|(  )|, |  |), where   =   ,   = (())  , and  is the parameter to be optimized.Once this correction optimization has converged (figure 2.c), matrix   is finally corrected with the optimized phase vector  so that the transmission matrix   is close to the true matrix .The phase prediction accuracy cannot be evaluated directly, without using a complex interferometric setup.Instead, we assess it indirectly, by computing the PCC Γ (|(  )| 2 , || 2 ) between the predicted and the measured far-field intensities among unforeseen extra data, where   =   , and  is a 2D Fourier transform.The resulting Γ distribution is depicted in figure 2.b using red bars, showcasing a high median (97.6%) and a low standard deviation (0.4%).This emphasizes the accuracy of the intensity predictions in the Fourier plane.In the example presented in figure3, the corrected transmission matrix   , provides predictions in both the near field (figure3.b)and far field (figure3.e)that closely match the measured counterparts (figure3.cand figure3.frespectively).The outcomes from figures 2 and 3 collectively demonstrate that the model   , learnt from intensity data only, efficiently computes the complex field at the distal end of the MMF.

Figure 3 :
Figure 3: Top row (a-c) shows near field intensities: (a-b) predictions with models   and   , (c) measured on CMOS1.Bottom row (d-f) shows far field intensities: (d-e) predictions with models   and   , (f) measured on CMOS2.The  values indicated in red are the PCCs between the predicted near or far field intensities and the respective measured intensity.

Figure 4 :
Figure 4: Couples of intensities simultaneously measured in the two target planes at the MMF distal end.The targets are shown as insets.(a) Digits ranging from 1 to 9 are projected at 35µm from the fiber distal end.(b) Letters ranging from A to I are projected at 70µm from the fiber distal end.