Biomedical NER for the Enterprise with Distillated BERN 2 and the Kazu Framework (2022)

Abstract: In order to assist the drug discovery/development process, pharmaceutical companies often apply biomedical NER and linking techniques over internal and public corpora. Decades of study of the field of BioNLP has produced a plethora of algorithms, systems and datasets. However, our experience has been that no single open source system meets all the requirements of a modern pharmaceutical company. In this work, we describe these requirements according to our experience of the industry, and present Kazu, a highly extensible, scalable open source framework designed to support BioNLP for the pharmaceutical sector. Kazu is a built around a computationally efficient version of the BERN2 NER model (TinyBERN2), and subsequently wraps several other BioNLP technologies into one coherent system.

## introduction one of the promises of the applications of a.i. within the pharmaceutical sector is to empower the search for new drugs, and quicken their development into safe, effective medicines. within the field of nlp, this commonly involves the application of named entity recognition (ner, which is the task of finding entities from a document) and entity linking (el, also known as grounding, or normalisation), and other techniques to internal and external documents. documents enhanced with such metadata have a wide variety of use cases, such as improving the performance of enterprise search systems, phase 4 monitoring of adverse events or as a precursor to relationship extraction (for instance in biomedical knowledge graph construction @xcite ). our experience has been that high quality ner remains at the core of many typical nlp use cases within the pharmaceutical industry, and therefore is the prominent focus of our work. bioner as a field is notable for it's technical complexity and chronic shortage of sufficiently sized training/test datasets, relative to general domain corpora. although recent advances have produced excellent results on benchmark datasets, recent work @xcite has also suggested that such approaches may be overfit, and may not necessarily generalise sufficiently to meet the needs of a production system. similarly, the tendency of academic products to focus on minimising the error rate over a given benchmark ignores practical issues of productionisation, such as the computational complexity of an algorithm, ecological impact and the maintenance of a coherent codebase. while a low overall error rate is undoubtedly important for any enterprise a.i. system, world class performance often comes at the expense of speed. therefore, striking a balance between an acceptable error rate and other performance metrics is central to user acceptance. we posit that 'near' (rather than 'absolute') state of the art is sufficient for most use cases. while several commercial solutions are available to address this requirement, we suggest that a freely available open source solution to deal with the intricacies of this area has not been forthcoming. in this piece, we describe the practical challenges and requirements of enterprise bionlp analytics. we present our tinybern2 biomedical ner model, which utilises weak supervision to address generalisability issues, and our associated kazu framework by which we deploy it for enterprise applications within a large pharmaceutical company. the kazu framework and models (including tinybern2 and distillated pubmedbert @xcite ) are open-sourced foot_0 . ## challenges of bionlp in the pharmaceutical sector and the kazu framework the priorities of academic research in nlp often do not focus on the various practical elements of productionising algorithms within the context of a corporate environment. nevertheless, this is one of the domains where their outputs can deliver value -via extending existing systems and enabling new projects. the challenges of managing a.i. systems in such environments are acknowledged by the emergence of the field of mlops, and we repeat some of the most salient aspects relevant to bionlp here.