The quality of edible oils is closely related to their chemical compositions. Antioxidants have widespread application in edible oil production. In this study, a pioneering detection approach involving the use of a onedimensional convolutional autoencoder (1D-CAE) was introduced to compress spectral data for assessing antioxidant levels in edible oils. Fourier-transform near-infrared (FT-NIR) characterisation of edible oil samples with varying antioxidant concentrations was also conducted. An 1D-CAE model was developed to compress different pre-processed spectra into a condensed representation. These compressed features were then integrated with a support vector machine and partial least squares regression models to establish correlations for each target. The study examined the influence of pre-processing steps and feature engineering methods on near-infrared spectral analysis through independent or combined model analysis. The findings revealed that features derived from the 1D-CAE model demonstrated remarkable repeatability and can be utilised to construct robust detection models. The experimental results showed that the optimal detection model derived based on the 1D-CAE compression features has an average R2, 2 , RPD and RMSE of 0.9953, 15.1664 and 1.2035, respectively, on the prediction set. FT-NIR spectroscopy can be used to accurately detect butylated hydroxytoluene in edible oils. Therefore, autoencoders are an effective tool in spectroscopic analysis, offering promising avenues for future research and application.