A transmitter comprising at least one processor; and at least one memory including computer program code, the at least one memory and computer program code configured to, with the at least one processor, cause the transmitter to perform at least: inputting information indicating channel quality to a trained neural network based model for a mapper, which trained neural network based model is based on a first algorithm with trainable parameters, during training of which a loss function operating on bits has been used, the loss function causing that, during the training, labeling of constellation points is jointly learned with constellation geometry, and which trained neural network based model outputs a constellation comprising a plurality of sub-constellations; receiving bits to be sent from the transmitter; performing distribution matching using as a target distribution a distribution, which is based on a second algorithm with trainable parameters, trained during training of the first algorithm and stored with the trained neural network based model, and channel coding to the received bits to generate matched bits and parity bits; using the parity bits to select a sub-constellation amongst the plurality of sub-constellations of the constellation; using the matched bits and the selected sub-constellation to generate modulated symbols; and causing sending the modulated symbols. at least one processor; and at least one memory including computer program code, the at least one memory and computer program code configured to, with the at least one processor, cause the transmitter to perform at least: inputting information indicating channel quality to a trained neural network based model for a mapper, which trained neural network based model is based on a first algorithm with trainable parameters, during training of which a loss function operating on bits has been used, the loss function causing that, during the training, labeling of constellation points is jointly learned with constellation geometry, and which trained neural network based model outputs a constellation comprising a plurality of sub-constellations; receiving bits to be sent from the transmitter; performing distribution matching using as a target distribution a distribution, which is based on a second algorithm with trainable parameters, trained during training of the first algorithm and stored with the trained neural network based model, and channel coding to the received bits to generate matched bits and parity bits; using the parity bits to select a sub-constellation amongst the plurality of sub-constellations of the constellation; using the matched bits and the selected sub-constellation to generate modulated symbols; and causing sending the modulated symbols. inputting information indicating channel quality to a trained neural network based model for a mapper, which trained neural network based model is based on a first algorithm with trainable parameters, during training of which a loss function operating on bits has been used, the loss function causing that, during the training, labeling of constellation points is jointly learned with constellation geometry, and which trained neural network based model outputs a constellation comprising a plurality of sub-constellations; receiving bits to be sent from the transmitter; performing distribution matching using as a target distribution a distribution, which is based on a second algorithm with trainable parameters, trained during training of the first algorithm and stored with the trained neural network based model, and channel coding to the received bits to generate matched bits and parity bits; using the parity bits to select a sub-constellation amongst the plurality of sub-constellations of the constellation; using the matched bits and the selected sub-constellation to generate modulated symbols; and causing sending the modulated symbols.