2026

Modern language models are not only tools for processing text; they are also becoming computational instruments for studying how humans understand, predict, and generate language. This tutorial introduces neural encoding and neural decoding to the NLP community through this broader perspective: how can NLP help us understand language processing in the human brain, and how can brain data help us evaluate and improve language models? We will present neural encoding as a way to test whether representations from language models—such as contextual embeddings, surprisal, attention patterns, and layer-wise features—can explain brain responses during reading or listening. We will then introduce neural decoding as the reverse problem: reconstructing linguistic or multimodal content from brain activity using retrieval, representation learning, and foundation-model-guided generation. Rather than framing decoding mainly as brain–computer interface technology, we will connect it to core NLP questions about meaning representation, generation under uncertainty, multimodal grounding, and semantic evaluation. The tutorial assumes no neuroscience background. It combines intuitive foundations, representative papers, practical modeling recipes, notebook-style demos, and discussion of mental privacy, consent, and responsible brain–language technologies.

2023

Discharge summaries are comprehensive medical records that encompass vital information about a patient’s hospital stay. A crucial aspect of discharge summaries is the temporal information of treatments administered throughout the patient’s illness. With an extensive volume of clinical documents, manually extracting and compiling a patient’s medication list can be laborious, time-consuming, and susceptible to errors. The objective of this paper is to build upon the recent development on clinical NLP by temporally classifying treatments in clinical texts, specifically determining whether a treatment was administered between the time of admission and discharge from the hospital. State-of-the-art NLP methods including prompt-based learning on Generative Pre-trained Transformers (GPTs) models and fine-tuning on pre-trained language models (PLMs) such as BERT were employed to classify temporal relations between treatments and hospitalisation periods in discharge summaries. Fine-tuning with the BERT model achieved an F1 score of 92.45% and a balanced accuracy of 77.56%, while prompt learning using the T5 model and mixed templates resulted in an F1 score of 90.89% and a balanced accuracy of 72.07%.Our codes and data are available at https://github.com/HECTA-UoM/MedTem.