Representing pesticides by random walks on their molecular graphs allows a support vector machine to predict their toxicity to bees.