## 1 Introduction
[21] introduced a self-adaptive deep learning algorithm that can predict the total number of phases and their molar composition. The algorithm demonstrates adaptability to changes in input dimensions. In a similar vein, [PERSON] et al. in 2019 presented a deep learning model that approximates flash calculations at a given mole (N), volume (V), and temperature (T) to address both phase stability and phase splits [22]. [PERSON] et al. [23] presented a machine learning workflow that combines a classifier and an ANN regressor to label single phases by predicting the critical temperature. This resulted in a 10-fold reduction in iterations applied to a CO2 injection example. Additionally, machine learning algorithms were utilized to accelerate flash calculations, considering capillary pressure, with the aim of extending the practical application to shale reservoirs [24; 25]. Recently, machine learning techniques have been integrated with fundamental physical laws, a concept first introduced by [PERSON] and [PERSON] [26] and further developed by numerous researches [27; 28]. [PERSON] et al. [29] and [PERSON] et al. [30] introduced physics-informed neural networks (PINNs), which incorporate physical principles and constraints into the loss function, allowing for the consideration of initial and boundary conditions. [PERSON] and [PERSON] [31] and [PERSON] et al. [32] have further applied physics-based models to study fluid flow in porous media, specifically to solve the Buckley-Leverett equation. In alignment with the approach of [PERSON] et al. [29], [PERSON] et al. [33] integrated the underlying physics and physical constraints into ANNs for phase behavior calculations. In this case, the loss function was expanded to include mass and component balance constraints. Other recent studies have expanded their focus to integrating and employing machine learning (ML) for phase equilibrium in compositional simulations. Specifically, the use of an ML workflow for identifying single phases in CO2 injection simulations has notably decreased the time required for phase stability calculations, resulting in accelerated computations [34]. Furthermore, [PERSON] et al. [35] and [PERSON] et al. [36] examined the application of ANN-based phase stability and phase split calculations in numerical examples of gas injection and gas condensate reservoir cases, highlighting an 80% reduction in the computational costs for the stability tests. The objective of this paper was to assess the accuracy and physical reliability of machine learning approaches for flash calculations and phase behavior predictions, particularly in complex near-critical conditions for CO2-hydrocarbon mixtures. This involved evaluating both a direct neural network model and two hybrid models against the established Peng-Robinson equation of state under various conditions. First, we generated a synthetic dataset to train the machine learning algorithms. Second, we discussed the structures and features of the direct and hybrid machine learning algorithms used in this paper. Third, we demonstrated the performance of capturing physical phenomena in compositional space and compared the model predictions with the physical model. Last, we discussed the implications and conclusions of this study.