outfit generation and style extraction via bidirectional lstm ...outfit generation and style...

9
Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo, Japan [email protected] Ryosuke Goto ZOZO Research Tokyo, Japan [email protected] ABSTRACT When creating an outt, style is a criterion in selecting each fash- ion item. is means that style can be regarded as a feature of the overall outt. However, in various previous studies on outt generation, there have been few methods focusing on global in- formation obtained from an outt. To address this deciency, we have incorporated an unsupervised style extraction module into a model to learn outts. Using the style information of an outt as a whole, the proposed model succeeded in generating outts more exibly without requiring additional information . Moreover, the style information extracted by the proposed model is easy to inter- pret. e proposed model was evaluated on two human-generated outt datasets. In a fashion item prediction task (missing prediction task), the proposed model outperformed a baseline method. In a style extraction task, the proposed model extracted some easily distinguishable styles. In an outt generation task, the proposed model generated an outt while controlling its styles . is capabil- ity allows us to generate fashionable outts according to various preferences. CCS CONCEPTS Computing methodologies Image representations; Factoriza- tion methods; Neural networks; KEYWORDS Fashion Style Recognition, Flexible Outt Generation, Visual Com- patibility, Bidirectional LSTM, Deep Learning 1 INTRODUCTION Choosing everyday clothes smartly and purchasing new fashion items are dicult for many people because they require expert knowledge about the characteristics and combinations of fashion items. Because fashion items are very diverse with variable values, most people need the help of some systems. To develop systems that assist such tasks, we should solve two important problems: fashion compatibility and fashion style recognition. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permied. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specic permission and/or a fee. Request permissions from [email protected]. KDD Workshop on AI for fashion, London, United Kingdom © 2018 ACM. . DOI: Style A Outfit generation based on various styles Style B Style C Figure 1: Given a query item and some target styles, the pro- posed model generates dierent outts according to the tar- get styles. e proposed model evaluates both item compat- ibility and the overall style of the items. Learning compatibility between fashion items is an essential problem in the fashion domain. Fashion compatibility is a crite- rion for judging whether a pair or group of items are suitable or not. Many researchers have studied fashion compatibility. In their studies, one of the mainstream methods is metric learning, which is achieved by selecting co-purchased items and an outt dataset and calculating distances between selected items [13, 19, 20]. In some studies, compatibility has been learnt by regarding items in an outt as a sequence [2]. e problem with these studies lies in the inability to apply fashion styles that determine the taste of an outt because these studies only focus on local pairwise relationships. Another challenge is to capture the underlying fashion style when considering outts as combinations of fashion items. Fashion styles, such as rock and mode, represent dierent principles of organizing outts. To realize an advanced fashion recommender system, we should focus not only on estimating personal preferences but also on in- terpreting fashion styles. In the research of understanding fashion style, Takagi et al. [17] gathered and learnt to snap images that are labeled as a typical fashion style. However, some outts have an ambiguous style and cannot be classied. In other studies, fashion styles have been extracted with unsupervised learning using snap images with aributes [7]. ese studies focused on understanding and extracting the fashion style concept. us, they cannot be applied to recommendations and outt generation tasks. Motivated by the previous research, we propose a model that learns outt compatibility and extracts the outt style simultane- ously. ese abilities are implemented by two modules. 1 arXiv:1807.03133v3 [cs.CV] 23 Oct 2018

Upload: others

Post on 25-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

Outfit Generation and Style Extraction via Bidirectional LSTMand Autoencoder

Takuma NakamuraZOZO ResearchTokyo, Japan

[email protected]

Ryosuke GotoZOZO ResearchTokyo, Japan

[email protected]

ABSTRACTWhen creating an out�t, style is a criterion in selecting each fash-ion item. �is means that style can be regarded as a feature ofthe overall out�t. However, in various previous studies on out�tgeneration, there have been few methods focusing on global in-formation obtained from an out�t. To address this de�ciency, wehave incorporated an unsupervised style extraction module into amodel to learn out�ts. Using the style information of an out�t as awhole, the proposed model succeeded in generating out�ts more�exibly without requiring additional information . Moreover, thestyle information extracted by the proposed model is easy to inter-pret. �e proposed model was evaluated on two human-generatedout�t datasets. In a fashion item prediction task (missing predictiontask), the proposed model outperformed a baseline method. In astyle extraction task, the proposed model extracted some easilydistinguishable styles. In an out�t generation task, the proposedmodel generated an out�t while controlling its styles . �is capabil-ity allows us to generate fashionable out�ts according to variouspreferences.

CCS CONCEPTS•Computing methodologies→ Image representations; Factoriza-tion methods; Neural networks;

KEYWORDSFashion Style Recognition, Flexible Out�t Generation, Visual Com-patibility, Bidirectional LSTM, Deep Learning

1 INTRODUCTIONChoosing everyday clothes smartly and purchasing new fashionitems are di�cult for many people because they require expertknowledge about the characteristics and combinations of fashionitems. Because fashion items are very diverse with variable values,most people need the help of some systems. To develop systemsthat assist such tasks, we should solve two important problems:fashion compatibility and fashion style recognition.

Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor pro�t or commercial advantage and that copies bear this notice and the full citationon the �rst page. Copyrights for components of this work owned by others than ACMmust be honored. Abstracting with credit is permi�ed. To copy otherwise, or republish,to post on servers or to redistribute to lists, requires prior speci�c permission and/or afee. Request permissions from [email protected] Workshop on AI for fashion, London, United Kingdom© 2018 ACM. .DOI:

Style A

Outfit generation based on various styles

Style B

Style C

Figure 1: Given a query item and some target styles, the pro-posed model generates di�erent out�ts according to the tar-get styles. �e proposed model evaluates both item compat-ibility and the overall style of the items.

Learning compatibility between fashion items is an essentialproblem in the fashion domain. Fashion compatibility is a crite-rion for judging whether a pair or group of items are suitable ornot. Many researchers have studied fashion compatibility. In theirstudies, one of the mainstream methods is metric learning, whichis achieved by selecting co-purchased items and an out�t datasetand calculating distances between selected items [13, 19, 20]. Insome studies, compatibility has been learnt by regarding items in anout�t as a sequence [2]. �e problem with these studies lies in theinability to apply fashion styles that determine the taste of an out�tbecause these studies only focus on local pairwise relationships.

Another challenge is to capture the underlying fashion stylewhen considering out�ts as combinations of fashion items. Fashionstyles, such as rock and mode, represent di�erent principles oforganizing out�ts.

To realize an advanced fashion recommender system, we shouldfocus not only on estimating personal preferences but also on in-terpreting fashion styles. In the research of understanding fashionstyle, Takagi et al. [17] gathered and learnt to snap images that arelabeled as a typical fashion style. However, some out�ts have anambiguous style and cannot be classi�ed. In other studies, fashionstyles have been extracted with unsupervised learning using snapimages with a�ributes [7]. �ese studies focused on understandingand extracting the fashion style concept. �us, they cannot beapplied to recommendations and out�t generation tasks.

Motivated by the previous research, we propose a model thatlearns out�t compatibility and extracts the out�t style simultane-ously. �ese abilities are implemented by two modules.

1

arX

iv:1

807.

0313

3v3

[cs

.CV

] 2

3 O

ct 2

018

Page 2: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

KDD Workshop on AI for fashion, August 2018, London, United Kingdom Takuma Nakamura and Ryosuke Goto

Firstly, the proposed model learns out�t compatibility with arecurrent neural network (RNN). �is is an architecture for process-ing sequential data that can be applied by considering out�ts assequences of fashion item features [2]. Following [2], we use bidirec-tional long short-term memory (BiLSTM) as the RNN architecture.�is module learns a sequence by evaluating the compatibility oflocal pairwise items.

Secondly, the proposed model extracts the out�t style with anautoencoder. By reducing item features included in an out�t, weobtained a style vector. By encoding and decoding this vector usingthe autoencoder, we extracted a style representation common tomany out�ts. Furthermore, we found that an out�t style can be rep-resented by a linear combination of some typical style vectors. Notethat both sequence learning using Bi-LSTM and style extractionusing the autoencoder are purely unsupervised methods. Moreover,these modules can be learnt end-to-end.

By incorporating a style extraction module in the previous work[2], we obtained the proposedmodel. We evaluated the e�ectivenessof this joint model for three tasks: a missing prediction task, astyle extraction task, and an out�t generation task. �e missingprediction task involves predicting the missing item in an inputout�t. We observed that the proposed model outperformed theprevious work. In the style extraction task, we found that the stylesvectors extracted by the proposed model are interpretable. Besides,a style of an out�t can be represented by a linear combination ofthese styles vectors. In the out�t generation task, the proposedmodel exhibited the ability to control the styles of generated out�tsby adding style information. A summary of the out�t generationtask is shown in Figure 1. Given an input item and a target style,the proposed model generates an out�t re�ecting the style. In ourexperiments, we found that we could generate multiple out�ts fromthe same item by changing the target style.

2 RELATEDWORK2.1 Fashion Compatibility Learning and Out�t

GenerationLearning visual compatibility is an important problem in fashionrecommendation. One possible solution is to learn the compatibilitybetween a pair of fashion items usingmetric learning [12, 14, 18–20].To measure the compatibility between items, McAuley et al. [12]proposed a method of learning the relation between image featuresextracted by a pretrained convolutional neural network (CNN).Using a Siamese network, this feature extraction technique forcompatibility learning was improved [18, 20]. �ese methods canlearn complex relationships bymerely providing samples of positiveand negative pairs. However, they are not su�cient to representthe compatibility between fashion items. �eir strategies map allfashion items to a common space, which does not appear to havesu�cient �exibility to assess the distance between an arbitrary pairof items.

Vasileva et al. [19] avoided these problems by learning similarityand compatibility simultaneously in di�erent spaces for each pair ofitem categories. �is method can make an out�t more fashionableby swapping each fashion item in the out�t for a be�er one. Incontrast to these studies, Han et al. [2] adopted BiLSTM to learn

the compatibility of an out�t as a whole. �eir method successfullyevaluated and generated out�ts.

2.2 Bidirectional LSTMLSTM is a variant of an RNN with memory cells and functionalgates that govern information �ow. It has been proven to be advan-tageous in real-world applications such as speech processing [1]and bioinformatics [5]. In fashion, LSTM can be e�ectively appliedto understand Zalando’s consumer behavior [8] and fashion recom-mendations [4]. BiLSTM [1] combines the advantages of LSTM andbidirectional processing by scanning data in both the forward andbackward directions.

2.3 Fashion Style Extraction�ere have been some researches on extraction of fashion stylesfrom co-purchase and out�t data [9, 11]. Lee et al. [9] assumedthat each item in an out�t and co-purchase item set share the sameunderlying fashion style. �ey proposed the learning of the style bymaximizing the probabilities of item co-occurrences. Liu et al. [11]improved the recommendation performance on the basis of implicitfeedback from users by decomposing a product image feature intoa style feature and a category feature.

Takagi et al. [17] collected images corresponding to 14 modernfashion styles and trained a neural network to understand fashionstyle in a supervised manner. Although supervised methods arereliable, it is di�cult to prepare accurate labels since an annotationtask requires expert knowledge. Moreover, fashion items and snapsare not always labeled with clear words [15]. In contrast, Hsiao andGrauman [6] extracted underlying styles from unlabeled fashionimages using unsupervised methods.

Motivated by such researches, we aim to extract latent out�tstyles using unsupervised methods. We adopt an aspect extractionmethod [3], which has succeeded in extracting aspects in the �eldof natural language processing.

3 METHODOLOGYIn this section, we describe the representation of out�t data, themodules used in the previous work and the proposed model, andthe objective function of the proposed model. Figure 2 illustratesthe proposed architecture, where the visual-semantic embedding(VSE) module is only used for datasets in which items are labeled.

3.1 Out�t RepresentationFollowing [2], we regard an out�t as a sequence of fashion items.A sequence F = {x1, . . . ,xN } represents an out�t, where x is afashion item image feature extracted by a CNN and N representsthe length of a sequence. Note that F has a variable length becausethe number of items in an out�t varies. �e CNN is parameterizedby θCNN .

Fashion item categories such as tops and bo�oms are associatedwith items constituting an out�t, and its priority with the order isdetermined according to the item category.

3.2 Out�t Modeling with Bidirectional LSTMBiLSTM is an extension of LSTM and is widely used to learn wordsequences of natural language. In this model, an input sequence

2

Page 3: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

Outfit Generation and Style Extraction KDD Workshop on AI for fashion, August 2018, London, United Kingdom

Attribute Attribute Attribute Attribute

VSE module BiLSTM module SE module

CNNCNNCNNCNN

VSE BiLSTM SE VSE BiLSTM SE VSE BiLSTM SE VSE BiLSTM SE

Input module

Figure 2: Proposed architecture of the network. It consists of a CNN and three subnetworks. Item images in an out�t are fedthrough the CNN and encoded as image features. �en, the features are separately fed into the VSE, BiLSTM, and SE modules.�e VSE module is only used for datasets in which items are labeled.

is processed simultaneously from both the forward and backwarddirections. By predicting the tth item in a sequence, BiLSTM canuse all the information of items other than the t th item and thus itcan perform more accurately than the commonly used LSTM [2].

P(xt |x1, . . . ,xt−1,xt+1, . . . ,xN )= P(xt |x1, . . . ,xt−1;θLSTMf )P(xt |xN , . . . ,xt+1;θLSTMb ) (1)

A prediction using BiLSTM is solved by a joint model comprisinga forward LSTM and a backward LSTM with parameters θLSTMfand θLSTMb , respectively.

�e forward LSTMmaps a previous state ht−1 and the next inputxt to a current state ht .

it = σ (Wxixt +Whiht−1 +Wcict−1 + bi )ft = σ (Wxf xt +Whf ht−1 +Wcf ct−1 + bf )ct = ftct−1 + it tanh(Wxcxt +Whcht−1 + bc )ot = σ (Wxoxt +Whoht−1 +Wcoct + bo )ht = ot tanh(ct )

Wα β represents a weight matrix that maps vector α to vector β . brepresents a bias term. All weight matrices and biases are includedin the forward LSTM parameters θLSTMf . σ represents the sigmoidfunction.

�e state ht obtained by the above procedure is used to predictthe next item by applying the so�max function:

P(xt+1 |x1, ...,xt ;θLSTMf ) =exp(htxt+1)∑x ∈χ exp(htx)

(2)

where χ represents a set of candidate fashion items. Althoughχ originally contains all items in a dataset, this requires a huge

3

Page 4: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

KDD Workshop on AI for fashion, August 2018, London, United Kingdom Takuma Nakamura and Ryosuke Goto

computational cost. �us, in the training phase, we built χ fromitems included in a mini batch.

�e forward LSTM evaluates an out�t sequentially from the startto end. �e loss for a given out�t F can be calculated as:

Ef (F ;θLSTMf ) = −1N

N∑t=1

log P(xt+1 |x1, ...,xt ;θLSTMf ) (3)

�e backward LSTM can be built in a similar way as :

P(xt |xN , ...,xt+1;θLSTMb ) =exp(ht+1xt )∑x ∈χ exp(ht+1x)

(4)

Eb (F ;θLSTMb ) = −1N

0∑t=N−1

log P(xt |xN , ...,xt+1;θLSTMb ) (5)

3.3 Visual-Semantic EmbeddingVSE is a method for handling multimodal data. Simultaneouslygiven a fashion item image and associated tags, VSE can provide acommon expression between them.

A fashion item has a description that explains its characteristicsand a�ributes. Let us denote it as S = {w1, . . . ,wM }, where wirepresents a word included in the description. Given the one-hotvector ei corresponding towi , the mapping to an embedding spacecan be described as:

vi =WT · ei

v =1M

M∑i=1

vi (6)

whereWT represents a word embedding matrix. A mapping of theimage feature to the embedding space is processed in the same way.LetWI denote the image-embedding matrix. �en,

u =WI · x (7)

It is preferable thatv andu are mapped near to each other if theyare derived from the same item. If they are from di�erent items,it is preferable that they are mapped to separate positions. �isrelationship can be expressed using the hinge function:

Ee (F , S ;θV SE ) =∑u ∈U

∑v ′∈V \v (u)

max(0,ms − d(u,v) + d(u,v ′))

+∑v ∈V

∑u′∈U \u (v )

max(0,ms − d(v,u) + d(v,u ′))

(8)

where d(u,v) represents the cosine distance. U represents the set ofembedded vectors u andU \u(v) represents the set of u from whichthe u corresponding to v is removed. In other words, U \u(v) arenegative samples with respect to v . V and V \v(u) have the samede�nitions asU andU \u(v), respectively.ms is the margin of thishinge function. In the VSE module, θV SE = {WT ,WI } are trainableparameters.

3.4 Style Embedding with Autoencoder�e previous work [2], in which the two modules described in3.2 and 3.3 were joined, enabled us to learn item sequences andextract item features. However, this method may not be able toextract features of the whole out�t because it can only model therelationship between two neighboring items.

To address this problem, we introduce additional information,‘style’. In the fashion domain, style is one of the most importantconcepts in recognizing di�erences among out�ts. It enables us todiscriminate out�ts and select clothes to wear. We aim to implementa model able to deal with style information and interpret out�tstyles.

In natural language processing, document topics or semanticsdepend on the semantics of the words being used. Similarly, out�tstyles depend on the styles of items in sequences. To model thisconcept, we apply a module that has been proven successful in the�eld of natural language processing [3] to fashion data.

Since out�t lengths vary, a feature extractionmethod from out�tsis required to process a variable-length input. Li et al. [10] proposedsomemethods to reduce a variable-length input. We adopt the meanas a reducing function:

yt =Ws · xt (9)

z =1N

N∑tyt (10)

yt represents the style vector of an individual item and z representsthe style vector of an out�t. Ws represents a weight matrix thatmaps an image feature to a style vector.

We obtained a representation for the style of an out�t. Next,through the process of compressing and reconstructing the stylevector, we aim to obtain a basis of styles observed in a variety ofout�ts. Assuming that such a basis of styles exists, out�ts can berepresented as linear combinations of elements of the basis. Forexample, given a style basis that has two elements, ‘casual’ and‘formal’, clothes or out�ts can be labeled as casual, formal, or theirmixture.

We use p ∈ RK to denote the following mixture ratio:

p = so�max(Wz · z + bz ) (11)

whereWz and bz are the weight matrix and bias vector used to mapa style vector to a mixture ratio. Since p is assumed to be a mixtureratio, the so�max function is applied so that each element of p isnonnegative and the sum of the elements is 1. K represents thenumber of elements of the style basis.

Next, we consider the reconstruction of style vector z. We denotethis process as a linear combination of style embeddings and themixture ratio,

r =WTp · p (12)

whereWp is a style-embedding matrix. Each row of this matrixcorresponds to an element of the basis.

Since r is the reconstructed style vector, we design the follow-ing objective function to match r and z, which is similar to anautoencoder:

4

Page 5: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

Outfit Generation and Style Extraction KDD Workshop on AI for fashion, August 2018, London, United Kingdom

Es (F ;θSE ) =∑r ∈R

∑z′∈Z \z(r )

max(0,mr − d(r , z) + d(r , z′)) (13)

where the de�nitions of d(r , z), r ∈ R, z′ ∈ Z\z(r ), and mr aresimilar to those in 3.3.

Assuming that each row ofWp is an element of the basis, theregularization applied for each row to become unique is

Er (Wp ) = | |WpnWTpn − I | | (14)

whereWpn represents the normalizedWp over the rows and I is theidentity matrix. θSE = {Ws ,Wz ,bz ,Wp } are trainable parameters.

3.5 Training Objective�e proposed model consists of three modules, the BiLSTM (3.2),VSE (3.3), and style embedding (SE) modules (3.4). �e overallobjective function is obtained as follows by adding the objectivefunction of each module:

minΘ

∑F(Ef + Eb ) + λeEe + λsEs + λrEr (15)

where Θ = {θLSTMf ,θLSTMb ,θV SE ,θSE }. λe , λs , and λr are hy-perparameters that control the weight of each objective function.

One of the bene�ts of the proposed model is that it can be appliedto data that is lacking a�ributes. Because the SE module can betrained in an unsupervised manner, it requires no a�ributes. Whenlearning the model with only an out�t sequence F , its objectivefunction consists of BiLSTM and SE.

minΘ

∑F(Ef + Eb ) + λsEs + λrEr (16)

Although the model trained without any a�ributes cannot ma-nipulate outputs expressly using a�ributes, it enables the styles ofoutputs to be controlled with the mixture ratio p. �is ability isshown in 4.5.

4 EXPERIMENTAL RESULTSIn this section, we describe the experimental se�ings and report theresults. We evaluate the proposed model for three tasks: a missingprediction task, a style extraction task, and an out�t generationtask.

4.1 Datasets4.1.1 Polyvore. Polyvore (www.polyvore.com) is a now defunct

popular fashion website where users could create out�ts and uploadthem. To evaluate the e�ectiveness of our methods compared withprevious work, we used the Polyvore dataset in our testing. Itincludes 164,837 items of clothing grouped in 21,889 out�ts. Eachitem is labeled multiple tags indicating its a�ributes. For details,refer to [2].

4.1.2 IQON. IQON (www.iqon.jp) is a fashion web service forwomen. Like Polyvore, IQON users can create original out�ts bycollaging images of fashion items. We have created an IQON datasetfor out�t generation tasks. �e IQON dataset consists of recently

Table 1: Parameter details

Module Parameter and Variable Dimension

BiLSTM xt R512

ht R512

VSE1 WT R2757×512

WI R2048×512

SE Ws R2048×256

Wz R256×8

bz R8

Wp R8×256

created and high-quality out�ts that acquired 50 or more votes fromother users and were created from January 1, 2016, to January 1,2018. It includes 199,792 items grouped in 88,674 out�ts. �eseout�ts are split into 70,997 for training, 8,842 for validation, and8,835 for testing. Unlike the Polyvore dataset, none of the items inthe dataset are labeled with tags.

�e dataset is similar to the Polyvore dataset: however, thestyles of the included out�ts are di�erent because the main usersare Japanese women. To test the generalization performance of ourmethod, we evaluated models with multiple datasets.

4.2 ImplementationWe adopted Inception-V3 [16] to map a fashion image to a 2048-dimensional (2048D) feature vector. �e dimensions of the othervariables and parameters are shown in Table 1. �e hyperparam-eters of the objective function λe ,λs , and λr are equal to 1.0, 1.0,and 0.1, respectively. �e other se�ings follow [2].

4.3 Missing PredictionFill in the blank (FITB) is a task predicting an item removed froman out�t created by a human. Given an out�t lacking an item, theevaluated models choose the most compatible item from the candi-date items sampled at random. �is task evaluates a compatibilityrecognition performance between an item sequence and an itemalone. In this experiment, the number of candidate items is set tofour, and then negative items are sampled from out�ts excludingthe query out�t.

�e previous work evaluated the compatibility as follows:

xa = argmaxxc ∈Cexp(ht−1xc )∑x ∈C exp(ht−1x)

+exp(ht+1xc )∑x ∈C exp(ht+1x)

(17)

where the �rst and second terms on the right side are the scorescalculated by the forward LSTM and backward LSTM, respectively.C represents the set of candidate items.

Although the previous work computed scores with BiLSTM, theproposed model adds another measure to the previous work. As-suming that a user-created out�t has a uni�ed style, it is consideredthat the style of each item included in the out�t is similar. Tocompare styles, we denoted the style similarity as follows:

1�is module was only used for the experiment using the Polyvore dataset.5

Page 6: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

KDD Workshop on AI for fashion, August 2018, London, United Kingdom Takuma Nakamura and Ryosuke Goto

Table 2: Performance comparison among di�erent datasetsand models in terms of FITB accuracy.

Dataset Method γ AccPolyvore Bi-LSTM + VSE [2] - 0.726

Bi-LSTM + SE (this paper) 0.0 0.7290.2 0.7270.5 0.723

Bi-LSTM + VSE + SE (this paper) 0.0 0.7280.2 0.7320.5 0.732

IQON Bi-LSTM - 0.703Bi-LSTM + SE (this paper) 0.0 0.715

0.2 0.7130.5 0.711

SS(Fs1, Fs2) = d(zs1, zs2) (18)

We used Eqs. 9 and 10 to map F to z.On this basis, we rede�ne the compatibility evaluator as,

xa = argmaxxc ∈Cexp(ht−1xc )∑x ∈C exp(ht−1x)

+exp(ht+1xc )∑x ∈C exp(ht+1x)

+ γSS(F , {xc }) (19)

where F represents an input sequence with an item removed and γis a hyperparameter that represents a weight of style similarity.

�e results are shown in Table 2. �e proposed models outper-formed previous models in the experiment for both the Polyvoreand IQON datasets. In particular, we observed that the accuracy ofBiLSTM + SE is nearly equal to that of BiLSTM + VSE.�is suggeststhat the proposed model can achieve the same accuracy withoutthe a�ribute information S . We also observed that the BiLSTM +SE model without the style similarity term (γ = 0) is superior tothe model with the style similarity term (γ > 0). In contrast, theBiLSTM + VSE + SEmodel showed the opposite result. �ese resultsindicate that the simultaneous use of BiLSTM and SE improves theFITB accuracy.

4.4 Style ExtractionIn 3.4, we assumed that an out�t can be represented as a mixtureof elements of a style basis. �e mixture ratio p is a weight forthe corresponding basis. Similarly, an element of the style basisitself can be encoded as a one-hot vector in the space in which themixture ratio of each out�t is embedded. To investigate a visualcharacteristic of the elements of a style basis, we visualized sometypical out�ts near each element of a style basis in Figure 3. Weused the IQON dataset and BiLSTM + SE model in this experiment.

In Figure 3, each row corresponds to an out�t created by a user.�e four styles, that are the part of the style basis extracted by theproposed model, have the following features.

• Style A �ese out�ts have a gentle color scheme basedon pale tones reminiscent of spring or early summer. �emain items of this style are skirts or simply designed items.

• Style B�is style is dominated by sandals and jeans, whichmay be associated with summer. It has high-contrast colorscompared with Style A.

• Style C �is style contains a lot of dark and black items.Since there are many items made with leather or metal,this style suggests strength and individuality.

• Style D �is style consists of winter out�ts. Some outerclothes are made with thick fabrics, such as fur. In addition,there are high-heel boots and gold accessories.

�ese visualized styles can be easily distinguishedwithout expertknowledge of fashion. �is suggests that the style basis has a certainability to represent out�t styles that can be interpreted.

In Figure 4 shows two examples of mixture that are calculated bycombining two elements of the style basis. We used Eq. 12 to obtainthese mixtures. ‘Style A + Style B’ is equal to 0.5 · Style A + 0.5 ·Style B. �is style contains skirts that are also observed in Style A,whereas the contrast of the item colors is high like Style B. ‘StyleA + Style C’ is equal to 0.6 · Style A + 0.4 · Style C. �is style alsocontains a lot of skirts like Style A, whereas its color tone is similarto Style C. �ese results indicate that the mixture representation ofstyle vectors makes a complex style of an out�t a simple expression.

4.5 Out�t GenerationWe demonstrate our approach to generating out�ts. In the genera-tion task using the proposed model, the BiLSTM module generatesa sequence from query item images and the SE module adjusts theglobal style of the generated sequence. To simultaneously evaluatethe likelihoods of the sequence and global style, we de�ned thescore function as follows:

score(F |ptarдet ) = −(Ef (F ;θLSTMf ) + Eb (F ;θLSTMb ))

+ βd(WTp · pF ,WT

p · ptarдet )(20)

where ptarдet represents the target style, which is a parameterof the function. pF represents the style of the query sequencecomputed using Eqs. 9-11. d(WT

p · pF ,WTp · ptarдet ) represents

the similarity between the style of the generated sequence and thetarget style. �is term makes it di�cult to select items that donot suit the given style. β is a hyperparameter used to control thebalance between the sequence likelihood and the style similarity.

We adopted a beam search to maximize the total score [21].First, given a query image or image sequence, the BiLSTM modulepredicts some previous and following items by computing Eq. 17. Bycombining the query item (sequence) with the predicted items, wecan obtain candidate sequences. Next, given a target style ptarдet ,the BiLSTM module and SE module compute the score of eachsequence by computing Eq. 20.

Figure 5 shows three examples and results of the out�t generationtask. �e �rst column is the input image. Our model a�empts togenerate a set of items compatible with the input item. �e nextcolumn is the target styles. It is desirable that the generated out�tre�ects these styles. Styles A, B, C, and D are the same as thosein Figure 3. �e sparklines in the next column show the mixture

6

Page 7: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

Outfit Generation and Style Extraction KDD Workshop on AI for fashion, August 2018, London, United Kingdom

Style A Style B Style C Style D

Figure 3: Examples of some elements of a style basis.

Style A + Style B Style A + Style C

Figure 4: Examples of some styles combined two elementsof style basis.

ratios. �e solid line is the mixture ratio of the generated out�t pFand the dashed line is the target mixture ratio ptaraдet in Eq. 20.�e �nal column is the generated out�t.

In the �rst example with the white shirt, the generated out�tsgenerally re�ect each input style. In particular, the out�t re�ectingStyle B contains jeans and sandals, and the one re�ecting Style Dcontains a thick coat. �ese results are consistent with the charac-teristics of each style visualized in 4.4. In the second example withthe skirt, it can also be con�rmed that the generated out�ts re�ectthe characteristics of the style. For example, the out�t re�ectingStyle B contains items reminiscent of summer such as sandals anda straw hat. �e out�t re�ecting Style C predominantly containsblack items. �e third example is an example of a failure. Whentargeting Styles C and D, our model fails to generate an out�t. �is

is because the style of the input image does not suit the target style.�ese results imply that a large di�erence between the style of theinput image and the target style makes it di�cult to generate anatural out�t.

5 CONCLUSIONWe have introduced the concept of ‘style’ into an out�t recognitiontask and proposed a model able to learn the out�t sequence andstyle simultaneously in an unsupervised manner. We applied theproposed model to out�t datasets to evaluate its e�ciency. In aprediction task, the proposed model outperformed the previousmodel. In a generation task, our model succeeded in generatingout�ts with a typical style. �ese results indicate that the proposedmodel can assess fashion item compatibility and out�t style.

A future work is to develop a recommender system. Given apersonal collection of fashion items, such as those on a PinterestBoard or Amazon Wish List, the proposed model can extract theirstyles, which can be regarded as personal style preferences. �us,the proposed model will be able to recommend items and out�tsthat re�ect the preferred styles of individual users.

REFERENCES[1] Alex Graves and Jurgen Schmidhuber. 2005. Framewise phoneme classi�cation

with bidirectional LSTM and other neural network architectures. Neural Networks18, 5-6 (2005), 602–610.

[2] Xintong Han, Zuxuan Wu, Yu-Gang Jiang, and Larry S Davis. 2017. Learningfashion compatibility with bidirectional lstms. In Proceedings of the 2017 ACM onMultimedia Conference. ACM, 1078–1086.

[3] Ruidan He, Wee Sun Lee, Hwee Tou Ng, and Daniel Dahlmeier. 2017. AnUnsupervised Neural A�ention Model for Aspect Extraction. In Proceedings ofthe 55th Annual Meeting of the Association for Computational Linguistics (Volume1: Long Papers). Association for Computational Linguistics, Vancouver, Canada.

[4] Sebastian Heinz, Christian Bracher, and Roland Vollgraf. 2017. An LSTM-Based Dynamic Customer Model for Fashion Recommendation. arXiv preprintarXiv:1708.07347 (2017).

[5] Sepp Hochreiter, Martin Heusel, and Klaus Obermayer. 2007. Fast model-basedprotein homology detection without alignment. Bioinformatics 23, 14 (2007),1728–1736.

7

Page 8: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

KDD Workshop on AI for fashion, August 2018, London, United Kingdom Takuma Nakamura and Ryosuke Goto

Query item image Generated outfitQuery style Mixture ratio

Style A

Style B

Style C

Style D

Style A

Style B

Style C

Style D

Style A

Style B

Style C

Style D

Figure 5: Example of style-controlled out�t generation. �e input is a query item and a target style. �e output is the corre-sponding out�t including the query item. �e sparkline is a comparison between the target style and the style of the generatedout�t.

8

Page 9: Outfit Generation and Style Extraction via Bidirectional LSTM ...Outfit Generation and Style Extraction via Bidirectional LSTM and Autoencoder Takuma Nakamura ZOZO Research Tokyo,

Outfit Generation and Style Extraction KDD Workshop on AI for fashion, August 2018, London, United Kingdom

[6] Wei-Lin Hsiao and Kristen Grauman. 2017. Creating Capsule Wardrobes fromFashion Images. arXiv preprint arXiv:1712.02662 (2017).

[7] Wei-Lin Hsiao and Kristen Grauman. 2017. Learning the Latent “Look”: Unsu-pervised Discovery of a Style-Coherent Embedding from Fashion Images. arXivpreprint arXiv:1707.03376 (2017).

[8] Tobias Lang and Ma�hias Re�enmeier. 2017. Understanding Consumer Behaviorwith Recurrent Neural Networks. In Proceedings of the 3rd Workshop on MachineLearning Methods for Recommender Systems. h�p://mlrec. org/2017/papers/paper2.pdf.

[9] Hanbit Lee, Jinseok Seol, and Sang-goo Lee. 2017. Style2Vec: RepresentationLearning for Fashion Items from Style Sets. arXiv preprint arXiv:1708.04014(2017).

[10] Yuncheng Li, Liangliang Cao, Jiang Zhu, and Jiebo Luo. 2017. Mining FashionOut�t Composition Using an End-to-End Deep Learning Approach on Set Data.IEEE Transactions on Multimedia 19 (2017), 1946–1955.

[11] Qiang Liu, ShuWu, and LiangWang. 2017. DeepStyle: Learning User Preferencesfor Visual Recommendation. In Proceedings of the 40th International ACM SIGIRConference on Research and Development in Information Retrieval. ACM, 841–844.

[12] Julian McAuley, Christopher Targe�, Qinfeng Shi, and Anton Van Den Hengel.2015. Image-based recommendations on styles and substitutes. In Proceedingsof the 38th International ACM SIGIR Conference on Research and Development inInformation Retrieval. ACM, 43–52.

[13] Devashish Shankar, Sujay Narumanchi, H A Ananya, Pramod Kompalli, andKrishnendu Chaudhury. 2017. Deep learning based large scale visual recommen-dation and search for E-Commerce. arXiv preprint arXiv:1703.02344 (2017).

[14] Yong-Siang Shih, Kai-Yueh Chang, Hsuan-Tien Lin, and Min Sun. 2017. Compati-bility Family Learning for Item Recommendation and Generation. arXiv preprintarXiv:1712.01262 (2017).

[15] Edgar Simo-Serra and Hiroshi Ishikawa. 2016. Fashion style in 128 �oats: jointranking and classi�cation using weak data for feature extraction. 2016 IEEEConference on Computer Vision and Pa�ern Recognition (CVPR), 298–307.

[16] Christian Szegedy, Vincent Vanhoucke, Sergey Io�e, Jonathon Shlens, and Zbig-niew Wojna. 2015. Rethinking the Inception Architecture for Computer Vision.arXiv preprint arXiv:1512.00567 (2015).

[17] Moeko Takagi, Edgar Simo-Serra, Satoshi Iizuka, and Hiroshi Ishikawa. 2017.What Makes a Style: Experimental Analysis of Fashion Prediction. Proceedingsof the International Conference on Computer Vision Workshops (ICCVW).

[18] Ivona Tautkute, Tomasz Trzcinski, Aleksander Skorupa, Lukasz Brocki, andKrzysztof Marasek. 2018. DeepStyle: Multimodal Search Engine for Fashion andInterior Design. arXiv preprint arXiv:1801.03002 (2018).

[19] Mariya I Vasileva, Bryan A Plummer, Krishna Dusad, Shreya Rajpal, RanjithaKumar, and David Forsyth. 2018. Learning Type-Aware Embeddings for FashionCompatibility. arXiv preprint arXiv:1803.09196 (2018).

[20] Andreas Veit, Balazs Kovacs, Sean Bell, Julian McAuley, Kavita Bala, and SergeBelongie. 2015. Learning visual clothing style with heterogeneous dyadic co-occurrences. IEEE International Conference on Computer Vision (ICCV), 4642–4650.

[21] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. 2015. Showand tell: A neural image caption generator. IEEE Conference on Computer Visionand Pa�ern Recognition (CVPR) (2015), 3156–3164.

9