Based in South Africa, Simon's content explores product development, software design and artificial intelligence.

Diagnosing cancer with machine learning

3 years ago, I gave a talk on how to diagnose cancer with machine learning. I shared this talk locally in South Africa, and twice in the USA. It was a roller coaster ride, and this why I did it...

AI is intimidating

Very soon after entering the workplace and joining the local programming community, I noticed that other developers were quite intimidated with the prospect of writing or using AI code. When I discussed AI with them, I quickly understood that they felt that only I could do it because I had a background in AI from university - I had completed my BSc CS Hons under Andries Engelbrecht at the University of Pretoria 2 years earlier. What they felt though, was only partly true. I was determined to show them that anybody could write AI code if they just understood the natural phenomena that inspired AI models, and knew basic statistics.

To illustrate that AI is in fact approachable, I wanted to find something to develop that sounded incredibly difficult, yet technically was quite simple. I thought about a project I had completed in university, diagnosing breast tissue as malignant or benign, and decided I would rebuild this project from scratch using no AI libraries. I wanted to share that AI is approachable for any developer, it's not exclusive, even if you weren’t using complicated AI libraries and frameworks. I wanted to share my joy when developing AI itself by explaining the beautiful models that modern AI takes inspiration from. This is why I built everything from scratch.

I chose to build this in Ruby because I wanted to appeal to my local community, of which was made up of many Ruby developers, after all, this was our language of choice at Platform45 for bootstrapping our clients business ideas into revenue producing companies. I put together a simple presentation that explained these models and called it “How to diagnose cancer with machine learning”. I submitted this talk to a local Ruby conference, Rubyfuza, and it was accepted and it went down extremely well.

An American developer friend of mine, Lance Gleason, suggested I refine this talk and submit to a few US conferences. Without Lances’ encouragement I would never have thought about doing this - thanks Lance!

Something caught me off guard

I cleaned up this talk and submitted to several more call for papers surrounding Ruby. I couldn't submit to academic AI conferences since I had not broken any new ground in AI, rather, my message was for developers. I was accepted to speak at Ruby Nation in Washington, DC and Madison+ Ruby in Madison, WI. The experience at Ruby Nation was incredible, and I got to meet some of my programming heroes from Code Climate, and explore DC with my brother-in-law John.

My experience in Madison, however, caught me completely off guard. Sometime after my presentation at the conference, a women in a wheelchair pulled me aside and asked if we could chat. Like others did, I thought she was excited about what I was doing and was going to ask me technical questions about my implementation of the demo I had shown in my presentation. Instead, she asked me straight up, “You’re helping people with cancer, is there a way you could help me with my Lupus?”. I was stunned and had to slow down a little. I explained that I couldn’t help her and that all I had done was develop software that when given very specific measurements of a digital image of breast tissue, could diagnose that tissue as malignant or benign, and that it wasn’t being used by anybody to help anybody else.

At this point I felt a variety of emotions, the majority of which is probably anger and frustration. I thought to myself “why aren’t we using this technology to help people”. I built this from scratch in less than a week, if I had used a library I could’ve done it in a day. Furthermore, what I had done was simple AI, and by no means state of the art. I kept wondering, how much more could the latest techniques in AI make an impact in the field of medicine.

I checked my twitter feed after my presentation, and someone asked me to follow them to discuss my presentation privately. He shared that a close friend of his had recently died of cancer, and that he opened the live stream of the conference and was listening as he was doing an assignment. He explained he couldn't concentrate on his work and eventually was focused in on what I was describing was possible for developers in the field of AI. We DM’d each other for a time, as he wanted to contribute to what I was doing, but nothing really came of it.

I remembered that I had experienced a similar moment to my time in Madison when I completed the assignment at university. I wrote an article for my blog at the time named “a developer’s responsibility” thinking, so naively, that if a developer was able to affect such change that they had the responsibility to use their skills to do so. I knew I felt a conviction to use AI in health and medicine, but I didn’t yet know that I loved building useful software.

What's next

I've dreamed of a system where AI developers can meet up with experts in various domains to discuss their most desperate needs and potentially have them met with an AI solution. This thought of mine is unformed, but I know with certainty that this is a question of mine that I must answer. If I find myself helping anyone with AI I think I would be fulfilled, but I must scratch this itch of using AI in health care.

Questions? I'd be humbled, and happy to help.

The Dino Deep Work Policy