원시데이터 수집 시스템
선정목록으로

Multi-Task Learning for Multi-Dimensional Regression: Application to Luminescence Sensing

관련 필름·전자재료 · (18) VENT(방수통기 부품) (11) 배리어 필름(15) 디스플레이 패널재료

기본 정보

저자
  1. Umberto Michelucci — TOELT LLC, Birchlenstr. 25, 8600 Dübendorf, Switzerland
  2. Francesca Venturini — Institute of Applied Mathematics and Physics, Zurich University of Applied Sciences, Technikumstrasse 9, 8401 Winterthur, Switzerland
DOI
10.3390/app9224748
저널
Applied Sciences
발행년도
2019
발행기관
Multidisciplinary Digital Publishing Institute
피인용수
5
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.3390/app9224748
토픽
Analytical Chemistry and Sensors
OpenAlex ID
W3104264956

평가 내용

관련도
관련
사업분야
필름·전자재료 · (18) VENT(방수통기 부품)
부 분야
(11) 배리어 필름, (15) 디스플레이 패널재료
R&D 측면
분석·모델링
확신도
0.80
근거 용어
luminescence sensing, oxygen concentration, temperature, multi-task learning, neural networks
판단 근거
이 논문은 발광(luminescence)을 이용한 산소 및 온도 센싱 기술에서 다중 변수를 동시에 예측하기 위한 머신러닝(MTL) 모델을 다룹니다. 이는 코오롱인더스트리의 VENT(방수통기 부품)나 배리어 필름 등에서 활용될 수 있는 기능성 센싱 소재의 데이터 분석 및 성능 최적화 방법론과 밀접한 관련이 있습니다.
R&D 활용 포인트
기능성 필름이나 멤브레인 기반 센서 개발 시, 환경 변수(온도, 가스 농도 등)에 따른 복합적인 물성 변화를 정밀하게 예측하고 보정하는 데이터 모델링 기술로 활용 가능합니다.
평가 입력
섹션 본문 87,858자 중 30,032자 발췌

초록

The classical approach to non-linear regression in physics, is to take a mathematical model describing the functional dependence of the dependent variable from a set of independent variables, and then, using non-linear fitting algorithms, extract the parameters used in the modeling. Particularly challenging are real systems, characterized by several additional influencing factors related to specific components, like electronics or optical parts. In such cases, to make the model reproduce the data, empirically determined terms are built-in the models to compensate for the impossibility of modeling things that are, by construction, impossible to model. A new approach to solve this issue is to use neural networks, particularly feed-forward architectures with a sufficient number of hidden layers and an appropriate number of output neurons, each responsible for predicting the desired variables. Unfortunately, feed-forward neural networks (FFNNs) usually perform less efficiently when applied to multi-dimensional regression problems, that is when they are required to predict simultaneously multiple variables that depend from the input dataset in fundamentally different ways. To address this problem, we propose multi-task learning (MTL) architectures. These are characterized by multiple branches of task-specific layers, which have as input the output of a common set of layers. To demonstrate the power of this approach for multi-dimensional regression, the method is applied to luminescence sensing. Here the MTL architecture allows predicting multiple parameters, the oxygen concentration and the temperature, from a single set of measurements.

본문 90,121자

본문 펼치기
Featured Application: Multi-task learning; multi-parameter luminesce sensing.Abstract:The classical approach to non-linear regression in physics, is to take a mathematical model describing the functional dependence of the dependent variable from a set of independent variables, and then, using non-linear fitting algorithms, extract the parameters used in the modeling. Particularly challenging are real systems, characterized by several additional influencing factors related to specific components, like electronics or optical parts. In such cases, to make the model reproduce the data, empirically determined terms are built-in the models to compensate for the impossibility of modeling things that are, by construction, impossible to model. A new approach to solve this issue is to use neural networks, particularly feed-forward architectures with a sufficient number of hidden layers and an appropriate number of output neurons, each responsible for predicting the desired variables. Unfortunately, feed-forward neural networks (FFNNs) usually perform less efficiently when applied to multi-dimensional regression problems, that is when they are required to predict simultaneously multiple variables that depend from the input dataset in fundamentally different ways. To address this problem, we propose multi-task learning (MTL) architectures. These are characterized by multiple branches of task-specific layers, which have as input the output of a common set of layers. To demonstrate the power of this approach for multi-dimensional regression, the method is applied to luminescence sensing. Here the MTL architecture allows predicting multiple parameters, the oxygen concentration and the temperature, from a single set of measurements. insufficient approximation, may be too complex for a stable implementation or may be simply unknown[3].An example where the usual multi-dimensional regression approach fails is in the determination of a substance from changes in its luminescence when several environmental conditions vary in an unknown and uncontrolled way. Luminescence quenching for oxygen detection represents a widespread application relevant in many fields like biomedical imaging, environmental monitoring, or process control [4] (see Section 4 for details). In this application, the quantity of interest is the concentration of molecular oxygen [O 2 ]. The measured quantity, either the luminescence intensity or luminescence intensity decay time of a special molecule (luminophore), is however equally strongly dependent on the concentration [O 2 ] and the temperature T. As a result, it is not possible to extract two different physical quantities, namely [O 2 ] and T, from the same set of data. Usually, T is measured separately with another device and given as an input to a mathematical model describing the dependency of those two quantities from the input data. The complexity increases further if more than one luminophore is present, and several parameters (e.g.[O 2 ], [CO 2 ], pH) have to be determined[5][6][7][8][9].A possible method, which recently attracted great interest, is the use of feed-forward neural network (FFNN) architectures, with a certain number of hidden layers and an appropriate number of output neurons, each responsible for predicting the desired variables y i with i = 1, ..., d. In the example of oxygen sensing, the output layer would have a neuron for the oxygen concentration [O 2 ] and one for the temperature T. This work shows that, since the output neurons must use the same features (the output of the last hidden layer) for all variables[10,11], FFNNs are insufficiently flexible. For the cases when the variables depend in fundamentally different ways from the inputs this approach will give a result that is at best acceptable, and at worst unusable.This work proposes a new approach, which is based on multi-task learning (MTL) neural networks architectures. This type of architectures are characterized by multiple branches of layers, that get their input from a common set of layers. This type of networks can improve the model prediction performance by jointly learning correlated tasks[10][11][12][13][14]. In particular, the proposed MTL architectures are applied to the problem of luminescence quenching for oxygen sensing. Their performance in the prediction of oxygen concentration and temperature is analyzed and compared to that of a classical feed-forward neural network.In general, the proposed MTL approach may be of particular relevance in all those cases, where the mathematical model y = f (x, w) is not known, too complex or not really of interest and the only goal of the regression problem is to build a system that is able to determine y as accurately as possible.The paper is organized as follows: Section 2 describes non-linear regression and MTL with neural networks. Section 3 describes the implementation of MTL and the different neural network studied in this work. Section 4 reviews luminescence quenching for oxygen sensing. The results are discussed in Section 5.Theoretical BackgroundThis section briefly reviews the theoretical justification for non-linear regression with neural networks, as well as the multi-task learning approach implemented in this work.Neural Networks for Non-Linear Regression ProblemsIn general, a neural network model is always composed of three parts [15]:• network architecture (number of layers, activation functions, etc.), • cost function, • optimizer (a method or algorithm used to minimize the cost function). Introduction The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an Introduction The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as Introduction where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here. Introduction A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function. Multi-Task Learning Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately. Multi-Task Learning An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers. Multi-Task Learning The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized Multi-Task Learning The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is Multi-Task Learning where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation. Neural Network Architectures and Implementation In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections. Neural Network Architectures and Implementation In the three architectures investigated the sigmoid activation functions was used for all the neurons Neural Network Architectures and Implementation All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16. Neural Network Architectures and Implementation To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library. Network A The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant. Network B The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5. Network C The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B. Metrics The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation Metrics The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training Metrics where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000. Metrics The AE T and MAE T are similarly defined. Luminescence Quenching for Oxygen and Temperature Sensing To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29]. Luminescence Quenching for Oxygen and Temperature Sensing The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26]. Luminescence Quenching for Oxygen and Temperature Sensing The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T, Luminescence Quenching for Oxygen and Temperature Sensing where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define Luminescence Quenching for Oxygen and Temperature Sensing The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor. Luminescence Quenching for Oxygen and Temperature Sensing The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω. Data Generation To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30]. Data Generation The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data. Data Generation Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data. Results and Discussion As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy. Results and Discussion The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system. Results and Discussion The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application. Results and Discussion The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C. Results and Discussion For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33]. Results and Discussion For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable. Results and Discussion Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line. Results and Discussion As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B. Results and Discussion Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C. Results and Discussion Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch. Conclusions In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior. Conclusions The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling. Conclusions This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression. Introduction The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an Introduction The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as Introduction where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here. Introduction A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function. Multi-Task Learning Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately. Multi-Task Learning An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers. Multi-Task Learning The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized Multi-Task Learning The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is Multi-Task Learning where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation. Neural Network Architectures and Implementation In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections. Neural Network Architectures and Implementation In the three architectures investigated the sigmoid activation functions was used for all the neurons Neural Network Architectures and Implementation All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16. Neural Network Architectures and Implementation To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library. Network A The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant. Network B The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5. Network C The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B. Metrics The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation Metrics The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training Metrics where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000. Metrics The AE T and MAE T are similarly defined. Luminescence Quenching for Oxygen and Temperature Sensing To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29]. Luminescence Quenching for Oxygen and Temperature Sensing The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26]. Luminescence Quenching for Oxygen and Temperature Sensing The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T, Luminescence Quenching for Oxygen and Temperature Sensing where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define Luminescence Quenching for Oxygen and Temperature Sensing The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor. Luminescence Quenching for Oxygen and Temperature Sensing The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω. Data Generation To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30]. Data Generation The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data. Data Generation Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data. Results and Discussion As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy. Results and Discussion The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system. Results and Discussion The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application. Results and Discussion The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C. Results and Discussion For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33]. Results and Discussion For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable. Results and Discussion Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line. Results and Discussion As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B. Results and Discussion Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C. Results and Discussion Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch. Conclusions In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior. Conclusions The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling. Conclusions This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression. Introduction The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an Introduction The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as Introduction where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here. Introduction A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function. Multi-Task Learning Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately. Multi-Task Learning An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers. Multi-Task Learning The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized Multi-Task Learning The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is Multi-Task Learning where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation. Neural Network Architectures and Implementation In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections. Neural Network Architectures and Implementation In the three architectures investigated the sigmoid activation functions was used for all the neurons Neural Network Architectures and Implementation All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16. Neural Network Architectures and Implementation To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library. Network A The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant. Network B The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5. Network C The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B. Metrics The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation Metrics The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training Metrics where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000. Metrics The AE T and MAE T are similarly defined. Luminescence Quenching for Oxygen and Temperature Sensing To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29]. Luminescence Quenching for Oxygen and Temperature Sensing The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26]. Luminescence Quenching for Oxygen and Temperature Sensing The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T, Luminescence Quenching for Oxygen and Temperature Sensing where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define Luminescence Quenching for Oxygen and Temperature Sensing The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor. Luminescence Quenching for Oxygen and Temperature Sensing The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω. Data Generation To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30]. Data Generation The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data. Data Generation Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data. Results and Discussion As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy. Results and Discussion The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system. Results and Discussion The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application. Results and Discussion The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C. Results and Discussion For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33]. Results and Discussion For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable. Results and Discussion Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line. Results and Discussion As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B. Results and Discussion Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C. Results and Discussion Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch. Conclusions In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior. Conclusions The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling. Conclusions This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression.

섹션 본문 127문단 · 86,790자

(제목 없음)

1Featured Application: Multi-task learning; multi-parameter luminesce sensing.Abstract:The classical approach to non-linear regression in physics, is to take a mathematical model describing the functional dependence of the dependent variable from a set of independent variables, and then, using non-linear fitting algorithms, extract the parameters used in the modeling. Particularly challenging are real systems, characterized by several additional influencing factors related to specific components, like electronics or optical parts. In such cases, to make the model reproduce the data, empirically determined terms are built-in the models to compensate for the impossibility of modeling things that are, by construction, impossible to model. A new approach to solve this issue is to use neural networks, particularly feed-forward architectures with a sufficient number of hidden layers and an appropriate number of output neurons, each responsible for predicting the desired variables. Unfortunately, feed-forward neural networks (FFNNs) usually perform less efficiently when applied to multi-dimensional regression problems, that is when they are required to predict simultaneously multiple variables that depend from the input dataset in fundamentally different ways. To address this problem, we propose multi-task learning (MTL) architectures. These are characterized by multiple branches of task-specific layers, which have as input the output of a common set of layers. To demonstrate the power of this approach for multi-dimensional regression, the method is applied to luminescence sensing. Here the MTL architecture allows predicting multiple parameters, the oxygen concentration and the temperature, from a single set of measurements. insufficient approximation, may be too complex for a stable implementation or may be simply unknown[3].An example where the usual multi-dimensional regression approach fails is in the determination of a substance from changes in its luminescence when several environmental conditions vary in an unknown and uncontrolled way. Luminescence quenching for oxygen detection represents a widespread application relevant in many fields like biomedical imaging, environmental monitoring, or process control [4] (see Section 4 for details). In this application, the quantity of interest is the concentration of molecular oxygen [O 2 ]. The measured quantity, either the luminescence intensity or luminescence intensity decay time of a special molecule (luminophore), is however equally strongly dependent on the concentration [O 2 ] and the temperature T. As a result, it is not possible to extract two different physical quantities, namely [O 2 ] and T, from the same set of data. Usually, T is measured separately with another device and given as an input to a mathematical model describing the dependency of those two quantities from the input data. The complexity increases further if more than one luminophore is present, and several parameters (e.g.[O 2 ], [CO 2 ], pH) have to be determined[5][6][7][8][9].A possible method, which recently attracted great interest, is the use of feed-forward neural network (FFNN) architectures, with a certain number of hidden layers and an appropriate number of output neurons, each responsible for predicting the desired variables y i with i = 1, ..., d. In the example of oxygen sensing, the output layer would have a neuron for the oxygen concentration [O 2 ] and one for the temperature T. This work shows that, since the output neurons must use the same features (the output of the last hidden layer) for all variables[10,11], FFNNs are insufficiently flexible. For the cases when the variables depend in fundamentally different ways from the inputs this approach will give a result that is at best acceptable, and at worst unusable.This work proposes a new approach, which is based on multi-task learning (MTL) neural networks architectures. This type of architectures are characterized by multiple branches of layers, that get their input from a common set of layers. This type of networks can improve the model prediction performance by jointly learning correlated tasks[10][11][12][13][14]. In particular, the proposed MTL architectures are applied to the problem of luminescence quenching for oxygen sensing. Their performance in the prediction of oxygen concentration and temperature is analyzed and compared to that of a classical feed-forward neural network.In general, the proposed MTL approach may be of particular relevance in all those cases, where the mathematical model y = f (x, w) is not known, too complex or not really of interest and the only goal of the regression problem is to build a system that is able to determine y as accurately as possible.The paper is organized as follows: Section 2 describes non-linear regression and MTL with neural networks. Section 3 describes the implementation of MTL and the different neural network studied in this work. Section 4 reviews luminescence quenching for oxygen sensing. The results are discussed in Section 5.Theoretical BackgroundThis section briefly reviews the theoretical justification for non-linear regression with neural networks, as well as the multi-task learning approach implemented in this work.Neural Networks for Non-Linear Regression ProblemsIn general, a neural network model is always composed of three parts [15]:• network architecture (number of layers, activation functions, etc.), • cost function, • optimizer (a method or algorithm used to minimize the cost function).

Introduction

2The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an

3The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as

4where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here.

5A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function.

Multi-Task Learning

6Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately.

7An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers.

8The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized

9The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is

10where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation.

Neural Network Architectures and Implementation

11In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections.

12In the three architectures investigated the sigmoid activation functions was used for all the neurons

13All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16.

14To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library.

Network A

15The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant.

Network B

16The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5.

Network C

17The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B.

Metrics

18The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation

19The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training

20where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000.

21The AE T and MAE T are similarly defined.

Luminescence Quenching for Oxygen and Temperature Sensing

22To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29].

23The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26].

24The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T,

25where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define

26The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor.

27The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω.

Data Generation

28To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30].

29The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data.

30Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data.

Results and Discussion

31As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy.

32The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system.

33The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application.

34The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C.

35For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33].

36For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable.

37Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line.

38As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B.

39Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C.

40Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch.

Conclusions

41In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior.

42The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling.

43This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression.

Introduction

44The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an

45The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as

46where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here.

47A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function.

Multi-Task Learning

48Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately.

49An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers.

50The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized

51The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is

52where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation.

Neural Network Architectures and Implementation

53In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections.

54In the three architectures investigated the sigmoid activation functions was used for all the neurons

55All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16.

56To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library.

Network A

57The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant.

Network B

58The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5.

Network C

59The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B.

Metrics

60The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation

61The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training

62where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000.

63The AE T and MAE T are similarly defined.

Luminescence Quenching for Oxygen and Temperature Sensing

64To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29].

65The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26].

66The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T,

67where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define

68The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor.

69The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω.

Data Generation

70To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30].

71The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data.

72Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data.

Results and Discussion

73As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy.

74The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system.

75The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application.

76The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C.

77For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33].

78For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable.

79Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line.

80As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B.

81Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C.

82Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch.

Conclusions

83In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior.

84The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling.

85This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression.

Introduction

86The classical use of regression in physics, sometimes also referred to as non-linear fitting, is to try to determine d quantities y ∈ R d from a set of n measurements x ∈ R q with q ∈ N, using a theoretical mathematical model y = f (x, w) that depends on a certain number p of parameters w ∈ R p . Typically this is achieved by choosing the parameters w to minimize a selected error function, like the mean square error (MSE), with specific algorithms. To find the best solution for f is a classical optimization problem [1][2][3]. This method, however, fails to deliver stable and accurate results, for example, when the quantities y i with i = 1, ..., d have different physical meanings and, consequently, depend on different components of the parameter vector w in fundamentally distinct ways. As a result, the mathematical model may be an

87The neural networks considered in this work have a feed-forward architecture, as it is typical in regression problems. The details of the networks are described in Section 3. The cost function needs to be chosen depending on the problem to be solved. For example, the cross-entropy is a common choice when solving classification problems [15]. For regression problems, as the one studied in this work, the most common cost function is the mean square error (MSE), which is defined as

88where n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for the j th observation (indicated as a superscript between square brackets), with j = 1, ..., n; y [j] ∈ R d is the output of the network, when evaluated on the j th observation. The optimizer affects the learning performance of the network but does not determine the type of problems the network can solve and therefore will not be discussed here.

89A regression problem consists in minimizing the cost function, in this case the MSE (Equation 1), with respect to the learnable parameters of the network, which are defined in the architecture. The implicit assumption done is that there is an underlying albeit unknown function that describes the relationship between the y [j] and the input observations (the measurements x [j] ). Assuming its existence, the neural networks try to approximate it, by composing a big number of non-linear functions. This approach relies on the implicit assumption that a network can approximate any function. For FFNN this assumption is legitimate since it was proved mathematically [16][17][18][19][20][21][22][23]. This mathematical proof thus justifies the use of neural networks for regression problems. Unfortunately, not being a constructive proof, it provides neither the number of layers nor the number of neurons per layer needed to approximate this unknown function. It just tells that, with enough neurons, a neural network is able to approximate any function.

Multi-Task Learning

90Multi-task learning is a machine learning techniques in which n T learning tasks are solved at the same time, using commonalities and differences across tasks. This approach may results in improved learning efficiency and prediction accuracy [12][13][14]24], although the possibility of improvement depends on how information is encoded in the data. In this work MTL will be applied, for the first time, to luminescence sensing, where the luminescence data are dependent on two quantities, oxygen concentrations and temperature, which are otherwise hard to extract separately.

91An example of a simple MTL network architecture, which reflects the architectures later used in the paper, is shown in Figure 1. This network consists of a series of common hidden layers, followed by two branches (n T = 2) each consisting of several task-specific hidden layers.

92The layers marked in Figure 1 as "common hidden layers" generate an output, that is typically called a "shared representation". The name comes from the fact that the output of those layers is used to evaluate both y 1 and y 2 . The shared representation is then the input of a set of "task-specific hidden layers", that learn how to predict y 1 and y 2 better. Note how the common hidden layers are shared with both the tasks of predicting y 1 and y 2 , while the task-specific hidden layers are specific to each task separately. The MTL network of Figure 1 uses the common hidden layers to find common features beneficial to each of the two tasks. During the training phase, learning to predict y 1 will influence the common hidden layers and therefore, the prediction of y 2 , and vice-versa. A set of task-specific hidden layers will then learn specific features to each output and therefore improve the prediction accuracy. The implicit assumption here is that the tasks have something in common; otherwise this approach will not produce the desired result. Multiple cost functions L i with i = 1, ..., n T , with n T the number of tasks, are required to use this network architecture. In the training phase a global cost function L, defined as a linear combination of the task-specific cost functions with weights α i will be minimized

93The parameters α i have to be determined during the hyper-parameter tuning phase to optimize the network predictions. In this paper, being the cost function the MSE (Equation 1), the global cost function of Equation 2 is

94where n T is the number of tasks; n is the number of observations in the input dataset; y [j] ∈ R d is the measured value of the desired quantity for observation j, with j = 1, ..., n;ŷ [j] ∈ R d is the output of the network, when evaluated on the j th observation.

Neural Network Architectures and Implementation

95In this paper three architectures, one classical FFNN and two MTL, were investigated and compared in the simultaneous prediction of oxygen concentration and temperature. To make the comparison meaningful, the parameters, which are not architecture-specific, were not varied. The details of the architectures are described in the next subsections.

96In the three architectures investigated the sigmoid activation functions was used for all the neurons

97All the results were obtained with a training of 4000 epochs. The target variables y were normalized to vary between 0 and 1. Thus, the sigmoid activation function was used also for the output neurons y 1 and y 2 . The input measurement, as will be explained in detail in Section 4, is a vector in R q with q = 16.

98To minimize the cost function, the optimizer Adaptive Moment Estimation (Adam) [15,25] was used. The training was performed with a starting learning rate of 10 −3 and using batch-learning, which means that the weights were updated only after the entire training dataset has been fed to the network. Batch-learning was chosen because of its stability and speed since it reduces the training time of a few orders of magnitude in comparison to, for example, stochastic gradient descent [15]. Therefore it makes experimenting with different networks a feasible endeavor. The implementation was performed using the TensorFlow TM library.

Network A

99The first type of neural network investigated has a classical feed-forward architecture, consisting of an input layer, three hidden layers, and an output layer with two neurons [O 2 ] pred and T pred . This architecture, labeled here as Network A, is schematically shown in Figure 2. The number of neurons of each hidden layer n i =n is the same. Each neuron in each layer gets as input the output of all neurons in the previous layer, and feeds its output to each neuron in the subsequent layer. To test the performance network A hyperparameter tuning was performed by varying the number of neurons in each of the four layers (n). The number of neurons that was tested isn = 10, 30, 50, 80. Additional hyperparameters, like the learning rate, were not optimized and the mentioned values were kept constant.

Network B

100The first MTL network studied is depicted in Figure 3. It consists of three common hidden layers with 50 neurons each, followed by two branches, one with two additional task-specific hidden layers used to predict [O 2 ], and one branch without hidden layers used to predict both [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5. The idea behind this network is to have a system that learns to predict [O 2 ] well, thanks to the further task-specific layers. The predicted T is not expected to be exceptionally good since the common hidden layers must learn to predict [O 2 ] pred and T pred at the same time. This architecture can be of applied when one of the outputs y i , here [O 2 ], needs to be predicted with higher accuracy than the other ones. For this network, the global cost function weights used were α 1 = 0.3 and α 2 = 5.

Network C

101The last MTL network, depicted in Figure 4, consists again of three common hidden layers with 50 neurons each, followed by three branches, two with each two additional task-specific layers to predict respectively [O 2 ] and T, and then one without additional layers to predict [O 2 ] and T at the same time. The number of neurons of each task-specific hidden layer is 5, as in the network B. The global cost function weights used for the plots were α 1 = 0.3, α 2 = 5 and α 3 = 1. Those values were chosen because they result in the lowest MAEs (see discussion in Section 5). This network is of interest because of the additional task-specific layers, which are expected to improve the ability of predicting the temperature compared to the network B.

Metrics

102The metric used to compare results from different network models is the absolute error (AE) defined as the absolute value of the difference between the predicted and the expected value for a given observation. For the oxygen concentration of the j th observation

103The further quantity used to analyze the performance of the network is the mean absolute error (MAE), defined as the average of the absolute value of the difference between the predicted and the expected oxygen concentration or temperature. For example, for the oxygen prediction using the training

104where |S train | is the size (or cardinality) of the training dataset. For example, in this work |S train |=20000.

105The AE T and MAE T are similarly defined.

Luminescence Quenching for Oxygen and Temperature Sensing

106To demonstrate its advantages, the MTL approach was applied to the simultaneous determination of the oxygen concentration and temperature of a medium. There are different optical methods used to determine oxygen concentration since this is of great relevance for numerous research and application fields, ranging from biomedical imaging, packaging, environmental monitoring, process control, and chemical industry, to mention only a few [26]. Among the optical methods, a well-known approach is based on luminescence quenching [27][28][29].

107The measuring principle is based on the quenching of the luminescence of a specific molecule (luminophore) by oxygen molecules. Because of the collisions of the luminophore with oxygen, both the luminescence intensity and decay time are reduced. Sensors based on this principle rely on approximate empirical models to parametrize the dependence of the sensing quantity (e.g., luminescence intensity or intensity decay time) on influencing factors. The most relevant parameter, which can be a major source of error in sensors based on luminescence sensing, is the temperature of the luminophore, since both the luminescence and the quenching phenomena are strongly dependent on temperature [26].

108The conventional approach consists in relating the change of the luminescence decay time from the oxygen concentration through a multi-parametric model, called Stern-Volmer equation [28]. The value of the device-specific constants is then determined through calibration. The decay time can be easily measured by modulating the intensity of the excitation. The emitted luminescence is also modulated but shows a phase shift θ which depends on the decay time. Without going into the details of the analytical model, the measured quantity, the phase shift θ, is most frequently related to the oxygen concentration [O 2 ] and temperature T through the approximate equation [30] tan θ(ω, T,

109where θ 0 and θ, respectively, are the phase shifts in the absence and presence of oxygen, f and 1 − f indicate the fraction of the total emission of two components under unquenched conditions, K SV1 and K SV2 are associated (Stern-Volmer) constants for each component. Since the phenomena of luminescence and luminescence quenching are strongly influenced by the temperature, the parameters θ 0 , K SV1 , K SV2 , and f need to be modelled through different temperature dependencies [30]. The value of the parametrisation quantities is determined through non-linear regression. ω is the angular frequency of the modulation of the excitation light. Finally, Equation (7) must be inverted to obtain [O 2 ] as a function of θ, T, and ω. To be able to have more information as input to our network, we will not use a single ω frequency value, but 16. Let's define

110The goal of the network is to predict the oxygen concentration and temperature from an array of values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen ω i , with i = 1, ... 16 Summarizing, the conventional approach relies on the measurement of the temperature, which is then used to correct the parameters of the analytical model used to calculate the oxygen concentration [O 2 ] from the measured quantity, the phase shift θ of Equation 7. The inadequate determination of the luminophore temperature is one of the major sources of error in an optical oxygen sensor.

111The neural network proposed in this work defies the difficulties described above by simultaneously predicting both the oxygen concentration and the temperature using 16 values of r(ω, T, [O 2 ]) evaluated at a discrete set of sixteen values of ω.

Data Generation

112To have a large enough dataset to train and test the neural networks, synthetic data were used. The model described by Equation (7) was chosen to create the data, being as simple as possible but still capable to describe experimental observations. The values of the parameters for the synthetic data were determined from measurement performed under varying oxygen concentration and temperature conditions. For details on the samples and setup used for the determination of all the parameters the reader is referred to [30].

113The synthetic data consist of a set S of m = 25000 observations using oxygen concentration values uniformly distributed between 0 % air and 100 % air and five temperatures 5, 15, 25, 35 and 45 • C. Please note that in the following, the concentration of oxygen is be given in % of the oxygen concentration of dry air and indicated with % air. This means that 100 % air corresponds to 20 % vol O 2 . The m data were split randomly in a training dataset containing 80 % of the data (|S train | = 20000), used to train the network, and a development dataset containing 20 % of the data (|S test | = 5000), used to test the generalisation efficiency of the network when applied to unseen data.

114Typically when training neural network models, it is important to check if we are in a so-called overfitting regime. The essence of overfitting is to have unknowingly extracted some of the residual variation (i.e., the noise or errors) as if that variation represented an underlying model structure [31]. In the case discussed in this work, with increasing network complexity, the network will never go into such a regime since the development dataset is a perfect representation of the training dataset. This leads to almost identical metric values for the MAE for both S train and S dev , regardless of the network architecture effective complexity. This is what we observed while checking the metrics on the two different dataset S train and S dev . Overfitting becomes relevant when dealing with real measurements and not synthetic data.

Results and Discussion

115As described in Section 4, the applied problem investigated in this work is a complex one since the two quantities to be extracted from the data ([O 2 ] and T) depend from the input in different ways. It is therefore not obvious that is possible to build a model which is able to predict both [O 2 ] and T at the same time with good accuracy.

116The fist network investigated is the simple FFNN A described in Section 3.1. For this network, the number of neurons was progressively increased (n = 10, 30, 50, 80) to study how AE [O 2 ] and AE T are affected by an increasingly complex network and to determine if it is possible to obtain a good prediction. The calculated AE [O 2 ] for different O 2 concentrations were grouped in bins of 10 % air for a clearer illustration and are shown in Figure 5 as a box plot, where the median is visible as a red line. In all the boxplots in this paper the central box is the interquartile range and contains the middle 50% of the results, while the whiskers indicates the minimum and maximum of all the data [32]. As it can be seen in Figure 5, the results are quite poor ifn = 30 (results forn = 10 are comparable to those withn = 30 and are not shown here). AE [O 2 ] can assume values as big as 18 % air, with a broad distribution. Increasing the number of neurons in the hidden layers ton = 50 improves the prediction, reducing both the median and the distribution. A further increase ton = 80, however, does not result in better a prediction, showing the limits of this architecture to capture the details of the physical system.

117The results for the prediction of the temperature for the same three networks are shown in Figure 6. Also AE T improves initially by increasing the number of neurons ton = 50, but does not get any better when the number of neurons is further increased ton = 80. The boxplots of Figure 5 and Figure 6 show that AE [O 2 ] and AE T can assume quite high values, therefore demonstrating how the model is not really able to make a prediction with an accuracy that may be used in any commercial application.

118The performance of the three FFNN of type A can be summarized calculating the MAE as defined in Equation 6. The results are listed in Table 1. Consistently with what previously observed for the absolute error, the best network performance is obtained withn = 50, achieving a mean absolute error of MAE [O 2 ] = 1.7 % air and MAE T = 3.3 • C.

119For a practical application, the probability density distribution of the AEs for both parameters represent a much fundamental quantity since it carries information on the probability of the network to predict the expected value. For this reason, the kernel density estimate (KDE) of the distributions of the AEs was used for analysis. KDE is a non-parametric algorithm to estimate the probability density function of a random variable by inferring the population distribution based on a finite data sample [33].

120For the plots we have used a Gaussian Kernel and a Scott bandwidth estimation using the seaborn Python package [34]. The results for AE [O 2 ] and AE T for the three variations of FFNN A are shown in Figure 7 and 8, respectively. From Figure 7 and 8 can clearly be seen that increasing the number of neurons helps at the beginning. A further increase inn does not produce an improvement in prediction quality, on the contrary it gets worse. These results indicate that this simple FFNN can extract at the same time the two quantities with an accuracy which is at best poor and at worst unusable.

121Networks B and C try to address this problem by adding, as described in previous sections, respectively one and two branches after the last hidden layer in network A. The results of the prediction from the networks B and C are then compared to those from network A withn = 50. Figure 9 shows the calculated AE [O 2 ] for the three networks for the same [O 2 ] intervals as before as a box plot, where the median is visible as a red line.

122As it can be seen from Figure 9, the error in the prediction of network B is similar to that of network A. However, AE [O 2 ] is significantly improved when using network C. The additional branch in network C compared to network B clearly make the predictions much more accurate and, more importantly, much less spread around the median. The distribution of the AE [O 2 ] is better illustrated by plotting the KDE (Figure 10). The results indicate that the distribution assumes much smaller values and is peaked around zero for network C, in contrast with network A and B that have a quite wide tail that propagates toward higher values, reaching values as high as 10 % air for network A and 8 % air for network B.

123Finally, the results of the same analysis for the prediction of the temperature are shown in Figure 11. Here the calculated AE T for the same three networks is shown as a box plot, where the median is visible as a red line. As it can be seen from Figure 11, AE T is much more concentrated around the median when using network C. These results indicate that the prediction of the temperature is substantially improved when using this network. The distribution of the AE T using the KDE is shown in Figure 12. Thanks to the additional task-specific hidden layer of the network C compared to network B, the KDE is higher and peaked around zero, with practically no contributions above 5 • C.

124Finally, the performance of the three neural networks are be summarized by calculating the MAE as defined in Equation 6 for the oxygen concentration and the temperature prediction. The results are listed in Table 2. The network C outperforms all the other networks analyzed in predicting both [O 2 ] and T, achieving a mean absolute error of only 0.5 % air for the oxygen concentration and of 2.2 • C for the temperature. The results of Table 2 show that a simple FFNN as network A is not suitable to extract the two quantities of interest at the same time with good accuracy, since it is not flexible enough. The reason is that the two predicted quantities will depend on the same set of features generated by the hidden layers of network A. When network A tries to learn better weights to predict, for example, the temperature, these will, however, influence also the [O 2 ] prediction and vice-versa. So the common set of weights that are learned can not be optimized for each quantity separately at the same time. The MTL network B tries to address this problem with a separate branch of task-specific layers for [O 2 ]. The tests show however that this architecture is only marginally better for the prediction of [O 2 ] and even worse for the prediction of T. This is probably due an insufficient flexibility of the network and shows that even if only one parameter were of interest, e.g., [O 2 ] one single additional branch is not sufficient. A significant improvement is achieved with the MTL network C: the two task-specific branches give the network the flexibility of learning a set of weights (the ones in the branches) specific to each quantity, therefore achieving exceptionally good predictions on both [O 2 ] and T. Note that in this work the hyper-parameter tuning [15] for each network was not performed since the goal is not to achieve the lowest possible MAEs but rather to demonstrate the advantages and potential of MTL compared to classical FFNN approaches. For the implementation in a measuring instrument, therefore, a further phase of parameter tuning specifically dependent on the application would be needed. An interesting question is what is the mutual influence of the branches in network C when the loss weights α i are varied. To answer this question, a study was performed with various values of the global cost function weights. The results are shown in Table 3. By increasing progressively the weight for the temperature branch, α 3 , the MAE [T] is not reduced further and appears rather insensitive to α 3 . However, MAE [O 2 ] increases slightly, since the higher values of α 3 shift the relative importance of the tasks the network is trying to learn. Increasing the weight for the oxygen branch α 2 negatively affects the oxygen prediction since MAE [O 2 ] increases slightly. The reason why this is happening is that the α 2 is becoming much bigger than α 1 . This shows that for the prediction of the oxygen concentration both the branches predicting T and [O 2 ] at the same time and the one predicting [O 2 ] are important: neglecting one will make the other works less efficiently. The temperature, on the other had, is predicted almost with the same kind of accuracy independently of the weights α 2 , indicating that the temperature branch is not dependent from the [O 2 ] branch.

Conclusions

125In this work, different neural networks architectures were investigated to solve the problem of extracting multiple separate physical quantities at the same time from a single dataset. This type of multi-dimensional regression problems in physics can be challenging or impossible to solve if the mathematical models describing the functional dependence of the dependent variable from a set of independent variables are too complex or unknown. The proposed approach consists in using neural network MTL architectures, which are characterized by a common set of layers and then task-specific layers for each quantity to be determined. Thanks to the additional task-specific hidden layers, this type of networks can be trained to perform better than conventional FFNNs when the quantities to be predicted are characterized by a significant difference in physical behavior.

126The approach is demonstrated by applying it to oxygen luminescence sensing application. The conventional methods rely on a separate temperature determination which is then used as input to correct the extraction of the oxygen concentration from a dataset. This work demonstrates how it is possible to extract from a single dataset of phase shift measurements both the oxygen concentration and the temperature of the medium. The distributions of AE [O 2 ] and AE T are significantly narrower and much more concentrated around zero with the proposed MTL network (type C), as compared to FFNNs without specific and dedicated layers for each [O 2 ] and T. With the latter network the predictions are only based on common features (the ones generated by the common layers) that fail to be flexible enough to describe both [O 2 ] and T. The results indicate that from one single measurement, it is possible to determine two physically different quantities, one of which is dependent from the other. To the best of the authors' knowledge this is the first time that more than one parameter (here [O 2 ] and T) are extracted using a single luminophore by a single measurement channel under constant conditions. The implication is that a sensor using the proposed approach could be able to extract much more information from the measurements than one based on conventional analytical modeling.

127This work aims to open the road to new ways of extracting multiple physical quantities from a common set of data at the same time to achieve consistent results that are both accurate and stable. The described approach is relevant for many practical applications in sensor science and demonstrates that MTL architectures have the potential of revolutionizing the approach to non-linear multi-dimensional regression.

참고문헌 47건

  1. The Elements of Statistical Learning Springer series in statistics · Springer Science+Business Media · 2001 10.1007/978-0-387-21606-5
  2. Neural Networks: A Systematic Introduction 1996
  3. Neural networks for pattern recognition Choice Reviews Online · Association of College and Research Libraries · 1994 10.5860/choice.31-5500
  4. Capabilities of three-layered perceptrons IEEE International Conference on Neural Networks · 1988 10.1109/icnn.1988.23901
  5. Variations of Box Plots The American Statistician · Taylor & Francis · 1978 10.1080/00031305.1978.10479236
  6. On the structure of continuous functions of several variables Transactions of the American Mathematical Society · American Mathematical Society · 1965 10.1090/s0002-9947-1965-0210852-x
  7. Approximation capabilities of multilayer feedforward networks Neural Networks · Elsevier BV · 1991 10.1016/0893-6080(91)90009-t
  8. Dual Fluorescence Sensor for Trace Oxygen and Temperature with Unmatched Range and Sensitivity Analytical Chemistry · American Chemical Society · 2008 10.1021/ac801034p
  9. Dual optical sensor for oxygen and temperature based on the combination of time domain and frequency domain techniques Talanta · Elsevier BV · 2010 10.1016/j.talanta.2010.12.016
  10. Compact optical instrument for simultaneous determination of oxygen and carbon dioxide Microchimica Acta · Springer Science+Business Media · 2010 10.1007/s00604-010-0520-0
  11. Simultaneous, accurate lifetime determination of two luminophores using time-domain techniques 2011 10.1109/icsens.2011.6127121
  12. Optical methods for sensing and imaging oxygen: materials, spectroscopies and applications Chemical Society Reviews · Royal Society of Chemistry · 2014 10.1039/c4cs00039k
  13. Approximation by superpositions of a sigmoidal function Mathematics of Control Signals and Systems · Springer Science+Business Media · 1989 10.1007/bf02551274
  14. A novel planar optical sensor for simultaneous monitoring of oxygen, carbon dioxide, pH and temperature Analytical and Bioanalytical Chemistry · Springer Science+Business Media · 2011 10.1007/s00216-010-4617-4
  15. Principles of Fluorescence Spectroscopy Springer eBooks · Springer Nature · 1999 10.1007/978-1-4757-3061-6
  16. An introduction to statistical finance Physica A Statistical Mechanics and its Applications · Elsevier BV · 2002 10.1016/s0378-4371(02)01039-7
  17. Is Learning The n-th Thing Any Easier Than Learning The First? Neural Information Processing Systems · 1995
  18. A Model of Inductive Bias Learning Journal of Artificial Intelligence Research · AI Access Foundation · 2000 10.1613/jair.731
  19. Multi-Task Feature Learning Advances in neural information processing systems · 2007 10.7551/mitpress/7503.003.0010
  20. Convex Optimization Cambridge University Press eBooks · Cambridge University Press · 2004 10.1017/cbo9780511804441
  21. Peer Reviewed: Oxygen Sensors Based on Luminescence Quenching. Analytical Chemistry · American Chemical Society · 1999 10.1021/ac9908546
  22. An Introduction to Statistical Learning Springer texts in statistics · Springer International Publishing · 2013 10.1007/978-1-4614-7138-7
  23. Principles of Fluorescence Spectroscopy 2006 10.1007/978-0-387-46312-4
  24. A Survey on Multi-Task Learning arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1707.08114
  25. The Expressive Power of Neural Networks: A View from the Width arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1709.02540
  26. A brief review on multi-task learning Multimedia Tools and Applications · Springer Science+Business Media · 2018 10.1007/s11042-018-6463-x
  27. Applied Deep Learning: A Case-Based Approach to Understanding Deep Neural Networks 2018
  28. Multi-task Learning SpringerBriefs in computer science · Springer Nature · 2018 10.1007/978-3-030-01620-3_5
  29. Multitask Learning Machine Learning · Springer Science+Business Media · 1997 10.1023/a:1007379606734
  30. The expressive power of neural networks: a view from the width Neural Information Processing Systems · 2017
  31. (제목 없음) DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · Schloss Dagstuhl – Leibniz Center for Informatics · 2021 10.4230/lipics.cp.2021.42
  32. mwaskom/seaborn: v0.8.1 (September 2017) 2017 10.5281/zenodo.883859
  33. Universal Function Approximation by Deep Neural Nets with Bounded Width and ReLU Activations Mathematics · Multidisciplinary Digital Publishing Institute · 2019 10.3390/math7100992
  34. Optical Oxygen Sensing with Artificial Intelligence Sensors · Multidisciplinary Digital Publishing Institute · 2019 10.3390/s19040777
  35. A Model of Inductive Bias Learning Journal of Artificial Intelligence Research · AI Access Foundation · 2000 10.1613/jair.731
  36. Optical oxygen sensing with artificial intelligence 2019 10.20944/preprints201901.0047.v1
  37. A Survey on Multi-Task Learning IEEE Transactions on Knowledge and Data Engineering · IEEE Computer Society · 2021 10.1109/tkde.2021.3070203
  38. On the Structure of Continuous Functions of Several Variables Transactions of the American Mathematical Society · American Mathematical Society · 1965 10.2307/1994273
  39. Neural Networks Springer eBooks · Springer Nature · 1996 10.1007/978-3-642-61068-4
  40. Approximation by superpositions of a sigmoidal function Mathematics of Control Signals and Systems · Springer Science+Business Media · 1992 10.1007/bf02134016
  41. Applied Deep Learning Apress eBooks · Apress · 2018 10.1007/978-1-4842-3790-8
  42. Quenched-phosphorescence Detection of Molecular Oxygen RSC detection science series · Royal Society of Chemistry · 2018 10.1039/9781788013451
  43. Numerical Optimization 1999 10.1007/b98874
  44. The Elements of Statistical Learning Springer series in statistics · Springer Science+Business Media · 2009 10.1007/b94608
  45. Principles of fluorescence spectroscopy Choice Reviews Online · Association of College and Research Libraries · 2007 10.5860/choice.44-3876
  46. Neural Networks for Pattern Recognition 1995 10.1093/oso/9780198538493.001.0001
  47. Optical Technology until the Year 2000: An Historical Overview Springer series on chemical sensors and biosensors · Springer Nature · 2004 10.1007/978-3-662-09111-1_1