{'fraction_non_alphanumeric': 0.031223761544920237, 'fraction_numerical': 0.01086272040302267, 'mean_word_length': 4.757401812688822, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dress Well via Fashion Cognitive Learning

Fashion compatibility models enable online retailers to easily obtain a large number of outfit compositions with good quality. However, effective fashion recommendation demands precise service for each customer with a deeper cognition of fashion. In this paper, we conduct the first study on fashion cognitive learning, which is fashion recommendations conditioned on personal physical information. To this end, we propose a Fashion Cognitive Network (FCN) to learn the relationships among visual-semantic embedding of outfit composition and appearance features of individuals. FCN contains two submodules, namely outfit encoder and Multi-label Graph Neural Network (ML-GCN). The outfit encoder uses a convolutional layer to encode an outfit into an outfit embedding. The latter module learns label classifiers via stacked GCN. We conducted extensive experiments on the newly collected O4U dataset, and the results provide strong qualitative and quantitative evidence that our framework outperforms alternative methods.


Introduction
Fashion exists [14] in our daily life as a tool for expressing attitude and presenting culture. However, it is a problem when applying it to online products since the fashion compatibility models only solved the task that fashion items in an outfit are compatible with each other but have not considered whether the outfits are compatible with customers when they are shopping online. As shown in Figure 1 (b), different customers have varied appearances, e.g., different heights, hairstyles, skin colors, etc., which will directly affect whether an outfit is compatible with them or not. For example, the outfit consists of a white long dress that is not suitable for the second customer since she is not so high enough to wear this long dress. Thus, even though this outfit itself is perfectly matched, it is not appropriate to recommend it to her. Otherwise, it will be resulting she losing trust in the service provider. In other words, understanding relationships between outfits and customers to achieve precise outfit recommendations is crucial.
Previous research mainly focused on the relations among fashion items via fashion compatibility learning [4; 25; 27; 11]. Many of them [30; 10] also focused on the explainability of fashion compatibility models. In addition, a few works noticed the influence of personal information, e.g.user preference [2; 12; 15], social media posts [28; 21], body shape [6]. However, no prior approach systematically considered the compatibility relationships among fashion items in an outfit and the varied appearance of online shoppers and then solved it from a comprehensive point of view.
In this work, we specifically target the task aiming to provide precise and appropriate fashion recommendation service for each customer. To distinguish from previous works utilizing the user's personal preference for personalized recommendation, we define the new task as Fashion Cognitive Learning, i.e., focusing on the influence of personal physical information on the compatibility of an outfit. To achieve this, we treat this task as a multi-label classification task and propose an end-to-end  framework, namely Fashion Cognitive Network, that learns the compatible relationships between outfits and humans. The FHN first uses several convolutional filters with different window sizes to encode the outfit into an outfit embedding. Using filters of different sizes enables convolutional kernels to see different combinations of fashion attribute features. Then the text of each physical label will be embedded into a word embedding and then go through a stacked GCN to learn multi-label classifiers. Finally, the predicted scores for all physical labels are obtained by multiplying classifier vectors with outfit embedding.
Meanwhile, to facilitate the development of our framework, we introduce a new outfit dataset covering personal physical information, namely Outfits for You (O4U). It includes a total of 29352 outfits. Each outfit has two types of label: 1. this outfit is good or not; 2. this outfit is not compatible with which kind of physical label. We invited several fashion experts to label these outfits. The experiment were conducted on the O4U dataset and compare the proposed FCN with state-of-the-art methods. The main contributions of this work are summarized as follows: • We introduce a new task, i.e., fashion cognitive learning, which targets learning the compatibility relationships between outfits and personal physical information in an end-to-end framework to facilitate precise fashion recommendations. • We introduce a new outfit dataset with tremendous personal physical information for facilitating fashion cognitive learning. • Through extensive experiments, we demonstrate our network outperforms several alternative methods with clear margins.
2 Related Work

Personal Fashion Recommendation
Personalization is vital to all online selling services [1]. Some work focus on recommending items based on the user preference [2; 12; 15; 13; 9; 19], e.g.purchasing records, social media posts [28; 21], e.g.information from Instagram, or body shape [6]. Specifically, Packer et al.proposed an approach to personalize clothing recommendation that models the dynamics of individual users' visual preferences by using interpretable image representations generated with a unique feature learning process [15]. Wen et al.. constructed knowledge graphs of user, clothing, and context, and utilized the Apriori algorithm to capture the intrinsic correlations between clothing attributes and context attributes [26]. Chen et al.. connected user preferences regarding individual items and outfits with Transformer architecture [2]. Zheng et al.. presented an item-to-set metric learning framework that learns to compute the similarity between a set of historical fashion items of a user to a new fashion item [28]. Kim et al.. proposed a KD framework for outfit recommendation, which exploits false-negative information from the teacher model while not requiring the ranking of all candidates [7]. Different  from the above personal fashion recommendation, this work defines a new task, w.r.t., Fashion Cognitive Learning, which learns the compatibility among outfits and varied personal physical information. [6] learned the compatibility of clothing styles and body shapes which belongs to the scope of this new task. However, they only focused on one aspect i.e., body shape of personal physical features. In addition, the way they construct the dataset is to crawl images of stylish female celebrities by issuing each stylish celebrity name combined with a clothing category to be collected as a search query. We follow the common practice of fashion compatibility learning to build the O4U dataset with varied labels of personal features.

O4U Dataset
Fashion cognitive learning is based on fashion compatibility learning to further learn the compatibility among outfits and personal physical features. Thus, we build the Outfit for You (O4U) dataset following the same structure of fashion compatibility learning.
Firstly, we created a total of 29,352 outfits consisting of at least clothing items covering the whole body, one bag, one pair of shoes, and n accessories (n ∈ [0, 5]). Then, we invited six experts majoring in fashion to label those outfits. If the outfit is good, they will further select which personal features are not compatible with this outfit. Otherwise, the outfit only has a label to indicate that it is not well-matched. The details of defined personal features are summarized in Table 1. There are 15,748 outfits that are considered as good and have an average of 5.25 unmatched physical labels. We randomly divided the dataset into a training set, validation set, and test set in the form of 8:1:1. The label distribution of the training set is shown in Figure 2. It can be seen that as the OU4 dataset is highly imbalanced, we will introduce our solutions in the following Approach section.  Table 1. Each item p i ∈ M has its corresponding image I i (unstructured data) and other metadata such as the primary color data, the category label, and some attribute labels l a (structured data). Fashion cognitive learning is defined as a multi-label classification task that aims to recognize the given outfit whether it is compatible with some physical labels.
How to encode an outfit into a meaningful embedding is crucial for fashion cognitive learning. In this work, we propose to use 1-dimensional convolutional filters of different sizes to extract the hidden features of the outfit. The motivation for using a convolutional structure to encode outfits is mainly twofold: 1. we observed that there exists translation equivalence in outfit data. In other words, if we swap the order of items or attributes, the outfit embedding should remain the same. Data with such characteristics is suitable to be learned through convolutional structure; 2. we observed that whether an outfit is compatible with a physical label depends on one or several fashion attributes. Using different size convolutional filters can group attribute features in the different numbers together, and that improves the continuity of using the outfit data.

Fashion Convolutional Network
We propose the Fashion Convolutional Network (FCN) to address the personalized recommendation task in terms of human physical labels. FCN includes two modules namely outfit encoder and stacked graph neural networks.

Outfit Encoder
To better reveal the continuity of outfit data, we propose to use a convolutional network to encode an outfit into an outfit embedding, as shown in Figure 3. Different from using a conventional convolutional neural network (CNN) to extract features from item images, our proposed outfit encoder is applied to attribute features. Given an outfit, fashion attribute features X ∈ R Na×d is extracted from each item using well-pretrained VGG [20] network on a large-scale fashion attribute dataset, where N a is the number of fashion attributes and d is the dimensionality of attribute features. Each attribute feature vector is the output of the last convolution layer after a max-pooling operation. These attribute features, serving as the input of the outfit encoder, are fixed during the whole training process. The advantage of using these attribute features rather than raw images is that the network can focus on the important features of items and make the training process more efficient.
Attribute feature maps of the given outfit with n items is presented by stacking (padded where necessary) all attribute features along the item dimension, where Z ∈ R n×Na×d and ⊕ is the stacking operation.
A convolutional layer contains N c convolutional filters with different window sizes, and each filter has multiple convolutional kernels. We use the notation w j ∈ R hj ×d to denote j-th filters in this layer, where h j means the filter is applied to a window of h j attribute features to generate a new feature. The input channels of this convolutional layer are n with output channels being 24 for each filter. The convolution stride and padding are fixed to 1 and 0, respectively. After the convolutional process, a max-pooling layer along the filter moving dimension is applied, yielding a 24-dimensional vector for each filter. The final outfit embedding is obtained by concatenating these convolved vectors and is denoted by g ∈ R F , where F is the dimensionality of the outfit embedding.

Multi-label Graph Convolutional Network
We use Multi-label Graph Convolutional Network [3] (ML-GCN) to train classifiers of the physical labels. ML-GCN is a graph convolutional networks (GCN) [8] based model which takes advantage of capturing the label correlations by treating the classifiers of labels as nodes. We briefly describe how we apply ML-GCN in this paper. The layer-wise propagation rule of a GCN layer is: where A = A + I D is the adjacency matrix of the graph with self-connections and D = j A ij is the degree matrix. A ∈ R N ×N is the adjacency matrix where N denotes the number of nodes in the graph. x (l) ∈ R N ×C (l) is the matrix of activations in the l th layer with C (l) feature maps.
is the trainable weight matrix. σ(·) denotes the nonlinear activation function.
is the convolved feature matrix with C (l+1) feature maps.
We use two-layer stacked GCN to learn classifiers using the layer-wise propagation rule of Eq. 2.
Taking the label representation with C physical labels X ∈ R N ×C and the adjacency matrix A ∈ R N ×N as input, the model f (X, A) can be expressed mathematically as: where A = D − 1 2 A D − 1 2 is normalized version of adjacency matrix. W (0) ∈ R C×H and W (1) ∈ R H×F are two trainable weight matrices for the first and second layer, respectively and H is the dimension of the hidden layer. Z ∈ R N ×F is the classifier matrix with F feature maps. For the construction of A, every entry in this matrix A ij = P (L j |L i ) is the conditional probability of label L j when label L i appears. So the adjacency matrix is a weighted, asymmetrical matrix.
Given the outfit embedding g ∈ R F , the predicted score is the product of label classifiers and the outfit embedding: y = Z · g (4)

Objective Function
We evaluate the multi-label classification loss as follows: where y ∈ R N is ground truth physical labels of an outfit, and σ(·) is the sigmoid function. The overall cost function is defined as follows: where Θ FCN is the trainable parameters of FCN and λ is L2 regularization hyperparameter.

Experiment
Implementation Details. For the outfit encoder, the convolutional layer has five filters with different window sizes, which are 1, 2, 4, 6, and 8. The number of fashion attributes N a = 14. For the GCN module, we use a two-layer stacked GCN with each output dimension 200 and 120, respectively. The pretrained VGG [20] was used as the attribute feature extractor. Both the height and width of the   images were cropped to 224, and the dimensionality of the attribute feature vector is 512. The main color data extracted by FOCO system [29] was also added to the input feature maps. The physical label was encoded by Glove [17] into 100-dimensional word embeddings. The FCN was trained in an end-to-end manner on the O4U dataset with a batch size of 10 on NVIDIA RTX 3070 GPU. We use SGD [18] as the optimizer with the learning rate, momentum, and weight decay are 1e −1 , 0.9, and 5e-5, respectively. An exponential decreasing schedule for the learning rate and an early stop training strategy was adopted.
Compared Approaches. 1. SVM [16]: We use the support vector machine (SVM) as one of our baselines to demonstrate the effectiveness of our approach. We run the SVM classifier provided by scikit-learn on the default setting. 2. Linear: A network consisting of multiple linear layers. 3. ResNet [5]: We trained the ResNet with the input of the mean value of all item images. 4. Attention [23]: We applied several stacked multi-head attention layers to encode an outfit with various attribute vectors into one vector.

Quantitative Results
Evaluation metrics. Following the general practice [24; 3; 22], we report the performance of models on these metrics: mean average precision (mAP); average per-class precision (CP), recall (CR), and F1 (CF1); average overall precision (OP), recall (OR), and F1 (OF1). Average per-class metrics will first evaluate each label individually and then average over all labels. Average overall metrics will evaluate over all examples. We also report the results of these metrics on top-3 labels.
We report mAP results for 17 physical labels in Tables 2 and 3. Our proposed method FCN achieves the best performance over 14 out of 17 labels compared with other baseline methods. Especially on labels belonging to the body shape category, our method achieves a huge improvement compared to other methods.
Model performance covering all labels is reported in Table 4. FCN outperforms other baseline methods on all metrics. SVM, an effective machine learning method, shows good performance in terms of average overall metrics. However, FCN improves by 4.22, 0.74, and 2.66 on the CP, CR, and OP. The performance of ResNet is not good on mAP, and it indicates that treating outfits as the mean value of item images is not a good idea for this task. As for the method using the attention mechanism, although it outperforms FCN on the OR metric, the value of mAP is much lower than FCN.

Qualitative Results
Additionally, we present the qualitative results in Figure 4. People with body figures including inverted triangle, triangle, round, diamond is not suitable for the outfit in the left side. The main reason is that the silhouette of the tank top and the straight-line pants are not matched with these types of body shape. It can be seen that the FCN accurately points out all incompatible body shape among the comparative methods and thus indicates that our method well learns the compatibility among fashion outfit and personal physical information.

Ablation Study
Effect of filter region size. We explore the sensitivity of different combinations of filter region size. As shown in Table 5, only using one kind of convolutional filter size shows the worst performance.
Using filters with a big region size (relative to attribute number 14) has a negative effect on model performance. Using multiple filters with the same size achieves the best result on mAP and OF1, but the results are lower than FCN on the top-3 labels. The combination we use in FCN (1,2,4,6,8) shows the best performance on CF1 and Top-3 metrics.
Effect of numbers of kernels for each filter We then explore the effect of the different numbers of kernels while keeping the filter region size to be the same and report the results in Table 6. We find that the performance achieves the best results when the number of kernels is 24. Using too few convolutional kernels will deteriorate performance significantly. Using too many kernels cannot dramatically improve performance while it causes a negative impact on recall metrics.

Effect of numbers of GCN layers
We report the effects of different numbers of GCN layers in Table 7. We found that with deeper multi-layer GCNs, the performance degrades on almost all metrics. Therefore we choose to use a two-layer stacked GCN in our model.

Conclusion
We introduce a new task, Fashion Cognitive Learning, which targets to learn the compatibility among fashion outfits and personal physical information. The FCN, which contains two submodules that are outfit encoder and Multi-label Graph Neural Network (ML-GCN), is proposed to learn the relationships among visual-semantic embedding of outfit composition and appearance features of individuals. For implementation, we build a new large-scale fashion outfit dataset, O4U, covering comprehensive personal physical information. Extensive results demonstrate the advance of the proposed framework compared with all alternative methods.