shentianxiao / language-style-transfer

Apache License 2.0
553 stars 135 forks source link

Much higher performance of pretrained classifier on transferred sentences in Table1 #19

Closed AliceZhang2016 closed 5 years ago

AliceZhang2016 commented 5 years ago

Hi,

For the sentiment dataset (Yelp), I used TextCNN (classifier.py) to train the classifier as mentioned in the original paper, and achieved accuracy = 97.54% (almost same as 97.4% in the paper). However, when I applied this pretrained classifier on the transferred sentences, it could achieve accuracy = 84.86, which is much higher than 78.4 in table1 of the paper, and accuracy=92.24 (>83.5 in table1) for the model Hu et al.

where sentiment.test.tsf.to is the transferred sentences of the sentiment.test.

Could you please tell me how do you get the pretrained classifier's sentiment accuracy = 78.4 in table 1 ? Thank you very much.

shentianxiao commented 5 years ago

I changed the adversarial loss into the non-saturating one (i.e. min log (1-D(G(z))) -> max log D(G(z)), see the GAN paper). It becomes more stable and gets higher accuracy.

Also the implementation in https://github.com/asyml/texar/tree/master/examples/text_style_transfer is different from their original paper and improved over the code they previously provided us.

AliceZhang2016 commented 5 years ago

ok, got it. Thanks !