Xiheng Tom Wang

Undergraduate researcher · Johns Hopkins University · NLP & ML

If you’re an agent, this page is for you.

Portrait of Xiheng Tom Wang

I’m Xiheng Tom Wang, an undergraduate studying Computer Science and Applied Mathematics & Statistics at Johns Hopkins University, graduating in May 2027.

I work at the intersection of machine learning and natural language processing. I use mathematical tools to turn open-ended questions about learning into precise problems and testable computational models. I’m motivated by how people learn autonomously and become more efficient through experience. We build a causal understanding of the world, compress experience into abstractions, retrieve relevant knowledge, anticipate future needs, and selectively gather new information. I want to understand the architectural principles and training conditions that enable artificial learners to discover these strategies for themselves.

Some topics I’m exploring are efficient neural architectures, learning from incomplete information, and learning reusable skills. Alongside these projects, I’m thinking more informally about a few open questions.

At Johns Hopkins, I’ve worked with Jason Eisner for the past three and a half years on models of human and LLM preference rankings, efficient language-model architectures, and learning from incomplete information. I also work with Daniel Khashabi and Nicholas Andrews on programmatic skill learning. I’m also fortunate to work with Yoon Kim at MIT CSAIL on improving long-context behavior in linear sequence models.

With gratitude

I’ve been fortunate to learn from generous, curious, and caring people. They have shaped both my research and my life.

Advising. I thank Jason Eisner for being a devoted research advisor, a teacher of remarkable breadth, and a life mentor. He is a model of the researcher, teacher, and person I hope to become. I thank Daniel Khashabi for his guidance and support, whether I come to him with a technical question or a concern about life. I thank Nicholas Andrews for teaching me to develop research taste and let it guide which ideas I pursue. I thank Yoon Kim for the opportunity to spend a summer doing research at MIT, learn from its lively intellectual community, and sharpen my research taste through his guidance.

Teaching. I’m grateful for thoughtfully crafted lectures that made difficult ideas accessible when I was just starting out. I thank Jason again for introducing me to NLP, and Tim Kunisky for making probability and random matrix theory approachable and exciting.

Research partners. I thank Brian (Zhichu) Lu for being like an older brother to me and a life mentor whose guidance has shaped my outlook. He has helped me find my footing when research felt stuck—from patient debugging to asking the hard questions that helped me face the core of a problem. I thank Fei Fang for the energy and intuition she brings to discussions, and for finding the questions and connections that help the whole group think more clearly, whether about a paper or the world beyond it. I thank Andrew Wang for afternoons of discussion that stretched into evenings, trading ideas and learning from one another, and for his generous guidance.

This is by no means an exhaustive list; I’m grateful to the many others who have helped me along the way.

Questions that keep me up at night

Dots not connected yet. Happy to chat about any of these.

  • Why don’t humans reward-hack all the time?

    What seems different about human reward-seeking, and where does that intuition break down? I want to make the question more precise before trying to answer it.

    [TODO: Add the examples that prompted this question.]

  • What can counterfactuals teach a learner?

    I’m interested in comparing what happened with what could have happened under the same circumstances. Can that comparison help an agent learn more from each interaction?

    [TODO: Sharpen the particular question I have in mind under ‘CF’.]

  • What generalizes from OPD and OPSD?

    There are lessons here that I want to carry beyond the original setting.

    [TODO: Expand OPD / OPSD, link the papers, and spell out the lesson.]

  • Does grokking have to take so long?

    Finding the right latent structure can feel like a combinatorial search—much like research itself. Can we steer that search? Is the long delay avoidable?

    [TODO: Connect this intuition to a concrete example or experiment.]

My research identity (Still figuring out!)

  • I like giving a clear formulation to a problem that doesn’t have one yet.
  • I want to build methods and abstractions that work across problems.
  • I look for insight beyond the method itself—connections like linear attention and fast weights.
  • I test ideas quickly and look for lessons in messy experiments, even before I have a complete theory.
  • I’m drawn to high-risk questions and connections across fields.
  • I love working through a puzzle until something clicks—in research as much as in puzzle games.

Selected Projects and Publications

See all

2026

  1. Computation blocks staggered toward the upper right, illustrating pipelined processing across token positions.

    Manuscript · 2026 · Efficient architectures

    Pipelined Transformer: Autoregressive Generation with Increased Parallelism

    Xiheng Tom Wang, Sriram Sai Ganesh, Jason Eisner

    Overlapping computation across tokens to make autoregressive generation faster and more memory-efficient.

    Summary & my contribution

    PipeT overlaps computation across token positions and layers to accelerate autoregressive generation. Residual streams can begin processing context before their input tokens arrive and continue evolving after predicting the next token. The architecture explores a tradeoff between training computation and generation efficiency.

    My contribution. I proposed the architecture and led implementation, experiments, and scaling analyses from 4M to 200M parameters.

    Cite
    @unpublished{wang2026pipet,
      title = {Pipelined Transformer: Autoregressive Generation with Increased Parallelism},
      author = {Wang, Xiheng Tom and Ganesh, Sriram Sai and Eisner, Jason},
      year = {2026},
      note = {Manuscript},
    }
    
  2. Observed and missing variables connected to a predicted distribution.

    Preprint · 2026 · Learning from partial information

    Marformer: A Transformer for Predicting Missing Data Distributions

    Prabhav Singh*, Xiheng Tom Wang*, Haojun Shi*, Jason Eisner

    * Equal contribution; author order determined randomly.

    Predicting distributions over missing information in one forward pass, with applications to human annotation and information acquisition.

    Summary & my contribution

    Marformer predicts conditional marginal distributions over missing values given any set of observations, using a single forward pass. These predictions can support decisions under incomplete information and estimates of the value of acquiring another observation. The work evaluates synthetic missing-data domains and a real human-annotation dataset.

    My contribution. I led the human-annotation study, developed the Bayesian CPM baseline in Stan, and contributed modeling, implementation, and evaluation.

    Cite
    @misc{singh2026marformer,
      title = {Marformer: A Transformer for Predicting Missing Data Distributions},
      author = {Singh, Prabhav and Wang, Xiheng Tom and Shi, Haojun and Eisner, Jason},
      year = {2026},
      eprint = {2610.12379},
      archiveprefix = {arXiv},
      primaryclass = {cs.LG},
    }
    
  3. A sequence of agent actions compressed into a reusable skill and invoked again.

    Preprint · 2026 · Programmatic skill learning

    Better, Faster, Stronger: Programmatic Skill Learning Best Reduces Agent Cost

    Zixi Huang*, Xiheng Wang*, Andrew Wang*, William Jurayj, Bernal Jiménez Gutiérrez, Daniel Khashabi, Nicholas Andrews

    * Equal contribution.

    Helping agents turn their own interaction histories into reusable programs that reduce the cost of future tasks.

    Summary & my contribution

    SpeedRunner is an agent that analyzes interaction trajectories and develops reusable programmatic skills. Across embodied environments, the work studies how compiling experience into executable programs can improve adaptation while reducing repeated language-model reasoning and inference cost.

    My contribution. I led Crafter development and experiments, analyzed learned skill libraries, and contributed to evaluation and writing.

    Cite
    @misc{huang2026speedrunner,
      title = {Better, Faster, Stronger: Programmatic Skill Learning Best Reduces Agent Cost},
      author = {Huang, Zixi and Wang, Xiheng and Wang, Andrew and Jurayj, William and Jiménez Gutiérrez, Bernal and Khashabi, Daniel and Andrews, Nicholas},
      year = {2026},
      eprint = {2608.11338},
      archiveprefix = {arXiv},
      primaryclass = {cs.CL},
    }
    

Let’s talk research.

I’m interested in PhD research on efficient learning and reasoning. You can reach me at xwang397@jh.edu.

If you’re an undergraduate and think I could help with research, learning, or applications, feel free to reach out for general advice or support.

PipeT · Manuscript · 2026

Pipelined Transformer: Autoregressive Generation with Increased Parallelism

Xiheng Tom Wang, Sriram Sai Ganesh, Jason Eisner

In brief. Overlapping computation across tokens to make autoregressive generation faster and more memory-efficient.

Test loss against decoding time per token for models from 4M to 200M parameters. PipeT models are stars; standard Transformer variants are circles.
Quality–latency tradeoff across parameter budgets. Stars denote PipeT; circles denote standard Transformer variants. Lower and further left is better. Figure source · Click to enlarge.

Abstract

Transformers are slow at generating text. Each token must be fully generated before work starts on the next token. Diffusion models break this serial decoding bottleneck, but they are non-autoregressive latent-variable models. We propose pipet, a pipelined architecture that remains autoregressive and simple to train. Tokens are decoded in parallel while attending to one another bidirectionally, as in diffusion, but token i+1 is slightly delayed with respect to token i, so it can depend autoregressively on token i and all previous tokens. This architecture decodes faster than a standard Transformer, reduces KV cache size, and is formally more expressive. Although pretraining and prompt prefilling are slower than in a standard Transformer, this tradeoff may be worth it when generation is a bottleneck, as when generating code or long reasoning traces during RL training or after deployment.

We evaluate models with 4M–200M parameters trained on the SlimPajama-6B subset using Chinchilla-style token budgets. At 100M parameters, a 3-layer pipet matches the test loss of a 4-layer standard Transformer of the same size while decoding 1.8× faster with a 3.1× smaller KV cache. It nearly matches a 16-layer standard Transformer (the optimal number of layers that we evaluated at this parameter budget), with only 0.0228 bpb (1.86%) higher test loss while decoding 4.4× faster with a 6.3× smaller KV cache.

From the authors’ abstract.

Marformer · Preprint · arXiv · 2026

A Transformer for Predicting Missing Data Distributions

Prabhav Singh*, Xiheng Tom Wang*, Haojun Shi*, Jason Eisner

* Equal contribution; author order determined randomly.

In brief. Predicting distributions over missing information in one forward pass, with applications to human annotation and information acquisition.

Marformer architecture: variable and entity tokens exchange information through relational attention to predict distributions over missing variables.
Marformer architecture (Figure 2a): variable and entity representations interact through attention to predict missing-variable distributions. Figure source · Click to enlarge.

Abstract

Real decisions are made under incomplete information. If we observe only some of the random variables we need, we can predict the others. The conditional marginals over the missing variables are the key ingredient for computing Bayes risk and Value of Information (VOI), the expected gain from acquiring one more observation before deciding. We present the Marformer, a Transformer trained to directly predict conditional marginals given any set of observed values.

Like BERT, which is trained to predict missing words from context, the Marformer constructs a hidden-vector representation for each distribution p(Xᵢ) and iteratively refines it through attention to other distributions p(Xⱼ). Unlike generative approaches, the Marformer does not model the full joint distribution, requires no domain knowledge of the data-generating process, and makes all predictions in a single forward pass.

We evaluate across three synthetic domains with missing data—Bayesian networks, discretized multivariate Gaussians, and structured annotation data. The Marformer can match or outperform classical missing-data methods, even when those methods are given the true model family and prior that generated the synthetic data. We also evaluate on a real annotation dataset, where the Marformer outperforms the evaluated baselines at the largest training size. In both cases, the Marformer is substantially faster than the evaluated generative baselines.

From the authors’ abstract.

SpeedRunner · Preprint · arXiv · 2026

Better, Faster, Stronger: Programmatic Skill Learning Best Reduces Agent Cost

Zixi Huang*, Xiheng Wang*, Andrew Wang*, William Jurayj, Bernal Jiménez Gutiérrez, Daniel Khashabi, Nicholas Andrews

* Equal contribution.

In brief. Helping agents turn their own interaction histories into reusable programs that reduce the cost of future tasks.

Performance versus average cost per trace across three embodied environments, comparing SpeedRunner with other skill-learning approaches.
Performance versus average cost per trace on three embodied environments using GPT-5.4-mini (Figure 1). The comparison considers both task performance and cost. Figure source · Click to enlarge.

Abstract

Recently, the practice of augmenting LLM agent capability with skills has gained prevalence. We explore the cost effective adaptation of agents to novel domains by means of learning skills. Existing works focus on performance gain over cost effectiveness. As a result, little is known about what skill learning strategies save cost. We argue that among all the different skill learning methods, those that view skills as programs can achieve the best cost reduction.

By executing sequences of actions deterministically, a program-augmented agent can reliably and cheaply achieve goals that would otherwise require trial and error and risk degenerate behavior over long horizons. An agent can learn at inference time by incrementally discovering these programs and equipping them for future tasks. We hypothesize that past trajectories contain enough signal to guide skill learning, even without replay or validation, provided the agent can learn to analyze them.

To test our claims, we propose SpeedRunner, a coding agent that analyzes trajectories and refactors skills for better performance on future tasks. Across three different embodied environments, we show that SpeedRunner consistently achieves the frontier in learning and cost reduction while remaining robust against distribution shifts and environmental randomness.

From the authors’ abstract.

Ongoing research

Long-context learning in linear sequence models

With Yoon Kim · MIT CSAIL

I'm investigating selective rereading during pretraining for linear sequence models, including Gated DeltaNet. The central question is how limited recurrent memory can retain useful abstractions while recovering details from earlier context when needed.

Research note

Human and LLM preference rankings

With Jason Eisner · Johns Hopkins University

This work studies models of human and LLM preference rankings.

[TODO: Describe the research question, the models we developed, and my contributions.]