Towards automatic construction of multinetwork models for heterogeneous multitask learning
Abstract
Multitask learning, as it is understood nowadays, consists of using one single model to carry out several similar tasks. From classifying handwritten characters of different alphabets to figuring out how to play several Atari games using reinforcement learning, multitask models have been able to widen their performance range across different tasks, although these tasks are usually of a similar nature. In this work, we attempt to widen this range even further, by including heterogeneous tasks in a single learning procedure. To do so, we firstly formally define a multinetwork model, identifying the necessary components and characteristics to allow different adaptations of said model depending on the tasks it is required to fulfill. Secondly, employing the formal definition as a starting point, we develop an illustrative model example consisting of three different tasks (classification, regression and data sampling). The performance of this illustrative model is then analyzed, showing its capabilities. Motivated by the results of the analysis, we enumerate a set of open challenges and future research lines over which the full potential of the proposed model definition can be exploited.
I Introduction
Artificial neural network (ANN) models have seen their popularity rise and fall since they were proposed in the mid20th century [31]. These oscillations can be paralleled with the proposals of new and effective structures and training algorithms, and the results these propositions provided being surpassed by other models and methodologies. Now at its peak, their popularity has experienced its most recent increase thanks to the conception of deep neural networks (DNN), an ANN structure composed of several layers of neurons that interact with each other, and can have different structures and purposes inside the same model. These blackbox models are theorized to perform deep learning (learning highabstraction features of the data) that eventually produces high quality results in several domains.
Due to their high modeling power, the form of DNN that we know today has broken through the barriers of the tasks they were designed for in the last millennium [24]; classification and regression of generic data structures with little or no exploitation of prior knowledge about said structures. Recently, DNN architectures were developed to manage different tasks with specific types of data, for example image classification using convolutional operations [23] or dealing with temporal data using recurrent connections [14].
Despite the high modeling capacity of the DNNs, highcomplexity tasks sometimes require more sophisticated model layouts. Because of this, multinetwork models that can cope with these complex jobs were designed. One such paradigm is generative modeling, which consists of generating data similar but not equal to that known [12, 13, 19]. Even though single DNN models have been proposed for this type of task, the two most popular DNNbased generative models are twonetwork models; generative adversarial networks (GAN) [12] and variational autoencoders (VAE) [19]. These two models share similarities in terms of structural composition, as they both are composed of two individual  albeit connected  DNNs. The structural design of these two models was handmade according to a predefined goal: the encoderdecoder structure in the VAE, and the generatordiscriminator routine in the GAN. Even though extensions of these models have already been carried out [1, 9], these approaches were developed in restrictive frameworks that only permitted relatively small, structurewise modifications. These extensions consist of enhancing the model structure using additional networks that can serve different purposes to those already existing in the model.
In addition to multimodel proposals designed for high complexity tasks, other approaches attempt to comprise more than one functionality to a single network. This problem is known as multitask learning (MTL) [3], and consists of using one single model to learn several tasks of similar domains [26, 27], these domains usually consisting of classification, regression or reinforcement learning. The usage of DNNs to manage this kind of problems has produced interesting approaches in a very wide range of domains, e.g., using a single model to automatically play different Atari games with reinforcement learning [6] using supernetworks or classifying characters from different alphabets [26] using combinations of convolutional cells.
In this paper, we address another, more general class of MTL, in which the different tasks not necessarily have to belong to the same domain (e.g., class prediction and data generation) and are solved at the same time. For this purpose, we take a step forward, introducing a model that can be composed of several interconnected DNNs of different types, capable of handling the heterogeneity in the set of tasks of the heterogeneous MTL (HMTL). We understand that such complex combinations of tasks require an advancement in the multinetwork model design; a step forward in the automated generation of this kind of models. Therefore, we focus our efforts on providing a modeling scheme consisting of DNN building blocks placed in an interconnected structure, flexible and scalable, so that the model structure can easily be optimized; the VALP.
The main contribution of this work is threefold: (i) We provide a formal definition of the VALP as a general neuralnetworkbased model to deal with HMTL. This highabstraction definition aims at setting as few constraints as possible in terms of structural flexibility when designing a VALP implementation. (ii) From the abstract formalization, we present a functional framework to illustrate the potential of the model. It is accompanied by an example of how a model instantiation that has to deal with three tasks of different characteristics can be created using the VALP definition. As it can be inferred, designing the structure of a model that can cope with such an extensive variety of problems is not a trivial task, and it is not examined in this work. Therefore, (iii) we thoroughly discuss several open challenges and future research lines.
The rest of the paper is organized as follows: We introduce the VALP definition in Section II. We then identify a set of components that can be included into any VALP implementation in Section III. In section IV, we provide an illustrative example of a VALP instantiation. This is followed by the experimentation part that shows the viability of the VALP for the HMTL problem in Section V. Regarding these results, we continue with a detailed future work part, in Section VI. Finally, conclusions drawn from this experimentation part can be found in Section VII.
Ii VALP definition
Definition 1.
A data unit is a pair . represents the data with variables, which share the type.
Definition 2.
A model input is a data unit provided to the VALP.
is the set of all the inputs of the model: .
Definition 3.
A primary network is a DNN. It is defined as a 5tuple, . is a set containing the inputs of the network, where each is a data unit. is a function representing how all are combined to form another data unit, the definitive input of (e.g., concatenation). The value of can vary over the different phases of the model life cycle (for example, a VAE decoder takes its input from an encoder during the training phase, and from a when sampling). contains the type (e.g., Decoder) of the primary network, and , its parametrization (e.g., hidden layer specification). is a data unit, and represents the output of . It can be also considered an intramodel output.
is the set containing all the primary networks in the model.
Definition 4.
A model output is a pair . is the set of data units that receives from the networks in . represents how all are combined to form the final th output of the model, a functionality similar to .
is the set of all model outputs; .
Definition 5.
A VALP is a 4tuple . , represents the model components. is a set of connections that determine how the model components are interconnected. is a set of triples that defines how the model performance is assessed. , where represents a loss function, is a prediction (a data unit) made by the model (note that it can be either an intramodel or a model output), and is the ground truth that uses to measure and improve the performance of the model with respect to a particular task.
represents the model hyperparametrization. It contains, at least, the parameters that specify how the different are combined to form a single loss function that can be used to optimize all the tasks of the model in a single step.
Definition 6.
A model connection is defined as , where represents the data unit providing the information, and represents the model component the information is delivered to. , represents indices of the variables transported from the connection input to the connection output .
We define as the set of all the connections of the model.
The and sets of the can be used to form a directed graph (digraph) . In a digraph, the number of arcs (connections) ending in a vertex is called the indegree of said node, whereas the number of arcs starting in a node is called the outdegree. Regarding these two characteristics, we differentiate three types of nodes in this digraph: (i) source nodes; those having an indegree value of 0, (ii) sink nodes; those with an outdegree value of 0, and (iii) internal nodes, which have both indegree and outdegree values strictly larger than 0.
In the VALP, the model connections are represented with arcs and there is a source node for each element in , a sink node for each element in , and an internal node for each element in .
Iii VALP instantiation
Once the VALP has been formally defined, we identify a collection of elements that can be part of an instance of a VALP model. More specifically, we enumerate some key components indispensable for the correct operation of a VALP instance: data types and primary networks. We would like to make clear that the following lists neither intend to encompass all the items a VALP can be composed of, nor limit future additions to the pool of VALP components. In this regard, we expect the VALP to be able to embrace an extensive set of data types and a variety of primary networks.
Iiia Data types
The data type component in the data unit defined in the previous section presents an elegant manner to handle the heterogeneity required to the model in terms of data outputs. We therefore define four data types to which data units of a VALP could adhere to:

Discrete : This data type consists of a vector codifying discrete values.

Numeric : This data type consists of a vector of numeric values.

Samples: Similarly to Numeric, this data type consists of a vector of numeric values.

Features: This data type also consists of a vector of numeric values.
Despite technically containing the same type of information, we choose to define Numeric, Samples, and Features as different types to improve the expresiveness of the model. For example, at the time of setting restrictions when creating a VALP instance (e.g., asserting that samples are provided where samples are due, and idem for other types, such as regression or classification), the data types will turn out useful, since, as well as improving the understandability of the operation of the model, they will improve the simplicity of said rules.
IiiB Primary networks
Once we have identified a subset of data types that can be used within a VALP, we can similarly characterize a set of primary DNNs that can be included in the component of a VALP.
 Generic MLP, :

A regular MLP that maps the provided input to an output. It can take any type of data unit as input. The data unit it produces can have different interpretations: numeric values (in any case) or samples (exclusively if it received samples). The activation function in the output layer is the identity function.
 Discretizer, :

Similar to a regular MLP, this network takes data units of any type as input, and produces data units of the Discrete values type. Its goal is to discretize values, mainly for classification purposes. It has a softmax activation function in the last layer.
 Decoder, :

The decoder receives Numeric or Feature data units, interprets them as means and variances of a , and uses samples generated from that distribution to produce Samples data units. Its internal structure is also an MLP.
 Convolutional network, :

This primary network exclusively consists of operations commonly found in Convolutional neural networks (CNNs): convolutional and pooling layers. It can only take and produce data of the type Feature. Its goal is to maximize the performance of a VALP instance when working with certain data structures (e.g., image or sequential data).
 Transposedconvolutional decoder, :

This primary network can be seen as a combination of and . It can only be composed of transposedconvolutional operations, and it can take Features, Numeric (guaranteed), or Discrete (optional) values. It produces Samples.
IiiC Model loss function
A straightforward approach for training the model is to use the regular backpropagation algorithm combined with a variant of the stochastic gradient descent (SGD) algorithm. These techniques optimize a loss function defined on the parameters of a model so that the performance of the model can be as close to perfection as possible. The VALP performs many approximations at a time, which means that various loss functions (with respect to both the model outputs and intramodel) need to be optimized in parallel. For a model that needs to optimize three different tasks (regression, classification, and data sampling), the following four kinds of loss functions have been identified as necessary.

Regarding the samplegeneration outputs of a model (Samples), we need a loss function that can measure the likelihood of the model generating data that follows the distribution we are interested in.

Related to the regression output of the model (Numeric), we need a metric that can compute the difference between two vectors of numeric values.

For the classification outputs of a model (Discrete), we need a loss function that can compare discrete outputs with predictions of the same type.

Regarding the output of the primary networks whose outputs are used in a or , we need a metric that forces that output to approximate a distribution that we can reproduce.
It is important to note that some of these loss functions could have larger magnitudes than others, thus hoarding the effectiveness of the SGD algorithm. This could lead to some loss functions being ignored by the algorithm, producing a defective model. To address this issue, the VALP model includes one hyperparameter , which scales the different subloss functions. This approach is inspired by the VAE [2]. It contemplates a parameter that scales the two subloss functions present in a common VAE.
IiiC1 Data unit combination
We also define example functions that can be used for the and presented in the VALP networks and outputs, respectively:
Example 1.
Being, for example, a set of data units, we define the concatenation function as a function that receives a set of data units, and produces another one:
And, similarly, the addition function:
.
In both cases, ,
,
.
.
When consists of a single element, .
Iv VALP instantiation
The study performed in this work over the considers an implementation^{1}^{1}1The code developed to perform the initial exploration in this paper can be found in https://github.com/unaigarciarena/VALP that consists of a reduced version of the general VALP defined in Section II. It does not cover all its possibilities, but rather is an initial exploration with the aim of displaying its potential, and has therefore many extension possibilities. The reduced VALP version considered in this work contemplates only three of the data types introduced in the preceding section. We restrict all data types of all the data units in a VALP to the following values Numeric, Discrete, Samples, .
Accordingly, only a subset of networks can be part of the VALP model definition of this work: .
The Generic MLP essentially transforms information into a different encoding, therefore, it can serve as an encoder that complements a Decoder. To avoid defining a primary network with the sole functionality of encoding data, we allow the interpretation of the output of any Generic MLP (a vector of numeric values) as the and parameters a decoder needs.
Fig. 1 describes these primary networks and the way they are related to the different data types.
Because we prime structural flexibility in the general VALP (and thus, in this example), the primary networks introduced in the previous section should be free to interact with each other in any possible way. However, in order to maintain type consistency (both in the output and throughout the model), a set of rules that restrict the model structure need to be imposed. In this regard, we force the decoders in a VALP configuration to have at least one Generic MLP primary network providing input to a decoder. This requirement is introduced due to the necessity of the decoders to have a numeric, optimizable input that can be trained to follow a certain distribution and can later be changed by new samples that follow said distribution.
In Fig. 2 an example of a VALP model designed for solving three different tasks (classification, regression and sampling) is shown. It is composed of five primary DNNs, it receives a single input (Data), and it provides three outputs, and , where , , and . In the figure, circle nodes represent source nodes, triangular nodes represent internal nodes, and square nodes are sink nodes.
Iva Formal definition of a VALP instance
In addition to the graphical illustration shown in Fig. 2, a formal definition of the example model is presented:
We define . , where are the 10 features of the database, and .
We define .
Because all the network types can take are based on MLPs, any is composed of three vectors: , which specifies the function used to randomly initialize the primary network parameters, , referring to the activation functions in each layer, and , the number of neurons in each layer. is the number of layers in the primary network, excluding the input layer, which needs no parametrization, and including the output layer.
We do not define every aspect of each component in this VALP example for the sake of keeping the definition compact. We avoid definitions of elements that are repetitive or redundant and do not contribute to the further understanding of the model concept. For example, we do not define for each .
, where , , (Note the correspondence later, when defining the connections), , and . , where , .
, where , , , , and . , .
, , ,
, where ,
, where , . Note that, when training the model, , but that changes at the time of running the model;
We define .
, where , and
, where , and
, where , and
We define the model instance shown in Fig. 2. This VALP example is required to produce numeric and discrete predictions, as well as a sampling output. We assume that we are working with a single dataset “Data”, that is composed of 10 features, and where each example is labeled. The vector of these labels forms . Analogously, we have an vector with a numeric value associated to each entry in the dataset. Finally, we have 5 extra features that we would like to reproduce (generate new samples), grouped in a vector (one attached to each example in the Data, similarly to and ).
, where . is the loglikelihood function, is the data provided in the beginning of the problem definition, and . . is the mean squared error (MSE) function, is the data provided in the beginning of the problem definition, and . . is the cross entropy function, is the data provided in the beginning of the problem definition, and . . is the KullbackLeibler divergence (KL), , and .
The hyperparameter of the model is a tuple of a single element , which parametrizes . is a set of tuples , where each tuple contains model components and a scalar. The loss functions defined in the model components and the scalar in the tuples are multiplied together, and then added up to form , the definitive loss function used to train the model.
We define .
, where , , (note the correspondence between this connection and the previously defined ).
, where , . , where , . , where , . , where , . , where , . , where , . , where , . , where , .
Although the introduced VALP model assumes fixed and , we can think of a scenario where this is not the case. In this regard, the VALP is not a static model structurewise, as and can be expanded once the model has been learned, which would trigger additions in either or , or both. For example, if we added a new to , we could update the model by adding a new to and two connections, one from to and another one from to . Such a scenario could be particularly useful for incrementally learning VALP instances.
V Testing the potential of a VALP
We designed an artificial problem to illustrate the potential of the VALP. We have selected the widely known FashionMNIST [34], which is more complex than MNIST and has been extensively used for research on DNNs [5, 17]. This dataset consists of 60,000 train and 10,000 test images, which are 28 28 pixel, grayscale images of clothing, each belonging to a certain class. There are 10 items of clothing overall; Tshirt, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, and Ankle boot. The usual supervised task associated to this dataset is to predict the class each example belongs to.
To illustrate the model instantiation at its fullest potential, we define the multitask fashionMNIST problem as composed of three different tasks:

Classification: 10class classification as usually defined in the fashionMNIST problem.

Regression: Firstly, we have computed a histogram for each of the images regarding the grayscale values, with 32 bins. Then, these histograms were scaled between 0 and 1. This way, we have a 32value regression problem to solve.

Generation: The generation of samples similar to those given to the model in the input.
In Fig. 3, we show three examples of the data available in the fashionMNIST dataset, with the values desired to be obtained for each one, in each task.
Va Model parameters
To initialize the model structure, the only information required is the number and types of inputs and outputs together with their corresponding dimensions. In our case, we can define and , where , and . where , and , where , and , and , where and . .
The next concern is to design a model (i.e., the primary networks and connections in the model) that can provide predictions for all required outputs, while matching the appropriate data type (Section IIIA).
The choice of the loss functions is a relevant decision to be made in this framework. As mentioned in Section IIIC, four necessary loss function types have been identified:

For the regression output, , where is the mean squared error between and :
(1) 
For the classification output, , where is the cross entropy between and :
(2) 
For the sampling output, , where is the loglikelihood of being :
(3) where represents the probability distribution (predicted by a Generic MLP) inside the model, before any Decoder in a VALP.

For each output of the generic MLPs whose output () feeds a decoder, , where is the KL:
(4) As commonly, .
This model also considers different optimization pressures [2] on each of the terms of the global loss function. We add a scaling vector parameter (), so that the optimization of the combined loss function is correctly performed.
VB VALP structure designing algorithm
For this example, we have designed a procedure for creating the VALP structure. As it will be discussed in Section VI, the conception of efficient algorithms for designing VALP structures is an interesting open challenge.
The structure initialization algorithm employed in this work, which follows a backtofront building approach, ensures that the adequate data type is provided to each model output. The strategy is based on an updated set of model components that have not had an input assigned; . The algorithm is a recursive function that incrementally and randomly develops the model until the maximum number of primary networks for the model (a parameter given at initialization) is met. It produces a configuration in which not having a component without an input for it is guaranteed, and the output types match the requirements. The model outputs can receive their predictions from a network that produces the data type that satisfies it, while the networks can receive inputs from either another network, or a model input, i.e., the data. The only restriction applied to this algorithm is that a decoder must have at least one Generic MLP providing input. The reason behind this constraint is that the input of a decoder must be numeric and optimizable, as we require it to follow a certain continuous distribution ().
The pseudocode of this strategy is shown in Algorithm 1.
This algorithm considers two parameters; max_n, which handles the maximum number of primary networks in a VALP, and , which regulates the reutilization of primary networks. More specifically, the parameter is used to decide whether a source of data (if available) is used as an input for another component (, ). In addition to these parameters, this algorithm uses a set of auxiliary functions, which are explained below:

complete_model(model): If ==max_n, then act_cmp==, and the function does nothing. If , it searches for components that can serve the elements in act_cmp (in terms of data typing) and establishes connections between them. If no such components exist, this function creates new primary networks, and uses them as bridges between the available components and those in act_cmp.

random_numb(a, b): It returns a random number in .

random(set[, out]): If only the set parameter is provided, this function returns a random element from the set. If both parameters are present, it returns a random component from the set, such that it can serve as input to the out component (in typing terms, and not allowing recurrent connections) and found=. If no such element exists, found=.

random_choice(i): This function draws a random amount of numbers from , without replacement.
The initial call to the recursive algorithm is initialize, where act_cmp is a copy of .
The first if statement (line 1) is the exit condition. In case it is not met, the algorithm selects a random component () that can take an input, i.e., a model output or a primary network. will have a new input once the actual recursion is finished. The algorithm searches for another component () that can provide a data unit which can serve as an input for the first one.
If no such element is found, or if a random number is lower than the parameter (line 1), a new primary network () that can serve as input to the first component is created and added to and act_out. Finally, and are connected. Because now has an input, it cannot be part of act_out. This algorithm avoids recurrent connections.
For example, when using this algorithm to create the example displayed in Fig. 2, the first step would consist of and act_cmp=. In the first recursion, could be added, a generic MLP, since it needs to provide a regression prediction. In the following recursion, act_cmp=, because already has giving it an input, and would be added. This recursion would end up with at least three primary networks providing information to the outputs, and no component without a data input, act_cmp.
Once the model structure is defined, the parameters of the primary networks (weights and biases) are randomly initialized and trained with regular backpropagation, taking as the global loss function a combination of the elements in (according to the parameter).
VC Experimental design
For the multitask fashionMNIST problem, we performed a preliminary experiment and found that there were no problems with optimizing with . , however, did present an obstacle with optimizing . Therefore, we set . This way, we prevent the oscillating effect of the KL loss function rendering the optimizer futile once reach a value below that of .
The max_n was arbitrarily set to 11. The minibatch size for training the model was 50, and the model was trained for 40,000 epochs. Therefore, .
In order to have a glimpse of the performance of this VALP instantiation, the structural generation and learning procedures were randomly initialized and performed 500 times. This way, we perform a random search over 500 generable structures.
VD Experiments results
After training the 500 random VALP configurations, we employed each model to perform the described tasks considering the test set of the fashionMNIST dataset, and recorded different metric values to get a measurement of their performance.
VD1 Classification and regression
In Fig. 4, we can observe how the 500 models have performed on the regression (MSE represented on the y axis in a logaritmic scale) and the classification problem (accuracy, on the x axis). Each point in the grid represents a random VALP configuration.
The horizontal green line represents the performance of a 100neuron singlehiddenlayer MLP with ReLU activation function trained exclusively for the regression problem. Analogously, the vertical red line represents the classification accuracy of the same model (with a softmax activation function in the output layer). Note that the goal of this experimental section is not, by any means, the comparison of the VALP against other models devoted to specific tasks. These are displayed solely to give an idea of where the modeling power of this particular VALP specification stands.
Regarding the classification problem, we can see that 158 VALP configurations produced a classification accuracy of nearly . Considering that there are 10 classes, this resembles random classification. The architectures producing these results probably have a decoder that deletes the path between and after training. The other weak outcomes are probably a result of similar structures, or models whose optimizing algorithm has focused on the other loss functions involved. As an additional observation, we can see that the classification prediction is competitive with the baseline: 215 instances above . It has to be taken into account that the VALP is managing at least four different loss functions at the same time, whereas the MLP is focusing only on classification.
With respect to the regression problem, we can observe that only 9 configurations performed poorly compared to the vast majority of the models; MSE superior to . Contrasting these results with the baseline MLP, which had a error, we can observe that models produced better results.
As a general remark on the joint performance, we can observe that 7 models performed better than both baselines (in classification and regression). The fact that a random search was able to obtain VALP configurations that have stronger performances in both objectives, while optimizing the sampling loss functions at the same time, shows the validity of the proposal at tackling HMTL problems.
VD2 Generation
Once it has been shown that the VALP can perform the tasks classically attached to the simple DNNs, it is time to investigate the sampling capabilities of the model. Specifically, we want to extract information of two different aspects from the generative power of the model, which are related to the mode collapsing problem. Mode collapsing is an issue that concerns the generative modeling community, specially that part focused on GANs [32]. In the experimentation carried out in this paper, we identify two types of mode collapsing. The global case, the worst one, is that in which all the generated samples look very similar to each other. In the local mode collapsing scenario, not as serious as the previous one, the model would learn to generate samples from the different classes of the dataset, yet those belonging to a certain class are still too similar to each other.
To test whether the model configurations suffered from global mode collapsing, an auxiliary DNN that classifies samples of the fashionMNIST was trained. This DNN was used to classify the generated samples, giving a metric of how distributed the generations are classwise. This DNN was based on the MobileNet model [15, 18], followed by a single dense layer. This model reached a 99.5 accuracy on the training set and 94.5 on the test set and it was used to classify the samples generated by each VALP configuration. In terms of classes, we consider a sampling model to be perfect if it is able to obtain the same class distribution it has been shown. Given that the classification problem being addressed is balanced, one could expect that the perfect model generated the same number of instances of each class. Because this is a 10class problem, a perfect generator would generate an example of a certain class with probability. Once the labels from the classifier were obtained, the capacity of the model of generating samples from different classes was measured as the entropy of the set of predicted labels. The higher the entropy value which ranges between 0 and 1, the better the model is considered.
The class distribution can be visualized in Fig. 5. The figure in the top represents the distribution of the entropy values of the 500 VALP configurations. We have chosen 7 representative examples from the whole set (pictured as vertical lines). The probability distributions of said examples are represented in the general parallel coordinates. In this example, we can observe how several VALP configurations (low entropy values) are poor data samplers, as they tend to generate images that MobileNet classifies as Pullover (class 2). This category usually consists of a set of pixels with high values in the middle of the image. The usual result of poor generators is producing images that consist of means of all the images which results in blurry images that posteriorly MobileNet classifies as Pullover. A similar effect happens with class 6 (Shirt). In contrast, the VALP configurations with higher entropy values (equal or larger to ) show much more distributed generation probabilities.
VD3 Conditioned sampling
Regarding the sampling capabilities of the VALP, we recognize that some problem domains could benefit by being able to force the model to create data that meets certain criteria. This is, rather than creating it from the whole known space, data is created from a specific subregion of the whole space. By designing the VALP as highly flexible as it is, we have made the VALP instances in this work capable of carrying out this specific kind of sampling. This is an interesting characteristic that can be exploited for various tasks, such as generating images with certain attributes [35] or reconstructing corrupted images [16].
To address this issue, we added a parameter that regulates the probability of a decoder not having an input deleted, i.e., we can have conditioned decoders that receive information from the model inputs, even when the training phase has finished. This parameter can only affect the model when a decoder receives more than one input, and it guarantees that at least one input is deleted.
To test how conditioned the samples can be towards the input of data given to the VALP, we computed a precision metric that evaluates the agreement (measured as an accuracy) between MobileNet’s prediction for the test image used to condition the generation and the prediction for the corresponding VALP generated sample.
The results of this metric along with the entropy can be observed in Fig. 6. Each VALP configuration is represented by a point, and they are located in the grid regarding the class entropy and the conditioning accuracy. It can be observed that most models have a high entropy value, which means that there is not a strong global mode collapsing problem. Part of the figure has been cut out, as there were no models that generated conditioning values between and . Additionally, this figure shows a heatmap representing the confusion matrix comparing the class that MobileNet predicted to the conditioning examples, and the class the Mobilenet predicted for the produced samples by the VALP represented with the red star.
Firstly, we observe that only about models generated poor class entropy, therefore, in that aspect, the models created offered a good behavior. Fig. 6 also shows that there aren’t many models that can generate conditioned samples. This was to be expected, as there is not much probability of producing a configuration with a decoder that has more than one input, and from those configurations, only an expected would implement conditioning structures. Overall, it is easy to distinguish which models have a sampling conditioning component, as there is a big gap from (where the unconditioned models are found) to , (where the conditioned models are shown). Overall, the random initialization algorithm, was able to create models capable of generating conditioned samples, those in the righthand side of the figure. The rest, those near conditioning accuracy, are unconditioned samplers. The configurations in the lower part of the lefthand side of the figure are the poor quality generators. The model with the highest conditioning accuracy () also happened to be the one with the largest generation entropy, and it is represented as a red star.
Regarding the heatmap, we can observe that this particular VALP found difficulties at generating samples of some classes, from which the 9th is the worst case. The VALP was unable to generate any sample from this category according to MobileNet. The next worst case is class 2, with 399 generations, and the rest have at least 511 representatives out of 10.000 generations (A perfect model would have produced 1.000 from each category).
Fig. 7 contains a schematic representation of the configuration of the VALP represented with the red star in Fig. 6, which, it is worth noting, achieved and in classification accuracy and in regression MSE, respectively.
In this figure, we can observe that there are two decoders in the model, and . The samples produced by only suffered one transformation before being used for . The conditioning part happens with , as it receives two inputs while training, and only one of them is deleted in the feedforward phase (represented as a dotted blue line). This enables the VALP to recycle a piece of information introduced in using the path represented in dashed red arrows, to generate the samples, ultimately producing conditioned examples.
Determining whether a model suffers from local mode collapsing is harder than the global type. In Fig. 8, we have displayed 10 random generations of the model represented with the red star in Fig. 6 from each class they were conditioned towards.
From this figure, three different patterns can be identified. The first pattern consists of particularly weak samples. We can observe some blurry examples of Bags (specially the handles), Trousers (the sixth example), and Dresses (blurry sleeves). However, in most cases, it is possible to idenify what class each image belongs to.
Then, it is possible to appreciate a second pattern, which are those classes for which the generated samples are easily identifiable, even though they look very similar to each other. A good example of this is the Trouser class, which generated characteristic trouser images, but which are very similar to each other.
Finally, there is the third pattern, which are those classes that had identifiable generated samples, while keeping differences between them. Clear examples of this good generation are the Sandal, Ankle Boot, and, in some cases, Bag classes.
Additionally, we can observe in this figure that, even though MobileNet failed to classify any generation as an Ankle Boot (classifying them as Sandal or Sneaker), the Ankle Boots were present among the generations of the model.
Vi Open Challenges
After having empirically shown that the VALP is a viable approach to give a solution to the HMTL problem, the next step in the path is to identify the directions towards which the research over the VALP could be developed. In this section, we enumerate some of these research lines.
Via Structure search
In this paper a simple random procedure has been used to create VALP models. Every connection within the model in this experimentation is, both inter, and intranetwork, random. An intelligent search over the space of possible structures would definitely help to improve the modelling capacity of the VALP. In this regard, evolutionary algorithms (EAs) arise as a promising strategy.
CoDeepNEAT [28] is a recently introduced coevolutionary algorithm that simultaneously evolves two types of model components: convolutional cells and empty structures. The former represents a way to extract highabstraction features from data, the latter represents some flexible layout to place the cells. The algorithm outputs a model where the combination of the components is expected to be highly efficient for the task.
Some similarities between the structures evolved by CoDeepNEAT and the VALP structures can be found (convolutional cells and primary networks, and empty structures and CALP connection structure), which suggests that the evolutionary algorithm could be used to optimize VALP structures. Even so, the application of this algorithm to the VALP would require some adjustments. The main difference resides in the fact that the convolutional cells do not have the identity that characterizes the primary network. Therefore, CoDeepNEAT should be extended to simultaneously evolve VALP structures, and networks from each type separately, instead of considering all primary networks as equals.
Another approach the VALP could benefit from is that based on path finding on supernetworks. The authors of [6] design a sizable DNN and collect sets of related, still homogenous, problems such as image recognition (MNIST [25], CIFAR [22], SVHN [29]) and reinforcement learning (several Atari games). The EA consists of a population of agents that determine a path of neurons across the randomly initialized DNN. Each individual is evaluated by training the parameters in the path of the network using the standard procedure backpropagation for the first task. Then, the next task is selected, and the weights of the connections that have been trained are frozen. Subsequently, the network is trained with the second task using another agent. This process is iteratively repeated until all tasks have been learned by the super network.
This algorithm could also be applied to the VALP. The model would be initialized using a vast amount of random primary networks and connections, always satisfying type restrictions. From this superVALP, only a subset of primary networks would be trained to perform each of the tasks, i.e., the paths described by the agents would specify primary networks instead of neurons. This algorithm would need further adaptation, since it does not contemplate the quality of the elements in the path, and the primary neural networks usually have hyperparameters that need to be tuned to provide the maximum performance. This issue could be addressed using AutoML methods [30, 21, 20], that can optimize the structures of the primary networks. For example, when using an agent to train the superVALP to learn a task, the learning procedure could include an AutoML technique.
By extending and refining the data types used by VALP, expert knowledge can be introduced, in a way similar to the one used for extending other AutoML methods [7].
ViB New components
In the VALP architectures considered in this work, all the primary networks were fully connected layers sequentially placed. Future VALP variants could implement other architectures (some of which have already been identified in this work) that offer an excelling performance in different areas. One clear example would be adding recurrence to the VALP for an improved addressing of problems with sequential data. One way to incorporate this concept to a VALP instance would be to allow recurrent connections within the primary networks, which was not contemplated in the random structure search used in our example. A more straightforward (and even complementary) way would consist of designing new primary networks that contained recurrent connections within themselves, e.g., primary networks consisting of LSTM [10] or GRU [4] cells, for example.
CNNs would also play an important role in VALP, as they would allow the model to maximize its performance in problems with image (or similar) data. These type of networks have already been defined in this work as primary networks of a VALP. However, they are yet to be evaluated in this context.
ViC Loss functions
We selected one single loss function per task type, namely, crossentropy for classification, mean squared error for regression, and the loglikelihood for the sampling problem. However, more options exist for each of these problems, and these could be included in the optimization process of the model [8, 33], since some loss functions could have positive contributions towards the optimal training of the model [8] (for example, any of the GAN loss functions for the generative task [11]). This incorporation would remove the necessity for a Generic MLPDecoder structure in a sampling VALP. Not having a Decoder in a VALP configuration would mean not having to change the model structure (connection deletion) once it has been trained. This would be an upgrade in terms of flexibility.
Linked to the loss function selection topic, the weights applied to each of the subloss functions in the overall loss function have also been manually selected, after observing that the KL component could neutralize the effectiveness of the gradient descent algorithm. These parameter selection issues could be taken care of in the aforementioned optimization procedure, as a parameter tuning. Moreover, the multilossfunction issue could also be addressed as a multiobjective problem of different VALP configurations that offer performances of varying quality over the different loss functions.
Finally, this work has expanded MTL to the combination of different types of tasks: prediction (regression and classification), and data generation. Other popular paradigms, such as reinforcement learning, have not been included. Combining so many loss functions of different natures and training them all in the same model presents itself as a very challenging task.
Vii Conclusions
In this paper, we have addressed the heterogeneous variant of the multitask learning problem; the HMTL. This problem consists of training a single model to perform several tasks at the same time, these tasks being of different natures (e.g., regression and data sampling). To deal with this problem, we have proposed the innovative VALP model, a DNNbased approach. We have firstly provided a formal definition of the approach to lay the groundwork over which several different work directions can be developed. The main strength of the VALP is its capacity to manage different kinds of subDNNs and loss functions, which enables the model to produce different types of data that accurately approximate any distribution, using an optimization procedure over the different loss functions.
In this work, we have defined and focused on the fashionMNIST HMTL problem, which consists of three different tasks (classification, regression, data generation). A particular VALP implementation has been designed to fit the particularities of said problem. A random search over the manydimensional search space showed that the VALP can effectively and simultaneously carry out various tasks of different types, which also involve loss functions of completely different nature.
More specifically, we found VALP configurations that were able to optimize the classical prediction tasks (classification and regression), while still producing reasonably good results at data sampling. Some configurations were even able to partially avoid one of the most concerning issues in the generative community, mode collapsing. It is remarkable that VALP models whose architectures were randomly designed were able to obtain such strong results in both classification and regression, while still having reasonably good results in data generation.
Finally, we have enumerated a collection of detailed future research lines that the newly created VALP model can benefit from. Applying techniques that have produced highquality results in other models to the VALP will help to determine where the strengths and limitations of the model lie.
References
 [1] A. AliGombe, E. Elyan, Y. Savoye, and C. Jayne. Fewshot Classifier GAN. In 2018 International Joint Conference on Neural Networks (IJCNN), pages 1–8, July 2018.
 [2] C. P. Burgess, I. Higgins, A. Pal, L. Matthey, N. Watters, G. Desjardins, and A. Lerchner. Understanding disentangling in VAE. arXiv preprint arXiv:1804.03599, 2018.
 [3] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997.
 [4] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoderdecoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
 [5] D. Ciregan, U. Meier, and J. Schmidhuber. Multicolumn deep neural networks for image classification. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 3642–3649. IEEE, 2012.
 [6] C. Fernando, D. Banarse, C. Blundell, Y. Zwols, D. Ha, A. A. Rusu, A. Pritzel, and D. Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017.
 [7] U. Garciarena, R. Santana, and A. Mendiburu. Evolving imputation strategies for missing data in classification problems with TPOT. arXiv:1706.01120 [cs, stat], June 2017. arXiv: 1706.01120.
 [8] U. Garciarena, R. Santana, and A. Mendiburu. Evolved GANs for generating Pareto set approximations. In Proceedings of the Genetic and Evolutionary Computation Conference, pages 434–441. ACM, 2018.
 [9] U. Garciarena, R. Santana, and A. Mendiburu. Expanding variational autoencoders for learning and exploiting latent representations in search distributions. In Proceedings of the Genetic and Evolutionary Computation Conference, pages 849–856, Kyoto, Japan, 2018. ACM.
 [10] F. A. Gers, J. Schmidhuber, and F. Cummins. Learning to forget: Continual prediction with LSTM. Technical report, 1999.
 [11] I. Goodfellow. NIPS 2016 Tutorial: Generative Adversarial Networks. arXiv:1701.00160 [cs], Dec. 2016. arXiv: 1701.00160.
 [12] I. Goodfellow, J. PougetAbadie, M. Mirza, B. Xu, D. WardeFarley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014.
 [13] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006.
 [14] S. Hochreiter and J. Schmidhuber. Long shortterm memory. Neural computation, 9(8):1735–1780, 1997.
 [15] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
 [16] P. Isola, J.Y. Zhu, T. Zhou, and A. A. Efros. Imagetoimage translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1125–1134, 2017.
 [17] K. Jarrett, K. Kavukcuoglu, Y. LeCun, and others. What is the best multistage architecture for object recognition? In 2009 IEEE 12th International Conference on Computer Vision (ICCV), pages 2146–2153. IEEE, 2009.
 [18] S. Jianlin. A baseline of Fashion MNIST (MobileNet 95%). Blog entry: https://kexue.fm/archives/4556, Aug. 2017.
 [19] D. P. Kingma and M. Welling. Autoencoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
 [20] B. Komer, J. Bergstra, and C. Eliasmith. Hyperoptsklearn: automatic hyperparameter configuration for scikitlearn. In ICML workshop on AutoML, 2014.
 [21] L. Kotthoff, C. Thornton, H. H. Hoos, F. Hutter, and K. LeytonBrown. AutoWEKA 2.0: Automatic model selection and hyperparameter optimization in WEKA. The Journal of Machine Learning Research, 18(1):826–830, 2017.
 [22] A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, Department of Computer Science, University of Toronto, 2009.
 [23] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
 [24] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989.
 [25] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
 [26] J. Liang, E. Meyerson, and R. Miikkulainen. Evolutionary Architecture Search for Deep Multitask Networks. In Proceedings of the Genetic and Evolutionary Computation Conference, GECCO ’18, pages 466–473, New York, NY, USA, 2018. ACM.
 [27] E. Meyerson and R. Miikkulainen. Beyond Shared Hierarchies: Deep Multitask Learning through Soft Layer Ordering. arXiv preprint arXiv:1711.00108, 2017.
 [28] R. Miikkulainen, J. Liang, E. Meyerson, A. Rawal, D. Fink, O. Francon, B. Raju, H. Shahrzad, A. Navruzyan, N. Duffy, and Hodjat, B. Evolving deep neural networks (2017). arXiv preprint arXiv:1703.00548, 2017.
 [29] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, page 5, 2011.
 [30] R. S. Olson, N. Bartley, R. J. Urbanowicz, and J. H. Moore. Evaluation of a treebased pipeline optimization tool for automating data science. In Proceedings of the 2016 on Genetic and Evolutionary Computation Conference, pages 485–492. ACM, 2016.
 [31] F. Rosenblatt. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological review, 65(6):386, 1958.
 [32] A. Srivastava, L. Valkov, C. Russell, M. U. Gutmann, and C. Sutton. Veegan: Reducing mode collapse in GANs using implicit variational learning. In Advances in Neural Information Processing Systems, pages 3308–3318, 2017.
 [33] C. Wang, C. Xu, X. Yao, and D. Tao. Evolutionary generative adversarial networks. IEEE Transactions on Evolutionary Computation, 2019.
 [34] H. Xiao, K. Rasul, and R. Vollgraf. FashionMNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms, Aug. 2017. arXiv: cs.LG/1708.07747.
 [35] X. Yan, J. Yang, K. Sohn, and H. Lee. Attribute2image: Conditional image generation from visual attributes. In European Conference on Computer Vision, pages 776–791. Springer, 2016.
Unai Garciarena received his bachelor degree in computer science in 2015, before obtaining his masters degree in computer engineering and intelligent systems, in 2016, both in the University of the Basque Country (UPV/EHU). He enrolled his Ph.D. studies in 2017 with the University of the Basque Country (UPV/EHU). His principal research interests are generative modeling, supervised classification, and optimization. 
Alexander Mendiburu received the Ph.D. degree from the University of the Basque Country, Spain, in 2006. Since 1999, he has been a Lecturer with the Department of Computer Architecture and Technology, University of the Basque Country. His current research interests include evolutionary computation, probabilistic graphical models, and parallel computing. 
Roberto Santana received the B.S. degree in computer science and the Ph.D. degree in mathematics from the University of Havana, Havana, Cuba, in 1996 and 2005, respectively, and the Ph.D. degree in computer science from the University of the Basque Country, San Sebastian–Donostia, Spain, in 2006. He is a Researcher with the University of the Basque Country. His research interests include machine learning, evolutionary computation, probabilistic graphical models, and neuroscience. 