# MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning

MLIRBench：コンパイラとハードウェアを考慮した推論のためのベンチマークおよびデータセット

Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · arXiv · 2026年11月11日

- **課題** LLMがMLIRプログラムの組の意味的な同値性と動作の違いを、実行結果を根拠にどの程度正確に判定できるかを測るのは難しいです。
- **結果** Gemini 3.1 Proは1,768組で、ハードラベル精度92.65%と集計スコア74.18を記録しましたが、結果の振る舞いスコアは5.04/10でした。

## LLMはIRを本当に理解しているのか

LLMはPythonやC++のようなソースコード課題で高い性能を示しましたが、コンパイラの中間表現（IR）をどの程度理解しているかは、よく分かっていません。この論文は、MLIRを対象に、2つのプログラムが同じ出力を出すか、出力が異なるか、コンパイルや実行に失敗するかを、実行結果に基づいて評価するベンチマークが必要だと考えています。ソースレベルのコード生成の成功率や単体テストの合格率だけでは、変換が実際の出力に与える影響を直接測るのは難しいです。同じ出力を出す2つのプログラムでも構造は大きく異なる場合があり、小さな属性やインデクシングマップの変更でも結果が変わることがあります。

## 実行でラベルを作るパイプライン

変異の候補は方言ごとの検証を経て、失敗した場合は最大3回まで再生成されます。Execution Sandbox AgentはIREEで2つのプログラムを同じ決定的条件でコンパイルして実行し、numpy.array\_equalでビット単位の同値性を比較します。コンパイルまたは実行に失敗するとERROR、出力が異なるとDIVERGE、同じならEQUIVのラベルが付与されます。この正解ラベルはモデルではなく、実行だけで決まります。

![Figure 1: Overview of MLIRBench.Benchmark construction (upper):PyTorch programs are lowered to torch and linalg seeds. The Mutation Agent transforms a seed𝐴 in…](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-0881f44f1748a4b3a64a9d00ef2f1540.png?thumb=512)

**Figure 1** .Overview of MLIRBench.Benchmark construction (upper):PyTorch programs are lowered to torch and linalg seeds. The Mutation Agent transforms a seed𝐴 into𝐵, guided by dialect-specific structural analysis, and records the mutation metadata. The Execution Sandbox Agent executes𝐴 and𝐵 on fixed inputs to determine the ground-truth label𝑦.Execution- hidden evaluation (lower):each evaluated model receives only𝐴,𝐵, the dialect tag, and input values. The Judge Agent scores the model response using the execution record, mutation metadata, and reference explanation; only execution determines𝑦. Blue boxes denote LLM calls. The code example shows a row-wise max reduction whose initial value is changed from−∞ (0xFF800000in MLIR) to0.0.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの2ページ目から図の部分を抽出しています。

![Figure 2: Dataset construction pipeline. MLIRBench starts from curated PyTorch programs, lowers them into torch and linalg MLIR, applies dialect-specific mutat…](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-e2201656c5031f57c2855b2f4952d14d.png?thumb=512)

**Figure 2** .Dataset construction pipeline. MLIRBench starts from curated PyTorch programs, lowers them into torch and linalg MLIR, applies dialect-specific mutation rules, and validates the resulting program pairs through compilation and execution.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

## 実行結果を伏せたままモデルを採点する手法

LLM Reasoning Agentには、2つのMLIRプログラム、方言タグ、決定的な入力値だけが渡され、実行出力、正解ラベル、Judgeのスコアは渡されません。モデルはAとBの出力をまず予測し、そのうえでEQUIV、DIVERGE、ERRORのいずれかのラベルを出力します。Judge Agentは実行記録をもとにハードラベル精度を決定的に計算し、結果の振る舞いスコアrと説明の質qを採点します。

![Table 2: Reasoning Agent evaluation scale](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-827dd04c89bee06f010cf92920059962.png?thumb=512)

**Table 2** .Reasoning Agent evaluation scale.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

![Table 19: Judge Agent configuration](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-f49129d7e4e65b2c87bdd94c2a9477d2.png?thumb=512)

**Table 19** .Judge Agent configuration.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの20ページ目から図の部分を抽出しています。

## ラベル精度と振る舞い予測のギャップ

Gemini 3.1 Proは、1,768組全体で92.65%のハードラベル精度と74.18の集計スコアを記録しました。同じモデルの結果の振る舞いスコアは5.04/10でした。ハードラベル精度は高いものの、予測された出力の振る舞いのスコアは低く、正解ラベルを当てても、具体的な実行の振る舞いを正確に追跡できていないという差が見られます。同じモデルはERROR事例の97.02%を正解しましたが、DIVERGE事例は68.73%にとどまり、実際には発散する84組をEQUIVと誤分類しました。

![Figure 3: Benchmark performance across nine evaluated models on 888 linalg and 880 torch pairs. Label accuracy includes all attempts; result and explanation sc…](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-7ab86123a86ca961193b9921421fef43.png?thumb=512)

**Figure 3** .Benchmark performance across nine evaluated models on 888 linalg and 880 torch pairs. Label accuracy includes all attempts; result and explanation scores are normalized by their maxima and averaged over valid responses.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

## 変異レベルごとの難易度の差

変異レベルはL1からL5まで、構文を保つ編集から誤りを誘発する変異までに分かれます。Gemini 3.1 ProはL5で94.94点と高かった一方、他の複数のモデルはL5で低いスコアにとどまりました。ただし、このレベルごとの難易度は単調な順序にはなっておらず、失敗を誘発する変異に強いモデルもありました。スコアは、ラベル精度と振る舞いスコアの両方を反映した値です。

![Table 4: Average benchmark score by mutation level, com- bininglinalgandtorch](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-28b4a99c43e19854da39826049d54086.png?thumb=512)

**Table 4** .Average benchmark score by mutation level, com- bininglinalgandtorch.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

![Table 8: Mutation levels used by the Mutation Agent](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-e9659d23c53946243056263426ad2e98.png?thumb=512)

**Table 8** .Mutation levels used by the Mutation Agent.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの15ページ目から図の部分を抽出しています。

## 適用範囲と残された課題

ベンチマークは、torchとlinalgの2つの方言、40個のシードプログラムに限られます。実行ラベルはIREEと固定されたコンパイル構成で生成されるため、他のバックエンドやハードウェアでは結果が変わる可能性があります。説明の質のスコアはLLMによる採点に依存するため、診断のシグナルとして捉えるのが適切です。2つのgpt-oss-120bの応答は、JSON契約を守れませんでした。

![Table 7: Source program seed categories used in MLIRBench](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-26a51bb642423e8e7a356b13af9668b7.png?thumb=512)

**Table 7** .Source program seed categories used in MLIRBench.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの14ページ目から図の部分を抽出しています。

![Table 9: Mutation rule coverage by dialect](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-46698eae5ad22fed7543deff416136e1.png?thumb=512)

**Table 9** .Mutation rule coverage by dialect.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの15ページ目から図の部分を抽出しています。

![Table 14: Required JSON output schema for each Reasoning Agent response](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-369c6d86c440f5de1fdebb0aca0d961f.png?thumb=512)

**Table 14** .Required JSON output schema for each Reasoning Agent response.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの18ページ目から図の部分を抽出しています。

![Table 21: Explanation-quality anchors](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-c5067d7be8b856f5c5f4ad01fbdcebf0.png?thumb=512)

**Table 21** .Explanation-quality anchors.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの21ページ目から図の部分を抽出しています。

![Table 24: Model-level aggregate scores (0–100) on identical responses to the same 100 program pairs. Original denotes historical grades on this sample; R1–R3 d…](https://refivu.com/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3/figures/figure-1981329ff912f2a21c10b5728db1672b.png?thumb=512)

**Table 24** .Model-level aggregate scores (0–100) on identical responses to the same 100 program pairs. Original denotes historical grades on this sample; R1–R3 denote fresh primary-judge repeats. Alt. changes the judge, No ref. removes the generated reference narrative, and Fixed uses structure/exactness/value maxima of 2/5/3.

[出典](https://arxiv.org/abs/2611.14881v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 論文の図を引用 · 元のPDFの24ページ目から図の部分を抽出しています。

## 論文情報

- **著者**: Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2026年11月11日
- **登録日**: 2026年11月13日
- **更新日**: 2026年11月11日
- **バージョン**: v1
- **arXiv**: 2611.14881
- **カテゴリ**: cs.PL · cs.AI · cs.LG
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2611.14881v1) · [PDF ↗](https://arxiv.org/pdf/2611.14881v1)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

In recent years, large language models (LLMs) have become increasingly popular in software engineering and have performed well on different programming tasks. However, it is still difficult to know whether these models truly understand program behavior or whether they mainly rely on patterns learned from their training data. This distinction is particularly important for intermediate representations (IRs), where operations, dataflow, and execution semantics are explicitly represented. In this paper, we introduce MLIRBench, a benchmark for evaluating how LLMs reason about MLIR programs. MLIRBench uses a multi-agent pipeline to generate program mutations, validate their behavior through execution, and construct reasoning tasks from torch and linalg program pairs. The dataset contains 1,768 validated pairs, including 888 linalg pairs and 880 torch pairs, labeled as EQUIV, DIVERGE, or ERROR. We evaluated nine models, including five open-weight and four proprietary models. Gemini 3.1 Pro achieved the highest hard-label accuracy of 92.65% across all 1,768 pairs, counting unsuccessful predictions as incorrect. Across its 1,768 scored predictions, it achieved an aggregate score of 74.18 and a judge-assigned result-behavior score of 5.04/10. These results show that strong semantic classification does not necessarily imply accurate prediction of detailed execution behavior, highlighting a gap in current LLM reasoning over compiler IRs. By exposing this gap through execution-validated program pairs, MLIRBench provides a reproducible foundation for studying semantic reasoning over compiler IRs and related tasks such as program repair and semantic classification.

## この論文を引用

Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari (2026). MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning. arXiv:2611.14881v1. https://arxiv.org/abs/2611.14881v1

**BibTeX**

```
@misc{maganti2026mlirbench,
  title = {{MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning}},
  author = {Pranava Sai Maganti and Meghasyam Peddireddy and Muzakker Hossain and Kaining Gao and Farhan Ahmed and Ali Jannesari},
  year = {2026},
  eprint = {2611.14881},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.14881v1}
}
```

## ほかの論文解説

- [LLMs and the Homogenization of Teaching](https://refivu.com/ja/papers/9feafc0c-4c8c-4c4e-9fc9-7decd14631a6-llms-and-the-homogenization-of-teaching.md)
- [Testing Conversation Preservation Across LLM APIs: A Rule-Based Oracle for Detecting Silent Information Loss](https://refivu.com/ja/papers/a42f6e56-458a-4ddc-9fa1-957b8bee3917-testing-conversation-preservation-across-llm-apis-a-rule.md)
- [Do Large Language Models Show Racial and Sex Bias in Pain Management? A Counterfactual Audit of GPT, Claude, Gemini, Llama, DeepSeek and Qwen](https://refivu.com/ja/papers/35f582d1-90ca-40c6-a272-2cfa4575fafe-do-large-language-models-show-racial-and-sex.md)
- [Abstention Is Not Threshold Compliance: Stated Scoring Rules in Open Language Models](https://refivu.com/ja/papers/3fb56329-b972-47e1-93dd-325c7dec2433-abstention-is-not-threshold-compliance-stated-scoring-rules.md)
- [What Entropy-Based View Selection Cannot See: An Audit of Test-Time Adaptation for Vision-Language Models](https://refivu.com/ja/papers/33429bf8-3f8e-4843-8913-39adea9435ef-what-entropy-based-view-selection-cannot-see-an.md)
- [DETER: Suppression During Pretraining for Tamper Resistance](https://refivu.com/ja/papers/40920107-3e63-416b-b9ae-aa96b4272bcf-deter-suppression-during-pretraining-for-tamper-resistance.md)
- [Almost Optimal Lower Bounds under Almost ETH for Approximating Euclidean k-means](https://refivu.com/ja/papers/a85bf189-6876-4f9f-864d-01bf061810a2-almost-optimal-lower-bounds-under-almost-eth-for.md)
- [Neural Compression for Scientific Particle Data: Perspectives on How Learning Can Help](https://refivu.com/ja/papers/54659143-795e-405b-ba95-cbdbdf75eee4-neural-compression-for-scientific-particle-data-perspectives.md)
- [What Does an RF Fingerprint Identify? A Cross-Corpus Evaluation of Hardware-Family-Associated and Unit-Level Signal](https://refivu.com/ja/papers/72e29cc3-1565-4b43-91c9-0f944f7d07f9-what-does-an-rf-fingerprint-identify-a-cross.md)
- [BirdDreams: Joint Perspective and BEV Video Generation for a Plausible, Reactive Driving World Model](https://refivu.com/ja/papers/49985494-bb84-4882-879e-e3c57a13065c-birddreams-joint-perspective-and-bev-video-generation-for.md)
- [Don't Match the Noise: Distribution Matching under Unknown Measurement Error with an Audit Sample](https://refivu.com/ja/papers/de15a9d7-bb0d-4733-b37d-e0640e0776d4-don-t-match-the-noise-distribution-matching-under.md)
- [The Rebundling of Freelance Work in the AI Age](https://refivu.com/ja/papers/29433196-d3ad-4ae3-af6e-63f056f0e0ef-the-rebundling-of-freelance-work-in-the-ai.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/d46c5b16-cdaa-408c-9a54-99118c85d6e3-mlirbench-a-benchmark-and-dataset-for-compiler-and)
