Multi-task CNN Model for Attribute Prediction

Abrar H. Abdulnabi, Gang Wang, Jiwen Lu, Kui Jia

I Introduction

Using semantic properties, or attributes, to describe objects is a technique that has attracted much attention in visual recognition research . This is due to the fact that learning an object’s attributes provides useful and detailed knowledge about it, and also serves as a bridge between low-level features and high-level categories. Various multimedia applications can benefit from attributes, among which are the following: knowledge transfer, information sharing between different target tasks, multimedia content analysis and recommendation, multimedia search and retrieval .

Typically, discriminative learning approaches are used to learn semantic attributes (attributes that have names). Figure 1 shows two examples from the Clothing Attributes Dataset , where both images have different attribute labels. Other types of attributes, such as data-driven ones, are learned in an unsupervised or weakly supervised manner . Relative attributes are also introduced and learned through ranking methods (relative attributes have real values to describe the strength of the attribute presence) . However, most of the existing literature employs discriminative classifiers independently to predict the semantic attributes of low-level image features. Very few works model the relationship between object attributes, considering the fact that they may co-occur simultaneously in the same image.

Engineered low-level features like SIFT and HOG are used in combination with various loss-objective functions for attribute prediction purposes. Improving the prediction results gives a good indication of the successful knowledge transfer of attributes between target tasks, for example, recognizing presently unseen classes through the transfer of attributes from another seen class. In the work of , attribute models are learned to generalize across different categories by training a naive Bayes classifier on the ground truth of semantic attributes. Then, they train linear SVM to learn non-semantic feature patterns and choose those which can be well predicted using the validation data attribute. The benefits of such generalization can be seen across different object categories, not just across instances within a category.

On the other hand, deep CNN demonstrates superior performance, dominating the top accuracy benchmarks in various vision problems. It has also been shown that CNN is able to generate robust and generic features. From a deep learning point of view, CNN learns image features from raw pixels through several convolutions, constructing a complicated, non-linear mapping between the input and the output. The lower convolution layers capture basic ordinary phrasing features (e.g., color blobs and edges), and the top layers are able to learn more complicated structure (e.g., car wheel). Subsequently, it is believed that such implementation of artificial Neural Networks mimics the visual cortex in the human brain .

Attribute prediction introduces two additional issues besides the typical object recognition challenges: image multi-labeling and correlation-based learning. Compared to single label classification, multi-labeling is more difficult. It is also more likely to appear in real word scenarios, at which point, an image would need to be tagged with a set of labels from a predefined pool . For example, when a user types their query to search for an image, such as ’red velvet cake’, the engine should retrieve consistent results for real cake images having a red velvet appearance. This is a difficult task from a computational perspective due to the huge hypothesis space of attributes (e.g., M attributes required 2M2^{M}). This limits our ability to address the problem in its full form without transforming it into multiple single classification problems . In particular, correlations should be explored between all these singular classifiers to allow appropriate sharing of visual knowledge. Multi-task learning is an effective method for feature sharing, as well as competition among classifiers (the so-called ’tasks’ in the term multi-task). If tasks are related and especially when one task lacks training data, it may receive visual knowledge from other, more fit tasks. In the work of , they jointly learn groups of attribute models through multi-tasking using a typical logistic regression loss function.

Given the aforementioned issues, we propose an enhanced multi-task framework for an attribute prediction problem. We adapt deep CNN features as our feature representations to learn semantic attributes. Because the structure of the CNN network is huge, and thus requires powerful computation ability, we employ the following methods: First, if the number of attributes is small, we train multi-task CNN models together through MTL, where each CNN model is dedicated to learning one binary attribute. Second, if the number of attributes is relatively large, we fine-tune a CNN model separately on each attribute annotation to generate attribute-specific features, and then we apply our proposed MTL framework to jointly learn classifiers for predicting these binary attributes. The first approach is more or less applicable depending on the available resources (CPU/GPU and Memory). The visual knowledge of different attribute classes can be shared with all CNN models/classifiers to boost the performance of each individual model. Among the existing methods in multi-tasking, the work in proposes a flexible method for feature selection by introducing a latent task matrix, where all categories are selected to share only the related visual knowledge through this latent matrix, which can also learn localized features. Meanwhile, the work in interestingly utilizes the side information of semantic attribute relatedness. They used structured sparsity to encourage feature competition between groups and sharing within each of these groups. Unlike the work in , we introduce the natural grouping information and maintain the decomposition method to obtain the sharable latent task matrix and thus flexible global sharing and competition between groups through learning localized features. Also, unlike the work of , we have no mutual exclusive pre-assumptions, such that groups may not overlap with each other in terms of attribute members. However, as the hand-crafted feature extraction methods can limit the performance, we exploit deep CNN models to generate features that better suit the attribute prediction case.

We test our method on popular benchmarks attribute datasets: Animals with Attributes (AwA) and the Clothing Attributes Dataset . The results demonstrate the effectiveness of our method compared to standard methods. Because the Clothing dataset contains a small number of attributes, we successfully train our multi-task CNN model simultaneously. In addition because the AwA dataset contains a relatively large number of attributes, we first train each single CNN model on a target attribute. Then, we apply our multi-task framework on the generated features without instant back-propagation.

Our main contributions in this paper are summarized as follows: 1) We propose an enhanced deep CNN structure that allows different CNN models to share knowledge through multi-tasking; 2) We propose a new multi-task method; we naturally leverage the grouping information to encourage attributes in the same group to share feature statistics and discourage attributes in different groups to share knowledge. We relax any constraints on the groups, such as mutual exclusion, by decomposing the model parameters into a latent task matrix and a linear combination weight matrix. The latent task matrix can learn more localized feature, thus maintaining the ability to select some basic patterns through its configuration.

The remaining parts of our paper are summarized as follows: We first discuss the related work in Section \@slowromancapii@. The proposed method for the Multi-task CNN model in addition to the details of our MTL framework are presented in Section \@slowromancapiii@. Experiments on two known attribute datasets and results are demonstrated in Section \@slowromancapiv@. Finally, we conclude the paper in Section \@slowromancapv@.

II Related Work

Because this work is mainly related to the topics of Semantic attributes, Multi-task learning and Deep CNN, we briefly review the most recent literature on these approaches including the following.

Definition of Attribute: a visual property that appears or disappears in an image. If this property can be expressed in human language, we call it a Semantic property. Different properties may describe different image features such as colors, patterns, and shapes . Some recent studies concentrate on how to link human-interaction applications through these mid-level attributes, where a consistent alignment should occur between human query expressions and the computer interpretations of query attribute phrases.

Global vs. Local Attributes: an attribute is global if it describes a holistic property in the image, e.g., ’middle aged’ man. Usually, global attributes do not involve specific object parts or locations . Localized attributes are used to describe a part or several locations of the object, e.g. ’striped donkey’. Both types are not easy to infer, because if the classifier is only trained on high-level labels without spatial information like bounded boxes, the performance of the under-sampled classifiers may degrade. However, some work in show that sharing visual knowledge can offset the effects of the lack of training samples.

Correlated Attributes: If attributes are related and cooccur they are correlated. In other words, some attributes will naturally imply others (e.g., ’green trees’ and ’open sky’ will imply ’natural scene’), so this configuration will impose some hierarchical relationship on these attribute classifiers. From another angle, attributes can be weaved from the same portion of the feature space and can be close to each other, e.g., ’black’ and ’brown’ attribute classifiers should be close to each other in the feature dimension space, belonging naturally to the same group, that is, the same color group . While most of the existing methods train independent classifiers to predict attributes , typical statistical models, like naive Bayesian and structured SVM models, are used to address the problem. In , the authors employ a probabilistic generative model to classify attributes. In the work of , objects are categorized based on discriminative attribute representations. Some works flow by modeling the relationships between classes with pre-assumptions of existing attribute correlations . Unlike this work, the decorrelation attribute method to resist the urge to share knowledge is proposed in , and they assume that attribute groups are mutually exclusive. Other work in proposes jointly learning several ranking objective functions for relative attribute prediction.

Attributes and Multi-labeling: Image multi-labeling is simply learning to assign multiple labels to an image . If the problem is adapted as is, a challenge arises when the number of labels increases and the potential output label combinations become intractable . To mitigate this, a common transformation way is performed by splitting the problem into a set of single binary classifiers . Predicting co-occurring attributes can be seen as multi-label learning. On the other hand, most of the related works tend to apply multi-task learning to allow sharing or using some label relationship heuristics a priori . Another work applies ranking functions with deep CNN to rank label scores .

II-B Multi-task learning

Why Mutli-task learning (MTL)? MTL has recently been applied to computer vision problems, particularly when some tasks are under-sampled . MTL is intended to impose knowledge sharing while solving multiple correlated tasks simultaneously. It has been demonstrated that this sharing can boost the performance of some or sometimes all of the tasks .

Task and Feature Correlations: Many strategies for sharing have been explored; the first one considers designing different approaches to discover the relationships between tasks , while the other considers an approach that aims to find some common feature structure shared by all tasks or mine the related features . Recent frameworks, like Max-margin , Bayesian , and their joint extension , try to discover either or both task and feature correlations. While Max-margin is known by its discriminative power, Bayesian is more flexible and thus better suited to engage any a priori or performance inference . In contrast to these studies, the work in claims that as in typical cases, the dimension of the data is high; thus, the assumption that all the tasks should share a common set of features is not reasonable. They address such assumptions by simultaneously capturing the shared features among tasks and identifying outliers through introducing an outlier matrix . In other works, , the authors further relax the constraint naturally by decomposing the model parameters into a shared latent task matrix and linear combination matrix; hence, all the tasks are encouraged to select what to share through this latent matrix, which can learn more localized features. However, among all these techniques, they rely on popular ways to perform such sharing through applying various regularizations on the model parameters, such as structure sparsity for feature selection and feature competition .

II-C Deep CNN

CNN for feature learning: CNN was born in the Deep Learning (DL) era ; its goal is to model high-level abstractions of visual data by using multiple non-linear transformation architectures. Among the DL models, CNN shows extraordinary performance, specifically in image classification and object recognition applications . Two bothersome issues about training CNN are the number of training samples needed and the time that is required to fully train the network. This means that to have an effective CNN model, the training dataset and time should be large enough for the CNN to gain the ability to perform its task well . The learned features generated by the CNN are shown to be robust, generic, and more effective than hand-crafted features . Fortunately, popular implementations of alongside the usage of pre-trained CNN models on the Imagenet dataset make it easier to fine-tune various CNN architectures for many vision datasets.

CNN between single and multi-labels: using CNN for single label prediction is intensively studied . There are many challenges that accompany multi-labeling, as previously discussed in the ’Attributes and Multi-labeling’ section. Hence, training CNN directly is infeasible and impractical. However, one recent work proposes a work-around solution for the multi-label problem . In this work , a shared CNN is fed with an arbitrary number of object segment hypotheses (image batches), which are extracted or generated by some techniques, like the binarized normed gradients (BING) . The final CNN output results for all of these hypotheses are aggregated by max-pooling to give the final format of the multi-label predictions. Unlike their approach, our proposed model holds the essence of tagging one image with multiple labels through multi-task CNN models, which are simultaneously trained through MTL to allow sharing of the visual knowledge. Another direction for multi-labeling is proposed by , where the CNN is mainly used to generate off-the-shelf activation features; then, they apply SVM for later classifications. In our approach, when the number of attributes is large, we fine-tune many CNN models, each of which is dedicated to learning attribute-specific representations. These representations are used as off-the-shelf features for later stages in MTL, as we freeze their training while optimizing the multi-task loss function.

Convexity as first aids for CNN: Some recent work demonstrates that convex optimization can improve the performance of highly non-convex CNN models. The authors in propose modifying the last two layers in the CNN network by making a linear combination of many sub-models and then replacing the original loss function by other ones from the convex optimization family. One of their findings is that hinge loss is one of the preferable convex functions that performs well during backpropagation. Another work confirms their finding that using the well-known SVM squared hinge loss does improve the final performance after training the CNN. By utilizing such experimental integration findings, we adopt a squared hinge loss framework to jointly optimize all classifier models while applying multi-tasking to naturally share visual knowledge between attribute groups.

In contrast to previous methods, our proposed approach is to train multi-task classifier models on deep features for attribute prediction and leverage a sharable latent task matrix that can be very informative for generating a full description of the input image in terms of attributes. Exploring the importance of such a latent matrix is a topic of future interest.

III Multi-task CNN Models

In this section, we will explain the details of the proposed approach of the multi-task CNN model. Figure 2 shows the overall structure of the proposed method, starting from raw images and ending with attribute predictions. Given a vocabulary of M attributes, each CNN model will learn a binary nameable attribute. After the forward pass in all of the CNN models, the features generated from the last convolution layers will be fed into our joint MTL loss layer. To illustrate this more clearly, the weight parameter matrix learned in the loss layer will be decomposed into a latent task matrix and a combination matrix. The latent matrix can be seen as a shared layer between all the CNN models; in other words, the latent layer serves as a shared, fully-connected layer. Meanwhile, the combination matrix contains the specific information of each CNN model. It can also be seen as a specific fully-connected layer plugged above the shared latent fully-connected layer. After optimizing the joint loss layer and sharing the visual knowledge, each CNN model will take back its specific parameters through backpropagation in the backward pass. By presenting images that are annotated against several attributes, we iteratively train the whole structure until convergence.

We adopt the popular network structure proposed by Krizhevsky , which consists of 5 convolutions, followed by 2 fully-connected layers and finally the softmax and the loss. In addition, some pooling, normalization, and ReLU are applied between some of these layers. Many works have studied and analyzed the nature of this structure and identified some important aspects. For example, the work in shows that the parameters of the fully-connected layers occupy almost 70% of the total network capacity, which consumes a great deal of effort while training the network. However, given the expense of trading between ’good-but-fast’ and ’perfect-but-slow’, the work in shows that the performance will drop slightly when removing the fully-connected layers. Because our model requires more than one CNN model, we remove the last fully connected layers, as we substitute these layers with our own joint MTL objective loss, depending on the weight parameter matrix learned within.

In the following subsections, we demonstrate the shared latent task matrix (which also can be seen as a shared layer in the multi-task CNN models approach). Then, we show how the feature sharing and competition is engaged. Next, we introduce our formulations, which we use to solve the attribute prediction problem. Finally, the total optimization procedure used to train the whole network of multi-task CNN models is described. In the remaining part of the paper, we will use the task/CNN model as an interchangeable meaning for classifier because in all cases we employ the same underlying MTL framework. The only difference is that in one approach, the attribute-specific feature learning is on-line, and the MTL joint cost function optimization changes will affect the bottom layers in all CNN models through back-propagation. Thus, any shared knowledge will also be back-propagated to the bottom layers. Meanwhile, in the other approach, we learn these attribute-specific features in isolation of optimizing the joint cost function, as training many on-line CNN models on a large number of attributes is impractical.

Given M semantic attributes, the goal is to learn a binary linear classifier for each of them. Each classifier or task has model parameters, which are denoted by wmw^{m} and are dedicated to predicting the corresponding attribute. WW is the total classifier weights matrix, which can also be considered a softmax weights matrix but stacked from all CNN softmax layers. Given NN training images, each of them has a label vector YY of M−dimensionM-dimension, such that YmiY_{m}^{i} is either {1} or {-1}, indicating whether a specific training image ii contains the corresponding mm attribute having a value of {1} or not {-1}. Suppose that the output from the last convolution layer in each CNN model forms our input feature vectors, such that each CNN model will generate an attribute-specific training pool. Thus, we will have XMNX^{N}_{M} training examples aggregated from all CNN models.

Our assumption is inspired from the work of , where each classifier can be reconstructed from a number of shared latent tasks and a linear combination of these tasks. Through this decomposition, simultaneous CNN models can share similar visual patterns and perform flexible selection from the latent layer, which learns more localized features. We denote LL to be this latent task matrix, and sms^{m} is an attribute-specific linear combination column vector. In total, we have SS linear combination matrices for all attribute classifiers.

Now, we want to split W into two matrices L and S, as we assume that W is a result of multiplying the shared L latent matrix and the combination matrix S, W=LSW=LS. To be more specific about each attribute classifier, the weight parameter vector can be formed by multiplying L with the corresponding sms^{m} vector:

where m is the index of the m-th attribute, m = {1,2,3 … M}.

Given the CNN models, we aim to learn the matrix WW, which is formed by stacking the parameter matrices of the softmax layers of each CNN. The key idea behind our model is to decompose this weight matrix WW into two matrices LL and SS, where the latent LL matrix is the shared layer between all CNN models, SS is a combination matrix, and each column corresponds to one CNN classification layer.

By this decomposition, each CNN can share visual patterns with other CNN models through the latent matrix LL, and all CNN models can collaborate together in the training stage to optimize this shared layer. Each CNN predicts whether the image contains the corresponding property. The benefit of learning the shared layer through multi-task is that each CNN can leverage the visual knowledge from learning other CNN models even if its training samples are not enough.

III-B Feature Sharing and Competition in MTL

According to the semantic attribute grouping idea proposed in , group details are used as discriminative side information. It helps to promote which attribute classifiers are encouraged to share more visual knowledge, due to the group membership privileges. Meanwhile, different groups tend to compete with each other and share less knowledge. Table I shows some group information examples from the Animal with Attribute (AwA) dataset. Because attributes are naturally grouped, we encode the grouping side information by encouraging attributes to share more if they belong to the same groups and compete with each other if they belong to different groups. Our attribute group information is shown in table II.

Suppose we have MM attributes and GG groups, where each group contains a variable number of attributes, for example, g1g_{1} contains [a1,a2,...,aC][a_{1},a_{2},...,a_{C}] as shown in the left side of figure 2, and each group can have a maximum of MM attributes. We have no restrictions on intra-group attributes. Even if two groups have the same attribute, the latent layer configuration mitigates the effect of the overlapped groups through the ability to learn more localized features. However, in our experiments, we rely on existing grouping information provided in the datasets, and obviously the groups are mutually exclusive (an attribute can be seen only in one group). Typically, solving the problem of overlapping groups requires some interior-point method, which is a type of second-order cone programming as discussed in , which is computationally expensive. Structured learning methods like group lasso are applied in many areas employing such grouping information. Knowing any a priori information about the statistical information of features will definitely aid the classifiers. Hence, in our MTL framework, we utilize rich information of groups and also adopt a flexible decomposition to learn different localized features through the latent matrix. We follow the work in , as they also applied such group information of attributes.

Regularizations are our critical calibration keys to balance feature sharing of intra-group attribute classifiers and feature competition between inter-group attribute classifiers. The idea is that when applying the L1L_{1} norm as ∑m=1M∥w∥1\sum_{m=1}^{M}\|w\|_{1} , it will consequently encourage the sparsity on both rows/features and columns/tasks of WW. The effect of sparsity on the rows will generate a competition scenario between tasks; meanwhile, the sparsity effect on the columns will generate sparse vectors. Additionally, when applying the L21L_{21} norm as ∑d=1D∥wd∥2\sum_{d=1}^{D}\|w_{d}\|_{2} , where DD is the feature dimension space, in our case, because it is extracted from the previous layer, DD is 40964096. This can be seen as applying the L1L_{1} norm on the zipped column-wise output of the L21L_{21}, which forces tasks to select only dimensions that are sharable by other tasks as a way to encourage feature sharing. As a middle solution , if the semantic group information is used when applying the L21L_{21} norm, the competition can be applied on the groups; meanwhile, the sharing can be applied inside each group.

In our framework, we encourage intra-group feature sharing and inter-group feature competition through adapting the L21L_{21} regularization term. Thus, we apply this on the vector set ss ∑k=1K∑gG∥skg∥2\sum_{k=1}^{K}\sum_{g}^{G}\|s_{k}^{g}\|_{2} , where KK is the number of latent tasks (latent dimension space) and GG is the number of groups, where each group contains a certain number of attributes. Specifically, skgs_{k}^{g} is a column vector corresponding to a specific attribute classification layer, and given a certain latent task dimension, ss will contain all the intra-group attribute vector sets. This will encourage attribute classifiers to share specific pieces of the latent dimension space, if they only belong to the same group. Meanwhile, different groups will compete with each other as each of them tries to learn a specific portion from the latent dimension space. Additionally, the L1L_{1} norm is applied on the latent matrix ∥L∥1\|L\|_{1} , to learn more localized visual patterns.

III-C Formulations of the Multi-task CNN model

Given the above discussions about decomposing WW and by applying regularization alongside grouping information for better feature competition and sharing, we propose the following objective function:

Accordingly, every CNN is responsible for learning better input feature representations. Later in the testing, the input image will be fed into all CNN models to generate different input feature vectors; then the corresponding classifier weight vector will be applied to produce the attribute predications.

The bottom layers in each CNN model are defined in the same way as the network structure proposed by . As shown in fig 2, every block of CNN has several hidden layers, mainly 5 convolutions. We replace the last 2 fully connected layers, softmax and the loss by our proposed MTL squared maxing hinge loss layer. Nevertheless, when the number of attributes is large, we freeze the training of the bottom layers and optimize the multi-task loss function to predict attributes, using the outputs generated from the CNN models.

III-D Optimization Steps

Recall, that during the training procedure of MM CNN models, each of them is responsible for predicting a single attribute. Our goal is to impose visual knowledge sharing between all CNN models through optimizing the multi-task objective function. The optimized components of WW will serve as the last two fully connected layers. The LL component is a shared layer between all CNN models. The generalization ability of each single CNN is improved by leveraging the shared visual knowledge from other attribute classifiers. The burden of the Stochastic Gradient Descent (SGD) optimizer is only centralized in terms of training the bottom layers well if they are not freeze from training, so that each CNN can provide robust feature representation of images.

Solving the proposed cost function is non-trivial, because it is not jointly convex on either LL or SS. The work in solves the non-convex regularized function using the block coordinate descent method. The function hence becomes a bi-form convex function. They employ Accelerated Proximal Gradient Descent (APG) to optimize both LL and SS in an alternating manner. Specifically, if SS is fixed, the function becomes convex over LL, and optimizing it by APG can solve this state and handle the non-smooth effect of the l1l_{1} norm. Likewise, if LL is fixed, the function becomes convex over SS; in this form of the function and unlike , the mixed norm regularizations require re-representing the 2-norm into its dual form as discussed in . Smoothing Proximal Gradient Descent (SPGD) is applied to obtain the optimal solution of SS. These optimizations are common in the literature of structured learning, where various regularizations may disturb convexity and smoothness properties of the functions. Algorithm 11 illustrates the main steps that are applied to optimize equation 2.

Furthermore, when LL is fixed, the optimization problem is in terms of SS and is described as follows:

Optimization by SPGD: Chen et al. propose solving optimization problems that have a mixed-norm penalty over a priori grouping to achieve some form of structure sparsity. The idea behind this optimization is to introduce the smooth approximation of the objective loss function and solve this approximation function instead of optimizing the original objective function directly. Some work proposes solving non-overlapping groups, as is the case in . Others extend the solution to overlapping groups, as in . We closely follow the approach of approximating the objective function proposed in tree-guided group lasso , which is basically built on the popular group-lasso penalty . We apply the step of squaring the mixed-norm term , which is originally suggested in . Squaring before optimization makes the regularizer positive, which generates a smooth monotonic mapping, preserving the same path of solutions but making the optimization easier. For further details on this approximation, refer to .

Now, after fixing SS, the optimization problem is in terms of LL as follows:

Optimization by APG: Accelerated Proximal Method updates the searching point from the last linear combination of two points in each iteration and thus converges faster . Furthermore, it also handles non-smooth convex functions using proximal operators. The idea is to rely on a shrinkage operator while updating the search point given the previous one and the gradient of the smooth part of the function (the non-regularized part). We adopt this method to optimize over LL because the proximity operator is straightforward, as the non-smooth l1l_{1} norm has been studied extensively. Meanwhile, in other general learning problems, the proximity operator cannot be computed explicitly, namely, the mixed-norm regularization term; hence, we adopt SPGD while optimizing SS. We can optimize LL through SPGD by using approximations for both the gradient and the proximity operator; however, the APG has a relatively lower convergence rate.

During a training epoch, the forward pass will generate the input for the multi-task loss layer from all the CNN models. After optimizing equation 2 using the proposed algorithm 11, the output is the overall model weight matrix WW, where each column in WW will be dedicated to its specific corresponding CNN model and is taken back in the backward pass alongside the gradients with respect to its input. WW is reconstructed using the optimal solutions of LL and SS, where knowledge sharing is already explored through MTL between all the CNN models via LL.

IV Experiments and Results

We conduct our experiments on two datasets: Clothing Attributes Dataset: This dataset is collected by the work in ; it contains 1856 images and 23 binary attributes, as well as 3 multi-class value attributes. The ground-truth is provided on image-level, and each image is annotated against all the attributes. We ignore the multi-class value attributes, because we are only interested in binary attributes. The purpose behind such clothing attributes is to provide better clothing recognition. We train Multi-task CNN models to predict the attributes in this dataset. Because no grouping information is suggested in this dataset, we follow the natural grouping sense proposed in other attribute datasets as in . In table II, we show the details of our attribute grouping on the Clothing Attributes dataset.

AwA Dataset: The Animals with Attributes dataset is collected in , the purpose of which is to apply transfer learning and zero-shot recognition . It consists of 30475 images of 50 animal classes. The class/attribute matrix is provided; hence, the annotation is on the animal’s class level. It provides 85 binary attributes for each class. This dataset has 9 groups: colors, textures, shapes, activity, behavior, nutrition, character, habitat and body parts ; table I shows some attributes in some of these groups.

IV-B Attribute Prediction Accuracy

We conduct several experiments on these two datasets. For the clothing dataset, we train multiple CNN models simultaneously. We calculate the accuracy of attribute predictions against the provided ground truth in the dataset. In table III, S-extract refers to a simple sitting where we directly use a pre-trained model of CNN for feature extraction, and then we train single SVM tasks for attribute prediction; meanwhile, in M-extract, we train our MTL framework on the same CNN extracted features. S-CNN refers to the single-task CNN, where we fine-tuned individual models of CNN to predict each attribute, and M-CNN refers to our MTL framework without encoding the group information , and MG-CNN is our whole MTL framework with group encodings and wholly training CNN models with our framework together. CF refers to the combined features model with no pose baseline , while CRF refers to the state-of-the-art method proposed by . Our model outperforms the state-of-the-art results in . We notice, though, that the overall improvement margin over the single CNN task models is relatively small compared to our results in AwA (see table IV). This is because the accuracy results are already quite high and thus hard to improve further.

We conduct another experiment on the AwA dataset. We fine-tuned single CNN models separately on each attribute. Later, given the input images, we use these learned models to extract attribute-specific features. In other words, we freeze the training of the bottom layers in all CNN models and elaborate only in training our multi-task loss layer. This is due to the large number of attributes in the AwA dataset. We note that the fine-tuning stage will not add much practical difference and is a very time consuming process, perhaps due to the fact that AwA and Image-net datasets have an overlap of approximately 17 object categories; this has also been explored by another work , in which they even train the CNN model to classify objects on the AwA dataset; however, they noticed that using the pre-trained CNN model on the Imagenet dataset directly or fine-tuning the model on AwA will in both cases give the same attribute prediction results. However, our MTL framework outperforms the single-tasks by a large margin; table IV shows the performance of our method compared with other standard methods, where the prediction accuracy is in terms of the mean average over all of the attributes. Compared with previous state-of-the-art results, which are approximately 75% , our trained MTL CNN models on attributes outperform it by a large margin. Additionally, table V shows the accuracy results in terms of mean average precision over each group of attributes (group-level accuracy), before and after applying our multi-task framework. Initialization of the pre-trained model on Imagenet again is used throughout our experiments. Figure 3 also shows a number of misclassified test samples from single-task classifiers, which our multi-task classifiers classified correctly.

IV-C Implementation Details

CNN model training: We put each CNN model through 100 epochs, although most models converged in approximately 50 epochs. We initialize each CNN model with the pre-trained network on Imagenet and fine-tune it on the target attribute annotations. We normalize the input images into 256x256 and subtract the mean from them. To train our model on the Clothing dataset, we use a data augmentation strategy as in . Multi-task Optimization: We perform Singular Value Decomposition (SVD) on WW following the work in to obtain an initialization for LL; meanwhile, SS is randomly initialized. The initialization of WW was accomplished by stacking the last fully-connected layers from all pre-trained CNN models. The other model parameter values are either selected experimentally or following the typical heuristics and strategies proposed in . The latent tasks number is set to the maximum possible feature dimension, because the application of attribute prediction is very critical for any subtle fine-grained details; thus, any severe information loss caused via SVD can degrade the performance drastically. Hence, the number of latent tasks is set to 2048 in our experiments.

Additionally, we set the weight decay to 0.0005 in our CNN models; also, the momentum is set to 0.9, and the learning rate is initialized by 0.01 and reduced manually throughout training; we follow the same heuristic in . In our multi-task part (see equation 2), the latent task λ∥L∥F2\lambda\|L\|^{2}_{F} regularization parameter λ\lambda is set to 0.4, and the other two parameters γ\gamma and μ\mu are best validated in each dataset experiments with held out unseen attribute data.

We conduct our experiments on two NVIDIA TK40 16GB GPU; the overall training time including the CNN part and MTL part of the training is approximately 1.5 days for the Clothing dataset (approximately 50 epochs for all 23 CNN models), and the testing time including feature extraction from all CNN models is approximately 50 minutes (sequential extraction from models one by one, not in parallel, where the time needed to extract features in each model is about 1.5 minutes/1000 images); if more attribute CNN models are added, the time will eventually increase. For the AwA dataset, we divide its training images into several sets (each set contains 3000 images, and we have 8 sets; 5 are used for training and 3 for testing). In total, the training time takes approximately 2 weeks (however, because we noticed that the major accuracy increase was mainly from training our MLT framework and not from CNN fine-tuning, we re-conducted the experiment and froze the bottom layers and depended on training the MTL layer, as we previously discussed; but in the second experiment, we saved a great deal of training time, as it only takes approximately 13 hours to completely train the last two layers on all CNN models within our MTL framework on one training set; on all remaining sets, it takes approximately 2.5 days to complete training.

V Conclusion

In this paper, we introduce an enhanced multi-task learning method to better predict semantic binary attributes. We propose a multi-task CNN model to allow sharing of visual knowledge between tasks. We encode semantic group information in our MTL framework to encourage more sharing between attributes in the same group. We also propose decomposing the model parameters into a latent task matrix and a linear combination matrix. The latent task matrix can effectively learn localized feature patterns, and any under-sampled classifier will generalize better through leveraging this sharable latent layer. The importance of such a latent task matrix is a topic of future interest. Specifically, we would like to explore the potential of the latent task matrix decomposition to be informative enough to generate an efficient description of the input image in terms of either semantic or latent attributes. Our experiments on both attribute benchmark datasets show that our learned multi-task CNN classifiers easily outperform the previous single-task classifiers.

Acknowledgment

The authors would like to thank NVIDIA Corporation for their donation of Tesla K40 GPUs used in this research at the Rapid-Rich Object Search Lab. This research is in part supported by Singapore Ministry of Education (MOE) Tier 2 ARC28/14, and Singapore Agency for Science, Technology and Research (A*STAR), Science and Engineering Research Council PSF1321202099. This research was carried out at both the Advanced Digital Sciences Center (ADSC), Illinois at Singapore Pt Ltd, Singapore, and at the Rapid-Rich Object Search (ROSE) Lab at the Nanyang Technological University, Singapore. This work is supported by the research grant for ADSC from A*STAR. The ROSE Lab is supported by the National Research Foundation, Singapore, under its Interactive & Digital Media (IDM) Strategic Research Programme.

References