Comparison of natural language processing algorithms applied to small supervised datasets in the legal domain
Resumo
Resumo: O presente trabalho procura investigar a performance de técnicas de transfer learning em conjunto com técnicas de data augmentation e diferentes algoritmos de aprendizagem supervisionada e semi-supervisionada na classificação de textos da área legal em tópicos pré-definidos. A intenção é investigar as melhores técnicas capazes de otimizar a performance na aludida tarefa utilizando uma base de dados rotulados relativamente pequena e grandes quantidades de dados não rotulados. Mais especificamente, serão utilizados como teste dados de atendimentos ao público realizados pelo Ministério Público do Estado do Paraná (MPPR), com o objetivo de classificar as descrições dos atendimentos em um dos assuntos listados pela instituição e automatizar a tarefa no sistema de registros. Como os integrantes da instituição possuem diversas demandas, não é possível avaliar um grande volume de dados, de modo que a otimização de classificadores com utilização de poucos dados é uma tarefa relevante para o desenvolvimento do produto final. Além disso, considerando o vocabulário particular utilizado cotidianamente pelo MPPR, pretende-se avaliar o impacto da realização de fine-tuning em modelos de linguagem pré-existentes em português na performance do classificador. Para a presente pesquisa foi obtida uma base rotulada contendo 6.500 observações com o objetivo de classificar textos curtos em 50 diferentes assuntos relacionados às áreas de atuação do MPPR. Também foram disponibilizados grandes volumes de observações não rotuladas para compor uma base semi-supervisionada, bem como uma base contendo mais de um milhão de registros internos, utilizada no treinamento de diferentes modelos de linguagem. Os resultados da pesquisa demonstram que, no caso da aprendizagem supervisionada através de classificadores lineares como a Regressão Logística e o SVM e ensembles como o Gradient Boosting e Random Forest, a melhor performance é observada utilizando embeddings extraídos pela técnica word2vec quando comparado com o modelo BERT. Este último demonstra performance superior quando utiliza como vantagem a arquitetura do próprio modelo como classificador, tendo superado os modelos anteriores neste sentido. O melhor resultado obtido indica que o uso conjunto do modelo de linguagem BERT ajustado ao vocabulário jurídico, técnicas específicas de aprendizado semi-supervisionado e data augmentation obtém melhor performance quando comparado aos demais modelos, com obtenção de acurácia de 80,7% na predição de 50 classes. Abstract: This research seeks to investigate the performance of transfer learning techniques in conjunction with data augmentation and different supervised and semi-supervised learning algorithms in the classification of texts in the legal area on predefined topics. The intention is to investigate how the recent advances in Natural Language Processing (NLP) can contribute to tackle such type of problem (where amount of labelled data is low but there is a large volume of unlabelled/domain-specific data). More specifically, we will use the records of demands to the Public Prosecutor’s Office of the State of Paraná in order to classify the descriptions in one of the subjects listed by the institution and automate the task in the records system. Considering that the members of the institution have several demands, it is not possible to evaluate a large volume of data, so that the optimization of classifiers in low regime data is a relevant task for the development of the final product. In addition, considering the specificity of the vocabulary used by the MPPR, it is intended to assess the impact of fine-tuning pre-existing Portuguese language models on the classifier’s performance. For this investigation, a labeled dataset was obtained containing 6,500 observations in order to classify texts on 50 different categories related to the areas of activity of the MPPR. Large volumes of unlabeled observations were also made available to compose a semi-supervised dataset, as well as a dataset containing more than one million internal records, used in the training of different language models. Our results demonstrate that, in the case of supervised learning through linear classifiers such as Logistic Regression and SVM and boosted trees such as Gradient Boosting and Random Forest, better performance is observed using embeddings extracted by the word2vec technique when compared to the BERT model. The latter demonstrates superior performance when using the architecture of the model itself as a classifier to its advantage, having surpassed the previous models in this sense. The best result obtained indicates that the joint use of the BERT language model fine-tuned to the legal vocabulary, specific techniques of semi-supervised learning and data augmentation presents better performance when compared to all previous models, having obtained an accuracy of 80.7% in the prediction of 50 classes.
Collections
- Dissertações [263]