  We present two analysis techniques for distinguishing background events
induced by neutrons from photon signal events in the search for the rare
$K^0_L\rightarrow\pi^0\nu\bar{\nu}$ decay at the J-PARC KOTO experiment. These
techniques employed a deep convolutional neural network and Fourier frequency
analysis to discriminate neutrons from photons, based on their variations in
cluster shape and pulse shape, in the electromagnetic calorimeter made of
undoped CsI. The results effectively suppressed the neutron background by a
factor of $5.6\times10^5$, while maintaining the efficiency of
$K^0_L\rightarrow\pi^0\nu\bar{\nu}$ at $70\%$.
