A global fit assumes that one or several of the lifetimes of a multi-exponential decay are constant in all pixels of a FLIM image. By using this a priori knowledge, the decay parameters can be obtained at a better accuracy than by a multi-exponential fit with all decay parameters floating. However, a global fit is enormously computation-intensive. Processing times with standard CPU processing are therefore unacceptably long. We present a Global Fit algorithm based on GPU processing that reduces the calculation time from previously hours to a few minutes and less. Here, we demonstrate the performance of the global fit for FLIM-FRET analysis and for metabolic-FLIM analysis. The global fit is available in Becker & Hickl’s SPCImage NG data analysis software, version 9.073.

# Fast GPU-Based Global Fit of TCSPC FLIM Data

W. Becker, A. Bergmann, Becker & Hickl GmbH

*Abstract:* A global fit assumes that one or several of
the lifetimes of a multi-exponential decay are constant in all pixels of a FLIM
image. By using this a priori knowledge, the decay parameters can be obtained
at a better accuracy than by a multi-exponential fit with all decay parameters
floating. However, a global fit is enormously computation-intensive. Processing
times with standard CPU processing are therefore unacceptably long. We present
a Global Fit algorithm based on GPU processing that reduces the calculation
time from previously hours to a few minutes and less. Here, we demonstrate the
performance of the global fit for FLIM-FRET analysis and for metabolic-FLIM
analysis. The global fit is available in Becker & Hickl's
SPCImage NG data analysis software, version 9.073.

## GPU-Based Global-Fit Procedure

A global fit assumes that one or several of the lifetimes of a multi-exponential decay are constant in all pixels of a FLIM image. Unlike a fit with 'fixed component lifetimes', which needs the component lifetimes to be known, a global fit does not need a priori information on the values of any of the lifetimes. The only information it uses is that one or several the component lifetime do not change over the pixels of image.

Constant lifetimes often appear in metabolic-FLIM data, where the lifetimes of the NADH or FAD / FMN decay functions show no or little variation, and in FRET data where the lifetime of the non-interacting donor component can be expected to be constant. In these cases, it can be expected that global fitting improves the signal-to noise ratio of the fit results. However, global fitting is extremely computation-intensive: First, a 'normal' multi-exponential fit is performed with reasonable start values. Then the values of the global parameters are varied and a new fit of the image is performed. The procedure is continued until the error sum over the entire image has been minimised. That means, in every cycle of the iteration a full multi-exponential decay analysis for the entire image has to be performed. Considering the fact that conventional multi-exponential FLIM analysis for an average-size image takes 5 to 10 minutes a procedure like this must be expected to be extremely time-consuming, if not impossible.

A few years ago bh introduced GPU processing in their SPCImage NG data analysis software. On a GPU, a large number of similar calculations are executed simultaneously. In a FLIM image, the GPU is able to perform a multi-exponential-decay fit in hundreds of pixels in parallel. As a result, the calculation time for one image is reduced from formerly 5 to 10 minutes to a few seconds. A calculation time of a few seconds for one FLIM image puts global analysis within reach: Assuming 20 analysis cycles are needed to reach a perfect fit with a global parameter the calculation time can be expected to be on the order of a few minutes or less. Therefore, we implemented a GPU-based global fit algorithm in our SPCImage NG FLIM data analysis software. Results for FLIM-FRET data and for metabolic FLIM data are presented below.

## Global Fit in SPCImage NG

The global fit is activated in the Decay-Parameter Window in the upper right of the main panel. The desired decay time is defined as 'Global' and checked for special treatment in the analysis. Please see Fig. 1. In the figure lifetime t3 was declared as 'Global'. That means the most appropriate value will be determined and used for all pixels. A Global Fit can be run with a single global lifetime (as shown in the figure), or with two or three global lifetimes. Of course, a global fit makes sense only in combination with multi-exponential decay models. There is no point of declaring a 'Global' lifetime for a single-exponential fit.

Fig. 1: Activation of Global Fit in SPCImage NG. Parameter t3 was declared 'Global'. Colour represents a1, the metabolic indicator. FAD image of pig skin.

## FRET Analysis with Global Lifetime of the Non-Interacting Donor

One potential application of global fitting is FRET analysis [1, 3]. FRET analysis is based on a model which contains a fast decay component from the interacting donor and a slow decay component from the non-interacting donor. The technique not only delivers correct classic FRET efficiencies [3], but also the fraction of interacting donor, the FRET efficiency of the interacting donor, and the donor-acceptor distance. By using the non-interacting donor lifetime as a reference lifetime the technique is free of external calibration [4].

A frequent objection against double-exponential FRET analysis is that double-exponential fitting of the FLIM data is required. A double-exponential fit needs more photons than a single-exponential one. This raises concerns about the statistical accuracy of the fit results and the FRET parameters derived from them. We have shown that these concerns are not justified if the maximum-likelihood (MLE) fit of SPCImage is used [2]. A global fit can be expected to improve the accuracy even further: Apart from environment-induced variations by non-FRET mechanisms, the lifetime of the non-interacting donor component can be expected to be constant. A fit with a global non-interacting donor lifetime therefore appears promising. A comparison of FRET analysis with the traditional double-exponential fit and a fit with the lifetime, t2, of the non-interfacing donor as a global parameter is given in Fig. 2.

Fig. 2: Upper row: FRET Analysis with free lifetime, t2, of the non-interacting donor. Left to right: Mean lifetime of double-exponential decay, tm, amount of interacting donor, a1, classic FRET efficiency, Eclass. Colour-coded images and parameter histograms. Lower row: FRET Analysis with global lifetime, t2, of the non-interacting donor. Left to right: Mean lifetime of double-exponential decay, tm, amount of interacting donor, a1, classic FRET efficiency, Eclass. Colour-coded images and parameter histograms.

There is clearly an increase in signal-to-noise ratio for the global-fit (with t2 global) in comparison to the classic fit (with both lifetimes freely floating). On average, the increase is about a factor of 1.4 in SNR. This may not look like very much, but it is the equivalent to an analysis of data with twice the number of photons per pixel.

## Metabolic-FLIM Analysis with Global Lifetimes

Metabolic FLIM uses the fluorescence decay functions of NADH or FAD to determine the metabolic state of cells or tissues. Both compounds are present in a bound and in an unbound form. The amounts of bound and unbound NADH and FAD depend on the metabolic state. The fluorescence lifetimes of the decay components are different, and can be separated by FLIM. Double-exponential decay analysis can thus be used to determine the metabolic state: For NADH, small a1 indicates oxidative phosphorylation, large a1 indicates glycolysis. For FAD it is the opposite: Small a1 indicates glycolysis, large a1 indicates oxidative phosphorylation.

The problem of metabolic FLIM is the low intensity of the NADH and the FAD fluorescence. It can therefore be difficult to obtain enough photons for accurate double-exponential decay analysis. The situation is further complicated by the presence of FNM fluorescence in FAD data [1, 5]. Quantitative results for FAD are thus only obtained by triple-exponential analysis. This makes the photon-budget problem even more severe. Results can be obtained by analysis with 'fixed' component lifetimes [5], but this opens the door to subjective influence of the operator. A more promising solution is analysis with global parameters. It turns out that the lifetimes of the fluorescence components, although different in different cell and tissue types, are fairly stable within one and the same sample. This is exactly the situation where global fitting helps.

An example is shown in Fig. 3. It shows FAD data from freshly excised human bladder tissue. The upper row shows conventional triple-exponential decay analysis with all three component lifetimes freely floating. Left to right, it shows the amount of bound FAD, a1, the amount of unbound FAD, a2, and the amount of FMN, a3. The photon number in the individual pixels is about 100. To obtain reasonable a1, a2, and a3 data a binning radius of 3 was used in SPCImage NG. This results in about 5000 photons per binned pixel. Please see [2] for details of the binning procedure. It can be seen that the MLE fit is generally able to derive reasonable triple-exponential decay parameters form the data. However, the accuracy of the decay amplitudes is not really satisfactory.

Fig. 3 Left to right: amount of bound FAD, a1, the amount of unbound FAD, a2, and the amount of FMN, a3. Upper row: Standard MLE fit. Lower row: Global fit with component lifetimes t1, t2, t3 defined as global parameters.

The second row shows images of the same parameters obtained by global fitting. All three component lifetimes, t1, t2, t3, were defined 'global'. Again, a binning radius of 3, with a photon number of about 5000 per binned pixel, was used. The effect on the image quality is striking: All component amplitudes, a1, a2, and a3, are obtained at high accuracy, delivering clean images of the amounts of bound FAD, unbound FAD and FMN.

## Precautions Against Fitting Artefacts

A global fit requires that the global parameters are constant over the entire area in which the analysis is performed. This is usually the case in NADH and FAD FLIM images, and in FLIM FRET images. It may also be the case in molecular imaging applications where the probe exists in a bound and unbound or a protonated and deprotonated form. However, it should be scrutinized whether the component lifetimes are really constant. Conventional analysis of reference data recorded with long acquisition time and high photon number may help decide.

Importantly, image areas which contain atypical decay data should be excluded from the analysis. This may be dead cells, spots of contamination, or spots burned by excessive excitation power. These regions have different component lifetimes and thus cannot be treated by the same global parameter set as the rest of the image. Problems can also occur if a lifetime that has been declared 'global' gets into the range of a non-global lifetime.

Moreover, make sure that the background is excluded. Exclusion of background is easily achieved by the 'Threshold' parameter of SPCImage NG. Exclusion of other contaminations may require region-of-interest definition or image segmentation via the phasor plot [2]. We also recommend not to use more model parameters in the fit than necessary. The values of global parameters may not be entirely correct for every individual pixel. If the model function is too flexible the fit procedure may attempt to compensate with unnecessary changes in the remaining parameters. For best fit accuracy, we recommend to use 'fixed' parameters for the 'Shift' and for the 'Offset'.

## Calculation Times of GPU Processing

The calculation times depend on the number of pixels used in the calculation, the number of time channels, and, of course, on the size and speed of the GPU used. We determined the calculation times for an NVIDIA GPU in a laptop and for a medium-size NVIDIA GPU in a standard PC. The images contained about 80% pixels with useful data, the rest of the pixels were background. The background pixels were excluded from the fit by the 'Threshold' parameter of SPCImage NG.

** Standard
Analysis Global Analysis**

3-Exponential Model 3-Exp.Model

All 3 Lifet. Floating All 3 Lifet. Global

256x256 pixels 512x512 pixels 256x256 pixels 512 x 512 pixels

256 time channels 1024 time channels 256 time channels 1024 time channels

**Small-Size GPU in Laptop** <1 second 6
seconds 12 seconds 160 seconds

**Medium-Size GPU
in PC** <1 second 1.2
seconds 2.4 seconds 32 seconds

## Summary

A global-fit can significantly improve the signal-to-noise ratio of a multi-exponential fit of FLIM data. In the past, global fitting has only rarely been used because the calculation times were unacceptably long. Now, GPU processing used in BH's SPCImage data analysis software has put the calculation times in the range of a few 10 seconds to a few minutes. The reduced data processing times make the global fit attractive to a number of multi-exponential data analysis tasks in which the component lifetimes are unknown but invariable over an area of interest within the sample. We demonstrated global fitting for FLIM FRET data and for metabolic FLIM data. In FLIM FRET data, global fitting improved the accuracy of FRET parameters derived from double-exponential decay analysis. In FAD data, it delivers quantitative values of the amounts of bound and unbound FAD, and the amount of FMN.

## References

1. W. Becker, The bh TCSPC Handbook. 10th ed. Becker & Hickl GmbH (2023)

2. SPCImage Data Analysis, in W. Becker, The bh TCSPC Handbook. 10th ed. Becker & Hickl GmbH (2023)

3. W. Becker, A Common Mistake in Lifetime-Based FRET Measurements. Application note, Becker & Hickl GmbH (2023)