Artificial Intelligence in Medicine

A Doctors perspective…

James Parkin
Jan 20 · 6 min read

I’ve spent 8 years training and studying to become the Doctor I am today. During that time I’ve learnt to diagnose and treat complex disease as well as communicate the situation to my patients. How long would it take a computer to learn to replace me? Thankfully, at the present time this doesn’t seem likely possible. But, like many professions, the way we interact with computers to augment our day job is changing rapidly. This is, in part, due to the implementation of Artificial Intelligence to “automate the boring stuff”, as Al Sweigary puts it. More specifically, Machine Learning and highly declarative programming languages like Python allow for technically challenged clinicians to implement high tech solutions to some of healthcare’s biggest challenges.

How long would it take a computer to learn to replace me?

I’m going to outline some of the most exciting and important ways Machine Learning (A sub-division of AI) is currently being implemented in healthcare.

NLP (as it’s called in the business) is a form of machine learning that allows computers to interpret human language and produce meaningful structure and information. At its simplest level it takes a block of text as its input and outputs something useful to the end user. This may not be that exciting, but if you combine NLP with technology that can listen to human conversation and convert that sound file to text, things start to get interesting.

My enthusiasm towards NLP stems from the bane of every doctors professional life… Note taking. NLP offers a brilliant and innovative solution to the laborious task of documentation. Imagine if a computer could listen to a conversation between a clinician and their patient, automatically record important and relevant findings and then begin auto-filling documents such as prescriptions and referrals. The system would be updated by the response of the clinician (often coined “ground truth”) and the process would repeat. Over time, the algorithm improves in its predictive accuracy, by comparing its output with the ground truth, learning how a doctor practices. Documentation would become streamlined, safe and individual to the clinician. The end result would be a more efficient doctor with time to spend communicating to patients rather than note taking.

You may now be thinking “This all sounds great, but AI in healthcare is years away…”. In the case of NLP, and many other forms of AI, that’s not true. Companies such as Kiroku are already doing this for dentistry. It’s only a matter of time until we see technologies like this in all areas of healthcare.

If you’re not already convinced of the utility of AI in healthcare then perhaps I’ll win you over with the next example.

With the steady increase of malignant skin cancers over the last several decades, some may argue that a dermatologist’s (skin doctor) most important skill is being able to distinguish cancerous moles from the plethora of similar looking lesions humans may develop. Despite extensive teaching during medical school and observing multiple “mole-check” clinics, I’m about 50% confident I could identify a subtle change in one’s mole to justify further invasive investigation (And that’s on a good day). Now, I’m no dermatologist, but I suspect my feeling’s are reflected by a range of my colleagues and any help in stratifying dodgy moles is welcomed with open arms.

A dermatologist’s most important skill is being able to distinguish cancerous moles

Make way for the deep learning (subgroup of machine learning) community. In 2017 a team from California, USA published a paper in Nature (impressive scientific journal) outlining a convolutional neural network (all will be explained) that matched or outperformed seasoned Dermatologist’s in their ability to identify cancerous lesions from images that could be taken on a mobile phone. This was truly ground-breaking. It was based on Google’s Googlenet CNN architecture and additionally trained on nearly 130,000 clinical images. The doctors were able to achieve an accuracy of 66% on average when looking at a subset of the validation images. The neural net achieved an accuracy of 72% when distinguishing between cancerous and non-cancerous images.

A neural network in it’s simplest form. Essentially, it takes a bunch of inputs (i.e. pixels from an image) assigns weight to them and uses the total from the weight * input to active nodes (i.e. in the hidden layers) further down the network. Eventually, this get’s summed up and an output probability for the classification (i.e. cancer or not cancer) of the initial input is calculated. During the training process this is compared to the ground truth value and, by a method called backpropagation, the model corrects the weights between layers to improve performance. A convolutional neural network can take in information that has more than 2 dimensions and uses a few other methods (that we won’t go into to today) to achieve the same goal.

A very impressive performance would you agree? However, a cautionary note. In practice Dermatologist’s don’t simply look at an image of a mole and decide whether they believe it’s cancer or not. This is not an apples to apples comparison, there is a lot that is considered when diagnosing any human disease. My excitement with this example of deep learning implemented in healthcare comes from it’s utility in remote medicine. There’s nothing fundamentally preventing this technology being put into an app allowing patient’s to take pictures of their questionable skin lesions and getting realistic risk scores to triage their attendance to their primary care physician. Under the current circumstances, reducing unnecessary visits to the doctors has never been more poignant. Further to this, non-dermatological doctors could use a similar system to assist them in classifying the urgency of referrals to already overstretched cancer clinics.

If you’re still reading I’m presuming at this point you are completely convinced that AI is the solution to some of healthcare’s biggest problems.

I want to finish by demonstrating the breadth of application these novel techniques can achieve. Surgery is often a hospitals most expensive and resource intensive activity, costing up to 42% of their budget. In all hospitals I have worked in surgical cases almost invariably overrun and cancellations occur. This is costly for the hospital as well as the patient. At times this cannot be prevented because of emergency cases that arrive unexpectedly. Elective (planned) procedures should for the most part run on time. The following paper, released in 2020 by the Artificial Intelligence Innovation Center in China, outlines a novel way of tackling this historic problem.

The team have trained an ensembled decision tree (see below), appropriately named “XGBoost”, to predict the surgical case duration of elective cases in order to maximise the efficiency of their surgical planning. They have trained the model on over 170,000 training cases and validated on a separate 8,500 test cases. Slightly more cases than your average theatre co-ordinator is likely to have seen… They estimated the current performance of surgical planning based on classic booking methods to be between 19–37% accurate with a 15 minute margin on either side of the slot. Machine learning in this instance, achieved a 51% accuracy by the same measure.

A decision tree. In lay-mans speak, a decision tree aims to separate data with meaningful questions about the characteristics of each input variable at every decision node. As we flow from the top to the bottom of the tree we end up with an estimation of ground truth. The boosted tree from the example is essentially a long line of trees that build (boost) on from one another to achieve greater accuracy.

What excites me most about the surgical planning example is its scalability. There’s no reason a similar process couldn’t be used to predict all sorts of poorly optimised healthcare resource allocation procedures. In the height of covid, when resources are scarce, this is of crucial importance in my opinion.

I hope I’ve illuminated some of the shadows surrounding the successful application of artificial intelligence in healthcare and convinced you of the potential benefit’s we could reap. This article only covers a tiny proportion of the amazing innovations machine learning pioneers are making in some of the most important problems facing healthcare in the 21st century.

If you enjoyed this article please subscribe for weekly content demystifying the world of AI!

The Startup

Get smarter at building your thing. Join The Startup’s +730K followers.