Cosmic muon spallation backgrounds are ubiquitous in low-background experiments. For liquid scintillator-based experiments searching for neutrinoless double-beta decay, the spallation product $^{10}$C is an important background in the region of interest between 2-3 MeV and determines the depth requirement for the experiment. We have developed an algorithm based on a convolutional neural network that uses the temporal and spatial correlations in light emissions to identify $^{10}$C background events. With a typical kiloton-scale detector configuration like the KamLAND detector, we find that the algorithm is capable of identifying 61.6% of the $^{10}$C at 90% signal acceptance. A detector with perfect light collection could identify 98.2% at 90% signal acceptance. The algorithm is independent of vertex and energy reconstruction, so it is complementary to current methods and can be expanded to other background sources.