In this chapter, the ability of artificial neural networks was evaluated to predict the influence of amphiphiles as additive upon the electrical percolation of dioctyl sodium sulfosuccinate (AOT)/isooctane/water microemulsions. In particular, water/AOT/isooctane microemulsion behaviour has been modelled. These microemulsions have been developed in presence of 1-n-alcohols, 2-n-alcohols, n-alkylamines and n-alkyl acids. In all cases, a neural network has been obtained to predict with accuracy the experimental behaviour to identify the physico-chemical variables (such as additive concentration, molecular mass, log P, pKa or chain length) that exert a greater influence on the model. All models are valuable tools to evaluate the percolation temperature for AOT-based microemulsions.
- artificial neural network
Microemulsions are colloidal self-organized systems, composed of a polar phase, in our case water, and a non-polar phase, isooctane, stabilized by a surfactant film that causes the formation of droplets of the dispersed phase in the continuous phase. In our case, the surfactant used was the AOT (dioctyl sodium sulfosuccinate) whose main advantage is the formation of a stable microemulsion in wide concentration ranges. Actually, this kind of microemulsion is known as water in oil (w/o), that is, water is the dispersed phase and continuous phase will be the apolar medium.
Internal dynamics of microemulsions has been largely studied, especially on the phenomenon of electrical percolation [1–4]. Electrical percolation is characterized by an increment in electrical conductivity when the temperature, or the volume fraction of the dispersed phase, reaches a critical value . In this sense, the change in electrical conductivity is very characteristic, with variations from small values to large values, which is the typical behaviour of small droplets dispersed in a non-conductive continuous medium [5, 6].
Relationship between electrical percolation and constant rates was demonstrated by Lang and co-workers [7–9], and they showed that the exchange of materials between droplets has influence on the rate of fast chemical reactions in w/o microemulsions . Mathew et al.  observed that percolation threshold is altered by small additives concentrations such as cholesterol or gramicidin . These findings have been confirmed by literature during the last decade [11–14]. In support of this, we can say that percolation is not a consequence of bicontinuous structures presented in the medium, because the structure of discrete droplets is not changed . When percolation threshold is approached, the number of collisions presents a huge increment, leading to the formation of droplet clusters with interdroplet channels that allow transport of ions, giving rise to an increase in conductivity .
In the last decade, our research group has studied the effects of different additives on the electrical conductivity, and other properties, for water/AOT/isooctane microemulsions (aerosol OT or dioctyl sodium sulfosuccinate, isooctane and water) [5, 15–22]. The influence of different additives was explained on the basis of changes in the surfactant film structure and different solubility of the complex system. The manuscript shows the artificial neural networks (ANNs) as a valuable tool to predict percolation threshold for microemulsions (AOT/isooctane/water) in the presence of different amphiphiles, because there are no mathematical tools to predict the influence of additives on the internal dynamics of microemulsions. The different additives were molecules with amphiphilic character composed of a variable apolar hydrocarbon chain, with a polar head group. In particular, the effect of 1-n-alcohols, 2-n-alcohols, n-alkylamines and n-alkyl acids was modelled. The effects of these compounds have been previously described in the literature (vide infra).
In the last two or three decades, artificial neural networks have become one of the most applied methodologies to develop models for non-linear behaviours [23–25]. ANNs are a mathematical method that tries to imitate the reasoning of human brain . Individual units, called neurons, form neural models that are the fundamental unit to model complex problems . For this reason, neural models are being applied in different areas of study, such as (i) hydrology to predict the discharge of rivers and prevent floods and water loggings in spite of the large number of variables involved in the process [25, 27], (ii) chemistry to model the infinite dilution activity coefficients of halogenated hydrocarbons that provide important information about the solute-solvent interactions , (iii) energy science to model wind speed which is important for renewable energy and energy market efficiency , (iv) biorefinery to determine ideal conditions to obtain new oligosaccharide mixtures production from sugar beet pulp , or, even, (v) business, management and accounting to predict overall bank customer satisfaction and to prioritize factors for customer satisfaction , inter alia.
In our research group, we use a multi-layer perceptron (MLP), which can model complex non-linear relationship between independent and dependent variables. This kind of ANNs is one of the most used neural models in the literature [23, 31, 32].
2. Materials and methods
2.1. Percolation temperature determination
An experimental procedure to determine percolation temperature has been described previously [20–22]. A Crison GPL 32 conductivity meter was used. Percolation threshold (Tp) can be represented using the method described by Kim et al. , or using the sigmoidal Boltzmann equation (SBE), suggested by Moulik et al. .
In Eq. (1), k is the conductance, T represents temperature and ΔT is the constant range of temperatures. In the equation, the different subscripts i, f and p represent the initial state, final state and percolation threshold, respectively. Percolation temperatures obtained by both methods [33–34] are compatible, as we can see in Figure 1. Tp obtained from the SBE  will be used in the discussion.
2.2. Artificial neural networks
The ANN procedure starts choosing different groups of data. The first group, called training group, is formed by the training cases used to develop the neural model. The second group, called validation group, is formed by reserved cases used to validate the model. When two groups are selected, neural models must be developed using trial and error technique to determine the best configuration parameters (weights and bias values) and the best model topology to predict the desired variable [24, 27, 35, 36].
The training cases are presented to the first layer, called input layer, which is formed by different neurons to receive the input information. This information is presented as an input vector (Eq. (2)), and it is propagated using a specific function, called propagation function, from input layer to the first intermediate layer where learning process occurs (Eq. (3)), and then to the final layer [24, 27, 35, 36]. This equation is implemented in each intermediate and output neurons. Propagation function converts all input information into one signal response (S). The input values (xi) are processed with the neuron weight (wik) linking the intermediate neuron (k) with the previous neuron (i), and added to the bias value associated to neuron k (Figure 2).
The single data (S) is treated by an activation function that provides an output neuron signal (yk). This procedure is performed in each neural neuron to obtain a final value (predicted value (ypredicted)). There are different activation functions, but the most used activation function is the logistic function [24, 36–39], which is the function used in all the studies conducted by our research group (Eq. (4)).
To facilitate the model topology identification, in our research group we use the following terminology [24, 27, 35]: Nin, Nk-1, Nk-2, Nk-3 and Nout, where Nin and Nout represent the neurons in the input and output layers, respectively. Nk-1, Nk-2 and Nk-3 are the neurons in the first, second and third hidden layers, respectively. In Figure 3, we can see an example of neural models with five neurons in the input layer, three intermediate neurons in the next layer and only one output neuron.
2.3. Neural power prediction
Neural models learn from the training cases and generalize the acquired knowledge to validation cases, which provide an idea of neural model power prediction. This power prediction must be checked using different adjustment parameters [24, 27, 35]; in our research group, we usually used (i) the determination coefficient (R2) (Eq. (5)) and (ii) the root-mean-squared error (RMSE) (Eq. (6)). As we know, good determination coefficient is necessary, a small error between real data and predicted data is also necessary ; for this reason, RMSE must be checked to know how close to zero is the model error. The best models have been chosen based on the lowest RMSE in the validation phase.
2.4. Equipment and software
All models have been implemented in two servers specifically designed with a client-server architecture. Clients running virtual machines optimized for peak performance implementation. ANN models were developed using EasyNN plus (from Neural Planner Software Ltd.), and data were fitted, and plotted, using commercial software (Microsoft Excel from Microsoft, USA) and Sigmaplot Trial versions, respectively. The figures were developed using Power Point from Microsoft. Geometrical parameters of amphiphiles were determined by MM2 with CS Chem Bats 3D Pro 4.0 by Cambridge Soft Corporation, based on QCPE 395 [40, 41].
3.1. Percolation prediction in AOT-based microemulsions
Our first tests for the prediction from the influence of additives on the percolation phenomenon were performed to analyse the influence of salts on the percolation temperature of AOT-based microemulsions . For this neural model, 58 cases were used [5, 43–45] in which the kind of salt, concentration and microemulsion composition were varied . In these neural models, (i) W value of the microemulsion (W = [H2O]/[AOT]), (ii) additive concentration ([Add]), (iii) molecular weight of the additive (Mw), (iv) atomic radii of salt components (ratomic) and (v) ionic radii (rionic) of salt were used as input variables . In this case, the best ANN presents a topology with five input nodes, two middle layers with 11 and seven nodes and one output neuron (see Figure 4) .
The obtained root-mean-squared error was 0.18°C (R = 0.9994) for the training phase and 0.64°C (R = 0.9789) for the prediction set . It should be emphasized that power predictions for all salt families were satisfactory (see Figure 5) . Comparing the R values for lithium, sodium and potassium salts, we can see that these values were 0.8997, 0.9993 and 0.9970, respectively . Anion analysis shows that the correlation coefficients were 0.9953, 0.9971, 0.9989, 0.9762 and 0.9712 for the different salts, fluorides, chlorides, bromides, iodides and perchlorates, respectively . In the developed model, there are two cases having a significant deviation (cases with HCl as additive) . Experimental and predicted values for these two cases present standard deviations of 1.01 and 1.09°C, which correspond with errors below 3% .
Since the efficiency of ANNs to predict the influence of salts on the electrical percolation has been demonstrated, we have addressed the possibility of extending our studies to other additives.
Our laboratory has conducted extensive studies on the effect of additives on the internal dynamics of microemulsions in recent years ; so, the next step was the application of ANNs on the systems in which the additives were small organic molecules, particularly ureas and thioureas . In this research, the developed ANN model presents a topology with three input nodes, one hidden layer composed for two neurons and one node in the output layer . ANN model presents a correlation coefficient of 0.9251 for the training phase and 0.9719 for the validation phase  (see Figure 6). To develop the best model, different input variables were assayed, including (i) critical molecules volume and (ii) molecular weight, (iii) water solubility, (iv) log P and (v) concentration for additive component . Nevertheless, some of these variables had no statistical importance to improve the model results, and therefore only (i) additive concentration, (ii) log P and (iii) W value of the microemulsion were used as input variables . With these new input parameters, we can observe that the new neural model is simpler than the previous model developed for salts as additives . In this case, 95 microemulsion compositions were used in the training phase and 15 microemulsion compositions were used in the validation phase [5, 47, 48]. The neural model for salts as additives present an average error equal to <0.3 and <1.4% for the training and validation phases, respectively , while for the model for ureas and thioureas, the error was ≈1% for the training phase and 0.9% for the validation phase . In this neural model, the ANN presents bigger errors for the training and validation phases against the previous model (vide supra) .
Nevertheless, these results prove that our ANNs are valid predictive tools for percolative phenomena of microemulsions. In fact, satisfactory results were found for crown ethers [49–53]–both crown ethers and aza-crown ethers–glymes and polyethylene glycols [54, 55].
Previously, huge numbers of neural models had been developed to obtain a good prediction model. In this sense, the best neural model, with topology 10-8-1, presents a good root-mean-squared error around 1.169°C . This error is in concordance with other neural models developed for different additives described above. Different input variables were chosen due its relationship with the nature and structure of the molecule, which influence the packing capabilities of surfactant film . In this sense, the following variables: (i) additive concentration, (ii) number of atoms that conform a ring in a crown ether, (iii) number of heteroatoms, (iv) number of oxygen atoms, (v) number of nitrogen atoms, (vi) number of benzene rings in the molecule, (vii) molecular mass, (viii) log P, (ix) maximum number of bonds between rings and (x) minimum number of bonds between rings were used as input variables for neural model . Each variable provide different information for neural model such as: (i) additive concentration provides information about the impact of different additive amounts, (ii) number of atoms, molecular mass, bond and rings provide information about structure that can affect interactions with surfactant and (iii) log P provides information about polarity . With the use of these variables, our research group has been able to simulate the effect of four different families of structurally related compounds (crown ethers, azo-crown ethers, benzo-crown ether and dibenzo-crown ethers) .
For the former, two series of models were developed, one for glymes and the other for polyethylene glycols. Available datasets for glymes  consisted of 44 microemulsion compositions and for polyethylene glycols [55–57] consisted of 82 microemulsion compositions.
The best developed neural model to predict glymes percolation temperature presents a topology 5-5-1, that is, five nodes in input layer, five nodes in the only intermediate layer and one neuron in the output layer . This neural model has been trained with 32 experimental cases, and 11 experimental cases were used to validate the neural model . Figure 7 shows a scheme of this neural model . Best polyethylene glycols model presents a topology with five input neurons, three intermediate layers with eight, eight and five neurons and an output layer with one node (see Figure 8) . This model was developed using 68 training cases and were validated with 14 experimental cases . These two neural models present RMSE values of 0.19 and 0.06°C for glymes and polyethylene glycols training phases, respectively, with correlation coefficients of 0.9996 and 0.9999 , on the other hand, for the validation phase, the models presents RMSE values of 0.75, and 0.10°C, respectively, with correlation coefficients of 0.9938 and 0.9952 .
Crown ethers, glymes and polyethylene glycols are similar molecules; however, the first is characterized by being cyclic molecules and the others are linear. Beside this, crown ethers have a complex behaviour when they are used as additives in AOT microemulsions; this behaviour contrasts with glymes and polyethylene glycols. In crown ether microemulsions, percolation temperature increases slowly with concentration, nevertheless the value begins to decrease from a certain value, so higher concentrations reduce the percolation threshold. This behaviour is a combination of the two effects: (i) the microdroplet structure reinforcement by ion capture and a subsequent transference to surfactant film and (ii) the destabilization effect due to the non-polar region of the additive. On the other hand, glymes and polyethylene glycols microemulsions behaviour is simpler than crown ethers behaviour, mainly like the effect exerted by urea and other small organic molecules (vide supra). Due to the impossibility to develop an accurate prediction model for crown ethers, glymes and polyethylene glycols, it is necessary to limit the inputs variables to molecular descriptor and concentration in order to develop a simple model.
Another neural model has been developed for similar additives, propylene glycols, which produce a decrease in percolation temperature . However, neural model cannot predict successfully the predicting percolation threshold in presence of these kinds of additives. In this sense, a single neural model for three additives is not possible yet. Even though, acceptable root-mean-squared errors were obtained with the two models described in this work.
Neural model topologies for glymes and glycols are different, as we can see above (see Figure 7 and Figure 8). Neural models for glymes present just one intermediate layer, while neural model for polyethylene glycols present three intermediate layers . Log P, which provides information of polarity for neural generalization, was not the most important input variable  and has been relegated to a second position by additive concentration in both models . The importance of a non-dimensional parameter is obtained from the sum of importance of each input neuron with intermediate neurons . Despite the difference in the order of these two variables, the importance of every input node was in a similar range for both models, which indicates similarity .
3.2. Percolation prediction in AOT-based microemulsions in the presence of amphiphiles
In order to evaluate the effect of amphiphiles on percolation threshold, the influence of 1-n-alcohols , 2-n-alcohols , n-alkylamines [60–63] and n-alkyl acids [64, 65] had been analysed. This allowed us to estimate the influence of the chain length of the molecule with constant head group and also the influence of the head group while the chain length remains invariant (see Figure 9).
The alcohols (both 1-n-alcohols and 2-n-alcohols) were modelled using the same ANN . The best neural model presents a topology with five input nodes, a single intermediate layer with 11 neurons and one node in the output layer to predict percolation temperature (5-11-1)  (Figure 10). This model was developed with five input neurons: (i) additive concentration [Add], (ii) molecular weight (Mw), (iii) number of carbon atoms (n°C), (iv) pKa, and (v) log P .
This neural model was trained with 41 microemulsion compositions (67.2% of the total cases) and 20 compositions for valuation phase (32.8% of the total cases) . Best neural model, 5-11-1, presents a root-mean-squared error of 0.73°C (R = 0.9939) in the training phase and 0.98°C (R =0.9869) for the validation phase  (see Figure 11 and Figure 12).
In the case of carboxylic acids , the best neural model presents a topology with five neurons in the input layer, two intermediate layers with five and 10 neurons and an output layer with one node . Related to this model, we can check that the most important variable, according to importance value, is the acid concentration, followed by log P, the number of carbons, chain length (these two input variables with a similar importance) and finally, pKa. Neural models present a root-mean-squared error for the training phase of 0.41°C, corresponding to a 0.72% average percentage deviation (APD) . These models were checked with two different validation data groups: the first one, with similar cases used to train the model, presents an RMSE of 0.61°C (APD of 1.20%) and the second group was composed of two unknown n-alkyl acids (not previously trained), and presents an RMSE of 0.75°C (APD of 1.43%), (Figure 13) .
The input variables used for the n-alkylamine model were as follows: (i) additive concentration, (ii) log P, (iii) pKa, (iv) hydrocarbon chain length and (v) molecular mass of the additive . Different neural models were developed with different 55 amine experimental cases, where 42 experimental cases were used to train the models and 13 experimental cases were used to validate the model . The best neural model presents a topology with five input nodes, two intermediate layers (with 15 and 10 nodes) and one node in the output layer to `predict percolation temperature . This model presents a root-mean-squared error of 0.08°C, with correlation coefficient of 0.9999, for the training phase, and an RMSE of 0.54°C, with R of 0.9976 for the validation phase, see Figure 14 .
To summarise, we have demonstrated that ANNs are useful tools for percolation phenomena prediction. Unfortunately, at the moment, we are not able to design a single neural model architecture for additive effect on percolation. There is no doubt that it will be necessary to improve the number of families of molecules used as additives in the design of new models. This way, a single satisfactory model, which is able to predict the behaviour of different additives in a microemulsion system, will be possible.
Dr. G. Astray thanks Consellería de Cultura, Educación e Ordenación Universitaria, for the Postdoctoral grant (Plan I2C), P.P.0000 421S 140.08. Dr. A. Cid acknowledges the post-doctoral grant SFRH/BD/78849/2011 and Pest-C/EQB/LA0006/2013 granted to Requimte, both from the Portuguese Foundation for Science and Technology. The authors thank to European Union for FEDER grant.