A self-supervised learning approach for denoising autoregressive models with additive noise: finite and infinite variance cases