Neurofeedback that tracks attentional focus in real time using fMRI and alerts subjects to impending lapses by modulating the difficulty of the task itself has been demonstrated to improve behavioral performance.