#  AutoCoder: Enhancing Code Large Language Model with AIEV-Instruct

Bin Lei1 Yuchen Li2 Qiuwu Chen2
1University of Connecticut 2AIGCode
<EMAIL_ADDRESS>{liyuchen<EMAIL_ADDRESS>

###### Abstract

We introduce AutoCoder, the first Large Language Model to surpass GPT-4 Turbo
(April 2024) and GPT-4o in pass@1 on the Human Eval benchmark test
($\mathbf{90.9\%}$ vs. $\mathbf{90.2\%}$). In addition, AutoCoder offers a
more versatile code interpreter compared to GPT-4 Turbo and GPT-4o. It’s code
interpreter can install external packages instead of limiting to built-in
packages. AutoCoder’s training data is a multi-turn dialogue dataset created
by a system combining agent interaction and external code execution
verification, a method we term AIEV-Instruct (Instruction Tuning with Agent-
Interaction and Execution-Verified). Compared to previous large-scale code
dataset generation methods, AIEV-Instruct reduces dependence on proprietary
large models and provides execution-validated code dataset. The code and the
demo video is available in https://github.com/bin123apple/AutoCoder.

##  1 Introduction

Code generation is a critical aspect of modern software development. It
significantly enhances development efficiency and quality by increasing
productivity, reducing errors, standardizing code, accelerating prototyping,
and supporting complex systems [22, 21, 9].Recently, Large Language Models
(LLMs), such as GPT-4 [26] and CodeQwen1.5 [29], have achieved significant
advancements on code generation. These models have shown high accuracy in
producing code that meets user requirements and have been widely adopted in
real-world software development.

Training large language models requires extensive high-quality data [17]. This
is particularly crucial for code generation tasks that demand high accuracy
[13]. OpenAI once hired people to help annotate the Code Instruct dataset for
training their InstructGPT [28]. However, manually annotating large-scale code
instruction datasets is both economically and time-consuming [33]. To address
this challenge, previous work has employed various automated code annotation
methods, such as Self-Instruct [31], Evol-Instruct [25], and OSS-Instruct
[32]. Self-Instruct enhances LLMs’ instruction-following capabilities by using
strong teacher models to generate synthetic coding instructions for fine-
tuning weaker student models. Evol-Instruct improves LLMs’ coding abilities by
iteratively increasing the complexity of seed code instructions through
various heuristics. OSS-Instruct generates diverse and realistic coding
problems by drawing inspiration from open-source code snippets. The essence of
these methods lies in distilling the knowledge of a powerful teacher model
(such as GPT-4 Turbo) to guide a smaller model. This leads to a problem: While
the small model can achieve significant performance improvements, the final
accuracy of the small model is unlikely to surpass that of the teacher model.
Because both the correct and incorrect knowledge from the teacher model are
transferred to the small model. Moreover, although using closed-source models
reduces costs compared to manual annotation, the cost of using closed-source
models remains high. According to our tests, even with the relatively cheaper
GPT-4 Turbo model, generating an average of 6,500 high-quality entries for the
code instruction dataset costs $1,000.

This raises two questions:

  1. 1.

Can we correct the incorrect knowledge generated by the teacher model to
provide more accurate code for the student model?

  2. 2.

Instead of relying on expensive closed-source teacher models, can we enable
our student model to learn autonomously?

To address the first issue, we designed a new large-scale code instruction
dataset annotation method called AIEV-Instruct. It is an interaction system
comprising two agents: a questioner and a programmer. These agents interact to
simulate the process of programmers constructing code according to project
requirements and conducting unit tests. In each dialogue round, we extract the
code generated by the programmers and execute it. The execution results are
returned to the questioner to inform the next round of questions. This process
continues until the programmers’s code passes the unit tests, ensuring the
accuracy of the generated code dataset.

To address the second issue, we sperate AIEV-Instruct into two stages: the
Teaching Stage and the Self-learning Stage. In the Teaching Stage, we rely on
proprietary large models as agents for code annotation, similar to previous
methods. Once our model surpasses the proprietary models in accuracy on the
test set, we transition to the Self-learning Stage. In this stage, we use our
own model as the agent for code annotation. For detailed methodology, refer to
Section 3.

Figure 1: Pass@1 ($\%$) comparison of Various LLMs on the HumanEval Base Test.

Figure 2: Comparison of Code Interpreter Functions between AutoCoder and
GPT-4o. : Nature language generated by the model;: Code generated by the
model. AutoCoder can recognize external package installation commands, whereas
GPT-4o can only run code that includes built-in packages. The demo video is in
https://github.com/bin123apple/AutoCoder .

Under the support of AIEV-Instruct, we obtained 169K high-quality code
instruction data samples. Using this dataset, we trained the AutoCoder series
models, including AutoCoder (33B) and AutoCoder-S (6.7B). As shown in Figure
2, AutoCoder demonstrates higher accuracy. In the HumanEval Base Test, we
compared it with the top ten models on the current (May 2024) EvalPlus
Leaderboard [3]. The results indicate that AutoCoder’s Pass@1 even surpasses
that of the current top-ranked models, GPT-4 Turbo (April 2024) and GPT-4o.

Moreover, as illustrated in Figure 2, AutoCoder boasts a more versatile Code
Interpreter function compared to GPT-4o and GPT-4 Turbo. The Code Interpreter
is an external program execution environment that large models utilize to
execute the code they deem necessary. While GPT-4o and GPT-4 Turbo can
identify the code that needs to be executed, they fail to provide the Code
Interpreter with the necessary instructions to install external packages
required by the programs. This limitation significantly restricts the
capabilities of the Code Interpreter. In contrast, AutoCoder can correctly
supply the Code Interpreter with the appropriate external package installation
instructions, thereby enabling it to execute a wide variety of code.

To comprehensively evaluate the capabilities of AutoCoder, we tested it on
several datasets: HumanEval [13], HumanEval+ [24], MBPP [8], MBPP+ [24],
MultiPL-E [11], and DS-1000 [20]. To measure the performance improvement of
AutoCoder, we compared it to its base model, Deepseek-Coder [16]. The results
demonstrate that AutoCoder exhibits outstanding performance. As of May 2024,
AutoCoder ranks 1st among all LLMs on the HumanEval Base Test, 5th on the
HumanEval Plus Test, and 4th on both the MBPP Base Test and the MBPP Plus
Test. Detailed experimental procedures can be found in Section 5.

Overall, our contributions are summarized as follows:

We propose AIEV-Instruct, a novel method for creating high-quality large code
datasets. It simulates programmers writing code and conducting unit tests
through agent interactions, ensuring annotation accuracy with an external code
executor. It includes a Teaching Stage and a Self-Learning Stage, reducing
reliance on expensive closed-source models during the annotation process.

We introduce AutoCoder, a code LLM trained using AIEV-Instruct that excels in
code-related tasks. It outperforms top models like GPT-4 Turbo and GPT-4o on
the HumanEval benchmark.

We enhances the functionality of the current code interpreters. AutoCoder can
provide the code interpreter with the necessary instructions to install
external packages, extending the applicability of the code interpreter beyond
built-in packages.

##  2 Related Work

Large Language Models for Code. Recently, LLMs have shown remarkable abilities
in understanding and generating code [19]. Trained on extensive datasets
covering various programming languages and tasks, these models excel in code
completion, bug fixing, and code synthesis [18]. Closed-source models like
OpenAI’s GPT-4 [26], Claude.ai’s Claude [1], and Google’s Gemini [4] series
have demonstrated superior performance on code tasks. Meanwhile, open-source
models specialized for code, such as DeepSeek-Coder [2], CodeQwen [29],
Magicoder [32], OpenCodeInterpreter [34], and WizardCoder [25], are also
emerging. Generally, closed-source models outperform open-source ones due to
their larger parameter sizes and broader knowledge base.

Code LLMs Instruction Tuning. After pre-training large models, we use
instruction tuning to optimize them [15], enhancing their ability to
understand and execute specific instructions [12]. A major challenge in
Instruction Tuning for Code LLMs is the lack of high-quality instruction
datasets for code [30]. Code tasks, such as Text-Code and Code-Code
translation, are difficult and time-consuming to annotate manually. OpenAI
used human annotators to label various tasks and train InstructGPT [28], but
they noted that annotating code tasks is prohibitively expensive for large-
scale datasets. Since the advent of GPT-4, an increasing number of researchers
have leveraged GPT-4 for code annotation to create high-quality instruction
tuning datasets. Currently, there are three primary methods: Self-
Instruct[31], Evol-Instruct[25], and OSS-Instruct [32]. Self-Instruct boosts
LLMs’ instruction-following skills by using strong teacher models to generate
synthetic coding instructions for fine-tuning weaker student models. Evol-
Instruct iteratively enhances LLMs’ coding abilities by increasing the
complexity of seed code instructions. OSS-Instruct creates diverse coding
problems inspired by open-source code snippets. These methods distill the
expertise of powerful teacher models like GPT-4 to guide and improve smaller
models.

##  3 AIEV-Instruct

###  3.1 Overall Architecture

Figure 3 illustrates the overall architecture of AIEV-Instruct, divided into
two stages: the Teaching Stage and the Self-Learning Stage. In the Teaching
Stage, the model learns primarily by distilling knowledge from a teacher
model. In the Self-Learning Stage, it learns autonomously.

Figure 3: The overall architecture of the AIEV-Instruct.

In the Teaching Stage, we obtain open-source code snippets and use GPT-4 Turbo
as the teacher model to supplement and correct them. The process consists of
four main steps. In I : Initialization, we initialize the necessary
components. GPT-4 Turbo is assigned two roles: questioner and programmer. It
can ensure the generated data is diverse, resulting in a more uniform
probability distribution rather than converging to a specific dialogue
template. The dialogue messages are initialized as an empty list, which will
be used throughout the process to store data. Eventually, this list will
contain multiple rounds of dialogue, and the entire conversation will be added
as a single data entry to our final dataset. Additionally, we need to
initialize a Docker container as our Code Interpreter. This container is
responsible for installing the required external packages and executing the
code that needs verification throughout the process. In II : Propose the
question, we first utilize GPT-4 Turbo to execute OSS-Instruct [32], designing
a problem description and a specific solution that includes the code snippet
based on the open-source code fragment. The difference here is that we require
GPT-4 Turbo to provide some Unit Tests. These Unit Tests further ensure the
accuracy of the code in our dataset. The dialogue messages initialized in the
previous step are sequentially appended with the problem description (➀), the
solution and the unit tests (➁). In III: Execution Feedback:, we use multiple
rounds of execution feedback to check the generated code, thereby improving
the quality of the dataset. First, we input the code snippet generated in the
second step into the Code Interpreter. If an execution error occurs, the
dialogue messages append the detailed Stderr output (➂). Meanwhile, this
Stderr information is provided to the questioner, who will generate a natural
language description based on the Stderr. This natural language description is
also appended to the dialogue messages (➃). Next, both the natural language
description and the Stderr are provided as new questions to the programmer,
who will continue to modify the code. The dialogue messages will append the
new code it generates (➄) and repeat this process. In IV: Termination, we also
use the Code Interpreter to run the code generated by the programmer. If the
program executes successfully, the Stdout is appended to the dialogue messages
(➅). This completes the analysis of one data entry.

After analyzing every 2000 data entries, we split the new data into a test set
and a training set in a 1:9 ratio. The training set is used to train the
student model (AutoCoder). After training, we use the test set to evaluate
both the teacher model and the student model. Upon completion of the
evaluation, we compare the Pass@1 of the two models. If the teacher model
performs better, we continue executing the Teaching Stage. If the student
model performs better, we move to the Self-Learning Stage. The difference
between the Self-Learning Stage and the Teaching Stage is that in the Self-
Learning Stage, we replace the original teacher model with the student model.
The student model itself is assigned as the questioner and programmer , and it
completes the entire execution feedback process.

###  3.2 Dataset Analysis

Dataset Generation. To prevent data contamination in test sets from resulting
in overly high performance on certain benchmark datasets (such as HumanEval),
we used code from two datasets that had already undergone contamination
detection: Magicoder-Evol-Instruct and Magicoder-OSS-Instruct [32]. We
collected a total of 186K original code entries from these two datasets. After
de-duplication, we input these data into our AIEV-Instruct pipeline to
generate the dataset. We set the maximum number of execution feedback
iterations in AIEV-Instruct to 7. If the generated code fails to execute
successfully and pass all unit tests after 7 attempts, that data point is
discarded. The gpt-4-turbo-2024-04-09 is used as the teacher model.

Dataset Comparision. We compared our dataset AutoCoder-AIEV-Instruct with
several current large code instruction datasets. The comparison results are
shown in Figure 4.

Figure 4: The comparison between the AutoCoder-AIEV-Instruct and other large
code datasets.

The dataset AutoCoder-AIEV-Instruct contains 169K data samples, totaling 241K
rounds of dialogue. Among these, 150K rounds are contributed by multi-round
dialogue data samples. Besides including the main function, it also
encompasses subsequent package installations, code execution errors, or
results, as well as various error analyses. Compared to the original
Magicoder-Evol-Instruct and Magicoder-OSS-Instruct, it adds unit tests, which
further enhances the accuracy of code-related tasks. Additionally, compared to
Code-Feedback [34], it includes more execution feedback results, reducing the
multi-round dialogues for code block concatenation and enhancing the coherence
of the context.

Dataset Decontamination. Similar to the data processing method used by
StarCoder [23], we also performed decontamination for AutoCoder-AIEV-Instruct.
Specifically, we tested each code snippet from HumanEval, MBPP, DS-1000, and
MultiPL-E against every code snippet in AutoCoder-AIEV-Instruct using
Levenshtein distance. If the similarity exceeded 90%, the data entry was
removed. Through this process, we excluded a total of 113 data entries.

Dataset Accuracy Theoretical Analysis. Evol-Instruct generates code from
questions using a teacher model. Thus, the theoretical maximum accuracy of the
Evol-Instruct dataset should closely match the teacher model’s accuracy in
generating correct code c for given problems p. Thus, we get
$\mathcal{A}_{Evol}\approx\mathcal{P}(\textit{c}\mid\textit{p})$. OSS-Instruct
generates problems from open-source code using a teacher model. Therefore, the
theoretical maximum accuracy of the OSS-Instruct dataset should closely match
the teacher model’s accuracy in analyzing and interpreting open-source code c.
Thus, we get $\mathcal{A}_{OSS}\approx\mathcal{P}(\textit{p}\mid\textit{c})$.
For AIEV-Instruct, we align problem descriptions and code by asking LLMs to
add unit tests to the original code. After adding unit tests, we can obtain
new code $\textit{c}^{*}$ and new problem descriptions $\textit{p}^{*}$. Here,
we can make an assumption:
$\mathcal{P}(\textit{p}\mid\textit{c})<\mathcal{P}(\textit{p}^{*}\mid\textit{c}^{*})$.
This is because LLMs usually find it easier to align problem descriptions with
unit tests. For example, suppose we need to write a program is_prime to detect
prime numbers in a list. It is easy to validate the code by providing a few
unit tests such as assert is_prime([2,3,4]) == [2,3] but ensuring that the
corresponding program is entirely correct is not as straightforward. with
iterative validation and correction, the probability of correctness improves
with each iteration. If the probability of error in each iteration is
$1-\mathcal{P}(\textit{p}^{*}\mid\textit{c}^{*})$, and assuming each iteration
is independent, the probability of correctness after $n$ iterations is:
$\mathcal{A}_{AIEV}\approx
1-(1-\mathcal{P}(\textit{p}^{*}\mid\textit{c}^{*}))^{n}>1-(1-\mathcal{P}(\textit{p}\mid\textit{c}))^{n}$.

While prior probability of problems $\mathcal{P}(\textit{p})$ is greater than
the prior probability of code $\mathcal{P}(\textit{c})$ and the iteration
times $n$ is greater than $1$. We can get:

$\mathcal{A}_{Evol}\approx\mathcal{P}(\textit{c}\mid\textit{p})=\frac{\mathcal{P}(\textit{p}\mid\textit{c})\cdot\mathcal{P}(\textit{c})}{\mathcal{P}(\textit{p})}<\mathcal{P}(\textit{p}\mid\textit{c})\approx\mathcal{A}_{OSS}<1-(1-\mathcal{P}(\textit{p}\mid\textit{c}))^{n}<\mathcal{A}_{AIEV}$

Thus, under these assumptions, the accuracy of AutoCoder-AIEV-Instruct should
be higher than that of Magicoder-OSS-Instruct and Magicoder-Evol-Instruct.

##  4 AutoCoder

###  4.1 Code Interpreter

Code Interpreter assists the model in debugging and executing code, which is
essential for fully automating complex coding, scientific computations, and
related tasks. Building a code interpreter requires the model to accurately
identify the code blocks it needs to run. Currently, only a few models, like
GPT-4 Turbo and InternLM-Chat [10], support code interpreters.

Figure 5:  AutoCoder-AIEV-Instruct dataset post-processing.:Nature
language;:Code execution request from the User;:Code execution request
response from the Assistant; :Bash command;:Code block;:Special
token;:Execution result.

However, a significant limitation of these interpreters is that they operate
in a closed environment and cannot interact with external systems, preventing
them from executing code that requires external package installations.
AutoCoder addresses this issue by enabling the execution of bash commands to
install necessary packages. This capability is achieved by teaching the model
to run bash commands when appropriate. To facilitate this, we need to perform
some post-processing on the AutoCoder-AIEV-Instruct dataset.

As shown in Figure 5, for a simple single execution feedback example, the
original data entry contains three parts: natural language from the User;
natural language + bash command + natural language + code block + natural
language from the Assistant; execution result from the code interpreter.

In the post-processing stage, we mix the natural language of the Code
execution request into the User’s natural language, enabling the model to
correctly learn when to execute the code. Then, we mix the code execution
request response into the Assistant’s response, so it can generate coherent
answers. Finally, we add special tokens before and after the bash commands and
code blocks in the Assistant’s original response, allowing the model to learn
to correctly identify the bash commands and code blocks that need to be
executed.

###  4.2 Training

We fine-tuned two base models, Deepseek-Coder 6.7B and 33B, using the
AutoCoder-AIEV-Instruct dataset to obtain our AutoCoder 33B and AutoCoder-S
6.7B. We utilized the AutoTokenizer package from the transformer library to
add four special tokens to these models to enable the Code Interpreter feature
for AutoCoder. For hardware, we used 10 nodes with a total of 40 80GB A100
GPUs on a Simple Linux Utility for Resource Management (SLURM) cluster. The
NVIDIA Collective Communications Library (NCCL) handled communication between
GPUs. In terms of training parameters, we used the ZeRO-Stage 3 feature from
the deepspeed library to partition model parameters, with a batch size of 8
per GPU, a gradient accumulation step of 4, a learning rate of 5e-5, and bf16
as the parameter type. The max sequence length was set to 5120 and the total
epochs was set to 2. We adopted a full-parameter tuning approach to train the
model.

##  5 Experiment

We tested AutoCoder’s abilities in Python text-to-code generation,
multilingual code generation, and code generation for data science questions,
and compared it with the other models. To ensure a fair comparison with other
models and reduce experimental randomness, we disabled AutoCoder’s external
code interpreter during the tests and used greedy sampling.

###  5.1 Python Text to Code Generation

We evaluated AutoCoder using two of the most commonly used code generation
benchmarks: HumanEval [13] and MBPP [8]. HumanEval is widely used to test
various state-of-the-art closed-source models, such as GPT-4o [27],
Claude-3-Ops [7], Gemini Ultra 1.0 [14], and Llama3 400b [5]. It contains 164
code generation problems. Compared to HumanEval, MBPP has more test data, with
a total of 378 test cases. Additionally, to prevent errors due to the
insufficient number of test cases for each code problem in the original
benchmarks, HumanEval+ and MBPP+ [24] have added more test cases to the
original datasets. The Pass@1 results are shown in Table 1.

Table 1: Comparison with current SOTA Code Large language models on HumanEval(+) and MBPP(+). The results for GPT-4o, Llama3-400B, and Gemini Ultra 1.0 are sourced from the GPT-4o website [27]. The remaining measurement results are sourced from the Evalplus leaderboard [3]. |  | Benchmark (Pass@$1$ $\%$)
---|---|---
Model | Size | HumanEval | HumanEval+ | MBPP | MBPP+
GPT-4o |  | $90.2$ | - | - | -
GPT-4-Turbo |  | $90.2$ | $\mathbf{86.6}$ | $85.7$ | $\mathbf{73.3}$
Claude 3 Opus |  | $84.9$ | $77.4$ | $\mathbf{89.4}$ | $\mathbf{73.3}$
Llama3 | $400B$ | $84.1$ | - | - | -
Gemini Ultra 1.0 |  | $74.4$ | - | - | -
OpenCodeInterpreter-CL | $70B$ | $76.2$ | $70.7$ | $73.0$ | $61.9$
CodeLlama-Instruct | $70B$ | $72.0$ | $65.2$ | $75.4$ | $61.7$
DeepSeek-Coder-instruct | $33B$ | $81.1$ | $75.0$ | $80.4$ | $70.1$
WizardCoder-V1.1 | $33B$ | $79.9$ | $73.2$ | - | -
OpenCodeInterpreter-DS | $33B$ | $79.3$ | $73.8$ | $80.2$ | $68.5$
speechless-codellama-v2.0 | $34B$ | $77.4$ | $72.0$ | $73.8$ | $61.4$
OpenCodeInterpreter-CL | $13B$ | $77.4$ | $73.8$ | $70.7$ | $59.2$
starchat2-v0.1 | $15B$ | $73.8$ | $71.3$ | $74.9$ | $64.6$
starcoder2-instruct-v0.1 | $15B$ | $67.7$ | $60.4$ | $78.0$ | $65.1$
WizardCoder-15B-V1.0 | $15B$ | $56.7$ | $50.6$ | $64.3$ | $54.2$
CodeQwen1.5-Chat | $7B$ | $83.5$ | $78.7$ | $79.4$ | $69.0$
OpenCodeInterpreter-DS | $6.7B$ | $77.4$ | $72.0$ | $76.5$ | $66.4$
Artigenz-Coder-DS | $6.7B$ | $75.6$ | $72.6$ | $80.7$ | $69.6$
DeepSeek-Coder-instruct | $6.7B$ | $74.4$ | $71.3$ | $74.9$ | $65.6$
AutoCoder-S | $6.7B$ | $78.7$ | $72.0$ | $79.4$ | $69.8$
AutoCoder | $33B$ | $\mathbf{90.9}$ | $78.0$ | $82.5$ | $70.6$

Experimental results show that AutoCoder-33B achieved a Pass@1 of $90.9\%$ on
the HumanEval benchmark, surpassing all current SOTA code LLMs. On HumanEval+,
it achieved a Pass@$1$ of $78\%$, second only to GPT-4 Turbo and
CodeQwen1.5-Chat. In the MBPP and MBPP+ tests, its Pass@1 was $82.5\%$ and
$70.6\%$ respectively, ranking just below the two large closed-source models
GPT-4 Turbo and Claude 3 Opus. Additionally, despite having only 6.7B
parameters, AutoCoder-S still shows impressive performance. It achieved
$78.7\%$ and $72\%$ on HumanEval and HumanEval+, respectively. In the MBPP and
MBPP+ benchmarks, it achieved $79.4\%$ and $69.8\%$. On MBPP+, its performance
is second only to DeepSeek-Coder-instruct (33B) within the 70B parameter
level.

###  5.2 Multilingual Code Generation

To test AutoCoder’s capabilities in multilingual code generation, we used
MultiPL-E benchmark [11] to evaluate its performance in six additional
commonly used languages. Since MultiPL-E’s official library does not support
testing closed-source models, we ensured consistent experimental conditions by
comparing only with well-known open-source models. The results are shown in
Table 2.

The experimental results show that AutoCoder performed exceptionally well in
Java, C++, and Rust, achieving $61.4\%$, $68.9\%$, and $60.8\%$ Pass@1
respectively. In the other three languages, its performance was only surpassed
by a few models such as CodeQwen1.5-Chat. This demonstrates AutoCoder’s robust
capabilities in multilingual code generation.

Table 2: Performance (Pass@1 %) of AutoCoder on the MultiPL-E benchmark. |  | Programming Language
---|---|---
Model | Size | Java | JavaScript | C++ | PHP | Swift | Rust
Wizard-CL | $34B$ | $44.9$ | $55.3$ | $47.2$ | $47.2$ | $44.3$ | $46.2$
CodeLLAMA | $34B$ | $40.2$ | $41.7$ | $41.4$ | $40.4$ | $35.3$ | $38.7$
CodeLLAMA-Instruct | $34B$ | $41.5$ | $45.9$ | $41.5$ | $37$ | $37.6$ | $39.3$
Deepseek-Coder-Instruct | $33B$ | $53.8$ | $67.7$ | $63.3$ | $54.7$ | $51.3$ | $54.4$
OpenCodeInterpreter-DS | $33B$ | $60.1$ | $69.6$ | $67.1$ | $59.6$ | $54.4$ | $60.2$
StarCoder-Base | $15B$ | $28.5$ | $31.7$ | $30.6$ | $26.8$ | $16.7$ | $24.5$
StarCoder | $15B$ | $30.2$ | $30.8$ | $31.6$ | $26.1$ | $22.7$ | $21.8$
WizardCoder-SC | $15B$ | $35.8$ | $41.9$ | $39.0$ | $39.3$ | $33.7$ | $27.1$
CodeLLAMA | $7B$ | $29.3$ | $31.7$ | $27.0$ | $25.1$ | $25.6$ | $25.5$
Magicoder-CL | $7B$ | $36.4$ | $45.9$ | $36.5$ | $39.5$ | $33.4$ | $30.6$
MagicoderS-CL | $7B$ | $42.9$ | $57.5$ | $44.4$ | $47.6$ | $44.1$ | $40.3$
CodeQwen1.5-Chat | $7B$ | $58.6$ | $\mathbf{75.7}$ | $65.2$ | $\mathbf{68.9}$ | $\mathbf{58.8}$ | $51.1$
AutoCoder-S | $6.7B$ | $55.7$ | $65.2$ | $62.7$ | $59.6$ | $41.1$ | $50.6$
AutoCoder | $33B$ | $\mathbf{61.4}$ | $68.9$ | $\mathbf{68.9}$ | $63.4$ | $53.8$ | $\mathbf{60.8}$

###  5.3 Code Generation for Data Science

We tested AutoCoder’s ability to generate code to solve data science problems
using the DS-1000 dataset. The DS-1000 dataset contains 1000 questions that
require the use of seven commonly used Python data science libraries. We
tested all the models using the completion mode in DS-1000.

As shown in Table 3 the AutoCoder’s Pass@1 on Matplotlib-related questions
even surpassed that of GPT-4 Turbo. Overall, it is the only model besides
GPT-4 to achieve an overall Pass@1 exceeding $45\%$. This demonstrates
AutoCoder’s excellent capability to generate code for data science problems..

Table 3: Performance (Pass@1 %) of AutoCoder on the DS-1000 dataset. plt: Matplotlib, np: NumPy , Pd: Pandas, Py: PyTorch, Scp: Scipy, Sk: Sklearn , TF: TensorFlow. The result of GPT-4 Turbo 2024-04-09, GPT-3.5 Turbo 0125 and Codex-002 are from the Offical Github of DS-1000 [6]. |  | $155$ | $220$ | $291$ | $68$ | $106$ | $115$ | $45$ | $1000$
---|---|---|---|---|---|---|---|---|---
Model | Size | plt | np | Pd | Py | Scp | Sk | TF | Overall
GPT-4 Turbo |  | $72.3$ | $\mathbf{61.8}$ | $\mathbf{42.3}$ | $\mathbf{50}$ | $\mathbf{50}$ | $\mathbf{50.4}$ | $\mathbf{53.3}$ | $\mathbf{53.9}$
GPT-3.5 Turbo |  | $65.8$ | $32.7$ | $30.2$ | $36.8$ | $39.6$ | $40$ | $42.2$ | $39.4$
Codex-002 |  | $57$ | $43.1$ | $26.5$ | $41.8$ | $31.8$ | $44.8$ | $39.3$ | $39.2$
DeepSeek-Coder-Instruct | $33B$ | $61.3$ | $50.0$ | $30.9$ | $35.3$ | $36.8$ | $45.2$ | $40.0$ | $42.8$
OpenCodeInterpreter-DS | $33B$ | $39.4$ | $57.7$ | $28.2$ | $47.1$ | $40.6$ | $49.6$ | $42.2$ | $42.1$
CodeGen-Mono | $16B$ | $31.7$ | $10.9$ | $3.40$ | $7.00$ | $9.00$ | $10.8$ | $15.2$ | $11.7$
StarCoder | $15B$ | $51.7$ | $29.7$ | $11.4$ | $21.4$ | $20.2$ | $29.5$ | $24.5$ | $26.0$
WizardCoder-SC | $15B$ | $55.2$ | $33.6$ | $16.7$ | $26.2$ | $24.2$ | $24.9$ | $26.7$ | $29.2$
CodeLlama-Python | $7B$ | $55.3$ | $34.5$ | $16.4$ | $19.9$ | $22.3$ | $17.6$ | $28.5$ | $28.0$
WizardCoder-CL | $7B$ | $53.5$ | $34.4$ | $15.2$ | $25.7$ | $21.0$ | $24.5$ | $28.9$ | $28.4$
Magicoder-CL | $7B$ | $54.6$ | $34.8$ | $19.0$ | $24.7$ | $25.0$ | $22.6$ | $28.9$ | $29.9$
MagicoderS-CL | $7B$ | $55.9$ | $40.6$ | $28.4$ | $40.4$ | $28.8$ | $35.8$ | $37.6$ | $37.5$
InCoder | $6.7B$ | $28.3$ | $4.4$ | $3.1$ | $4.40$ | $2.80$ | $2.80$ | $3.80$ | $7.40$
AutoCoder-S | $6.7B$ | $52.9$ | $38.2$ | $31.6$ | $30.9$ | $31.1$ | $39.1$ | $31.1$ | $37.1$
AutoCoder | $33B$ | $\mathbf{72.9}$ | $52.7$ | $36.1$ | $26.5$ | $45.3$ | $46.1$ | $42.2$ | $47.2$

###  5.4 Comparison with the Base Model

To more intuitively compare the improvements AutoCoder brings to the base
model, we compared it with several models trained on the same base model as
AutoCoder. As shown in Figure 6, on the HumanEval, MBPP, and DS-1000 datasets,
AutoCoder demonstrates a stronger improvement over the base model compared to
DeepSeek-Coder-Instruct and OpenCodeInterpreter. Notably, DeepSeek-Coder-
Instruct was trained with 2 billion tokens, while AutoCoder achieved better
results with only 320 million tokens. This proves the effectiveness of the
AIEV-Instruct method.

Figure 6: Comparison of AutoCoder with other models sharing the aame base
model.

##  6 Conclusion

We propose AIEV-Instruct, a novel method for creating high-quality code
instruction datasets. It simulates programmers writing code and conducting
unit tests through agent interactions, ensuring accuracy with execution
validation. It includes both a teaching stage and a self-learning stage,
reducing reliance on expensive closed-source models during the annotation
process. Using the dataset generated with AIEV-Instruct, we trained the
AutoCoder code LLM. It exhibits excellent performance and surpass the current
top models, GPT-4 Turbo and GPT-4o on the HumanEval benchmark. Furthermore,
AutoCoder extends the functionality of previous code interpreters by allowing
them to automatically install external packages, thus extending the
applicability of the code interpreter. Overall, our work provides the
community with excellent open-source code large language models and offers new
insights for generating high-quality large code instruction dataset.

## References

  * [1] Claude.ai onboarding.  https://www.anthropic.com/claude.
  * [2] Deepseekcoder.  https://deepseekcoder.github.io/.
  * [3] Evalplus leaderboard.  https://evalplus.github.io/leaderboard.html.  Accessed: 2024-05-15.
  * [4] Google gemini.  https://gemini.google.com/.
  * AI [2024] Meta AI.  Meta llama 3.  https://ai.meta.com/blog/meta-llama-3/, 2024.
  * AI [2023] XLang AI.  Ds-1000 results, 2023.  URL https://github.com/xlang-ai/DS-1000/tree/main/results.
  * Anthropic [2024] Anthropic.  Claude 3 family.  https://www.anthropic.com/news/claude-3-family, 2024.
  * Austin et al. [2021] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al.  Program synthesis with large language models.  _arXiv preprint arXiv:2108.07732_ , 2021.
  * Buscemi [2023] Alessio Buscemi.  A comparative study of code generation using chatgpt 3.5 across 10 programming languages.  _arXiv preprint arXiv:2308.04477_ , 2023.
  * Cai et al. [2024] Zheng Cai, Maosong Cao, Haojiong Chen, Kai Chen, Keyu Chen, Xin Chen, Xun Chen, Zehui Chen, Zhi Chen, Pei Chu, et al.  Internlm2 technical report.  _arXiv preprint arXiv:2403.17297_ , 2024.
  * Cassano et al. [2022] Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al.  Multipl-e: A scalable and extensible approach to benchmarking neural code generation.  _arXiv preprint arXiv:2208.08227_ , 2022.
  * Chang et al. [2024] Yupeng Chang, Xu Wang, Jindong Wang, Yuan Wu, Linyi Yang, Kaijie Zhu, Hao Chen, Xiaoyuan Yi, Cunxiang Wang, Yidong Wang, et al.  A survey on evaluation of large language models.  _ACM Transactions on Intelligent Systems and Technology_ , 15(3):1–45, 2024.
  * Chen et al. [2021] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al.  Evaluating large language models trained on code.  _arXiv preprint arXiv:2107.03374_ , 2021.
  * DeepMind [2024] DeepMind.  Gemini ultra.  https://deepmind.google/technologies/gemini/ultra/, 2024.
  * Gao et al. [2020] Tianyu Gao, Adam Fisch, and Danqi Chen.  Making pre-trained language models better few-shot learners.  _arXiv preprint arXiv:2012.15723_ , 2020.
  * Guo et al. [2024] Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y Wu, YK Li, et al.  Deepseek-coder: When the large language model meets programming–the rise of code intelligence.  _arXiv preprint arXiv:2401.14196_ , 2024.
  * Hoffmann et al. [2022] Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al.  Training compute-optimal large language models.  _arXiv preprint arXiv:2203.15556_ , 2022.
  * Jin et al. [2023] Matthew Jin, Syed Shahriar, Michele Tufano, Xin Shi, Shuai Lu, Neel Sundaresan, and Alexey Svyatkovskiy.  Inferfix: End-to-end program repair with llms.  In _Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering_ , pages 1646–1656, 2023.
  * Kazemitabaar et al. [2023] Majeed Kazemitabaar, Xinying Hou, Austin Henley, Barbara Jane Ericson, David Weintrop, and Tovi Grossman.  How novices use llm-based code generators to solve cs1 coding tasks in a self-paced learning environment.  In _Proceedings of the 23rd Koli Calling International Conference on Computing Education Research_ , pages 1–12, 2023.
  * Lai et al. [2023] Yuhang Lai, Chengxi Li, Yiming Wang, Tianyi Zhang, Ruiqi Zhong, Luke Zettlemoyer, Wen-tau Yih, Daniel Fried, Sida Wang, and Tao Yu.  Ds-1000: A natural and reliable benchmark for data science code generation.  In _International Conference on Machine Learning_ , pages 18319–18345. PMLR, 2023.
  * Li et al. [2023a] Jia Li, Ge Li, Chongyang Tao, Huangzhao Zhang, Fang Liu, and Zhi Jin.  Large language model-aware in-context learning for code generation.  _arXiv preprint arXiv:2310.09748_ , 2023a.
  * Li et al. [2024] Jia Li, Ge Li, Yunfei Zhao, Yongmin Li, Zhi Jin, Hao Zhu, Huanyu Liu, Kaibo Liu, Lecheng Wang, Zheng Fang, et al.  Deveval: Evaluating code generation in practical software projects.  _arXiv preprint arXiv:2401.06401_ , 2024.
  * Li et al. [2023b] Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, et al.  Starcoder: may the source be with you!  _arXiv preprint arXiv:2305.06161_ , 2023b.
  * Liu et al. [2024] Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang.  Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation.  _Advances in Neural Information Processing Systems_ , 36, 2024.
  * Luo et al. [2023] Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang.  Wizardcoder: Empowering code large language models with evol-instruct.  _arXiv preprint arXiv:2306.08568_ , 2023.
  * OpenAI [2024] OpenAI.  Chatgpt: Language models for conversational ai.  https://openai.com/index/chatgpt/, 2024.
  * OpenAI [2024] OpenAI.  Hello gpt-4o.  https://openai.com/index/hello-gpt-4o/, 2024.
  * Ouyang et al. [2022] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al.  Training language models to follow instructions with human feedback.  _Advances in neural information processing systems_ , 35:27730–27744, 2022.
  * Qwen [2024] Qwen.  Codeqwen 1.5: Next generation code model.  https://qwenlm.github.io/blog/codeqwen1.5/, 2024.
  * Rao [2024] Nikitha Rao.  _Navigating Challenges with LLM-based Code Generation using Software-specific Insights_.  PhD thesis, Microsoft Research, 2024.
  * Wang et al. [2022] Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi.  Self-instruct: Aligning language models with self-generated instructions.  _arXiv preprint arXiv:2212.10560_ , 2022.
  * Wei et al. [2023] Yuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding, and Lingming Zhang.  Magicoder: Source code is all you need.  _arXiv preprint arXiv:2312.02120_ , 2023.
  * Xu et al. [2022] Frank F Xu, Bogdan Vasilescu, and Graham Neubig.  In-ide code generation from natural language: Promise and challenges.  _ACM Transactions on Software Engineering and Methodology (TOSEM)_ , 31(2):1–47, 2022.
  * Zheng et al. [2024] Tianyu Zheng, Ge Zhang, Tianhao Shen, Xueling Liu, Bill Yuchen Lin, Jie Fu, Wenhu Chen, and Xiang Yue.  Opencodeinterpreter: Integrating code generation with execution and refinement.  _arXiv preprint arXiv:2402.14658_ , 2024.


11institutetext: Physique Nucléaire Théorique et Physique Mathématique, C.P.
229, Université Libre de Bruxelles (ULB), B 1050 Brussels, Belgium

# Resonances in ${}^{12}{\mathrm{C}}$ and ${}^{24}{\rm Mg}$: what do we learn
from a microscopic cluster theory?

P. Descouvemont _Directeur de Recherches FNRS_

(Received: date / Revised version: date)

###### Abstract

We discuss resonance properties in three-body systems, with examples on
${}^{12}{\mathrm{C}}$ and ${}^{24}{\rm Mg}$. We use a microscopic cluster
model, where the generator coordinate is defined in the hyperspherical
formalism. The ${}^{12}{\mathrm{C}}$ nucleus is described by an
$\alpha+\alpha+\alpha$ structure, whereas ${}^{24}{\rm Mg}$ is considered as
an ${}^{16}{\rm O}+\alpha+\alpha$ system. We essentially pay attention to
resonances. We review various techniques which may extend variational methods
to resonances. We consider $0^{+}$ and $2^{+}$ states in ${}^{12}{\mathrm{C}}$
and ${}^{24}{\rm Mg}$. We show that the r.m.s. radius of a resonance is
strongly sensitive to the variational basis. This has consequences for the
Hoyle state ($0^{+}_{2}$ state in ${}^{12}{\mathrm{C}}$) whose radius has been
calculated or measured in several works. In ${}^{24}{\rm Mg}$, we identify two
$0^{+}$ resonances slightly below the three-body threshold.

##  1 Introduction

Clustering is a well established phenomenon in light nuclei (see Refs. FHK18 ;
HIK12 ; DD12  for recent reviews). In nuclear physics, most cluster states
involve the $\alpha$ particle. Due to its large binding energy, the $\alpha$
particle tends to keep its own identity, which leads to the $\alpha$ cluster
structure Br66 ; FHI80 . The cluster structure in $\alpha$ nuclei (i.e. with
nucleon numbers $A=4k$, where $k$ is an integer number) was clarified by Ikeda
et al. ITH68  who proposed a diagram which identifies situations where a
cluster structure can be observed. The $\alpha$ cluster structure is
essentially found for nuclei near $N=Z$. The $\alpha$ model and its extensions
were utilized by many authors to investigate the properties of
$\alpha$-particle nuclei such as 8Be, 12C, 16O, etc. In particular, the
interest for $\alpha$-cluster models was recently revived by the hypothesis of
a new form of nuclear matter, in analogy with the Bose-Einstein condensates
THS01 ; ZFH20 .

Nuclear models are essentially divided in two categories: (1) in non-
microscopic models, the internal structure of the clusters is neglected, and
they interact by a nucleus-nucleus potential; (2) in microscopic models, the
wave functions depend on the $A$ nucleons of the system, and the Hamiltonian
involves a nucleon-nucleon interaction. Recent developments in nuclear models
NF08 ; NQS09 ; He20  aim to find exact solutions of the $A$-body problem, but
they present strong difficulties when the nucleon number increases. To
simplify the problem, cluster models assume that the nucleons are grouped in
clusters. The simplest variant is a two-cluster model and is being developed
since more than 40 years WT77 ; Ho77 . Multicluster microscopic models are
more recent (see, for example, Ref. DD12 ). They allow to extend the range of
applications.

In the present paper, we focus on two $\alpha$ nuclei: ${}^{12}{\mathrm{C}}$
and ${}^{24}{\rm Mg}$, which are described by three-body structures ($3\alpha$
and ${}^{16}{\rm O}+\alpha+\alpha$, respectively). Over the last 20 years,
there was a strong interest on ${}^{12}{\mathrm{C}}$, and in particular on the
$0^{+}_{2}$ resonance, known as the Hoyle state FF14 . The unbound nature,
however, make theoretical studies delicate.

With ${}^{12}{\mathrm{C}}$ and ${}^{24}{\rm Mg}$ as typical examples, we
discuss more specifically the determination of resonance properties in cluster
models. As resonances are unbound, a rigorous treatment would require a
scattering model, with scattering boundary conditions. There are, however,
various techniques aimed at complementing the much simpler variational method
which is, strictly speaking, valid for bound states only. In a variational
method, negative energies are associated with physical bound states. The
positive eigenvalues correspond to approximations of the continuum. For narrow
resonances, a single eigenvalue is in general a fair approximation. We show,
however, that the calculation of physical quantities, such as the r.m.s.
radius, should be treated carefully.

The paper is organized as follows. In Sec. 2, we present the microscopic
three-body model, using hyperspherical coordinates. Section 3 is devoted to a
brief discussion of different techniques dealing with resonances. The
${}^{12}{\mathrm{C}}$ and ${}^{24}{\rm Mg}$ nuclei are presented in Sects. 4
and 5, respectively. Concluding remarks are given in Sect. 6.

##  2 The Microscopic three-cluster model

###  2.1 Hamiltonian and wave functions

In a microscopic model, the Hamiltonian of a $A$-nucleon system is given by

$\displaystyle H=\sum_{i=1}^{A}T_{i}+\sum_{i<j=1}^{A}(V^{N}_{ij}+V^{C}_{ij}),$
(1)

where $T_{i}$ is the kinetic energy of nucleon $i$, and $V^{N}_{ij}$ and
$V^{C}_{ij}$ are the nuclear and Coulomb interactions between nucleons $i$ and
$j$.

In a partial wave $J\pi$, the wave function $\Psi^{JM\pi}$ is a solution of
the Schrödinger equation

$\displaystyle H\Psi^{JM\pi}=E\Psi^{JM\pi}.$ (2)

Recent ab initio models NF08 ; NQS09  aim at determining exact solutions of
Eq. (2). For instance, the No-Core Shell Model (NCSM) is based on large one-
center harmonic-oscillator (HO) bases and effective interactions NKB00 ,
derived from realistic forces such as Argonne WSS95  or CD-Bonn Ma01 . These
interactions are adapted for finite model spaces through a particular unitary
transformation. Wave functions are then expected to be accurate, but states
presenting a strong clustering remain difficult to describe with this
approach.

In cluster models, the nucleon-nucleon interaction $V^{N}_{ij}$ must account
for the cluster approximation of the wave function. This leads to effective
interactions, adapted to harmonic-oscillator orbitals. For example, using $0s$
orbitals for the $\alpha$ particle makes all matrix elements of non-central
forces equal to zero. The effect of non-central components is simulated by an
appropriate choice of the central effective interaction. Typical effective
interactions are the Minnesota TLT77  or the Volkov potentials Vo65 . These
central forces simulate the effects of the missing tensor interaction. They
include an adjustable parameter, which can be slightly modified without
changing the basic properties of the force. This parameter is typically used
to reproduce the energy of the ground state or of a resonance.

In the present model, Eq. (2) is solved by using the cluster approximation,
i.e. the nucleus is seen as a three-body system, where each cluster is
represented by a shell-model wave function. This leads to the Resonating Group
Method (RGM, see Refs. Ho77 ; DD12 ) which was initially developed for two-
cluster systems, but more recently extended to three-body nuclei KD04 .

The three-body system is illustrated in Fig. 1. Coordinate $\boldsymbol{r}$ is
associated with the external clusters, whereas $\boldsymbol{R}$ is the
relative coordinate between the core and the two-body subsystem.

Figure 1: Coordinates in the microscopic three-cluster system.

Scaled Jacobi coordinates $\boldsymbol{x}$ and $\boldsymbol{y}$ ZDF93 ; KD04
are obtained from

$\displaystyle\boldsymbol{x}=\sqrt{A_{1}A_{2}/(A_{1}+A_{2})}\,\boldsymbol{r},$
$\displaystyle\boldsymbol{y}=\sqrt{A_{c}(A_{1}+A_{2})/(A_{c}+A_{1}+A_{2})}\,\boldsymbol{R},$
(3)

where $A_{c}$ is the mass of the core and ($A_{1},A_{2}$) the masses of the
external clusters. We use the hyperspherical formalism where the hyperradius
$\rho$ and the hyperangle $\alpha$ are defined as

$\displaystyle\rho^{2}=\vec{x}^{2}+\vec{y}^{2}$
$\displaystyle\alpha=\arctan(y/x).$ (4)

The hyperspherical formalism is well known in non-microscopic three-body
systems KRV08 ; ZDF93 , where the structure of the nuclei is neglected. This
formalism makes use of five angles $\Omega^{5}=(\Omega_{x},\Omega_{y},\alpha)$
and of an hypermomentum $K$ which generalizes the concept of angular momentum
in two-body systems. The hyperspherical functions are RR70

$\displaystyle{\cal
Y}^{\ell_{x}\ell_{y}}_{KLM}(\Omega^{5})=\phi_{K}^{\ell_{x}\ell_{y}}(\alpha)\left[Y_{\ell_{x}}(\Omega_{x})\otimes
Y_{\ell_{y}}(\Omega_{y})\right]^{LM},$ (5)

where $\ell_{x}$ and $\ell_{y}$ are angular momenta associated with the Jacobi
coordinates $\boldsymbol{x}$ and $\boldsymbol{y}$. Functions
$\phi_{K}^{\ell_{x}\ell_{y}}$ are given by

$\displaystyle\phi_{K}^{\ell_{x}\ell_{y}}(\alpha)={\cal
N}_{K}^{\ell_{x}\ell_{y}}\,(\cos\alpha)^{\ell_{x}}(\sin\alpha)^{\ell_{y}}P_{n}^{\ell_{y}+\frac{1}{2},\ell_{x}+\frac{1}{2}}(\cos
2\alpha).$ (6)

In these definition, $P_{n}^{\alpha,\beta}(x)$ is a Jacobi polynomial, ${\cal
N}_{K}^{l_{x}l_{y}}$ is a normalization factor, and
$n=(K-\ell_{x}-\ell_{y})/2$ is a positive integer.

For the sake of clarity, we limit the presentation to clusters with spin 0 (a
generalization can be found in Ref. De19 ). The total wave function of the
system is written as

$\displaystyle\Psi^{JM\pi}=\sum_{\ell_{x}\ell_{y}}\sum_{K=0}^{\infty}{\cal
A}\,\phi_{1}\phi_{2}\phi_{3}{\cal
Y}^{\ell_{x}\ell_{y}}_{KJM}(\Omega^{5})\chi^{J\pi}_{\ell_{x}\ell_{y}K}(\rho),$
(7)

where ${\cal A}$ is the $A$-nucleon antisymmetrizor, and $\phi_{i}$ are the
cluster wave functions, defined in the shell-model. For the $\alpha$ particle,
the internal wave function $\phi$ is a Slater determinant involving four $0s$
orbitals. Definition (7), however, is valid in a broader context where $\phi$
is a linear combination of several Salter determinants. A recent example De19
is the 11Li nucleus described by a 9Li+n+n structure, where the shell-model
description of 9Li involves all Slater determinants (90) which can be built in
the $p$ shell. The oscillator parameter $b$ is taken identical for the three
clusters. Going beyond this approximation raises enormous difficulties due to
center-of-mass problems, even in two-cluster calculations BK92 . In Eq. (7),
the hypermoment $K$ runs from zero to infinity. In practice a truncation value
$K_{\rm max}$ is adopted. The hyperradial functions
$\chi^{J\pi}_{\ell_{x}\ell_{y}K}(\rho)$ are to be determined from the
Schrödinger equation (2).

As for two-cluster systems, the RGM definition clearly displays the physical
interpretation of the cluster approximation. In practice, however, using the
Generator Coordinate Method (GCM) wave functions is equivalent, and is more
appropriate to systematic numerical calculations DD12 . In the GCM, the wave
function (7) is equivalently written as

$\displaystyle\Psi^{JM\pi}=\sum_{\gamma}\int
dR\,f^{J\pi}_{\gamma}(R)\,\Phi^{JM\pi}_{\gamma}(R),$ (8)

where we use label $\gamma=(\ell_{x},\ell_{y},K)$. In this equation, $R$ is
the generator coordinate, $\Phi^{JM\pi}_{\gamma}(R)$ are projected Slater
determinants, and $f^{J\pi}_{\gamma}(R)$ are the generator functions (see Ref.
DD12  for more detail). In practice, the integral is replaced by a sum over a
finite set of $R$ values (typically 10-15 values are chosen, up to $R\approx
10-12$ fm).

After discretization of (8), the generator functions are obtained from the
eigenvalue problem, known as the Hill-Wheeler equation,

$\displaystyle\sum_{\gamma n}$
$\displaystyle\biggl{[}H^{J\pi}_{\gamma,\gamma^{\prime}}(R_{n},R_{n^{\prime}})-E^{J\pi}_{k}N^{J\pi}_{\gamma,\gamma^{\prime}}(R_{n},R_{n^{\prime}})\biggr{]}f^{J\pi}_{(k)\gamma}(R_{n})=0,$
(9)

where $k$ denotes the excitation level. The Hamiltonian and overlap kernels
are obtained from 7-dimension integrals involving matrix elements between
Slater determinants (see Refs. KD04 ; DD12  for detail). They are given by

$\displaystyle N^{J\pi}_{\gamma,\gamma^{\prime}}(R,R^{\prime})$
$\displaystyle=\langle\Phi^{JM\pi}_{\gamma}(R)|\Phi^{JM\pi}_{\gamma^{\prime}}(R^{\prime})\rangle$
$\displaystyle H^{J\pi}_{\gamma,\gamma^{\prime}}(R,R^{\prime})$
$\displaystyle=\langle\Phi^{JM\pi}_{\gamma}(R)|H|\Phi^{JM\pi}_{\gamma^{\prime}}(R^{\prime})\rangle.$
(10)

The non-projected matrix elements are computed with Brink’s formula Br66 , and
the main part of the numerical calculations is devoted to the two-body
interaction which involves quadruple sums over the orbitals. The projection
over angular momentum, which requires multidimension integrals, makes the
calculation very demanding. A more detailed description is provided in Ref.
De19 .

###  2.2 Radii and energy curves

From the wave function (7,8), various properties can be computed. We discuss
more specifically the r.m.s. radius, defined as

$\displaystyle\langle
r^{2}\rangle=\frac{1}{A}\langle\Psi^{JM\pi}|\sum_{i=1}^{A}(r_{i}-R_{\rm
c.m.})^{2}|\Psi^{JM\pi}\rangle,$ (11)

which, in the GCM is determined from

$\displaystyle\langle r^{2}\rangle=\sum_{\gamma
n}\sum_{\gamma^{\prime}n^{\prime}}f^{J\pi}_{\gamma}(R_{n})f^{J\pi}_{\gamma^{\prime}}(R_{n}^{\prime})$
$\displaystyle\hskip
8.5359pt\times\langle\Phi^{JM\pi}_{\gamma}(R_{n})|\frac{1}{A}\sum_{i=1}^{A}(r_{i}-R_{\rm
c.m.})^{2}|\Phi^{JM\pi}_{\gamma^{\prime}}(R_{n^{\prime}})\rangle.$ (12)

The matrix elements between Slater determinants are obtained as in Eqs. (10).
Notice that these calculations are rigorous for bound states, i.e. states with
energy $E^{J\pi}_{k}$ lower than the three-cluster breakup threshold
$E_{T}=E_{1}+E_{2}+E_{3}$, $E_{i}$ being the internal energy of cluster $i$,
computed consistently with the same Hamiltonian. In this case, the relative
functions $\chi^{J\pi}_{\gamma}(\rho)$ [see Eq. (7)] tend rapidly to zero, and
the sum over $(n,n^{\prime})$ in (12) converges. For resonances
($E^{J\pi}_{k}>E_{T}$), the convergence of (12) is not guaranteed. We discuss
this issue in more detail in Sect. 3.

The energies and r.m.s. radii discussed in the previous subsection involve all
generator coordinates. It is, however, useful to analyze the energies of the
system for a single $R$ value. This quantity is referred to as the energy
curves. Two variants can be considered. In the former, only the diagonal
matrix elements of the Hamiltonian are used, and the energy curves are defined
as

$\displaystyle
E^{J\pi}_{\gamma}(R)=\frac{H^{J\pi}_{\gamma,\gamma}(R,R)}{N^{J\pi}_{\gamma,\gamma}(R,R)}-E_{T}.$
(13)

This definition ignores the couplings between the channels. At large
distances, they tend to

$\displaystyle
E^{J\pi}_{\gamma}(R)\rightarrow\frac{Z_{\gamma\gamma}e^{2}}{R}+\frac{\hbar^{2}}{2m_{N}}\frac{(K+3/2)(K+5/2)}{R^{2}}+\frac{1}{4}\hbar\omega,$
(14)

where $Z_{\gamma\gamma}e^{2}$ is a diagonal element of the Coulomb three-body
interaction (see, for example, Ref. De10 ), $m_{N}$ is the nucleon mass, and
$\frac{1}{4}\hbar\omega$ is the residual energy associated with the harmonic
oscillator functions ($\hbar\omega=\hbar^{2}/m_{N}b^{2}$).

In the alternative approach, the energy curves stem from a diagonalization of
the Hamiltonian for a fixed $R$ value. They are given by the eigenvalue
problem

$\displaystyle\sum_{\gamma}$
$\displaystyle\biggl{[}H^{J\pi}_{\gamma,\gamma^{\prime}}(R,R)-E^{J\pi}_{k}(R)N^{J\pi}_{\gamma,\gamma^{\prime}}(R,R)\biggr{]}c^{J\pi}_{(k)\gamma}(R)=0.$
(15)

At large distances, the coupling elements ($\gamma\neq\gamma^{\prime}$) tend
to zero and both definitions (13) and (15) are equivalent. In three-body
systems, however, the couplings are known to extend to large distances, even
for short-range interactions (see, for example, Refs. DTB06 ; De10 ; DD09 ).

The energy curves cannot be considered as genuine potentials. However, they
provide various informations, such as the existence of bound states or of
narrow resonances, the level ordering, the cluster structure, etc.

##  3 Discussion of resonances

The eigenvalue problem (9) is, strictly speaking, valid for bound states only.
The variational principle guarantees that an upper limit of the exact solution
is found, and the wave function tends exponentially to zero. The situation,
however, is different for positive-energy states. In that case, the lowest
energy is zero, i.e. the optimal solution, according to the variational
principle, corresponds to a system where the clusters are at infinite distance
from each other.

For narrow resonances, the bound-state approximation (BSA), which is a direct
extension of (9), usually provides a fair approximation of the energy, even
with finite bases. If the width is small, the energy is fairly stable when the
basis changes. The situation is different for the wave function. The long-
range part may be sensitive to the choice of the basis, and matrix elements
using these wave functions may be unstable. A typical example will be shown
with the $0^{+}_{2}$ resonance of ${}^{12}{\mathrm{C}}$.

For broad resonances, there are various techniques which complement the
variational method. The idea is to avoid scattering calculations, such as in
the $R$-matrix theory DB10 , where resonance properties are derived from an
analysis of the phase shifts (or scattering matrices). The complementary
methods have solid mathematical foundations, and are, in principle, relatively
simple to implement in variational calculations. We briefly summarize below
some of them.

  * •

The complex scaling method (CSM) is based on the rotation of the space and
momentum coordinates Ho83 ; AC71 ; AMK06 . In other words, the space
coordinate $\boldsymbol{r}$ and momentum $\boldsymbol{p}$ of each particle are
transformed as

$\displaystyle
U(\theta)\boldsymbol{r}U^{-1}(\theta)=\boldsymbol{r}\exp(i\theta),$
$\displaystyle
U(\theta)\boldsymbol{p}U^{-1}(\theta)=\boldsymbol{p}\exp(-i\theta),$ (16)

where $\theta$ is the rotation angle. Under this transformation, the
Schrödinger equation reads

$\displaystyle
H(\theta)\Psi(\theta)=U(\theta)HU^{-1}(\theta)\Psi(\theta)=E(\theta)\Psi(\theta),$
(17)

and the solutions $\Psi(\theta)$ are square-integrable provided that $\theta$
is properly chosen AMK06 . They can be expanded over a finite basis, after
rotation of the Hamiltonian. Of course the potential should be available in an
analytic form to apply transformation (16).

The ABC theorem AC71  shows that the eigenvalues $E_{k}(\theta)$ are located
on a straight line in the complex plane, rotated by an angle $2\theta$.
Resonant states are not affected by this angle and correspond to stable
eigenvalues

$\displaystyle E_{k}(\theta)=E_{R}-i\Gamma/2,$ (18)

where $E_{R}$ is the energy and $\Gamma$ the width of the resonance.

Recently, the CSM has been extended to the calculation of level densities
SMK05 ; SKG08  and to dipole strength distributions AMK06 . Of course the
resonance properties (18) derived from the CSM should also be consistent with
those derived from a phase-shift analysis.

  * •

In the complex absorbing potential (CAP) method, an imaginary potential is
added to the Hamiltonian kernel. The first applications were developed in
atomic physics RM93  and in non-microscopic nuclear models TOI14 . Ito and
Yabana IY05  have extended the method to microscopic cluster calculations
within the GCM. The Hamiltonian kernel (10) is replaced by

$\displaystyle H(R,R^{\prime})\rightarrow H(R,R^{\prime})-i\eta
W(R)\delta(R-R^{\prime}),$ (19)

where $\eta$ is a positive real number. The absorbing potential is usually
taken as

$\displaystyle W(R)=\theta(R-R_{0})(R-R_{0})^{\beta},$ (20)

where $R_{0}$ is an arbitrary radius, larger than the range of the nuclear
force and $\theta$ is the step function. In most calculations, $\beta$ is
taken as $\beta=4$.

This method provides the energy and widths of resonances as in (18), even for
broad states. In Ref. IY05 , it was shown, however, that the method needs many
generator coordinates. In their microscopic study of $\alpha+^{6}$He
scattering, Ito and Yabana use 100 generator coordinates, up to $R=50$ fm. For
computational reasons, this method is difficult to apply to three-body
systems, owing to the strong couplings between the channels, and to the long
range of the potentials.

  * •

The analytic continuation in a coupling constant (ACCC) method has been
proposed by Kukulin et al. KKH89  to evaluate the energy and width of a
resonance. The main advantage is that the ACCC method only requires bound-
state calculations, much simpler than scattering calculations involving
boundary conditions. Some applications to a microscopic description of two-
and three-cluster models can be found in Ref. TSV99 . The method has been
applied to a non-microscopic description of ${}^{12}{\mathrm{C}}$ in Ref. KK05
.

To apply the ACCC method, one assumes that the Hamiltonian can be written as

$\displaystyle H(u)=H_{0}+u\,H_{1},$ (21)

where $u$ is a linear parameter. The linear part $H_{1}$ is supposed to be
attractive so that, for increasing $u$ values, the system becomes bound. For
$u=u_{0}$, the energy is zero, and we have $E(u_{0})=0$.

The problem is to determine the resonance properties for the physical value
$u<u_{0}$. In the bound-state regime $(u>u_{0})$, the wave number $k$ is
imaginary, and is parametrized by a Padé approximant as

$\displaystyle
k(x)=i\frac{c_{0}+c_{1}x+\cdots+c_{M}x^{M}}{1+d_{1}x+\cdots+d_{N}x^{N}},$ (22)

where $x=\sqrt{u-u_{0}}$, and ($M,N$) define the degree of the Padé
approximant. The ($M+N+1$) coefficients $c_{i}$ and $d_{j}$ are calculated in
the bound-state region by using $u_{i}$ values such that $E(u_{i})<0$. Going
to the physical $u$ value ($u<u_{0},x$ imaginary), one determines $k$ from
(22). The energy $E_{R}$ and width $\Gamma$ are obtained from

$\displaystyle E=\frac{\hbar^{2}k^{2}}{2m}=E_{R}-i\Gamma/2.$ (23)

The ACCC is, in principle, a simple extension of the variational method.
However, it was pointed out KKH89 ; TSV99  that this method requires a high
accuracy in the numerical calculation. In particular, the $u_{0}$ value must
be determined with several digits. It is therefore not realistic for
microscopic three-body systems.

  * •

The box method MCD80  can be used for narrow resonances. This method has been
applied essentially in atomic physics. The idea is to search for positive
eigenvalues of the Schrödinger equation (2) inside a box. Then, looking at the
eigenvalues as a function of the box size, a narrow resonance appears at a
stable energy (see, for example, Fig. 1 of Ref. MCD80 ). This method is
simpler than other approximate techniques and, therefore, permits the use of
large bases. The method has been recently extended to the determination of
resonance widths ZMZ09 . However, it requires the numerical calculation of the
first and second derivatives, which means that, in practice, many generator
coordinates must be used for a good accuracy of the resonance parameters.

##  4 Application to ${}^{12}{\mathrm{C}}$

The ${}^{12}{\mathrm{C}}$ nucleus has attracted much attention in recent
years, in particular for the $0^{+}_{2}$ resonance, known as the Hoyle state
(see Ref. FF14  for a recent review). The Hoyle state, located just above the
$3\alpha$ threshold ($E_{R}=0.36$ MeV), is quite important in nuclear
astrophysics since its properties determine the triple-$\alpha$ reaction rate.
Its existence was predicted by Hoyle Ho54  on the basis of the observed
abundance of ${}^{12}{\mathrm{C}}$.

There is an impressive literature about the Hoyle state, and we refer to Refs.
FF14 ; ZFH20  for an overview. One of its characteristics is to present a
marked $\alpha+^{8}$Be cluster structure DB87b . This $\alpha$ clustering is
well established in many light nuclei, such as 7Li, 7,8,9,10Be, 16,17,18O,
18,19,20Ne FHI80 . The specificity of the ${}^{12}{\mathrm{C}}$ nucleus is
that the second cluster 8Be also presents an $\alpha$ cluster structure. As in
all excited states located near a breakup threshold, the Hoyle state presents
an extended density, which means that the density at short distances is
decreased if compared to well bound states. This natural property, common to
all nuclei, lead some authors to refer to the concept of ”dilute gas” Ka07 ;
Fu15  and of Bose-Einstein Condensates THS01 ; ZFH20 .

Our aim here is not to perform new calculations on the ${}^{12}{\mathrm{C}}$
nucleus. The first microscopic $3\alpha$ calculation was performed by Uegaki
et al. in 1977 UOA77 , and improved in different ways Ka81 ; DB87b ; THS01 ;
CFN07 ; Ka07 ; SMO08 . The ab initio calculation of Ref. CFN07  works rather
well for the ground state, but needs the introduction of specific $3\alpha$
configurations to reproduce the Hoyle state. One of the frequent issues about
the Hoyle state is the determination of its r.m.s. radius, which is expected
to be large (see references in Ref. FF14 ).

We adopt the same microscopic $3\alpha$ model as in Ref. SMO08 , where the
Minnesota nucleon-nucleon interaction TLT77  with $u=0.9487$ was used. For the
generator coordinates, we use a large basis: 12 values from 1.5 to 18 fm with
a step of 1.5 fm, and 3 additional values at 20, 22 and 24 fm. This basis is
unusually large, but permits a reliable discussion concerning the properties
of resonances.

Figure 2: Energy curves (13) for $J=0^{+}$ in ${}^{12}{\mathrm{C}}$. The
curves are labeled by the $K$ values. The dashed line represents the
asymptotic behaviour (14) for $K=0$.

In Fig. 2, we display the energy curves (13) for $J=0^{+}$ and for different
$K$ values. Note that in ${}^{12}{\mathrm{C}}$, a full symmetrization of the
wave functions for $\alpha$ exchange leads to the cancellation of the $K=2$
component (see, for example, Ref. De10 ). The dashed line illustrates the
asymptotic behaviour (14) with $Z_{00}=28.81$ De10 . The energy curves for
$K=0,4,6$ present a minimum around $R=4$ fm. At short distances, the
antisymmetrization between the nucleons makes these curves equivalent. This is
not true at large distances, where the effective three-body Coulomb
interaction is different, and where the centrifugal term plays a role.

Figure 3 presents the binding energy (with respect to the $3\alpha$ threshold)
of the $0^{+}_{1}$ and $0^{+}_{2}$ states for increasing size of the basis. We
define $R_{\rm max}$ as the maximum $R$ value included in the basis. The upper
and lower panels present the energy and r.m.s. radius, respectively. As
expected for a bound state, the $0^{+}_{1}$ energy and r.m.s. radius converge
rapidly. With $\mbox{$R_{\rm max}$}\approx 6$ fm, a fair convergence is
reached. The corresponding radius $\sqrt{<r^{2}>}=2.21$ fm is too small
compared to experiment (2.48 fm KPS17 ) but this difference is due to the
overbinding of the theoretical state.

Figure 3: Total energy (top) and r.m.s. radius (bottom) of the $0^{+}_{1}$ and
$0^{+}_{2}$ states in ${}^{12}{\mathrm{C}}$. Energies are given with respect
to the $3\alpha$ threshold.

More interesting results are obtained for the $0^{+}_{2}$ state. If the energy
remains almost constant above $\mbox{$R_{\rm max}$}\approx 15$ fm, the r.m.s.
radius significantly increases with larger bases. We go here up to
$\mbox{$R_{\rm max}$}=24$ fm, which represents a huge value, much larger than
in standard calculations (see, for example, Ref. SMO08 ). This is, however,
necessary to illustrate convergence issues. As we may expect from the unbound
nature of the $0^{+}_{2}$ state, the r.m.s. radius diverges. Any (large) value
can be obtained, provided that the basis is large enough. This explains why
calculations in the literature are quite different FF14 .

The same quantities are plotted in Fig. 4 for $J=2^{+}$. The existence of a
$2^{+}_{2}$ resonance, second state of a band based on the Hoyle state, is
well established Ka81 ; DB87b , but this state should be broad. Even the
energy is not stable, and does not present a plateau with $R_{\rm max}$. The
corresponding r.m.s. radius strongly diverges. Notice that a microscopic
$3\alpha$ model does not predict any $0^{+}_{3}$ or $2^{+}_{3}$ resonance.

Let us briefly comment on non-microscopic descriptions of the $3\alpha$
system. Two $\alpha+\alpha$ potentials, the shallow Ali-Bodmer potential AB66
and the deep Buck potential BFW77  reproduce very well the experimental
$\alpha+\alpha$ phase shifts up to 20 MeV. When applied to $N\alpha$ systems
($N>2$), however, none of these potentials provides satisfactory results. With
the Ali-Bodmer potential, the ${}^{12}{\mathrm{C}}$ ground state is strongly
underbound TBD03 , and the $0^{+}_{2}$ resonance is far above the $3\alpha$
threshold, in contradiction with experiment. This problem may be partly
addressed by adding a phenomenological 3-body force, but this technique
introduces spurious $3\alpha$ resonances De10 .

The deep Buck potential raises the question of the two-body forbidden states
which should be removed in the $3\alpha$ model. This is usually done by using
a projection technique but, here also, several problems remain (see the
discussions in Refs. FMK04 ; De10 ). An efficient alternative would be to use
non-local $\alpha+\alpha$ potentials SMO08 , but the simplicity of non-
microscopic models is lost. A fully satisfactory description of the $3\alpha$
system within non-microscopic models remains an open issue.

Figure 4: See caption to Fig. 3 for $J=2^{+}$.

##  5 Application to ${}^{24}{\rm Mg}$

The ${}^{16}{\rm O}+\alpha+\alpha$ system is more complex than
${}^{12}{\mathrm{C}}$ since the level density is much higher. The ${}^{24}{\rm
Mg}$ nucleus was studied within an $\alpha+^{20}$Ne multicluster model in Ref.
DB89b , where 20Ne is described by an $\alpha+^{16}$O structure. In Ref. IIK11
the authors use a microscopic ${}^{16}{\rm O}+\alpha+\alpha$ model to search
for $0^{+}$ resonances in a stochastic approach. The basis, however, is more
limited since a fixed geometry is adopted. The present work contains a more
extended basis, owing to the use of the hyperspherical coordinates.

The oscillator parameter is chosen as $b=1.65$ fm, which represents a
compromise between the optimal values of $\alpha$ and of 16O. We use the
Volkov force V2 Vo65  with a Majorana exchange parameter $M=0.624$. This value
reproduces the binding energy of the ground state with respect to the
${}^{16}{\rm O}+\alpha+\alpha$ threshold ($-14.05$ MeV).

The calculations of the matrix elements are much longer than for
${}^{12}{\mathrm{C}}$. Since most of the computer time is devoted to the
quadruple sums involved in the trwo-body interaction, the ratio between the
computer times is approximately given by $6^{4}/3^{4}=16$, since ${}^{24}{\rm
Mg}$ involves 6 orbitals ($s$ and $p$), whereas ${}^{12}{\mathrm{C}}$ involves
3 orbitals ($s$ only).

As for ${}^{12}{\mathrm{C}}$, we use a large basis with 10 $R$-values from 1.2
fm to 12 fm, complemented by larger values $R=13.5,15,17,19$ fm. In Fig. 5, we
present the binding energies and r.m.s. radii of $J=0^{+}$ states as a
function of $R_{\rm max}$, the maximum $R$ value included in the basis.

Figure 5: Energies with respect to the ${}^{16}{\rm O}+\alpha+\alpha$
threshold (top) and r.m.s. radii (bottom) of $J=0^{+}$ states in ${}^{24}{\rm
Mg}$ for different sizes of the basis. The color schemes are identical in both
panels. In the upper panel, the right side shows experimental energies. In the
lower panel, the r.m.s. radii for the third and fourth eigenvalues are almost
superimposed.

The upper panel shows that four states are bound with respect to the
${}^{16}{\rm O}+\alpha+\alpha$ decay, two of which are above the
$\alpha+^{20}$Ne threshold ($-4.7$ MeV), and are therefore not rigorously
bound. This is confirmed by the r.m.s. radii (lower panel). The two lowest
states converge rapidly to $<r^{2}>\approx 8$ fm2, whereas the $0^{+}_{3}$ and
$0^{+}_{4}$ radii present a slower convergence and a larger radius
$<r^{2}>\approx 10$ fm2. The radii corresponding to the four negative-energy
curves are linked by solid lines.

The right side of the upper panel shows the experimental $0^{+}$ states. The
ground-state energy is adjusted by the nucleon-nucleon interaction. The
$0^{+}_{2}$ energy is in fair agreement with experiment. In the high-energy
part of the spectrum, several $0^{+}$ experimental states are present.

Figure 5 suggests two important properties. Around $E\approx 5$ MeV, there is
a plateau in the energy curves, and the corresponding radii are rather
insensitive to the size of the basis. This is consistent with a high-energy
($E_{x}\approx 19$ MeV) resonance in the ${}^{24}{\rm Mg}$ spectrum. As
$R_{\rm max}$ increases, the label of the eigenvalue varies. The radii
corresponding to the plateau therefore show up as individual points around
$<r^{2}>\approx 7.5$ fm2. The dip near $\mbox{$R_{\rm max}$}=5$ fm is due to a
crossing between the energy curves. The second information concerns the radii.
The lower panel of Fig. 5 shows a clear distinction between physical states
and approximations of the continuum. The former present a stable radius,
whereas the latter are characterized by diverging radii. A careful study of
the radii, and in particular of their stability against the extension of the
basis, is therefore an efficient way to make a distinction between physical
states and pseudostates.

Figure 6 displays the energy curves for $J=2^{+}$. The level density is still
higher than for $J=0^{+}$ and it is difficult to make a clear link between
theory and experiment. The $2^{+}_{1}$ and $2^{+}_{3}$ energies are in fair
agreement, but the GCM $2^{+}_{2}$ energy is too low by about 2 MeV. This is
probably due to the lack of a spin-orbit force in a ${}^{16}{\rm
O}+\alpha+\alpha$ model. The model predicts seven states below the
${}^{16}{\rm O}+\alpha+\alpha$ threshold. The r.m.s. radii are not presented
as they qualitatively follow those of $J=0^{+}$. The converged radii for the
$2^{+}_{1}$ and $2^{+}_{2}$ states are around $<r^{2}>\approx 8.2$ fm2, which
is close to the radius of the ground state.

Figure 6: See caption to Fig. 5 for $J=2^{+}$. Only energies are displayed.

##  6 Conclusion

The goal of the present work is to illustrate the calculation of resonance
properties in cluster models, and more especially in multicluster models. A
rigorous treatment of the resonances would require a scattering theory, with
exact boundary conditions. If this approach is fairly simple in two-cluster
models, it raises strong difficulties when more than two clusters are
involved. The bound-state approximation is commonly used owing to its
simplicity. We have shown, however, that positive-energy eigenvalues should be
treated carefully, and that, even for narrow resonances, the wave function may
be sensitive to the basis. A direct consequence is that some properties, such
as the r.m.s. radius, are unstable. The stability against the basis should be
assessed.

Several method exist to complement the bound-state approximation, such as the
CSM or the ACCC. They permit to determine the energy and width of a resonance.
In practice, however, they are difficult to apply to microscopic calculations
since they usually need very large bases. We have used an alternative of the
box method, where the number of basis functions is progressively increased. We
have shown that a stability of the energy can be obtained, but the
corresponding r.m.s. radii are unstable. The application to the Hoyle state in
${}^{12}{\mathrm{C}}$ is an excellent example which explains the variety of
the values in the literature.

## Acknowledgments

This work was supported by the Fonds de la Recherche Scientifique - FNRS under
Grant Numbers 4.45.10.08 and J.0049.19. It benefited from computational
resources made available on the Tier-1 supercomputer of the Fédération
Wallonie-Bruxelles, infrastructure funded by the Walloon Region under the
grant agreement No. 1117545.

## References

  * (1) M. Freer, H. Horiuchi, Y. Kanada-En’yo, D. Lee, U.G. Meißner, Rev. Mod. Phys. 90, 035004 (2018)
  * (2) H. Horiuchi, K. Ikeda, K. Katō, Prog. Theor. Phys. Suppl. 192, 1 (2012)
  * (3) P. Descouvemont, M. Dufour, _Clusters in Nuclei_ , Vol. 2 (Springer, 2012)
  * (4) D. Brink, Proceedings of the International School of Physics “Enrico Fermi,” Course XXXVI, Varenna, 1965, Academic Press, New-York p. 247 (1966)
  * (5) Y. Fujiwara, H. Horiuchi, K. Ikeda, M. Kamimura, K. Katō, Y. Suzuki, E. Uegaki, Prog. Theor. Phys. Suppl. 68, 29 (1980)
  * (6) K. Ikeda, N. Takigawa, H. Horiuchi, Prog. Theo. Phys. Suppl., Extra Number p. 464 (1968)
  * (7) A. Tohsaki, H. Horiuchi, P. Schuck, G. Röpke, Phys. Rev. Lett. 87, 192501 (2001)
  * (8) B. Zhou, Y. Funaki, H. Horiuchi, A. Tohsaki, Frontiers of Physics 15 (2020)
  * (9) T. Neff, H. Feldmeier, Eur. Phys. J. Special Topics 156, 69 (2008)
  * (10) P. Navrátil, S. Quaglioni, I. Stetcu, B.R. Barrett, J. Phys. G 36, 083101 (2009)
  * (11) H. Hergert, Frontiers in Physics 8, 379 (2020)
  * (12) K. Wildermuth, Y.C. Tang, _A Unified Theory of the Nucleus_ (Vieweg, Braunschweig, 1977)
  * (13) H. Horiuchi, Prog. Theor. Phys. Suppl. 62, 90 (1977)
  * (14) M. Freer, H. Fynbo, Prog. Part. Nucl. Phys. 78, 1 (2014)
  * (15) P. Navrátil, G.P. Kamuntavičius, B.R. Barrett, Phys. Rev. C 61, 044001 (2000)
  * (16) R.B. Wiringa, V.G.J. Stoks, R. Schiavilla, Phys. Rev. C 51, 38 (1995)
  * (17) R. Machleidt, Phys. Rev. C 63, 024001 (2001)
  * (18) D.R. Thompson, M. LeMere, Y.C. Tang, Nucl. Phys. A 286, 53 (1977)
  * (19) A.B. Volkov, Nucl. Phys. 74, 33 (1965)
  * (20) S. Korennov, P. Descouvemont, Nucl. Phys. A 740, 249 (2004)
  * (21) M.V. Zhukov, B.V. Danilin, D.V. Fedorov, J.M. Bang, I.J. Thompson, J.S. Vaagen, Phys. Rep. 231, 151 (1993)
  * (22) A. Kievsky, S. Rosati, M. Viviani, L.E. Marcucci, L. Girlanda, J. Phys. G 35, 063101 (2008)
  * (23) J. Raynal, J. Revai, Nuovo Cim. A 39, 612 (1970)
  * (24) P. Descouvemont, Phys. Rev. C 99, 064308 (2019)
  * (25) D. Baye, M. Kruglanski, Phys. Rev. C 45, 1321 (1992)
  * (26) P. Descouvemont, J. Phys. G 37, 064010 (2010)
  * (27) P. Descouvemont, E.M. Tursunov, D. Baye, Nucl. Phys. A 765, 370 (2006)
  * (28) A. Damman, P. Descouvemont, Phys. Rev. C 80, 044310 (2009)
  * (29) P. Descouvemont, D. Baye, Rep. Prog. Phys. 73, 036301 (2010)
  * (30) Y.K. Ho, Phys. Rep. 99, 1 (1983)
  * (31) J. Aguilar, J.M. Combes, Commun. Math. Phys. 22, 269 (1971)
  * (32) S. Aoyama, T. Myo, K. Katō, K. Ikeda, Prog. Theor. Phys. 116, 1 (2006)
  * (33) R. Suzuki, T. Myo, K. Katō, Prog. Theor. Phys. 113, 1273 (2005)
  * (34) R. Suzuki, A.T. Kruppa, B.G. Giraud, K. Katō, Prog. Theor. Phys. 119, 949 (2008)
  * (35) U.V. Riss, H.D. Meyer, J. Phys. B 26, 4503 (1993)
  * (36) Y. Takenaka, R. Otani, M. Iwasaki, K. Mimura, M. Ito, Prog. Theor. Exp. Phys. 2014 (2014)
  * (37) M. Ito, K. Yabana, Prog. Theor. Phys. 113, 1047 (2005)
  * (38) V.I. Kukulin, V.M. Krasnopol’sky, J. Horǎćek, _Theory of Resonances, Principles and Applications_ (Kluwer Academic, 1989)
  * (39) N. Tanaka, Y. Suzuki, K. Varga, R.G. Lovas, Phys. Rev. C 59, 1391 (1999)
  * (40) C. Kurokawa, K. Katō, Phys. Rev. C 71, 021301 (2005)
  * (41) C.H. Maier, L.S. Cederbaum, W. Domcke, J. Phys. B 13, L119 (1980)
  * (42) S.G. Zhou, J. Meng, E.G. Zhao, J. Phys. B 42, 245001 (2009)
  * (43) F. Hoyle, Astrophys. J. Suppl. 1, 121 (1954)
  * (44) P. Descouvemont, D. Baye, Phys. Rev. C 36, 54 (1987)
  * (45) Y. Kanada-En’yo, Prog. Theor. Phys. 117, 655 (2007)
  * (46) Y. Funaki, Phys. Rev. C 92, 021302 (2015)
  * (47) E. Uegaki, S. Okabe, Y. Abe, H. Tanaka, Prog. Theor. Phys. 57, 1262 (1977)
  * (48) M. Kamimura, Nucl. Phys. A 351, 456 (1981)
  * (49) M. Chernykh, H. Feldmeier, T. Neff, P. von Neumann-Cosel, A. Richter, Phys. Rev. Lett. 98, 032501 (2007)
  * (50) Y. Suzuki, H. Matsumura, M. Orabi, Y. Fujiwara, P. Descouvemont, M. Theeten, D. Baye, Phys. Lett. B 659, 160 (2008)
  * (51) J.H. Kelley, J.E. Purcell, C.G. Sheu, Nucl. Phys. A 968, 71 (2017)
  * (52) S. Ali, A.R. Bodmer, Nucl. Phys. 80, 99 (1966)
  * (53) B. Buck, H. Friedrich, C. Wheatley, Nucl. Phys. A 275, 246 (1977)
  * (54) E.M. Tursunov, D. Baye, P. Descouvemont, Nucl. Phys. A 723, 365 (2003)
  * (55) Y. Fujiwara, K. Miyagawa, M. Kohno, Y. Suzuki, D. Baye, J.M. Sparenberg, Phys. Rev. C 70, 024002 (2004)
  * (56) P. Descouvemont, D. Baye, Phys. Lett. B 228, 6 (1989)
  * (57) T. Ichikawa, N. Itagaki, T. Kawabata, T. Kokalova, W. von Oertzen, Phys. Rev. C 83, 061301 (2011)