105 research outputs found
Sympathy and Punishment: Evolution of Cooperation in Public Goods Game
An important way to maintain human cooperation is punishing defection. However, since punishment is costly, how can it arise and evolve given that individuals who contribute but do not punish fare better than the punishers? This leads to a violation of causality, since the evolution of punishment is prior to the one of cooperation behaviour in evolutionary dynamics. Our public goods game computer simulations based on generalized Moran Process, show that, if there exists a \'behaviour-based sympathy\' that compensates those who punish at a personal cost, the way for the emergence and establishment of punishing behaviour is paved. In this way, the causality violation dissipates. Among humans sympathy can be expressed in many ways such as care, praise, solace, ethical support, admiration, and sometimes even adoration; in our computer simulations, we use a small amount of transfer payment to express \'behaviour-based sympathy\'. Our conclusions indicate that, there exists co-evolution of sympathy, punishment and cooperation. According to classical philosophy literature, sympathy is a key factor in morality and justice is embodied by punishment; in modern societies, both the moral norms and the judicial system, the representations of sympathy and punishment, play an essential role in stable social cooperation.Public Goods Game, Cooperation, Social Dilemma, Co-Evolution, Sympathy, Punishment
Hierarchical and distributed demand response control strategy for thermostatically controlled appliances in smart grid
Thermostatically controlled appliances (TCAs) have great thermal storage capability and are therefore excellent demand response (DR) resources to solve the problem of power fluctuation caused by renewable energy. Traditional centralized management is affected by communication quality severely and thus usually has poor realtime control performance. To tackle this problem, a hierarchical and distributed control strategy for TCAs is established. In the proposed control strategy, target assignment has the feature of self-regulating, owing to the designed target assignment and compensating algorithm which can utilize DR resources maximally in the controlled regions and get better control effects. Besides, the model prediction strategy and customers' responsive behavior model are integrated into the original optimal temperature regulation (OTR-O), and OTR-O will be evolved into improved optimal temperature regulation. A series of case studies have been given to demonstrate the control effectiveness of the proposed control strategy.This work was supported by National High Technology Research and Development Program of China (863 Program) (No. 2015AA050403), National Natural Science Foundation of China (Nos. 51377117, 51407125, 51361135704), China-UK NSFC/EPSRC EV Grant (Nos. 5136113015, EP/L001039/1), "131'' Talent and Innovative Team of Tianjin City, State Grid Corporation of China (No. KJ16-1-42), Innovation Leading Talent Project of Qingdao, Shandong Province (No. 15-10-3-15-(43)-zch), and Innovation and Entrepreneurship Development Funds Projects of Qingdao Blue Valley Core Area (No. 201503004). The authors also would like to thank Prof. Ned Djilali, Mr. Simon Parkinson and Mr. David P. Chassin for their helpful comments and insights.FacultyReviewe
Towards Enhancing In-Context Learning for Code Generation
In-context learning (ICL) with pre-trained language models (PTLMs) has shown
great success in code generation. ICL does not require training. PTLMs take as
the input a prompt consisting of a few requirement-code examples and a new
requirement, and output a new program. However, existing studies simply reuse
ICL techniques for natural language generation and ignore unique features of
code generation. We refer to these studies as standard ICL.
Inspired by observations of the human coding process, we propose a novel ICL
approach for code generation named AceCoder. Compared to standard ICL, AceCoder
has two novelties. (1) Example retrieval. It retrieves similar programs as
examples and learns programming skills (e.g., algorithms, APIs) from them. (2)
Guided Code Generation. It encourages PTLMs to output an intermediate
preliminary (e.g., test cases, APIs) before generating programs. The
preliminary can help PTLMs understand requirements and guide the next code
generation. We apply AceCoder to six PTLMs (e.g., Codex) and evaluate it on
three public benchmarks using the Pass@k. Results show that AceCoder can
significantly improve the performance of PTLMs on code generation. (1) In terms
of Pass@1, AceCoder outperforms standard ICL by up to 79.7% and fine-tuned
models by up to 171%. (2) AceCoder is effective in PTLMs with different sizes
(e.g., 1B to 175B) and different languages (e.g., Python, Java, and
JavaScript). (3) We investigate multiple choices of the intermediate
preliminary. (4) We manually evaluate generated programs in three aspects and
prove the superiority of AceCoder. (5) Finally, we discuss some insights about
ICL for practitioners
SkCoder: A Sketch-based Approach for Automatic Code Generation
Recently, deep learning techniques have shown great success in automatic code
generation. Inspired by the code reuse, some researchers propose copy-based
approaches that can copy the content from similar code snippets to obtain
better performance. Practically, human developers recognize the content in the
similar code that is relevant to their needs, which can be viewed as a code
sketch. The sketch is further edited to the desired code. However, existing
copy-based approaches ignore the code sketches and tend to repeat the similar
code without necessary modifications, which leads to generating wrong results.
In this paper, we propose a sketch-based code generation approach named
SkCoder to mimic developers' code reuse behavior. Given a natural language
requirement, SkCoder retrieves a similar code snippet, extracts relevant parts
as a code sketch, and edits the sketch into the desired code. Our motivations
are that the extracted sketch provides a well-formed pattern for telling models
"how to write". The post-editing further adds requirement-specific details to
the sketch and outputs the complete code. We conduct experiments on two public
datasets and a new dataset collected by this work. We compare our approach to
20 baselines using 5 widely used metrics. Experimental results show that (1)
SkCoder can generate more correct programs, and outperforms the
state-of-the-art - CodeT5-base by 30.30%, 35.39%, and 29.62% on three datasets.
(2) Our approach is effective to multiple code generation models and improves
them by up to 120.1% in Pass@1. (3) We investigate three plausible code
sketches and discuss the importance of sketches. (4) We manually evaluate the
generated code and prove the superiority of our SkCoder in three aspects.Comment: Accepted by the 45th IEEE/ACM International Conference on Software
Engineering (ICSE 2023
Extending the limits of Pt/C catalysts with passivation-gas-incorporated atomic layer deposition
Controlling the morphology of noble metal nanoparticles during surface depositions is strongly influenced by precursor–substrate and precursor–deposit interactions. Depositions can be improved through a variety of means, including tailoring the surface energy of a substrate to improve precursor wettability, or by modifying the surface energy of the deposits themselves. Here, we show that carbon monoxide can be used as a passivation gas during atomic layer deposition to modify the surface energy of already deposited Pt nanoparticles to assist direct deposition onto a carbon catalyst support. The passivation process promotes two-dimensional growth leading to Pt nanoparticles with suppressed thicknesses and a more than 40% improvement in Pt surface-to-volume ratio. This approach to synthesizing nanoparticulate Pt/C catalysts achieved high Pt mass activities for the oxygen reduction reaction, along with excellent stability likely facilitated by strong catalyst–support interactions afforded by this synthetic technique.acceptedVersion© 2018. This is the authors’ accepted and refereed manuscript to the article.
Overlapped tobacco shred image segmentation and area computation using an improved Mask RCNN network and COT algorithm
IntroductionThe classification of the four tobacco shred varieties, tobacco silk, cut stem, expanded tobacco silk, and reconstituted tobacco shred, and the subsequent determination of tobacco shred components, are the primary tasks involved in calculating the tobacco shred blending ratio. The identification accuracy and subsequent component area calculation error directly affect the composition determination and quality of the tobacco shred. However, tiny tobacco shreds have complex physical and morphological characteristics; in particular, there is substantial similarity between the expanded tobacco silk and tobacco silk varieties, and this complicates their classification. There must be a certain amount of overlap and stacking in the distribution of tobacco shreds on the actual tobacco quality inspection line. There are 24 types of overlap alone, not to mention the stacking phenomenon. Self-winding does not make it easier to distinguish such varieties from the overlapped types, posing significant difficulties for machine vision-based tobacco shred classification and component area calculation tasks.MethodsThis study focuses on two significant challenges associated with identifying various types of overlapping tobacco shreds and acquiring overlapping regions to calculate overlapping areas. It develops a new segmentation model for tobacco shred images based on an improved Mask region-based convolutional neural network (RCNN). Mask RCNN is used as the segmentation network’s mainframe. Convolutional network and feature pyramid network (FPN) in the backbone are replaced with Densenet121 and U-FPN, respectively. The size and aspect ratios of anchors parameters in region proposal network (RPN) are optimized. An algorithm for the area calculation of the overlapped tobacco shred region (COT) is also proposed, which is applied to overlapped tobacco shred mask images to obtain overlapped regions and calculate the overlapped area.ResultsThe experimental results showed that the final segmentation accuracy and recall rates are 89.1% and 73.2%, respectively. The average area detection rate of 24 overlapped tobacco shred samples increases from 81.2% to 90%, achieving high segmentation accuracy and overlapped area calculation accuracy.DiscussionThis study provides a new implementation method for the type identification and component area calculation of overlapped tobacco shreds and a new approach for other similar overlapped image segmentation tasks
DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
How to evaluate the coding abilities of Large Language Models (LLMs) remains
an open question. We find that existing benchmarks are poorly aligned with
real-world code repositories and are insufficient to evaluate the coding
abilities of LLMs.
To address the knowledge gap, we propose a new benchmark named DevEval, which
has three advances. (1) DevEval aligns with real-world repositories in multiple
dimensions, e.g., code distributions and dependency distributions. (2) DevEval
is annotated by 13 developers and contains comprehensive annotations (e.g.,
requirements, original repositories, reference code, and reference
dependencies). (3) DevEval comprises 1,874 testing samples from 117
repositories, covering 10 popular domains (e.g., Internet, Database). Based on
DevEval, we propose repository-level code generation and evaluate 8 popular
LLMs on DevEval (e.g., gpt-4, gpt-3.5, StarCoder 2, DeepSeek Coder, CodeLLaMa).
Our experiments reveal these LLMs' coding abilities in real-world code
repositories. For example, in our experiments, the highest Pass@1 of
gpt-4-turbo is only 53.04%. We also analyze LLMs' failed cases and summarize
their shortcomings. We hope DevEval can facilitate the development of LLMs in
real code repositories. DevEval, prompts, and LLMs' predictions have been
released.Comment: Accepted by the 62nd Annual Meeting of the Association for
Computational Linguistics (ACL 2024). arXiv admin note: substantial text
overlap with arXiv:2404.00599, arXiv:2401.0640
SegRap2023: A Benchmark of Organs-at-Risk and Gross Tumor Volume Segmentation for Radiotherapy Planning of Nasopharyngeal Carcinoma
Radiation therapy is a primary and effective NasoPharyngeal Carcinoma (NPC)
treatment strategy. The precise delineation of Gross Tumor Volumes (GTVs) and
Organs-At-Risk (OARs) is crucial in radiation treatment, directly impacting
patient prognosis. Previously, the delineation of GTVs and OARs was performed
by experienced radiation oncologists. Recently, deep learning has achieved
promising results in many medical image segmentation tasks. However, for NPC
OARs and GTVs segmentation, few public datasets are available for model
development and evaluation. To alleviate this problem, the SegRap2023 challenge
was organized in conjunction with MICCAI2023 and presented a large-scale
benchmark for OAR and GTV segmentation with 400 Computed Tomography (CT) scans
from 200 NPC patients, each with a pair of pre-aligned non-contrast and
contrast-enhanced CT scans. The challenge's goal was to segment 45 OARs and 2
GTVs from the paired CT scans. In this paper, we detail the challenge and
analyze the solutions of all participants. The average Dice similarity
coefficient scores for all submissions ranged from 76.68\% to 86.70\%, and
70.42\% to 73.44\% for OARs and GTVs, respectively. We conclude that the
segmentation of large-size OARs is well-addressed, and more efforts are needed
for GTVs and small-size or thin-structure OARs. The benchmark will remain
publicly available here: https://segrap2023.grand-challenge.orgComment: A challenge report of SegRap2023 (organized in conjunction with
MICCAI2023
Multi-Center Fetal Brain Tissue Annotation (FeTA) Challenge 2022 Results
Segmentation is a critical step in analyzing the developing human fetal
brain. There have been vast improvements in automatic segmentation methods in
the past several years, and the Fetal Brain Tissue Annotation (FeTA) Challenge
2021 helped to establish an excellent standard of fetal brain segmentation.
However, FeTA 2021 was a single center study, and the generalizability of
algorithms across different imaging centers remains unsolved, limiting
real-world clinical applicability. The multi-center FeTA Challenge 2022 focuses
on advancing the generalizability of fetal brain segmentation algorithms for
magnetic resonance imaging (MRI). In FeTA 2022, the training dataset contained
images and corresponding manually annotated multi-class labels from two imaging
centers, and the testing data contained images from these two imaging centers
as well as two additional unseen centers. The data from different centers
varied in many aspects, including scanners used, imaging parameters, and fetal
brain super-resolution algorithms applied. 16 teams participated in the
challenge, and 17 algorithms were evaluated. Here, a detailed overview and
analysis of the challenge results are provided, focusing on the
generalizability of the submissions. Both in- and out of domain, the white
matter and ventricles were segmented with the highest accuracy, while the most
challenging structure remains the cerebral cortex due to anatomical complexity.
The FeTA Challenge 2022 was able to successfully evaluate and advance
generalizability of multi-class fetal brain tissue segmentation algorithms for
MRI and it continues to benchmark new algorithms. The resulting new methods
contribute to improving the analysis of brain development in utero.Comment: Results from FeTA Challenge 2022, held at MICCAI; Manuscript
submitted. Supplementary Info (including submission methods descriptions)
available here: https://zenodo.org/records/1062864
- …