A medical system , comprising: a first catheter including at least one far-field electrode and at least one first sensing electrode configured to be inserted into a cardiac chamber of a first living subject; a second catheter comprising at least one second sensing electrode configured to be inserted into a cardiac chamber of a second living subject; and a processor configured to: receive first intracardiac signals comprising first far-field components captured by the at least one first sensing electrode of the first catheter, the at least one sensing electrode being in contact with tissue of the cardiac chamber of the first living subject, and at least one far-field signal captured from the at least one far-field electrode inserted into the cardiac chamber and not in contact with the tissue of the cardiac chamber; train an artificial neural network to remove far-field components from intracardiac signals responsively to the received first intracardiac signals and the at least one far-field signal; receive second intracardiac signals captured by the at least one second sensing electrode of the second catheter inserted into the cardiac chamber of the second living subject; and apply the trained artificial neural network to the second intracardiac signals to remove respective second far-field components from the second intracardiac signals. a first catheter including at least one far-field electrode and at least one first sensing electrode configured to be inserted into a cardiac chamber of a first living subject; a second catheter comprising at least one second sensing electrode configured to be inserted into a cardiac chamber of a second living subject; and a processor configured to: receive first intracardiac signals comprising first far-field components captured by the at least one first sensing electrode of the first catheter, the at least one sensing electrode being in contact with tissue of the cardiac chamber of the first living subject, and at least one far-field signal captured from the at least one far-field electrode inserted into the cardiac chamber and not in contact with the tissue of the cardiac chamber; train an artificial neural network to remove far-field components from intracardiac signals responsively to the received first intracardiac signals and the at least one far-field signal; receive second intracardiac signals captured by the at least one second sensing electrode of the second catheter inserted into the cardiac chamber of the second living subject; and apply the trained artificial neural network to the second intracardiac signals to remove respective second far-field components from the second intracardiac signals. receive first intracardiac signals comprising first far-field components captured by the at least one first sensing electrode of the first catheter, the at least one sensing electrode being in contact with tissue of the cardiac chamber of the first living subject, and at least one far-field signal captured from the at least one far-field electrode inserted into the cardiac chamber and not in contact with the tissue of the cardiac chamber; train an artificial neural network to remove far-field components from intracardiac signals responsively to the received first intracardiac signals and the at least one far-field signal; receive second intracardiac signals captured by the at least one second sensing electrode of the second catheter inserted into the cardiac chamber of the second living subject; and apply the trained artificial neural network to the second intracardiac signals to remove respective second far-field components from the second intracardiac signals. <EOS>