Comments on the California Department of Public Health’s proposed regulations on medical cannabis

Note: The opinions I express here should not be construed as medical or legal advice. Marijuana is classified by the federal government as a Schedule I drug. Protect your freedom and your health by consulting a lawyer and your doctor for legal and medical advice.

In response to the California Department of Public Health’s invitation to comment on proposed regulations on medical cannabis:

I welcome the State of California’s proposed regulations for the manufacturing of medical cannabis, which I believe will help protect the safety of individual consumers and communities. I offer here my opinions on these proposals.

Despite its federal status as a Schedule I drug, cannabis is used medicinally by millions of Americans. Although only a small handful of compounds produced by plants in the Cannabis genus have been characterized, this number continues to grow as evolving legislation opens doors to medical and scientific research. Many of these compounds are known to possess therapeutic potential, individually or in synergy with other compounds. In the absence of a comprehensive body of scientific literature on C. sativa and C. indica, patients and recommending providers have few tools to help them tailor cannabis-based therapeutics, largely relying on empiric observations and trial-and-error. Each strain has a unique portfolio of psychoactive and non-psychoactive compounds which affect individuals uniquely.

Safeguarding health consumers’ safety should be the primary goal of these proposed regulations. Protecting communities and preserving the environment are also of paramount importance. The proposed regulations offer many theoretical benefits. My critique stems from a concern that these regulations, whether intentionally or unintentionally, place the interests of larger growers over smaller growers. I fear the rise of the cannabis industry’s equivalent of “Big Tobacco.” The proposed regulations disproportionately burden smaller growers with financial and bureaucratic hurdles which I worry will render so-called “Cottage” operations non-viable. The proposed regulations would impose a higher fee-to-revenue ratio for “Cultivation Licenses” for Tier 1 operations, defined as those yielding less than $100,000 in annual revenues, compared to higher tier operations.

For instance, Section 8305 and Section 8313 (“Cannabis waste management”) do not discriminate between small and very small growers, and large operations which pose much greater threats to the environment and water supply.

Favoring larger growers over smaller growers poses a threat to medical cannabis’ genetic diversity by incentivizing growers to produce the most profitable strains, rather than supplying the market with a variety of strains to meet the diverse needs of patients. This is the case with conventional as well as organic produce.

I urge the State of California to consider creating a separate category for “micro-entities,” which I define here for the sake of argument as growers possessing no more than 6 plants. Regulations should also discriminate between micro-entities who manufacture medical cannabis for their personal consumption, and micro-entities who sell what they produce. The current definition of “commercial cannabis activity” as activities that include “cultivation, possession, manufacture, processing, storing, laboratory testing, labeling, transporting, distribution, or sale of medical cannabis or a medical cannabis product” is problematic because it does not make the aforementioned distinction. The rationale for imposing regulations on large growers to protect consumers, communities, and the environment does not apply equally to large and small growers. Micro-entities should be subject to regulations that do not disproportionately burden them and should be exempt from much of the administratively burdensome language of these proposals. Because micro-entities do not share the same financial incentives as large growers, I hope that making it easier for micro-entities to manufacture medical cannabis would promote the genetic diversity of medical cannabis.

I would also like to briefly comment on the language of a few other statements which caught my attention. Section 8401 describes a “Track-and-Trace” system that would allow the State of California to account for the production and dissemination of medical cannabis products. We should apply our experience with other industries to prevent State and private monopolies from hindering innovation. I use the example of Electronic Health Records because of my familiarity with the healthcare industry: stringent regulation on electronic medical record vendors has promoted the formation of monopolies to the detriment of innovators who would have otherwise worked to develop more functional and less expensive software. It is crucial that a State-sponsored Track-and-Trace system feature an open API which would facilitate the growth of an ecosystem of tools to help growers and manufacturers comply with these regulations.

I also advocate against a separate “Nursery License”, particularly for smaller growers, because it would impose further licensing hurdles for these growers.

Article 1, Section 8000, Subsection (f) states: “Commingling is prohibited in Section 8207 of these proposed regulations to retain the integrity and clear accountability of the product.” I strongly agree with this statement for the aforementioned reasons.

Subsection (t) defines “outdoor cultivation” as “a method of cultivation techniques that does not use light deprivation techniques. Outdoor growers who rely entirely on natural sunlight can utilize light deprivation to harvest up to 4 times annually. I find the definition of outdoor cultivation inaccurate and misleading. Outdoor cultivation could instead be defined by whether or not electrical energy is the primary light source for marijuana plants.

My final comments pertain to county regulations rather than state regulations, but I would like to express them here since state regulations supersede county regulations. Mendocino County imposes regulations on marijuana farms which also apply to vineyards, such as having restrooms in greenhouses, limits to the maximum incline grade leading to a greenhouse, and the construction of greenhouses. Again, safety of patients, cannabis industry workers, communities, and the environment is paramount. At the same time, It’s worth bearing in mind that the nature of a medical marijuana farm is much different than a vineyard. To consumers of medical cannabis, marijuana is medication. A vineyard is a recreational area and its product has no therapeutic indication accepted by the medical community. I again urge the writers of these regulations and California voters to consider a more nuanced definition of “commercial cannabis activity” than the current one.

Thank you for the opportunity to comment on these proposed medical cannabis manufacturing regulations.

Respectfully,

Omar Metwally, MD

 

Healthcare on the Ethereum Blockchain

Since Ethereum’s conception, I’ve dreamed of a blockchain-based healthcare services economy and presented the idea at BitTorrent’s headquarters 3 years ago. It’s also taken me that long to conceive of a concrete study of this protocol’s readiness for the limelight. With Ethereum’s adoption by a number of blue chip companies, including JP Morgan and Microsoft, its inevitability is clear. While still unreachably abstract to many people, I believe that healthcare’s state of disarray is a perfect environment to test the waters. As I get ready to start a Clinical Informatics fellowship at UCSF Medical Center, I’m prototyping such a blockchain-based health services marketplace and would like to humbly present the proposal to the Ethereum community for its feedback.

Pricing for healthcare services is currently based on prices determined by insurance companies’ ability to negotiate price points with groups of healthcare providers, individual providers, and healthcare systems. The lack of a true free market, and insurance companies’ administrative overhead, contribute to inflated prices for healthcare services across the board. [Figure 1: Health services marketplace in the blockchain era]

Slide1

Figure 1: Health services marketplace in the blockchain era. Red text indicates how things work presently. Green indicates how things might work in a health services economy founded on the Ethereum blockchain. Notice the absence of insurance companies in the latter, hypothetical scenario. Their role has yet to be determined. I use laboratory testing as an example, but this would apply to imaging studies, office visits, surgical procedures, and consultations.

 

Enter Ethereum, a next-generation blockchain protocol for automatically executing “smart contracts.” Autonomously executed contracts obviate the need for escrow, attorneys, and administrators. Like Bitcoin’s protocol, Ethereum is a distributed blockchain that is open source, not owned by anyone, and runs off any and all computers running the client software. Ethereum’s novelty – and power – lies in the fact that it’s a Turing-complete system. Ethereum, unlike Bitcoin has mechanisms for executing logic, so smart contracts can be written by anyone, hosted on the Ethereum blockchain, and anyone in the world can interact with these contracts with the endpoint of manipulating data and moving money in the form of Ether (also a cryptocurrency).

So why not harness the Ethereum protocol to create a distributed, open source healthcare marketplace? Without administrative overhead (which accounts for the majority of an insurance company’s expenses, which are then passed on to patients and healthcare systems) and with the freedom for any provider of healthcare services to bid for a service (imaging, lab testing, consultations, procedures…), I hypothesize that the cost of healthcare services will be reduced to approximately 10% of its current artificially inflated price. Further contributing to cost and redundancy of healthcare expenditures is data siloing, the isolation of data on servers without APIs to set them free. Many healthcare providers will agree that it’s often much easier to repeat an expensive study than obtain records of that same procedure performed at an outside hospital (even if the study was just performed hours or days ago, and oftentimes, even if the study was performed at an affiliated hospital!). Ethereum’s distributed blockchain is a global ledger of everyone’s health information. I predict that sound security protocols, which need to be developed with healthcare’s unique needs in mind, will necessitate the use of biometric data to associate data on the blockchain with individuals.

So, how can we test the former hypothesis, that Ethereum can reduce the cost of healthcare services to 10% of their current prices?

I propose simulating such a bidding system to start collecting data on the free market prices Ethereum will foster by surveying physicians based in the community, as well as groups contracting with academic medical centers. If I survey Dr. Roentgen, Dr. Tomo, and Dr. Houndsfield (and a few hundred other radiologists) asking them if they would accept $X cash payment for imaging study A, B, or C (e.g. chest x-ray, mammogram, brain MRI…) performed STAT, tomorrow, or next month, we will start to approach theoretical market price for these studies.

If you are a fellow Ethereum developer or are otherwise interested in collaborating in the spirit of establishing healthcare as a human right on the Ethereum blockchain, please send me a line! I’m dreaming up experiments and am seeking partners in code.

Portland smoke

[Daydreaming in Portland]

Omar Metwally, MD

Sunday April 30th, 2017

Portland, Oregon

 

Letter to my Family on Christmas Eve

Dear Father and Mother,

I can imagine how cozy it must be now in Michigan, and I wish I could have shared the season with you. I had a beautiful day starting with yoga, then a trip to the farmer’s market, where I had a half-hour conversation with a farmer famous for growing the best pomegranates ever. I bought his last 15 pomegranates; he was retiring and moving to a gorgeous country estate in Montana. He had made his wealth in business then started farming as a hobby, and made a killing doing that too! He was the wisest person I’ve ever met. He said that he has everything because he has his health.

I got sunburned on the way back with my moonroof down. I’m as white as mom.

When I got home, I started chatting with my neighbor for the first time, and he invited me into his place to meet his wife and 2 children — such a beautiful family, a Nepalese couple and their 2 kids. I gave them some pomegranates, and they fed me dinner. It was delicious.

And tonight I’m working the 10pm to 10am shift at the hospital. I couldn’t think of a better way to spend Christmas Eve, taking care of people. It was a day of adventures. I think I live the happiest and most interesting life.

I told them I was vegetarian (something I’ve recently started), and he looked so disappointed. He was like, I know about your religion. I joked that my religion is yoga, and he continued, I know about halal and I don’t eat pork either. It turns out we both make our own yoghurt, too! So I said what the heck, if it came from your hands it must be delicious. It was chicken, tofu and vegetables cooked in a spicy broth with curry. It was heavenly.

I ate every last piece of ricepom

Your Very Affectionate Son,

Omar

Minimally Invasive Software

If I could gaze into my profession’s crystal ball when I was still a pre-med college student 10 years ago, I would have been stunned by contemporary doctors’ dysfunctional relationship with electronic health records (EHRs). I have more than a half-dozen free apps on my phone that empower me to video chat with friends and family continents away, cloud-based apps that let me create and share media-rich documents on any device — yet I’m stuck spending half my workday fighting with EHRs that look and function like mind-numbing spreadsheets. Not what I signed up for!

I grew up shadowing, and later working, in my father’s private medical practice and had the privilege of getting to know his patients and their families on a personal basis. When medical school exams kept me from spending my Saturdays in the office, my dad would come home and say over dinner, “By the way, Ms. Muller asked about you today,” as if she were an aunt asking about her nephew. His patients became in many ways a large, extended family that inspired me to devote my life to a profession I regard as sacrosanct. The work is selfless, the science fascinating, but what I love most are the personal connections I make with people everyday: sitting eye-to-eye and listening to others’ problems, fears, and dreams, and helping them live better lives.

It took me by surprise. While I was busy taking exams, a handful of EHR oligarchs emerged to save us from ourselves and our own handwriting. Hospital by hospital, clinic by clinic, our profession succumbed to “Spreadsheet Syndrome.”

Before entering Mr. Jones’ exam room, Dr. Patel glances at her EHR to see her patient in numbers: tabulated lab values, an archive of old notes, imaging reports, and test results. Laptop in hand, she enters Mr. Jones’ room, offers her hand and a tired smile, and immediately starts typing her note, checking and ordering tests, and entering prescriptions and referrals — while Mr Jones fades behind the wall of numbers on her screen.

I first heard of Amazon’s Echo while developing a voice-activated web app, in the context of an academic research project, which passively “listens” to a patient-physician encounter and delivers relevant reference information. My research mentor and I both thought that it might be interesting to port the app to Echo, and I invested $150 and a few weeks of time to build my first two Alexa “skills” (apps for Amazon Echo): a health tracker and a yoga coach (which has been used by more than 3,000 yoga fans at the time of this writing).

How software is designed profoundly influences how we think. I watch both amused and saddened as medical students and interns’ eyes glaze over endless rows of numbers only to find themselves drifting further and further away from their patients rather than actually knowing their patients. Instead of stopping by a patient’s room to ask him or her why they hospitalized last month when visiting their family in the Midwest, we find it easier to just review the EHR from the comfort of our desk. In the process of drowning healthcare professionals in minutia, EHRs obscure our ability to see the forest for the trees.

I believe strongly that the patient-physician conversation is the cornerstone of medicine. The best technology we can implement in the healthcare setting should be invisible – or as inconspicuous as possible.

One of my early endeavors along these lines was a Google Glass app (Vidrio) that passively “listened” and “watched” during patient-physician encounters to generated structured documentation from unstructured audio/video data. We won the 2014 MIT healthcare hackathon with this app, which was intended to liberate healthcare providers from the need to type their notes while interviewing patients. While my colleagues loved the concept (and countless doctors have asked me to pilot the app in their own practices), it seems to solve one problem while creating another. I’ll be the first to admit that I wouldn’t feel comfortable having a candid conversation with my own doctor if they wore a pair of Google Glass during the visit.

Rather than letting a device stand between patients and their doctors (literally and metaphorically), the Amazon Echo can quietly sit in the corner of an exam room, answer questions when called upon (“Alexa, give me a trend of Mr. Jones’ kidney function over the past year”…”Alexa, did Mr. Jones get his flu vaccine this year?”), then quietly fade out of the conversation. How’s that for minimally invasive software?

I’m working to save my profession from Spreadsheet Syndrome by helping doctors use Amazon Echo to interface with their EHRs. It’s about time we start using technology to help us spend more time doing the most important and satisfying part of our work: listening to our patients.

Omar Metwally, MD
www.logisome.com/

Into the Ether: Walkthrough, Gotchas, and Tips for Ethereum Development

I’ve written countless lines of code in my life, but I’ve recently deployed code that will live forever. It resides on the Ethereum blockchain and can be executed decades from now, outliving any domain name I’ve ever purchased and outliving every internet company that has ever existed. Long after I pass away, when there’s no one to update the code base, no one to pay App Store fees, no one to renew domain names or pay server fees, this code will keep on running. This code runs not on a monolith tech company’s servers, but will run on millions — billions — of people’s computers, making it perpetual and unstoppable.

This is the promise of Ethereum, an emerging platform for decentralized, blockchain-based applications. The promise of a democratic, transparent, and decentralized Internet version 2.0 has fueled the skyrocketing price of Ether — the cryptocurrency powering the platform — from 4 Ether per Bitcoin (at the time of launch, about 1 Bitcoin was about $500) to $15 per Ether, an astronomical increase during the past 2 years. Ethereum can no longer be dismissed as a tech cult. While the world sleeps, household names such as Microsoft (which has incorporated Ethereum’s new Solidity programming language into Visual Studio) and JP Morgan Chase, recognizing how revolutionary the concept of Ethereum is, are investing in the vision. Ethereum has made headlines in the New York Times, and children of Ethereum such as The DAO (Decentralized Autonomous Organization) have also been featured in widely-read publications such as the Economist.

In this article, I offer practical pro-tips and gotchas for writing and submitting contracts on the Ethereum blockchain, along with a vision for Ethereum’s future. The process of running the Ethereum client will vary depending on which version of the client you use and your operating system. I’m a die-hard Linux user and prefer the Ethereum Go client over others; if you’re running Mac OS X or Windows (or another client), your experience will be slightly different.

You’ll note that both the Ethereum Wallet (Mist) and the Mix IDE are featured on the Ethereum homepage as graphical interfaces that allow users to create, debug, and deploy contracts. I eagerly await a mature version of the Mix IDE, as the current version is still in concept stage. I’ve always preferred command line to GUIs for the control and transparency they offer, and so, after experimenting with different clients, I ended up choosing the Go client.
The Ethereum website now has several handy code samples for things like creating a new currency, an autonomous organization with its own voting mechanisms, or launching a crowdsale — tasks conceivable only through the novelty of Ethereum’s decentralized structure. Running the simple “hello world” Greeter contract can be challenging for newbies. Here are a few tips that will hopefully get you up and running more quickly:

  1. After installing the geth client, follow these instructions to create a new account and remember the password! Remember it like your own name but guard it like your biggest secret.
  2. Now you’ll have to download the blockchain to your node. This process can take several hours and will begin once you run the geth command. The terminal will print out which block is being downloaded, and you can track your progress by comparing that block with the latest block on the chain.
  3. Once your node is updated, open another terminal window and enter geth attach. This opens the geth console while creating a single concurrent session between the two windows.
  4. Within the console, try eth.accounts to see your account addresses. You might want to copy these somewhere convenient but safe for your own reference. eth.getBalance(eth.accounts[0]) will print out the balance in wei (1^18 wei = 1 Ether). If your balance is zero, you will have to add Ether to your account before you can deploy contracts to the blockchain. Pro users can upload their presale wallets, or if you’re coming later to the game (or want to be cautious) you can buy Ether on an exchange such as Kraken and transfer Ether to your account address. This reddit post describes the process well. Note that after successfully transferring Ether (the transaction itself shouldn’t take more than a few seconds), your client will need to be fully synced to the network before eth.getBalance(eth.accounts[0]) command will show your updated balance. You can verify that your transaction was successful on this website by entering your address, while you’re waiting for your client to sync.
  5. Nice work if you’ve made it this far (it may take a few days, depending on your experience and if you already have Ether or a trading account). Now you can start deploying your contract to the blockchain so it can bask in immortality. Close all terminal windows, open a new one, and enter: geth –unlock=0 –password=”/path/to/your/password” where “/path/to/your/password” is a file containing nothing but your account password from step #1.
  6. Open another terminal window and enter geth attach. This will open the geth console. Then follow the steps in the Greeter tutorial to launch your first Hello, World! contract. Common reasons for not succeeding at first are not unlocking your account (or using the wrong account), not having enough Ether in your account, and not completely syncing the blockchain on your node. More precisely, you must have downloaded at least the block that contains the transaction in which you transferred Ether into your account (if this sentence doesn’t make sense, don’t worry — just sync your node and be patient while this happens) so your local Ethereum client can “see” the transaction.

After working through these steps and browsing StackExchange and Ethereum forums while you get up and running, the fun part really starts. So you’ve become a believer in Ethereum. You’ve even bought some Ether and deployed your first contract. The big question now is, what makes Ethereum a revolutionary act rather than just another blockchain startup based on yet another programming language called Solidity.

 

If you’ve ever read (and comprehended) Hofstadter’s Gödel, Escher, Bach: An Eternal Golden Braid, you’ll appreciate that meaning is intrinsically tied to form. Ethereum’s significance lies in the fact that Solidity is a Turing-complete language running on the blockchain. That is, it is entirely decentralized and contracts are fully transparent. I’ve jumped on innumerable hot new technologies and platforms in the 18 years I’ve been coding, some of which take off, many of which fizzle away in a cloud of hype. I believe that Ethereum may be one of the most substantial events I will witness in my life due to its form (i.e., a Turing-complete language running on a blockchain).
Surprisingly, several dozen Ethereum-powered dapps (as they’re called) are already live. Ethereum developers are still trying to wrap their heads around the essence — the form — of a dapp, which are largely in concept or early beta stages. The fact that Ethereum is not yet mainstream means that the pool of potential dapp users consists of a small number of tech savvy individuals, in contrast to the huge pool of iOS and Android users who can effortlessly download apps via the App Stores.

 

What many people, who don’t understand the technical underpinnings of the Ethereum Virtual Machine (EVM), don’t realize, is the following:

“Roughly, a good heuristic to use is that you will not be able to do anything on the EVM that you cannot do on a smartphone from 1999. Acceptable uses of the EVM include running business logic (“if this then that”) and verifying signatures and other cryptographic objects; at the upper limit of this are applications that verify parts of other blockchains (eg. a decentralized ether-to-bitcoin exchange); unacceptable uses include using the EVM as a file storage, email or text messaging system, anything to do with graphical interfaces, and applications best suited for cloud computing like genetic algorithms, graph analysis or machine learning.” (Ethereum Wiki)

Keep this in mind as you dream up your dapps, contracts, and DAOs. This isn’t just another app platform; this is Ethereum. To give birth to revolutionary ideas on the Ethereum blockchain, you need to respect its form.
 

I’m thrilled to be part of a small but growing community of dreamers writing code on the blockchain. What are you working on? Send me a line and let’s connect.
Omar Metwally, MD (@osmode)
omar.metwally@gmail.com

Find me on LinkedIn
Read this on Quora
My consulting website

Doctor will work for Ether: Decentralized autonomous health insurance

Once Upon a Time a young man named Vitalik Buterin presented the concept of “Ethereum” to the cryptocurrency community. Vitalik became a Thiel Fellow and persuaded the world that there’s a better way to write laws, organize ourselves politically, and conduct transactions using a Turing-complete language built on the blockchain.

I would have never imagined, when I began developing on the Ethereum platform, that the concept of a decentralized autonomous organization (DAO) would make popular media headlines so soon. This is the start of something remarkable.

When I presented my vision for decentralized autonomous health insurance in June 2014 at the BitTorrent headquarters, Chris Peel, the founder of the Ethereum Bay Area Meetup, asked me how I would realize my vision. “Well…” I began, “operating health insurance is a big undertaking!” I said, scratching my head. Two years later, the time for a better way to insure our health and pay for health services is here. By cutting out the middle people, Ethereum-powered smart contracts and DAOs promise to dramatically reduce the cost of health services. Why should most of our outrageously over-priced health insurance premiums feed bloated corporations and their executives?

Ancient Chinese physicians practiced preventive medicine par excellence. In ancient China, physicians were compensated when their patients enjoyed good health, not when they grew ill – the opposite of our reactive, fee for service-based health system. Ethereum is our opportunity to end the healthcare crisis, and it’s incumbent on us to carry forth this effort.

DOCTOR WILL WORK FOR ETHER.
NOW ACCEPTING NEW PATIENTS.

Send me a line at omar.metwally@gmail.com

Omar Metwally MD
@osmode

Carly, a voice-activated health coach for Amazon Echo

carly_cropped

Since my team won MIT’s Hacking Medicine hackathon 2 years ago with an app that generates structured documentation from an unstructured patient-doctor interaction (by passively listening and watching the interaction), I’ve taken on the challenge of natural user interfaces. Recently, APIs such as Google’s WebSpeechAPI, which I’ve used in the setting of academic research, proved their ability to convert speech to text with enough fidelity to be useful in real-life applications. With devices like Amazon Echo and wide-range microphones capable of discerning speech through ambient noise, we’ve bypassed the second major hurdle in natural user interfaces.

Now it’s time to start bidding farewell to keyboards, mouses, and ugly software that looks like an Excel spreadsheet. Instead of scrolling through a mind-numbing list of vital signs and lab values in an electronic health record, a provider should simply be able to say: How high did John Doe’s blood pressure get in the past 4 hours? or Trend Jane Doe’s creatinine level over the past week. This is what I mean by natural language interface: software that allows humans to interact with it in the same way humans think, which is through natural speech.

If you have an Amazon Echo, check out my new Alexa Skill, Carly, a voice-activated health coach for Amazon Echo. The next stop will be introducing doctors to Carly and the joy of natural user interface.

Conceptualizing health and illness through word embeddings

20 minutes into her conversation with a patient with a diagnosis of irritable bowel syndrome (IBS), Dr. Zurcher realizes that she and her patient aren’t at all on the same page. With her own concept of “IBS” in mind, she tries her best to convey the fact that IBS is a syndrome characterized by constipation and/or diarrhea . Her patient, on the other hand, is less interested in discussing his constipation or medication for IBS than he is in bringing to his doctor’s attention his crippling social anxiety, which disrupts his life much worse than any of his gastrointestinal complaints. Dr. Zurcher’s grasp of IBS as a diagnosis established according to the Rome III criteria, while medically sound, has little to do with her patient’s conceptualization of his diseases, and unless she appreciates this, the encounter is unlikely to be productive.

As much as medical schools and residencies train physicians to listen carefully to their patients, physicians invariably approach the patient encounter with an agenda (to document a patient encounter, generate ICD-10 codes, and establish a problem list and plan) that doesn’t always coincide with a patient’s agenda.

To better understand how my patients conceptualize health and illness, I trained gensim’s word2vec implementation on 2 million disease-specific tweets. The beauty of this method is its capacity to uncover both obvious and less obvious semantic relationships among words. I challenge healthcare professionals to contrast their understanding of disease with their patients’ conceptualizations of  illness.

Try searching for “heart failure”, “obesity”, “alcohol”, or “IBS”, for example. Each query returns the 10 semantically and/or lexically nearest neighbors in 100-dimensional space, along with their cosine similarity to the query term. The closer to 1.0, the closer they are in hyperspace.

Screenshot from 2016-03-04 23:56:44

Machine Understanding

I’m at the opera house watching The Nutcracker. Toward the end of Act II, Scene 1, one of the lead ballerinas stumbles, nearly falling over. The audience falls silent, but before anyone can grasp what’s happening, she leaps into her role again. Thunderous applause follows the curtain’s fall, despite the less than perfect rendition. In the next scene, a robot replaces Ms. Akhmatova, and robo-ballerina executes an immaculate interpretation of the “Dance of the Sugarplum Fairy.”

As I wait in the long line to the men’s restroom in this fictional opera house, I ask myself which of the ballerinas, Ms. Akhmatova or robo-ballerina, has a better grasp of the ballet. If the essence of a ballet lies in its execution, does the robot, with its flawless performance, “understand” the ballet more completely than Ms. Akhmatova, whose occasional missteps fail to escape the seasoned observer?

With “Recursive Neural Networks Can Learn Logical Semantics”, Samuel Bowman, Christopher Potts, and Christopher Manning successfully trained recursive neural networks (RNNs) to apply logical inference to natural language. Like many other pivotal scientific works, the significance of this phenomenal work won’t become fully appreciated or manifest except in retrospect. Machine learning (ML) researchers have been applying neural networks (NNs) to a variety of problems, from image recognition to signal processing, but as a student of natural language processing, this work renewed my faith in neural networks’ capacity to live up to the term “deep learning” and uncover profundity in data.

There is a tendency among non-technical admirers of ML to regard these methods as beyond their creators: independent entities that will one day, given refined enough algorithms and enough energy, out-comprehend their human creators and overwhelm humanity with their artificial consciousnesses. The term “neural networks” is itself a misnomer that doesn’t at all reflect the elaborate complexity of how human neurons represent and acquire information; it’s simply a term for nonlinear classification algorithms that began catching on once the computing power to run them emerged.

The question of whether or not Samuel Bowman’s NN, or the robo-ballerina in the opening scenario, are capable of “understanding” is largely a theoretical concern for the ML practitioner, who spends the bulk of his or her time undertaking the hard work of curating manually labeled data, fine-tuning his or her neural classifier with methods (or hacks) such as dropout, stochastic gradient descent, convolution and recursion, to increase its accuracy by a few fractions of a percentage point. Ten or twenty years from now, I imagine we’ll be dealing with a novel set of ML tools that will evolve with the rise of quantum computing (the term “machine learning” will probably be ancient history, too), but the essence of these methods will probably remain: to train a mathematical model to perform task X while generalizing its performance to the real world.

I don’t mean to detract from the brilliance of Sam Bowman’s work. I don’t remember the last time a scientific paper excited me so much (in contrast to the medical literature, with its mantra of randomized control trials and cohort studies), and I can’t help but let my imagination wander at the thought that a RNN can actually learn logical inference. As exciting as I find Bowman et al’s paper, it also led me to grapple with the hairy question: What is understanding, and what is mimicry? Trying to answer this question (without using the word “consciousness”) led to a great deal of mental turmoil that culminated in the writing of this essay.

Professor Timothy Winters, a philosopher from Oxford University, praised man’s ability to name as his/her greatest gift. Implicit in this statement, I think, is man’s ability to conceptualize. When I call the energy illuminating my desk lamp “electricity,” I’m not just associating a phonetic time series with my halogen bulb’s white glow, I’m also instantiating an abstract class of natural phenomena and associating with it a body of hypotheses (for instance, Ohm’s Law and Kirchoff’s circuit laws). Had I called this “light” instead of “electricity”, I would have been operating under a different set of hypotheses using different mental schemata.

So what is understanding? To understand is to admit that one doesn’t comprehend anything at all. To understand is to use our uniquely human ability to create mental schemata of the world, models for how things and people interrelate and to systematically test and revise these hypotheses. These models might be inspired by a combination of personal experience, bodies of scientific thought, religion or spirituality, but they represent models nevertheless that are subject to change, and we ought accept them as such else we one day discover our worlds as brittle as the models themselves.

My understanding of people as inherently good, or my understanding of myself as a member of society with a moral duty to serve others, or my belief in human reason, are models subject to change based on my own experiences and the experiences of those who influence me. The word “understand” is itself utopic, an attempt at an ultimately impossible feat.

5 years in pursuit of meaning

There is a zen to hard work that leaves one too weary to think deeply about anything. I’ve spent the past week working 14-16 hour days, caring for patients and not writing code. It was a typical week on the medical wards. These are days of fasting, days that leave me spiritually satisfied but intellectually starved.

But today I’m rested and at peace with my thoughts for the first time in a long time. A question that has been whirling about in my mind’s undercurrents for years now resurfaces, as it does on days like these, bobbing up and down, restlessly spinning on its way downstream. Cool mist sweeps over San Francisco; my French press stands at the edge of my desk, the smoky taste of dark coffee lingers on my tongue.

I sift through the bold, curly lines my Uniball pen leaves on my Moleskine’s thick pages in pursuit of meaning. This act is mechanically easier when I write on paper than when I type on my PC, but the search is just as fruitless. I comb through words and brush them off the notebook’s lined pages until I’m staring at a blank page, and I start to make out an image of a cold, overcast day in October 2012. I’m reading Wittgenstein’s Tractatus logico-philosophicus in the original German on the balcony of my Berlin apartment. A woman next to me sips her coffee and lights a cigarette. All around us Berlin is perpetually becoming but never being [1]. I blink, and a new skyscraper appears. The young woman puts out her cigarette, and passengers exit a new train station that wasn’t there moments ago.

Wittgenstein’s words overtook me like a hallucinogen, profoundly changing the way I would think and perceive the world thereafter. The zen-like opening lines “Die Welt ist alles, was der Fall ist” (“the world is everything, that happens to be the case”) lead into crisp deductive reasoning that uses logic to piece together a Weltbild as sound and beautiful as a diamond. The truth is in logic, I thought, that unadulterated fabric holding the world together — free, unbiased, untainted by language, loyal to no school of thought and no civilization of the Occident or Orient. And so I felt, for the subsequent years, that I had stumbled upon something extraordinary. Pull the fabric here, and this happens. Pull it there, and that will happen.

My faith in logic and love for words led me to the discipline of “natural language processing”, a term I grow to dislike the more experienced I become in the field. Nearly every day for the past year, I spend a few hours dipping my bucket in the endless ether, collecting data and running calculations. The results themselves are scientifically interesting, but the more data I have, the more removed I feel from that original goal of understanding semantics, to hold the word “coffee”, squeeze it between my fingers, and watch the dark drops of meaning stain my pages, drops whose coarse texture I can feel between my fingers, drops whose bitterness I can taste on my tongue, smear across the page, and say: “Here it is! Here is the meaning of the word!”

Five years into my pursuit of meaning and I catch myself in a free-fall, grasping for “it” but reaching only that logical fabric connecting words with one another. I can hardly even make out the individual words. Dangling from the fabric holding together “cool” and “mist”, my fingers cramp, my muscles ache…I can’t hold on any longer…

…I fall…

…and catch myself on the fabric connecting “sweeps” and the prepositional phrase “over San Francisco.” My fingers slip, and I fall again…This continues, again and again and again, until I begin to wonder, in my exhausted delirium, whether words themselves are entirely devoid of meaning. Does meaning lie in associations between words rather than the words themselves? To know “Omar Metwally” the hacker, the physician, Twitter handle “osmode” is not to know Omar Metwally at all. But to know Omar Metwally, the son of Moustafa Metwally, the husband of Marwa El-Hamidi, the father of Ismail, the neighbor of Evgeniy, is to begin to know him — as a node in a web of inter-relationships, and it is these inter-relationships, I believe, which correspond to “meaning” as we understand it.

I’ve read Kafka’s The Metamorphosis at least a dozen times in English and German [2]. When meaninglessness overwhelmed me, I turned to Kafka’s writing for its rich, layered meaning, each sentence woven to the preceding and succeeding ones by time (the few seconds it takes to read each flowing sentence) and space (their arrangement on the page). In pursuit of meaning, I unravel The Metamorphosis, splitting the story into sentences, breaking its spatial and temporal semantic bonds, and reconnect them based on lexical similarity (that is, how many words they share) [3,4]. Kafka must be rolling in his grave now; forgive me for the sake of this thought experiment.

 

Kafka2Kafka1

 

What new meaning, if any, does this text now have? Certainly not the literary grace it once carried; gone is the melancholic apartment Gregor Samsa shared with family until the day he woke to find himself a cockroach. Gone is his angry boss, his family, his miserable job as a traveling salesman — as Gregor the cockroach observed it from the cold walls of his former home. The above looks more like a story written by a search engine. In place of that sad apartment, which Gregor’s family rented out to strangers to support themselves (now that their son-turned-cockroach became unable to help the family pay off its debt), is an ugly, urban mess: apartment buildings filled with people who don’t know each other and don’t want to know each other, buildings connected by fiber optic cables, high-speed rails, and crowded streets.

The result is far from meaningless, but it certainly lacks meaning in the sense that it once carried, as it exists in the crumbling yet very much living pages on my bookshelf.

My attention wanders across the bookshelf, to a 3-ring notebook from my first-year linguistics seminar on discourse, which I had the privilege of attending with Professor Jon Swales, a pioneer of the field (and one of the most cultured Englishmen I have ever met). My semester project was “An interdisciplinary examination of textbook interactivity,” in which I analyzed the grammars of history, calculus, and chemistry textbooks to understand how grammatical structure correlates with a textbook’s perceived interactivity. I smile at the memory of spending Thanksgiving break during my first college semester at the University of Michigan circling second-person pronouns, manually counting words in textbooks. If I were to repeat the project in the year 2016 rather than the year 2003, I would have probably written a Python script to do the task in a few seconds.

But there was something romantic about holing myself up in my apartment, watching that winter’s first snowfall, and circling words, as there was about the “natural language processing” that Professor Swales pioneered. He would cringe if he ever heard me describe his work as NLP, and in fact, his work on discourse is too artistic and not quantitative enough to be called NLP [5]. Yet it’s precisely the fact that he is neither a machine learning practitioner nor a computer scientist that his work is so far reaching in the linguistics community. He is the proverbial Englishman at the polo club who has traveled so much that his ears can recognize any Arabic dialect and poke fun at linguistic nuances that go over most of our heads.

My search for meaning continues somewhere between the statistical methods currently in vogue and Professor Swales’ softer, almost literary approach. Quantifying linguistics helps us identify patterns and test hypotheses, but sacrificing art at computation’s stake, as I hope this essay illustrates, can divulge into meaninglessness if we are not careful.

–Omar Metwally

 

[1] These are Schopenhauer’s words. He described the perpetually becoming but never being world (“die immer werdende aber nie seiende Welt”) in his Die Welt as Wille und Vorstellung.

[2] The English version of The Metamorphosis used for this experiment is from the Gutenberg Project.

[3] The 500 commonest English words (such as this, and, a, the,…) are excluded here.

[4] Email me for my code. I’m happy to share it.

[5] NLP and computational linguistics are different but overlapping fields, and linguistics itself is a very broad discipline. I will not get into that here but simply acknowledge these facts.