The ketogenic diet, believed to work by initiating biochemical changes that eliminate seizure-triggering short circuits in the brain's signaling system, is given to many children whose seizures do not respond to medications.