OneClassSVM performs better when trained on pure data (inliers only) I have a dataset which has some outliers and majority of the class is inliers (not anomalous). I am trying to train a OneClassSVM/IsolationForest model to identify the outliers. If I train using all data and then generate the predictions on the same data, my performance is not as good as compared to the case when I train on only the inliers and then predict on all data. What is the right approach to train the model in this case?
I have labels on whether an observation is outlier or not. But the labels are noisy (not perfect). I am evaluating the performance using roc auc score.

It's not surprising. The idea of such algorithms is that they learn the distribution of one class, so that they can classify everything that differs as outliers. Usually, they are robust to some degree of contamination and, as noticed in the comments, this is tunable through the hyperparameters. However, the number of outliers in training data needs to be small for it to work well. No outliers in the training data are a perfect case.
