The discovery of a new mass involving the brain or spine typically prompts referral to a neurosurgeon to consider biopsy or surgical resection. Intraoperative decision-making depends significantly on the histologic diagnosis, which is often established when a small specimen is sent for immediate interpretation by a neuropathologist. Access to neuropathologists may be limited in resource-poor settings, which has prompted several groups to develop machine learning algorithms for automated interpretation. Most attempts have focused on fixed histopathology specimens, which do not apply in the intraoperative setting. The greatest potential for clinical impact probably lies in the automated diagnosis of intraoperative specimens. Successful future studies may use machine learning to automatically classify whole-slide intraoperative specimens among a wide array of potential diagnoses.