Summarizing articles on PMDD treatments using TextRank

In this blog post, I want to share with you what I learned about treating PMDD using articles summarization through TextRank. TextRank is not really a summarization algorithm, it is used for extracting top sentences, but I decided to use it anyways and see the results. I started by using the googlesearch library in python to search for “PMDD treatments – calcium, hormones, SSRIs, scientific evidence”. The search resulted in a list of URLs to various articles on PMDD treatments. However, not all of them were useful for my purposes, as some were blocked due to access restrictions. I used BeautifulSoup to extract the text from the remaining articles.

In order to exclude irrelevant paragraphs, I used the library called Justext. This library is designed for removing boilerplate content and other non-relevant text from HTML pages. Justext uses a heuristics to determine which parts of the page are boilerplate and which are not, and then filters out the former. Justext tries to identify these sections by analyzing the length of the text, the density of links, and the presence of certain HTML tags.

Some examples of the kinds of content that Justext can remove include navigation menus, copyright statements, disclaimers, and other non-content-related text. It does not work perfectly, as I still ended up with sentences such as the following in the resulting articles: “This content is owned by the AAFP. A person viewing it online may make one printout of the material and may use that printout only for his or her personal, non-commercial reference.”

Next, I used existing code that implements the TextRank algorithm that I found online. I slightly improved it so that instead of bag of words method the algorithm would use sentence embeddings. Let’s go step by step through the algorithm. I defined a class called TextRank4Sentences. Here is a description of each line in the __init__ method of this class:

self.damping = 0.85: This sets the damping coefficient used in the TextRank algorithm to 0.85. In this case, it determines the probability of the algorithm to transition from one sentence to another.

self.min_diff = 1e-5: This sets the convergence threshold. The algorithm will stop iterating when the difference between the PageRank scores of two consecutive iterations is less than this value.

self.steps = 100: This sets the number of iterations to run the algorithm before stopping.

self.text_str = None: This initializes a variable to store the input text.

self.sentences = None: This initializes a variable to store the individual sentences of the input text.

self.pr_vector = None: This initializes a variable to store the TextRank scores for each sentence in the input text.

from nltk import sent_tokenize, word_tokenize
from nltk.cluster.util import cosine_distance
from sklearn.metrics.pairwise import cosine_similarity

from sentence_transformers import SentenceTransformer

model = SentenceTransformer('distilbert-base-nli-stsb-mean-tokens')

MULTIPLE_WHITESPACE_PATTERN = re.compile(r"\s+", re.UNICODE)

class TextRank4Sentences():
    def __init__(self):
        self.damping = 0.85  # damping coefficient, usually is .85
        self.min_diff = 1e-5  # convergence threshold
        self.steps = 100  # iteration steps
        self.text_str = None
        self.sentences = None
        self.pr_vector = None

The next step is defining a private method _sentence_similarity() which takes in two sentences and returns their cosine similarity using a pre-trained model. The method encodes each sentence into a vector using the pre-trained model and then calculates the cosine similarity between the two vectors using another function core_cosine_similarity().

core_cosine_similarity() is a separate function that measures the cosine similarity between two vectors. It takes in two vectors as inputs and returns a similarity score between 0 and 1. The function uses the cosine_similarity() function from the sklearn library to calculate the similarity score. The cosine similarity is a measure of the similarity between two non-zero vectors of an inner product space. It is calculated as the cosine of the angle between the two vectors.

Mathematically, given two vectors u and v, the cosine similarity is defined as:

cosine_similarity(u, v) = (u . v) / (||u|| ||v||)

where u . v is the dot product of u and v, and ||u|| and ||v|| are the magnitudes of u and v respectively.

def core_cosine_similarity(vector1, vector2):
    """
    measure cosine similarity between two vectors
    :param vector1:
    :param vector2:
    :return: 0 < cosine similarity value < 1
    """
    sim_score = cosine_similarity(vector1, vector2)
    return sim_score

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        first_sent_embedding = model.encode([sent1])
        second_sent_embedding = model.encode([sent2])
        
        return core_cosine_similarity(first_sent_embedding, second_sent_embedding)

In the next function, the similarity matrix is built for the given sentences. The function _build_similarity_matrix takes a list of sentences as input and creates an empty similarity matrix sm with dimensions len(sentences) x len(sentences). Then, for each sentence in the list, the function computes its similarity with all other sentences in the list using the _sentence_similarity function. After calculating the similarity scores for all sentence pairs, the function get_symmetric_matrix is used to make the similarity matrix symmetric.

The function get_symmetric_matrix adds the transpose of the matrix to itself, and then subtracts the diagonal elements of the original matrix. In other words, for each element (i, j) of the input matrix, the corresponding element (j, i) is added to it to make it symmetric. However, the diagonal elements (i, i) of the original matrix are not added twice, so they need to be subtracted once from the sum of the corresponding elements in the upper and lower triangles. The resulting matrix has the same values in the upper and lower triangles, and is symmetric along its main diagonal. The similarity matrix is made symmetric in order to ensure that the similarity score between two sentences in the matrix is the same regardless of their order, and it also simplifies the computation.

def get_symmetric_matrix(matrix):
    """
    Get Symmetric matrix
    :param matrix:
    :return: matrix
    """
    return matrix + matrix.T - np.diag(matrix.diagonal())

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        ...
    
    def _build_similarity_matrix(self, sentences, stopwords=None):
        # create an empty similarity matrix
        sm = np.zeros([len(sentences), len(sentences)])
    
        for idx, sentence in enumerate(sentences):
            print("Current location: %d" % idx)
            sm[idx] = self._sentence_similarity(sentence, sentences)
    
        # Get Symmeric matrix
        sm = get_symmetric_matrix(sm)
    
        # Normalize matrix by column
        norm = np.sum(sm, axis=0)
        sm_norm = np.divide(sm, norm, where=norm != 0)  # this is ignore the 0 element in norm
    
        return sm_norm

In the next function, the ranking algorithm PageRank is implemented to calculate the importance of each sentence in the document. The similarity matrix created in the previous step is used as the basis for the PageRank algorithm. The function takes the similarity matrix as input and initializes the pagerank vector with a value of 1 for each sentence.

In each iteration, the pagerank vector is updated based on the similarity matrix and damping coefficient. The damping coefficient represents the probability of continuing to another sentence at random, rather than following a link from the current sentence. The algorithm continues to iterate until either the maximum number of steps is reached or the difference between the current and previous pagerank vector is less than a threshold value. Finally, the function returns the pagerank vector, which represents the importance score for each sentence.

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        ...
    
    def _build_similarity_matrix(self, sentences, stopwords=None):
        ...

    def _run_page_rank(self, similarity_matrix):

        pr_vector = np.array([1] * len(similarity_matrix))

        # Iteration
        previous_pr = 0
        for epoch in range(self.steps):
            pr_vector = (1 - self.damping) + self.damping * np.matmul(similarity_matrix, pr_vector)
            if abs(previous_pr - sum(pr_vector)) < self.min_diff:
                break
            else:
                previous_pr = sum(pr_vector)

        return pr_vector

The _get_sentence function takes an index as input and returns the corresponding sentence from the list of sentences. If the index is out of range, it returns an empty string. This function is used later in the class to get the highest ranked sentences.

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        ...
    
    def _build_similarity_matrix(self, sentences, stopwords=None):
        ...

    def _run_page_rank(self, similarity_matrix):
        ...

    def _get_sentence(self, index):

        try:
            return self.sentences[index]
        except IndexError:
            return ""

The code then defines a method called get_top_sentences which returns a summary of the most important sentences in a document. The method takes two optional arguments: number (default=5) specifies the maximum number of sentences to include in the summary, and similarity_threshold (default=0.5) specifies the minimum similarity score between two sentences that should be considered “too similar” to include in the summary.

The method first initializes an empty list called top_sentences to hold the selected sentences. It then checks if a pr_vector attribute has been computed for the document. If the pr_vector exists, it sorts the indices of the sentences in descending order based on their PageRank scores and saves them in the sorted_pr variable.

It then iterates through the sentences in sorted_pr, starting from the one with the highest PageRank score. For each sentence, it removes any extra whitespace, replaces newlines with spaces, and checks if it is too similar to any of the sentences already selected for the summary. If it is not too similar, it adds the sentence to top_sentences. Once the selected sentences are finalized, the method concatenates them into a single string separated by spaces, and returns the summary.

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        ...
    
    def _build_similarity_matrix(self, sentences, stopwords=None):
        ...

    def _run_page_rank(self, similarity_matrix):
        ...

    def _get_sentence(self, index):
        ...
   
    def get_top_sentences(self, number=5, similarity_threshold=0.5):
        top_sentences = []
    
        if self.pr_vector is not None:
            sorted_pr = np.argsort(self.pr_vector)
            sorted_pr = list(sorted_pr)
            sorted_pr.reverse()
    
            index = 0
            while len(top_sentences) < number and index < len(sorted_pr):
                sent = self.sentences[sorted_pr[index]]
                sent = normalize_whitespace(sent)
                sent = sent.replace('\n', ' ')
    
                # Check if the sentence is too similar to any of the sentences already in top_sentences
                is_similar = False
                for s in top_sentences:
                    sim = self._sentence_similarity(sent, s)
                    if sim > similarity_threshold:
                        is_similar = True
                        break
    
                if not is_similar:
                    top_sentences.append(sent)
    
                index += 1
        
        summary = ' '.join(top_sentences)
        return summary

The _remove_duplicates method takes a list of sentences as input and returns a list of unique sentences, by removing any duplicates in the input list.

class TextRank4Sentences():
    def __init__(self):
        ...

    def _sentence_similarity(self, sent1, sent2):
        ...
    
    def _build_similarity_matrix(self, sentences, stopwords=None):
        ...

    def _run_page_rank(self, similarity_matrix):
        ...

    def _get_sentence(self, index):
        ...
   
    def get_top_sentences(self, number=5, similarity_threshold=0.5):
        ...
    
    def _remove_duplicates(self, sentences):
        seen = set()
        unique_sentences = []
        for sentence in sentences:
            if sentence not in seen:
                seen.add(sentence)
                unique_sentences.append(sentence)
        return unique_sentences

The analyze method takes a string text and a list of stop words stop_words as input. It first creates a unique list of words from the input text by using the set() method and then joins these words into a single string self.full_text.

It then uses the sent_tokenize() method from the nltk library to tokenize the text into sentences and removes duplicate sentences using the _remove_duplicates() method. It also removes sentences that have a word count less than or equal to the fifth percentile of all sentence lengths.

After that, the method calculates a similarity matrix using the _build_similarity_matrix() method, passing in the preprocessed list of sentences and the stop_words list.

Finally, it runs the PageRank algorithm on the similarity matrix using the _run_page_rank() method to obtain a ranking of the sentences based on their importance in the text. This ranking is stored in self.pr_vector.

class TextRank4Sentences():
    ...

    def analyze(self, text, stop_words=None):
        self.text_unique = list(set(text))
        self.full_text = ' '.join(self.text_unique)
        #self.full_text = self.full_text.replace('\n', ' ')
        
        self.sentences = sent_tokenize(self.full_text)
        
        # for i in range(len(self.sentences)):
        #     self.sentences[i] = re.sub(r'[^\w\s$]', '', self.sentences[i])
    
        self.sentences = self._remove_duplicates(self.sentences)
        
        sent_lengths = [len(sent.split()) for sent in self.sentences]
        fifth_percentile = np.percentile(sent_lengths, 10)
        self.sentences = [sentence for sentence in self.sentences if len(sentence.split()) > fifth_percentile]

        print("Min length: %d, Total number of sentences: %d" % (fifth_percentile, len(self.sentences)) )

        similarity_matrix = self._build_similarity_matrix(self.sentences, stop_words)

        self.pr_vector = self._run_page_rank(similarity_matrix)

In order to find articles, I used the googlesearch library. The code below performs a Google search using the Google Search API provided by the library. It searches for the query “PMDD treatments – calcium, hormones, SSRIs, scientific evidence” and retrieves the top 7 search results.

# summarize articles
import requests
from bs4 import BeautifulSoup
from googlesearch import search
import justext
query = "PMDD treatments - calcium, hormones, SSRIs, scientific evidence"

# perform the google search and retrieve the top 5 search results
top_results = []
for url in search(query, num_results=7):
    top_results.append(url)

In the next part, the code extracts the article text for each of the top search results collected in the previous step. For each URL in the top_results list, the code sends an HTTP GET request to the URL using the requests library. It then uses the justext library to extract the main content of the webpage by removing any boilerplate text (i.e., non-content text).

article_texts = []

# extract the article text for each of the top search results
for url in top_results:
    response = requests.get(url)
    paragraphs = justext.justext(response.content, justext.get_stoplist("English"))
    text = ''
    for paragraph in paragraphs:
        if not paragraph.is_boilerplate:
            text += paragraph.text + '\n'

    if "Your access to PubMed Central has been blocked" not in text:
        article_texts.append(text.strip())
        print(text)
    print('-' * 50)
    
print("Total articles collected: %d" % len(article_texts))

In the final step, the extracted article texts are passed to an instance of the TextRank4Sentences class, which is used to perform text summarization. The output of get_top_sentences() is a list of the top-ranked sentences in the input text, which are considered to be the most important and representative sentences for summarizing the content of the text. This list is stored in the variable summary_text.

# summarize
tr4sh = TextRank4Sentences()
tr4sh.analyze(article_texts)
summary_text = tr4sh.get_top_sentences(15)

Results:
(I did not list irrelevant sentences that appeared in the final results, such as “You will then receive an email that contains a secure link for resetting your password…“)

Total articles collected: 6

There have been at least 15 randomized controlled trials of the use of selective serotonin-reuptake inhibitors (SSRIs) for the treatment of severe premenstrual syndrome (PMS), also called premenstrual dysphoric disorder (PMDD).

It is possible that the irritability/anger/mood swings subtype of PMDD is differentially responsive to treatments that lead to a quick change in ALLO availability or function, for example, symptom-onset SSRI or dutasteride.
* My note: ALLO is allopregnanolone
* My note: Dutasteride is a synthetic 4-azasteroid compound that is a selective inhibitor of both the type 1 and type 2 isoforms of steroid 5 alpha-reductase

From 2 to 10 percent of women of reproductive age have severe distress and dysfunction caused by premenstrual dysphoric disorder, a severe form of premenstrual syndrome.

The rapid efficacy of selective serotonin reuptake inhibitors (SSRIs) in PMDD may be due in part to their ability to increase ALLO levels in the brain and enhance GABAA receptor function with a resulting decrease in anxiety.

Clomipramine, a serotoninergic tricyclic antidepressant that affects the noradrenergic system, in a dosage of 25 to 75 mg per day used during the full cycle or intermittently during the luteal phase, significantly reduced the total symptom complex of PMDD.

Relapse was more likely if a woman stopped sertraline after only 4 months versus 1 year, if she had more severe symptoms prior to treatment and if she had not achieved full symptom remission with sertraline prior to discontinuation.

Women with negative views of themselves and the future caused or exacerbated by PMDD may benefit from cognitive-behavioral therapy. This kind of therapy can enhance self-esteem and interpersonal effectiveness, as well as reduce other symptoms.

Educating patients and their families about the disorder can promote understanding of it and reduce conflict, stress, and symptoms.

Anovulation can also be achieved with the administration of estrogen (transdermal patch, gel, or implant).

In a recent meta-analysis of 15 randomized, placebo-controlled studies of the efficacy of SSRIs in PMDD, it was concluded that SSRIs are an effective and safe first-line therapy and that there is no significant difference in symptom reduction between continuous and intermittent dosing.

Preliminary confirmation of alleviation of PMDD with suppression of ovulation with a GnRH agonist should be obtained prior to hysterectomy.

Sexual side effects, such as reduced libido and inability to reach orgasm, can be troubling and persistent, however, even when dosing is intermittent. * My note: I think this sentence refers to the side-effects of SSRIs


Dealing with depression after encephalitis. After many years of trials, this is my current depression regimen, just wanted to share.

Hello everyone, I just wanted to share my current depression regimen and some situation info, in case anyone has similar health issues. I have experienced many hospitalizations since 2015, including involuntary psychiatric hospitalizations. Finally in 2017 I was diagnosed with autoimmune encephalitis (brain inflammation), as well as autoimmune thyroiditis. I was treated with intravenous corticosteroids and that led to some improvement. I continue to experience health issues, but I have made several life style changes that have helped me and that I wanted to share. Again, I was diagnosed with autoimmune disease, and my neuropsychiatrist believes that the encephalitis greatly contributed to my depression. Clearly it’s not the case for everyone, so I am not stating that this should work for all. I have been doing better since these changes, I was able to complete a graduate degree, get back to painting, and started writing and playing guitar again. These were huge improvements for me as I was not able to enjoy any hobbies when I had severe depression and was not able to pursue graduate courses.

  1. I cut out all refined carbs and processed foods. There is sufficient evidence indicating that these foods contribute to inflammation. I am not doing keto or low carb, I am not trying to be very strict with myself, I enjoy all sorts of complex carbs such as baked plantains, potatoes, oatmeal, fruits, berries, etc.
  2. Switched to low glycemic foods – this related to #1, as cutting out refined simple carbs in general does leave one with complex carbs that have lower glycemic index.
  3. Foods that cause an immune reaction – this clearly does not occur for most people, but some do react to certain foods. I noticed that I feel physically and emotionally worse after eating gluten, dairy, or soy, so I had to drop these from my diet.
  4. I go to sleep earlier and stay away from my laptop/phone screen after 9pm. I used to stay up late, but now I go to bed around 11pm. After 9pm I usually dim the lights in the room a bit and I read on my Kindle. Kindle Paperwhite does not emit a high amount of blue light. I also installed blackout curtains so that I spend the night sleeping in the dark.
  5. Sleep is very important – so when I really can’t fall asleep, I do use a cannabis oil (NightNight CBN + CBD oil). But changing my diet, losing weight, and going to bed earlier, did reduce my insomnia, so I don’t need the oil every day.
  6. Significantly decreasing my caffeine intake – personally for me it did lower my anxiety and the occurrence of panic attacks, I now only have green tea in the afternoon, otherwise I drink rooibos tea, water, kefir, decaf tea.
  7. Intermittent fasting – I do fell less brain fog and more clear headed when I am not eating the whole day. I used to surf the internet at 1am eating Sweet & Salty bars. Then my mind would go into dark places and I would start reading about serial killers. Now I eat two to three meals a day between 9am and 5pm, I fast for 16-18 hours a day.
  8. Seeing a psychologist – going through CBT and DBT did help, and this related to #5. I still experience racing thoughts, anxiety, and other issues, but I can now more easily choose to not follow my thoughts. For example – I did used to read a lot about US serial killers and then I would freak myself out and I would start to think that someone could climb through the window. Now I choose more what I read – should I keep reading about mass murders? What is the point of that for me? Will that change anything for the better?
  9. Sunlight – I try to get some sunlight each morning, if I have no energy to come out, I still stick out of the window and get some sunlight on my face.
  10. Exercise – I experience certain pains due to autoimmune disease, and fatigue, so I don’t do extensive exercise, but I do yoga at home. And by exercise I don’t mean that I do a whole hour after work, I do certain yoga poses occasionally throughout the day. I think that’s still better than no exercise.
  11. Shrooms – I did several shroom trips, at home alone, after I was treated for encephalitis. I haven’t done shrooms for a while due to pregnancy and breastfeeding, but the positive antidepressant effects of the trips still remain for me.
  12. CBT, again – accepting that some days are better than others, some are worse, but also seeing the positive – in general I am doing much much better now than in 2016. I am female, hormones fluctuate, I do feel worse during the luteal phase, but I experience a lot more enjoyable moments than before my steroids treatment and this lifestyle change.

Celiac disease and dairy proteins – summarization of articles

I want to address the issue of whether dairy could be an issue for those with celiac disease. I don’t think that I will be able to arrive at an exact answer with this post, but I do wish to summarize existing articles and evidence on this topic. From my personal experience, I get all the same symptoms from dairy products as from foods containing gluten. The symptoms include pains in the lower abdomen, bloating, constipation, fatigue, inflammation of the eyelids, as well as psychiatric symptoms including panic attacks, anxiety, and depression. Gathering anecdotal evidence by speaking to reddit users in the gluten-free subreddit, multiple individuals have also expressed the same experience with dairy causing similar symptoms to gluten. Also these individuals noticed that the same symptoms were caused by lactose-free products, therefore likely the culprit is not the sugar (lactose), but the proteins in dairy (casein). Below I will summarize several articles addressing the consumption of casein by individuals with celiac disease.

The first study that I found looking at the correlation between gluten and casein is from 2007, Mucosal reactivity to cow’s milk protein in coeliac disease. This article discusses the fact that some celiac patients on a gluten-free diet still experience gastrointestinal symptoms. The authors then examine whether these patients have an inflammatory immune response to the protein in cow’s milk. The results of this study indicated that in fact in a fraction of celiac patients did experience a similar reaction to the milk protein as to gluten. As usual, I used python to create article summaries, including this one.

Summary:
On clinical grounds cow’s milk (CM) protein sensitivity may be suspected. Here, using rectal protein challenge, we investigated the local inflammatory reaction to gluten and CM protein in adult patients with CD in remission.
In 18 of 20 patients gluten challenge induced neutrophil activation defined as increased MPO release and increased NO synthesis.
A mucosal inflammatory response similar to that elicited by gluten was produced by CM protein in about 50% of the patients with coeliac disease.

Summary using LexRank (graph-based method for computing relative importance of sentences):

Mean rectal ΔMPO was 303 ± 27 µg/l after casein challenge and 16 ± 27 µg/l after challenge with α-lactalbumin.
Compared to healthy controls, patients with CD showed significant increases in rectal NO and MPO concentrations measured 15 h after challenge with both CM and gluten (P < 0·001), while ECP was increased to a similar extent in the two groups ( ).
The major finding in this study is that rectal challenge with CM protein frequently induced a local inflammatory mucosal reaction in patients with CD but not in healthy controls.
Our patients with CD had normal serum levels of IgA, IgG and IgE against casein and α-lactalbumin, which might be explained by the fact that they were on a gluten-free diet and therefore had improved the mucosal integrity.
Our finding that, in a fraction of coeliac patients, CM protein challenge may induce an inflammatory reaction of the same magnitude, as did gluten challenge, may also suggest an innate as well as adaptive immune response to CM, and casein in particular.

There were several other studies on the topic of gluten-free and casein-diet, but they all investigated whether this diet would help patients on the autism spectrum, which is not the topic of my post. I did find another short article on gluten-free and casein-free diet helping with psychotic symptoms. Personally I have a similar experience, as consuming any gluten or dairy increases my paranoia, panic attacks, and intrusive thoughts. The authors claim that there is a following mechanism for psychosis:

“In autism and schizophrenia, incomplete digestion of certain proteins, gluten and casein, cause an autoimmune response as indicated by elevated levels of IgA and IgG antibodies. This intestinal malabsorption also causes pathogenic elements (peptide fractions), which bind to opioid receptors by crossing the blood-brain barrier. This releases exorphins (opiate-like substances, similar to certain drugs) that cause psychotic symptoms.”

Evidence-Based Practice: Introduction of a Gluten-Free and Casein-Free Diet to Alleviate Psychotic Symptoms
A case review of a young boy yielded an unexpected resolution of psychotic symptoms after the introduction of a gluten-free, casein-free (GFCF) diet.
The purpose of this paper is to show that health care professionals may use a gluten-free and casein-free diet (GFCF) as an additional element to standard treatment methods, to alleviate psychotic symptoms.
Additionally noted were similarities between autism and schizophrenia.
Introduction of a GFCF diet helps reduce psychotic symptoms, and gives another option for patients resistant to traditional treatment methods, especially adolescents and young adults.
Keywords: autism, gluten-free, casein-free diet (GFCF), psychosis, schizophrenia

Yerba Mate (Ilex Paraguariensis) articles summary using NLP

The following summary was created using a google search for specific phrases and then performing natural language processing steps for sentence scoring. Yerba mate is an evergreen tree/shrub that grows in subtropical regions of South America. The leaves of the plant are used to make tea. Yerba mate tea contains caffeine and theobromine, which are known to affect the mood. I was interested in summarizing the existing articles in regards to research on this plant in psychiatry.

The first search phrase used was “yerba mate psychiatry depression research evidence“, and the number of collected articles for this phrase was 18. The text from all articles was combined, and relative word frequencies were calculated (after removing stop-words). These relative frequencies were then used to score each sentence. Sentence length distribution was checked, and the 90th percentile of 30 words was chosen to select sentences below the maximum length. Below are the 10 highest scoring sentences that summarize the text from the 18 articles.

We can infer from the summary that studies have been performed using the yerba mate extract on rats and tasks for chosen as proxies for the rats’ depression and anxiety levels. There are no mentions of human studies in the summary. Also the chosen sentences indicate that based on these studies, yerba mate has potential antidepressant activity, and it may improve memory as well. The results of the anxiety study were not mentioned and it’s not clear whether there were any side effects from yerba mate. These results are in line with descriptions of personal experiences of reddit users that I have reviewed, as many report better mood and improved focus after drinking yerba mate tea. Some users do report increased anxiety correlated with yerba mate consumption.

View abstract. J Agric.Food Chem. Vitamin C Levels Cerebral vitamin C (ascorbic acid (AA)) levels were determined as described by Jacques-Silva et al. Conclusion: In conclusion, the present study showed that Ilex paraguariensis presents an important effect on reducing immobility time on forced swimming test which could suggest an antidepressant-like effect of this extract. Despite previous some studies show the antidepressant-like activity of flavonoids [31, 32] which are present in the extract of I. paraguariensis, any study has evaluated the possible antidepressant-like activity of it. The presence of nine antioxidants compounds was investigated, namely, gallic acid, chlorogenic acid, caffeic acid, catechin, quercetin, rutin, kaempferol, caffeine, and theobromine. Abstract In this study, we investigated the possible antidepressant-like effect of I. paraguariensis in rats. Another study showed that an infusion of I. paraguariensis can improve the memory of rats treated with haloperidol and this effect was related to an indirect modulation of oxidative stress . In addition to flavonoids as quercetin and rutin and phenolic compounds as chlorogenic and caffeic acids, yerba mate is also rich in caffeine and saponins . After four weeks, behavioral analysis of locomotor activity and anxiety was evaluated in animals receiving water (n = 11) or I. paraguariensis (n = 9). In the same way, we evaluated if the presence of stimulants compounds like caffeine and theobromine in the extract of I. paraguariensis could cause anxiety. In the present study, we evaluated the possible antidepressant-like effect of I. paraguariensis by using forced swimming test (FST) in rats. Forced Swimming Test This experiment was performed using the FST according to the method previously published by Porsolt et al. In this context, Yerba mate (Ilex paraguariensis) is a beverage commonly consumed in South America especially in Argentina, Brazil, Uruguay, and Paraguay. I. paraguariensis reduced the immobility time on forced swimming test without significant changes in locomotor activity in the open field test.

I also tried several other search phrases, such as “yerba mate mood anxiety evidence” and “yerba mate side effects evidence“. In total of 17 articles were collected for the first query and 19 articles for the second query. The summaries are presented below. There was nothing in the summary directly discussing mood or anxiety, but there are mentions of neuroprotective effects and antioxidant effects. We can also learn that a cup of yerba mate tea has similar caffeine content as a cup of coffee, and that drinking yerba mate is not recommended while pregnant or breastfeeding. As in the previous summary, no human trials were mentioned, so it seems that all the summarized studies were performed on rats. The side effects query summary mentions the risk of transferring the caffeine from the tea to the fetus when pregnant, as well as a link to cancer for those who drink both alcohol and yerba mate. It also mentions and anxiety is a side effect of the tea.

Query 1:
View abstract. J Agric.Food Chem. On the other hand, studies conducted on an animal model showed chemopreventive effects of both pure mate saponin fraction and Yerba Mate tea in chemically induced colitis in rats. Yerba Mate Nutrition Facts The following nutrition information is provided by the USDA for one cup (12g) of a branded yerba mate beverage (Mate Revolution) that lists just organic yerba mate as an ingredient. Researchers found that steeping yerba mate (such as in yerba mate tea) may increase the level of absorption. Yerba mate beverages are not recommended for children and women who are pregnant or breastfeeding. Chlorogenic acid and theobromine tested individually also had neuroprotective effects, but slightly weaker than Yerba Mate extract as a whole, but stronger than known neuroprotective compounds, such as caffeine [ 83 ]. The caffeine content in a cup (about 150 mL) of Yerba Mate tea is comparable to that in a cup of coffee and is about 80 mg [ 1 , 11 , 20 ]. In aqueous and alcoholic extracts from green and roasted Yerba Mate, the presence of chlorogenic acid (caffeoylquinic acid), caffeic acid, quinic acid, dicaffeoylquinic acid, and feruloylquinic acid was confirmed. After consumption of Yerba Mate tea, antioxidant compounds are absorbed and appear in the circulating plasma where they exert antioxidant effects [ 55 ]. According to the cited studies, Yerba Mate tea consumption attenuates oxidative stress in patients with type 2 diabetes, which may prevent its complications.

Query 2:
View abstract. J Agric.Food Chem. Because yerba mate has a high concentration of caffeine, drinking mate tea while pregnant can increase the risk of transferring caffeine to the fetus. J Ethnopharmacol. South Med J 1988;81:1092-4.. View abstract. J Am Coll Nutr 2000;19:591-600.. View abstract. Am J Med 2005;118:998-1003.. View abstract. J Psychosom Res 2003;54:191-8.. View abstract. Yerba mate consumed by those who drink alcohol is linked to a higher risk of developing cancer. Anxiety and nervousness are a side effect of excessive yerba mate tea consumption.

NLP: Summarizing l-theanine articles

In this post I will describe my use of NLP (Natural language processing, not neuro-linguistic programming. Natural language processing is cool, while neuro-linguistic programming is some pseudoscience stuff) in the application of summarizing articles from the internet. Specifically, I chose the topic of l-theanine and psychiatry, as previously I have already summarized the Nootropics subreddit discussions on l-theanine. The next step, therefore, is to summarize existing articles on this topic.

Summarizing experience with green tea from the Nootropics subreddit

The first step was to perform an automated Google search for a specific term. I chose the term “l-theanine psychiatry” and set the number of unique urls to be 15. Some of the resulting urls are listed below:

Can L-Theanine Help Treat Symptoms of Bipolar Disorder?

Effects of L-Theanine Administration on Stress-Related Symptoms and Cognitive Functions in Healthy Adults: A Randomized Controlled Trial

L-theanine

How does the tea L-theanine buffer stress and anxiety

It can be seen that the article titles are quite relevant to our topic. The next step is formatting the text and summarizing the information.

The idea behind the summarization technique is calculating word frequencies for each word in the combined text of all articles (after stop words removal), and then selecting words in the top 10% of frequencies. These words will be the ones used in scoring each sentence. More frequent words will be given more importance, as they are deemed more relevant to the chosen topic, therefore sentences containing those words will receive higher scores. This is not a machine learning approach, but a basic frequency count method. In total, 148 words were used for sentence scoring. Some of the most frequent words (from all articles combined) are listed below:

Theanine, administration, effects, placebo, weeks, study, four, sleep, scores, cognitive, may, stress, function, fluency, studies, related, symptoms, participants, bacs, anxiety

BACS was one of the top frequent words, it stands for the Brief Assessment of Cognition in Schizophrenia. Once each sentence was scores, 15 highest scoring sentences were selected in order to create a summary. The summary of the articles is presented below. From the summary we can infer that l-theanine was studied for its effects on cognition, anxiety, and stress. Some studies had positive results, indicating that l-theanine performed significantly better than placebo in regards to positive cognitive effects such as improved verbal fluency and executive function. Studies also noted significant improvements in stress reduction with the use of l-theanine. Other studies did not find any significant differences between l-theanine and placebo.


Second, only about 20% of symptoms (the PSQI subscales) and cognitive functions (the BACS verbal fluency, especially letter fluency and executive function) scores showed significant changes after L- theanine administration compared to the placebo administration, suggesting that the effects are not large on daily function of the participants.

Although psychotropic effects were observed in the current study, four weeks L-theanine administration had no significant effect on cortisol or immunoglobulin A levels in the saliva or serum, which was inconsistent with previous studies reporting that salivary cortisol [34] and immunoglobulin A [33] levels were reduced after acute L-theanine administration.

Considering the comparison to the placebo administration, the current study suggests that the score for the BACS verbal fluency, especially letter fluency, but not the Trail Making Test, Stroop test, or other BACS parameters, significantly changes in response to the 4 weeks effects of L-theanine.

The BACS verbal fluency, especially letter fluency (p = 0.001), and executive function scores were significantly increased after L-theanine administration (p = 0.001 and 0.031, respectively; ), while the Trail Making Test A and B scores were significantly improved after placebo administration (p = 0.042 and 0.038, respectively).

When score reductions in the stress-related symptoms were compared between L-theanine and placebo administrations, changes in the PSQI sleep latency, sleep disturbance, and use of sleep medication subscales were significantly greater (p = 0.0499, 0.046, and 0.047, respectively), while those in the SDS and PSQI scores showed a non-statistically significant trend towards greater improvement (p = 0.084 and 0.073, respectively), during the L-theanine period compared to placebo.

Stratified analyses revealed that scores for verbal fluency (p = 0.002), especially letter fluency (p = 0.002), increased after L-theanine administration, compared to the placebo administration, in individuals who were sub-grouped into the lower half by the median split based on the mean pretreatment scores.

Discussion In this placebo-controlled study, stress-related symptoms assessed with SDS, STAI-T, and PSQI scores decreased, while BACS verbal fluency and executive function scores improved following four weeks L-theanine administration.

The present study aimed to examine the effects of four weeks L-theanine administration (200 mg/day, four weeks) in a healthy population, i.e., individuals without any major psychiatric disorder.

The PSQI subscale scores for sleep latency, sleep disturbance, and use of sleep medication reduced after L-theanine administration, compared to the placebo administration (all p < 0.05).

The effects on stress-related symptoms were broad among the symptom indices presented in the study, although a comparison to the placebo administration somewhat limits the efficacy of L-theanine administration for some sleep disturbance measurements.

For cognitive functions, BACS verbal fluency and executive function scores improved after four weeks L-theanine administration.

PMID: 31623400 This randomized, placebo-controlled, crossover, and double-blind trial aimed to examine the possible effects of four weeks L-theanine administration on stress-related symptoms and cognitive functions in healthy adults.

The anti-stress effects of L-theanine (200 mg/day) have been observed following once- [ 33 , 34 ] and twice daily [ 35 ] administration, while its attention-improving effects have been observed in response to treatment of 100 mg/day on four separate days [ 36 ] and 200 mg/day single administration [ 37 ], which was further supported by decreased responses in functional magnetic resonance imaging [ 38 ].

These results suggest that four weeks L-theanine administration has positive effects on stress-related symptoms and cognitive function in a healthy population.

Summarizing experience with green tea from the Nootropics subreddit

We can’t all get our own labs with grad assistants and grants in order to conduct research, but that doesn’t mean there aren’t other ways to obtain data. Some might say that only studies with randomized trials with test and control groups matter, but I believe that subreddits can provide supplemental information. We should look at the data with a grain of salt, but a lot of people do describe sincerely their experiences with nootropics on reddit. Users also often link studies and scientific articles in the forums.

Not all nootropics are covered by randomized studies and rarely do psychiatrists collect data on experiences with nootropics. For these reasons people mostly discuss their experiences with nootopics and supplements online, in forums such as subreddits and Facebook groups. For example, there have not been many studies on lithium orotate, but probably thousands of people are taking it at the moment. There are very few published papers on this supplement, so how could one find out about possible benefits and side effects? Personally I had a good experience with very small doses of lithium orotate helping to reduce intrusive thoughts and reviving memories from the past. Where does information about my experience exist? Only in the Nootropics and depressionregimens subreddits. No psychiatrist or doctor was ever interested in my experience with microdosing lithium, but that doesn’t mean that this information could not be useful to someone else.

There are multiple Facebook groups specifically dedicated to topics such as treatment resistant depression, PMDD, borderline personality disorder, etc. There are a lot of discussions of supplements in those groups, but unfortunately I don’t know how to obtain data from Facebook. The good thing about reddit is that Reddit offers a free API that allows you to download data from subreddits, so you can get the titles of posts, text, and comments, up to about 1000 posts per subreddit per day. Thank you, Reddit! This is really great!

For this exercise, I decided to use natural language processing to summarize text from the Nootropics subreddit, filtering for posts about green tea. I used the subreddit to filter for posts which contained keywords from the following list: green tea, theanine, ltheanine, matcha, l-theanine, and l theanine. Matcha is a type of green tea powder, therefore still green tea, and l-theanine is a water soluble amino acid found in green tea. In total there were 730 posts in my dataset, with the post created dates ranging from September 2011 to January 2022.

Examples of post titles:

  • L Theanine cured my ( social) anxiety. I’m blown away. I’m usually socially awkward but I MASTERED a job interview.
  • Comprehensive List of GABAA Receptor Anxiolytics That Potentially Produce no Tolerance or Dependence.
  • Green tea supplement ruins man’s liver
  • Neurochemical and behavioral effects of green tea (Camellia sinensis): A model study Increased serotonin and dopamine metabolism
  • Why do 1-2 cups of green tea seem to anecdotally calm so many people down in this subreddit, even though there are only trace amounts of theanine in a cup?

Once the data was collected, the title and body were combined for each post and text processing was performed. Processing included removing accented characters, expanding common contractions, removing newlines, tabs, and special characters. Python’s spellchecker library was used in order to correct spelling errors.

The first summary method used was word frequencies and sentence scoring. All posts were combined together into one document, and the frequency of each word was calculated. In total there were 10,677 unique words/terms, but not each term was meaningful, and some appeared only several times. For this reason, only the top 5% most frequent words were selected in order to be used for sentence scoring. I also assigned higher scores to words green, tea, theanine, ltheanine, and matcha, in order to capture more posts that are more likely to focus on green tea.

The combined text was separated into individual sentences, and sentences were then scored by adding up the scores of each word in the sentences. As mentioned above, the top 5% most frequent words had scores assigned above 0, with the score being equal to the frequency. The remaining words were assigned a score of 0. Some of the most frequent words included anxiety, effects, ltheanine, day, good, sleep, caffeine, depression, tea, help, work, brain, and life.

Here are the resulting top ten sentences. Some resulting sentences were quite long, so I am pasting the sentence parts most relevant to green tea.

L-Theanine: Glutamate inhibitor * Increases glycine by 17.2% for one week * Increases -1-waves within 30-45m orally * At certain dosages, can increase GABA by 19.8% * Antagonizes AMPA and Kainate * [ * Partial co-agonist for NMDA, though significantly less potent than endogenous ligands * Blocks glutamate transporters(and therefore reuptake of glutamate and glutamine) * Not sedative in regular doses but promotes relaxation * Only those who have high baseline anxiety benefit from relaxation * Nontoxic and noncarcinogenic in very high doses (4g/kg).

L-Theanine + Taurine * Anti-excitatory and sedative * Highly bioavailable and consistent * L-Theanine + Taurine + Agmatine * Anti-excitatory and sedative * Highly bioavailable and consistent * Potentiates GABAergic and can suppress NMDA better than theanine * Anti-tolerance building * L-Theanine + Rosmarinic Acid * Both are anti-glutaminergic * Potent GABAA agonist comparable to benzos * Low total formula dose * 400mg L-Theanine + 150mg RA (1875mg Rosemary extract) * Taurine + Ashwagandha * GABAA potentiation of Taurine * NMDA suppression * L-Theanine + Taurine + Ashwagandha * GABAA potentiation of Taurine * Total glutamate suppression * Taurine + Magnolia * GABAA potentiated at benzo site plus influx of GABA in body * Apigenin + Magnolia * GABAA 1 agonist plus PAM * Both very potent * Chinese Skullcap + Magnolia * GABAA 2 + 3 agonist plus PAM * Chinese Skullcap + Apigenin + Magnolia * GABAA 1 + 2 + 3 agonist plus PAM EDIT: Added GABA-T and GAD explanations EDIT 2: Found new and more accurate evidence claiming that L-Theanine is actually an NMDA partial co-agonist, not an antagonist. This backs up sources that claim to see Ca2+ activity increase and become suppressed with NMDA antagonists. It also backs up sources finding L-Theanine to be an NMDA antagonist.

HELPED SOMEWHAT, OR NOT TOO SURE Cyamemazine (anxiety), alimemazine (sleep), magnesium L-threonate and glycinate (sleep), white noise (anxiety), SuperBetter app, vitamin D3, reading about Young schemas, ginkgo biloba (energy, focus), melatonin (sleep), chamomile (sleep), verbena (sleep), lavender (sleep), ALCAR, taurine, NAC, cannabis (sleep), gratitude journal, music (anxiety), coleus forskohlii (weight loss), CLA (from safflower, weight loss), metformin (weight loss, triggered an hypoglycemia the first time I tried it), green tea, risperidone (anxiety, cravings, irritability), L-methylfolate. DID NOT SEEM TO HELP Inositol, chromium picolinate, zinc, CoQ10, apple cider vinegar, meratrim (sphaeranthus indicus + garcinia mangostana), hydroxyzine, tiapride, binaural beats.
L-theanine :** Pretty good anxiolytic, and helps a bit with focus, especially when combined with coffee. Not too sedative.
 **CBD :** When L-theanine or skullcap is not quiet enough, can add some extra anxiolysis, but nothing spectacular either, and not enough on its own.

Medication and supplement augmentation suggestions. My diagnosis is Major Depression/Generalized Anxiety. Possibly on the light end of the Borderline spectrum. I also have Restless Leg Syndrome hence some of the meds. High Cholesterol and stage 2 hypertension. Current regimen is: Bupropion 100mg Lithium Carbonate 300mg (1 in morning, 2 before bed) Gabapentin 300mg (3 times a day) Pramipexole 1mg (at bedtime) Turmeric/bioperine 2000mg x2 Omega 3 Fish Oil 3,600mg x2 Vitamin D3 5,000IU x2 Vitamin C 500mg Multivitamin L-Theanine 200mg Kratom caps (4-6 size 00 about 3 times a week with at least a day between) Tianeptine 25mg (Monday, Wednesday, Friday only) Phenibut (1 size 00 Tuesday/Thursday only).

l-Theanine, Cannabis, Glutamate/GABA and Anxiety: Could this be a potential cure for Cannabis Induced Paranoia and Anxiety? Just a thought – But could Glutamate be responsible for the anxiety and paranoia commonly felt from cannabis? This is just under informed speculation, but THC has been found to increase striatal glutamate in the brain. ( L-Theanine has been found to “block” glutamate signaling in the brain. See here; >L-theanine relieves anxiety in large part because it bears a close resemblance to the brain-signaling chemical glutamate. L-theanine produces the opposite effect in the brain. >While glutamate is the brains most important excitatory neurotransmitter, L-theanine binds to the same brain cell receptors and blocks them to glutamates effects. This action produces inhibitory effects.1,2 That inhibition to brain overactivity has a calming, relaxing effect in which anxiety fades.3 > I have always noticed that when I take L-Theanine, it helps me get higher from cannabis, all while blocking any paranoia and anxiety that I get from it. Cannabis is the only drug I have found that is potentiated by L-Theanine. With other substances, I have noticed that L-Theanine blocks a lot of the pleasurable effects, while reducing anxiety (Namely when taken with stimulants, but also with Phenibut) Since Cannabis increases glutamate in the brain, and Glutamate is associated with anxiety, and L-Theanine essentially blocks it, could L-Theanine be a good anxiety and paranoia cure for weed? Will somebody with more knowledge on this subject help me out here?

How much trouble am I in when I show this to my PsyD? Venturing outside my personal echo chamber to solicit general opinions on my supplement regime. Cognizant that I am doing it wrong, but I will really feel that I am doing it wrong when I start getting grumpy. Please don’t hate me. L-Theanine 200mg L-Carnosine 1000mg Reishi Extract 2000mg Cats Claw 1000mg Alpha-lipoic acid 500mg Ashwagandha 250mg Synapsa Bacopa Monnieri 640mg N-acetyl l-cysteine 1200mg Palmitoylethnolamide 800mg Maitake mushroom extract 3000mg Chaga 3600mg Polygala Tenuifolia 200mg Lions mane 4200mg Acetyl l-carnitine 500mg Sarcosine 2000mg Wulinshen 1000mg.

Caffeine + L-Theanine. Like the beginners guide says, Id recommend this stack for anyone looking to wet their feet with nootropics. The 1 (Caffeine):2 (L-Theanine) ratio works well for me, but in order for me to really feel the L-Theanine I need to take it on a empty stomach. My favorite dosage is 200mg Caffeine and 400mg of L-Theanine immediately before writing. It helps me to be very relaxed, not filter my thoughts, and achieve a flow state. This stack combined with music from MajesticCasual or TheSoundYouNeed YouTube channels is pretty amazing for writing. BTW, for some people 400mg of L-Theanine is too much and may make you drowsy (though not for me). L-Theanine helps reduce anxiety, but I try to make sure I meditate instead of relying on L-Theanine. I save it for when I am writing.

Please give Dosage Guidance: Kava Kava – 700 MG Capsules (This I just ordered to try, not take daily, I have never tried Kava before) – Maybe 1x a day Sulbutiamine Capsules/Tablets 200 MG – 2 Capsules once a day (400 MG 1x a Day) Uridine Monophosphate Capsules 250mg – (500-750 MG 1x a Day) Agmatine Sulfate 250mg Capsules – Maybe start with 2 Capsules 1x a day? Agmatine Sulfate 1000mg Capsules – Only for going up on higher doses. L-Theanine 200 MG – 1x a Day Mens Daily Multimineral Multivitamin Supplement – 1x a Day Vitamin D3 5,000 IU – 1x a day Vitamin B Complex – 1x a day Magnesium Glycinate 400 MG – 1x a Day Omega 3 Fish Oil 4,080mg – EPA 1200mg + DHA 900mg Capsules – 1x a Day Kratom – 4 grams – 3x a day Ashwaghanda – KSM-66, 300mg, 2x a day. Ashwagandha – Sensoril 125mg Do not know dosage? Youtheory Sleep Powder Advanced, 6 Ounce Bottle – It has full doses of a few calming amino acids and some melatonin. TLDR: I want to quit my antidepressants, and purchased a bunch of Supplements to start taking while weaning off my meds, please give me help/tips on this journey, as well as check out the list and let me know if you recommend other supplements to try, or any tips on how to take these.

L-theanine has done wonders for me sleep, anxiety and productivity. With L-t I have had much better sleep due to increased relaxation and reduces anxiety. This has lead to much better and longer sleep, making me really productive at work. It is also helping a lot with anxiety from coffee, it is all but gone now. I just get the nice energy boost and focus boost with no anxiety effect. I usually take 1 or 2 pills of 225mg depending on how i feel. If I feel chill enough, I will only have 1 at night. If I feel the anxiety and neck tightness coming on from coffee I will take another one then.

Supplementation guide to stimulants. As I have some extensive experience with ADHD medication and stims (ADHD-PI diagnosed myself), over the years through research and trial and error I have built a list of supplements that works for mitigating side effects and minimizing comedown while enhancing their intended effects. I read a post about this a couple years ago and wanted to add my own twist to it in hopes of promoting harm reduction. The supplement + stim dosages here given are intended to be used for studying/productivity purposes, although this will still work if you are taking more than the therapeutic amount. If you have any inputs, advice or additions to the list I am happy to add them. Stimulants used for the purposes of studying SHOULD NOT be taken everyday to avoid dopaminergic downregulation. Three times a week at most is recommended to allow the body to regain homeostasis. Stimulants that these supplements can work for include: * Amphetamines (Adderall, Dexamphetamine, Methamphetamine) * Methylphenidates and Analogues (Focalin, Concerta/Ritalin, ethylphenidate, Isopropylphenidate) * Caffeine (Coffee, Tea, Caffeine Pills) (To a certain degree) * Eugeroics (Modafinil, Adrafinil, Armodafinil) (To a certain degree).
*L-Theanine (200mg/1-3x)\\***  (Reduces euphoria/ Reduces Jitters / Lowers Anxiety / Relaxation) (Anecdotal : Amazing supplement if you are an anxiety sensitive person, smooths out the experience) >[Effects of L-theanine on stress related symptoms and cognitive functions in healthy adults].

I think that given then simple method that was used to select these top sentences, the results can be viewed as pretty successful. No neural networks were applied here, only word frequencies were used to generate sentence scores, but by reading the results we can actually learn a lot about green tea as a nootropic. My first observation would be that people mostly talk about l-theanine and not green tea. This makes sense, since the nootropics subreddit is mostly about discussions on supplements in pill form. Another observation is that people try l-theanine hoping to reduce anxiety and improve sleep. Information was provided stating that l-theanine could be reducing anxiety by inhibiting glutamate, an excitatory neurotransmitter. One user mentioned that l-theanine helps them with THC induced paranoia and proposed that THC increases glutamate in the brain and l-theanine in turn decreases anxiety by reducing available glutamate. Other users also mention l-theanine helping them with the anxiety and jitteriness after drinking coffee. In terms of side-effects that were mentioned, sedation and drowsiness were some of them.

In conclusion, I was able to extract a pretty good summary of green tea/l-theanine by using a pretty simple word frequency method. Given that now I have this code, I can just change the supplement keywords and create a similar summary for any other supplement. It’s definitely much faster than scrolling through the subreddit, looking for relevant posts.

Breastfeeding and dopamine volatility

It’s really fascinating, did you know that breastfeeding can cause dopamine crashes?

Not everyone who drinks coffee gets a coffee crash, but if you do, you know what I’m talking about. A cup of strong coffee makes more dopamine suddenly more available. Then for the next few hours you are rewarded more by your brain for anything that you do, so you feel more confident and successful at your tasks, you feel better about doing them. Then dopamine reabsorption blocking decreases, and less dopamine becomes available. A coffee crash is exactly that – for those who are sensitive to this decrease in available dopamine, you suddenly feel a “realization” that in fact what you are doing is pointless, and all we are is dust in the wind.

Well, turns out that breastfeeding triggers a similar mechanism – when prolactin increases, less dopamine becomes available.

Breastfeeding and dopamine article

Inflammation and Schizophrenia – a short lecture

Came across this short lecture on schizophrenia and the inflammation hypothesis. The author mentions three hypothesis for the causes of schizophrenia – elevated dopamine, glutamate receptor abnormalities, and inflammation. He also mentions the fact that autoimmune diseases can present with psychosis – lupus, Hashimoto’s encephalopathy, celiac disease, etc. It’s great to hear a professional acknowledging this fact, as not all doctors look into the link between psychiatric symptoms and autoimmune diseases.

Important notes from the lecture – some inflammation can be determined in a straightforward way by checking the C-reactive protein levels. Elevated levels of this substance increase the risk of schizophrenia onset. C-reactive protein levels are used to check for infection or chronic inflammatory disease, they also lead to increased risk of heart disease. It can be elevated due to a variety of diseases, such as obstructive sleep apnea, some viral infections, lupus, and rheumatoid arthritis.
In one study lumbar puncture was performed on a sample of patients with schizophrenia. 54% of the patients had self-directed antibodies in the cerebrospinal fluid (another piece of evidence to support the immune system disturbance hypothesis). What could the antibodies be targeting? Possibly neuronal proteins or neuronal receptor proteins.

Inflammation and Schizophrenia video lecture

Reddit Depression Regimens cont’d

Previous posts on the topic of scraping reddit data from the depressionregiments subreddit:

Reddit Depression Regimens – Topic Modeling

Reddit Depression Regimens – Topic Modeling cont’d

Next we will create some plots with javascript. For example, it would be interesting to see how often specific psychotropic medications and supplements are mentioned in the text data.
Below is a chart with frequencies of the most common antidepressant medications. The counts were performed by combining the frequencies of the brand name and the chemical name (for example Wellbutrin count is wellbutrin (54) + bupropion (27) = 81).

The data was generated using python and exported as a .csv file, with columns ‘term’ and ‘freq’.

HTML part:

<html>
<head>
  https://cdn.plot.ly/plotly-2.0.0.min.js
  https://d3js.org/d3.v5.min.js
  https://cdn.jsdelivr.net/npm/chart.js@2.9.3
  http://script1.js
</head>
<body onload="draw()">
chart 1
<div id="jsdiv" style="border:solid 1px red"></div>
chart 2
<canvas id="chart"></canvas>
</body>

JS part:

function makeChart(meds) {
  // meds is an array of objects where each object is something like

  var hist_labels = meds.map(function(d) {
    return d.term;
  });
  var hist_counts = meds.map(function(d) {
    return +d.freq;
  });

  arrayOfObj = hist_labels.map(function(d, i) {
      return {
        label: d,
        data: hist_counts[i] || 0
      };
    });
  sortedArrayOfObj = arrayOfObj.sort(function(a, b) {
      return b.data - a.data;
    });

   newArrayLabel = [];
   newArrayData = [];
   sortedArrayOfObj.forEach(function(d){
      newArrayLabel.push(d.label);
      newArrayData.push(d.data);
    });


  var chart = new Chart('chart', {
    type: "horizontalBar",
    options: {
      maintainAspectRatio: false,
      legend: {
        display: false
      }
    },
    data: {
      labels: newArrayLabel,
      datasets: [
        {
          data: newArrayData,
          backgroundColor: "#33AEEF"
        }]
    },
    options: {
      scales: {
        yAxes: [{
          scaleLabel: {
            display: true,
            labelString: 'med name'
          }
        }],
        xAxes: [{
            scaleLabel: {
                display: true,
                labelString: 'freq'
            }
        }],
      },
      legend: {
          display: false
      },
      title: {
          display: true,
          text: 'Frequencies of common antidepressants'
        }
    }    
  });
}

// Request data using D3
d3
  .csv("med_list_counts_df.csv")
  .then(makeChart);

We can generate charts with other medication/supplement lists using the same code. Below is a plot with frequencies of common antipsychotics. As you can see, antipsychotics are not mentioned that frequently as antidepressants, and a lot of names in the input list were not mentioned at all (such as haldol or thorazine), and therefore they do not show up in the chart.

Other medications and common supplements mentioned:

Reddit Depression Regimens – Topic Modeling cont’d

In the previous posts we applied LDA topic modeling to text documents from data collected from the subreddit depressionregimens. Here I will continue with the results from the derived topics model – obtaining the most representative text for each topic. As was stated, the chosen model has ten topics, and LDA assumes that each document is composed of multiple topics, with each topic being assigned a probability. Each topic is composed of multiple words, with each word assigned a probability.

Previous post: Reddit Depression Regiments – Topic Modeling

Since each document is composed of multiple topics, for each topic we can find a document with the highest probability for that topic, therefore that will be our most representative document.

Topic 1

(‘feel’, 0.040), (‘year’, 0.026), (‘thing’, 0.022), (‘symptom’, 0.020), (‘brain’, 0.019), (‘start’, 0.018), (‘time’, 0.017), (‘make’, 0.015), (‘issue’, 0.015), (‘lot’, 0.014)

Most representative post id with topic 1 probability of 0.45:
Full text here: https://www.reddit.com/r/depressionregimens/comments/gib17h

“Blank Mind Syndrome” – Sub group of specific symptoms including: – Loss of Internal Monologue, lack of coherent automatic thoughts, no track of time passage, lack of self insight – Depersonalisation/Derealization Feeling detached, having no “sense of self”, missing mental features, having no emotional autobiography, feeling as if every day is the same, loss of relationship or emotional attachments, feeling detached from external reality – Cognitive Decline, Loss of Visual imagination, inability to think in a deep or complex way, inability to hold information, loss of past learned skills and knowledge. – Complete Lack of goal-directed motivation, having no automatic self direction, no long term goals – Anhedonia – inability to enjoy or derive pleasure, nothing to look forward to, no bodily joy, satasfaction and so on – Lack of atmosphere/deepness of the outside reality, inability to appreciate beauty, things look flat and insignificant. All symptoms in various severity of course, It’s time to talk, what is this condition exactly, Did you suffer from depression your entire life? Is this episodic? how are you planning to solve it? how did you acquire it? had any professional been aware of it? Is it medication induced? Is there any outside outlet acknowledging this specific phenomena? How much time do you suffer from it? What were you diagnosed with? Was it sudden or progressively? Had anything helped at all? Would you join a group for people suffering the same condition? Is anyone interested in doing so? Please do respond!

Topic 2

people 0.044, depression 0.037, doctor 0.028, psychiatrist 0.020, make 0.020, bad 0.016, therapy 0.016, therapist 0.015, find 0.014, problem 0.013

Most representative post for this topic, with probability for topic 2 of 0.53: https://www.reddit.com/r/depressionregimens/comments/iij4tr

I talked to him today, he says all my problems are my choice and I choose to be lazy, suicidal, depressed etc. Is he right?,Dude… if he believes this then he must also believe that his career is total quackery. Get a new psychiatrist immediately. What a piece of shit.,absolutely not, please get a new psychiatrist!! you don’t choose to be suicidal or depressed, and in my experience, depression causes laziness more often than not. it’s worrisome that a professional outright said this to you and honestly I would report him if you can. that’s such a harmful thing to say to anyone suffering from such issues and to say it to the wrong person could be really catastrophic. i’m sorry he’s a dick to you, don’t listen to his bullshit. if it was so easy as to choose not to be depressed then nobody would fucking be depressed. it’s like he thinks people enjoy feeling this way ugh,OMG please please PLEASE never go back there. I once had a psychiatrist tell me I was gonna end up on a street corner with a sign (spoiler alert: I have a career and own a house). I got up and left and never looked back. Remember that YOU are a huge part of your mental health journey. It’s a collaborative effort between you, your psychiatrist, therapist (if you have one), and any other professional you choose to involve. You always have a say, and if something doesn’t seem right, you don’t have to go along with it. Your feelings are ALWAYS valid—don’t ever let anyone tell you differently. You are not alone in this. So many of us are depressed, anxious, suicidal, attention deficit, bipolar, lazy…these are NOT choices. Who would choose to be this way? There are plenty of helpful professionals out there, just make sure you screen them carefully. I believe in you and wish you well!!! …

Topic 3

day 0.037, thing 0.035, feel 0.033, make 0.024, find 0.017, good 0.016, exercise 0.016, eat 0.013, walk 0.013, lot 0.013

https://www.reddit.com/r/depressionregimens/comments/dztdw9

Topic probability: 0.53

Wanted to share something that I’ve recently found to help when I’m struggling to find motivation to complete basic chores. This one specifically deals with laundry, but it can apply to other tasks as well. If you’re like me, you can have laundry sitting there for weeks not being put away. The mountain of clothing is so overwhelming that I just ignore it all together. I’m also an all-or-nothing person; I just wait and wait until a good day when I’ll have enough energy to get it done. Those days are exceedingly rare, so that mountain of clothes will sit there for a loooong time, stressing me out and depressing me even more. I’m trying to switch my mindset to not feeling like I need to take on such giant tasks all at once. I decided to break up the tasks into smaller ones. For the mixed load of laundry that needed to be put away, I told myself I only need to put away the socks and underwear today. Then tomorrow I put away the shirts. The next day, fold pants, and the next everything else that goes on hangers. These smaller tasks only take like 5-10 minutes each, and it’s satisfying to see the pile of clothes dwindle every day versus sit there ominously for several weeks. If you’re feeling overwhelmed, break up your tasks into very small, easily attainable goals. Go easy on yourself and do what you can for the day. Even just the tiniest amount of progress is a good thing.,great advice. ​ Anytime you get anxiety over a task or a situation seems to complex or overwhelming. Just break in down into manageable pieces. Doing SOMETHING is always better than nothing even if it seems like too little or not enough or w/e.,I saw a meme about ‘anything worth doing is worth doing badly’ that addresses this. I try and remember that some days. Us perfectionists want to always do 100%. But in a lot of things (not everything, obviously, just as a general rule) doing 50% of the job, or 90% of the job, is way better then the 0% of the job we do because of that crippling dedication to doing 100%. Not an excuse for doing bad jobs on the stuff that really matters, but can be a much healthier way to approach doing general day-to-day stuff…

Topic 4

ssris 0.027, antidepressant 0.024, effect 0.024, drug 0.022, side_effect 0.020, depression 0.019, serotonin 0.016, prescribe 0.014, treat 0.013, ssri 0.012

Reddit post: https://www.reddit.com/r/depressionregimens/comments/bheg7d

Topic probability: 0.64

Hey y’all, this is a repost of the stickied post made by /u/jugglerofworlds, who appears to have deleted their account and their post along with it. I’ve edited it a little and will continue to keep it updated as needed. Suggestions are welcome. As the former post was, I’m trying to keep this confined to prescription medications, and not natural/herbal remedies (though I recognize that they definitely can be helpful means of treatment). I’m also typically avoiding medications that have been withdrawn from the market and thus aren’t really prescribed. In a future revision of this post I hope to add an additional column featuring which medications are available where, as some of these are approved in European countries but not in the U.S., and vice versa. # Icon key * ✔️ = approved to treat condition by a regulatory agency (FDA, EMA, ANSM, etc) * ➕ = approved as an adjunct treatment by a regulatory agency, to be used in combination with other medications to treat a condition (may or may not be used off-label as a monotherapy) * 🏷️ = Off label use; widely prescribed for condition but not necessarily rigorously studied for it * ⚠️ = experimental medication; in FDA Phase III trials or pending approval # Selective Serotonin Reuptake Inhibitors (SSRIs) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |citalopram|Celexa|✔️|🏷️| |escitalopram|Lexapro|✔️|✔️| |fluoxetine|Prozac|✔️|✔️| |fluvoxamine|Luvox/Luvox CR|✔️|✔️| |paroxetine|Paxil/Paxil CR|✔️|✔️| |sertraline|Zoloft|✔️|✔️| # Serotonin Modulator and Stimulators (SMS) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |vortioxetine|Trintellix|✔️|🏷️| |vilazodone|Viibryd|✔️|🏷️| # Serotonin-Norepinephrine Reuptake Inhibitors (SNRIs) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |venlafaxine|Effexor/Effexor XR|✔️|✔️| |desvenlafaxine|Pristiq|✔️|🏷️| |duloxetine|Cymbalta|✔️|✔️| |milnacipran|Savella|✔️|✔️| |levomilnacipran|Fetzima|✔️|🏷️| |atomoxetine|Strattera|⚠️|⚠️| # Tricyclics (TCAs) ## TCAs with a preference for serotonin |Generic name|Brand name(s)|Treats depression|Treats anxiety|…

Topic 5

treatment 0.035, ketamine 0.028, year 0.022, work 0.021, drug 0.017, hope 0.015, hear 0.012, lithium 0.011, people 0.010, infusion 0.009

Reddit post: https://www.reddit.com/r/depressionregimens/comments/axtnj8

Topic probability: 0.58

https://www.washingtonpost.com/health/2019/03/06/biggest-advance-depression-years-fda-approves-novel-treatment-hardest-cases ​ The Food and Drug Administration approved a novel antidepressant late Tuesday for people with depression that does not respond to other treatments — the first in decades to work in a completely new way in the brain. The drug, a nasal spray called esketamine, has been eagerly anticipated by psychiatrists and patient groups as a powerful new tool to fight intractable depression. The spray acts within hours, rather than weeks or months as is typical for current antidepressants, and could offer a lifeline to about 5 million people in the United States with major depressive disorder who haven’t been helped by current treatments. That accounts for about one in three people with depression. “This is undeniably a major advance,” said Jeffrey Lieberman, a Columbia University psychiatrist. But he cautioned much is still unknown about the drug, particularly regarding its long-term use. “Doctors will have to be very judicious and feel their way along,” he said. The label for the drug will carry a black box warning – the most serious safety warning issued by the FDA. It will caution users they could experience sedation and problems with attention, judgment and thinking, and that there’s potential for abuse and suicidal thoughts. People who take esketamine will have to be monitored for at least two hours after receiving a dose to guard against some of these side effects…

Topic 6

work 0.053, anxiety 0.030, mg 0.025, bad 0.020, high 0.020, vitamin 0.018, diet 0.015, supplement 0.014, post 0.012, literally 0.011

Reddit post: https://www.reddit.com/r/depressionregimens/comments/alh4r3

Topic probability: 0.52

About 3 or 4 years ago, I developed a severe form of anxiety disorder where it manifested in panic attacks characterized by intense bouts of nausea, gagging, and retching. It didn’t usually get bad enough to get to vomiting, though it did in a few instances (in which I went to the hospital afterwards). My body responds to stress naturally by gagging and nausea. So imagine being anxious all the time but also NAUSEOUS 24/7, and I mean literally 24/7 without any respite. At times I was seriously considering suicide because of how bad I felt all the time every day. The whole thing started I think because I had to present at a large conference with thousands of people in attendance, and I had a very bad experience being insulted by some people at a previous iteration of this conference years ago. I was commuting to work one day (before the conference) and suddenly got this massive bout of nausea where I felt like I was dying. I realized however that this was my body telling me I have stagefright. I expected my nausea to evaporate once I finished speaking, as it usually would have in the past. Except that it didn’t. It stayed, and remained with me for years. I tried everything but avoided antidepressants for the longest time due to the bad rep they get. I tried the following medications: * Ginger – in various forms – for nausea (didn’t work) * Peppermint – in various forms – for nausea (didn’t work) * Ondansetron (zofran) – 4 mg; as needed – for nausea (didn’t work) * Chlordiazepoxide/clidinium bromide (librax) – 5 mg; once daily – for nausea and anxiety (didn’t work) * Pyridoxine/doxylamine (diclectin) – 10 mg pyridoxine, 10 mg doxylamine; 2 tablets at bedtime – for nausea (didn’t work) * Metoclopramide – 1 tablet daily – for nausea (didn’t work) * Domperidone – 10 mg; once daily – for nausea (didn’t work) * Propranolol – 10 mg; twice daily – for anxiety (didn’t work) * Prochlorazapine – 10 mg; twice daily – for nausea (didn’t work) * Lorazepam (Ativan) – 1 mg; 1 tablet at bedtime – for anxiety (didn’t work; just made me really sleepy) * Pantoprazole (Tecta) – 1 tablet daily – for nausea (didn’t work) * Dimenhydrinate (Gravol) – 1 tablet as needed – for nausea (didn’t work) * Nabilone (cesamet) – 0.5 mg as needed – for nausea (worked for nausea but not anxiety, and gave me a really uncomfortable high) * Clomipramine (Anafranil) – 10 mg. once daily – for anxiety (didn’t try properly due to side-effects) I was afraid even of getting out of my own house. I was afraid of meeting people. I was afraid of leaving my own room – the only place where I felt somewhat at ease and the nausea wasn’t THAT bad. The only thing that worked somewhat to relieve the nausea was chewing on things, whether that meant food at mealtimes, or fennel seeds, or sucking on mints/cough drops. So I carried mints and fennel seeds with me at all times no matter where I was – including in the washroom in my own house and even when I wanted to take a shower I had to have them nearby otherwise I would literally throw up in the shower. But these were not long-term cures to my problem and only a short alleviation of the symptoms (and not that effective if I was more anxious than usual). I somehow graduated from university with a degree in neuroscience and fought through this nausea-anxiety for 2 years doing so. My graduation ceremony – which was supposed to be a happy occasion – was marred by constant nausea and me going through at least 3 entire tins of mints because my body handles excitedness the same way as it does for anxiety. Literally nothing was working and I was at my wit’s end. So I went downtown Toronto and bought CBD oil from a dispensary. I only did this because I was literally desperate, even though I had never done any recreational drugs in my life upto that point (except caffeine), and even though I had a horrible experience with nabilone (synthetic THC for cancer patients to reduce their nausea) so I was really kind of anxious about even using that. But it worked…