Invasive Brain-Computer Interfaces for Attention

The goal of this interventional study is to compare if the use of a brain-machine interface (BCI) therapy can improve the symptoms of attentional deficit by producing brain changes in the networks that modulate attention. The investigators intend to work with epileptic participants who do not respond to pharmacological treatment, who will undergo neurosurgery. The questions the study sets out to answer are:

1. is there an improvement of symptoms in an experimental group receiving the treatment versus a sham group receiving a simulation of the treatment?
2. does the application of the therapy before surgery reduce the recovery times of post-surgery cognitive deficits described in the literature?

Making use of the information recorded from brain electrodes implanted before a participant's epilepsy surgery, the investigators will create a BCI decoder that works with the available activity sources to establish the level of attention of each participant when performing tasks. Participants:

* will perform an offline phase first, which will consist of one day of evaluation, in which they will be familiarized with an attentional task.
* will perform a training phase later, which will consist of several days of evaluation, where they will learn to modulate their level of attention. This modulation will be facilitated by the BCI decoder, which will classify the level of attention directly from the brain and provide visual feedback that the participant will use as a guide.

If the participant is part of the experimental group (or BCI group), the feedback will work as described and should be easy to follow, but if the participant is part of the Sham group, the feedback will not work according to the brain activity of the actual participant, but according to that of another person. Because of this, a mismatch will be created between the moments a brain experiences inattention, and participants believe they are experiencing inattention.

This is a randomized, double-blind study, in which the experimenters will evaluate how the effect of the attentional therapy with BCI affects an BCI group and a Sham group.

This research differs from others available in that it is among the first of its kind to be performed on participants with invasive electrodes in a hospital setting. Additionally, it focuses on epileptic participants, who already have a set of invasive electrodes in place, so there is no need for any additional surgical intervention.

Also, the age range of participants for the study (between 8 and 21 years old) usually presents a high incidence of attentional disorders, so it is considered a good group to carry out this research.

This research does not require any additional intervention of any kind, except for the participant willingness to participate, with the possibility of improving their baseline attentional level, or at least of recovering their baseline attentional level faster after surgery, which usually decreases it.

Eligibility Criteria:
Inclusion Criteria:

* Children and adolescents (8-21 years)
* Confirmed diagnosis of drug-refractory epilepsy
* iEEG implants on the GK network (ventro-lateral prefrontal cortex and executive network). Also desirable in areas related with attention and Action Phase processing
* Normal to corrected vision
* Ability to understand instructions to follow protocols
* Able to read and understand English or Spanish (all evaluations will be conducted depending on the mother tongue of the participant)
* Able to assent together with his/her legal guardian (below 18 years old) or approve (18 years old or older) informed consent

Exclusion Criteria:

* Prior history of seizure focus removal
* Prior history of ischemic or hemorrhagic stroke
* Prior history of traumatic brain injury
* Prior history of color blindness
* Intracranial implants
* Headaches disorders
* Neurological infections
* Neurological pain or malnutrition disorders
* Severe mental disorders: depression, anxiety, among other psychiatric diseases
* Severe intellectual and learning disabilities
* Compromised consciousness
* Severe physical impairment (i.e. inability to mobilize upper extremities by oneself)
* Severe co-morbidities (active cancer within 5 years, cardiovascular diseases, severe metabolic diseases, hepatic or kidney failure, recent major surgery, infectious diseases)
* Substance or alcohol abuse
* Pregnancy
* Criteria identified in safety guidelines for MRI, in particular metallic implants. Participants who are unable to perform MRI will be completely excluded from the study