<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[PsyAI - Medium]]></title>
        <description><![CDATA[We are passionate about Psychology and Machine Learning. The blog posts in this publication are the results of our spirited discussions that involve recurring patterns common across both the fields. - Medium]]></description>
        <link>https://medium.com/psyai?source=rss----ffccbcea49c2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>PsyAI - Medium</title>
            <link>https://medium.com/psyai?source=rss----ffccbcea49c2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:16:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/psyai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ERNIE 2.0: An Article to (hopefully) Answer All Your Questions]]></title>
            <link>https://medium.com/psyai/ernie-2-0-an-article-to-hopefully-answer-all-your-questions-b5df21a64090?source=rss----ffccbcea49c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/b5df21a64090</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Royal Sequeira]]></dc:creator>
            <pubDate>Sat, 07 Sep 2019 15:45:22 GMT</pubDate>
            <atom:updated>2019-09-07T15:52:03.158Z</atom:updated>
            <content:encoded><![CDATA[<h3>ERNIE 2.0: A CONTINUAL PRE-TRAINING FRAMEWORK FOR LANGUAGE UNDERSTANDING</h3><p>Written by <a href="https://medium.com/u/419d5ec564b7">Royal Sequeira</a></p><p>Existing language representation models like word2vec, BERT, XLNet etc., are based on the co-occurrence of tokens or sequences. Language, however, is more complex than that. It contains features that are not captured by just co-occurence counts! ERNIE 2.0 provides a framework to learn to better represent language by using a suite of lexical, syntactic, and semantic pre-training tasks.</p><h3>Background:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cd5voqZDi1OTfhRX" /><figcaption>Multitask Learning</figcaption></figure><p>One of the important tasks in NLP is to learn a generalized representation of language in such a way that it can be used for all the downstream tasks (such as Sentimental Analysis, Named Entity Recognition). Representations learned only on one task, say text classification, may not be useful other tasks such text-pair similarity. One of the ways to attain generalization is to perform multitask learning,</p><p>Multitask learning is learning on a large amount of data across tasks to represent language better. In the figure above, for example, you see an encoder shared across tasks. Each task has its own architecture but will use the same shared encoder to represent language. During the training phase, the first task will be trained on a mini-batch of data corresponding to the first task. Based on the first task loss, the shared encoder will be updated. When the second task is trained, it will use this shared encoder to represent the input sequence from the mini-batch corresponding to the second task, learn on it, and then update the shared encoder based on the loss. Essentially, all tasks take turns to learn on their mini-batch of data, and update the shared encoder based on the loss. The trouble with this approach of multi-task learning is that the weights in the shared encoder can be affected by the introduction of new tasks, leading to catastrophic forgetting (the updates learned from previous tasks are forgotten drastically).</p><blockquote>The objective, however, is to improve on new tasks without forgetting what is learned from previous tasks — just like human beings would not forget skating when they learn how to ski. This is known as Continual Learning.</blockquote><p>Multitask learning is advantageous for two reasons: 1) It acts as a regularizer by forcing the shared encoder learn to generalize for all tasks 2) It can make use of a lot of data across tasks.</p><h3>ERNIE 2.0 Framework</h3><p>The way ERNIE 2.0 addresses the problem of catastrophic forgetting is to train several tasks in parallel, and update the shared encoder based on the average</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jysJpLlM549QJTwC" /><figcaption>Sequential Multitask Learning</figcaption></figure><p>loss from all the tasks:</p><p><strong>Step 1: </strong>Only Task 1 is learned in this step. The input sequence is represented through the shared encoder, and the weights of the encoder are updated on the loss from Task 1.</p><p><strong>Step 2: </strong>The shared encoder is initialized with weights from the previous step, and Task 1 and Task 2 both are learned simultaneously in this step. Since the shared encoder is already learned on Task 1, its loss will mostly be updated with respect to Task 2, thereby retaining what is learned from the previous task.</p><p><strong>Step 3: </strong>Once both tasks are done computing their loss per batch, their average loss will be calculated, based on which the shared encoder will be updated. Both tasks are trained to continue until all the mini-batches are exhausted.</p><p><strong>Step 4: </strong>The shared encoder is initialized with weights from the previous tasks, and Task 1, Task 2, and Task 3 are trained in parallel in this step. Since the encoder is already learned on Task 1 and 2, the loss will mostly be driven by Task 3, helping the encoder to learn represent data from all three tasks.</p><blockquote>Therefore, this is the major contribution of ERNIE 2.0: it provides a framework for continuous incremental multitask learning where you can add your own set of pre-training training tasks.</blockquote><p>Pre-training tasks generally use a large amount of data, and construct unsupervised or weakly-supervised tasks from them. This weakly-supervised data is then used to learn the language representation of the model.</p><p>ERNIE 2.0 also provides a set of pre-training tasks by cleverly constructing a labeled dataset from a large amount of unlabeled data. All the tasks are classification tasks and are framed as follows:</p><p><strong>Word-aware pre-training tasks: </strong>These tasks help the models to learn the word representation better. There are three different tasks under this setting:</p><ul><li><strong>Knowledge Masking Task:</strong> In this setting, a words or a named entity or phrase is masked, and the model classifies the masked word(s) into word from the vocabulary size.</li><li><strong>Capitalization Prediction Task: </strong>The model predicts whether a word is capitalized or not. This is helpful for downstream tasks like Named Entity Recognition.</li><li><strong>Token-Document Relation Prediction Task: </strong>For each word in a segment, say, “A meme is an idea, or a behaviour, ….”, the model tries predict whether the word appears elsewhere in other segments in the original document. The assumption is that if the word does appear in other segments, it must be an important word and might be capturing the theme of the document. This helps the model to learn how important is a word for explaining the document.</li></ul><p><strong>Structure-aware Pre-training Tasks: </strong>These set of tasks help the model learn the relationship between sentences in a document.</p><ul><li><strong>Sentence Reordering Task: </strong>In this task, a paragraph is broken into several segments and are shuffled. The model reorders the shuffled segments into the original paragraph.</li><li><strong>Sentence Distance Task: </strong>The model classifies if two sentences are adjacent to each other, in the same document, or in two different documents.</li></ul><p><strong>Semantic-aware Pre-training Tasks: </strong>In this task, semantics of sentences are learned.</p><ul><li><strong>Discourse Relation Task: </strong>Consider this sentence, “I took my umbrella this morning. <em>[because] T</em>he forecast for rain was in the afternoon”. Here <em>because</em> is the discourse marker. The task is to identify the discourse marker. In the process, the model will have to learn the contrast between the two sentences, and hence their semantics.</li><li><strong>IR Relevance Task: </strong>Given a pair of user query and document, the task is to identify whether the document is strongly-relevant, weakly-relevant, or irrelevant to the user query. The dataset is constructed based on Baidu’s search engine logs. That is, if a user clicked on a document that had query words in its title, it would imply strong relevance. However, if a user did not click on a document despite containing query words, that would imply weak-relevance. Finally, if the document title did not contain query words, it would mean irrelevance. This task helps the model learn the semantics of the query with respect to the document title.</li></ul><h3>Experiments</h3><p>The experiments were conducted on English and Chinese datasets. In order to compare with <a href="https://arxiv.org/pdf/1810.04805.pdf">BERT</a>, two versions of ERNIE 2.0 models are built: base and large. The base and large model uses 48 and 64 NVidia v100 GPU cards respectively.</p><p>For English, tasks from <a href="https://gluebenchmark.com/leaderboard/">GLUE</a> were used. Chinese included 9 different tasks (Reading Comprehension, Sentimental Analysis etc.,). Refer the <a href="https://arxiv.org/pdf/1907.12412.pdf">paper</a> for specific details about the experiments.</p><h3>Results</h3><p>ERNIE 2.0 outperforms BERT and XLNet on <a href="https://gluebenchmark.com/leaderboard/">GLUE</a> with about 3 points improvement in the GLUE score over BERT (83.6). It also outperforms BERT and ERNIE in all the 9 tasks, attaining state-of-the-art results for all tasks.</p><p>Recently, I gave a presentation on <a href="https://arxiv.org/abs/1907.12412">ERNIE 2.0</a> at <a href="https://aisc.ai.science/">AISC, Toronto</a>. This blogpost is based on the paper. Here are the link to the <a href="https://docs.google.com/presentation/d/13HI9YwkZRLhBErElrNAmmWRx9QijveXOorS6p9r7TIA/edit?usp=sharing">slides</a> and the <a href="https://youtu.be/8K1IX7VJ5Fc">presentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7s8kqbMkx0Ncyf1czxxrhw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5df21a64090" width="1" height="1" alt=""><hr><p><a href="https://medium.com/psyai/ernie-2-0-an-article-to-hopefully-answer-all-your-questions-b5df21a64090">ERNIE 2.0: An Article to (hopefully) Answer All Your Questions</a> was originally published in <a href="https://medium.com/psyai">PsyAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Should You Be Worried If You’re Getting Everything Right All the Time]]></title>
            <link>https://medium.com/psyai/why-should-you-be-worried-if-youre-getting-everything-right-all-the-time-5020383abdbb?source=rss----ffccbcea49c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/5020383abdbb</guid>
            <category><![CDATA[bias]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[confirmation-bias]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Royal Sequeira]]></dc:creator>
            <pubDate>Wed, 14 Aug 2019 04:05:37 GMT</pubDate>
            <atom:updated>2019-08-16T01:37:36.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why You Should You Be Worried If You’re Getting Everything Right All the Time</h3><p>Written by <a href="https://medium.com/u/2eca2e4984ff">Josh Doidge</a> and <a href="https://medium.com/u/419d5ec564b7">Royal Sequeira</a></p><p>Remember the last time you found yourself in the middle of a heated discussion with a friend saying something like, “Paddington Bear is the best movie of all time!” Just when you were about to lose the argument, you managed to pull up a nondescript article from Google that remotely proved your point. Sure, you may have silenced your friend into a confused stupor, but were you really right? We’ve noticed in our research and studies that people <em>think they are right all the time</em>. We think this is a disconcerting trend, and something that requires your attention.</p><p>Humans, by nature, have inherent biases. Biases (or heuristics) are rules of thumb or shortcuts we use. Unlike certain rules of thumb, biases contain systematic errors in our decision making and judgments as well as remembering our past and emotions. We use biases to simplify and understand the infinitely complex world. In the process, we fall prey to them because of our limited cognitive resources<em>, which </em>get used up very quickly. While there is nothing illogical about using heuristics and biases, these biases can close us off to what’s really happening in the world.</p><p>One bias that is particularly important in clinical psychology is called the <em>confirmation bias</em>. Confirmation bias is where you look for information that already confirms the theory or existing beliefs you have. Confirmation bias is particularly deadly <em>because we never seek information that disproves our belief</em>s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bxp5DjVyGt3Co94FA2erEg.jpeg" /></figure><p><a href="https://en.wikipedia.org/wiki/Jean_Piaget">Piaget</a>, one of the most influential developmental psychologists of all time, had a theory of assimilation and accommodation for how we represent the world. Assimilation involves incorporating new information or experience into an existing framework or existing ideas. Accommodation is the opposite: it is the process by which old ideas or schemas are altered, or new schemas are developed as a result of new beliefs. In order to function in the world, we need both assimilation and accommodation.</p><p>A person who believes they get everything right is a person who no longer engages in any active serious accommodation, and they seek to hear the same story over and over. We tend to rely heavily on confirmation bias while forming our narratives. Have you ever come up with a story that explains all the tragedies and imagined tragedies that befall you in your life? Even as your friends and loved ones challenge you about some part of the narrative or try to poke holes in it, you insist that it is immutable? This would be an example of confirmation bias as well as assimilation.</p><p>Confirmation bias makes it hard for people to learn new things, gain insight into themselves, or other people because they just seek information they already know. They might also choose to hang out with people with the same political views or ideology, to confirm what they already know and believe. We see this so often in a fractured polarized political sphere: Left vs Right. Confirmation bias leads us to minimize the issues and the imperfections of our own theories and beliefs, but this cannot lead to real conversation or engagement.</p><p>Can Artificial Intelligence help us overcome confirmation bias? With advances in Artificial Intelligence, you might wager that an AI system, more intelligent than humans, would be able to solve the confirmation bias problem. That is, in the hypothetical future, we might trust an unbiased agent to arbitrate our minds’ conundrums. This type of agent needs to have two desirable properties: a higher form of intelligence than humans and impartiality. But, can an AI agent possibly be unbiased?</p><p>Before we can answer that question, we must briefly review how AI systems currently work. All AI agents (also known as models) either teach themselves how to perform a task, or are trained by human beings. The former type of learning is called unsupervised learning, and the latter is known as supervised learning. To differentiate these two forms of learning, consider the task of classifying whether a tumour is benign or malignant. In a supervised learning setting, a human expert (a radiologist in this case), labels a series of tumour images as malignant or benign. In an unsupervised learning setting, the agent looks at a series of images and autonomously learns whether an image is benign or not.</p><p>Generally, unsupervised learning is preferred over supervised learning as it does not require a manual labelling process. Manual labelling can be very expensive since it requires domain expertise. Moreover, it can also induce human biases, and therefore an unsupervised learning is preferred for tasks that are sensitive to bias.</p><p>How do we know whether an AI agent is performing well on the given task? A performance metric (such as accuracy and speed) always accompany a given task. The changes in the metric serve as a feedback mechanism for the agent to perform better on the task. The metric, however, can turn out to be a problem. <a href="https://en.wikipedia.org/wiki/Goodhart%27s_law">Goodhart’s law</a> states that “when a metric becomes the target, it ceases to be a good metric”.</p><p>In our daily lives we see examples that adhere to this law: sales people trying to sell products at higher discounts so as to meet their monthly targets or students memorizing text without understanding it so as to score well on a test.</p><p>AI models are not an exception to this law either. In supervised learning, supposing that 99% of the tumours in the labelled dataset are benign, the model might learn to predict all tumours to be benign. Although this model is foolish, it is extremely accurate! Since we care more about correctly identifying malignant tumours, this “all-benign” model will serve no practical purpose.</p><p>Similarly, in the unsupervised learning setting, a model might selectively pick data points that helps it achieve a higher performance metric. If it is known that in the real-world, 99% of all tumours are benign, the model might discard all instances of malignant tumours in the dataset. It might selectively pick benign cases of tumours so as to attain a higher performance metric in the real world, thereby inducing confirmation bias into the system. Even in an ideal unsupervised learning setting, the agent can demonstrate confirmation bias.</p><p>Confirmation bias is harmful for so many of us because it prevents us from updating our model of the world. An actual map of the world is almost never an accurate representation of the world’s terrain. A good cartographer understands that the mapping is not the same as the actual forests, oceans, and mountains, and will seek to improve the model by facing what they got wrong. A lazy cartographer, seeking to confirm their bias, will simply find reasons why their model is right.</p><p>Don’t get us wrong! We all want to get our models right all the time. But chances are if you have a model that is predicting something with 100% accuracy, it is not accounting for certain types of data or information. The model likely does not adequately look at information that disconfirms itself, either. This is why it is so important to get the model right most of the time and be okay with being wrong some of the time</p><p>Currently, the Artificial Intelligence community addresses the bias problem by evaluating a model on several metrics. Yet, biases can still find their way into models through various sources, such as the origin of the dataset or the choice of metrics (humans still get to decide the metrics!). At the same time, as AI models are becoming more advanced, they are also becoming increasingly uninterpretable. If we can’t interpret the model, we might never know if it has become truly unbiased.</p><p>What we can do, however, is be aware of our confirmation biases and learn to avoid them. As the age-old aphorism goes, “know thyself!”. One of the most effective problem-solving strategies, or ways to improve on an argument, while looking at the world more effectively, is seeking out information <em>for why you are wrong</em>. Or seeking out <em>information to disconfirm your hypothesis not just confirm</em> it. Doing this simple step can be <em>life-altering.</em></p><p>If you’re a person willing to disconfirm your beliefs, your theories, and accept you are not right about everything (the wisdom traditions call this humility), your models will adapt in manageable ways allowing you to make small important changes that can bring about a big difference in your life!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5020383abdbb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/psyai/why-should-you-be-worried-if-youre-getting-everything-right-all-the-time-5020383abdbb">Why Should You Be Worried If You’re Getting Everything Right All the Time</a> was originally published in <a href="https://medium.com/psyai">PsyAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>