arXiv(opens in a new tab)physics.opticsNov 2026

Manuscript Offprint

arXiv:2611.26391

Simulation-pretrained autoencoders versus PCA for compressing multimode fibre transmission matrices

Callum J. Wilson, Terry Wright, Qing Yang, Zhong Wen, Michael P. Pound, George S. D. Gordon

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Multimode optical fibres can image through a thin, flexible probe once their transmission matrix (TM) has been measured, but a TM is large and must be re-measured whenever the fibre moves. A compact model of feasible TMs would make storing and re-estimating them cheaper, so we ask how compactly TMs can be represented, and from how few measured TMs. Here we benchmark a permutation-equivariant autoencoder, pretrained on simulated fibres and adapted to measured TMs, against principal component analysis (PCA). At 62×\times compression, adapting the pretrained autoencoder with just two measured TMs reconstructs the TM of a 50 μ\mum fibre well enough to focus light at 98% of the ideal enhancement, and it stays accurate when the TMs are shifted by 25 pixels or zoomed by 10%, which quickly degrades a linear basis. It is not, however, a better compressor: PCA is about ten times more accurate when fitted on all 163 real TMs (1.1% against 11.9% error on held-out TMs) and is already more accurate from ten. The autoencoder’s value is as a prior when few or no real TMs exist: with none it reaches 29% error, against 91% for PCA fitted on the same simulation. Transfer to a different fibre is only partial. The most important extension, not yet tested, is to recover pixel-basis TMs from fewer measurements than a full TM, which would turn the pretrained prior from a compressor into a measurement-saving tool.

1 Introduction

Multimode fibres (MMF) guide many spatial modes of light through a core larger than a single-mode fibre, and have been proposed as cost-effective, ultrathin (<0.1 mm diameter) endoscopes [23], promising subcellular-resolution imaging deep inside tissue [16]. However, MMFs suffer image distortion from bending, movement, and temperature drift [28, 9, 2, 7, 8]. Provided the fibre is stable, this behaviour is characterised by its transmission matrix (TM), such that Eout=TM⋅EinE_{\text{out}}=TM\cdot E_{\text{in}}; knowing the TM allows these distortions to be corrected [17, 12]. TMs are large objects: captured experimentally in the pixel basis, i.e. as the field at each camera pixel rather than in the fibre’s mode basis, a single TM in this work occupies approximately 48.7 MB (complex64, 42,025×14542{,}025\times 145 elements). Compressing TMs into a compact latent representation — while retaining sufficient information for downstream reconstruction — is therefore practically important for storage, transmission, and real-time TM inference [27].

Conventional TM calibration also requires access to the distal end of the fibre [17], stable reference arms, and careful alignment, limiting applicability to in vivo environments [14]. However, single-ended TM calibration is an active research area and showing promise [11]. Measuring one TM with 145 input patterns takes approximately 1–2 minutes on our setup, excluding fibre repositioning and alignment checks, and this scales at least linearly with the number of input patterns; because the TM changes whenever the fibre is disturbed, it must be remeasured at each new fibre state. A compact representation of the family of TMs a fibre can take, built from simulation and a few calibration measurements, could instead serve as a prior from which the current TM is estimated from limited information, with prior work already suggesting this is possible when using mode basis TMs [13, 24]. The rationale is that fewer degrees of freedom require fewer measurements to determine the current TM. Here we test the prerequisite: how compactly TMs can be represented, and from how few real TMs.

Principal component analysis (PCA) is a linear method that is fast to fit and requires no iterative training. Each column of a pixel-basis TM is a speckle pattern, and PCA has been used to compress speckle patterns [5]. Because every output speckle is a linear superposition of the fibre’s guided modes, all speckles lie in a subspace whose dimension is set by the number of modes and is far smaller than the number of camera pixels. A pixel-basis TM is therefore expected to be compressible, with the limit set by the mode count. Skvarenina et al. extracted a bend-resolved modal basis from speckle-field correlation matrices using successive singular value decompositions [19], exploiting redundancy between speckle fields measured within a bend state. The redundancy in our setting is of a different kind. A TM has 145 columns, fewer than the ≈V2/2\approx V^{2}/2 modes supported by the 50 μ\mum-core step index fibre used here (V=2πa NA/λ≈52V=2\pi a\,\mathrm{NA}/\lambda\approx 52 for core radius a=25 μa=25\,\mum, NA=0.22\mathrm{NA}=0.22 and λ=660\lambda=660 nm), so the columns of a single TM are generically linearly independent and a decomposition across them removes no redundancy. Instead, each column is a vector of 42,025 complex pixels that lies in the fibre’s shared mode subspace, and that subspace can be learned only by pooling speckles from many TMs. Autoencoders are a nonlinear counterpart to PCA: an encoder network maps the data to a low-dimensional code and a decoder network reconstructs the data from it [10], so they can capture structure that a linear subspace cannot. Whether a nonlinear autoencoder can improve on this linear baseline, and in which data regimes, remains unclear.

Deep learning autoencoders are widely used for image compression [21, 15], and may be suited to TMs, which are themselves speckle-pattern images when captured in the pixel basis; convolutional networks have already been used to extract spatial features from multimode-fibre speckle patterns [25]. However, Zheng et al. [26] reported that convolutional layers are ill-suited to compact mode-basis TMs, whose correlations are non-local, and used a learned invertible basis transform with self-attention to obtain sparse latent representations. Our setting differs in basis and aim: we compress pixel-basis TMs, in which each column is a speckle image with local spatial structure, and compare against PCA, a dimension-reducing linear baseline.

Training such a model requires a large corpus of TMs [14] spanning the expected distribution of fibre states, but collecting experimental TMs at scale is slow and instrument-intensive, making physics-based simulation an attractive data source. A key practical advantage of simulation is that TMs can be generated and stored in the mode basis, where dimensionality reflects the number of guided modes rather than camera pixels. In this work, simulated TMs occupy only 1.19 MB per matrix — roughly 41×\times smaller than their experimental counterparts — and can be converted to the pixel basis on the fly during training, avoiding any storage bottleneck.

A critical question is whether a model pretrained on simulated TMs transfers to experimental data, which carries real-world noise, calibration artefacts, and physical imperfections absent from simulation. Fibres of different lengths present an additional challenge: simulating a 5 m fibre accurately requires substantially more compute than simulating a 1 m fibre, raising the question of whether cheaper 1 m simulations provide a useful pretraining signal for experimental 5 m TMs. We therefore construct 5 m TMs by multiplying five 1 m simulated TMs (“composite” TMs), and ask whether these provide a useful pretraining signal.

Here, we compare a simulation-pretrained autoencoder with PCA on pixel-basis TMs of a 5 m multimode fibre, and ask seven questions:

  1. How redundant is a pixel-basis TM: how much can PCA compress it, and what sets the limit?
  2. Can “composite” simulated TMs, formed by multiplying several 1 m simulated TMs, provide a useful pretraining signal for 5 m experimental TMs?
  3. Does a nonlinear autoencoder compress TMs better than PCA at the same latent size?
  4. How many real TMs does each approach need, and where does a pretrained prior help?
  5. How large is the simulation-to-experiment gap, and can a pretrained model bridge it where a linear basis cannot?
  6. Do the models transfer to a different fibre, and can one model serve several? We evaluate a second, larger-core fibre.
  7. Do the remaining reconstruction errors matter for focusing and imaging, and what survives geometric drift, such as camera shift and zoom?

The autoencoder here serves as a vehicle for studying the simulation-pretraining workflow itself: pretrain on simulated TMs, then adapt to a fibre using few or no real TMs. The questions above concern how many real TMs this workflow needs, which we expect to be relevant to other TM models, although we test only this architecture. In our data, PCA is hard to beat when real TMs are available, whereas a simulation-pretrained autoencoder is most useful when they are not.

References (21)

  • a next-generation hyperparameter optimization framework
  • Optics Express 16 (23), pp. 18590–18598
  • complex transformation analysis and applications in biophotonics
  • Commun Phys 9 (324)
  • Physical Review X 9 (4), pp. 041050
  • Optics Express 27 (17), pp. 23929–23947
  • Science 313, pp. 504–507
  • External Links: 2611.10290, Document Cited by: §1
  • Optics Express 23 (10), pp. 12648–12668
  • Light: Science & Applications 10 (88)
  • a comprehensive review and new perspectives
  • Journal of Optics 24 (8), pp. 23–25
  • Nature Communications 1 (81)
  • APL Photonics 10 (8), pp. 086108
  • an open-source optical propagation simulation tool in matlab
  • Journal of Network and Computer Applications 205 (103452)
  • self-attention with linear complexity
  • Nature Photonics 17 (8), pp. 679–687
  • APL Photonics 5 (9), pp. 096106
  • External Links: 2406.07775, Document Cited by: §1
  • Communications Physics 6 (1), pp. 306