Multi-task learning leverages potential correlations among related tasks to extract common features and yield performance gains. In this paper, a generative multi-task learning (MTL) approach for text classification and categorization is proposed, which is composed of a shared encoder, a multilabel classification decoder and a hierarchical categorization decoder. In the two decoders, a label-orderindependent multi-label classification loss function and a hierarchical structure mask matrix are introduced. Experiments conducted on the real-world public security dataset show that the proposed approach has obvious advantages over the baseline approaches and can enhance the semantic association between the results of the classification and categorization tasks. INDEX TERMS Generative model, hierarchical classification, multi-label classification, multi-task learning.