其他分享
首页 > 其他分享> > Controllable Unsupervised Text Attribute Transfer via Editing Entangled Latent Representation

Controllable Unsupervised Text Attribute Transfer via Editing Entangled Latent Representation

作者:互联网

Controllable Unsupervised Text Attribute Transfer via Editing Entangled Latent Representation

Controllable Unsupervised Text Attribute Transfer via Editing Entangled Latent Representation

整个模型被分为三个部分

Transfomer-based Autoencoder

加入标签平滑正则LSR(label smoothing regularization),因此最后的重构损失为
L a e ( D θ d ( E θ e ( x ) ) , x ) = L a e ( D θ d ( z ) , x ) = − ∑ ∣ x ∣ ( ( 1 − ϵ ) ∑ i = 1 v p i ‾ log ⁡ ( p i ) + ϵ v ∑ i = 1 v log ⁡ ( p i ) ) \mathcal{L}_{ae}(D_{\theta_d}(E_{\theta_e}(x)),x)= \mathcal{L}_{ae}(D_{\theta_d}(z),x)=\\ -\sum^{|x|}((1-\epsilon)\sum_{i=1}^v \overline{p_i}\log(p_i)+\frac{\epsilon}{v}\sum_{i=1}^v\log(p_i)) Lae​(Dθd​​(Eθe​​(x)),x)=Lae​(Dθd​​(z),x)=−∑∣x∣​((1−ϵ)i=1∑v​pi​​log(pi​)+vϵ​i=1∑v​log(pi​))

Attribute Classifier for Latent Representation

L c ( C θ c ( z ) , y ) = − ∑ i = 1 ∣ q ∣ q ‾ i log ⁡ q i \mathcal{L}_c(C_{\theta_c}(z),y)=-\sum_{i=1}^{|q|}\overline{q}_i \log q_i Lc​(Cθc​​(z),y)=−i=1∑∣q∣​q​i​logqi​

作者发现把上面两个loss分开优化,效果会比一起优化好

Fast Gradient Iterative Modification Algorithm

用于修改latent representation
z ∗ = z − w i ∇ z L c ( C θ c ( z ) , y ′ ) z^*=z-w_i\nabla_z \mathcal{L}_c(C_{\theta_c}(z),y') z∗=z−wi​∇z​Lc​(Cθc​​(z),y′)

在这里插入图片描述

实验

在这里插入图片描述

标签:Controllable,via,Latent,log,mathcal,wi,quad,Representation,theta
来源: https://blog.csdn.net/doyouseeman/article/details/114822970