Encephalitis may also be diagnosed using an electroencephalogram, or EEG. For this test, electrodes are attached to the scalp. The electrodes record the electrical activity of the brain. Encephalitis may cause abnormal electrical activity.