Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibility

Nickil Maveli, Antonio Vergari, Shay B Cohen


Abstract
LLMs demonstrate strong performance on code benchmarks, yet round-trip code execution reveals limitations in their ability to maintain consistent reasoning across forward and backward execution. We present RoundTripCodeEval (RTCE), a comprehensive benchmark consisting of four distinct code execution reasoning tasks designed to rigorously test round-trip consistency. RTCE provides an execution-free, exact-match evaluation of bijection fidelity, assessing whether models preserve a consistent one-to-one mapping between encoding and decoding operations across various algorithms and directions. We systematically evaluate state-of-the-art Code-LLMs using zero-shot prompting, supervised fine-tuning on execution traces, and self-reflection mechanisms. Each yields modest improvements, but none closes the gap, indicating that current LLMs struggle with true round-trip consistency, which demonstrates that they lack the internal coherence required for trustworthy code reasoning. RTCE surfaces several new and previously unmeasured insights that are not captured by existing I/O-prediction, execution-reasoning, or round-trip natural-language benchmarks.
Anthology ID:
2026.findings-acl.1279
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
25625–25660
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1279/
DOI:
Bibkey:
Cite (ACL):
Nickil Maveli, Antonio Vergari, and Shay B Cohen. 2026. Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibility. In Findings of the Association for Computational Linguistics: ACL 2026, pages 25625–25660, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibility (Maveli et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1279.pdf
Checklist:
 2026.findings-acl.1279.checklist.pdf