Quality variables play a pivotal role in monitoring the performance of chemical production systems. However, certain critical quality variables cannot be measured online through instruments. In such scenarios, using soft sensors becomes imperative to enable real-time measurements, accurately reflecting the system's operational status. The development of highperformance soft sensors requires abundantly labeled samples. Nevertheless, the prolonged periods and substantial costs associated with acquiring quality variable data pose challenges in obtaining sufficient labeled samples. Therefore, this paper proposes a regression generative adversarial network to generate virtual samples. The proposed method considers the mapping relationship between auxiliary and target variables while learning the data distribution. Moreover, the importance-weighted autoencoder is introduced to enhance the training stability of the generative model. The virtual samples, selected by using the similarity measurement algorithm, are incorporated into the training set. This inclusion addresses the diminished predictive performance of soft sensors when labeled samples are insufficient. The soft sensor employed in the anaerobic digestion process serves as a case study to illustrate the efficacy of the proposed generative method. Experimental results validate that the virtual samples generated by the proposed method exhibit greater proximity to the actual samples compared to those of other methods. Furthermore, integrating virtual samples into the training process of the long short-term memory-based soft sensor yields a 21.03% reduction in root-meansquare error compared with that of using the original training set alone.