EMNLP papers
Search EMNLP papers by title, author, or track. Open a paper’s abstract to read more.
Explore the EMNLP analysisSearch results
41–60 of 387
- EMNLP · Main
LLaDA-Rec: Discrete Diffusion for Parallel Semantic ID Generation in Generative Recommendation
Teng Shi, Chenglei Shen, Weijie Yu, Shen Nie, Chongxuan Li, Xiao Zhang, Ming He, Jianping Fan, Jun Xu
Abstract
Generative recommendation represents items as semantic identifiers (SIDs), i.e., sequences of discrete tokens, and typically predict the next item autoregressively. Despite their strong performance, such methods suffer from two limitations: (1) unidirectional constraints, where causal attention enforces left-to-right dependencies and limits global semantic modeling; and (2) error accumulation, where early mistakes propagate to later tokens and hurt recommendation accuracy. To address these issues, we propose LLaDA-Rec, a discrete diffusion framework that reformulates next-item recommendation as parallel SID generation. By combining bidirectional attention with an adaptive generation order, LLaDA-Rec captures richer inter-item and intra-item dependencies while reducing error accumulation. Our framework includes three key components: (1) a parallel tokenization mechanism for diffusion-compatible SIDs; (2) masking strategies at both the user-history and next-item levels; and (3) an adapted beam search algorithm for adaptive-order discrete diffusion decoding. Experiments on three public datasets show that LLaDA-Rec consistently outperforms both conventional ID-based recommenders and strong generative baselines, highlighting discrete diffusion as a promising paradigm for generative recommendation.
Abstract source - EMNLP · Main
Self-Correction Can Amplify Hallucinations: Fact-Level Repair with Graph-Based Evidence Routing in Multimodal Generation
Kaixiang Zhao, Tianrun Yu, Shawn Huang, Porter Jenkins, Yushun Dong, Amanda Hughes
Abstract
We study fact-level repair for cross-modal factual generation, where a fluent textual output may contain specific facts that are not supported by the input. Existing inference-time repair methods often generate feedback by jointly conditioning on the input and the current output. This design can let hallucinated claims in the output bias the model’s interpretation of the input, and its free-form feedback is difficult to rank or schedule at the fact level. We present TIGER, an inference-time framework that redesigns feedback for localized repair. TIGER independently extracts an observation graph from the input and a claim graph from the current output, then assigns each claim a graph-conditioned risk score based on support and conflict. The model repairs selected high-risk claims while keeping the backbone frozen. We provide a convergence analysis showing that the expected total risk decreases geometrically to an explicit asymptotic bound under mild assumptions. Experiments on four text-output cross-modal paths, including image-to-text, image+text-to-text, audio-to-text, and video-to-text, show that TIGER reduces unsupported content while preserving task quality. The gains hold across multiple backbones, and a CrisisFACTS case study suggests that the same repair mechanism can improve grounding in noisy multi-source settings.
Abstract source - EMNLP · Main
SpatialGuard: Harness-Guided Verifiable Spatial Reasoning for Text-to-Image Generation
Ziyun Qian, Zizhi Chen, Yizhou Liu, Mingyang Sun, Dingkang Yang, Lihua Zhang
Abstract
Complex 3D spatial text to image generation requires models to convert natural language into stable visual geometry, not merely semantic appearance. Existing prompt-driven or layout-conditioned methods improve controllability, but often lack an optimizable and verifiable spatial intermediary before visual sampling. As a result, object relations, occlusion, visibility, and camera constraints can decay during multi-round generation. This paper presents SpatialGuard, a structured layout-guided framework for complex 3D spatial text-to-image generation. SpatialGuard parses prompts into image synthesis-oriented 3D layouts through a Spatial Layout Architect, realizes them as visual conditions and candidate images through a Visual Realizer, and uses a Visual Alignment Critic to validate consistency among prompt, layout, and image. To keep constraints stable across iterations, SpatialGuard introduces a Layout Harness that organizes rule constraints, tool invocation, shared knowledge, and feedback loops around the editable layout state. This design turns complex spatial generation from implicit prompt following into a verifiable process of planning, realization, validation, and repair. Comprehensive experiments show that SpatialGuard achieves state-of-the-art performance in complex 3D spatial layout generation and improves spatial faithfulness over existing text-to-image and layout control baselines.
Abstract source - EMNLP · Main
Beyond Static Symbols: Evidence-Grounded Visual Checklists for Cultural Activity Generation
Hongcan Deng, Bo Ma, Yating Yang, Rong Ma, Zhen Wang, Xi Zhou, Rui Dong, Turghun Osman
Abstract
Text-to-image models can render recognizable cultural symbols, but cultural activity generation requires coordinated control over participants, actions, interactions, scenes, and culture-specific constraints. We propose CARE, an evidence-grounded visual checklist framework for controllable cultural activity image generation. Given an activity prompt, CARE builds source-traceable cultural evidence, converts it into an optimized prompt and fine-grained checklist, verifies generated images with concrete VLM-based visual checks, and uses failed checks for targeted prompt repair. We introduce CARE-1360, a dataset of 1,360 cultural activity prompts across eight countries, and evaluate generated images with a unified human protocol. Experiments show that CARE consistently improves over direct generation and retrieval-based prompt refinement baselines across cultural and visual quality dimensions. Results with both ZImage and Stable Diffusion XL suggest that evidence-grounded visual checklists provide an interpretable control mechanism that transfers across the tested generation backends.
Abstract source - EMNLP · Main
Source-Grounded Semantic Reinforcement Learning for Low-Resource Target-Language Generation
Zeli Su, Ziyin Zhang, Pan Zewei, Zhou Liu, Dingcheng Huang, Dehan Li, Zhankai Xu, Longfei Zheng, Xiaolu Zhang, Jun Zhou, Wentao Zhang
Abstract
Low-resource target-language generation is often limited by scarce parallel data, while high-resource source-language monolingual data is abundant but difficult to use with standard supervised fine-tuning. We propose Source-Grounded Semantic Reinforcement Learning (SG-SRL), a resource-utilization framework that converts source-language monolingual data into cross-lingual semantic supervision. SG-SRL performs reference-free reinforcement learning (RL) on source-language data with a cross-lingual semantic reward, followed by lightweight supervised recovery. Although direct reward optimization induces verbosity-based reward hacking, recovery restores fluency, conciseness, and task format without erasing the learned semantic alignment. On Chinese-to-Thai generation, SG-SRL outperforms cold-start SFT, source-only continued pretraining, and synthetic-data SFT; human preference and training-independent metrics corroborate the gains. Recovery ablations further show that semantic retention and form restoration are jointly controlled by recovery data and intensity. An in-domain Chinese-to-Tibetan experiment shows that the reward interface can use a contrastively trained encoder when a capable multilingual reranker is unavailable, while also delimiting the framework’s dependence on reward-model discrimination.
Abstract source - EMNLP · Main
Bridging Generation and Parsing: Collaborative Self-Distillation for Zero-shot Multi-Intent Spoken Language Understanding
Aziguli Wulamu, Ao He, Dezheng Zhang, Jun Li, Xinyuan Qian, Zhihong Zhu, Libo Qin, Bowen Xing
Abstract
Multi-intent spoken language understanding remains challenging due to the scarcity of labeled data and the complexity of modeling intent-slot correlations. In this paper, we propose Collaborative Self-Distillation (Colla-SD), a novel framework that leverages a pair of open-weight large language models (LLMs) to synthesize high-quality labeled samples, which are used for fine-tuning the LLMs to achieve self-distillation. Our approach consists of six stages: (a) intent-slot sampling, (b) reverse progressive skeleton generation, (c) deduplication and quality filtering, (d) cross-model consensus flagging, (e) adjudication of disagreements, and (f) model training. Evaluations on the test sets of public benchmarks show that Colla-SD dramatically improves the open-weight LLM’s overall accuracy by up to 13 times. Equipped with Colla-SD, 7B/8B open-weight models achieve up to 62.68% intent accuracy and 66.13% slot F1 on MixATIS, even outperforming massive open-source and commercial LLMs while also enabling full joint prediction. Ablation studies confirm that each component of our method is critical for the quality of synthesized data, and further analysis reveals that our method can generalize to diverse LLM architectures. Our work demonstrates that Colla-SD can effectively bridge the gap between LLM generation and zero-shot structured semantic parsing.
Abstract source - EMNLP · Main
LogicGraph: Benchmarking Multi-Path Logical Reasoning via Neuro-Symbolic Generation and Verification
Yanrui Wu, Lingling Zhang, Xinyu Zhang, Jiayu Chang, Pengyu Li, Xu Jiang, Jingtao Hu, Jun Liu
Abstract
Evaluations of large language models (LLMs) primarily emphasize convergent logical reasoning, where success is defined by producing a single correct proof. However, many real-world reasoning problems admit multiple valid derivations, requiring models to explore diverse logical paths rather than committing to one route. To address this limitation, we introduce LogicGraph, the first benchmark aimed to systematically evaluate multi-path logical reasoning, constructed via a neuro-symbolic framework that leverages backward logic generation and semantic instantiation. This pipeline yields solver-verified reasoning problems formalized by high-depth multi-path reasoning and inherent logical distractions, where each instance is associated with an exhaustive set of minimal proofs. We further propose a reference-free evaluation framework to rigorously assess model performance in both convergent and divergent regimes. Experiments on state-of-the-art language models reveal a common limitation: models tend to commit early to a single route and fail to explore alternatives, and the coverage gap grows substantially with reasoning depth. LogicGraph exposes this divergence gap and provides actionable insights to motivate future improvements. Our code and data will be published at https://github.com/kkkkarry/LogicGraph/.
Abstract source - EMNLP · Main
PhysWave: Physics-Guided Latent Diffusion Models for Controllable Spatial Audio Generation
Lingfeng Yao, Chenpei Huang, Xingke Yang, Ziye Geng, Changqing Luo, Hao Wang, Jiang Liu, Miao Pan
Abstract
Text-to-spatial audio generation, such as text-to-First-Order Ambisonics (FOA), provides a convenient way to create spatial audio for billion-dollar gaming and film industries. However, existing text-to-FOA methods are largely data-driven and may produce audio that violates acoustic relations between source direction and distance. They also separate descriptive and parametric control, forcing users to trade usability for precision. In this paper, we present PhysWave, a physics-guided latent diffusion model for controllable text-to-FOA generation. PhysWave unifies natural-language and trajectory control through a shared waypoint-caption representation, and augments diffusion training with two differentiable acoustic priors: spherical-harmonic direction consistency and inverse-square distance consistency. To support dynamic spatial generation, we further construct a 300K-clip FOA dataset with diverse sound categories and source trajectories. Extensive results show that the proposed priors help PhysWave generate spatially consistent FOA audio while maintaining competitive audio quality. Further analyses show that these physics priors improve spatial consistency during training and can also be used as inference-time guidance for training-free spatial refinement.
Abstract source - EMNLP · Main
HumorGen: Cognitive Synergy for Humor Generation in Large Language Models via Persona-Based Distillation
Edward Ajayi, Prasenjit Mitra
Abstract
Humor generation poses a significant challenge for Large Language Models (LLMs), because their standard training objective (next-token prediction) inherently conflicts with the surprise and incongruity required for comedy. To bridge this gap, we introduce the Cognitive Synergy Framework, a methodology for generating high-quality humor data inspired by psychological theories of humor. Utilizing a Mixture-of-Thought (MoT) approach, we deploy six cognitive personas (e.g., The Absurdist, The Cynic) to synthesize diverse comedic perspectives for a given prompt. This framework produces a theory-grounded dataset, which we use to fine-tune a 7B parameter student model. We further evaluate two alignment strategies, Direct Preference Optimization (DPO) and an offline group-relative variant O-GRPO, finding that neither improves over SFT. However, our 7B HumorGen model variants significantly outperform larger instruction-tuned baselines and achieve top-tier open-weight performance while remaining competitive with frontier proprietary systems. These results suggest that cognitively driven data curation is more critical than alignment algorithms or model scale for humor generation.
Abstract source - EMNLP · Main
VectorGym: A Multi-Task Benchmark for SVG Code Generation, Sketching and Editing
Joan Rodriguez, Haotian Zhang, Abhay Puri, Haoran Dai, Tianyang Zhang, Meng Lin, Rishav Pramanik, Xiaoqing Xie, Marco Terral Rodriguez, Darsh Kaushik, Aly Shariff, Sai Rajeswar, Perouz Taslakian, Spandana Gella, David Vazquez, Christopher Pal, Marco Pedersoli
Abstract
We introduce VectorGym, a comprehensive benchmark suite for Scalable Vector Graphics (SVG) that spans generation from text and sketches, complex editing, and visual understanding. VectorGym addresses the lack of realistic, challenging benchmarks aligned with professional design workflows. Our benchmark comprises four tasks with expert human-authored annotations: the novel Sketch2SVG task (VG-Sketch); a new SVG editing dataset (VG-Edit) featuring complex, multi-step edits with higher-order primitives; Text2SVG generation (VG-Text); and SVG captioning (VG-Cap). Unlike prior benchmarks that rely on synthetic edits, VectorGym provides gold-standard human annotations that require semantic understanding and design intent. We also provide a multi-task reinforcement learning baseline that jointly optimizes across all four tasks using rendering-based rewards. This baseline, built on GRPO with curriculum learning, trains a Qwen3-VL 8B model that achieves state-of-the-art performance among open-source models, surpassing much larger models including Qwen3-VL 235B and matching GPT-4o. We also introduce a VLM-as-a-Judge metric for SVG generation, validated through human correlation studies. Our evaluation of frontier VLMs reveals significant performance gaps, positioning VectorGym as a rigorous framework for advancing visual code generation.
Abstract source - EMNLP · Main
Dimple: Discrete Diffusion Parallel Generation for Large Multimodal Modal
Runpeng Yu, Xinyin Ma, Xinchao Wang
Abstract
This paper introduces Dimple and Dimple+, two discrete diffusion multimodal large language models (dMLLMs). Dimple is derived from a discrete diffusion large language model (dLLM) that initially lacks multimodal understanding and acquires this capability through a hybrid training strategy that begins with autoregressive learning and subsequently transitions to discrete diffusion training. In contrast, Dimple+ is initialized from an autoregressive multimodal large language model and attains parallel decoding ability via purely discrete diffusion training. Both models achieve performance on par with their autoregressive counterparts, while Dimple+ further sets a new state of the art among existing dMLLMs. To improve inference efficiency, we propose Confident Decoding, a method that dynamically adapts the number of tokens generated at each iteration. Experimental results demonstrate decoding speedups of 2\times–6\times with only marginal performance loss. Additionally, we show that the Prefilling technique, previously developed for autoregressive models, can be effectively extended to dMLLMs with bidirectional attention, yielding nearly lossless acceleration of 1.7\times–7\times. Finally, we present the Structure Prior method, which enables fine-grained control over output format and reasoning structure, a capability that is challenging to achieve in autoregressive models.
Abstract source - EMNLP · Main
Towards Holistic Knowledge Retrieval for Augmented Generation: Integrating Graph-Grounded and Query-Aligned Knowledge
Weidong Zhang, Zhe Wang, Kewen Wang, Haifeng Guo, Shuxuan Lian, Weizhi Du
Abstract
Retrieval-Augmented Generation (RAG) enables Large Language Models (LLMs) to access external knowledge during generation, improving factual reliability without parameter retraining. However, existing methods still struggle to retrieve evidence that is both relevant and complete. Standard RAG may miss semantic associations among related chunks. Graph-based RAG addresses this issue by modeling entity relations, but it is often query-agnostic. Question-format RAG further improves query matching by converting facts into Question-Answer (QA) pairs, but it cannot guarantee semantic association and introduces knowledge fragmentation. To address these issues, we propose HolisticRAG, a framework integrating graph-grounded and query-aligned knowledge for holistic knowledge RAG. In the offline stage, HolisticRAG constructs a knowledge representation to preserve semantic associations while reducing query-agnostic retrieval. In the online stage, it applies holistic knowledge clustering to merge all fragmented evidence and adaptively retrieve sufficient supporting facts. Experiments demonstrate the effiectiveness of HolisticRAG.
Abstract source - EMNLP · Main
Aggregation-Aware Synthetic Text Generation Against Authorship Re-Identification
Qian Ma, Anna Cinzia Squicciarini, Sarah Rajtmajer
Abstract
Online users often release multiple texts under the same identity, giving attackers an author profile that can reveal more than any single text. Existing authorship obfuscation methods optimize privacy independently for each document, leaving them blind to cross-document correlations that make aggregation dangerous. We propose Aggregation-Aware Synthetic Text Generation (AAST), a framework that addresses this gap by jointly selecting synthetic texts at the bundle level rather than optimizing each text in isolation. AAST targets attribution and verification attacks, including cross-genre settings where attacker references come from a genre not observed during generation or selection. Experiments across same-genre, cross-genre, neural, and independent non-neural stylometric attacks show that AAST lowers account-level linkability as bundle size grows, while preserving semantic quality, linguistic acceptability, and sentiment alignment.
Abstract source - EMNLP · Main
CODE: A Contradiction-Based Overthinking Attack Framework for Prolonging Retrieval-Augmented Generation
Xiaolei Zhang, Xiaojun Jia, Liquan Chen, Songze Li
Abstract
Introducing reasoning models into Retrieval-Augmented Generation (RAG) systems enhances task performance through step-by-step reasoning, logical consistency, and multi-step self-verification. However, recent studies have shown that reasoning models suffer from overthinking attacks, where models are tricked to generate an unnecessarily high number of reasoning tokens. In this paper, we reveal that such overthinking risk can be inherited by RAG systems equipped with reasoning models, by proposing an end-to-end attack framework named Contradiction-Based Deliberation Extension (CODE). Specifically, CODE develops a multi-agent architecture to construct poisoning samples that are injected into the knowledge base. These samples 1) are highly correlated with the user query, such that they can be retrieved as inputs to the reasoning model; and 2) contain contradiction between the logical and evidential layers that cause models to overthink, and are optimized to exhibit highly diverse styles. Extensive experiments on two datasets across five commercial reasoning models demonstrate that the proposed attack causes a 5.32\sim24.72\times increase in reasoning token consumption, without degrading task performance. Finally, we also discuss and evaluate potential countermeasures to mitigate overthinking risks.
Abstract source - EMNLP · Main
Interpreting and Steering for Safe and Correct Code Generation
Hao Yan, Ziyu Yao
Abstract
Large language models (LLMs) frequently generate source code containing vulnerabilities, yet little work studies the internal mechanisms that distinguish safe from vulnerable generation in them. In this work, we systematically perform a mechanistic interpretation of LLMs, aiming at both understanding how code safety-vs-vulnerability is represented or driven by components in an LM and turning the insights into actionable steering strategies to encourage safer code generation. To this end, we introduce CodeSec-Pairs, a dataset of 9,342 Python safe-and-vulnerable contrastive code pairs, sampled from Llama-3.1-8B-Instruct. Utilizing the dataset, we explore approaches to localize layers and attention heads that relate to code safety, and further experiment with different steering strategies for inference-time vulnerability reduction. In particular, we propose DuoSteer, a double-steering approach that simultaneously applies safety and code-correctness steering to attention heads. In experiments over five vulnerability types, DuoSteer leads to an average of -26.9% vulnerability rate reduction and +7.5% functional correctness improvement, which outperforms not only other steering variants but also prompting and supervised fine-tuning baselines. The advantage also replicates on Qwen-2.5-Coder-7B-Instruct with another 2,500 contrastive pairs sampled from that model.
Abstract source - EMNLP · Main
ConDistill: Asymmetric Context Self-Distillation for Radiology Report Generation
Ziming Song, Mingyang Shen, Chi Man Vong
Abstract
Building fine-grained cross-modal alignment via pure radiograph-report pairs has been a long-standing challenge in the task of Radiology Report Generation (RRG). An intuitive solution towards this issue lies at introducing extra contexts to assist the report generation process, yet clinical contexts are normally unavailable in most real-world scenarios. In this paper, we present an asymmetric context self-distillation framework for RRG, namely ConDistill. To facilitate radiograph-only report generation, it refines the basic radiograph-report alignment, by progressively injecting additional contexts via multi-stage curriculum. Since these contexts are not available in inference, we develop a self-distillation strategy to transfer the bridge states from the teacher branches with extra contexts to the student one with solely radiograph inputs. For evaluation, we conduct extensive experiments on both radiograph-only and multi-context benchmarks, i.e., MIMIC-CXR and MIMIC-RG4, respectively. Experimental results validate our promising performance and further ablations offer potential insights for the context learning in LLM-based RRG frameworks.
Abstract source - EMNLP · Main
SLIT: Execution-Grounded Small Language Models for Issue-Reproducing Test Generation
Runlin Liu, Zhe Zhang, Zeren Chen, Xiang Gao, Lu Sheng, Ping Yang, Mu Li, Hailong Sun
Abstract
Automatically generating issue-reproducing tests is essential for debugging and regression prevention. Recent advances show that large language models can effectively perform this task, but their reliance on extremely large parameter scales limits practical deployment. In this paper, we propose SLIT, an execution-grounded framework that enables small language models to generate effective issue-reproducing tests. SLIT formulates issue reproduction as an execution-guided exploration problem and optimizes policies with reinforcement learning over execution-based rewards. To improve inference-time exploration, SLIT further introduces diversity-augmented test construction and a learned scoring model to select effective reproducing tests. Experimental results on SWT-Bench-Verified indicate that the 14B-parameter model achieves a resolve rate of 46.2%, achieving competitive performance against prior approaches that rely on larger models. These results demonstrate the effectiveness of SLIT and highlight the viability of execution-grounded small language models for issue-reproducing test generation.
Abstract source - EMNLP · Main
Does Understanding Inform Generation in Unified Multimodal Models? From Analysis to Path Forward
Yuwei Niu, Weiyang Jin, Jiaqi Liao, Chaoran Feng, Peng Jin, Bin Lin, Zongjian Li, Bin Zhu, Weihao Yu, Li Yuan
Abstract
Recent years have witnessed significant progress in Unified Multimodal Models, yet a fundamental question remains: Does understanding truly inform generation in Unified Multimodal Models? To investigate this, we introduce UniSandbox, a decoupled evaluation framework paired with controlled, synthetic datasets to avoid data leakage and enable detailed analysis. Our findings reveal a significant understanding-generation gap, which is mainly reflected in two key dimensions: reasoning generation and knowledge transfer. Specifically, for reasoning generation tasks, we observe that explicit Chain-of-Thought (CoT) in the understanding module effectively bridges the gap, and further demonstrate that a self-training approach can successfully internalize this ability, enabling implicit reasoning during generation. Additionally, for knowledge transfer tasks, we find that CoT assists the generative process by helping retrieve newly learned knowledge, and also discover that query-based architectures inherently exhibit latent CoT-like properties that affect this transfer. UniSandbox provides preliminary insights for designing future unified architectures and training strategies that truly bridge the understanding-generation gap.
Abstract source - EMNLP · Main
Generation-Score Consistency: Pushing LLMs to Generate Semantically Valid Reasoning Scores for Misinformation Detection
Yidu Chen, Bo Ma, Yating Yang, Xi Zhou, Zhen Wang, Ahtamjan Ahmat, Dilxat Abdureyim, Azmat Anwar
Abstract
Large language models (LLMs) possess extensive world knowledge and have demonstrated strong potential for misinformation detection. A growing line of recent work prompts LLMs to produce structured reasoning before issuing a veracity judgment. However, we contend that such structured outputs do not spontaneously support the veracity decision. The emitted scores can satisfy the output schema while contributing little to veracity discrimination. Since annotating full reasoning paths is prohibitively costly for veracity tasks, we propose a Generation-Score Consistency framework that supervises through structured dimension scores and steers the LLM toward functional reasoning. Specifically, we train a compact score-to-label verifier on a small set of expert-annotated reasoning data, freeze it, and during supervised fine-tuning use a trainable score head to align the score-token hidden states of the LLM with the human-calibrated mapping. Introducing structured reasoning on its own costs accuracy relative to label-only supervision, while the consistency term recovers that cost and keeps the emitted scores coupled to the veracity decision. Controlled experiments on multimodal misinformation benchmarks show that the consistency term strengthens both veracity prediction and the discriminability of the emitted scores. Code and data are available at https://github.com/yun-nlp/Reasoning-Scores-for-Misinformation-Detection-EMNLP2026.
Abstract source - EMNLP · Main
M^2G-Eval: Enhancing and Evaluating Multi-granularity Multilingual Code Generation
Fanglin Xu, Wei Zhang, Jian Yang, Guo Chen, Aishan Liu, Zhoujun Li, Xianglong Liu, Bryan Dai
Abstract
The rapid advancement of code large language models (LLMs) has sparked significant research interest in systematically evaluating their code generation capabilities, yet existing benchmarks predominantly assess models at a single structural granularity and focus on limited programming languages, obscuring fine-grained capability variations across different code scopes and multilingual scenarios. We introduce M^2G-Eval, a multi-granularity, multilingual framework for evaluating code generation in large language models (LLMs) across four levels: Class, Function, Block, and Line. Spanning 18 programming languages, M^2G-Eval includes 17K+ training tasks and 1,286 human-annotated, contamination-controlled test instances. We develop M^2G-Eval-Coder models by training Qwen3-8B with supervised fine-tuning and Group Relative Policy Optimization. Evaluating 30 models (28 state-of-the-art LLMs plus our two M^2G-Eval-Coder variants) reveals three main findings: (1) an apparent difficulty hierarchy, with Line-level tasks easiest and Class-level most challenging; (2) widening performance gaps between full- and partial-granularity languages as task complexity increases; and (3) strong cross-language correlations, suggesting that models learn transferable programming concepts. M^2G-Eval enables fine-grained diagnosis of code generation capabilities and highlights persistent challenges in synthesizing complex, long-form code.
Abstract source