Extracting fine-grained features such as styles from unlabeled data is crucial for data analysis. Unsupervised methods such as variational autoencoders (VAEs) can extract styles that are usually mixed with other features. Conditional VAEs (CVAEs) can isolate styles using class labels; however, there are no established methods to extract only styles using unlabeled data. In this paper, we propose a CVAE-based method that extracts style features using only unlabeled data. The proposed model consists of a contrastive learning (CL) part that extracts style-independent features and a CVAE part that extracts style features. The CL model learns representations independent of data augmentation, which can be viewed as a perturbation in styles, in a self-supervised manner. Considering the style-independent features from the pretrained CL model as a condition, the CVAE learns to extract only styles. Additionally, we introduce a constraint based on mutual information between the CL and VAE features to prevent the CVAE from ignoring the condition. Experiments conducted using two simple datasets, MNIST and an original dataset based on Google Fonts, demonstrate that the proposed method can efficiently extract style features. Further experiments using real-world natural image datasets were also conducted to illustrate the method's extendability.
翻译:从无标签数据中提取细粒度特征(如风格)对数据分析至关重要。无监督方法(如变分自编码器VAE)可提取风格,但这类特征通常与其他特征混杂。条件变分自编码器(CVAE)能利用类别标签分离风格,然而目前尚无成熟方法仅依赖无标签数据提取风格。本文提出一种基于CVAE的方法,仅使用无标签数据即可提取风格特征。该模型由两部分组成:提取风格无关特征的对比学习(CL)模块与提取风格特征的CVAE模块。CL模块以自监督方式学习与数据增强(可视为风格扰动)无关的表征。将预训练CL模型输出的风格无关特征作为条件,CVAE可仅学习提取风格。此外,我们引入CL特征与VAE特征之间的互信息约束,防止CVAE忽略条件信息。基于两个简单数据集(MNIST和基于Google Fonts的原始数据集)的实验表明,所提方法能高效提取风格特征。进一步在真实自然图像数据集上开展的实验验证了该方法的可扩展性。