OSRC-RL: Optimizing Software Reliability at Compile-Time Using Reinforcement Learning

Enhancing software reliability mitigates failures and reduces maintenance costs. In the LLVM compiler, different option sequences applied to the intermediate representation (IR) produce binaries with varying reliability levels, making the search for an optimal sequence in reliability-oriented compilation a key challenge. Although reinforcement learning (RL) has been employed to automate this process, existing methods suffer from two major limitations: they rely on structure-based static IR embeddings that overlook the dynamic behaviors induced by compilation transformations, leading to low-fidelity state representations, and construct action spaces that fail to preserve critical inter-option dependencies while maintaining spatial compactness, thereby impairing training efficiency and constraining optimization gains. This paper presents OSRC-RL (Optimizing Software Reliability at Compile-time using Reinforcement Learning), which integrates two novel components: a Compilation Behavior-Aware State Representation (CBA-SR) and an Action Space Construction via Option Dependency Awareness and space minimization (ASC-ODA). CBA-SR jointly encodes program semantics and compilation dynamics, using activated options as multi-label supervisory signals to guide an expressive Graph Isomorphism Network in learning IR subgraph patterns correlated with option activations, yielding high-fidelity states that enable more reliable policy learning and faster convergence. ASC-ODA reconciles dependency preservation with spatial compactness by constructing Option Dependency Graph, performing dependency-aware hierarchical clustering and recursive intra-cluster path analysis, and applying a preference-aware selection to generate a compact yet dependency-preserving action space that enhances sample efficiency and policy stability. Evaluations across 20 benchmarks show that OSRC-RL achieves the highest average reliability gain ( I rg = 0.6694) and competitive convergence speed compared with five baselines. Ablations attribute these gains to its core components: CBA-SR (up to 11.34% improvement via IR-graph learning) and ASC-ODA (up to 15.22% improvement via dependency-faithful actions). On industrial instances, it attains a 0.1818 average gain, surpassing the next-best method by 33.77%. Bounded overheads are mitigated by Lightweight Post-Processing (LPP), ensuring practical feasibility.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Architecture and Code Optimization
Published
2026-03-31
DOI
https://doi.org/10.1145/3801975
Primary Topic
Software Reliability and Analysis Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

OSRC-RL: Optimizing Software Reliability at Compile-Time Using Reinforcement Learning

Hanjiang Liu, Youcong Ni, Xin Du, Dingbang Fang et al.
ACM Transactions on Architecture and Code Optimization
Software Reliability and Analysis Research
article

OSRC-RL: Optimizing Software Reliability at Compile-Time Using Reinforcement Learning

Hanjiang Liu, Youcong Ni, Xin Du, Dingbang Fang, Yongji Xu
article en

Abstract

Enhancing software reliability mitigates failures and reduces maintenance costs. In the LLVM compiler, different option sequences applied to the intermediate representation (IR) produce binaries with varying reliability levels, making the search for an optimal sequence in reliability-oriented compilation a key challenge. Although reinforcement learning (RL) has been employed to automate this process, existing methods suffer from two major limitations: they rely on structure-based static IR embeddings that overlook the dynamic behaviors induced by compilation transformations, leading to low-fidelity state representations, and construct action spaces that fail to preserve critical inter-option dependencies while maintaining spatial compactness, thereby impairing training efficiency and constraining optimization gains. This paper presents OSRC-RL (Optimizing Software Reliability at Compile-time using Reinforcement Learning), which integrates two novel components: a Compilation Behavior-Aware State Representation (CBA-SR) and an Action Space Construction via Option Dependency Awareness and space minimization (ASC-ODA). CBA-SR jointly encodes program semantics and compilation dynamics, using activated options as multi-label supervisory signals to guide an expressive Graph Isomorphism Network in learning IR subgraph patterns correlated with option activations, yielding high-fidelity states that enable more reliable policy learning and faster convergence. ASC-ODA reconciles dependency preservation with spatial compactness by constructing Option Dependency Graph, performing dependency-aware hierarchical clustering and recursive intra-cluster path analysis, and applying a preference-aware selection to generate a compact yet dependency-preserving action space that enhances sample efficiency and policy stability. Evaluations across 20 benchmarks show that OSRC-RL achieves the highest average reliability gain ( I rg = 0.6694) and competitive convergence speed compared with five baselines. Ablations attribute these gains to its core components: CBA-SR (up to 11.34% improvement via IR-graph learning) and ASC-ODA (up to 15.22% improvement via dependency-faithful actions). On industrial instances, it attains a 0.1818 average gain, surpassing the next-best method by 33.77%. Bounded overheads are mitigated by Lightweight Post-Processing (LPP), ensuring practical feasibility.

ACM Transactions on Architecture and Code Optimization
Fujian Normal University (CN), Shandong Transportation Research Institute (CN)
Openalex Percentile: Top 31%
Software Reliability and Analysis Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.