Fully-adaptive Feature Sharing in Multi-Task Networks with Applications in Person Attribute Classification

11/16/2016 ∙ by Yongxi Lu, et al. ∙ ibm Binghamton University University of California, San Diego 0

Multi-task learning aims to improve generalization performance of multiple prediction tasks by appropriately sharing relevant information across them. In the context of deep neural networks, this idea is often realized by hand-designed network architectures with layers that are shared across tasks and branches that encode task-specific features. However, the space of possible multi-task deep architectures is combinatorially large and often the final architecture is arrived at by manual exploration of this space subject to designer's bias, which can be both error-prone and tedious. In this work, we propose a principled approach for designing compact multi-task deep learning architectures. Our approach starts with a thin network and dynamically widens it in a greedy manner during training using a novel criterion that promotes grouping of similar tasks together. Our Extensive evaluation on person attributes classification tasks involving facial and clothing attributes suggests that the models produced by the proposed method are fast, compact and can closely match or exceed the state-of-the-art accuracy from strong baselines by much more expensive models.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Humans possess a natural yet remarkable ability of seamlessly transferring and sharing knowledge across multiple related domains while doing inference for a given task. Effective mechanisms for sharing relevant information across multiple prediction tasks (referred as multi-task learning

) are also arguably crucial for making significant advances towards machine intelligence. In this paper, we propose a novel approach for multi-task learning in the context of deep neural networks for computer vision tasks. We particularly aim for two desirable characteristics in the proposed approach: (i)

automatic learning of multi-task architectures based on branching, (ii) selective sharing among tasks with automated learning of whom to share with. In addition, we want our multi-task models to have low memory footprint and low latency during prediction (forward pass through the network).

A natural approach for enabling sharing across multiple tasks is to share model parameters (partially or fully) across the corresponding layers of the task-specific deep neural networks. At an extreme, we can imagine a fully shared multi-task network architecture where all layers are shared except the last layer which predicts the labels for individual tasks. However, this unrestricted sharing may suffer from the problem of negative transfer where inadequate sharing across two unrelated tasks can worsen the performance on both. To avoid this, most of the multi-task deep architectures share the bottom layers till some layer after which the sharing is blocked, resulting in task-specific sub-networks or branches beyond it [28, 17, 13]. This is motivated by the observation made by several earlier works that bottom layers capture low level detailed features, which can be shared across multiple tasks, whereas top layers capture features at a higher level of abstraction that are more task specific. It can be further extended to a more general tree-like architecture, e.g., a smaller group of tasks can share parameters even after the first break-point at layer and breakup at a later layer. However, the space of such possible branching architectures is combinatorially large and current approaches largely make a decision based on limited manual exploration of this space, often biased by designer’s perception of the relationship among different tasks [25].

Our goal in this work is to develop a principled approach for designing multi-task deep learning architectures obviating the need for tedious manual explorations. The proposed approach operates in a greedy top-down manner, making branching and task-grouping decisions at each layer of the network using a novel criterion that promotes the creation of separate branches for unrelated tasks (or groups of tasks) while penalizing for the model complexity. Since we also desire a multi-task model with low memory footprint, the proposed approach starts with a thin network and dynamically grows it during the training phase by creating new branches based on the aforementioned criterion. We also propose a method based on simultaneous orthogonal matching pursuit (SOMP) [42] for initializing a thin network from a pretrained wider network (e.g., VGG-16) as a side contribution in this work.

We evaluate the proposed approach on person attribute classification, where each attribute is considered a task (with non-mutually exclusive labels), achieving state-of-the-art results with highly compact multi-task models. On the CelebA dataset [24], we match the current top results on facial attribute classification (90% accuracy) with a model 90x more compact and 3x faster than the original VGG-16 model. We draw similar conclusions for clothing category recognition on the DeepFashion dataset [23], demonstrating that we can perform simultaneous facial and clothing attribute prediction using a single compact multi-task model, while preserving accuracy.

In summary, our main contributions are listed below:

  • We propose to automate learning of multi-task deep network architectures through a novel dynamic branching procedure, which makes task grouping decisions at each layer of the network (deciding with whom each task should share features) by taking into account both task relatedness and complexity of the model.

  • A novel method based on Simultaneous Orthogonal Matching Pursuit is proposed for initializing a thin network from a wider pre-trained network model, leading to faster convergence and higher accuracy.

  • We perform joint prediction of facial and clothing attributes, achieving state-of-the-art results on standard datasets with a significantly more compact and efficient multi-task model. We also conduct relevant ablation studies providing insights into the proposed approach.

2 Related Work

Multi-Task Learning. There is a long history of research in multi-task learning [4, 40, 16, 21, 25]. Most proposed techniques assume that all tasks are related and appropriate for joint training. A few methods have addressed the problem of “with whom” each task should share features [45, 16, 51, 18, 21, 26]. These methods are generally designed for shallow classification models, while our work investigates feature sharing among tasks in hierarchical models such as deep neural networks.

Recently, several methods have been proposed for multi-task learning using deep neural networks. HyperFace [28]

simultaneously learns to perform face detection, landmarks localization, pose estimation and gender recognition. UberNet

[19] jointly learns low-, mid-, and high-level computer vision tasks using a compact network model. MultiNet [3] exploits recurrent networks for transferring information across tasks. Cross-ResNet [17] connects tasks through residual learning for knowledge transfer. However, all these methods rely on hand-designed network architectures composed of base layers that are shared across tasks and specialized branches that learn task-specific features.

As network architectures become deeper, defining the right level of feature sharing across tasks through handcrafted network branches is impractical. Cross-stitching networks [25] have been recently proposed to learn an optimal combination of shared and task-specific representations. Although cross-stitching units connecting task-specific sub-networks are designed to learn the feature sharing among tasks, the size of the network grows linearly with the number of tasks, causing scalability issues. We instead propose a novel algorithm that makes decisions about branching based on task relatedness, while optimizing for the efficiency of the model. We note that other techniques such as HD-CNN [46] and Network of Experts [1] also group related classes to perform hierarchical classification, but these methods are not applicable for the multi-label setting (where labels are not mutually exclusive).

Model Compression and Acceleration.

Existing deep convolutional neural network models are computationally and memory intensive, hindering their deployment in devices with low memory resources or in applications with strict latency requirements. Methods for compressing and accelerating convolutional networks include knowledge distillation

[12, 29], low-rank-factorization [14, 39, 33], pruning and quantization [10, 27], structured matrices [6, 35, 9], and dynamic capacity networks [2]. These methods are task-agnostic and therefore most of them are complementary to our approach, which seeks to obtain a compact multi-task model by widening a low-capacity network based on task relatedness. Moreover, many of these state-of-the-art compression techniques can be used to further reduce the size of our learned multi-task architectures.

Person Attribute Classification. Methods for recognizing attributes of people, such as facial and clothing attributes, have received increased attention in the past few years. In the visual surveillance domain, person attributes serve as features for improving person re-identification [36] and enable search of suspects based on their description [43, 8]. In e-commerce applications, these attributes have proven effective in improving clothing retrieval [13], and fashion recommendation [22]. It has also been shown that facial attribute prediction is helpful as an auxiliary task for improving face detection [47] and face alignment [50].

State-of-the-art methods for person attribute prediction are based on deep convolutional neural networks [44, 24, 5, 49]

. Most methods either train separate classifiers per attribute

[49] or perform joint learning with a fully shared network [32]. Multi-task networks have been used with base layers that are shared across all attributes, and branches to encode task-specific features for each attribute category [13, 37]. However, in contrast to our work, the network branches are hand-designed and do not exploit the fact that some attributes are more related than others in order to determine the level of sharing among tasks in the network. Moreover, we show that our approach produces a single compact network that can predict both facial and clothing attributes simultaneously.

3 Methodology

Let the linear operation in a layer of the network be paramterized by . Let

be the input vector of layer

, and be the output vector. In feedforward networks that are of interest to this work, it is always the case that

. In other words, the output of a layer is the input to the layer above. In vision applications, the feature maps are often considered as three-way tensors and one should think of

and as appropriately vectorized versions of the input and output feature tensors. The functional form of the network is a series of within-layer computations chained in a sequence linking the lowest to the highest (output) layer. The within-layer computation (for both convolutional and fully-connected layers) can be concisely represented by a simple linear operation parametrized by , followed by a non-linearity as


where is an operator that maps the parameters to the appropriate matrix . For a fully connected layer reduces to the identity operator, whereas for a convolutional layer with filters, contains the vectorized filter coefficients in each row and the operator maps it to an appropriate matrix that represents convolution as matrix multiplication. With this unified representation, we define the width of the network at layer as for the fully connected layers, and as for the convolutional layers. The widths at different layers are critical hyper-parameters for a network design. In general, a wider network is more expensive to train and deploy, but it has the capacity to model a richer set of visual patterns. The relative width across layers is a particularly relevant consideration in the design of a multi-task network. It is widely observed that higher layer represents a level of abstraction that is more task dependent. This is confirmed by previous works on visualization of filters at different layers [48].

Traditional approaches tackle the width design problem largely through hand-crafted layer design and manual model selection. Notably, popular deep convolutional network architectures, such as AlexNet [20], VGG [34], Inception [38] and ResNet [11] all use wider layers at the top of the network in what can be called an “inverse pyramid” pattern. These architectures serve as excellent reference designs in a myriad of domains, but researchers have noted that the width schedule (especially at the top layers) need to be tuned for the underlying set of tasks the network has to perform in order to achieve best accuracy [25].

Here we propose an algorithm that dynamically finds the appropriate width of the multi-task network along with the task groupings through a multi-round training procedure. It has three main phases:

Thin Model Initialization. We start with a thin neural network model, initializing it from a pre-trained wider VGG-16 model by selecting a subset of filters using simultaneous orthogonal matching pursuit (ref. Section 3.1).

Adaptive Model Widening. The thin initialized model goes through a multi-round widening and training procedure. The widening is done in a greedy top-down layer-wise manner starting from the top layer. For the current layer to be widened, our algorithm makes a decision on the number of branches to be created at this layer along with task assignments for each branch. The network architecture is frozen when the algorithm decides to create no further branches (ref. Section 3.2).

Training with the Final Model. In this last phase, the fixed final network is trained until convergence.

More technical details are discussed in the next few sections. Algorithm 1 provides a summary of the procedure.

Data: Input data . The labels are for a set of tasks.
Input: Branch factor , and thinness factor . Optionally, a pre-trained network with parameters .
Result: A trained network with parameters .
Initialization: is a thin- model with layers.
if exist then
      . , . (Sec. 3.1)
      Random initialization
while () and () do
      (Sec. 3.3)
      (Sec. 3.4)
      (Sec. 3.2)
Train model with sufficient iterations, update . , .
Algorithm 1 Training with Adaptive Widening
Figure 1: Comparing the thin model with VGG-16. As shown, the light color blobs shows the layers in the VGG-16 architecture. It has an inverse pyramid structure with a width plan of 64-128-256-512-512-4096-4096. The dark color blobs shows a thin network with . The convolutional layers all have widths of , and the fully connected layers have widths of .

3.1 Thin Networks and Filter Selection using Simultaneous Orthogonal Matching Pursuit

The initial model we use is a thin version of the VGG-16 network. It has the same structure as VGG-16 except for the widths at each layer. We experiment with a range of thin models that are denoted as thin- models. The width of a convolutional layer of the thin- model is the minimum between and the width of the corresponding layer of the VGG-16 network. The width of the fully connected layers are set to . We shall call the “thinness factor”. Figure 1 illustrates a thin model side by side with VGG-16.

Using weights from pre-trained models is known to speed up training and improve model generalization. However, the standard direct copy method is only suitable when the source and the target networks have the same architecture (at least for most of the layers). Our adoption of a thin initial model forbids the use of direct copy, as there is a mismatch in the dimension of the weight matrix (for both the input and output dimensions, see Equation 1 and discussions). In the literature a set of general methods for training arbitrarily small networks using an existing larger network and the training data are known as “knowledge distillation’ [12, 29]. However, for the limited use case of this work we propose a faster, data-free, and simple yet reasonably effective method. Let be the parameters of the pre-trained model at layer with rows. For convolutional layers, each row of represents a vectorized filter kernel. The initialization procedure aims to identify a subset of rows of to form (the superscript denotes initialized parameters for the thin model). We would like the selected rows that minimize the following objective:


where is a truncated weight matrix that only keeps the rows indexed by the set . This problem is NP-hard, however, there exist approaches based on convex relaxation [41] and greedy simultaneous orthogonal matching pursuit (SOMP) [42] which can produce approximate solutions. We use the greedy SOMP to find the approximate solution which is then used to initialize the parameter matrix of the thin model as . We run this procedure layer by layer, starting from the input layer. At layer , after initializing , we replace with a column-truncated version that only keeps the columns indexed by to keep the input dimensions consistent. This initialization procedure is applicable for both convolutional and fully connected layers. See Algorithm 2.

Input: The architecture of the thin network with layers. The pretrained network and its parameters , . Denote the weight matrix at layer as .
Result: The initial parmaeters of the thin network .
foreach do
        Find in Equation 2 by SOMP, using as weight matrix.
Aggregate for to form .
Algorithm 2 SompInit(, , )

3.2 Top-Down Layer-wise Model Widening

Figure 2: Illustration of the widening procedure. Left: the active layer is at layer , there is one junction with 7 branches at the top. Middle: The seven branches are clustered into three groups. Three branches are created at layer , resulting in a junction at layer . Layer is now the active layer. Right: Two branches are created at layer , making layer now the active layer. At each branch creation, the filters at the newly created junction are initialized by direct copy from the old filter.

At the core of our training algorithm is a procedure that incrementally widens the current design in a layer-wise fashion. Let us introduce the concept of a “junction”. A junction is a point at which the network splits into two or more independent sub-networks. We shall call such a sub-network a “branch”. Each branch leads to a subset of prediction tasks performed by the full network. In the context of person attributes classification, each prediction is a sigmoid unit that produces a normalized confidence score on the existence of an attribute.

We propose to widen the network only at these junctions. More formally, consider a junction at layer with input and outputs . Note that each output is the input to one of the top sub-networks. Similar to Equation 1 the within-layer computation is given as


where parameterizes the connection from input to the ’th output at layer . The set is the indexing set . A junction is widened by creating new outputs at the layer below. To widen layer by a factor of , we make layer a junction with outputs. We use to denote an output in layer (each is an input for layer ) and to denote its parameter matrix. All of the newly-created parameter matrices have the same shape as (the parameter matrix before widening). The single output is replaced by a set of outputs where


Let be a given grouping function at layer . After widening, the within-layer computation at layer is given as (cf. Equation 3)


where the latter equality is a consequence of Equation 3. The widening operation sets the initial weight for to be equal to the original weight of . It allows the widened network to preserve the functional form of the smaller network, enabling faster training.

To put the widening of one junction into the context of the multi-round progressive model widening procedure, consider a situation where there are tasks. Before any widening, the output layer of the initial thin multi-task network has a junction with outputs, each is the output of a sub-network (branch). It is also the only junction at initialization. The widening operation naturally starts from the output layer (denoted as layer ). It will cluster the branches into groups where . In this manner the widening operation creates branches at layer . The operation is performed recursively in a top-down manner towards the lower layers. Note that each branch will be associated with a sub-set of tasks. There is a 1-1 correspondence between tasks and branches at the output layer, but the granularity goes coarser at lower layers. An illustration of this procedure can be found in Figure 2.

3.3 Task Grouping based on the Probability of Concurrently Simple or Difficult Examples

Ideally, dissimilar tasks are separated starting from a low layer, resulting in less sharing of features. For similar tasks the situation is the opposite. We observe that if an easy example for one task is typically a difficult example for another, intuitively a distinctive set of filters are required for each task to accurately model both in a single network. Thus we define the affinity between a pair of tasks as the probability of observing concurrently simple or difficult examples for the underlying pair of tasks from a random sample of the training data.

To make it mathematically concrete, we need to properly define the notion of a “difficult” and a “simple” example. Consider an arbitrary attribute classification task . Denote the prediction of the task for example as , and the error margin as , where is the binary label for task at sample . Following the previous discussion, it seems natural to set a fixed threshold on to decide whether example is simple or difficult. However, we observe that this is problematic since as the training progresses most of the examples will become simple as the error rate decreases, rendering this measure of affinity useless. An adaptive but universal (across all tasks) threshold is also problematic as it creates a bias that makes intrinsically easier tasks less related to all the other tasks.

These observations lead us to the following approach. Instead of setting a fixed threshold, we estimate the average margin for each task, . We define the indicator variable for a difficult example for task as . For a pair of tasks , , we define their affinity as


Both and the expectation on Equation 6 can be estimated by their sample averages. Since these expectations are functions of the current neural network model, a naive implementation would require a large number of time consuming forward passes after every training iterations. As a much more efficient implementation, we alternatively collect the sample averages from each training mini-batches. The expectations are estimated by computing a weighted average of the within-batch sample averages. To make the estimation closer to the true expectations from the current model, an exponentially decaying weight is used.

The estimated task affinity is used directly for the clustering at the output layer. It is natural as branches at the output layer has a 1-1 map to the tasks. But at lower layers the mapping is one to many, as a branch can be associated with more than one tasks. In this case, affinity is computed to reflect groups of tasks. In particular, let , denote two branches at the current layer, where and denotes the -th and -th task associated with each branch respectively. The affinity of the two branches are defined by


The final affinity score is computed as . Note that if branches and tasks form a 1-1 map (the situation at the output layer), this reduces to the definition in Equation 6. For branches with coarser task granularity, measures the affinity between two branches by looking at the largest distance (smallest affinity) between their associated tasks.

3.4 Complexity-aware Width Selection

The number of branches to be created determines how much wider the network becomes after a widening operation. This number is determined by a loss function that balances complexity and the separation of dissimilar tasks to different branches. For each number of clusters

, we perform spectral clustering to get a grouping function

that associates the newly created branches with the old branches at one layer above. At layer the loss function is given by


where is a penalty term for creating branches at layer , is a penalty for separation. is defined as the number of pooling layers above the layer and

is the unit cost for branch creation. The first term grows linearly with the number of branches, with a scalar that defines how expensive it is to create a branch at the current layer (which is heuristically set to double after every pooling layers). Note that in this formulation a larger

encourages the creation of more branches. We call the branching factor. The network is widened by creating the number of branches that minimizes the loss function, or .

The separation term is a function of the branch affinity matrix

. For each , we have


and the separation cost is the average across each newly created branches


Note Equation 10 measures the maximum distances (minimum affinity) between the tasks within the same group. It penalizes cases where very dissimilar tasks are included in the same branch.

4 Experiments

Method Accuracy (%) Top-10 Recall (%) Test Speed (ms) Parameters (millions) Jointly?
LNet+ANet 87 N/A No
Walk and Learn 88 N/A No
MOON 90.94 N/A 119.73 No
Our VGG-16 Baseline 91.44 73.55 33.2 134.41 No
Our Low-rank Baseline 90.88 69.82 16.0 4.52 No
Our Baseline-thin-32 89.96 65.95 5.1 0.22 No
Our Branch-32-1.0 90.74 69.95 9.6 1.49 No
Our Branch-32-2.0 90.90 71.08 15.7 2.09 No
Our Branch-64-1.0 91.26 72.03 15.2 4.99 No
Our Joint Branch-32-2.0 90.4 68.72 10.01 3.25 Yes
Out Joint Branch-64-2.0 91.02 71.38 16.28 10.53 Yes
Table 1: Comparison of accuracy, speed and compactness on CelebA test set. LNet+ANet and Walk and Learn results are cited from [44]. MOON results are cited from [32]. : There is no reported number to cite. : MOON uses the VGG16 architecture, thus its test time should be similar to our VGG-16 baseline.
Method Top-3 Accuracy (%) Top-5 Accuracy (%) Test Speed (ms) Parameters (millions) Jointly?
WTBI 43.73 66.26 No
DARN 59.48 79.58 No
FashionNet No
Our VGG-16 Baseline 86.72 92.51 34.0 134.45 No
Our Low-rank Baseline 84.14 90.96 16.34 4.52 No
Our Joint Branch-32-2.0 79.91 88.09 10.01 3.25 Yes
Our Joint Branch-64-2.0 83.24 90.39 16.28 10.53 Yes
Table 2: Comparison of accuracy, speed and compactness on Deepfashion test set. WTBI and DARN results are cited from [23]. The experiments are reportedly performed in the same condition on the FashionNet method and tested on the DeepFashion test set. : There is no reported number to cite. : There is no reported number, but based on the adoption of VGG-16 network as base architecture they should be similar to those of our VGG-16 baseline. : The results are from a network jointly trained for clothing landmark, clothing attribute and clothing categories predictions. We cite the reported results for clothing category [23].

We perform an extensive evaluation of our approach on person attribute classification tasks. We use CelebA [24] dataset for facial attribute classification tasks and Deepfashion [23] for clothing category classification tasks. CelebA consists of images of celebrities labeled with 40 attribute classes. Most images also include the torso region in addition to the face. Our models are evaluated using the standard classification accuracy (average of classification accuracy rate over all attribute classes) and the top-10 recall rate (proportion of correctly retrieved attributes from the top-10 prediction scores for each image). Top-10 is used as there are on average about 9 positive facial attributes per image on this dataset. DeepFashion is richly labeled with 50 categories of clothes, such as “shorts”, “jeans”, “coats”, etc. (the labels are mutually exclusive). Faces are often visible on these images. We evaluate top-3 and top-5 classification accuracy to directly compare with benchmark results in [23].

4.1 Comparison with the State of the art

We establish three baselines. The first baseline is a VGG-16 model initialized from the a model trained from imdb-wiki gender classification [30]

. The second baseline is a low-rank model with low rank factorization at all layers. This model is also initialized from the imdb-wiki gender pretrained model, but the initialization is through truncated Singular Value Decomposition (SVD)

[7]. The number of basis filters is 8-16-32-64-64 for the convolutional layers, 64-64 for the two fully-connected layers and 16 for the output layer. The third is a thin model initialized using the SOMP initialization method introduced in Section 3.1, using the same pre-trained model. Our VGG-16 baselines are stronger than all previously reported methods, while the low-rank baselines closely matches the state-of-the-art while being faster and more compact. The thin baseline is up to 6 times faster, 500 times more compact than the VGG-16 baseline, but still reasonably accurate.

We find several contributing factors to the strength of our baselines. Firstly, the choice of pre-trained model is critical. Most recent works use the VGG face descriptor, whereas in our work we use the pre-trained model from imdb-wiki [31]

. For the thin baseline, it is also important to use Batch Normalization (BN)

[15]. Without the adoption of BN layers the training error ceases to decrease after a small number of training iterations. We observe this phenomenon in both random initialization and SOMP initialization.

A comparison of the models generated by our adaptive widening algorithm with baseline results are shown in Table 1 and 2. Our “branching” models achieves similar or better accuracy compared to these state-of-the-art methods, while being much more compact and faster.

4.2 Cross-domain Training of Joint Person Attribute Network

To examine the ability of our approach in handling cross-domain tasks, we train a network that jointly predict facial and clothing attributes. The model is trained on the union of the two training sets. Note that the CelebA dataset is not annotated with clothing labels, and the Deepfashion dataset is not annotated with facial attribute labels. To augment the annotations for both datasets, we use the predictions provided by the baseline VGG-16 models as soft training targets. We demonstrate that the joint model is comparable to the state-of-the-art on both facial and clothing tasks, while being a much more efficient combined model rather than two separate models. The comparison between the joint models with the baselines is shown in Table 1 and 2.

Figure 3: The actual task grouping in the Branch-32-2.0 model on CelebA. Upper: fc7 layer. Lower: fc6 layer. Other layers are omitted.

4.3 Visual Validation of Task Grouping

We visually inspect the task groupings in the generated model. Figure 3 displays the actual task grouping in the Branch-32-2.0 model trained on CelebA. The grouping are often highly intuitive. For instance, “5-o-clock Shadow”, “Bushy Eyebrows” and “No Beard”, which all describe some forms of facial hairs, are grouped. The cluster with “Heavy Makeup”, “Pale Skin” and “Wearing Lipstick” is clearly related. Groupings at lower layers are also sensible. As an example, the group “Bags Under Eyes”, “Big Nose” and “Young” are joined by “Attractive” and “Receding Hairline” at fc6, probably because they all describe age cues. This is particularly interesting as no human intervention is involved in model generation.

Figure 4: The reduction in accuracy when changing the task grouping to favor grouping of dissimilar tasks. A positive number suggests a reduction in accuracy when changing from original to the new grouping. This figure shows our automatic grouping strategy improves accuracy for most tasks.

4.4 Ablation Studies

What are the advantages of grouping similar tasks? We shuffle the correspondence between training targets and the output of the network for “Branch-32-2.0” model from CelebA and report the reduction in accuracies for each tasks. Both random and manual shuffling are tested but we only report the one from manual shuffling as they are similar. In particular, for manual shuffling we choose a new grouping of tasks so that the network separates many tasks that are originally in the same branch. Figure 4 summarizes our findings. Clearly grouping tasks according to similarity improves accuracy for most tasks.

Closer examination yields other interesting observations. The three tasks that actually benefit from the shuffling significantly (unlike most of the tasks), namely “wavy hair”, “wearing necklace” and “pointy nose” are all from the branch with the largest number of tasks. This is sensible as after the shuffling they are not forced to share filters with many other tasks. But other tasks from the same branch, namely “black hair” and “wearing earrings” are significantly improved from the original grouping. One possible explanation is that while grouping similar tasks allow them to benefit from multi-task learning, some tasks are intrinsically more difficult and require a wider branch. Our current design lacks the ability to change the width of a branch, which is an interesting future direction.

Method Accuracy (%) Top-10 Recall (%)
w/ pre-trained -0.54 -2.47
w/o pre-trained -0.65 -3.77
Table 3: Accuracy gap with and without initialization from pre-trained model, defined as accuracy of Branch-32-2.0 minus the one from VGG-16 Baseline.

Sub-optimal use of pretrained network or smaller capacity? The gap in accuracy between Branch-32-2.0 and VGG-16 baseline can be caused by sub-optimal use of the pretrained model or the intrinsically smaller capacity of the former. To determine if both factors contribute to the gap, we compare training the Branch-32-2.0 model and VGG-16 from scratch on CelebA. As neither model benefit from the information from a pre-trained network, we expect a much smaller gap in accuracy if the sub-optimal use of the pretrained model is the main cause. Our results summarized in Table 3 suggest that the smaller capacity of the Branch-32-2.0 model is likely the main reason for the accuracy gap.

Figure 5: Comparison of training progress with and without SOMP initialization. The model using SOMP initialization clearly converges faster and better.

How does SOMP help the training? We compare training with and without this initialization using the Baseline-thin-32 model on CelebA, under identical training conditions. The evolution of training and validation accuracies are shown in Figure 5. Clearly, the network initialized with SOMP initialization converges faster and better than the one without SOMP initialization.

5 Conclusion

We have proposed a novel method for learning the structure of compact multi-task deep neural networks. Our method starts with a thin network model and expands it during training by means of a novel multi-round branching mechanism, which determines with whom each task shares features in each layer of the network, while penalizing for the complexity of the model. We demonstrated compelling results of the proposed approach on the problem of person attribute classification. As future work, we plan to adapt our approach to other related problems, such as incremental learning and domain adaptation.


  • [1] K. Ahmed, M. H. Baig, and L. Torresani. Network of experts for large-scale image categorization. ECCV, 2016.
  • [2] A. Almahairi, N. Ballas, T. Cooijmans, Y. Zheng, H. Larochelle, and A. Courville. Dynamic capacity networks. ICML, 2016.
  • [3] H. Bilen and A. Vedaldi. Integrated perception with recurrent multi-task neural networks. In NIPS, 2016.
  • [4] R. Caruana. Multi-task learning. Machine Learning Journal, 28:41–75, 1997.
  • [5] Q. Chen, J. Huang, R. Feris, L. M. Brown, J. Dong, and S. Yan. Deep domain adaptation for describing people based on fine-grained clothing attributes. In CVPR, 2015.
  • [6] Y. Cheng, F. Yu, R. Feris, S. Kumar, A. Choudhary, and S. F. Chang. An exploration of parameter redundancy in deep networks with circulant projections. In ICCV, 2015.
  • [7] E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NIPS, 2014.
  • [8] R. Feris, R. Bobbitt, L. Brown, and S. Pankanti. Attribute-based people search: Lessons learnt from a practical surveillance system. In ICMR, 2014.
  • [9] B. Gong, B. Jou, F. Yu, and S.-F. Chang. Tamp: A library for compact deep neural networks with structured matrices. In ACM Multimedia, 2016.
  • [10] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. ICLR, 2016.
  • [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016.
  • [12] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In arXiv preprint arXiv:1503.02531, 2015.
  • [13] J. Huang, R. S. Feris, Q. Chen, and S. Yan.

    Cross-domain image retrieval with a dual attribute-aware ranking network.

    In ICCV, pages 1062–1070, 2015.
  • [14] Y. Ioannou, D. Robertson, J. Shotton, R. Cipolla, and A. Criminisi. Training cnns with low-rank filters for efficient image classification. ICLR, 2016.
  • [15] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
  • [16] L. Jacob, J.-p. Vert, and F. R. Bach. Clustered multi-task learning: A convex formulation. In NIPS, 2009.
  • [17] B. Jou and S. F. Chang. Deep cross residual learning for multi-task visual recognition. In ACM Multimedia, 2016.
  • [18] Z. Kang, K. Grauman, and F. Sha. Learning with whom to share in multi-task feature learning. In ICML, 2011.
  • [19] I. Kokkinos. Ubernet: Training a universal cnn for low-, mid-, and high- level vision using diverse datasets and limited memory. In arXiv preprint arXiv:1609.02132, 2016.
  • [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012.
  • [21] A. Kumar and H. Daume III. Learning task grouping and overlap in multi-task. In ICML, 2012.
  • [22] L. Liu, J. Xing, S. Liu, H. Xu, X. Zhou, and S. Yan. Wow! you are so beautiful today! ACM Transactions on Multimedia Computing, Communications, and Applications, 11(1s):20, 2014.
  • [23] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In CVPR, 2016.
  • [24] Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In ICCV, 2015.
  • [25] I. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Cross-stitch networks for multi-task learning. In CVPR, 2016.
  • [26] A. Passos, P. Rai, J. Wainer, and H. Daume III. Flexible modeling of latent task structures in multitask learning. arXiv preprint arXiv:1206.6486, 2012.
  • [27] A. Polyak and L. Wolf. Channel-level acceleration of deep face representations. IEEE Access, 3:2163–2175, 2015.
  • [28] R. Ranjan, V. Patel, and R. Chellappa. Hyperface: A deep multi-task learning framework for face detection, landmark localization, pose estimation, and gender recognition. In arXiv preprint arXiv:1603.01249, 2016.
  • [29] A. Romero, N. Ballas, S. E. Kahou, A. Chassang, C. Gatta, and Y. Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014.
  • [30] R. Rothe, R. Timofte, and L. V. Gool. Deep expectation of real and apparent age from a single image without facial landmarks. International Journal of Computer Vision (IJCV), 2016.
  • [31] R. Rothe, R. Timofte, and L. V. Gool. Deep expectation of real and apparent age from a single image without facial landmarks. International Journal of Computer Vision (IJCV), July 2016.
  • [32] E. Rudd, M. Günther, and T. Boult. Moon: A mixed objective optimization network for the recognition of facial attributes. ECCV, 2016.
  • [33] T. N. Sainath, B. Kingsbury, V. Sindhwani, E. Arisoy, and B. Ramabhadran. Low-rank matrix factorization for deep neural network training with high-dimensional output targets. In ICASSP, 2013.
  • [34] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR2015, 2014.
  • [35] V. Sindhwani, T. Sainath, and S. Kumar. Structured transforms for small-footprint deep learning. In NIPS, 2015.
  • [36] C. Su, S. Zhang, J. Xing, W. Gao, and Q. Tian. Deep attributes driven multi-camera person re-identification. ECCV, 2016.
  • [37] P. Sudowe, H. Spitzer, and B. Leibe. Person attribute recognition with a jointly-trained holistic cnn model. In ICCV ChaLearn Looking at People Workshop, 2015.
  • [38] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015.
  • [39] C. Tai, T. Xiao, X. Wang, et al. Convolutional neural networks with low-rank regularization. ICLR, 2016.
  • [40] S. Thrun and L. Pratt. Learning to learn. Kluwer Academic Publishers, 1998.
  • [41] J. A. Tropp. Algorithms for simultaneous sparse approximation. part ii: Convex relaxation. Signal Processing, 86(3):589–602, 2006.
  • [42] J. A. Tropp, A. C. Gilbert, and M. J. Strauss. Algorithms for simultaneous sparse approximation. part i: Greedy pursuit. Signal Processing, 86(3):572–588, 2006.
  • [43] D. A. Vaquero, R. S. Feris, D. Tran, L. Brown, A. Hampapur, and M. Turk. Attribute-based people search in surveillance environments. In WACV, 2009.
  • [44] J. Wang, Y. Cheng, and R. S. Feris. Walk and learn: Facial attribute representation learning from egocentric video and contextual data. CVPR, 2016.
  • [45] Y. Xue, X. Liao, L. Carin, and B. Krishnapuram. Multi-task learning for classification with dirichlet process priors. Journal of Machine Learning Research, 8(Jan):35–63, 2007.
  • [46] Z. Yan, H. Zhang, R. Piramuthu, V. Jagadeesh, D. DeCoste, W. Di, and Y. Yu. Hd-cnn: Hierarchical deep convolutional neural network for large scale visual recognition. In ICCV, 2015.
  • [47] S. Yang, P. Luo, C.-C. Loy, and X. Tang. From facial parts responses to face detection: A deep learning approach. In ICCV, 2015.
  • [48] M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014.
  • [49] N. Zhang, M. Paluri, M. Ranzato, T. Darrell, and L. Bourdev. Panda: Pose aligned networks for deep attribute modeling. In CVPR, 2014.
  • [50] Z. Zhang, P. Luo, C. C. Loy, and X. Tang. Learning deep representation for face alignment with auxiliary attributes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(5), 2016.
  • [51] J. Zhou, J. Chen, and J. Ye. Clustered multi-task learning via alternating structure optimization. In NIPS, 2011.