A computer implemented method of detecting abnormalities in ECG signals, comprising: providing an ECG signal to a neural network ; within a first subset of layers of the neural network , performing a first series of convolution operations; in a final layer of the first subset of layers, determining a preliminary classification comprising a plurality of preliminary classification estimates, each preliminary classification estimate corresponding with a time segment of the ECG signal; determining input data for a second subset of layers of the neural network by concatenating the preliminary classification with the output of a layer of the first subset of layers that precedes the final layer of the first subset of layers; within a second subset of layers of the neural network , performing a second series of convolution operations; in a final layer of the second subset of layers, determining a final classification comprising a plurality of final classification estimates, each final classification estimate corresponding with a time segment of the ECG signal; wherein the final classification estimates include an estimate as to the probability of each time segment comprising atrial fibrillation ; and the neural network has been trained, the training comprising: determining a preliminary classification and a final classification for each of a plurality of time periods of an ECG signal with an initial set of convolution filter values for the neural network ; determining a penalty function responsive to both the preliminary classification and the final classification, using training classification data for each time period; and adjusting the convolution filter values to minimise the penalty function. providing an ECG signal to a neural network ; within a first subset of layers of the neural network , performing a first series of convolution operations; in a final layer of the first subset of layers, determining a preliminary classification comprising a plurality of preliminary classification estimates, each preliminary classification estimate corresponding with a time segment of the ECG signal; determining input data for a second subset of layers of the neural network by concatenating the preliminary classification with the output of a layer of the first subset of layers that precedes the final layer of the first subset of layers; within a second subset of layers of the neural network , performing a second series of convolution operations; in a final layer of the second subset of layers, determining a final classification comprising a plurality of final classification estimates, each final classification estimate corresponding with a time segment of the ECG signal; wherein the final classification estimates include an estimate as to the probability of each time segment comprising atrial fibrillation ; and the neural network has been trained, the training comprising: determining a preliminary classification and a final classification for each of a plurality of time periods of an ECG signal with an initial set of convolution filter values for the neural network ; determining a penalty function responsive to both the preliminary classification and the final classification, using training classification data for each time period; and adjusting the convolution filter values to minimise the penalty function. determining a preliminary classification and a final classification for each of a plurality of time periods of an ECG signal with an initial set of convolution filter values for the neural network ; determining a penalty function responsive to both the preliminary classification and the final classification, using training classification data for each time period; and adjusting the convolution filter values to minimise the penalty function. <EOS>