<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://henrysyh2000.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://henrysyh2000.github.io/" rel="alternate" type="text/html" /><updated>2026-11-16T08:11:15+00:00</updated><id>https://henrysyh2000.github.io/feed.xml</id><title type="html">Yuanhao (Henry) Shen</title><subtitle>This is the official website of Yuanhao Shen, a PhD student at Queen&apos;s University Canada. This site is meant to be a personal blog, where I share my research, thoughts, and experiences in the field of artificial intelligence and NLP.</subtitle><author><name>Yuanhao (Henry) Shen</name><email>yuanhao.shen@queensu.ca</email></author><entry xml:lang="en"><title type="html">Research Notebook 00: Why I Keep This Research Notebook</title><link href="https://henrysyh2000.github.io/en/blog/research-notebook-2026-11-11-why-this-notebook/" rel="alternate" type="text/html" title="Research Notebook 00: Why I Keep This Research Notebook" /><published>2026-11-11T00:00:00+00:00</published><updated>2026-11-11T00:00:00+00:00</updated><id>https://henrysyh2000.github.io/en/blog/research-notebook-2026-11-11-why-this-notebook</id><content type="html" xml:base="https://henrysyh2000.github.io/en/blog/research-notebook-2026-11-11-why-this-notebook/"><![CDATA[<p>My reason for keeping this notebook is simple. I want a record.</p>

<p>My starting point is that a lot of research may never turn into a complete paper.</p>

<p>A while ago I read an interview with Terence Tao. As I remember it, he talked about why AI could destroy mathematics: when mathematicians try to prove or disprove a conjecture, the result is often not the point. New mathematical problems come up along the way, and those become directions worth studying.</p>

<p>I also listened to an interview Saining Xie did with Zhang Xiaojun a long time ago. One thing I found interesting is his line that research is an endless game. That fits with what Tao said. My own reading is that, at least for now, human thinking is more divergent than a model’s, in every sense. People have intuition, and models are weaker there.</p>

<p>Later I heard a senior engineer from Anthropic speak at a Physics AI panel at Stanford. The point was that before the models get stronger, we should think about what kind of research we should do. Everyone has seen what AI can do, but this is only the early part of an exponential, and what comes after is wide open. I feel honored to take part in thinking about where AI should be steered.</p>

<p>That is why I think my research process is worth keeping as a diary. My attempts may never become a paper, but they mean something, and they can be dug into further.</p>

<h2 id="how-this-notebook-works">How this notebook works</h2>

<p>The structure is simple: a short report each day.</p>

<p>I write the hypotheses I came up with that day on a whiteboard. The ones I have tested get crossed out, not erased. New ones go underneath. Some ideas just show up and I cannot explain why I thought of them, so I write them down as they came.</p>

<p>Then I pick one hypothesis and design an experiment for it, one experiment a day. I run it, report what came out, and end with a little insight.</p>

<p>Research is not only a dry process of hypotheses being falsified. It can also be quiet time to think. I once asked friends in my group about this, because I was curious what they do outside research. Some write poetry, some draw. For me, it is music. I put music on before I start thinking about hypotheses, and music is one of the places my ideas come from. So each entry ends with a song I was listening to that day.</p>

<p>I really like Phil Collins’s drumming. You can tell it is him right away. Today it was his “Another Day in Paradise,” a song that stays with me every time I hear it. He looks at life closely, and he has a lot of compassion. A day that feels plain and ordinary to us might be paradise for many people whose lives are harder. Thinking about that, I feel very lucky.</p>]]></content><author><name>Yuanhao (Henry) Shen</name><email>yuanhao.shen@queensu.ca</email></author><category term="research" /><category term="research-notebook" /><summary type="html"><![CDATA[My reason for keeping this notebook is simple. I want a record.]]></summary></entry><entry xml:lang="en"><title type="html">Research Notebook 02: Onset Distance</title><link href="https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-22-hidden-state-interventions/" rel="alternate" type="text/html" title="Research Notebook 02: Onset Distance" /><published>2026-10-22T00:00:00+00:00</published><updated>2026-10-22T00:00:00+00:00</updated><id>https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-22-hidden-state-interventions</id><content type="html" xml:base="https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-22-hidden-state-interventions/"><![CDATA[<p>This entry tests the second hypothesis on the whiteboard.</p>

<h2 id="hypothesis-whiteboard">Hypothesis whiteboard</h2>

<ol>
  <li><del>Trajectory amplitude: when the model writes an analogy, its hidden-state trajectory swings wider than when it writes a literal restatement.</del> Tested in 01: it holds, but only as an observation.</li>
  <li><strong>Onset distance: the farther a sentence’s opening internal state is from those of the earlier sentences, the newer its wording.</strong> ← tested today</li>
  <li>Neuron labelling: picking from a human label pool first, then letting the model propose its own labels for what is left, can give most neurons a concept label.</li>
  <li>Farther means more diverse: the farther the hidden state is pushed, the more diverse the output. (new)</li>
  <li>Where you push matters more than how far: pushing along a concept direction increases diversity more than pushing equally far in a random direction. (new)</li>
</ol>

<p>The two new ones are left over from the last entry. The difference in amplitude is there, but whether diversity depends on how far the state travels or on where it drifts, a figure cannot tell. I want to intervene with steering and look at the two separately, so they go on the whiteboard first.</p>

<p>The second hypothesis is a guess I already had during earlier exploration. Ask the model for several analogies in a row on the same sentence. If the opening internal state of one sentence is farther from the openings of the earlier ones, its wording should be newer.</p>

<h2 id="experiment">Experiment</h2>

<p>Looped generation on three datasets under four analogy conditions. For each sentence I take the minimum distance from its onset state to the onset states of all earlier sentences, then correlate that with the sentence’s lexical novelty relative to the earlier sentences. How large a correlation counts was fixed in advance.</p>

<h2 id="result">Result</h2>

<p>On every dataset and under every condition, the correlation clears the line that was fixed in advance.</p>

<div class="nb-chart" data-nb-chart="onset-correlation">Interactive chart: correlation between onset distance and lexical novelty.</div>

<h2 id="insight">Insight</h2>

<p>The correlation is there, but I would not say the hypothesis holds.</p>

<p>One gap is still open. The later a sentence comes, the more earlier sentences there are to compare against, so onset distance and lexical novelty may simply both be moving with the round.</p>

<p>Also, I chose this measure after looking at earlier exploratory results, and this run used the same stories, so it does not count as an independent confirmation.</p>

<p>So I cross this one out on the whiteboard for now, with a note next to it: correlation only. To close the gap I need to control for the round and the number of comparable sentences and compute it again.</p>

<p>The chart shows real values. Parameter settings and raw examples stay in my private notes.</p>]]></content><author><name>Yuanhao (Henry) Shen</name><email>yuanhao.shen@queensu.ca</email></author><category term="research" /><category term="research-notebook" /><category term="analogy-generation" /><summary type="html"><![CDATA[This entry tests the second hypothesis on the whiteboard.]]></summary></entry><entry xml:lang="en"><title type="html">Research Notebook 01: Where Does Diversity in Analogy Generation Come From?</title><link href="https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-21-analogy-diversity/" rel="alternate" type="text/html" title="Research Notebook 01: Where Does Diversity in Analogy Generation Come From?" /><published>2026-10-21T00:00:00+00:00</published><updated>2026-10-21T00:00:00+00:00</updated><id>https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-21-analogy-diversity</id><content type="html" xml:base="https://henrysyh2000.github.io/en/blog/research-notebook-2026-10-21-analogy-diversity/"><![CDATA[<p>First, why I want to study diversity in analogy. It started with conversations with my advisor, who said that making analogies is a core part of human cognition and recommended a book, <em>Surfaces and Essences: Analogy as the Fuel and Fire of Thinking</em> by Hofstadter and Sander. My advisor also pointed me to Peter Turney’s <a href="https://arxiv.org/abs/1309.4035">Domain and Function</a>.</p>

<p>Turney separates two kinds of similarity. Similarity of topic and context is domain; similarity of role and relation is function. Take <code class="language-plaintext highlighter-rouge">carpenter : wood :: mason : stone</code>. Carpenter and wood, mason and stone: each pair belongs together in its own context, and that is domain. Carpenter matches mason and wood matches stone by the role they play, and that is function.</p>

<p>My advisor’s idea was that our core question sits right here: when a model makes an analogy, how does it settle on domain and function? We have been exploring that question ever since. Following that thread, we took a look at techniques from mechanistic interpretability, from sparse autoencoders at the start to the many kinds of lenses now, and even self-explanation, where the model explains itself. In the end the question boils down to one thing: I still want to look at the model’s internal trajectory.</p>

<p>The concrete task: give the model a sentence and ask for another sentence with a similar structure in a different setting. The model’s habit is to keep circling the same few domains. Push it to be diverse and the relation in the original sentence tends to get lost. I want to know where diversity comes from inside the model.</p>

<h2 id="hypothesis-whiteboard">Hypothesis whiteboard</h2>

<ol>
  <li><strong>Trajectory amplitude: when the model writes an analogy, its hidden-state trajectory swings wider than when it writes a literal restatement.</strong> ← tested today</li>
  <li>Onset distance: the farther a sentence’s opening internal state is from those of the earlier sentences, the newer its wording.</li>
  <li>Neuron labelling: picking from a human label pool first, then letting the model propose its own labels for what is left, can give most neurons a concept label.</li>
</ol>

<p>The first one came from a figure. Take one model and one story, link the hidden states of every layer into a trajectory as each token is generated, and project it onto a plane. When the model writes an analogy, the trajectory swings wider than when it writes a literal restatement. I spent this evening looking at that figure. But it is one story, so the first thing is to check that it is not a coincidence.</p>

<p>The other two were already under way. They go on the whiteboard now, and I will take them one at a time.</p>

<h2 id="materials">Materials</h2>

<p>The pilot experiments mainly use two models: LLaMA 3.1 8B Instruct and Gemma 2 9B Instruct. The stories come from three analogy datasets. This section appears only in this first entry.</p>

<h2 id="experiment">Experiment</h2>

<p>Forty stories on LLaMA. Each story has one analogy sentence and one literal restatement, and I compare the mean step size of the two trajectories as a pair. This is observation only; the model is not touched.</p>

<h2 id="result">Result</h2>

<p>In 39 of the 40 stories the analogy has the larger step, about 9% larger on average. What the figure showed was not a coincidence.</p>

<div class="nb-chart" data-nb-chart="step-amplitude">Interactive chart: trajectory step size for the first analogy sentence and the literal restatement.</div>

<h2 id="insight">Insight</h2>

<p>This only shows that the two kinds of generation look different inside the model. Where I am stuck: does the amplitude also affect the quality and the diversity of the output? How do I connect what I see in the figure to the output causally? Step size is not a quality score, and it is not a diversity score.</p>

<p>Thinking further, amplitude may not be what matters. The trajectory may simply have drifted toward other concepts. Whether diversity depends on how far the state travels or on where it drifts, the figure cannot tell. I have to intervene on the hidden states directly. Those two go on the whiteboard in the next entry.</p>

<p>The chart shows real values. Parameter settings and raw examples stay in my private notes.</p>

<p>btw, today’s song is “Down Under” by Men at Work</p>]]></content><author><name>Yuanhao (Henry) Shen</name><email>yuanhao.shen@queensu.ca</email></author><category term="research" /><category term="research-notebook" /><category term="analogy-generation" /><summary type="html"><![CDATA[First, why I want to study diversity in analogy. It started with conversations with my advisor, who said that making analogies is a core part of human cognition and recommended a book, Surfaces and Essences: Analogy as the Fuel and Fire of Thinking by Hofstadter and Sander. My advisor also pointed me to Peter Turney’s Domain and Function.]]></summary></entry><entry xml:lang="en"><title type="html">2024-11-20 · SMARTCAL: Choosing Tools and Calibrating Confidence</title><link href="https://henrysyh2000.github.io/en/blog/smartcal/" rel="alternate" type="text/html" title="2024-11-20 · SMARTCAL: Choosing Tools and Calibrating Confidence" /><published>2024-11-20T00:00:00+00:00</published><updated>2024-11-20T00:00:00+00:00</updated><id>https://henrysyh2000.github.io/en/blog/smartcal</id><content type="html" xml:base="https://henrysyh2000.github.io/en/blog/smartcal/"><![CDATA[<p>SMARTCAL was my first paper, written with Xiaodan Zhu and Lei Chen and published in the EMNLP 2024 Industry Track. We studied whether a language model can assess the usefulness of a tool call and how much confidence to place in it. <a href="https://aclanthology.org/2024.emnlp-industry.59/">Paper and authors</a></p>

<h2 id="why-examine-confidence-in-tool-use">Why examine confidence in tool use?</h2>

<p>Connecting search or code execution leaves room for mistakes in tool selection. A model may choose an irrelevant operation and still report high confidence. SMARTCAL examines this combination of misuse and overconfidence. <a href="https://aclanthology.org/2024.emnlp-industry.59/">Research motivation</a></p>

<p>For an illustrative example, suppose a question only requires calculating the days between two supplied dates. Searching for a person with the same name could introduce irrelevant information. When reviewing that step, I would ask what information is missing and whether the operation can supply it. This is an explanatory example, not an experimental case from the paper.</p>

<h2 id="how-smartcal-works">How SMARTCAL works</h2>

<p><img src="/assets/posts/smartcal/a0ea4ab1fe02bbad-smartcal-method.png" alt="The paper's comparison of ART, ART with verbalized confidence, and SMARTCAL's three-stage pipeline" /></p>

<p>Figure 1 from Shen, Zhu and Chen (2024). ART and its confidence-reporting variant appear on the left; SMARTCAL appears on the right. <a href="https://arxiv.org/html/2412.12151v1#S2">Figure and method</a></p>

<p><strong>Self-Evaluation (SE).</strong> A teacher model uses task familiarity and example similarity to prepare tool-use instructions: whether internal knowledge is sufficient and which tools from demonstrations fit the question.</p>

<p><strong>Confidence Prior Collection (CPC).</strong> The tool-use model runs on held-out development data and reports confidence at each step. Scores are averaged per question, then binned against answer accuracy to form a confidence–accuracy lookup table.</p>

<p><strong>Augmented Reasoning (AR).</strong> The tool-use model follows the instructions. A calibration model consults the lookup table and reasoning context, edits confidence assessments and produces the final answer. Here, self-awareness refers to these evaluation procedures; it does not establish human-like consciousness. <a href="https://arxiv.org/html/2412.12151v1#S2">Method, Section 2</a></p>

<p>The lookup table is an empirical reference from development data. My interpretation is that changing tasks or tools calls for checking whether that reference still applies.</p>

<h2 id="what-the-paper-found">What the paper found</h2>

<p>Experiments covered ART and DSP on Mintaka, PopQA and Entity Questions. The table selects GPT-4 results to show how changes vary by dataset. These are the paper’s reported results, not new runs.</p>

<table>
  <thead>
    <tr>
      <th>Dataset</th>
      <th style="text-align: right">QA: ART</th>
      <th style="text-align: right">QA: ART + SMARTCAL</th>
      <th style="text-align: right">ECE: ART (V)</th>
      <th style="text-align: right">ECE: ART + SMARTCAL</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Mintaka</td>
      <td style="text-align: right">47.0%</td>
      <td style="text-align: right">59.6%</td>
      <td style="text-align: right">0.263</td>
      <td style="text-align: right">0.169</td>
    </tr>
    <tr>
      <td>PopQA</td>
      <td style="text-align: right">55.3%</td>
      <td style="text-align: right">55.7%</td>
      <td style="text-align: right">0.261</td>
      <td style="text-align: right">0.201</td>
    </tr>
    <tr>
      <td>Entity Questions</td>
      <td style="text-align: right">44.8%</td>
      <td style="text-align: right">63.5%</td>
      <td style="text-align: right">0.236</td>
      <td style="text-align: right">0.096</td>
    </tr>
  </tbody>
</table>

<p>Values come from Tables 2 and 3, with QA fractions converted to percentages. <strong>QA is compared with ART; ECE is compared with ART (V)</strong>, which elicits verbalized confidence. The two metrics therefore use different reference baselines. <a href="https://aclanthology.org/2024.emnlp-industry.59.pdf#page=5">Original results</a></p>

<p>QA follows the paper’s relaxed EM rule, allowing containment matches between answers and labels. ECE measures the gap between binned confidence and empirical accuracy; lower is better, but it does not guarantee that an individual answer is correct. Improvements also vary by configuration: GPT-3.5-turbo’s PopQA ECE rose from 0.010 to 0.087. The appendix discusses how refusals, failed confidence extraction and default zero scores affect this metric. <a href="https://arxiv.org/html/2412.12151v1#A2.SS2">Metrics and anomalous cases</a></p>

<h2 id="boundaries-to-retain">Boundaries to retain</h2>

<p>The experiments used particular dataset subsets, model versions and prompts. More complex tasks with multiple reasoning paths remain to be tested. Extra model roles also add calls; I would not interpret accuracy gains as proof of optimal cost or transfer them directly to today’s models. <a href="https://aclanthology.org/2024.emnlp-industry.59.pdf#page=7">Limitations, Section 7</a></p>

<p>For the implementation, start with <code class="language-plaintext highlighter-rouge">ART_SM_CAL</code> in the official repository. Its README lists OpenAI, Microsoft Bing and SerpApi credentials among the requirements. This overview describes the design and reported results; it does not claim a fresh reproduction of the complete experiments. <a href="https://github.com/Henrysyh2000/SMARTCAL">Official code</a></p>]]></content><author><name>Yuanhao (Henry) Shen</name><email>yuanhao.shen@queensu.ca</email></author><category term="research" /><category term="tool-use" /><category term="confidence-calibration" /><category term="SMARTCAL" /><summary type="html"><![CDATA[SMARTCAL was my first paper, written with Xiaodan Zhu and Lei Chen and published in the EMNLP 2024 Industry Track. We studied whether a language model can assess the usefulness of a tool call and how much confidence to place in it. Paper and authors]]></summary></entry></feed>