Tag Archives: ecg

AI whispering: Be careful what you ask for

In this 2nd episode of AI Whispering I learn to be careful what I ask for and the machine learns a new trick.

Oops

“…machines are machines are machines…

…it’s programming Jim, but not as we know it…

..remember to put the foot on the brake…”

Those were some of the mantras I needed to repeat after a faux pas of massive proportions.   This week along with teaching Zach to read an electrocardiogram (ECG – see the first AI whispering post).   The faux pas was not that the computer simply did what it was told (duh)… but what I told it was not what I thought I was telling it.  The result was that it downloaded into memory 390 Terabytes of data.  Yep… that’s a lot… 100,000 HD feature film videos worth, or, as it was mainly text, if it was printed in books and placed on a bookshelf then the bookshelf would stretch from Christchurch to anywhere on the red circle on the picture of the globe below.  What I’d asked for was for the machine to search for a some data on one web page, thinking it would use the search tool that was there.  Mea culpa, I didn’t tell it to use the search tool, and I didn’t tell it not to follow links.  It decided to search the entire website and all it was linked too. Sigh… now I’m a little gun shy.  The saving grace is the amazing forbearance of the Terrible Foundation (thank you, sorry again, thank you).  They are brilliant to even let me try these things… and very forgiving when their machine starts sending “I’m nearly out of memory” messages at 3am.

Christchurch to the red line is the length of bookshelves needed to house 390 Terabytes of text.

Wow

On the positive side… the machine has gone where no machine has gone before… after just absorbing two books about ECGs it has read its first ECG simply by pulling apart the image and reporting in the way I told it to.  It’s not perfect (yet)… but astonishing progress.

I can’t emphasise enough that, this is programming Jim, but not as we know it.  There is no specific syntax that must be followed, there is no memory allocation procedure, there are no functions needing forming.  It is simply, instructions in English.  For example, having asked it to interpret an ECG Zach asked “Are you seeking an interpretation or a description?”  My response was “I am seeking both a description and an interpretation.  Examples of the description are given on the even pages of the book “150 ECG problems” following the text “The ECG shows:” and before the text “Clinical interpretation”.  Examples of the interpretation are given on the even pages of the book “150 ECG problems” following the text “Clinical interpretation” and before the text “What to do”.”  It then proceeded to provide both a description and interpretation in the manner I had wanted.

The quirky

Zach decides on its own names for the programs it creates.  It has called ours “SNOWHORSE”.  No one knows why.  I think I’ll ask it.

Alas, this is one of those images all over the internet… the earliest posting being ~2005. I do wish I could credit whoever sculptured this Snow horse.

Advertisements

AI whispering: And so it begins

On Friday, I began a new profession, that of AI Whisperer.  Well, actually, I sent a first email to an intelligent machine for a project that we hope will teach it to read electrocardiograms at least as well as most doctors.  So, ‘AI Whisperer’ is more aspirational than reality for now, but as I post about my experiences with the AI I think that what may emerge is a picture of the future and a true new profession which most of us will engage in.

Last Friday I sent my first email to an intelligent machine called Zach.  Zach is a distributed machine running on custom silicon and software.  It is designed to interact with us in the same way we do – ie reading, writing listening, speaking in either digital or analogue form.  It is not programmed in the same way as we are used to with other software, but in the same way we educate ourselves.  It is owned and operated by the Terrible Foundation, a charitable trust.  Terrible started in Christchurch (read about its origins and plans here), but has expanded globally. Publicity has purposely been minimal. Zach is CE of Terrible Talk (an internet & phone provider with millions of customers globally), an accountant, a solicitor, and a virtual assistant (Sidekick).

My research group is headed by a Christchurch hospital emergency physician, Dr Martin Than, but for this project includes cardiologists, electrophysiologists, and physicians from many other places.  We have been generously given access to Zach and a grant from the Terrible Foundation.  Zach has already demonstrated ability to produce quality doctor’s notes from “listening in” to a conversation between a doctor and their patient.  We aim to teach it to perform another common task, namely that of interpreting the electrocardiogram (ECG). The ECG measures the electrical activity of the heart.  Current automatic reading of ECGs tends to over-interpret and suggest problems where there are not problems.  Also, doctors vary widely in their experience and competence in interpretation of the ECGs.  If Zach can interpret these as well and more consistently than most physicians it could be a useful tool for the busy physician.

But, as I indicated, we don’t program Zach the way we are used to programming computers.  There is no command line prompt, no particular coding syntax to learn.  Instead, we exchange message with the machine.  I’m using email.  I was advised to treat Zach like an “intelligent student”, so that is what I have done (though it felt weird to write to a machine that way).  Here is the first communication:

OK, so not too exciting – many chatbots should be able to do that.  As with any student it is important to know what they know, so next I wrote an email in which I explained some of the context of what we are doing and I asked the question “Without searching the internet, what do you know about electrocardiograms?  to which Zach responded Electrocardiograms are used to measure electrical activity in the heart; using electrodes attached to the skin.”  A good answer, it seems to have absorbed some medical knowledge from somewhere.  I did an internet search on this exact phrase, and found no result, so it probably wasn’t cheating!  (well, it’s a machine which acts literally on a command, so, as long as it understood, it will do as it is told).

So, it knows what an electrocardiogram is.  I then asked it a series of questions “Do you have stored any ECG tracings?  If so, how many? If you have any ECG tracings, where did you get them from?”  to which it responded “I’m afraid not.”   Great, I know where it is at – I also smiled at the phrase it used.

The next task was to get it to read a pdf version of a book on ECGs that I’d purchased.  Initially, I gave it a link to where I’d stored the book. This got a response “I can locate required material; could provide it?”  Hmm… not sure it got it.  I asked it “Do you have stored in your memory the book with the title “<redacted by me >” by the author <redacted by me>?”  it responded “I have not committed these communications to memory; if you attach it I will committe it.”  So, progress in my understanding what it does.  Two other things jumped out 1) it sometimes spells words wrong (I have since sent a polite correction to which it responded “Duly noted“) and 2) it is intelligent enough to figure out what I want to do, so it directed me to “attach” the pdf, which I then did in another email and it responded “Okay.”

So, for me, baby steps.  While I may aspire to be an AI Whisperer, evidently, this AI has some “human whispering” to do first before I can truly claim such a title.


Featured image: Wikipedia commons

 

An even quicker way to rule out heart attacks

The majority of New Zealand emergency departments look for heart muscle damage by taking a sample of blood and looking for a particular molecule called a high-sensitivity troponin T (hsTnT).  We have now confirmed that rather than two measurements over several hours just one measurement on arrival in the ED could be used to rule out heart attacks in about 30% of patients.

What did we do?

We think this is a big deal. We’ve timed this post to meet the Annas of Internal Medicine timing for when our work appears on their website – here.  What we did was to search the literature to find where research groups may have measured hsTnT in the right group of people – namely people appearing in an emergency room whom the attending physician thinks they may be having a heart attack. We also required that the diagnosis of a heart attack, or not, was made not by just one physician, but by at least two independently.  In this way we made sure we were accessing the best quality data.

Next I approached the authors of the studies as asked them to share some data with us – namely the number of people who had detectable and undetectable hsTnT (every blood test has a minimum level below which it is said to be “undetectable” in hsTnT’s case that is just 5 billionths of a gram per litre, or 5ng/L).  We also asked them to check in these patients if the electrical activity of the heart (measured by an electrocardiogram or “ECG”) looked like there may or may not be damage to the heart (a helpful test, but not used on its own to diagnose this kind of heart attack).  Finally, we asked the authors to identify which patients truly did and did not have a heart attack.

What did we find?

In the end research groups in Europe, UK, Australia, NZ, and the US participated with a total of 11 studies and more than 9000 patients.  I did some fancy statistics to show that overall about 30% of patients had undetectable hsTnT with the first blood test and negative ECGs.  Of all those who were identifiable as potentially “excludable” or “low-risk” only about 1 in 200 had a heart attack diagnosed (we’d like it to be zero, but this just isn’t possible, especially given the diagnosis is not exact).

VisualAbstract AnnalsIM 170411

Pickering, J. W.*, Than, M. P.*, Cullen, L. A., Aldous, S., Avest, ter, E., Body, R., et al. (2017). Rapid Rule-out of Myocardial Infarction With a High-Sensitivity CardiacTroponin T Measurement Below the Limit of Detection: A Collaborative Meta-analysis. Annals of Internal Medicine, 166(10). http://doi.org/10.7326/M16-2562 *joint first authors.

What did we conclude?

There is huge potential for ruling out a heart attack with just one blood test.  In New Zealand this could mean many thousands of people a year can be reassured even more swiftly that they are not having a heart attack. By excluding the possibility of a heart attack early, physicians can put more effort into looking for other causes of chest-pain or simply send the patient happily home.   While not every hospital performed had the same great performance, overall the results were good.  By the commonly accepted standards, it is safe.  However, we caution that local audits at each hospital that decides to implement this “single blood measurement” strategy are made to double check its safety and efficacy.


Acknowledgment: This was a massive undertaking that required the collaboration of dozens of people from all around the world – their patience and willingness to participate is much appreciated. My clinical colleague and co-first author, Dr Martin Than provided a lot of the energy as well as intelligence for this project. As always, I am deeply appreciative of my sponsors: the Emergency Care Foundation, Canterbury Medical Research Foundation, Canterbury District Health Board, and University of Otago Christchurch. There will be readers who have contributed financially to the first two (charities) – I thank you – your generosity made this possible, and there will be readers who have volunteered for clinical studies – you are my heroes.

Sponsors