  We study the two-dimensional site-percolation model on a square lattice. In
this paradigmatic model, sites are randomly occupied with probability $p$; a
second-order phase transition from a non-percolating to a fully percolating
phase appears at occupation density $p_c$, called percolation threshold.
Through supervised deep learning approaches like classification and regression,
we show that standard convolutional neural networks (CNNs), known to work well
in similar image recognition tasks, can identify $p_c$ and indeed classify the
states of a percolation lattice according to their $p$ content or predict their
$p$ value via regression. When using instead of $p$ the spatial cluster
correlation length $\xi$ as labels, the recognition is beginning to falter.
Finally, we show that the same network struggles to detect the presence of a
spanning cluster. Rather, predictive power seems lost and the absence or
presence of a global spanning cluster is not noticed by a CNN with local
convolutional kernel. Since the existence of such a spanning cluster is at the
heart of the percolation problem, our results suggest that CNNs require careful
application when used in physics, particularly when encountering less-explored
situations.
