# Efficient Rehearsal Free Zero Forgetting Continual Learning using Adaptive
Weight Modulation

###### Abstract

Artificial neural networks encounter a notable challenge known as continual
learning, which involves acquiring knowledge of multiple tasks over an
extended period. This challenge arises due to the tendency of previously
learned weights to be adjusted to suit the objectives of new tasks, resulting
in a phenomenon called catastrophic forgetting. Most approaches to this
problem seek a balance between maximizing performance on the new tasks and
minimizing the forgetting of previous tasks. In contrast, our approach
attempts to maximize the performance of the new task, while ensuring zero
forgetting. This is accomplished by creating a task-specific modulation
parameters for each task. Only these would be learnable parameters during
learning of consecutive tasks. Through comprehensive experimental evaluations,
our model demonstrates superior performance in acquiring and retaining novel
tasks that pose difficulties for other multi-task models. This emphasizes the
efficacy of our approach in preventing catastrophic forgetting while
accommodating the acquisition of new tasks.

##  1 Introduction

Artificial neural networks face a significant challenge in continual learning,
which involves learning numerous tasks over a prolonged period, due to the
tendency of weights learned for prior tasks to be modified to suit the
objectives of new tasks, resulting in catastrophic forgetting [1],[2].
Although recent progress in machine learning and deep neural networks has led
to impressive performance improvements in various fields, existing continual
learning techniques provide limited solutions and do not ensure zero-
forgetting over extended periods, for example see [3]. Most approaches attempt
to balance learning and forgetting, and even minor changes to the system can
result in reduced performance in new tasks. Maintaining zero-forgetting is of
utmost importance as it is unacceptable to jeopardize the knowledge gained
from past tasks. This is especially critical in domains like medical image
detection, where the capability to identify new diseases should not come at
the expense of losing the system’s proficiency in recognizing existing ones.
Likewise, the potential consequences of compromising an autonomous driving
system through forgetting are substantial, posing significant hazards. While
there are existing solutions for continual learning, including those that
address the issue of zero forgetting, they often rely on less efficient
networks such as Res-Nets (as mentioned in [4]). However, these networks may
not be suitable for deployment on small local devices like MobileNet does
(cited in [5] and [6]). Unfortunately, the performance of such efficient and
compact devices falls significantly below the optimal level in the continual
setting. Given the increasing demand for both zero forgetting and efficiency,
it becomes crucial to achieve progress by merging these two aspects. The
challenge lies in developing methods that can simultaneously achieve both zero
forgetting and efficiency, as each aspect is important on its own but
combining them requires further advancements. Our findings indicate that
smaller networks have a higher tendency to experience forgetting. In this
paper, we introduce one of the earliest zero-forgetting techniques. Our
approach does not damage previously learned tasks, and we outperform state-of-
the-art baselines. However, as we cannot modify existing weights, which means
that we need to add more parameters for each new task. We aim to keep the
added parameters relatively small. Our approach offers the advantage of not
requiring specific bounds on the number of tasks that can be added. We begin
with a pre-trained network and expand it as necessary, ensuring that the model
is appropriately sized for the tasks encountered thus far. This differs from
many current approaches that use a fixed model, which can often start too
large and eventually become too small to handle new tasks. There are three
main methods used in current approaches. The first method involves making sure
that partial data from all tasks are available during training. This is done
by interleaving data from multiple tasks during learning, which helps to
prevent large amounts of forgetting if the network weights can be optimized
for performance on all tasks simultaneously. However, this approach, known as
Rehearsal Methods, is often impractical for learning large numbers of tasks,
such as in our setting, as it would require storing and replaying data that is
proportional to the number of tasks. Additionally, data may be missing due to
privacy concerns, as in the case of medical imaging.
The second main approach proposed is regularization-based methods, where the
pre-trained model on old tasks is given and the model attempts to learn the
new objective while minimizing changes in the relevant existing weights to
avoid forgetting. However, the main issue with regularization-based methods is
that they cannot guarantee low forgetting, and in long continual scenarios,
the accuracy of old tasks often decreases dramatically, resulting in poor
learning of new tasks as well, as shown in several studies such as [3], [7],
and [8].
Architectural methods are another approach to mitigate catastrophic
interference in continual learning. However, they typically require a drastic
increase in computational and storage requirements, often doubling the model
parameters for each new task [9], [10], [11]. Task masking [12] is one of the
single efficient zero forgetting methods, where a single bit is learned per
weight, and many studies have investigated its convergence and stability [13],
[14], [15], [16]. For over-parameterized networks, like ResNet50 [4], masking
shows almost optimal performance as was shown in [12], but as we will show for
much more efficient architecture with similar performance used by computation-
bounded devices like Mobile Net [5], the performance of Masking is far from
optimal. Our proposed adaptive method shows much better performance than
masking, with the same parameter addition, and parameters can be reduced while
still outperforming masking.
Our contributions are as follows:

  * •

We present a new method with guaranteed zero forgetting for any number of
added tasks. The method reaches high accuracy in different domain
classification tasks, outperforming existing state-of-the-art methods.

  * •

The method adds a set of parameters using task modulation for each task. Our
method’s total number of parameters is still the same or lower than the
alternative methods in all our experiments. The method can continue adding any
number of tasks without inner-task interference.

  * •

The algorithm is faster and requires less storage than alternatives.

  * •

Rehearsal free and no need of storing old parameters.

##  2 Related Work

###  2.1 Multi task learning

Multi-task learning (MTL) involves training a shared model to perform multiple
tasks. This approach has several benefits, such as increased data efficiency,
reduced over-fitting through shared representations, lower computation and
resource requirements, and faster learning by utilizing auxiliary information.
For a thorough overview of the field, refer to [17]. MTL can be classified
into two primary settings: joint learning and continual learning.
Joint learning The objective is to acquire proficiency in all assignments by
considering the availability of data from all tasks during training. The key
benefit of this approach is the utilization of extensively shared
representations for all tasks, as observed in the case of learning surface
normal estimation and depth estimation [18], semantic segmentation and depth
estimation [19]. Nevertheless, this approach is often impractical due to
constraints such as data storage limits and the real-time requirements of
systems.
Continual learning In Continual learning, access to only the data from the
current task is available. The principal challenge of this learning approach
is to reduce catastrophic forgetting, i.e., the problem of learning new tasks
without erasing knowledge acquired from previous tasks. When the tasks being
learned are independent, the learning process is analogous to training a
distinct network for each task. Multi-task learning (MTL) approaches assume
that the tasks are not independent, and aim to exploit this property to add
new tasks efficiently without forgetting previous knowledge. However, some
scenarios may be hybrid, where a small amount of data from previous tasks is
available, as in [20] and [21]. Continual learning can be categorized into two
main scenarios: task incremental and class incremental. In task incremental,
the task IDs are known during evaluation time, whereas in class incremental,
the model should differentiate between all tasks that have been seen so far,
even if their IDs are unknown. In our paper, we focus on task incremental
problems.

###  2.2 catastrophic forgetting

Catastrophic forgetting has been a well-known phenomenon in continual learning
since the $1980s$, as evidenced by early research such as [1], [2], and [22].
In contrast to artificial neural networks, humans and other animals appear to
be capable of learning continually, as described in [23]. Despite the decades
of research since the discovery of catastrophic forgetting, the available
approaches to continual learning still offer limited solutions, as elaborated
in the subsequent sections. As an example, in [3], various existing methods
from different approaches were tested on multiple tasks. The evaluation was
conducted on the CUB$200$ [24], [25] dataset, which includes $200$,
classification classes. The experiment began by training on $100$ classes and
then incrementally adding one class at a time. Next, the remaining $100$ tasks
were trained using each selected representing method. The results indicated
that while offline learning achieved an overall accuracy of $62\%$, the best-
performing method (Rehearsing method) demonstrated a learning of $35\%$,
revealing a significant disparity. The principal challenge of continual
learning is to adjust the weights to meet the new objective without
significantly modifying the pertinent weights in the previous tasks. The
primary methods employed to address this challenge, as detailed in [3],
include Rehearsal Methods, Architectural Methods, and Regularization Methods.

###  2.3 Architectural methods

Architectural methods aim to mitigate catastrophic interference by separating
what is being learned from what has already been learned. One of the earliest
architectural methods is branching, also known as transfer learning. This
approach involves training a network and subsequently adding another small
network to the pre-trained one, with only the added network being learned. The
primary drawback of the branching approach is that the bottom features of the
new model cannot be altered and can only be adjusted by modifying the new
weights. This limitation can negatively impact the learning accuracy of the
new tasks, leading to a relative decline in performance, as evidenced by our
experiments. It is worth noting that in certain cases, adding only a
classifier may result in a high level of performance (e.g. see Flowers [26],
in Table 4). In contrast, our proposed method involves modulating all body
model weights, affecting the model from the low-level features to the high-
level ones. The branching approach has found extensive use in various fields
such as NLP [27], [28], VLP (vision language pretraining) [29], and image
classification [30]. In VLP, new tasks are introduced by performing fine-
tuning on the pre-trained model. While this approach can often accommodate new
tasks, it has limitations and can lead to significant forgetting. To mitigate
the effects of forgetting, new variations of fine-tuning such as LORA [31] are
being developed. The primary advantage of this approach is that it requires
training only a small number of new parameters. Dual-weight methods [3]
maintain a set of weights for a single-network architecture for each task. PNN
(progressive neural network) and ENN (Extended Neural Networks) are noteworthy
instances that tackle the issue of forgetting by employing individual networks
for each task. These approaches incorporate the previously learned features
into the current layer through a lateral connection originating from the
previous layer (or by employing a learnable sum of kernels, as in ENN). PNN
and ENN offer the benefit of feature sharing and help prevent overfitting.
However, a drawback of these methods is that they necessitate the creation of
a new network for each additional task. Pack-Net [32] is a technique that
draws inspiration from network pruning methods to exploit redundancies in deep
networks, freeing up parameters that can then be used to learn new tasks. The
process involves iterative pruning and network re-training to sequentially
incorporate multiple tasks into a single network. After learning a task, a
task-specific sub-network is extracted by pruning the network and frozen for
the subsequent tasks. When selecting the task-specific sub-network, each task
builds on the sub-network corresponding to the previous task with some
extensions based on the pruning outcomes. However, the number of tasks that
can be learned with this approach is very limited, as no free weights remain
for training after a certain number of tasks, as shown in [12]. The primary
zero-forgetting architectural method is weight masking [12] which serves as
the main zero-forgetting method. In weight masking, a binary mask is learned
for each weight, allowing for the addition of only a percent of one over the
machine precision, typically $16$ or $32$, resulting in a relatively small
addition. Weight masking leverages the over-parameterization of large models
like Res Nets, but its performance is sub-optimal in compact versions, such as
Mobile-Net [5], as we will show. The primary drawback of masking is that it’s
not adaptive, and it cannot scale up for improved performance by adding more
parameters. Our solution is an adaptive architectural method. An alternative
approach to weight modulation is neural modulation, as described in the paper
cited as [33]. Neural modulation involves modulating neurons either through
binary masks or directly using learnable parameters. While the paper
successfully applied binary neuron modulation to solve simple tasks, it
remains unclear how this method can be adapted to large models. In large
models, the number of neurons is negligible compared to the number of
parameters (for instance, in ResNet18, it’s less than 0.1%). Consequently, it
becomes challenging to achieve meaningful changes using neural modulation in
such cases. While neural modulation is a promising zero-forgetting scheme, its
applicability to real-world large-scale applications is limited.

###  2.4 Rehearsal methods

The primary objective revolves around the retention of pertinent information
from previous tasks, which is then amalgamated with fresh data to prevent
catastrophic forgetting regarding the prior tasks. In the study referenced as
[34], the data from prior experiments undergoes shuffling alongside the new
data, subsequently facilitating optimization of the model on both datasets.
Conversely, certain studies such as [20] opt to aggregate gradients from all
tasks into a novel gradient that is employed across all tasks. However, there
are notable drawbacks to this approach. One major limitation is the linear
growth of storage requirements with the increasing number of tasks, making it
impractical for scenarios involving a large number of tasks over an extended
period. Additionally, this solution often falls short when only a limited
amount of data can be stored, as evidenced by the significant decline in
performance observed in [3]. Additionally, privacy concerns, particularly in
domains like medical imaging, impose restrictions on the utilization of past
samples. Due to privacy regulations and ethical considerations, access to and
storage of patient data becomes limited, making it impractical or even
prohibited to use previously collected samples for continual learning
purposes. This poses a significant challenge in devising effective solutions
for zero-forgetting in scenarios where data privacy is of utmost importance.
Therefore, this approach serves as a compromise between storing all data to
ensure optimal performance and completely omitting storage, which leads to
significant forgetting. It should be noted that our proposed solution
eliminates the need for data rehearsal, which can be impractical and
inefficient in certain cases. Another significant drawback is the performance
impact when the number of classes or samples per class in the new task differs
greatly from the original task. In such cases, data rehearsal methods can
result in severe forgetting or low performance on the new task, as the model
attempts to adapt to the task with more samples or classes. This renders
rehearsal methods ineffective in scenarios where there is a substantial
discrepancy between the original and new tasks. Furthermore, it is important
to acknowledge that zero forgetting is not guaranteed with this approach,
especially when the number of stored samples is low. The potential for
forgetting remains a concern, and the effectiveness of the solution depends on
the quantity and quality of the stored samples.

###  2.5 Regularization methods

In these methods, a regularization factor is introduced to the objective that
measures the dissimilarity between the current and previous weights. More
specifically, given the objective function $L_{B}$ for the current task, a
regularization function $R_{i,\theta}$ is added to the objective that may
depend on the current parameters, step $i$, and previous model weights
$\theta^{*}$. The resulting objective for the new task is
$L_{new}(\theta)=L_{B}(\theta)+\lambda\cdot R_{i,\theta}(\theta^{*},\theta)$,
where $\lambda$ is a hyper-parameter that controls the regularization
strength. This approach aims to strike a balance between preserving the old
tasks’ knowledge by imposing a high regularization factor and allowing for the
model’s flexibility to learn the new task by using a low regularization
factor, which could result in forgetting the old tasks. Regularization methods
exhibit various significant shortcomings that hinder their efficacy in
mitigating catastrophic forgetting. One notable concern is the potential
accumulation of errors over prolonged periods of continual learning, resulting
in substantial levels of forgetting pertaining to previously learned tasks
(see Figure 2 in our results). Even cutting-edge image segmentation
techniques, as exemplified in [7] and [8], which demonstrate proficiency in
few-task scenarios, exhibit subpar performance in the context of extended
continual task challenges where multiple tasks are sequentially acquired.
Furthermore, the computation of regularization factors often necessitates
iterating over all parameters during each training iteration. This requirement
leads to protracted training times and extensive computational demands, as
evidenced by studies such as [23], [35], [36], and [21]. Consequently, this
approach may become impractical for large-scale models and complex tasks.
Moreover, the storage of previous weights within the model doubles the
parameter count and memory utilization, thereby further complicating the
training process. Collectively, these limitations impede the effectiveness of
regularization methods in numerous practice settings.

##  3 Problem statement and setup

###  3.1 Goal

The task involves multiple tasks $T_{i}$ and their corresponding data sets
$D_{i}$, where $i\in[N]$ and $N$ represent the total number of tasks. The
objective is to learn all tasks accurately with minimal forgetting while
ensuring that the model is only trained on $T_{i}$ with access to $D_{i}$
only. This creates a trade-off between high learning and low forgetting, but
our specific goal is to ensure zero forgetting while maximizing task accuracy.

###  3.2 Our method

The objective of our approach is to effectively adjust the weights of a pre-
trained neural network by introducing learnable parameters. These learnable
parameters, called task modulation parameters, are specific to each task. We
focus on modulating convolution layers, which have a shape defined by the
number of input channels ($C_{in}$), the number of output channels
($C_{out}$), and the kernel size ($k_{1},k_{2}$). To achieve modulation, we
utilize modulation resolution parameters, denoted as $m_{1}$ and $m_{2}$,
which determine the resolution of the modulation. To enable modulation, we
generate a learnable parameter called $Mod$, which has a shape of
$(\frac{C_{in}}{m_{1}},\frac{C_{out}}{m_{2}},k_{1},k_{2})$. We initialize Mod
around one. The values of $m_{1}$ and $m_{2}$ are chosen such that they are
smaller than the original $C_{in}$ and $C_{out}$ values, respectively. This
learnable parameter is then expanded to match the shape of the original
weights using interpolation, typically employing a technique like bi-cubic
interpolation. The modulation is applied by performing an element-wise
multiplication between the original weights ($W$) and the modulation parameter
($Mod$), resulting in an updated set of weights ($W:=W\cdot Mod$). After
modulation, the usual convolution operation is performed using these updated
weights. This modulation approach can also be extended to linear layers by
applying the modulation parameter to the corresponding weight matrix. An
illustrative example of $(2,2)$ fully connected modulation is presented in
Figure 1 For each task, we select a fixed resolution that is used consistently
across the entire network. By default, we use a resolution of $(4,4)$ or
$(2,8)$. However, this resolution can be adjusted to find the optimal balance
between accuracy and the number of parameters, as discussed in the context of
Table 4).

This introduces a novel trade-off between accuracy and the number of added
parameters, in contrast to regularization methods which focus on the trade-off
between old and new task accuracy.

Fig. 1: An overview of the modulation $(m_{1},m_{2})=(2,2)$. A similar
operation is being done to all the network layers.

###  3.3 Training & evaluation

Our approach starts with a pre-trained Mobile-Net V2 with 3.5M parameters, [5]
on Image-Net [37], which is widely used in real-world scenarios and is more
efficient and compact than other models like ResNet. For each new task, we
choose the modulation ratio and is added to the base network and add a linear
classifier at the top of the model and we train the task parameters including
the classifier while freezing all other weights. To address the issue of batch
normalization (BN) layers, which can have running statistics ($\mu$, $\sigma$)
that are shifted toward new tasks, we store the normalization statistics at
the end of training for each individual task and use them during evaluation,
as was done in [12]. This approach ensures zero forgetting. When evaluating
the model, we are given an image and task specification, which the model uses
as inputs along with the stored BN statistics and learned modulation. When we
compare our methods to alternatives, we include all the added parameters above
in counting the number of parameters.

##  4 Experiments

###  4.1 Implementation Details

Data sets:
In our study, we used the dataset introduced in [12], which includes Flowers
[26], Stanford Cars [38], CUBS [24, 25], Sketches [39], Wiki-Art [40], and we
additionally included the Food$101$ dataset [41]. The number of samples per
dataset can be found in Table 2. Wiki-Art and Food101 are considered out-of-
distribution and the most interesting datasets in our study as they are
different from Image-Net and we expect a high difference between different
methods.
Architecture Details: We used the Mobile-Net V2 pre-trained on Image-net with
a learning accuracy of 71.89% architecture due to its comparable performance
to ResNet$50$ but with a significantly smaller size( By a factor of about 8).
Our results, as presented in Table 1, indicate that both ResNet$50$ and the
more compact Mobil-Net V$2$ have similar optimal performance on the new
datasets, supporting the choice of Mobile-Net due to its smaller size. To
ensure fairness in comparisons to our alternatives, we compare models with an
equal number of parameters, measured in total storage requirements. For
example in comparing our method to the masking method Table 1, we use machine
precision of $16$ bits, and a resolution of $(4,4)$, or $(2,8)$ which makes
the model equivalent to the masking that uses a single bit per weight. We used
the $16$ bit precision throughout since we found it has only a minor effect on
accuracy with compared with the higher 32 precision.

Data-set | Mobile-Net V2 | ResNet50
---|---|---
Stanford-Cars | 87.19% | 91.7%
Flowers | 91.3% | 95%
CUBS200 | 80.53% | 82.83%
Sketches | 78.37% | 80%
Wiki-art | 68.82% | 75%
Table 1: Mobile-Net vs ResNet50 performance on several data-sets.

Hyper-parameters and training We repeated each experiment five times and
recorded the average accuracy. The Adam optimizer was used for training, with
a learning rate decay of $0.1$ after $15$ epochs. We conducted a brute force
search across learning rates $lr\in[1e-1,1e-2,1e-3,1e-4]$. The training was
carried out for $30$ epochs.

Data-set | Train | Test | Classes
---|---|---|---
Image-Net | 1,281,144 | 50,000 | 1,000
Stanford-Cars | 8,144 | 8,041 | 196
Flowers | 2,040 | 6,149 | 102
CUBS200 | 5,994 | 5,794 | 200
Sketches | 16,000 | 4,000 | 250
Wiki-art | 42,129 | 10,628 | 195
Food101 | 75,500 | 25,250 | 101
Table 2: Summary of used datasets.

###  4.2 Results

We evaluate our method by contrasting it with two baseline techniques: the
masking method and LwF. The masking method closely resembles our approach in
terms of utilizing task modulation and successfully achieving zero forgetting.
On the other hand, the other zero forgetting models, namely Pack-Net and
neural modulation, fall short in attaining state-of-the-art outcomes and are
not adaptable to models and data that are of high scale and resolution. As for
LwF, it stands out as the most widely used regularization method that balances
accuracy and forgetting. Data rehearsal methods are not commonly employed due
to challenges such as class imbalance and the limited number of samples per
class. In addition, we also compare the impact of two different basic training
approaches: solely training the weight of the final classification layer
(transfer learning) and training all model weights (full model training). This
comparison sheds light on the efficacy of these distinct training strategies.
In Table 1, we present the learning accuracy achieved by each baseline model
for every dataset in our evaluation. All the presented results are on the test
dataset.

###  4.3 Comparison to Masking

As outlined in the relevant literature (see subsection 2.3), the masking
approach involves learning additional binary weights for each task. These
learned weights have a size of 1 divided by the digital precision of the model
weights, and in our experiments, we set the precision to 16. Despite this
adjustment, The effect on the performance of the pre-trained network is
negligible, with only a marginal $0.27\%$ reduction noted (from an initial
accuracy of $72.15\%$ to $71.88\%$). To ensure an equivalent number of
parameters, each modulation $(m_{1},m_{2})$ resolution must hold $m_{1}\cdot
m_{2}\geq 16$. In Table 3, we show for each dataset the modulation resolution
and the interpolation method.

Data-set | Resolution | Interpolation
---|---|---
Stanford-Cars | (2,8) | nearest
Flowers | (2,8) | bi-cubic
CUBS200 | (2,8) | bi-cubic
Sketches | (2,8) | nearest-exact
Wiki-art | (4,4) | bi-cubic
Food101 | (4,4) | bi-cubic
Table 3: Modulation resolution and interpolation method.

The results are present in Table 4 Remarkably, our results on the WikiArt and
Food101 datasets demonstrate superior performance compared to masking. This
discrepancy can be attributed to the fact that the other datasets, similar to
Image-Net, exhibit significant class overlap, while WikiArt and Food101
contain classes not found in Image-Net. In addition in Flowers and CUBS read-
out alone shows very good performance, indicating the high similarity to
Image-Net). Consequently, these datasets(WikiArt and Food101) differ
substantially from Image-Net, and the binary mask alone is insufficient for
effective transfer. However, on the other datasets, the performance is
comparable to masking. Overall, the modulation approach achieves a performance
improvement of 2.6% over masking. Additionally, we provide the average
performance across all datasets.

Method/ Performance | Cars | Flowers | CUBS | Sketches | WikiArt | Food | Avg
---|---|---|---|---|---|---|---
Transfer learning ([30]) | 52.2 | 88.42 | 60.7 | 64.13 | 55.43 | 63.67 | 66.11
Piggyback ([12]) | 84.85 | 91.94 | 71.0 | 78.4 | 55.98 | 73.1 | 76.05
ZFCL (ours) | 84.0 | 90.35 | 72.9 | 77.93 | 69 | 78.5 | 78.66
Full-model training | 90.57 | 92.42 | 79.8 | 79.35 | 74.44 | 83.4 | 82.74
Table 4: We investigate several methods for learning multiple datasets, which
include weight masking, transfer learning, fine-tuning, and weight modulation.
The results of our experiments are reported in percentages.

###  4.4 Comparison to regularization

In order to ensure a fair comparison, we conducted training on MobileNet V3
[6], which had previously been pre-trained on Image-Net with a learning
accuracy of 75.9% and consisted of $5.5$ million parameters. It is important
to note that the parameter count of this model exceeded that of our modified
MobileNet V2 [5], which included an additional task modulation and had $4.8$
million parameters. To prevent any distribution shift in the batch
normalization layers, we trained the network with these layers in evaluation
mode. This approach ensured that the running statistics remained unchanged and
were not influenced by the specific batch being processed. The regularization
network was trained sequentially on the Stanford Cars, Sketches, Wiki-Art, and
Food101 datasets. For each dataset, we performed a hyper-parameter search to
determine the appropriate regularization factor that would match the accuracy
achieved by our model. For instance, on the Stanford Cars dataset, we used a
factor that yielded an accuracy of 78.5%. We assessed the performance of the
network on all the tasks that were previously learned. At each step, we
measured the accuracy achieved on the newly learned dataset, as well as the
residual learning accuracy on all the tasks learned earlier. This methodology
enabled us to evaluate the impact of the regularization process on the overall
performance. The findings (see Figure 2) unequivocally indicate that the
Learning without Forgetting (LwF) method experienced a notable decrease in
accuracy across various datasets, namely Image-Net, Stanford Cars, Sketches,
and WikiArt. Specifically, there was a 40% drop in accuracy observed in Image-
Net, a 70% drop in Stanford Cars, a 40% drop in Sketches, and a 27% drop in
WikiArt. This highlights the importance of our zero-forgetting method, which
effectively prevents any potential sequential forgetting of previously learned
tasks. In Table 5, we show the learning accuracy of each dataset, at each
phase step.

Phase | Image-Net | Stanford Cars | Sketches | Wiki-Art | Food
---|---|---|---|---|---
Phase 1 | 74.78 |  |  |  |
Phase 2 | 71.21 | 78.5 |  |  |
Phase 3 | 53.98 | 44.24 | 75.32 |  |
Phase 4 | 47.67 | 19.69 | 66.025 | 67.8 |
Phase5 | 31.17 | 7.7 | 34.47 | 41.02 | 78.51
ZFCL(Ours) | 71.88 | 78.5 | 77.925 | 68.3 | 78.5
Table 5: LwF learning, we employ the Learning without Forgetting (LwF) method
[42] to learn multiple datasets. The results, reported in percentages,
demonstrate the learning accuracy achieved using the LwF approach for each
dataset. Fig. 2: The performance of LwF and ours in sequential task addition.
We start(for both ours and LwF) with a pre-trained network, and at each time
point, we train for additional datasets. upon sequential adding of tasks, LwF
performance drops significantly on the older tasks. Ours however remains high
without change. Upon observation, it becomes evident that although LwF is
trained to align with our learning, the decline in performance is significant,
marked by a drastic and dramatic drop.

###  4.5 Adaptive modulation

Our approach introduces a significant innovation by incorporating modulation
with varying resolution sizes. This is achieved through an exhaustive search
process, where we explore a range of resolutions, specifically focusing on
sizes $(i,i)$ where $2\leq i\leq 8$. Through this systematic investigation, we
are able to determine the optimal configuration for our modulation method. The
search for an optimal resolution gap revealed an optimization problem at the
highest resolution( shown in star symbols in Figure 3). Using a resolution of
$(1,1)$ should be equivalent to training the full model without using any
resolution parameters. However, the results show a consistent optimization gap
between training all the model weights and training modulation of the shape
$(1,1)$. This discrepancy indicates that training a modulation of shape
$(1,1)$ leads to different optimal weights with lower test accuracy. A
potential reason behind these results is overfitting which is supported by the
nearly perfect accuracy achieved on the training dataset. Results for each
dataset and modulation resolution can be found in Table 6.

Data-set name | (1,1) | (2,2) | (3,3) | (4,4) | (5,5) | (6,6) | (7,7) | (8,8)
---|---|---|---|---|---|---|---|---
Stanford-Cars | 87.4% | 85.5% | 84.7% | 84.0 % | 81.4 % | 81.4% | 75.1 % | 77.9%
Flowers | 90.89% | 89.88% | 88.56% | 86.25% | 87.67% | 82.35% | 84.69% |
CUBS200 | 77.967% | 75.38% | 74.37% | 70.25% | 69.76% | 61% | 71.2% |
Sketches | 77.9% | 77.6% | 76.7% | 76.1% | 75.6% | 75.0% | 74.4% |
Wiki-art | 70.93% | 69.73% | 69% | 67.83% | 66.53% | 65.79% | 64.74% |
Food101 | 79.73% | 78.7% | 78.5% | 75.98% | 70.03% | 74.67% | 73.77% |
Table 6: Adaptive modulation, learning accuracy of several modulation
resolutions. Fig. 3: Modulation size and its corresponding accuracy. We
present the relationship between modulation size and its corresponding
learning accuracy. Additionally, we include the results of full model
training, denoted by the * symbol. Upon analyzing multiple datasets, we have
discovered that reducing the modulation size in our adaptive modulation
approach has minimal effect on the learning process. Initially, the full model
achieves successful learning, highlighting the presence of an optimization gap
between training all model weights and training with a resolution modulation
of $(1,1)$.

##  5 Discussion

In our research, we have introduced a new approach called ZFCL that
effectively tackles the difficulties of continual learning and catastrophic
forgetting. Unlike most existing models, our approach successfully overcomes
the usual trade-off between accuracy and forgetting, and it exhibits
outstanding performance when faced with unfamiliar tasks. Our model stands out
due to its unique features, which are not commonly found in other continual
learning models. Firstly, we utilize task modulation, a mechanism where
synapses are specifically learned and utilized for each task. This
characteristic bears resemblance to the brain’s cortical circuitry observed in
previous studies ([23], [43], [44]). As a result, our model has a maximum
modulation size, yet it can also adapt to learning new tasks with partial
modulation. This indicates the potential to optimize the model’s ability to
learn new tasks without excessively increasing the number of additional
weights needed.

## References

  * [1] Robert M French,  “Catastrophic forgetting in connectionist networks,”  Trends in cognitive sciences 3,(4):128–135, 1999.
  * [2] Michael McCloskey and Neal J Cohen,  “Catastrophic interference in connectionist networks: The sequential learning problem.,”  The psychology of learning and motivation, 24(109-165):92, 1989\.
  * [3] Ronald Kemker, Angelina Abitino, Marc McClure, and Christopher Kanan,  “Measuring catastrophic forgetting in neural networks,”  CoRR, vol. abs/1708.02072, 2017.
  * [4] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun,  “Deep residual learning for image recognition,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778.
  * [5] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen,  “Mobilenetv2: Inverted residuals and linear bottlenecks,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 4510–4520.
  * [6] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al.,  “Searching for mobilenetv3,”  in Proceedings of the IEEE/CVF international conference on computer vision, 2019, pp. 1314–1324.
  * [7] Arthur Douillard, Yifu Chen, Arnaud Dapogny, and Matthieu Cord,  “Plop: Learning without forgetting for continual semantic segmentation,”  in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 4040–4050.
  * [8] Chang-Bin Zhang, Jia-Wen Xiao, Xialei Liu, Ying-Cong Chen, and Ming-Ming Cheng,  “Representation compensation networks for continual semantic segmentation,”  in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022, pp. 7053–7064.
  * [9] Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha, Andrei A Rusu, Alexander Pritzel, and Daan Wierstra,  “Pathnet: Evolution channels gradient descent in super neural networks,”  arXiv preprint arXiv:1701.08734, 2017.
  * [10] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell,  “Progressive neural networks,”  arXiv preprint arXiv:1606.04671, 2016.
  * [11] Cheng-Hao Tu, Cheng-En Wu, and Chu-Song Chen,  “Extending conditional convolution structures for enhancing multitasking continual learning,”  in 2020 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC). IEEE, 2020, pp. 1605–1610.
  * [12] Arun Mallya, Dillon Davis, and Svetlana Lazebnik,  “Piggyback: Adapting a single network to multiple tasks by learning to mask weights,”  in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 67–82.
  * [13] Jonathan Frankle, Gintare Karolina Dziugaite, Daniel Roy, and Michael Carbin,  “Linear mode connectivity and the lottery ticket hypothesis,”  in International Conference on Machine Learning. PMLR, 2020, pp. 3259–3269.
  * [14] Hattie Zhou, Janice Lan, Rosanne Liu, and Jason Yosinski,  “Deconstructing lottery tickets: Zeros, signs, and the supermask,”  Advances in neural information processing systems, vol. 32, 2019\.
  * [15] Mitchell Wortsman, Vivek Ramanujan, Rosanne Liu, Aniruddha Kembhavi, Mohammad Rastegari, Jason Yosinski, and Ali Farhadi,  “Supermasks in superposition,”  Advances in Neural Information Processing Systems, vol. 33, pp. 15173–15184, 2020.
  * [16] Adam Gaier and David Ha,  “Weight agnostic neural networks,”  Advances in neural information processing systems, vol. 32, 2019\.
  * [17] Michael Crawshaw,  “Multi-task learning with deep neural networks: A survey,”  arXiv preprint arXiv:2009.09796, 2020.
  * [18] Xiaojuan Qi, Renjie Liao, Zhengzhe Liu, Raquel Urtasun, and Jiaya Jia,  “Geonet: Geometric neural network for joint depth and surface normal estimation,”  in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 283–291.
  * [19] Vladimir Nekrasov, Thanuja Dharmasiri, Andrew Spek, Tom Drummond, Chunhua Shen, and Ian Reid,  “Real-time joint semantic segmentation and depth estimation using asymmetric annotations,”  in 2019 International Conference on Robotics and Automation (ICRA), 2019, pp. 7101–7107.
  * [20] David Lopez-Paz and Marc’Aurelio Ranzato,  “Gradient episodic memory for continual learning,”  Advances in neural information processing systems, vol. 30, 2017\.
  * [21] Arslan Chaudhry, Puneet K Dokania, Thalaiyasingam Ajanthan, and Philip HS Torr,  “Riemannian walk for incremental learning: Understanding forgetting and intransigence,”  in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 532–547.
  * [22] Bruce L McNaughton James L McClelland and Randall C O’Reilly,  “Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory.,”  1995\.
  * [23] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al.,  “Overcoming catastrophic forgetting in neural networks,”  Proceedings of the national academy of sciences, vol. 114, no. 13, pp. 3521–3526, 2017.
  * [24] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie,  “Caltech-ucsd birds 200,”  Tech. Rep., 2011.
  * [25] Mita T. Wah C. Schroff F. Belongie S. Perona P. Welinder P., Branson S.,  ““caltech-ucsd birds 200”,”  Tech. Rep., 2010.
  * [26] Maria-Elena Nilsback and Andrew Zisserman,  “Automated flower classification over a large number of classes,”  in 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing. IEEE, 2008, pp. 722–729.
  * [27] Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly,  “Parameter-efficient transfer learning for nlp,”  in International Conference on Machine Learning. PMLR, 2019, pp. 2790–2799.
  * [28] Chi Sun, Xipeng Qiu, Yige Xu, and Xuanjing Huang,  “How to fine-tune bert for text classification?,”  in China national conference on Chinese computational linguistics. Springer, 2019, pp. 194–206.
  * [29] Feilong Chen, Duzhen Zhang, Minglun Han, Xiuyi Chen, Jing Shi, Shuang Xu, and Bo Xu,  “Vlp: A survey on vision-language pre-training,”  arXiv preprint arXiv:2202.09061, 2022.
  * [30] Dongmei Han, Qigang Liu, and Weiguo Fan,  “A new image classification method using cnn transfer learning and web data augmentation,”  Expert Systems with Applications, vol. 95, pp. 43–56, 2018.
  * [31] Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, and Weizhu Chen,  “Lora: Low-rank adaptation of large language models,”  CoRR, vol. abs/2106.09685, 2021.
  * [32] Arun Mallya and Svetlana Lazebnik,  “Packnet: Adding multiple tasks to a single network by iterative pruning,”  in Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, 2018, pp. 7765–7773.
  * [33] Marc Masana, Tinne Tuytelaars, and Joost Van de Weijer,  “Ternary feature masks: zero-forgetting for task-incremental learning,”  in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 3570–3579.
  * [34] Ameya Prabhu, Philip HS Torr, and Puneet K Dokania,  “Gdumb: A simple approach that questions our progress in continual learning,”  in European conference on computer vision. Springer, 2020, pp. 524–540.
  * [35] Friedemann Zenke, Ben Poole, and Surya Ganguli,  “Continual learning through synaptic intelligence,”  in Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, Doina Precup and Yee Whye Teh, Eds. 2017, vol. 70 of Proceedings of Machine Learning Research, pp. 3987–3995, PMLR.
  * [36] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars,  “Memory aware synapses: Learning what (not) to forget,”  in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 139–154.
  * [37] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei,  “Imagenet: A large-scale hierarchical image database,”  in 2009 IEEE conference on computer vision and pattern recognition. Ieee, 2009, pp. 248–255.
  * [38] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei,  “3d object representations for fine-grained categorization,”  in Proceedings of the IEEE international conference on computer vision workshops, 2013, pp. 554–561.
  * [39] Mathias Eitz, James Hays, and Marc Alexa,  “How do humans sketch objects?,”  ACM Trans. Graph. (Proc. SIGGRAPH), vol. 31, no. 4, pp. 44:1–44:10, 2012.
  * [40] Wei Ren Tan, Chee Seng Chan, Hernan Aguirre, and Kiyoshi Tanaka,  “Improved artgan for conditional synthesis of natural image and artwork,”  IEEE Transactions on Image Processing, vol. 28, no. 1, pp. 394–409, 2019.
  * [41] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool,  “Food-101 – mining discriminative components with random forests,”  in European Conference on Computer Vision, 2014.
  * [42] Zhizhong Li and Derek Hoiem,  “Learning without forgetting,”  IEEE transactions on pattern analysis and machine intelligence, vol. 40, no. 12, pp. 2935–2947, 2017.
  * [43] Nikola T Markov, Julien Vezoli, Pascal Chameau, Arnaud Falchier, René Quilodran, Cyril Huissoud, Camille Lamy, Pierre Misery, Pascale Giroud, Shimon Ullman, et al.,  “Anatomy of hierarchy: feedforward and feedback pathways in macaque visual cortex,”  Journal of Comparative Neurology, vol. 522, no. 1, pp. 225–259, 2014.
  * [44] David C Van Essen and John HR Maunsell,  “Hierarchical organization and functional streams in the visual cortex,”  Trends in neurosciences, vol. 6, pp. 370–375, 1983.


#  Gate-defined superconducting channel in magic-angle twisted bilayer
graphene

Giulia Zheng  Elías Portolés  Alexandra Mestre-Torà  Marta Perego  Laboratory
for Solid State Physics, ETH Zurich, CH-8093 Zurich, Switzerland  Takashi
Taniguchi  Kenji Watanabe  Research Center for Materials Nanoarchitectonics,
National Institute for Materials Science, 1-1 Namiki, Tsukuba 305-0044, Japan
Peter Rickhaus  Folkert K. de Vries  Laboratory for Solid State Physics, ETH
Zurich, CH-8093 Zurich, Switzerland  Thomas Ihn  Klaus Ensslin  Laboratory for
Solid State Physics, ETH Zurich, CH-8093 Zurich, Switzerland  Quantum Center,
ETH Zurich, CH-8093 Zurich, Switzerland  Shuichi Iwakiri
<EMAIL_ADDRESS>Laboratory for Solid State Physics, ETH Zurich, CH-8093
Zurich, Switzerland

###### Abstract

Magic-angle twisted bilayer graphene (MATBG) combines in one single material
different phases like insulating, metallic and superconducting. These phases
and their in-situ tunability make MATBG an important platform for the
fabrication of superconducting devices. We realize a split gate-defined
geometry which enables us to tune the width of a superconducting channel
formed in MATBG. We observe a smooth transition from superconductivity to
highly resistive transport by progressively reducing the channel width using
the split gates or by reducing the density in the channel. Using the gate-
defined constriction, we control the flow of the supercurrent, either guiding
it through the constriction or throughout the whole device or even blocking
its passage completely. This serves as a foundation for developing quantum
constriction devices like superconducting quantum point contacts, quantum
dots, and Cooper-pair boxes in MATBG.

††preprint: APS/123-QED

##  I Introduction

Magic-angle twisted bilayer graphene (MATBG) offers highly-tunable quantum
states Cao  _et al._ (2018); Yankowitz  _et al._ (2019), which have enabled a
novel class of gate-defined superconducting nanodevices such as Josephson
junctions de Vries  _et al._ (2021); Rodan-Legrain  _et al._ (2021); Díez-
Mérida  _et al._ (2023), SQUIDs Portolés  _et al._ (2022), and ring geometries
showing Little–Parks oscillations Iwakiri  _et al._ (2023). All these devices
rely on defining interfaces between resistive and superconducting phases. In a
gate-defined narrow MATBG constriction, the interface between the
superconducting and resistive phases can be continuously controlled and
studied. In Bernal bilayer graphene, a constriction (e.g. a quantum point
contact Overweg  _et al._ (2018); Nakaharai  _et al._ (2011)) can be formed
due to its gate-tunable band gap of a few 100 meV Ohta  _et al._ (2006);
Oostinga  _et al._ (2008). However, in the case of MATBG, the size of the band
gap between the flat band and the dispersive band is one order of magnitude
smaller Rodan-Legrain  _et al._ (2021). Therefore it is challenging to form a
similar constriction and the question arises, whether it is possible at all to
realize a narrow superconducting channel by tuning the width of confining
resistive states.

In this work, we demonstrate a gate-defined superconducting channel in MATBG.
We observe a smooth transition from supercurrent to highly resistive transport
(pinch-off) by progressively reducing the channel width using split gates or
by reducing the density in the channel using the channel gate. We find that
the supercurrent in the constriction can be turned on and off. These results
will serve as the foundation for developing constriction-based devices like
superconducting quantum point contacts, quantum dots, or Cooper-pair boxes in
MATBG.

##  II Device and bulk characterization

Figure 1: (a) False colored SEM picture of the sample. The white scale bar at
the bottom left indicates $1\text{\,}\mathrm{\SIUnitSymbolMicro}\mathrm{m}$.
MATBG (light green), contacts (orange), split gates (blue), and channel gate
(yellow) are shown. Inset: Schematic of the stack (thickness do not scale).
(b) Characterization of the device with $V_{\textrm{cg}}=0$. Line-cut at
$V_{\textrm{sg}}=0$ with annotations of filling factor $\nu=-1,-1/2,0,1/2,$
and $1$ states. (c) Mapping of the resistance as a function of
$V_{\textrm{sg}}$ and $V_{\textrm{bg}}$. Black dashed lines labeled
$\nu^{\prime}=-1,-1/2,0,1/2,$ indicate filling factors in the split-gated
area. The pink dashed line highlights the transition from low to high
resistance in the hole side. The inset shows the superconducting
current–voltage characteristic taken at $V_{\textrm{sg}}=0$ and
$V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ (indicated by a black star). The
red double-sided arrow is the gate voltage range in which Fig. 2(a) is taken.

The fabrication starts by encapsulating MATBG (light green) between two hBN
layers of thickness $59\text{\,}\mathrm{n}\mathrm{m}$ and
$61\text{\,}\mathrm{n}\mathrm{m}$(dark green). Additionally a graphite layer
(dark gray) is picked up, serving as the back gate. The lateral device layout
is shown in Fig. 1(a). To form electric contacts (orange in the figure), we
etch the top hBN using reactive ion etching (RIE) and evaporate
Cr($5\text{\,}\mathrm{n}\mathrm{m}$)/Au($65\text{\,}\mathrm{n}\mathrm{m}$). On
top of the top hBN, we evaporate
Cr($5\text{\,}\mathrm{n}\mathrm{m}$)/Au($15\text{\,}\mathrm{n}\mathrm{m}$)
split gates (blue) with a gap of $150\text{\,}\mathrm{n}\mathrm{m}$. After
depositing a $40\text{\,}\mathrm{n}\mathrm{m}$ layer of aluminum oxide, an
additional channel gate (yellow) with a width of
$400\text{\,}\mathrm{n}\mathrm{m}$ (in the direction of current flow) is
deposited, covering the region in-between the split gates. Our gate
configuration defines three different areas in the MATBG mesa: the leads shown
in light green and tuned only by the back gate, the split gated region in
blue, tuned by split gates and back gate together, and the channel in between
the split gates and below the channel gate. Since the thickness of the top hBN
($59\text{\,}\mathrm{n}\mathrm{m}$) is comparable to the lateral dimension of
the split gate (150 nm), the channel region is tuned not only by the channel
gate and the back gate, but also by the split gates due to fringe fields. We
perform two-terminal transport measurements at a temperature of
$24\text{\,}\mathrm{m}\mathrm{K}$.

To characterize the twist angle between the graphene layers of the sample, we
apply a DC current ($I=$10\text{\,}\mathrm{n}\mathrm{A}$$) and measure the
resulting voltage drop $V$. We sweep the back gate voltage $V_{\textrm{bg}}$
while keeping the split gate voltage $V_{\textrm{sg}}$ and the channel gate
voltage $V_{\textrm{cg}}$ at zero, thus probing the bulk (leads, split-gated
region, and channel together). The resulting resistance $R=V/I$ is shown in
Fig. 1(b), exhibiting several peaks originating from different filling factors
$\nu$ of the moiré unit cell . The peak at around $V_{\textrm{bg}}=0$
indicates charge neutrality ($\nu=0$). At negative $V_{\textrm{bg}}$, we
observe full filling ($\nu=-1$, where the Fermi level moves into the
dispersive band overcoming a small band gap) and half filling ($\nu=-1/2$)
peaks for holes. At positive voltages we observe half filling ($\nu=1/2$) for
electrons, where the Fermi level resides within the flat bands.
Superconductivity appears at filling factors slightly larger than $1/2$.
Filling $\nu=1$ for electrons cannot be reached due to the voltage range of
the back gate being limited by leakage currents. We extract the twist angle
between the graphene layers of the device from the density of the $\nu=-1$
peak, which leads to $1.1\text{\,}\mathrm{\SIUnitSymbolDegree}$ (see Appendix
A).

To demonstrate the area-selective tunability of moiré filling factors, Fig.
1(c) shows $R$ as a function of $V_{\textrm{sg}}$ and $V_{\textrm{bg}}$.
Filling factors $\nu^{\prime}=-1,-1/2,0,1/2$ and 1 below the split-gates are
indicated with black dashed lines. The inset in Fig. 1(c) shows a typical
current-voltage ($I$–$V$) characteristic in the superconducting regime at
$V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$, $V_{\textrm{sg}}=0$, and
$V_{\textrm{cg}}=0$. Here, a constant contact resistance of
$10\text{\,}\mathrm{k}\mathrm{\SIUnitSymbolOhm}$, observed as the offset
resistance at zero-bias current in the superconducting regime, is subtracted
from the raw data. In the remainder of this manuscript, we consider transport
to be superconducting when such an $I$–$V$ characteristic is observed.

A question arising from the map shown in Fig. 1(c) is the origin of the highly
resistive area that spans out in the $\nu^{\prime}<-1$ region (see the blue
region delimited by the dashed pink line). In a standard back-gated MATBG
without any top-gates Cao  _et al._ (2018); Yankowitz  _et al._ (2019), only a
resistance peak can be observed as a function of $V_{\textrm{bg}}$ and not a
resistive area as a function of $V_{\textrm{bg}}$ and $V_{\textrm{sg}}$. In
addition, at first glance, one would expect the edge of this high resistive
area (dashed pink line) to coincide with the predicted $\nu^{\prime}=-1$
(labelled dashed black line). The explanation for why this is not the case
lies in the next sections.

Figure 2: Differential resistance (d$V$/d$I$) as a function of current $I$ and
gate voltages. (a) Split gate $V_{\textrm{sg}}$ is swept while keeping
$V_{\textrm{cg}}=$0\text{\,}\mathrm{V}$$. (b) $IV$ trace and zoom-in picture
of d$V$/d$I$ at $V_{\textrm{sg}}=$-5.8 (black), -4 (yellow), -1 (green) V.(c)
Channel gate $V_{\textrm{cg}}$ is swept while keeping
$V_{\textrm{sg}}=$-4.5\text{\,}\mathrm{V}$$. (d) $IV$ trace and zoom-in
picture of d$V$/d$I$ at $V_{\textrm{cg}}=$-2.8, -1, and 2 V. The states under
the split gate (dispersive band/BI or flat band/SC) are indicated by the bars
above the top axes. In all cases, $V_{\textrm{bg}}$ is kept at zero. Pink,
yellow, and green dashed vertical lines show the gate voltage at which the
line cuts are taken. Illustrations of the device’s state (pinch off, SC
channel, or SC bulk) are also shown. Red circle and star symbols show the
onset of pinch-off.

##  III Tunable superconducting channel

###  III.1 Control via split gates

We now study the effect of the split gates on the supercurrent. We tune the
leads to the superconducting regime by setting
$V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ [c.f. red arrow in Fig. 1(c)] and
keep $V_{\textrm{cg}}=0$. Figure 2(a) shows the d$V$/d$I$ characteristics
numerically calculated from the measured dc $V$–$I$ data as a function of the
current $I$ and the split-gate voltage $V_{\textrm{sg}}$. We assign the state
of the carrier gas below the split gates as a function of $V_{\textrm{sg}}$
according to Fig. 1(c) and a capacitance model (see Appendix B) as indicated
in Fig. 2(a) by the colored bar above the color plot. When
$$-6\text{\,}\mathrm{V}$<V_{\textrm{sg}}<$-2.8\text{\,}\mathrm{V}$$, the
filling factor under the split gate is smaller than $-1$, and thus the carrier
gas in the region below the split gates is either a band insulator (BI) or the
Fermi energy is in the dispersive band. When the voltage is increased to
$V_{\textrm{sg}}>$-2.8\text{\,}\mathrm{V}$$, the Fermi energy in the region
below the split gates is in the flat bands.

In the range
$$-6\text{\,}\mathrm{V}$<V_{\textrm{sg}}<$-5.5\text{\,}\mathrm{V}$$ [before
the pink dot in Fig. 2(a)] , the device shows a large zero-bias resistance of
$0.48\text{\,}\mathrm{M}\Omega$. This can also be seen in the large slope of
the $I$–$V$ characteristic in Fig. 2(b) (black curve). Such a high resistance
despite superconducting leads means, that not only the region below the split
gates is resistive, but the resistive region extends into the channel region
between them due to fringe fields.

When the split gate voltage is increased to
$$-5.5\text{\,}\mathrm{V}$<V_{\textrm{sg}}<$-2.8\text{\,}\mathrm{V}$$ [beyond
pink dot in Fig. 2(a)], the device shows low resistance at low bias and a
nonlinear $I$–$V$ characteristic reminiscent of a superconductor as shown by
the yellow curve in Fig. 2(b). In this regime, the transport characteristic
across the sample remains superconducting even though the area below the split
gates is resistive. This indicates that a supercurrent flows through the
channel while the split-gated region confines the flow. When $V_{\textrm{sg}}$
is increased beyond $-2.8\text{\,}\mathrm{V}$, the nonlinear transport and the
critical currents become more prominent [see green curve in Fig. 2(b)]. In
this regime, the supercurrent extends from the channel into the split-gated
regions, eventually rendering the entire device superconducting.

###  III.2 Control via channel gate

In Figs. 2(c) and (d) we show that the conductance of the superconducting
channel can also be tuned with the channel gate voltage. It is only the
channel that is tuned by $V_{\textrm{cg}}$ because the metallic split-gate
screens the electric field of the channel gate. We keep the leads
superconducting ($V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$) and tune the
Fermi energy in the split-gated regions into the dispersive bands
($V_{\textrm{sg}}=$-4.5\text{\,}\mathrm{V}$$). This corresponds to the
condition in Fig. 2(a) indicated by the black triangle on the upper axis.

Under these conditions, we see in Fig. 2(c) at $V_{\textrm{cg}}=0$ nonlinear
transport indicating superconducting behavior consistent with Fig. 2(a). By
reducing $V_{\textrm{cg}}$ below $-1.5\text{\,}\mathrm{V}$, thereby tuning the
Fermi energy in the channel towards the BI or the dispersive band, the device
exhibits a high resistance of $1.1\text{\,}\mathrm{M}\Omega$ and a nonlinear
$I$–$V$ characteristic with a large slope around zero bias as shown in Fig.
2(d) (black curve). This means that the superconducting channel is pinched
off. Note that the light green line in this area is an artifact. When
$V_{\textrm{cg}}$ is increased above $0\text{\,}\mathrm{V}$, the
superconductivity in the channel is enhanced as illustrated by the green curve
in Fig. 2(d). The confinement of the superconducting current to the channel
and the local gate-tunability of the channel from the superconducting to the
highly resistive (pinch-off) state of the constriction are the central
experimental findings of this paper.

###  III.3 $V_{\textrm{cg}}$ vs. $V_{\textrm{sg}}$ mapping of resistance

To further highlight that the pinch-off in Fig. 2(c) originates from the
channel, we show the resistance of the device as a function of
$V_{\textrm{sg}}$ and $V_{\textrm{cg}}$ in Fig. 3. Pink symbols indicate the
gate voltages at which the channel is pinched off as observed in the data of
Figs. 2 and A.2 (see Appendix C). These values lie on a line with a negative
slope (see the black line in the Figure). This means that there exists a
regime in which the channel conductance is controlled by both
$V_{\textrm{sg}}$ and $V_{\textrm{cg}}$. This is due to the fringe fields of
the split-gates, such that the channel conductance is controlled by all three
gates. This additionally explains the origin of the discrepancy between the
expected $\nu^{\prime}=1$ (labelled dashed black line) and the high resistance
edge (dashed pink line) in Fig. 1(c). In between the two dashed lines, the
resistance is low because even if the split-gated region is resistive, a
supercurrent can still flow through the channel. Only when the channel is
pinched off due to the effect of the fringing fields we measure a high
resistance.

Figure 3: Mapping of resistance as a function of $V_{\textrm{sg}}$ and
$V_{\textrm{cg}}$ at a constant back gate voltage of $V_{\textrm{bg}}$=-7.44
V. Colored symbols and black line interpolating between them indicate the
threshold gate voltages of the pinch off. The gate-voltage regime where high
resistances ($R>20k\Omega$) are observed is annotated as ”Pinch off”.

###  III.4 Discussion

In narrow superconducting channels, it has been predicted that the critical
current becomes quantized as the channel size is reduced when the BCS
coherence length of the superconductor is longer than the channel length
Beenakker and van Houten H (1991). A step-wise change of supercurrent, if not
the predicted exact quantization, has been observed in various materials such
as InAs Bauch  _et al._ (2005); Abay  _et al._ (2013); Irie  _et al._ (2014);
Takayanagi  _et al._ (1995), Ge/Si Xiang  _et al._ (2006); Hendrickx  _et al._
(2019), and SrTiO3Mikheev  _et al._ (2021). In our device, we did not observe
such quantization of the critical current. In MATBG, the BCS coherence length
is estimated to be from a few tens of nm up to 100 nm de Vries  _et al._
(2021); Iwakiri  _et al._ (2023). The length of our channel is
$400\text{\,}\mathrm{n}\mathrm{m}$, which is much longer than the estimated
coherence length. In order to observe the quantization of the critical
current, it is necessary to reduce the channel length down to less than
$100\text{\,}\mathrm{n}\mathrm{m}$, which is possible by advanced electron
beam lithography.

Furthermore, we discuss the conditions at which the pinch-off occurs. In Figs.
2(a) and (c), the points at which the channel is pinched-off are
($V_{\textrm{bg}}$, $V_{\textrm{sg}}$, $V_{\textrm{cg}}$) = (-7.44, -5.3, 0)
and (-7.44, -4.5, -1.5) V, respectively. Using the capacitance model (see
Appendix B), we estimate the corresponding carrier densities $n_{\textrm{ch}}$
in the channel to be
$-2.23\text{\times}{10}^{12}\text{\,}\mathrm{c}\mathrm{m}^{-2}$ and
$-2.56\text{\times}{10}^{12}\text{\,}\mathrm{c}\mathrm{m}^{-2}$. For
simplicity, we do not take fringe field effects into account in the model. By
assuming an isotropic Fermi surface and four-fold degeneracy, the
corresponding Fermi wavelengths
$\lambda_{\textrm{F}}=2\sqrt{\pi/|n_{\textrm{ch}}|}$ are
$23.7\text{\,}\mathrm{n}\mathrm{m}$ and $22.1\text{\,}\mathrm{n}\mathrm{m}$,
respectively. Therefore, one can estimate the minimal width of the channel
that supports normal conducting transport to be around this value
($\sim$20\text{\,}\mathrm{n}\mathrm{m}$$), which is significantly smaller than
its lithographic value (150 nm). Moreover, in this narrow-channel limit, one
can expect conductance quantization in the normal conducting regime. However,
we did not observe any signature of normal conductance quantization,
presumably due to disorder and the relatively low resistance of the insulating
state in MATBG ($\sim$1\text{\,}\mathrm{M\SIUnitSymbolOhm}$$ in this device)
compared to gapped Bernal bilayer graphene
($\sim$100\text{\,}\mathrm{M\SIUnitSymbolOhm}$$ Overweg (2018)). Nevertheless,
the superconducting channel can be formed as long as its resistance, which is
ideally zero, is low enough compared to the resistance of the split-gated
area.

##  IV Conclusion

We have realized a gate-defined superconducting channel in MATBG by
implementing a device with a back gate and two layers of top gates (split
gates and channel gate). We observe a transition from superconducting to
highly resistive (up to $\sim$1\text{\,}\mathrm{M\SIUnitSymbolOhm}$$)
transport through the channel by tuning the split-gate and channel gate
voltages. This shows that it is possible to define a narrow superconducting
channel by tuning the width of the confining resistive areas. The threshold at
which the pinch-off occurs depends not only on the channel gate but also on
the split gate voltage, indicating the essential role of the fringe field
effects. Our findings serve as a foundation for developing quantum
constriction devices like superconducting quantum point contacts, quantum dots
and Cooper-pair boxes in MATBG.

###### Acknowledgements.

We are grateful for fruitful discussions and technical support from Peter
Maerki, Thomas Baehler, Rebekka Garreis, Chuyao Tong, Benedikt Kratochwil,
Wister Huang, and the ETH FIRST cleanroom facility staff. We acknowledge
financial support by the European Graphene Flagship Core3 Project, H2020
European Research Council (ERC) Synergy Grant under Grant Agreement 951541,
the European Union’s Horizon 2020 research and innovation program under grant
agreement number 862660/QUANTUM E LEAPS, the European Innovation Council under
grant agreement number 101046231/FantastiCOF, NCCR QSIT (Swiss National
Science Foundation, grant number 51NF40-185902). K.W. and T.T. acknowledge
support from the JSPS KAKENHI (Grant Numbers 21H05233 and 23H02052) and World
Premier International Research Center Initiative (WPI), MEXT, Japan.

##  Appendix A Extraction of twist angle

We extract the twist angle of the sample using the relation
$\theta=2\arcsin\left(\frac{a}{2L}\right)$. Here, $a$ is the lattice constant
of graphene, and $L$ is the moiré periodicity, representing the distance
between two AA-stacked regions. $L$ is related to the area $\mathcal{A}$ of
the moiré unit cell via $L=2\sqrt{2\mathcal{A}/\sqrt{3}}$. A moiré unit cell
can host four electrons due to spin and valley degeneracy. Using this, the
full filling resistance peak appears at the density that corresponds to the
occupation of 4 electrons per moiré unit cell
$\mathcal{A}=\frac{4}{n_{\nu=1}}$.

##  Appendix B Capacitance model

To estimate the carrier density in the device, we estimate the capacitance per
unit area of the back gate, split gate, and channel gate to be
$C_{\textrm{bg}}=\varepsilon_{0}\varepsilon_{\textrm{hBN}}/d_{\textrm{bot}}$,
$C_{\textrm{sg}}=\varepsilon_{0}\varepsilon_{\textrm{hBN}}/d_{\textrm{top}}$,
and
$C_{\textrm{cg}}=\varepsilon_{0}\varepsilon_{\textrm{hBN}}\varepsilon_{\textrm{AlOx}}/(\varepsilon_{\textrm{hBN}}d_{\textrm{top}}+\varepsilon_{\textrm{AlOx}}d_{\textrm{AlOx}})$.
Here, $\varepsilon_{0}=8.854\times 10^{-12}$ is the vacuum permittivity,
$\varepsilon_{\textrm{hBN}}=3.3$ and $\varepsilon_{\textrm{AlOx}}=9.5$ are the
relative permittivities of the hBN and the aluminium oxide, $d_{\textrm{top}}$
and $d_{\textrm{bot}}$ are the thicknesses of the top and bottom hBN and
$d_{\textrm{AlOx}}$ is the thickness of the aluminium oxide layer. We then
calculate the carrier density of the lead as
$n_{\textrm{bg}}=C_{\textrm{bg}}V_{\textrm{bg}}/e$, the region below the split
gate as
$n_{\textrm{sg}}=\left(C_{\textrm{bg}}V_{\textrm{bg}}+C_{\textrm{sg}}V_{\textrm{sg}}\right)/e$,
and the region below the channel gate as
$n_{\textrm{cg}}=\left(C_{\textrm{bg}}V_{\textrm{bg}}+C_{\textrm{cg}}V_{\textrm{cg}}\right)/e$,
where $e$ is the elementary charge.

##  Appendix C Extended map of $R(V_{\textrm{cg}}$, $V_{\textrm{sg}})$

The same map as Fig. 3 but with an extended range is shown in Fig. A.1. The
threshold for pinch-off extracted from the $I$–$V$ characteristic measurements
are plotted as symbols. Even though the data cannot be measured due to the
leakage of the gate that happened at the last stage of the entire experiment,
one can clearly see the linear relation between the threshold value of
$V_{\textrm{cg}}$ and $V_{\textrm{sg}}$.

Figure A.1: Resistance as a function of $V_{\textrm{sg}}$ and
$V_{\textrm{cg}}$. at a constant back gate voltage of
$V_{\textrm{bg}}$=$-7.44\text{\,}\mathrm{V}$ with an extended plot area.

##  Appendix D Extended map for $dV/dI(I,V_{\textrm{cg}}$) and
$dV/dI(I,V_{\textrm{sg}})$

We measure the behavior of the superconducting channel in the same manner as
in Fig. 2 but in two more configurations as shown in Figure A.2. In Fig.
A.2(a), $V_{\textrm{sg}}$ is swept with fixed
$V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ and
$V_{\textrm{cg}}=$-4\text{\,}\mathrm{V}$$. Here, the pinch-off of the channel
is observed at $V_{\textrm{sg}}=$-2.7\text{\,}\mathrm{V}$$ (see the pink
rotated triangular symbol). In Fig. A.2(b), $V_{\textrm{cg}}$ is swept with
fixed $V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ and
$V_{\textrm{sg}}=$-3.5\text{\,}\mathrm{V}$$. Here, the pinch-off of the
channel is observed at $V_{\textrm{cg}}=$-2.88\text{\,}\mathrm{V}$$ (see the
pink rotated triangular symbol). These points are plotted in Fig. 3 and Fig.
A.1.

Figure A.2: d$V$/d$I$ as a function of $V_{\textrm{sg}}$ with fixed
$V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ and
$V_{\textrm{cg}}=$-4\text{\,}\mathrm{V}$$. Here, the pinch-off of the channel
is observed at $V_{\textrm{sg}}=$-2.7\text{\,}\mathrm{V}$$ (see the pink
rotated triangular symbol). Figure A.2(b) shows d$V$/d$I$ as a function of
$V_{\textrm{cg}}$ with fixed $V_{\textrm{bg}}=$-7.44\text{\,}\mathrm{V}$$ and
$V_{\textrm{sg}}=$-3.5\text{\,}\mathrm{V}$$.

## References

  * Cao  _et al._ (2018) Y. Cao, V. Fatemi, S. Fang, K. Watanabe, T. Taniguchi, E. Kaxiras, and P. Jarillo-Herrero, “Unconventional superconductivity in magic-angle graphene superlattices,” Nature 556, 43–50 (2018).
  * Yankowitz  _et al._ (2019) M. Yankowitz, S. Chen, H. Polshyn, Y. Zhang, K. Watanabe, T. Taniguchi, D. Graf, A. F. Young, and C. R. Dean, “Tuning superconductivity in twisted bilayer graphene,” Science 363, 1059–1064 (2019).
  * de Vries  _et al._ (2021) F. K. de Vries, E. Portolés, G. Zheng, T. Taniguchi, K. Watanabe, T. Ihn, K. Ensslin, and P. Rickhaus, “Gate-defined josephson junctions in magic-angle twisted bilayer graphene,” Nat. Nanotechnol. 16, 760–763 (2021).
  * Rodan-Legrain  _et al._ (2021) Daniel Rodan-Legrain, Yuan Cao, Jeong Min Park, Sergio C. de la Barrera, Mallika T. Randeria, Kenji Watanabe, Takashi Taniguchi, and Pablo Jarillo-Herrero, “Highly tunable junctions and non-local josephson effect in magic-angle graphene tunneling devices,” Nat. Nanotechnol. 16, 769–775 (2021).
  * Díez-Mérida  _et al._ (2023) J. Díez-Mérida, A. Díez-Carlón, S. Y. Yang, Y.-M. Xie, X.-J. Gao, J. Senior, K. Watanabe, T. Taniguchi, X. Lu, A. P. Higginbotham, K. T. Law, and Dmitri K. Efetov, “Symmetry-broken Josephson junctions and superconducting diodes in magic-angle twisted bilayer graphene,” Nat Commun 14, 2396 (2023).
  * Portolés  _et al._ (2022) E. Portolés, S. Iwakiri, G. Zheng, P. Rickhaus, T. Taniguchi, K. Watanabe, T. Ihn, K. Ensslin, and F. K. de Vries, “A tunable monolithic squid in twisted bilayer graphene,” Nat. Nanotechnol. 17, 1159–1164 (2022).
  * Iwakiri  _et al._ (2023) S. Iwakiri, A. Mestre-Torà, E. Portolés, M. Visscher, M. Perego, G. Zheng, T. Taniguchi, K. Watanabe, M. Sigrist, T. Ihn, and K. Ensslin, “Tunable quantum interferometer for correlated moiré electrons,” (2023), arXiv:2308.07400 [cond-mat.mes-hall] .
  * Overweg  _et al._ (2018) H. Overweg, H. Eggimann, X. Chen, S. Slizovskiy, M. Eich, R. Pisoni, Y. Lee, P. Rickhaus, K. Watanabe, T. Taniguchi, V. Fal’ko, T. Ihn, and K. Ensslin, “Electrostatically induced quantum point contacts in bilayer graphene,” Nano Letters 18, 553–559 (2018), pMID: 29286668.
  * Nakaharai  _et al._ (2011) S. Nakaharai, J. R. Williams, and C. M. Marcus, “Gate-defined graphene quantum point contact in the quantum hall regime,” Phys. Rev. Lett. 107, 036602 (2011).
  * Ohta  _et al._ (2006) T. Ohta, A. Bostwick, T. Seyller, K. Horn, and E. Rotenberg, “Controlling the electronic structure of bilayer graphene,” Science 313, 951–954 (2006).
  * Oostinga  _et al._ (2008) J. B. Oostinga, H. B. Heersche, X. Liu, A. F. Morpurgo, and Lieven M.K. V., “Gate-induced insulating state in bilayer graphene devices,” Nature Materials 7, 151–157 (2008).
  * Beenakker and van Houten H (1991) C W Beenakker and van Houten H, “Josephson current through a superconducting quantum point contact shorter than the coherence length,” Phys. Rev. Lett. 66, 3056–3059 (1991).
  * Bauch  _et al._ (2005) T Bauch, E Hürfeld, V M Krasnov, P Delsing, H Takayanagi, and T Akazaki, “Correlated quantization of supercurrent and conductance in a superconducting quantum point contact,” Phys. Rev. B Condens. Matter 71, 174502 (2005).
  * Abay  _et al._ (2013) S. Abay, D. Persson, H. Nilsson, H Q Xu, M. Fogelström, V. Shumeiko, and P. Delsing, “Quantized conductance and its correlation to the supercurrent in a nanowire connected to superconductors,” Nano Lett. 13, 3614–3617 (2013).
  * Irie  _et al._ (2014) Hiroshi Irie, Yuichi Harada, Hiroki Sugiyama, and Tatsushi Akazaki, “Josephson coupling through one-dimensional ballistic channel in semiconductor-superconductor hybrid quantum point contacts,” Phys. Rev. B 89, 165415 (2014).
  * Takayanagi  _et al._ (1995) Hideaki Takayanagi, Tatsushi Akazaki, and Junsaku Nitta, “Observation of maximum supercurrent quantization in a superconducting quantum point contact,” Phys. Rev. Lett. 75, 3533–3536 (1995).
  * Xiang  _et al._ (2006) J. Xiang, A Vidan, M Tinkham, R M Westervelt, and C. M. Lieber, “Ge/Si nanowire mesoscopic josephson junctions,” Nat. Nanotechnol. 1, 208–213 (2006).
  * Hendrickx  _et al._ (2019) N W Hendrickx, M L V Tagliaferri, M Kouwenhoven, R Li, D P Franke, A Sammak, A Brinkman, G Scappucci, and M Veldhorst, “Ballistic supercurrent discretization and micrometer-long josephson coupling in germanium,” Phys. Rev. B Condens. Matter 99, 075435 (2019).
  * Mikheev  _et al._ (2021) E. Mikheev, I. T. Rosen, and D. Goldhaber-Gordon, “Quantized critical supercurrent in SrTiO3-based quantum point contacts,” Sci Adv 7, eabi6520 (2021).
  * Overweg (2018) Hiske Overweg,  _Electrostatically induced nanostructures in bilayer graphene_ , Ph.D. thesis, ETH Zurich, Switzerland (2018).