How Brain Tumors Affect Connectome

Did you know that over 700,000 Americans are currently living with brain tumors? And most of these people, without suspecting anything, can continue to live with this tumor until their death, possibly from other reasons. Since 70% of brain tumors are benign, it is not uncommon for a person to live with a brain tumor unknowingly. Even the remaining 30% of malignant cancers may not lead to immediate death. How do these clumps of out-of-control cells affect the structure of the brain? And how does their presence affect you?

A brain tumor is a lump-like collection of cells in the brain
A brain tumor is a lump-like collection of cells in the brain

What is a brain tumor

As you probably know, a tumor is a lump or bump that forms as a result of abnormal cell growth.

Tumors can be benign or malignant. A benign tumor means it is not cancerous. 70% of brain tumors are benign. Malignancy of a tumor means that it is cancerous and capable of growing. 30% of brain tumors are malignant.

There are over 120 different types of brain tumors! The most common tumors are glioblastoma and metastatic tumor (which means it has arisen from cancer in another organ). Glioblastomas are often fatal, but thanks to new treatments such as immunotherapy, glioblastoma sufferers can live longer!

Glioblastoma is not only one of the most common, but also the most deadly brain tumors
Glioblastoma is not only one of the most common, but also the most deadly brain tumors

Although brain tumors differ from each other, there are several symptoms that are common to all brain tumors. These are the symptoms:

  • new manifestation or change in the nature of the headache;

  • headaches that gradually become more frequent and severe;

  • unexplained nausea or vomiting;

  • vision problems: blurring, double vision, or loss of peripheral vision;

  • gradual loss of sensation or difficulty moving your arms or legs;

  • loss of balance;

  • Difficulty speaking

  • Difficulty doing daily activities

  • changes in personality or behavior;

  • seizures, especially in those who have not suffered from seizures in the past;

  • hearing problems.

So, we’ve learned a thing or two about physical symptoms, but how exactly does a brain tumor affect the physical structure of the brain? To find out, you first need to diagnose the tumor.

Creation of a neural network for diagnosing brain tumors

How are brain tumors generally diagnosed? As soon as the patient begins to show symptoms or if the doctor suspects a brain tumor in the patient, they will order a brain scan called an MRI. From the MRI scan, the doctor will understand what is happening in the brain, and will be able to determine if a person has a tumor.

MRI image of a brain tumor
MRI image of a brain tumor

Some tumors are very large, but the percentage of such cases is not that great. Basically, brain tumors (especially if the patient has no obvious symptoms) are rather small formations! This is what creates a problem in diagnosis, since tumors can be difficult to see on an MRI scan and the doctor may simply not notice it. But there is a way out – to use an artificially created thing that is sharper than people … – a computer!

To create a neural network, we first set up our platform – the Jupyter Notebook wrapper. To do this, download a number of required packages:

import tensorflow as tf
import numpy as np
from keras. preprocessing import image
from keras. preprocessing.image import ImageDataGenerator from matplotlib import pyplot as plt
from matplotlib import pyplot as plt

Now that we have our Notebook wrapper around, we can start customizing our tutorial data! First, we scale the data with the following code:

train_datagen = ImageDataGenerator(rescale = l*/255, shear_range = 0,2, zoom_range = 0.2, horizontal_flip = True)

After that we import the training data using flow_from_directory and also make some adjustments to the images to make them easier to use.

training_set = train_datagen.flow_from_directory('Location', target_size = (64,64), batch_size = 32, class_mode="binary")

In the Location field, you need to specify the location of the dataset. So, everything is ready to create a network! To add layers, use the cnn.add function from the keras library. This feature allows you to combine, visualize and analyze data.

cnn = tf.keras. models.Sequential()
cnn.add(tf.keras.layers.Conv2D(filters=32, kernel_size = 3, activation= 'relu ', input_shape = [64, 64, 3]))
cnn.add(tf.keras.layers.MaxPool2D(pool_size = 2, strides = 2))
cnn.add(tf.keras.layers.Conv2D(filters=64, kernel_size=3, activation = 'relu'))
cnn.add(tf.keras.layers.MaxPool2D(pool_size=2, strides=2) ))
cnn.add (tf.keras.layers.Flatten())
cnn.add(tf.keras.layers.Dense (units=128, activation = 'relu'))
cnn.add(tf.keras.layers.Dense(units = 1, activation = 'sigmoid'))

Now let’s add our data to the neural network training process!

cnn.compile(optimizer="adam", loss="binary_crossentropy", metrics = ['accuracy']) = training_set, validationdata = test_set, epochs = 15)

A few more lines of code and our neural network is ready! The last piece of code enters our test data (instead of training data) and outputs the results.

test_image = image.load_img('C:/Users/annah/Desktop/brain_tumor_dataset/training_set/Y2.jpg', target_size = (64, 64)) 
plt.title('Test Brain Image'), plt.xticks([]), plt.yticks([])
test_image = image.img_to_array(test_image)
test_image = np.expand_dims(test_image, axis = 0)
result = cnn.predict(test_image)
if result[0][0] == 1:
	prediction = 'brain tumor present'
	prediction = 'no brain tumor'

We are waiting for the result.

Yes, we did it! Now that we have identified a brain tumor, let’s discuss how it affects our connectome.

Brain and connectome tumors

Before we start talking about the effect of a brain tumor on a connectome, let’s understand what a connectome is. A connectome is a network of neural connections in the brain. This is what helps a person to remember, learn and even act!

Brain Connectome View
Brain Connectome View

Every time a person learns something, his brain undergoes physical changes – it becomes more wrinkled! Changes take place not only outside, but inside the brain, as a new connection is created. But when something foreign (for example, a tumor) appears in the brain, this “something” can disrupt connections and make it difficult to perform certain actions. How does this happen?

To understand, what is the violation of the connectome, it is necessary to compare it with the connectome of a healthy person. Consider the brain of a healthy subject and compare it to the brain of a sick subject with a benign tumor in the midbrain.

The first thing that catches your eye is the connections between the hippocampus and other parts of the brain. The hippocampus is known to be responsible for memory and learning.

In healthy subjects, there were positive correlations (in other words, positive interaction or increased interaction) from the hippocampus to the ipsilateral (located on the same side) hemisphere, which is responsible for coordinated limb movement.

But when the same interaction was analyzed in a sick subject, no correlation was found from the hippocampus to the ipsilateral hemisphere. In other words, there were no connections between these areas, and this inevitably had to lead to problems with memorizing the sequences of certain actions, for example, actions to pick up objects.

In this case, the brain tumor interrupted the connective connections between the hippocampus and the ipsilateral hemisphere. The larger the swelling, the more likely the patient will notice disturbances in daily life. He may, for example, forget how to walk correctly or how to pick up objects.

Compared to a healthy test subject, a tumor leaves extremely limited connections to the brain and breaks off important connections in certain areas, such as the connection between the hippocampus and the ipsilateral hemisphere.
Compared to a healthy test subject, a tumor leaves extremely limited connections to the brain and breaks off important connections in certain areas, such as the connection between the hippocampus and the ipsilateral hemisphere.

Now let’s look at resting network disruption (brain activity at rest) and its effect on the intrahemispheric (or inner) region of the brain.

In this study, healthy brains showed positive correlations between quadrants within the hemisphere. This part of the brain is responsible for communication and auditory processes. At rest, in a healthy brain, an increase in the number of connections that determine the quality of auditory processes was observed.

But, on the other hand, in the brain affected by the tumor, negative correlations between the quadrants were observed. Unlike the previous experiment, in which the brain tumor completely eliminated the connections, in this experiment the brain tumor simply slightly changed the nature of the interactions. Negative correlations meant that, instead of strengthening the auditory processes, the subject’s auditory function was partially reduced.

In particular, in this example, we see how a brain tumor displaces connections or changes their result, but does not eliminate such connections. For the patient, this is a more favorable option, since he will be able, perhaps not ideally, but still to perform the desired actions.

In a healthy brain, there were connections that were completely altered in a brain affected by a tumor.
In a healthy brain, there were connections that were completely altered in a brain affected by a tumor.


What have we learned from this post? First, we learned how to detect brain tumors using a neural network. With Jupyter Notebook, we can set up a neural network, train it on MRI data, and then get a result based on test data. This approach allows for more efficient and accurate detection of brain tumors, and the patient can receive treatment at an earlier stage.

After identifying patients with brain tumors from our dataset, we used this dataset to study the effect of brain tumors on the connectome. We learned that sometimes a brain tumor completely removes connections, such as the connections between the hippocampus and the hemisphere. In other cases, the tumor simply displaces the connection or changes function, such as in an area within the hemisphere.

In any case, a brain tumor affects the connectome. A small swelling can lead to small changes, for example, the patient may forget how to lift objects; a large tumor can lead to more serious consequences, for example, the patient can lose the ability to walk.

By understanding the impact of a brain tumor on a connectome, we can better develop treatments and reduce negative consequences. With this data, we will be able to personalize the treatment of each patient and minimize the impact of the tumor.

Neural networks are widely used in medicine – they help doctors save time and effort by using various visualizations to direct their attention to areas of diagnostic images where problems are likely. At the same time, artificial neural networks as a whole are developing, improving, and their field of application is becoming wider. If you are interested in using deep learning and machine learning in problem solving, you can pay attention to the course “Machine Learning and Deep Learning”, where students not only gain theoretical knowledge, but also consider the practical side of the application of neural networks and ML models.

find outhow to level up in other specialties or master them from scratch:

Other professions and courses

Similar Posts

Leave a Reply