  In this work, a novel data-driven methodology for designing polar codes for
channels with and without memory is proposed. The methodology is suitable for
the case where the channel is given as a "black-box" and the designer has
access to the channel for generating observations of its inputs and outputs,
but does not have access to the explicit channel model. The proposed method
leverages the structure of the successive cancellation (SC) decoder to devise a
neural SC (NSC) decoder. The NSC decoder uses neural networks (NNs) to replace
the core elements of the original SC decoder, the check-node, the bit-node and
the soft decision. Along with the NSC, we devise additional NN that embeds the
channel outputs into the input space of the SC decoder. The proposed method is
supported by theoretical guarantees that include the consistency of the NSC.
Also, the NSC has computational complexity that does not grow with the channel
memory size. This sets its main advantage over successive cancellation trellis
(SCT) decoder for finite state channels (FSCs) that has complexity of
$O(|\mathcal{S}|^3 N\log N)$, where $|\mathcal{S}|$ denotes the number of
channel states. We demonstrate the performance of the proposed algorithms on
memoryless channels and on channels with memory. The empirical results are
compared with the optimal polar decoder, given by the SC and SCT decoders. We
further show that our algorithms are applicable for the case where there SC and
SCT decoders are not applicable.
