  As telecommunication systems evolve to meet increasing demands, integrating
deep neural networks (DNNs) has shown promise in enhancing performance.
However, the trade-off between accuracy and flexibility remains challenging
when replacing traditional receivers with DNNs. This paper introduces a novel
probabilistic framework that allows a single DNN demapper to demap multiple QAM
and APSK constellations simultaneously. We also demonstrate that our framework
allows exploiting hierarchical relationships in families of constellations. The
consequence is that we need fewer neural network outputs to encode the same
function without an increase in Bit Error Rate (BER). Our simulation results
confirm that our approach approaches the optimal demodulation error bound under
an Additive White Gaussian Noise (AWGN) channel for multiple constellations.
Thereby, we address multiple important issues in making DNNs flexible enough
for practical use as receivers.
