The new medium access method of IEEE 802.11ah, called Restricted Access Window (RAW), divides stations into different groups, and only allows stations in the same group to access the channel simultaneously, in order to reduce collisions and thus achieve better performance (e.g., throughput). However, the existing station grouping strategies only support homogeneous scenarios where all stations use the same modulation and coding scheme (MCS) and packet size. A surrogate model is an efficient mathematical model that represents the behavior of a complex system, trained with a limited set of labeled input-output data samples. In this paper, we present a surrogate model that can accurately predict RAW performance under a given Restricted Access Window (RAW) configuration in heterogeneous networks. Different from the homogeneous scenario, heterogeneous networks are defined by a large number of parameters, leading to an enormous design space, i.e., the order of 10 17 possible data points. This is too big to achieve feasible training convergence. In this paper, we present a novel training methodology that leads to a new design space with highly reduced size, i.e., the order of 10 5 data points. The surrogate model converges when less than 6000 labeled data points are used for training, which is only a tiny portion of the whole design space. The results show that, the relative error between model prediction and simulation results is less than 0.1 for 95% of the data points, in the areas of the design space studied. Its low complexity and high precision make the proposed model a valuable tool to develop real-time RAW optimization algorithms for heterogeneous IEEE 802.11ah networks.Index Terms-IEEE 802.11ah, RAW, surrogate model, heterogeneous networks.