Abstract Recently, a machine learning (ML) approach has been proposed to determine the percolation threshold and critical behaviors of percolation transitions (PTs), based on the ML algorithm used for the phase transition in thermal equilibrium systems. However, we have observed that the conventional ML approach used for thermal systems does not accurately provide the percolation threshold, in particular when the training regions for ML are asymmetrical with respect to its known value. Here, we remark that percolation is a geometric phase transition, and thus global information, rather than the local configurations used in thermal systems, is needed to determine the percolation threshold. To address this, we assign a parent node index to each node, which is updated during cluster merging, capturing global information on the ancestor of each node. Utilizing this quantity as input data for the convolutional neural network in the ML algorithm, we successfully obtain the correct percolation threshold regardless of whether the training regions are symmetric or asymmetric with respect to the known value. This validity holds independently of the PT type: continuous, hybrid, or discontinuous. As the concept of percolation is applied to various phenomena, this ML algorithm could be used ubiquitously.