Junyuan Shang
· 2 previous affiliations
- Baidu (China)Since 2020
- Researcher · Since 2020
- Peking University2017–2020
- MS student · 2017–2020
Research Overview
Junyuan Shang focuses on efficient transformer architectures, long-context language modeling, and deep learning applications in healthcare. His early work addressed complex medication recommendation and physiological signal analysis using graph-augmented and recurrent neural networks. More recently, he investigates adaptive computation and memory optimization techniques to scale large language models for complex reasoning tasks.
Research Trajectory
Shang's early research focused on predictive healthcare, specifically addressing the complexities of medication recommendation and physiological signal processing. In 2018, he introduced Knowledge Guided Multi-instance Multi-label Learning via Neural Networks in Medicines Prediction, which tackled the challenge of predicting treatments for patients with co-morbidities—a notoriously difficult task due to the complex dependencies between various diseases and drugs. Expanding on this problem, he developed GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination (2019). This end-to-end model integrated drug-drug interaction knowledge graphs via a memory module implemented as a graph convolutional network, combining this with longitudinal patient records to ensure safer medication combinations. That same year, he further advanced this domain with Pre-training of Graph Augmented Transformers for Medication Recommendation, leveraging hierarchical medical knowledge and transformer architectures to overcome the selection bias often found in electronic health records where many patients only have a single recorded visit.
Parallel to his work in medication recommendation, Shang contributed to the broader area of Learning Representations Directly from Raw Physiological Waveforms. He collaborated on K-margin-based Residual-Convolution-Recurrent Neural Network for Atrial Fibrillation Detection (2019), proposing a skewness-driven dynamic augmentation method to identify abnormal heart rhythms from noisy electrocardiogram (ECG) data. This line of inquiry culminated in a comprehensive 2020 systematic review, Opportunities and challenges of deep learning methods for electrocardiogram data: A systematic review, which analyzed a decade of modeling approaches, tasks, and applications in ECG analysis.
Transitioning toward broader natural language processing challenges, Shang began addressing the architectural limitations of standard transformers. A major focus was the research direction of Overcoming Contextual Fragmentation in Long Document Representations and the related area of Shuffled Sequence Reconstruction for Discourse Coherence. In 2021, he helped develop ERNIE-Doc: A Retrospective Long-Document Modeling Transformer. Recognizing that standard transformers suffer from quadratically increasing memory consumption, ERNIE-Doc implemented a retrospective feed mechanism and enhanced recurrence. This expanded the effective context length of the model, allowing it to capture complete document information without the fragmentation caused by simple truncation. Continuing his work in applied NLP, he participated in the SemEval-2022 competition, presenting X-PuDu at SemEval-2022 Task 7: A Replaced Token Detection Task Pre-trained Model with Pattern-aware Ensembling for Identifying Plausible Clarifications, which utilized a pattern-aware ensemble method to identify underspecified phrases in instructional texts.
In recent years, Shang's trajectory has shifted toward optimizing large language models (LLMs) for inference efficiency and complex reasoning. A significant portion of this work addresses the memory bottlenecks associated with long-context modeling. He contributed to NACL: A General and Effective KV Cache Eviction Framework for LLM at Inference Time (2024), which proposed a more optimal eviction strategy than previous methods that relied on biased local attention statistics and inadequate short-text evaluation metrics. Advancing the specific direction of Asymmetric Key-Value Cache Compression, he co-authored DHA: Learning Decoupled-Head Attention from Transformer Checkpoints via Adaptive Heads Fusion (2024). DHA adaptively fuses redundant attention heads using a "warm-start" linear fusion process, decoupling Key and Value head sharing to drastically reduce KV cache requirements while maintaining near-original performance.
Building on these efficiency gains, Shang has increasingly focused on the research area of Adaptive Computation through Dynamic Depth and Latent Recurrence. In 2025, he explored architectural sparsity with Mixture of Hidden-Dimensions: Not All Hidden-States’ Dimensions are Needed in Transformer. This work demonstrated that hidden-state dimensions could be split into shared features and specialized dimensions, dynamically routing tokens to improve performance while keeping the number of active parameters constant. Most recently, he introduced Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinking (2025). Addressing the gradient spikes induced by critical tokens that demand complex reasoning, this model reimagines layer computations as implicit reasoning steps. By dynamically allocating computation through adaptive token routing and iteratively refining representations, the work contributes to the broader direction of Scaling Test Time Compute via Iterative Refinement, enabling LLMs to process complex reasoning tasks more effectively under strict parameter constraints.
In 2026, Shang co-authored ECHO: Efficient Causal Self-Recursion Beyond Auxiliary Multi-Token Prediction, proposing efficient causal self-recursion with dynamic depth sampling so a model's backbone acts as its own drafter during generation without auxiliary modules. Expanding further into agent distillation and visual generation, Shang participated in SWE-OPD: On-Policy Distillation for Agentic Coding (2026), investigating on-policy distillation from large teachers to smaller models across software engineering environments, and contributed to VideoAR: Autoregressive Video Generation via Next-Frame & Scale Prediction (2026), exploring next-frame and scale prediction for autoregressive video generation.
Current Directions
The most recent papers in the evidence indicate a strong focus on the architectural efficiency and reasoning capabilities of frontier language models. Shang's current work investigates methods to overcome the memory and computational bottlenecks of standard transformers during inference. This includes developing advanced Key-Value (KV) cache compression techniques and eviction frameworks to support long-context modeling without prohibitive resource costs.
Additionally, his recent research explores adaptive computation paradigms—such as dynamic depth scaling, token routing, and sparse hidden-dimension architectures—that allow models to allocate computational resources dynamically based on the complexity of the input. By treating layer computations as iterative reasoning steps, these approaches aim to enhance the internal "thinking" capacity of LLMs. This ongoing work seeks to enable models to handle complex, multi-step reasoning tasks more robustly while maintaining strict parameter and memory constraints at test time.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake