Transcranial magnetic stimulation (TMS), a treatment involving strong magnetic pulses applied to the scalp, alleviates severe depression by reversing the flow of neural activity in the brain. The treatment, known as Stanford neuromodulation therapy (SNT), modifies brain activity related to depression, with effects seen after 10 sessions over five days.