Ruyun Wang
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Ruyun Wang has a total of 10 co-authors. Here are the top co-authors by number of shared publications:
- Chen Lyu
Shandong Normal University, Jinan, China
1 shared publication - Ge Li
Shenzhen Graduate School, Peking University, Shenzhen, China
1 shared publication - Jia Zhou
Chengdu Institute of Biology, Chinese Academy of Sciences, Chengdu 610041, China
1 shared publication Qinglin Wang
1 shared publication- Tao Huang
School of Computer and Control Engineering, Yantai University, Yantai 264005, China
1 shared publication - Tao Lu
Chengdu Institute of Biology, Chinese Academy of Sciences, Chengdu, People’s Republic of China
1 shared publication
Latest Publications
- Open Access
SemGuard: Real-Time Semantic Evaluator for Correcting LLM-Generated Code
Large Language Models (LLMs) can translate natural language requirements into code, yet empirical analyses of representative models reveal that semantic errors-programs that compile but behave incorrectly-constitute the majority of observed faults (e.g., >60% on DeepSeek-Coder-6.7B and QwenCoder-7B). Post-hoc repair pipelines detect such faults only after execution, incurring latency, relying on incomplete test suites, and often mis-localizing the defect. Since semantic drift originates in the autoregressive decoding process, intervening while the code is being generated is a direct way to stop error propagation. Constrained-decoding approaches such as ROCODE attempt this, but still wait until the entire program runs to obtain feedback and use entropy heuristics that do not truly capture semantics. A more effective solution must inject semantic signals-early and precisely-into the decoding process.We present SemGuard, a semantic-evaluator-driven framework that performs real-time, line-level semantic supervision. To train the evaluator, we build SemDiff, the first dataset with fine-grained annotations that mark the exact line where a correct and an incorrect implementation diverge. The evaluator, once embedded in the LLM's decoder, flags deviations on partial code, rolls back to the faulty line, and guides regeneration-without executing the program or requiring test cases. Across four benchmarks, SemGuard consistently outperforms state-of-the-art baselines. It lowers the semantic error rate by 19.86% on SemDiff relative to ROCODE, and lifts Pass@1 by 48.92% on the real-world LiveCodeBench with CodeLlama-7B. Similar gains hold for StarCoder2-7B on MBPP and for DeepSeekCoder-6.7B on the Java benchmark SemDiff-Java, demonstrating model- and language-agnostic effectiveness.
Open AccessSemGuard: Real-Time Semantic Evaluator for Correcting LLM-Generated Code
Large Language Models (LLMs) can translate natural language requirements into code, yet empirical analyses of representative models reveal that semantic errors-programs that compile but behave incorrectly-constitute the majority of observed faults (e.g., >60% on DeepSeek-Coder-6.7B and QwenCoder-7B). Post-hoc repair pipelines detect such faults only after execution, incurring latency, relying on incomplete test suites, and often mis-localizing the defect. Since semantic drift originates in the autoregressive decoding process, intervening while the code is being generated is a direct way to stop error propagation. Constrained-decoding approaches such as ROCODE attempt this, but still wait until the entire program runs to obtain feedback and use entropy heuristics that do not truly capture semantics. A more effective solution must inject semantic signals-early and precisely-into the decoding process.We present SemGuard, a semantic-evaluator-driven framework that performs real-time, line-level semantic supervision. To train the evaluator, we build SemDiff, the first dataset with fine-grained annotations that mark the exact line where a correct and an incorrect implementation diverge. The evaluator, once embedded in the LLM's decoder, flags deviations on partial code, rolls back to the faulty line, and guides regeneration-without executing the program or requiring test cases. Across four benchmarks, SemGuard consistently outperforms state-of-the-art baselines. It lowers the semantic error rate by 19.86% on SemDiff relative to ROCODE, and lifts Pass@1 by 48.92% on the real-world LiveCodeBench with CodeLlama-7B. Similar gains hold for StarCoder2-7B on MBPP and for DeepSeekCoder-6.7B on the Java benchmark SemDiff-Java, demonstrating model- and language-agnostic effectiveness.
- Open Access
- 31 August 2023
- Published by MDPI AG in Remote Sensing
- Vol. 15 (17) , 4280
Quantifying Water Impoundment-Driven Air Temperature Changes in the Dammed Jinsha River, Southwest China
A number of previous studies have contributed to a better understanding of the thermal impacts of dam-related reservoirs on stream temperature, but very few studies have focused on air temperature, especially at the catchment scale. In addition, due to the lack of quantitative analysis, the identification of the effects of water impoundment on regional air temperature is still lacking. We investigated the impacts of reservoirs on the regional air temperature changes before and after two large dam constructions in the lower Jinsha River located in southwest China, by using a 40 year record of reanalysis data at 90 m resolutions. Furthermore, the long short-term memory (LSTM) model was also employed to construct an impoundment effect on the temperature (IET) index. Research results indicate that compared to the pre-impoundment period (1980–2012), the variations in the air temperature at the catchment scale were reduced during the post-impoundment period (2013–2019). The annual maximum air temperature decreased by 0.4 °C relative to the natural regimes. In contrast, the cumulative effects of dam-related reservoirs increased the annual mean and minimum air temperature by 0.1 °C and 1.0 °C, respectively. Warming effects prevailed during the dry season and in the regions with high elevations, while cooling effects dominated within a 4 km buffer of the reservoirs. Therefore, this study offers important insights about the impacts of anthropogenic impoundments on air temperature changes, which could be useful for policymakers to have a more informed and profound understanding of local climate changes in dammed areas.
- 31 August 2023
- Published by MDPI AG in Remote Sensing
- Vol. 15 (17) , 4280
Open AccessQuantifying Water Impoundment-Driven Air Temperature Changes in the Dammed Jinsha River, Southwest China
A number of previous studies have contributed to a better understanding of the thermal impacts of dam-related reservoirs on stream temperature, but very few studies have focused on air temperature, especially at the catchment scale. In addition, due to the lack of quantitative analysis, the identification of the effects of water impoundment on regional air temperature is still lacking. We investigated the impacts of reservoirs on the regional air temperature changes before and after two large dam constructions in the lower Jinsha River located in southwest China, by using a 40 year record of reanalysis data at 90 m resolutions. Furthermore, the long short-term memory (LSTM) model was also employed to construct an impoundment effect on the temperature (IET) index. Research results indicate that compared to the pre-impoundment period (1980–2012), the variations in the air temperature at the catchment scale were reduced during the post-impoundment period (2013–2019). The annual maximum air temperature decreased by 0.4 °C relative to the natural regimes. In contrast, the cumulative effects of dam-related reservoirs increased the annual mean and minimum air temperature by 0.1 °C and 1.0 °C, respectively. Warming effects prevailed during the dry season and in the regions with high elevations, while cooling effects dominated within a 4 km buffer of the reservoirs. Therefore, this study offers important insights about the impacts of anthropogenic impoundments on air temperature changes, which could be useful for policymakers to have a more informed and profound understanding of local climate changes in dammed areas.