Adaptive modelling of structured molecular representations for toxicity prediction