<?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[Stories by Cemre Biltekin on Medium]]></title>
        <description><![CDATA[Stories by Cemre Biltekin on Medium]]></description>
        <link>https://medium.com/@cemre.biltekin?source=rss-9616eeb5ecfd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gbvA4xN1INHxEDIJvLp4wg@2x.jpeg</url>
            <title>Stories by Cemre Biltekin on Medium</title>
            <link>https://medium.com/@cemre.biltekin?source=rss-9616eeb5ecfd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:40:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cemre.biltekin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Should You Take Language Models As All-Knowing?]]></title>
            <link>https://medium.com/@cemre.biltekin/should-you-take-language-models-as-all-knowing-d08ec0d25a60?source=rss-9616eeb5ecfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d08ec0d25a60</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[grounding]]></category>
            <category><![CDATA[pangu]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[Cemre Biltekin]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 01:20:49 GMT</pubDate>
            <atom:updated>2024-03-07T01:22:28.506Z</atom:updated>
            <content:encoded><![CDATA[<h3>Should You Take Language Models As All-Knowing? Here’s How “Pangu” Solves Grounding to Real-World Environments Problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*NSTqjdDHEY7tcSH1" /></figure><p>If you are both a cinephile and an artificial intelligence (AI) enthusiast like me, perhaps you are familiar with Hollywood-famous AI like the omniscient HAL 9000, brilliant droid C-3PO, or obliging Samantha from <em>Her. </em>Being all very advanced and knowledgeable in their interactions with surroundings/real-world environments, one cannot help but wonder if today’s state-of-the-art large language models (LLMs) like GPTs similarly have achieved the trait of universality. To answer that, we need to think about the ideal scenario where we would interact with our famous AIs. I would at least expect our conversation to refer to the facts of the real world and strive closer to being a universal machine to adapt to specific use-cases. It should not rely solely on its trained vast yet limited to a certain point of time knowledge as if it were an outdated database nor I would prefer it to hallucinate and generate ungrounded responses that need to be fact-checked. If you have used ChatGPT (who hasn’t, really?) or Gemini (formerly known as Bard), you might have noticed the latter phenomenon, hallucination, is a pretty occurrent fault that makes the model generate seemingly sound responses that are in no way representing the reality. Another critical point could be holding unnatural conversations.</p><p>Let us get the help of experts in conversing to understand how we respond to utterances: How do we, <em>humans</em>, experience the natural language that makes our conversations sound natural and relevant?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*GqeHEhzdeuFT1vq_OiDsaQ.png" /><figcaption>Fig. 1: Clues of context as sources of information for a unique environment</figcaption></figure><p>We take in more information than the literal utterance and not only interpret the utterance itself but more: we might assess our relationship with the one conversing, we might gather what we know about this person, or even consider the physical space we occupy. Basically, our source of information is not limited to what was said to us. We derive knowledge from the real-world environment because we need context to assess our unique environment/use-case and understand and generate the natural language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*3mTU71KeTRNjCgezLcY9JQ.png" /><figcaption>A fun caricature on showing context-dependence in natural language understanding</figcaption></figure><p>Context-dependence is not the only hurdle. Let us circle back to Samantha, our beloved AI assistant from <em>Her, </em>and analyze her first sentence.</p><blockquote>Hello I’m here.</blockquote><p>Could you decipher what <em>I</em> refers to in this utterance? What if we start with an easier demonstration of the indexicality problem in natural language understanding:</p><blockquote>I am Samantha.</blockquote><p>Here, we can guess that <em>I</em> refers to Samantha. How about the previous example? What does <em>here</em> refer to? It could be the PC that Samantha operates in, the office building, the Earth… You got the picture.</p><p>These two phenomena were just two examples to think about what might be causing complications in natural language understanding and making the job of language models (LMs) not so easy. Finally, we are ready to take a look at the research paper “<em>Don’t Generate, Discriminate: A Proposal for Grounding Language Models to Real-World Environments” </em>and coin the important term of this post together with the paper’s research question:</p><blockquote>How can LMs solve real life problems, which involve seeking information or taking actions in a specific environment, with natural language?</blockquote><p>Here, we need to find ways to solve <strong>grounding</strong> which is the fundamental problem.</p><h3>Grounding</h3><p>Grounding in the NLP field refers to associating concepts with contexts like a knowledge base or an image. One other definition that I find relevant is cognitive science’s take on it. It defines grounding as the process of establishing the necessary mutual information for successful communication, which in essence refers to staying relevant to the use-case.</p><p>To achieve grounding, there needs to be an executable plan in an environment to grant the desired response (goal) for the corresponding language task (utterance). However, there are a myriad of unique environments and their states, and also unique languages that come with the environments. The environments do not have to be static either; they can be constantly updated (dynamic).</p><h3>Related work and role of LM in the approaches</h3><p>Before we investigate how Pangu elevated the solution for the grounding problem and gave LM a different role in a framework, we need to review its predecessors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SnnLi71Qx7kcZV6QURL7YQ.png" /><figcaption>Fig. 2: Previous work on the grounding of LMs and how they situated the LM in the approach and its critical points</figcaption></figure><h4>Seq2Seq framework</h4><p>This framework has been the go-to choice for grounding LMs and the role of LM is to generate a plan given an input utterance without grounding during the pre-training. Consequently, the validity of the generated plans is not ensured. Input augmentation and constrained decoding have been proposed to solve the grounding problem in this framework, but these solutions require much data and still place LM’s role as the generator.</p><h4>Few-shot grounded language understanding with LLMs</h4><p>Few-shot learning, another framework that makes use of the generative ability of the LMs, describes the environment to LMs to provide context to achieve grounding. The drawback is that this does not work really well with complex environments where the description is hard to inscribe.</p><h4>Bottom-up Semantic Parsing</h4><p>This approach constructs a plan from subplans but is highly costly in instantiation due to requiring many ingredients and these often need to be found in the environment, so it is not possible to even instantiate everything in the beginning. Additionally, its scoring system requires many parameters and lacks an adaptive search process for plans.</p><p>One has to think about these drawbacks to come up with a better approach for grounding. The prevalent weakness in previous methods is <strong>giving the burden of generating to LMs</strong>. Thus, LM has to have knowledge about the environment and the environment-specific language. Moreover, this burden comes with great costs to ensure three criteria for LMs: <strong>grammaticality</strong>, <strong>faithfulness,</strong> and <strong>controllability</strong>.</p><p>Grammaticality: Plans must be conforming to the grammar of the language.</p><p>Faithfulness: Plans must be executable in the environment.</p><p>Controllability: The control over plans.</p><p>This is where Pangu comes to the rescue to free LMs from these responsibilities!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*IvYTPq6igZMEnqCCG8c6mA.png" /><figcaption>Fig. 3: The Pangu framework is composed of a symbolic agent, a neural LM, and environments</figcaption></figure><h3>Pangu: A generic framework for grounded natural language understanding</h3><p>The main difference of Pangu from the mentioned frameworks is the <strong>discriminative role of the neural LM</strong> instead of a generating role and the notion of the LM working together with a symbolic agent to find valid plans.</p><p>Only the symbolic agent has the burden of exploration of the environment and generates candidate plans, which are by the nature of the search process, guaranteed to be faithful and grammatical. The responsibility of ensuring the three criteria we visited are also passed on to the agent instead of the LM. Just as a reminder, a symbolic agent is an AI that processes symbols or concepts rather than numerical data.</p><p>LM only has the mission to discriminate valid candidate plans from invalid ones according to its evaluation of the plausibility of candidate-utterance pairs. It guides the search process and tells when to end the search.</p><p>Another striking feature of this framework, which you can see from Fig.3, is its ability to accommodate many LMs of different natures: BERT-base, Codex, T5-base, and more. Therefore, it is aimed that the framework can be used in many tasks with many unique (complex) environments in a flexible and adaptive way.</p><p>The only catch is the following <strong>assumption</strong>: any complex plan can be incrementally constructed with this search process in the environment by the agent.</p><h4>Pangu algorithm and KBQA task as a case study</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*SK50SHifX5sXvn6k51j0jw.png" /><figcaption>Fig. 4: Semantic graph for an utterance “What is Princess Leia’s home planet?” where q is an answer entity</figcaption></figure><p>As a case study, Pangu was instantiated for the knowledge base question answering (KBQA) task. The reasons are 1) it serves a massive environment (challenging for grounding) and 2) approaches with LM as a generator often fail at this task so it would be interesting to see how a discriminator role would change the outcome. KBQA task can be summarized as the task of finding a set of answer entities to an utterance from a database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwvCeGgBpKDnQyt1DRBBow.png" /><figcaption>Fig. 5: The process of exploring the environment and construction of a valid plan with environment-specific language</figcaption></figure><p>Let us look at the details of the way Pangu works (and why it works!):</p><ol><li>Candidate Plan Enumeration: The agent enumerates a set of candidate plans by exploring the environment. The exploration involves the discovery of entities and their relations.</li><li>LM-Based Scoring: LM scores the candidate plans and keeps the top-ranked plan (because the beam size is 1). The scoring method changes for every LM type. For example in Fig.5, you may see that the BERT-base model directly gets the score from the representation of the [CLS] token.</li><li>Termination Check: The termination check is very intuitive; when all the candidate plans for a time step <em>t</em> have less scores than the previous step <em>t — 1, </em>the best plan from <em>t — 1</em> is returned.</li></ol><p>There is also the learning component for fine-tuning and in-context learning with the neural LMs with KBQA datasets. Only Codex was used for in-context learning experiments. Now, let us take a closer look at the chosen datasets.</p><h4>KBQA Datasets</h4><ul><li><strong>GrailQA</strong>: It is a large scale dataset. It evaluates three levels of generalization which are independent and identically distributed (i.i.d), compositional, and zero-shot.</li><li><strong>GraphQuestions</strong>: It is a moderate scale dataset that evaluates the non-i.i.d. setting.</li><li><strong>WebQuestionsSP</strong>: It is a moderate scale dataset with questions from Google query logs that tests i.i.d. generalization.</li></ul><p><a href="https://dki-lab.github.io/GrailQA/">Strongly Generalizable Question Answering Dataset</a></p><p>As an interesting side note, you can find a leaderboard for models/frameworks that score the best on the GrailQA test set in the above link, and you can see that Pangu is the only multi-purpose generic framework in the leaderboard and it proudly sits on the second place. The others in the leaderboard are all KBQA task-specific models.</p><p>It is also worth noting that <strong>baselines</strong> like TIARA, ArcaneQA, DecAF, etc. used in the paper are all KBQA-specific models. It makes sense to compare Pangu’s performance with them within the boundaries of the KBQA task, but I am curious as to how it compares to another generic framework in different environments. Moreover, compared to these baselines, Pangu requires no extra parameter, no modification to the LM, and does not require a combination of LMs; all sounds like good traits!</p><h4>Revisiting the three criteria</h4><p>Hold on… We have given so much importance to the three criteria, so given the approach, how does Pangu (or rather, the symbolic agent that is involved) ensure that candidate plans are always grammatical and faithful? Giving examples from the KBQA task, grammaticality is achieved by the agent by always creating a valid (SQL-like) query by searching through the relations. Faithfulness is also easily achieved in the search process since the candidate plans are always executable in the environment and the agent cannot hallucinate an entity or relation that is not there.</p><h4>Results and discussion</h4><p>Let us take a look at the most striking findings from the results per dataset, starting with GrailQA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-3m7M29fpqvrCM0Ns0puw.png" /><figcaption>Fig. 6: Results on the large scale dataset, GrailQA</figcaption></figure><ul><li>Pangu achieves good zero-shot generalization compared to the baselines.</li><li>Take a look at different neural LMs accommodated by Pangu in Fig. 6. We can deduce that the larger the plugged LM is, the better the results are.</li><li>The only generalization Pangu is struggling with is i.i.d. settings. This is because LMs of Pangu does discrimination instead of generation and discrimination is an easier task than the latter. Thus, it converges way faster and overfits. Pangu is good at non-i.i.d. settings as it learns how to score the plausibility of utterance-candidate pairs but not how to generate a plan.</li></ul><p>These observations relate only to the fine-tuned LMs of Pangu. Now let us observe what interesting thing happens with in-context learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mlsxNpJIl6iu8XnEOsn0ug.png" /><figcaption>Fig. 7: Results on the moderate scale datasets, GraphQ and WebQSP</figcaption></figure><ul><li>We can see from all graphs that in-context learning performance is overall not impressive. However, if you take a look at the GraphQ results, even with 10-shot learning it proves to have better generalizability than the state-of-the-art baselines in a smaller-scaled dataset.</li><li>With both GraphQ and WebQSP as smaller datasets, we can see that the best fine-tuned LM of Pangu outperforms the state-of-the-art baselines. This implies that there is no need for too much data for Pangu to have grounded natural language understanding compared to others.</li></ul><p>The sample efficiency of Pangu is also greater because of the ease of burden on the LMs with the discriminative work. Additionally, Pangu has a global view thanks to using candidate <em>plans</em> instead of <em>tokens, </em>so it is less likely to make local errors.</p><h3>Pangu’s Success — What came after?</h3><p>Pangu separated its sample-efficient approach for the grounding problem into two with a discriminative neural LM and a symbolic search agent working together to achieve state-of-the-art results. One last question remains: Is it without faults?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*AVMqIIdjRaEM1AOY.gif" /></figure><p>The biggest drawback is Pangu’s inefficiency since the LM has to work iteratively to score candidate plans. Not to mention they included a <em>green check </em>for<em> </em>controllability in the scheme, but no concrete investigation was done since it falls irrelevant to the KBQA task. There is also a lack of experimentation for the few-shot setting with different types of prompts. Oops.</p><p>On a good note, they point to a better direction about the symbolic agent: The paper proposes a possibility that the symbolic agent can also respond to the LM with rewards based on its decisions. The use of reinforcement learning in grounding language models sounds exciting and like a promising direction!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1S59AlgLIT-y8fgVjNxY8A.png" /><figcaption>Fig. 8: The GLAM approach that makes use of online reinforcement learning in grounding language models</figcaption></figure><p>In fact, a latter research paper, “<em>Grounding Large Language Models in Interactive Environments with Online Reinforcement Learning”, </em>explores the GLAM approach that aligns the LM and the real-world environment with functional grounding. Consider an agent that will interact with the environment similar to Pangu, but this time LM is this agent’s policy that gets updated every time the agent interacts with the environment. The environment in the experimental setup is an interactive textual world, BabyAI-Text, and in the experiment the agent is given some simple navigation tasks. The reward is returned by the environment to fine-tune the LM (Pangu’s prophecy holds!) using Proximal Policy Optimization (PPO). Thus, together with the observations obtained by the agent, LM is grounded in this textual environment.</p><p>Some takeaways from GLAM:</p><ul><li>GLAM method can be used to solve reinforcement learning tasks better compared to supervised fine-tuning of the LM.</li><li>GLAM establishes a foundation for making LMs more aligned with the given environment with the emphasized use of online reinforcement learning.</li><li>Experiments are limited to the textual world and not the physical environment; so similarly to Pangu, the performance on other tasks and environments should be investigated.</li></ul><h3>Closing remarks</h3><p>The problem of grounding language models can even be extended and analyzed with multi-modal LMs like BuboGPT that enable visual grounding. In a fast-paced field like this, we are in luck to find progress within a blink!</p><p>What do you think about grounding LMs? How will they evolve? Well, I am looking forward to more updates! If you are interested in more details of the Pangu framework, please make sure to check <a href="https://arxiv.org/abs/2212.09736">it</a> out!</p><h3>References</h3><p>[1] K. R. Chandu, Y. Bisk, and A. W. Black, “Grounding ‘Grounding’ in NLP,” <em>Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021</em>, pp. 4283–4305, Aug. 2021. doi:10.18653/v1/2021.findings-acl.375</p><p>[2] “Grailqa,” Strongly Generalizable Question Answering Dataset, <a href="https://dki-lab.github.io/GrailQA/">https://dki-lab.github.io/GrailQA/</a> (accessed Dec. 13, 2023).</p><p>[3] Y. Shu and Z. Yu, <em>Data Distribution Bottlenecks in Grounding Language Models to Knowledge Bases</em>, Sep. 2023. doi:10.48550/arXiv.2309.08345</p><p>[4] T. Carta <em>et al.</em>, <em>Grounding Large Language Models in Interactive Environments with Online Reinforcement Learning</em>, Sep. 2023. doi:10.48550/arXiv.2302.02662</p><p>[5] Y. Zhao <em>et al.</em>, <em>BuboGPT: Enabling Visual Grounding in Multi-Modal LLMs</em>, Jul. 2023. doi:10.48550/arXiv.2307.08581</p><p>[6] Y. Gu, X. Deng, and Y. Su, “Don’t generate, discriminate: A proposal for grounding language models to real-world environments,” <em>Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)</em>, 2023. doi:10.18653/v1/2023.acl-long.270</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d08ec0d25a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>