How machine learning supports vaccine safety

Gary Finnegan

Gary Finnegan

October 9th, 2024

Gary Finnegan
Share

‘By scanning millions of public social media posts, researchers can detect rare problems with vaccines more quickly ’

Social media platforms such as X/Twitter and open discussion forums, including Reddit, publish vast numbers of posts from millions of users. These online conversations can be ‘noisy’, not least when the discussion turns to vaccines, with plenty of information and opinion that is incorrect.

But could these discussions also be a valuable source of information on disease outbreaks and vaccine safety signals?

While the volume of data on social media may be overwhelming for an individual to study, machine learning tools can rapidly scan for common themes, providing an early warning system for rare problems.

First, it’s important to know how vaccines are tested now – and the steps taken to monitor safety even after they are approved. 

Vaccines are given to thousands of people in clinical trials before they can be offered to the wider public. This is just the first step of the safety monitoring system which encourages individuals and health professionals to report any suspected problems to regulators even after the vaccine has been approved. Regulators examine these reports to find rare adverse events that might not have been detected in clinical trials.

See information box below for more on how regulators monitor vaccine safety

This kind of spontaneous reporting of adverse events remains the bedrock of continuous safety monitoring, but it could be improved using machine learning technology, according to Dr Jim Buttery at the University of Melbourne and the Murdoch Childrens Research Institute.

Dr Buttery, Co-director of the Global Vaccine Data Network, is an experienced paediatrician with a long-standing commitment to vaccine safety – a vital component in maintaining public confidence in immunisation systems. Early in his career, Dr Buttery cared for many babies who had meningitis. This experience shaped his commitment to preventative health.

‘The number of children dying of meningitis or suffering permanent neurological impairment fell dramatically within two or three years of the implementation of the Hib vaccine [which protects against a leading cause of meningitis in children under five years of age],’ he recalls. ‘That got me hooked on the importance of developing and implementing vaccines.’

How could machine learning help?

Most X/Twitter posts are visible to the public, with 70% of users providing information about their location. More detail about their location and the communities they may be part of can be determined by analysing the languages they use or other information included in their posts.

On occasion, people with concerns about adverse events after vaccination share their thoughts or questions on social channels. If a particular problem is mentioned by a large number of people – or by a significant concentration of individuals in a given area or community – it could point to a vaccine-related illness. Machine learning can help to make sense of the vast amount of information circulating online by scanning for keywords and recognising common themes.

Coloured pawns on a white lined map
Machine learning: connecting the dots between vast numbers of data points

For online vaccine conversations, the most active period in history came in the first half of 2021 when COVID-19 vaccines were introduced in developed countries. The vaccines had been tested and approved, but the scale of the rollout meant more people were vaccinated that year than ever before. The Melbourne team detected several potential issues using their machine learning algorithm.

‘We picked up real concerns about ringing in the ears, balance and hearing problems after COVID-19 vaccination,’ Dr Buttery told Vaccines Today. ‘We were then able to use another dataset to test whether there was an association.’

Looking at the number of people presenting to health services, they found there was no increase in hearing problems after vaccination, but there was an increase in reported tinnitus (ringing in the ears) which the researchers related to regulators for further investigation.

Some adverse events are more challenging to pick up than others, particularly if there is a time lag between vaccination and the reported problem. Allergic reactions, for example, usually occur very soon after vaccination. Other events can be picked up much later. 

During the COVID-19 rollout, social media monitoring identified a spike in reports of menstrual disruption after vaccination. The effect, which was short-lived and did not affect all women, sometimes led to an increase in cycle length. Many of those affected did not make appointments with their GPs or report it to regulators, but some posted on X/Twitter.

Graph of Menstrual related personal tweets

While this problem had not had a major impact on the health system, at a community level it was a talking point: women knew something was up. The traditional surveillance system can be slow to identify this kind of safety signal, but active monitoring of public chatter can detect it more quickly. In practice, it can make a real difference to vaccine confidence if health authorities are swift to recognise an issue that is of real concern to the community.

Platforms such as X/Twitter and Reddit, along with open tools such as Google Trends, are a ready source of information. Some platforms, however, are closed to analysis unless researchers can secure specific permission to access data.

The more data researchers have, the more sensitive their systems will become. And, as some social media channels are particularly popular with certain demographics – X/Twitter has a high proportion of US users; Facebook’s network is ageing fast; TikTok and SnapChat are (currently) popular with adolescents – broadening the data pool reduces the risk of bias.

There are other potential sources of bias too. ‘Bots (automated accounts that post on social media sites) share and amplify vaccine information,’ Dr Buttery said. ‘It’s not all misinformation. Some bots spread positive or neutral messages, but the negative posts are particularly good at triggering humans to react. That’s why we routinely apply bot detection to our analysis.’

This fast-moving area could shape the future of vaccine uptake, requiring collaboration between doctors, vaccine experts, computer scientists and regulators. Together, they are developing tools that can detect the signal in the noise. Not only could this support vaccine safety, it may provide a welcome boost to vaccine confidence.

Read the research

How is vaccine safety monitored?

Before they are offered to the public, vaccines are given to thousands of people to test whether they safely prevent serious illnesses. After vaccination, many people roll down their sleeves and go about the rest of their day, experiencing no issues at all. Some have a sore arm or, with certain vaccines, tiredness or a general feeling of being under the weather. This is generally mild and short-term, lasting a day or two.

Independent regulators determine whether to approve a vaccine, based on the balance between these adverse events and the benefit of protection against a serious illness. All medical interventions, from cholesterol medicines to chemotherapy and surgery, come with potential downsides which a patient and clinician must consider: removing a brain tumour is risky, but doing nothing may be worse.  

For vaccines, the standard is particularly high as vaccines are given to the whole population, including infants, vulnerable individuals and people who are in good health. That is why clinical trials, using in healthy individuals, are studied closely before experts give the green light for a new vaccine.

However, after approval, when millions of people get vaccinated, rare problems can arise: a one in a million event that was not picked up in a trial of 5,000 people. That’s where ‘post-marketing surveillance’ comes in. Individuals and health professionals can report suspected symptoms to regulators. These might include a rash or dizziness soon after vaccination, or a less common health issue weeks after vaccination.

The regulator looks for patterns in these reports, and considers plausible connections between vaccination and the reported issue, to determine whether the vaccine may be the cause. In some cases, the vaccine is the cause and the regulator may pause its use or limit its advice on who can be offered the vaccine. In other instances, the vaccination is unrelated to the suspected issue.