# Polyglot Semantic Parsing in APIs

Kyle Richardson†, Jonathan Berant‡, Jonas Kuhn†
†Institute for Natural Language Processing, University of Stuttgart, Germany
<EMAIL_ADDRESS>
‡Tel-Aviv University, Israel
<EMAIL_ADDRESS>

###### Abstract

Traditional approaches to semantic parsing (SP) work by training individual
models for each available parallel dataset of text-meaning pairs. In this
paper, we explore the idea of polyglot semantic translation, or learning
semantic parsing models that are trained on multiple datasets and natural
languages. In particular, we focus on translating text to code signature
representations using the software component datasets of Richardson and Kuhn
(2017a, b). The advantage of such models is that they can be used for parsing
a wide variety of input natural languages and output programming languages, or
mixed input languages, using a single unified model. To facilitate modeling of
this type, we develop a novel graph-based decoding framework that achieves
state-of-the-art performance on the above datasets, and apply this method to
two other benchmark SP tasks.

##  1 Introduction

Recent work by Richardson and Kuhn (2017a, b); Miceli Barone and Sennrich
(2017) considers the problem of translating source code documentation to
lower-level code template representations as part of an effort to model the
meaning of such documentation. Example documentation for a number of
programming languages is shown in Figure 1, where each _docstring_ description
in red describes a given function (blue) in the library. While capturing the
semantics of docstrings is in general a difficult task, learning the
translation from descriptions to formal code representations (e.g., formal
representations of functions) is proposed as a reasonable first step towards
learning more general natural language understanding models in the software
domain. Under this approach, one can view a software library, or API, as a
kind of parallel translation corpus for studying $\emph{text}\to\texttt{code}$
or $\texttt{code}\to\emph{text}$ translation.

1\. ($en$, Java) Documentation ` *Returns the greater of two long values
public static long max(long a, long b)
`
2\. ($en$, Python) Documentation

    max(self, a, b):

         ”””Compares two values numerically

         and returns the maximum”””

3\. ($en$, Haskell) Documentation

    --| ”The largest element of a non-empty structure”

    maximum :: forall z. Ord a a => t a -> a

4\. ($de$, PHP) Documentation` *gibt den größeren dieser Werte zurück.
max (mixed $value1, mixed $value2)
`

Figure 1: Example source code documentation.

Richardson and Kuhn (2017b) extracted the standard library documentation for
10 popular programming languages across a number of natural languages to study
the problem of text to function signature translation. Initially, these
datasets were proposed as a resource for studying semantic parser induction
Mooney (2007), or for building models that learn to translate text to formal
meaning representations from parallel data. In follow-up work Richardson and
Kuhn (2017a), they proposed using the resulting models to do automated
question-answering (QA) and code retrieval on target APIs, and experimented
with an additional set of software datasets built from 27 open-source Python
projects.

As traditionally done in SP Zettlemoyer and Collins (2012), their approach
involves learning individual models for each parallel dataset or language
pair, e.g., ($en$, Java), ($de$, PHP), and ($en$,  Haskell). Looking again at
Figure 1, we notice that while programming languages differ in terms of
representation conventions, there is often overlap between the functionality
implemented and naming in these different languages (e.g., the max function),
and redundancy in the associated linguistic descriptions. In addition, each
English description (Figure 1.1-1.3) describes max differently using the
synonyms _greater, maximum, largest_. In this case, it would seem that
training models on multiple datasets, as opposed to single language pairs,
might make learning more robust, and help to capture various linguistic
alternatives.

With the software QA application in mind, an additional limitation is that
their approach does not allow one to freely translate a given description to
multiple output languages, which would be useful for comparing how different
programming languages represent the same functionality. The model also cannot
translate between natural languages and programming languages that are not
observed during training. While software documentation is easy to find in
bulk, if a particular API is not already documented in a language other than
English (e.g., Haskell in $de$), it is unlikely that such a translation will
appear without considerable effort by experienced translators. Similarly, many
individual APIs may be too small or poorly documented to build individual
models or QA applications, and will in some way need to bootstrap off of more
general models or resources.

To deal with these issues, we aim to learn more general text-to-code
translation models that are trained on multiple datasets simultaneously. Our
ultimate goal is to build _polyglot_ translation models (cf. Johnson et al.
(2016)), or models with shared representations that can translate any input
text to any output programming language, regardless of whether such language
pairs were encountered explicitly during training. Inherent in this task is
the challenge of building an efficient polyglot decoder, or a translation
mechanism that allows such crossing between input and output languages. A key
challenge is ensuring that such a decoder generates well-formed code
representations, which is not guaranteed when one simply applies standard
decoding strategies from SMT and neural MT (cf. Cheng et al. (2017)). Given
our ultimate interest in API QA, such a decoder must also facilitate
monolingual translation, or being able to translate to specific output
languages as needed.

To solve the decoding problem, we introduce a new graph-based decoding and
representation framework that reduces to solving shortest path problems in
directed graphs. We investigate several translation models that work within
this framework, including traditional SMT models and models based on neural
networks, and report state-of-the-art results on the technical documentation
task of Richardson and Kuhn (2017b, a). To show the applicability of our
approach to more conventional SP tasks, we apply our methods to the GeoQuery
domain Zelle and Mooney (1996) and the Sportscaster corpus Chen et al. (2010).
These experiments also provide insight into the main technical documentation
task and highlight the strengths and weaknesses of the various translation
models being investigated.

##  2 Related Work

Our approach builds on the baseline models introduced in Richardson and Kuhn
(2017b) (see also Deng and Chrupała (2014)). Their work is positioned within
the broader SP literature, where traditionally SMT Wong and Mooney (2006a) and
parsing Zettlemoyer and Collins (2009) methods are used to study the problem
of translating text to formal meaning representations, usually centering
around QA applications Berant et al. (2013). More recently, there has been
interest in using neural network approaches either in place of Dong and Lapata
(2016); Kočiský et al. (2016) or in combination with Misra and Artzi (2016);
Jia and Liang (2016); Cheng et al. (2017) these traditional models, the latter
idea we look at in this paper.

Work in NLP on software documentation has accelerated in recent years due in
large part to the availability of new data resources through websites such as
StackOverflow and Github (cf. Allamanis et al. (2017)). Most of this recent
work focuses on processing large amounts of API data in bulk Gu et al. (2016);
Miceli Barone and Sennrich (2017), either for learning longer executable
programs from text Yin and Neubig (2017); Rabinovich et al. (2017), or solving
the inverse problem of code to text generation Iyer et al. (2016); Richardson
et al. (2017). In contrast to our work, these studies do not look explicitly
at translating to target APIs, or at non-English documentation.

The idea of polyglot modeling has gained some traction in recent years for a
variety of problems Tsvetkov et al. (2016) and has appeared within work in SP
under the heading of _multilingual SP_ Jie and Lu (2014); Duong et al. (2017).
A related topic is learning from multiple knowledge sources or domains Herzig
and Berant (2017), which is related to our idea of learning from multiple
APIs. When building models that can translate between unobserved language
pairs, we use the term _zero-shot translation_ from Johnson et al. (2016).

##  3 Baseline Semantic Translator

#### Problem Formulation

Throughout the paper, we refer to target code representations as API
_components_. In all cases, components will consist of formal representations
of functions, or function signatures (e.g., long max(int a, int b)), which
include a function name (max), a sequence of arguments (int a, int b), and
other information such as a return value (long) and namespace (for more
details, see Richardson (2018)). For a given API dataset
$D=\\{(\textbf{x}_{i},\textbf{z}_{i})\\}_{i=1}^{n}$ of size $n$, the goal is
to learn a model that can generate _exactly_ a correct component sequence
$\textbf{z}=(z_{1},..,z_{|\textbf{z}|})$, within a finite space $\mathcal{C}$
of signatures (i.e., the space of all defined functions), for each input text
sequence $\textbf{x}=(x_{1},...,x_{|\textbf{x}|})$. This involves learning a
probability distribution $p(\textbf{z}\mid\textbf{x})$. As such, one can think
of this underlying problem as a _constrained_ MT task.

In this section, we describe the baseline approach of Richardson and Kuhn
(2017b). Technically, their approach has two components: a simple word-based
translation model and task specific decoder, which is used to generate a
$k$-best list of candidate component representations for a given input x. They
then use a discriminative model to rerank the translation output using
additional non-world level features. The goal in this section is to provide
the technical details of their translation approach, which we improve in
Section 4.

###  3.1 Word-based Translation Model

The translation models investigated in Richardson and Kuhn (2017b) use a
noisy-channel formulation where $p(\textbf{z}\mid\textbf{x})\propto
p(\textbf{x}\mid\textbf{z})p(\textbf{z})$ via Bayes rule. By assuming a
uniform prior on output components, $p(\textbf{z})$, the model therefore
involves estimating $p(\textbf{x}\mid\textbf{z})$, which under a word-
translation model is computed using the following formula:
$p(\textbf{x}\mid\textbf{z})=\sum_{a\in\mathcal{A}}p(\textbf{x},a\mid\textbf{z})$,
where the summation ranges over the set of all many-to-one word alignments
$\mathcal{A}$ from $\textbf{x}\to\textbf{z}$, with $|\mathcal{A}|$ equal to
$(|\textbf{z}|+1)^{|\textbf{x}|}$. They investigate various types of sequence-
based alignment models Och and Ney (2003), and find that the classic IBM Model
1 outperforms more complex word models. This model factors in the following
way and assumes an _independent word generation_ process:

$p(\textbf{x}\mid\textbf{z})=\frac{1}{|\mathcal{A}|}\prod_{j=1}^{|\textbf{x}|}\sum_{i=0}^{|\textbf{z}|}p_{t}(x_{j}\mid
z_{i})$ (1)

where each $p_{t}$ defines a multinomial distribution over a given component
term $z$ for all words $x$.

The decoding problem for the above translation model involves finding the most
likely output $\hat{z}$, which requires solving an
$\operatorname*{arg\,max}_{\textbf{z}}$ over Equation 1. In the general case,
this problem is known to be $\mathcal{NP}$-complete for the models under
consideration Knight (1999) largely due to the large space of possible
predictions z. Richardson and Kuhn (2017b) avoid these issues by exploiting
the finiteness of the target component search space (an idea we also pursue
here and discuss more below), and describe a constrained decoding algorithm
that runs in time $O(|\mathcal{C}|\log|\mathcal{C}|)$. While this works well
for small APIs, it becomes less feasible when dealing with large sets of APIs,
as in the polyglot case, or with more complex semantic languages typically
used in SP Liang (2013).

$0.0_{0}$$s_{0}$$\infty_{5}$$s_{5}$$\infty_{1}$$s_{1}$$\infty_{6}$$s_{6}$$\infty_{2}$$s_{2}$$\infty_{3}$$s_{3}$$\infty_{7}$$s_{7}$$\infty_{4}$$s_{4}$$\infty_{9}$$s_{9}$$\infty_{10}$$s_{10}$$\infty_{11}$$s_{11}$$\infty_{8}$$s_{8}$2C2Clojurenumericalgomathmathceilatan2atan2ceilxxargy
Figure 2: A DAFSA representation for a portion of the component sequence
search space $\mathcal{C}$ that includes math functions in C and Clojure, and
an example path/translation (in bold): 2C numeric math ceil arg.

##  4 Shortest Path Framework

To improve the baseline translation approach used previously (Section 3.1), we
pursue a graph based approach. Given the formulation above and the finiteness
of our prediction space $\mathcal{C}$, our approach exploits the fact that we
can represent the complete component search space for any set of APIs as a
directed acyclic finite-state automaton (DAFSA), such as the one shown
graphically in Figure 2. The underlying graph is constructed by concatenating
all of the component representations for each API of interest and applying
standard finite-state construction and minimization techniques Mohri (1996).
Each path in the resulting compact automaton is therefore a well-formed
component representation.

Using an idea from Johnson et al. (2016), we add to each component
representation an _artificial_ token that identifies the output programming
language or library. For example, the two edges from the initial state $0$ in
Figure 2 are labeled as _2C_ and _2Clojure_ , which identify the C and Clojure
programming languages respectively. All paths starting from the right of these
edges are therefore valid paths in each respective programming language. The
paths starting from the initial state $0$, in contrast, correspond to all
valid component representations in all languages.

Decoding reduces to the problem of finding a path for a given text input x.
For example, given the input _the ceiling of a number_ , we would want to find
the paths corresponding to the component translations numeric math ceil arg
(in C) and algo math ceil x (in Clojure) in the graph shown in Figure 2. Using
the trick above, our setup facilitates both monolingual decoding, i.e.,
generating components specific to a particular output language (e.g., the C
language via the path shown in bold), and polyglot decoding, i.e., generating
any output language by starting at the initial state 0 (e.g., C and Clojure).

We formulate the decoding problem using a variant of the well-known single
source shortest path (SSSP) algorithm for directed acyclic graphs (DAGs)
(Johnson (1977)). This involves a graph $\mathcal{G}=(V,E)$ (nodes $V$ and
labeled edges $E$, see graph in Figure 2), and taking an off-line topological
sort of the graph’s vertices. Using a data structure $d\in\mathbb{R}^{|V|}$
(initialized as $\infty^{|V|}$, as shown in Figure 2), the standard SSSP
algorithm (which is the _forward update_ variant of the Viterbi algorithm
Huang (2008)) works by searching forward through the graph in sorted order and
finding for each node $v$ an incoming labeled edge $u$, with label $z$, that
solves the following recurrence:

$d(v)=\underset{(u,z):(u,v,z)\in E}{\min}\Big{\\{}d(u)+w(u,v,z)\Big{\\}}$ (2)

where $d(u)$ is shortest path score from a unique source node $b$ to the
incoming node $u$ (computed recursively) and $w(u,v,z)$ is the weight of the
particular labeled edge. The weight of the resulting shortest path is commonly
taken to be the sum of the path edge weights as given by $w$, and the output
translation is the sequence of labels associated with each edge. This
algorithm runs in linear time over the size of the graph’s adjacency matrix
(Adj) and can be extended to find $k$ SSSPs. In the standard case, a weighting
function $w$ is provided by assuming a static weighted graph. In our
translation context, we replace $w$ with a translation model, which is used to
dynamically generate edge weights during the SSSP search for each input x by
scoring the translation between x and each edge label $z$ encountered.

Given this general framework, many different translation models can be used
for scoring. In what follows, we describe two types of decoders based on
lexical translation (or unigram) and neural sequence models. Technically, each
decoding algorithm involves modifying the standard SSSP search procedure by
adding an additional data structure $s$ to each node (see Figure 2), which is
used to store information about translations (e.g., running lexical
translation scores, RNN state information) associated with particular shortest
paths. By using these two very different models, we can get insight into the
challenges associated with the technical documentation translation task. As we
show in Section 6, each model achieves varying levels of success when
subjected to a wider range of SP tasks, which reveals differences between our
task and other SP tasks.

###  4.1 Lexical Translation Shortest Path

Algorithm 1 Lexical Shortest Path Search

1:Input x of size $n$, DAG $\mathcal{G}=(V,E)$, lexical translation function
$p_{t}$, source node $b$ with initial score $o$.

2:Shortest component path

3:$d[V[\mathcal{G}]]\leftarrow\infty,\pi[V[\mathcal{G}]]\leftarrow
Nil,d[b]\leftarrow o$

4:$s[V[\mathcal{G}],n]\leftarrow 0.0$$\triangleright$ Shortest path sums at
each node

5:for each vertex $u\geq b\in V[\mathcal{G}]$ in sorted order do

6: for each vertex and label $(v,z)\in\texttt{Adj}[u]$ do

7: $\texttt{score}\leftarrow-
log\big{[}\thinspace\thinspace\prod_{i}^{n}p_{t}(x_{i}\mid z)+s[u,i]$ ]

8: if $d[v]>\texttt{score}$ then

9: $d[v]\leftarrow\texttt{score},\pi[v]\leftarrow u$

10: for $i$ in $1,..,n$ do$\triangleright$ Update scores

11: $s[v,i]\leftarrow p_{t}(x_{i}\mid z)+s[u,i]$

12:return FindPath$(\pi,|V|,b)$

In our first model, we use the lexical translation model and probability
function $p_{t}$ in Equation 1 as the weighting function, which can be learned
efficiently off-line using the EM algorithm. When attempting to use the SSSP
procedure to compute this equation for a given source input x, we immediately
have the problem that such a computation requires a complete component
representation z Knight and Al-Onaizan (1998). We use an
approximation111Details about the approx. are provided as supp. material. that
involves ignoring the normalizer $|\mathcal{A}|$ and exploiting the word
independence assumption of the model, which allows us to incrementally compute
translation scores for individual source words given output translations
corresponding to shortest paths during the SSSP search.

The full decoding algorithm in shown in Algorithm 1, where the red highlights
the adjustments made to the standard SSSP search as presented in Cormen et al.
(2009). The main modification involves adding a data structure
$s\in\mathbb{R}^{|V|\thinspace\times\thinspace|\textbf{x}|}$ (initialized as
$0.0^{|V|\times|\textbf{x}|}$ at line 2) that stores a running sum of source
word scores given the best translations at each node, which can be used for
computing the inner sum in Equation 1. For example, given an input utterance
_ceiling function_ , $s_{6}$ in Figure 2 contains the _independent_
translation scores for words _ceiling_ and _function_ given the edge label
numeric and $p_{t}$. Later on in the search, these scores are used to compute
$s_{7}$, which will provide translation scores for each word given the edge
sequence _numeric math_. Taking the product over any given $s_{j}$ (as done in
line 7 to get score) will give the probability of the shortest path
translation at the particular point $j$. Here, the transformation into $-\log$
space is used to find the _minimum_ incoming path. Standardly, the data
structure $\pi$ can be used to retrieve the shortest path back to the source
node $b$ (done via the FindPath method).

###  4.2 Neural Shortest Path

Our second set of models use neural networks to compute the weighting function
in Equation 2. We use an encoder-decoder model with global attention Bahdanau
et al. (2014); Luong et al. (2015), which has the following two components:

#### Encoder Model

The first is an _encoder_ network, which uses a bi-directional recurrent
neural network architecture with LSTM units Hochreiter and Schmidhuber (1997)
to compute a sequence of forward annotations or hidden states
$(\overrightarrow{h}_{1},...,\overrightarrow{h}_{|\textbf{x}|})$ and a
sequence of backward hidden states
$(\overleftarrow{h},...,\overleftarrow{h}_{|\textbf{x}|})$ for the input
sequence $(x_{1},...,x_{|\textbf{x}|})$. Standardly, each word is then
represented as the concatenation of its forward and backward states:
$h_{j}=[\overrightarrow{h}_{j},\overleftarrow{h}_{j}]$.

#### Decoder Model

The second component is a _decoder_ network, which directly computes the
conditional distribution $p(\textbf{z}\mid\textbf{x})$ as follows:

$\displaystyle p(\textbf{z}\mid\textbf{x})=\sum_{i=1}^{|\textbf{z}|}\log
p_{\Theta}(z_{i}\mid z_{<i},\textbf{x})$ (3) $\displaystyle
p_{\Theta}(z_{i}\mid
z_{<i},\textbf{x})\sim\texttt{softmax}(f(\Theta,z_{<i},\textbf{x}))$ (4)

where $f$ is a non-linear function that encodes information about the sequence
$z_{<i}$ and the input x given the model parameters $\Theta$. We can think of
this model as an ordinary recurrent language model that is additionally
conditioned on the input x using information from our encoder. We implement
the function $f$ in the following way:

$\displaystyle
f(\Theta,z_{<i},\textbf{x})=\textbf{W}_{o}\eta_{i}+\textbf{b}_{o}$ (5)
$\displaystyle\eta_{i}=\texttt{MLP}(c_{i},g_{i})$ (6) $\displaystyle
g_{i}=\texttt{LSTM}_{dec}(g_{i-1},\textbf{E}^{out}_{z_{i-1}},c_{i})$ (7)

where MLP is a multi-layer perceptron model with a single hidden layer,
$\textbf{E}^{out}\in\mathbb{R}^{|\Sigma_{dec}|\times e}$ is a randomly
initialized embedding matrix, $g_{i}$ is the decoder’s hidden state at step
$i$, and $c_{i}$ is a context-vector that encodes information about the input
x and the encoder annotations. Each context vector $c_{i}$ in turn is a
weighted sum of each annotation $h_{j}$ against an attention vector
$\alpha_{i,j}$, or $c_{i}=\sum_{j=1}^{|\textbf{x}|}\alpha_{i,j}h_{j}$, which
is jointly learned using an additional single layered multi-layer perceptron
defined in the following way:

$\displaystyle\alpha_{i,j}\propto\exp(e_{i,j});\quad
e_{i,j}=\texttt{MLP}(g_{i-1},h_{j})$ (8)

#### Lexical Bias and Copying

In contrast to standard MT tasks, we are dealing with a relatively low-
resource setting where the sparseness of the target vocabulary is an issue.
For this reason, we experimented with integrating lexical translation scores
using a biasing technique from Arthur et al. (2016). Their method is based on
the following computation for each token $z_{i}$:

$\displaystyle\texttt{bias}_{i}=\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$
$\displaystyle\begin{bmatrix}p_{t^{\prime}}(z_{1}\mid
x_{1})&\dots&p_{t^{\prime}}(z_{1}\mid x_{|\textbf{x}|})\\\
\vdots&\ddots&\vdots\\\ p_{t^{\prime}}(z_{\mid\Sigma_{dec}\mid}\mid
x_{1})&\dots&p_{t^{\prime}}(z_{\mid\Sigma_{dec}\mid}\mid
x_{|\textbf{x}|})\end{bmatrix}\begin{bmatrix}\alpha_{i,1}\\\ \vdots\\\
\alpha_{i,\mid\textbf{x}\mid}\end{bmatrix}$

The first matrix uses the inverse ($p_{t^{\prime}}$) of the lexical
translation function $p_{t}$ already introduced to compute the probability of
each word in the target vocabulary $\Sigma_{dec}$ (the columns) with each word
in the input x (the rows), which is then weighted by the attention vector from
Equation 8. $bias_{i}$ is then used to modify Equation 5 in the following way:

$\displaystyle f_{bias}(\Theta,z_{<i},\textbf{x})={}$
$\displaystyle\textbf{W}_{o}\eta_{i}+\textbf{b}_{o}+$
$\displaystyle\log(\texttt{bias}_{i}+\epsilon)$

where $\epsilon$ is a hyper-parameter that helps to preserve numerical
stability and biases more heavily on the lexical model when set lower.

We also experiment with the _copying_ mechanism from Jia and Liang (2016),
which works by allowing the decoder to choose from a set of latent actions,
$a_{j}$, that includes writing target words according to Equation 5, as done
standardly, or copying source words from x, or $\texttt{copy}[x_{i}]$
according to the attention scores in Equation 8. A distribution is then
computed over these actions using a softmax function and particular actions
are chosen accordingly during training and decoding.

Algorithm 2 Neural Shortest Path Search

1:Input x, DAG $\mathcal{G}$, neural parameters $\Theta$ and non-linear
function $f$, beam size $l$, source node $b$ with init. score $o$.

2:Shortest component path

3:$d[V[\mathcal{G}]]\leftarrow\infty,d[b]\leftarrow
o,\pi[V[\mathcal{G}]]\leftarrow Nil$

4:$s[V[\mathcal{G}]]\leftarrow Nil$$\triangleright$ Path state information

5:$s[b]\leftarrow\texttt{InitState()}$$\triangleright$ Initialize source state

6:for each vertex $u\geq b\in V[\mathcal{G}]$ in sorted order do

7: if $\texttt{isinf}(d[u])$ then continue

8: $p\leftarrow s[u]$$\triangleright$ Current state at node $u$, or $z_{<i}$

9:
$L^{1}_{[l]}\leftarrow\underset{(v_{1},...,v_{k})\in\texttt{Adj}[u]}{\operatorname*{arg\,max}}{\texttt{softmax}(f(\Theta,p,\textbf{x})})$

10: for each vertex and label $(v,z)\in L$ do

11: score $\leftarrow-\log p_{\Theta}(z\mid p,\textbf{x})+d[u]$

12: if $d[v]>\texttt{score}$ then

13: $d[v]\leftarrow\texttt{score},\pi[v]\leftarrow u$

14: $s[v]\leftarrow\texttt{UpdateState}(p,z)$

15:return FindPath$(\pi,|V|,b)$

#### Decoding and Learning

The full decoding procedure is shown in Algorithm 2, where the differences
with the standard SSSP are again shown in red. We change the data structure
$s$ to contain the decoder’s RNN state at each node. We also modify the
scoring (line 7, which uses Equation 4) to consider only the top $l$ edges or
translations at that point, as opposed to imposing a full search. When $l$ is
set to 1, for example, the procedure does a greedy search through the graph,
whereas when $l$ is large the procedure is closer to a full search.

In general terms, the decoder described above works like an ordinary neural
decoder with the difference that each decision (i.e., new target-side word
translation) is constrained (in line 7) by the transitions allowed in the
underlying graph in order to ensure wellformedness of each component output.
Standardly, we optimize these models using stochastic gradient descent with
the objective of finding parameters $\hat{\Theta}$ that minimize the negative
conditional log-likelihood of the training dataset.

###  4.3 Monolingual vs. Polyglot Decoding

Our framework facilitates both monolingual and polyglot decoding. In the first
case, the decoder requires a graph associated with the output semantic
language (more details in next section) and a trained translation model. The
latter case requires taking the union of all datasets and graphs (with
artificial identifier tokens) for a collection of target datasets and training
a single model over this global dataset. In this setting, we can then decode
to a particular language using the language identifiers or decode without
specifying the output language. The main focus in this paper is investigating
polyglot decoding, and in particular the effect of training models on multiple
datasets when translating to individuals APIs or SP datasets.

When evaluating our models and building QA applications, it is important to be
able to generate the $k$ best translations. This can easily be done in our
framework by applying standard $k$ SSSP algorithms Brander and Sinclair
(1995). We use an implementation of the algorithm of Yen (1971), which works
on top of the SSSP algorithms introduced above by iteratively finding
deviating or branching paths from an initial SSSP (more details provided in
supplementary materials).

---
Figure 3: Test Acc@1 for the best monolingual models (in yellow/left) compared
with the best lexical polyglot model (green/right) across all 45 technical
documentation datasets.

##  5 Experiments

We experimented with two main types of resources: 45 API documentation
datasets and two multilingual benchmark SP datasets. In the former case, our
main objective is to test whether training polyglot models (shown as polyglot
in Tables 1-2) on multiple datasets leads to an improvement when compared to
training individual monolingual models (shown as monolingual in Tables 1-2).
Experiments involving the latter datasets are meant to test the applicability
of our general graph and polyglot method to related SP tasks, and are also
used for comparison against our main technical documentation task.

###  5.1 Datasets

#### Technical API Docs

The first dataset includes the Stdlib and Py27 datasets of Richardson and Kuhn
(2017b, a), which are publicly available via Richardson (2017). Stdlib
consists of short description and function signature pairs for 10 programming
languages in 7 languages, and Py27 contains the same type of data for 27
popular Python projects in English mined from Github. We also built new
datasets from the Japanese translation of the Python 2.7 standard library, as
well as the Lua stdlib documentation in a mixture of Russian, Portuguese,
German, Spanish and English.

Taken together, these resources consist of 79,885 training pairs, and we
experiment with training models on Stdlib and Py27 separately as well as
together (shown as \+ more in Table 1). We use a BPE subword encoding
(Sennrich et al., 2015) of both input and output words to make the
representations more similar and transliterated all datasets (excluding
Japanese datasets) to an 8-bit latin encoding. Graphs were built by
concatenating all function representations into a single word list and
compiling this list into a minimized DAFSA. For our global polyglot dataset,
this resulted in a graph with 218,505 nodes, 313,288 edges, and 112,107 paths
or component representations over an output vocabulary of 9,324 words.

#### Mixed GeoQuery and Sportscaster

We run experiments on the GeoQuery 880 corpus using the splits from Andreas et
al. (2013), which includes geography queries for English, Greek, Thai, and
German paired with formal database queries, as well as a seed lexicon or _NP
list_ for each language. In addition to training models on each individual
dataset, we also learn polyglot models trained on all datasets concatenated
together. We also created a new mixed language test set that was built by
replacing NPs in 803 test examples with one or more NPs from a different
language using the NP lists mentioned above (see examples in Figure 4). The
goal in the last case is to test our model’s ability to handle mixed language
input. We also ran monolingual experiments on the English Sportscaster corpus,
which contains human generated soccer commentary paired with symbolic meaning
representation produced by a simulation of four games.

For GeoQuery graph construction, we built a single graph for all languages by
extracting general rule templates from all representations in the dataset, and
exploited additional information and patterns using the Geobase database and
the semantic grammars used in Wong and Mooney (2006b). This resulted in a
graph with 2,419 nodes, 4,936 edges and 39,482 paths over an output vocabulary
of 164. For Sportscaster, we directly translated the semantic grammar provided
in Chen and Mooney (2008) to a DAFSA, which resulted in a graph with 98 nodes,
86 edges and 830 paths.

###  5.2 Experimental Setup

For the technical datasets, the goal is to see if our model generates correct
signature representations from unobserved descriptions using exact match. We
follow exactly the experimental setup and data splits from Richardson and Kuhn
(2017b), and measure the accuracy at 1 (Acc@1), accuracy in top 10 (Acc@10),
and MRR.

For the GeoQuery and Sportscaster experiments, the goal is to see if our
models can generate correct meaning representations for unseen input. For
GeoQuery, we follow Andreas et al. (2013) in evaluating extrinsically by
checking that each representation evaluates to the same answer as the gold
representation when executed against the Geobase database. For Sportscaster,
we evaluate by exact match to a gold representation.

|  | Method | Acc@1 | Acc@10 | MRR
---|---|---|---|---|---
stdlib | mono. | RK Trans + _rerank_ | 29.9 | 69.2 | 43.1
2-6 |  | Lexical SP | 33.2 | 70.7 | 45.9
| poly. | Lexical SP + _more_ | 33.1 | 69.7 | 45.5
3-6 |  | Neural SP + _bias_ | 12.1 | 34.3 | 19.5
|  | Neural SP + _copy_bias_ | 13.9 | 36.5 | 21.5
py27 | mono. | RK Trans + _rerank_ | 32.4 | 73.5 | 46.5
2-6 |  | Lexical SP | 41.3 | 77.7 | 54.1
| poly. | Lexical SP + _more_ | 40.5 | 76.7 | 53.1
3-6 |  | Neural SP + _bias_ | 8.7 | 25.5 | 14.2
|  | Neural SP + _copy_bias_ | 9.0 | 26.9 | 15.1
Table 1: Test results on the Stdlib and Py27 tasks averaged over all datasets
and compared against the best monolingual results from Richardson and Kuhn
(2017b, a), or RK

###  5.3 Implementation and Model Details

We use the Foma finite-state toolkit of Hulden (2009) to construct all graphs
used in our experiments. We also use the Cython version of Dynet Neubig et al.
(2017) to implement all the neural models (see supp. materials for more
details).

In the results tables, we refer to the lexical and neural models introduced in
Section 4 as _Lexical Shortest Path_ and _Neural Shortest Path_ , where models
that use copying (_\+ copy_) and lexical biasing (_\+ bias_) are marked
accordingly. We also experimented with adding a discriminative reranker to our
lexical models (+ _rerank_), using the approach from Richardson and Kuhn
(2017b), which uses additional lexical (e.g., word match and alignment)
features and other phrase-level and syntax features. The goal here is to see
if these additional (mostly non-word level) features help improve on the
baseline lexical models.

##  6 Results and Discussion

|  | Method | Acc@1 | Acc@10 |
---|---|---|---|---|---
|  | UBL Kwiatkowski et al. (2010) | 74.2 | – |
|  | TreeTrans Jones et al. (2012) | 76.8 | – |
|  | nHT Susanto and Lu (2017) | 83.3 | – |
3-6  Standard Geoquery |  monolingual | Lexical Shortest Path | 68.6 | 92.4 |
Lexical Shortest Path + _rerank_ | 74.2 | 94.1 |
3-6 | Neural Shortest Path | 73.5 | 91.1 |
|  | Neural Shortest Path + _bias_ | 78.0 | 92.8 |
|  | Neural Shortest Path + _copy_bias_ | 77.8 | 92.1 |
|  polyglot | Lexical Shortest Path | 67.3 | 92.9 |
| Lexical Shortest Path + _rerank_ | 75.2 | 94.7 |
3-6 | Neural Shortest Path | 78.0 | 91.4 |
| Neural Shortest Path + _bias_ | 78.9 | 91.7 |
|  | Neural Shortest Path + _copy_bias_ | 79.6 | 91.9 |
1-6  Mixed |  poly. | Best Monolingual Model | 4.2 | 18.2 |
| Lexical Shortest Path + _rerank_ | 71.1 | 94.3 |
| Neural Shortest Path + _copy_bias_ | 75.2 | 90.0 |
|  mono. | PCFG Börschinger et al. (2011) | 74.2 | – |
| wo-PCFG Börschinger et al. (2011) | 86.0 | – |
3-6  Sportscaster | Lexical Shortest Path | 40.3 | 86.8 |
| Lexical Shortest Path + _rerank_ | 70.3 | 90.2 |
3-6 |  | Neural Shortest Path | 81.9 | 94.8 |
|  | Neural Shortest Path + _bias_ | 83.4 | 93.9 |
|  | Neural Shortest Path + _copy_bias_ | 83.3 | 90.5 |
Table 2: Test results for the standard (above) and mixed (middle) GeoQuery
tasks averaged over all languages, and results for the English Sportscaster
task (below).

#### Technical Documentation Results

Table 1 shows the results for Stdlib and Py27. In the monolingual case, we
compare against the best performing models in Richardson and Kuhn (2017b, a).
As summarized in Figure 3, our experiments show that training polyglot models
on multiple datasets can lead to large improvements over training individual
models, especially on the Py27 datasets where using a polyglot model resulted
in a nearly 9% average increase in accuracy @1. In both cases, however, the
best performing lexical models are those trained only on the datasets they are
evaluated on, as opposed to training on all datasets (i.e., _\+ more_). This
is surprising given that training on all datasets doubles the size of the
training data, and shows that adding more data does not necessarily boost
performance when the additional data is from another distribution.

The neural models are strongly outperformed by all other models both in the
monolingual and polyglot case (only the latter results shown), even when
lexical biasing is applied. While surprising, this is consistent with other
studies on _low-resource_ neural MT Zoph et al. (2016); Östling and Tiedemann
(2017), where datasets of comparable size to ours (e.g., 1 million tokens or
less) typically fail against classical SMT models. This result has also been
found in relation to neural AMR semantic parsing, where similar issues of
sparsity are encountered Peng et al. (2017). Even by doubling the amount of
training data by training on all datasets (results not shown), this did not
improve the accuracy, suggesting that much more data is needed (more
discussion below).

Beyond increases in accuracy, our polyglot models support zero-shot
translation as shown in Figure 4, which can be used for translating between
unobserved language pairs (e.g., ($es$,Clojure), ($ru$,Haskell) as shown in
1-2), or for finding related functionality across different software projects
(as shown in 3). These results were obtained by running our decoder model
without specifying the output language. We note, however, that the decoder can
be constrained to selectively translate to any specific programming language
or project (e.g., in a QA setting). Future work will further investigate the
decoder’s polyglot capabilities, which is currently hard to evaluate since we
do not have an annotated set of function equivalences between different APIs.

1. | Source API (stdlib): (_es_ , PHP) |  Input: Devuelve el mensaje asociado al objeto lanzado.
---|---|---
Output | Language: PHP | Function Translation: public string Throwable::getMessage ( void )
Language: Java | Function Translation: public String lang.getMessage( void )
Language: Clojure | Function Translation: (tools.logging.fatal throwable message & more)
2. | Source API (stdlib): (_ru_ , PHP) |  Input: konvertiruet stroku iz formata UTF-32 v format UTF-16.
Output | Language: PHP | Function Translation: string PDF_utf32_to_utf16 ( ... )
Language: Ruby | Function Translation: String#toutf16 => string
Language: Haskell | Function Translation: Encoding.encodeUtf16LE :: Text -> ByteString
3. | Source API (py): (_en_ , stats) |  Input: Compute the Moore-Penrose pseudo-inverse of a matrix.
Output | Project: sympy | Function Translation: matrices.matrix.base.pinv_solve( B, ... )
Project: sklearn | Function Translation: utils.pinvh( a, cond=None,rcond=None,... )
Project: stats | Function Translation: tools.pinv2( a,cond=None,rcond=None )
4. | Mixed GeoQuery (de/gr) |  Input: Wie hoch liegt der höchstgelegene punkt in Αλαμπάμα?
Logical Form Translation:
answer(elevation_1(highest(place(loc_2(stateid(’alabama’))))))
Figure 4: Examples of zero-shot translation when running in polyglot mode
(1-3, function representations shown in a conventionalized format), and mixed
language parsing (4).

#### Semantic Parsing Results

SP results are summarized in Table 2. In contrast, the neural models,
especially those with biasing and copying, strongly outperform all other
models and are competitive with related work. In the GeoQuery case, we compare
against two classic grammar-based models, UBL and TreeTrans, as well as a
feature rich, neural hybrid tree model (nHT). We also see that the polyglot
Geo achieves the best performance, demonstrating that training on multiple
datasets helps in this domain as well. In the Sportscaster case we compare
against two PCFG learning approaches, the second, and best performing model
(wo-PCFG) involves a grammar model that encodes complex word-order
constraints.

The real advantage of training a polyglot model is shown on the results
related to mixed language parsing (i.e., the middle set of results). Here we
compared against the best performing monolingual English model (Best Mono.
Model), which clearly does not have a way to deal with multilingual NPs. We
also find the neural model to be more robust than the lexical models with
reranking.

While the lexical models overall perform poorly on both tasks, the weakness of
this model is particularly acute in the Sportscaster case. We found that
mistakes are largely related to the ordering of arguments, which these lexical
(unigram) models are blind to. That these models still perform reasonably well
on the Geo task shows that such ordering issues are less of a factor in this
domain.

#### Discussion

Having results across related SP tasks allows us to reflect on the nature of
the main technical documentation task. Consistent with recent findings Dong
and Lapata (2016), we show that relatively simple neural sequence models are
competitive with, and in some cases outperform, traditional grammar-based SP
methods on benchmark SP tasks. However, this result is not observed in our
technical documentation task, in part because this problem is much harder for
neural learners given the sparseness of the target data and lack of
redundancy. For this reason, we believe our datasets provide new challenges
for neural-based SP, and serve as a cautionary tale about the scalability and
applicability of commonly used neural models to lower-resource SP problems.

In general, we believe that focusing on polyglot and mixed language decoding
is not only of interest to applications (e.g, mixed language API QA) but also
allows for new forms of SP evaluation that are more revealing than only
translation accuracy. When comparing the accuracy of the best monolingual Geo
model and the worst performing neural polyglot model, one could mistakingly
think that these models have equal abilities, though the polyglot model is
much more robust and general. Moving forward, we hope that our work helps to
motivate more diverse evaluations of this type.

##  7 Conclusion

In this paper, we look at learning from multiple API libraries and datasets in
the context of learning to translate text to code representations and other SP
tasks. To support _polyglot_ modeling of this type, we developed a novel graph
based decoding method and experimented with various SMT and neural MT models
that work in this framework. We report a mixture of positive results specific
to each task and set of models using this polyglot modeling idea, some of
which reveal interesting limitations of different approaches to SP. We also
introduced two new API datasets, and a mixed language version of Geoquery that
will be released to facilitate further work on polyglot SP.

## Acknowledgements

This work was funded by the Deutsche Forschungsgemeinschaft (DFG) via SFB 732,
project D2. We thank Alex Fraser for helpful feedback on an earlier draft.

## References

  * Allamanis et al. (2017) Miltiadis Allamanis, Earl T Barr, Premkumar Devanbu, and Charles Sutton. 2017.  A Survey of Machine Learning for Big Code and Naturalness.  arXiv preprint arXiv:1709.06182 .
  * Andreas et al. (2013) Jacob Andreas, Andreas Vlachos, and Stephen Clark. 2013.  Semantic parsing as machine translation.  In in Proceedings of ACL-2013. pages 47–52.
  * Arthur et al. (2016) Philip Arthur, Graham Neubig, and Satoshi Nakamura. 2016.  Incorporating Discrete Translation Lexicons into Neural Machine Translation.  arXiv preprint arXiv:1606.02006 .
  * Bahdanau et al. (2014) Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014.  Neural Machine Translation by Jointly Learning to Align and Translate.  arXiv preprint arXiv:1409.0473 .
  * Berant et al. (2013) Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013.  Semantic Parsing on Freebase from Question-Answer Pairs.  In in Proceedings of EMNLP-2013. pages 1533–1544.
  * Börschinger et al. (2011) Benjamin Börschinger, Bevan K. Jones, and Mark Johnson. 2011.  Reducing grounded learning tasks to grammatical inference.  In Proceedings of EMNLP-2011. pages 1416–1425.
  * Brander and Sinclair (1995) AW Brander and MC Sinclair. 1995.  A Comparative Study of k-Shortest Path Algorithms.  In In Proc. of 11th UK Performance Engineering Workshop.
  * Chen et al. (2010) David L. Chen, Joohyun Kim, and Raymond J. Mooney. 2010.  Training a Multilingual Sportscaster: Using Perceptual Context to Learn Language.  Journal of Artificial Intelligence Research 37:397–435.
  * Chen and Mooney (2008) David L. Chen and Raymond J. Mooney. 2008.  Learning to Sportscast: A Test of Grounded Language Acquisition.  In Proceedings of ICML-2008. pages 128–135.
  * Cheng et al. (2017) Jianpeng Cheng, Siva Reddy, Vijay Saraswat, and Mirella Lapata. 2017.  Learning Structured Natural Language Representations for Semantic Parsing.  arXiv preprint arXiv:1704.08387 .
  * Cormen et al. (2009) T Cormen, C Leiserson, R Rivest, and C Stein. 2009.  Introduction to Algorithms.  MIT Press.
  * Deng and Chrupała (2014) Huijing Deng and Grzegorz Chrupała. 2014.  Semantic Approaches to Software Component Retrieval with English Queries.  In Proceedings of LREC-14. pages 441–450.
  * Dong and Lapata (2016) Li Dong and Mirella Lapata. 2016.  Language to Logical Form with Neural Attention.  arXiv preprint arXiv:1601.01280 .
  * Duong et al. (2017) Long Duong, Hadi Afshar, Dominique Estival, Glen Pink, Philip Cohen, and Mark Johnson. 2017.  Multilingual Semantic Parsing and Code-Switching.  CoNLL 2017 page 379.
  * Gu et al. (2016) Xiaodong Gu, Hongyu Zhang, Dongmei Zhang, and Sunghun Kim. 2016.  Deep API Learning.  arXiv preprint arXiv:1605.08535 .
  * Herzig and Berant (2017) Jonathan Herzig and Jonathan Berant. 2017.  Neural Semantic Parsing over Multiple Knowledge-Bases.  arXiv preprint arXiv:1702.01569 .
  * Hochreiter and Schmidhuber (1997) Sepp Hochreiter and Jürgen Schmidhuber. 1997.  Long Short-Term Memory.  Neural computation 9(8).
  * Huang (2008) Liang Huang. 2008.  Advanced Dynamic Programming in Semiring and Hypergraph Frameworks.  In Proceedings of COLING-2008 (tutorial notes).
  * Hulden (2009) Mans Hulden. 2009.  Foma: a Finite-State Compiler and Library.  In Proceedings of EACL.
  * Iyer et al. (2016) Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. 2016.  Summarizing Source Code using a Neural Attention Model.  In Proceedings of ACL.
  * Jia and Liang (2016) Robin Jia and Percy Liang. 2016.  Data Recombination for Neural Semantic Parsing.  arXiv preprint arXiv:1606.03622 .
  * Jie and Lu (2014) Zhanming Jie and Wei Lu. 2014.  Multilingual Semantic Parsing: Parsing Multiple Languages into Semantic Representations.  In COLING. pages 1291–1301.
  * Johnson (1977) Donald B Johnson. 1977.  Efficient Algorithms for Shortest Paths in Sparse Networks.  Journal of the ACM (JACM) 24(1):1–13.
  * Johnson et al. (2016) Melvin Johnson, Mike Schuster, Quoc V Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda Viégas, Martin Wattenberg, Greg Corrado, et al. 2016.  Google’s Multilingual Neural Machine Translation System: Enabling Zero-Shot Translation.  arXiv preprint arXiv:1611.04558 .
  * Jones et al. (2012) Bevan Keeley Jones, Mark Johnson, and Sharon Goldwater. 2012.  Semantic Parsing with Bayesian Tree Transducers.  In Proceedings of ACL-2012. pages 488–496.
  * Knight (1999) Kevin Knight. 1999.  Decoding Complexity in Word-Replacement Translation Models.  Computational linguistics 25(4):607–615.
  * Knight and Al-Onaizan (1998) Kevin Knight and Yaser Al-Onaizan. 1998.  Translation with Finite-state Devices.  In Proceedings of AMTA.
  * Kočiský et al. (2016) Tomáš Kočiský, Gábor Melis, Edward Grefenstette, Chris Dyer, Wang Ling, Phil Blunsom, and Karl Moritz Hermann. 2016.  Semantic Parsing with Semi-Supervised Sequential Autoencoders.  In Proceedings of EMNLP-16. pages 1078–1087.
  * Kwiatkowski et al. (2010) Tom Kwiatkowski, Luke Zettlemoyer, Sharon Goldwater, and Mark Steedman. 2010.  Inducing Probabilistic CCG Grammars from Logical Form with Higher-order Unification.  In Proceedings of EMNLP-2010. pages 1223–1233.
  * Liang (2013) Percy Liang. 2013.  Lambda Dependency-Based Compositional Semantics.  arXiv preprint arXiv:1309.4408 .
  * Luong et al. (2015) Minh-Thang Luong, Hieu Pham, and Christopher D Manning. 2015.  Effective Approaches to Attention-Based Neural Machine Translation.  arXiv preprint arXiv:1508.04025 .
  * Miceli Barone and Sennrich (2017) Antonio Valerio Miceli Barone and Rico Sennrich. 2017.  A Parallel Corpus of Python Functions and Documentation Strings for Automated Code Documentation and Code Generation.  arXiv preprint arXiv:1707.02275 .
  * Misra and Artzi (2016) Dipendra Kumar Misra and Yoav Artzi. 2016.  Neural Shift-Reduce CCG Semantic Parsing.  In EMNLP. pages 1775–1786.
  * Mohri (1996) Mehryar Mohri. 1996.  On Some Applications of Finite-State Automata Theory to Natural Language Processing.  Natural Language Engineering 2(1):61–80.
  * Mooney (2007) Raymond Mooney. 2007.  Learning for Semantic Parsing.  In Proceedings of CICLING.
  * Neubig et al. (2017) Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Matthews, Waleed Ammar, Antonios Anastasopoulos, Miguel Ballesteros, David Chiang, Daniel Clothiaux, Trevor Cohn, Kevin Duh, Manaal Faruqui, Cynthia Gan, Dan Garrette, Yangfeng Ji, Lingpeng Kong, Adhiguna Kuncoro, Gaurav Kumar, Chaitanya Malaviya, Paul Michel, Yusuke Oda, Matthew Richardson, Naomi Saphra, Swabha Swayamdipta, and Pengcheng Yin. 2017.  Dynet: The Dynamic Neural Network Toolkit.  arXiv preprint arXiv:1701.03980 https://github.com/clab/dynet.
  * Och and Ney (2003) Franz Josef Och and Hermann Ney. 2003.  A Systematic Comparison of Various Statistical Alignment Models.  Computational linguistics 29(1):19–51.
  * Östling and Tiedemann (2017) Robert Östling and Jörg Tiedemann. 2017.  Neural Machine Translation for Low-resource Languages.  arXiv preprint arXiv:1708.05729 .
  * Peng et al. (2017) Xiaochang Peng, Chuan Wang, Daniel Gildea, and Nianwen Xue. 2017.  Addressing the Data Sparsity Issue in Neural AMR Parsing.  Proceedings of ACL .
  * Rabinovich et al. (2017) Maxim Rabinovich, Mitchell Stern, and Dan Klein. 2017.  Abstract Syntax Networks for Code Generation and Semantic Parsing.  In Proceedings of ACL.
  * Richardson (2017) Kyle Richardson. 2017.  Code-Datasets.  https://github.com/yakazimir/Code-Datasets.
  * Richardson (2018) Kyle Richardson. 2018.  A Language for Function Signature Representations.  arXiv preprint arXiv:1804.00987 .
  * Richardson and Kuhn (2017a) Kyle Richardson and Jonas Kuhn. 2017a.  Function Assistant: A Tool for NL Querying of APIs.  In Proceedings of EMNLP.
  * Richardson and Kuhn (2017b) Kyle Richardson and Jonas Kuhn. 2017b.  Learning Semantic Correspondences in Technical Documentation.  In Proceedings of ACL.
  * Richardson et al. (2017) Kyle Richardson, Sina Zarrieß, and Jonas Kuhn. 2017.  The Code2Text Challenge: Text Generation in Source Code Libraries.  In Proceedings of INLG.
  * Sennrich et al. (2015) Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015.  Neural Machine Translation of Rare Words with Subword Units.  arXiv preprint arXiv:1508.07909 .
  * Susanto and Lu (2017) Raymond Hendy Susanto and Wei Lu. 2017.  Semantic Parsing with Neural Hybrid Trees.  In AAAI. pages 3309–3315.
  * Tsvetkov et al. (2016) Yulia Tsvetkov, Sunayana Sitaram, Manaal Faruqui, Guillaume Lample, Patrick Littell, David Mortensen, Alan W Black, Lori Levin, and Chris Dyer. 2016.  Polyglot Neural Language Models: A Case Study in Cross-Lingual Phonetic Representation Learning.  arXiv preprint arXiv:1605.03832 .
  * Wong and Mooney (2006a) Yuk Wah Wong and Raymond J. Mooney. 2006a.  Learning for semantic parsing with statistical machine translation.  In Proceedings of HLT-NAACL-2006. pages 439–446.
  * Wong and Mooney (2006b) Yuk Wah Wong and Raymond J Mooney. 2006b.  Learning for Semantic Parsing with Statistical Machine Translation.  In Proceedings of NACL.
  * Yen (1971) Jin Y Yen. 1971.  Finding the k Shortest Loopless Paths in a Network.  Management Science 17(11):712–716.
  * Yin and Neubig (2017) Pengcheng Yin and Graham Neubig. 2017.  A Syntactic Neural Model for General-Purpose Code Generation.  In Proceedings of ACL.
  * Zelle and Mooney (1996) John M Zelle and Raymond J Mooney. 1996.  Learning to Parse Database Queries using Inductive Logic Programming.  In Proceedings of AAAI-1996. pages 1050–1055.
  * Zettlemoyer and Collins (2009) Luke S. Zettlemoyer and Michael Collins. 2009.  Learning context-dependent mappings from sentences to logical form.  In Proceedings of ACL-2009. pages 976–984.
  * Zettlemoyer and Collins (2012) Luke S Zettlemoyer and Michael Collins. 2012.  Learning to Map Sentences to Logical Form: Structured Classification with Probabilistic Categorial Grammars.  arXiv preprint arXiv:1207.1420 .
  * Zoph et al. (2016) Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016.  Transfer Learning for Low-resource Neural Machine Translation.  Proceedings of ACL .


# Controlling the electron-phonon heat exchange in a metallic film by its
position in a dielectric slab

D. V. Anghel, M. Dolineanu, J. Bergli, and I. J. Maasilta Institutul National
de Cercetare-Dezvoltare pentru Fizica si Inginerie Nucleara Horia Hulubei,
077125 Magurele, Ilfov, Romania,
Research Institute of the University of Bucharest (ICUB), 050663 Bucharest,
Romania,
BLTP, JINR, Dubna, Moscow region, 141980, Russia,
<EMAIL_ADDRESS>National de Cercetare-Dezvoltare pentru
Fizica si Inginerie Nucleara Horia Hulubei, 077125 Magurele, Ilfov, Romania,
Doctoral School of Physics, University of Bucharest, Faculty of Physics,
077125 Magurele, Ilfov, Romania<EMAIL_ADDRESS>of
Physics, University of Oslo, PO Box 1048, Blindern, 0316 Oslo, Norway,
<EMAIL_ADDRESS>Center, Department of Physics, University
of Jyvaskyla, FI-40014 Jyväskyä, Finland<EMAIL_ADDRESS>
###### Abstract

We theoretically study the heat flux between electrons and phonons in a thin
metallic film embedded in a suspended dielectric slab (called a membrane, in
accordance with the established nomenclature), forming a layered structure.
The thickness of the membrane is much smaller than the other two dimensions
and, in the considered temperature range, is comparable to the dominant phonon
wavelength. The thickness of the metallic layer is an order of magnitude
smaller than the thickness of the membrane. While the dependence of the heat
exchange on the thicknesses of the film and of the membrane has been studied
before, it is not yet known how this depends on the position of the film
inside the membrane. Here we show that the position strongly influences the
heat exchange. If we denote by $T_{e}$ the effective temperature of the
electrons in the metal and by $T_{ph}$ the effective temperature of the
phonons (assumed to be uniform in the entire system), then we may write in
general the heat power as $P\equiv P^{(0)}(T_{e})-P^{(0)}(T_{ph})$, where
$P^{(0)}(T)\equiv P_{s}^{(0)}(T)+P_{a}^{(0)}(T)$, with $P_{s}^{(0)}(T)$ and
$P_{a}^{(0)}(T)$ being the contributions of the symmetric and antisymmetric
Lamb modes, respectively. In the low temperature limit, we may write
$P_{s}^{(0)}(T)\equiv C_{s}T^{4}$ and $P_{a}^{(0)}(T)\equiv C_{a}T^{3.5}$,
where $C_{s}$ is independent of the position of the film inside the membrane,
whereas $C_{a}$ increases with the distance between the mid-plane of the film
and the mid-plane of the membrane, being zero when the film is at the center
of the membrane. Our examples show that by changing the position of the film
inside the membrane one may change the electron-phonon heat power by orders of
magnitude, depending on the dimensions and the temperature range.

##  1 Introduction

Nanosystems are of great importance for current technological applications.
Therefore, understanding their physical properties is necessary for both basic
science and technology development. One such property is the electron-phonon
coupling and heat exchange in nanoscopic systems consisting of metallic films
in contact with dielectric suspended membranes, since structures like this
appear, for example, in ultrasensitive detectors [1, 2, 3, 4, 5] and
microrefrigerators [2, 6, 7, 8, 9, 10, 11]. At low temperatures, the electron-
phonon heat exchange becomes weak enough that one can consider the electrons
and the acoustic phonons in separate thermal equilibrium, at effective
temperatures $T_{e}$ and $T_{ph}$, respectively. Then, the heat exchange may
be written in general as $P(T_{e},T_{ph})\equiv
P^{(0)}(T_{e})-P^{(1)}(T_{ph})$, but the thermal equilibrium condition
$P(T,T)=0$ implies that $P^{(0)}(T)=P^{(1)}(T)$ is the same function. If the
“exponent” $x\equiv d\ln[P^{(0)}(T)]/dT=d\ln[P^{(1)}(T)]/dT$ is constant on a
wide temperature range (orders of magnitude), then one may use the
approximation $P\propto T_{e}^{x}-T_{ph}^{x}$. For example, in clean three-
dimensional (3D) bulk systems, where the electron mean free path is longer
than the thermally dominant phonon wavelength, $x=5$ [12, 13, 14], whereas for
(clean, non-disordered) two-dimensional (2D) phonons in graphene, $x=4$ [15],
and for a quasi one-dimensional (1D) phonon system $x=3$ [16] (clean limit).
Thus, it would at first seem that$x=s+2$, where $s$ is the dimensionality of
the phonon gas.

However, the above statement in not generally true, as was shown in previous
theoretical studies of the electron-phonon heat exchange in thin quasi-2D
suspended layered nano-structures [18, 19, 20]. In those studies, the
structure consists of a metallic film, of a thickness of the order of 10 nm,
on top of a dielectric membrane, of a thickness of the order of 100 nm. Then,
in the low temperature limit (which, for the parameters mentioned above, is of
the order of 100 mK or below), the heat power flow between electrons and
phonons obeys the simple power law dependence on temperature
$P(T_{e},T_{ph})\propto T_{e}^{3.5}-T_{ph}^{3.5}$ – so, $x=3.5$ and $s=1.5$
[18, 20]. But as the temperature increases, $x$ starts to vary in a wide
range, from 3.5 reaching approximately 4.7 at around 0.5 K [21]. This is close
to the experimentally observed value of $x\sim 4.5$, measured for both SiN/Cu
[22] and SiO2/Au [23] suspended membrane devices.

In contrast to previous work [18, 19, 20, 21] where the metallic film was
located on top of a dielectric membrane, here we study the effect of the
position of the metallic film inside the dielectric membrane on the electron-
phonon heat exchange. We observe that while in the high temperature range
(roughly above 1 K for the parameters used here) the heat exchange is almost
independent of the position of the metallic film, in the low temperature sub-
Kelvin limit the heat power flow decreases as the metal film is placed closer
and closer to the center of the membrane, by up to one order of magnitude at
10 mK. This provides an additional method to control the electron-phonon heat
exchange, which is an important characteristic for the responsivity and noise
of bolometric detectors and the effectiveness of microrefrigerators, without
changing the materials or the thickness of the layers.

The article is organized as follows: in Section 2 we describe the system and
the models used, in Section 3 we present the numerical results, and in Section
4 we draw the conclusions.

##  2 Methods

###  2.1 System description

Figure 1: The structure of the system under study. The suspended slab is
parallel to the $(x,y)$ plane and corresponds to $z\in[-L_{z}/2,L_{z}/2]$. The
metallic layer is colored red and corresponds to $z\in[d_{1},d_{2}]$, where
$-L_{z}/2\leq d_{1}<d_{2}\leq L_{z}/2$. In the $(x,y)$ plane, the system has
the area $A\equiv L_{x}L_{y}$.

The system, of total dimensions $L_{x}\times L_{y}\times L_{z}$, is
schematically represented in Fig. 1 and consists of a metallic layer (red)
embedded within a suspended dielectric slab. We consider that $L_{x},L_{y}\gg
L_{z}$ and $L_{z}$ may be comparable to the dominant phonon wavelength in the
temperature range of interest. The metallic layer has the dimensions
$L_{x}\times L_{y}\times d$, where $d=d_{2}-d_{1}$ is the metal layer
thickness, and $-L_{z}/2\leq d_{1}<d_{2}\leq L_{z}/2$. Although the following
equations are general, we consider in the numerical examples that $L_{z}$ is
100 nm and $d$ is 10 nm, which are dimension scales relevant for real devices.
We assume that the electron mean free path is longer than $d$ [17] and that
the phonon mean free path is longer than $L_{z}$, and assume smooth interfaces
and surfaces without diffusive scattering. In the $x$ and $y$ directions the
electron wavefunction $\psi$ is periodic (free motion), whereas at
$z=d_{1},d_{2}$ we assume Dirichlet boundary conditions ($\psi=0$)–this is a
good approximation for metals which have a tall potential barrier at the
surface so that the electron wavefunction does not extend much outside of the
metallic layer. Then, we can write the electron wavefunction as

$\displaystyle\psi_{{\bf k}_{\parallel},n_{z}}({\bf r},t)$
$\displaystyle\equiv$ $\displaystyle\psi_{{\bf k}_{\parallel},k_{z}}({\bf
r},t)=\phi_{k_{z}}(z)e^{i({\bf k}_{\parallel}{\bf
r}_{\parallel}-\epsilon_{{\bf k}_{\parallel},n}t/\hbar)}/\sqrt{A},\quad{\rm
where}$ $\displaystyle\phi_{k_{z}}(z)$ $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}\sqrt{\frac{2}{d}}\sin\left[\left(z-d_{1}\right)k_{z}\right],&{\rm
if}\quad z\in[d_{1},d_{2}],\\\ 0,&{\rm if}\quad
z\notin[d_{1},d_{2}],\end{array}\right.$ (3)

where ${\bf k}_{\parallel}$ and $k_{z}$ are the wave vector components
parallel and perpendicular to the metal film, respectively. The boundary
conditions quantize the components of the wavevector to $k_{x}=2\pi
n_{x}/L_{x}$, $k_{y}=2\pi n_{y}/L_{y}$, and $k_{z}=\pi n_{z}/L$, where
$n_{x,y}\in{\mathbb{Z}}$ (integer), whereas $n_{z}\in{\mathbb{N}}$ (positive
integer). These quantization conditions induce a constant (but non-isotropic)
density of states (DOS) in the ${\bf k}$ space, namely, $\sigma_{\bf
k}\equiv\sigma_{k_{x}}\sigma_{k_{y}}\sigma_{k_{z}}$, where
$\sigma_{k_{x}}\equiv L_{x}/(2\pi)$, $\sigma_{k_{y}}\equiv L_{y}/(2\pi)$, and
$\sigma_{k_{z}}\equiv d/\pi$. Similarly, we denote $\sigma_{{\bf
k}_{\parallel}}\equiv\sigma_{k_{x}}\sigma_{k_{y}}$ and since
$\sigma_{k_{x}},\sigma_{k_{y}}\gg\sigma_{k_{z}}$, we shall say that the states
of constant $k_{z}$ form quasi-continuous 2D conduction bands, with a band
index $n_{z}$.

If we denote by $m_{e}$ the electron’s effective mass, then its energy is

$\epsilon_{\mathbf{k}}=\frac{\hbar^{2}k^{2}}{2m_{e}}=\frac{\hbar^{2}k_{\parallel}^{2}}{2m_{e}}+\frac{\hbar^{2}k_{z}^{2}}{2m_{e}}\equiv\epsilon_{k_{\parallel},k_{z}}\equiv\epsilon_{k_{\parallel},n_{z}},$
(4)

where $k_{\parallel}\equiv|{\bf k}_{\parallel}|$. The minimum energy in the
band $n_{z}$ is
$\epsilon_{k_{\parallel}=0,n_{z}}=\hbar^{2}k_{z}^{2}/(2m_{e})=(\hbar\pi
n_{z})^{2}/(2m_{e}d^{2})$ and the difference in energy between two consecutive
bands, at the same $k_{\parallel}$, is
$\Delta\epsilon_{k_{\parallel},n_{z}}\equiv\epsilon_{k_{\parallel},n_{z}+1}-\epsilon_{k_{\parallel},n_{z}}=\hbar^{2}\pi^{2}(2n_{z}+1)/(2m_{e}d^{2})$.
We denote the Fermi energy by $\epsilon_{F}$ and define

$n_{F}\equiv\left\lfloor\frac{\sqrt{2m_{e}\epsilon_{F}}}{\pi\hbar}d\right\rfloor,$
(5)

where $\lfloor x\rfloor$ is the biggest integer smaller or equal to $x$. Then,
$\epsilon_{k_{\parallel}=0,n_{z}}\leq\epsilon_{F}$ if and only if $n_{z}\leq
n_{F}$. Therefore, at $T\ll\Delta\epsilon_{k_{\parallel},n_{F}}/k_{B}$
($k_{B}$ is the Boltzmann constant), only the bands of $n_{z}\leq n_{F}$ will
be populated, plus, eventually, the band $n_{z}=n_{F}+1$, if $\epsilon_{F}$ is
close enough to $\epsilon_{0,n_{F}+1}$.

To describe the phonons in our system, we assume that the whole slab (from
$z=-L_{z}/2$ to $L_{z}/2$) may be treated as a homogeneous isotropic elastic
material [18, 19, 20, 21]. Although a real slab would consist of different
materials with differing elastic properties, our simplifying assumption is
accurate enough to emphasize the qualitative features of the electron-phonon
heat exchange we investigate. The phonon modes in slabs have been studied
before [26, 24, 25] and they differ from the phonon modes in bulk materials.
There are three types or polarizations: horizontal shear ($h$), symmetric
($s$), and antisymmetric ($a$) phonon modes (known as Lamb waves) [26]. All
these modes propagate in the direction parallel to the $(x,y)$ plane and are
stationary waves along the $z$ axis.

The $h$ modes are simple transverse horizontal shear modes, with a
displacement field parallel to the $(x,y)$ plane. Their wave vector ${\bf
q}\equiv{\bf q}_{\parallel}+q_{th}\hat{{\bf z}}$ has the components parallel
${\bf q}_{\parallel}\equiv q_{\parallel x}\hat{{\bf x}}+q_{\parallel
y}\hat{{\bf y}}$ and perpendicular to the membrane $q_{th}\hat{{\bf z}}$,
where $q_{\parallel x}=2\pi\nu_{x}/L_{x}$, $q_{\parallel
y}=2\pi\nu_{y}/L_{y}$, and $q_{th}=\pi\nu_{z}/L$ (notice that here $th$
signifies $t=$ transverse and $h=$ horizontal shear). The quantization
conditions $\nu_{x},\nu_{y}=\ldots,-1,0,1,\ldots$, and $\nu_{z}=0,1,\ldots$
are imposed by the periodic boundary conditions in the $\hat{{\bf x}}$ and
$\hat{{\bf y}}$ directions and free boundary conditions in the $\hat{{\bf z}}$
direction [26]. As in the case of electrons, the phonon modes with the same
$\nu_{z}$ and any ${\bf q}_{\parallel}$ form 2D bands [25].

The $s$ and $a$ Lamb modes, in contrast, are a superposition of transverse and
longitudinal waves, with displacement fields oscillating in a plane
perpendicular to the $(x,y)$ plane. Both, the longitudinal and the transverse
partial waves have the same component ${\bf q}_{\parallel}$ of the wave vector
parallel to the $(x,y)$ plane, whereas the components parallel to the $z$
axis, $q_{l}$ and $q_{t}$, respectively, satisfy the equation [26]

$\frac{-4q_{\parallel}^{2}q_{l}q_{t}}{(q_{\parallel}^{2}-q_{t}^{2})^{2}}=\left[\frac{\tan(q_{t}L/2)}{\tan(q_{l}L/2)}\right]^{\pm
1},$ (6a) where the exponents $1$ and $-1$ on the right hand side (r.h.s) of
Eq. (6a) correspond to the symmetric ($s$) and antisymmetric ($a$) modes,
respectively. Equation (6a) relate $q_{l}$ and $q_{t}$ for any $q_{\parallel}$
and for each polarization $s$ and $a$. Another relation that has to be
satisfied [26] for $q_{t}$ and $q_{l}$ is the Snell’s law
$\omega_{q_{\parallel}}=c_{l}\sqrt{q_{l}^{2}+q_{\parallel}^{2}}=c_{t}\sqrt{q_{t}^{2}+q_{\parallel}^{2}},$
(6b)

where $\omega_{q_{\parallel}}$ is the angular frequency-wave vector dispersion
relation of the mode. Solving Eqs (6) we obtain an infinite, countable set of
solutions
$[q_{t,\nu_{z},\sigma}(q_{\parallel}),q_{l,\nu_{z},\sigma}(q_{\parallel})]$,
where $\sigma$ stands for the polarization $s$ or $a$, and
$\nu_{z}=0,1,\ldots$. The components $q_{t,\nu_{z},\sigma}(q_{\parallel})$ and
$q_{l,\nu_{z},\sigma}(q_{\parallel})$ take either real or imaginary values,
but never complex values, with both, real and imaginary components [26]; when
they are imaginary, we use the notation $q_{t,\nu_{z},\sigma}\equiv
ip_{t,\nu_{z},\sigma}$ and $q_{l,\nu_{z},\sigma}\equiv ip_{l,\nu_{z},\sigma}$.

To make the notations uniform, in the following we make use of the doublets
$\xi\equiv(\nu_{z},\sigma)$, where $\nu_{z}=0,1,\ldots$ and $\sigma=h,s,a$.
Then, the displacement fields of all the phonon modes are of the form

${\bf u}_{{\bf q}_{\parallel}\xi}({\bf r},t)\equiv\frac{e^{i({\bf
q}_{\parallel}{\bf r}_{\parallel}-\omega_{q_{\parallel}\xi}t)}}{2\pi}{\bf
w}_{{\bf q}_{\parallel}\xi}(z).$ (7)

The $z$ dependence of the displacement field of the phonon modes ${\bf
w}_{{\bf q}_{\parallel}\xi}(z)$ are normalized and explicitly given, for
example, in Refs. [25, 21].

###  2.2 Electron-phonon interaction Hamiltonian

For the electron-phonon interaction we use the deformation potential model
[27]

$\hat{H}_{\rm
def}=E_{a}\int_{V_{el}}d^{3}\mathbf{r}\,\hat{\Psi}^{\dagger}(\mathbf{r})\hat{\Psi}(\mathbf{r})\nabla\cdot\hat{{\bf
u}}(\mathbf{r}).$ (8)

where $\nabla\cdot\hat{{\bf u}}(\mathbf{r})$ is the dilatation field operator,
$V_{el}=A\times d$ is the volume of the metallic layer, $E_{a}$ is a constant,
usually taken as $E_{a}=(2/3)\epsilon_{F}$ [27, 18, 20, 21], whereas the
electron field annihilation and creation operators are

$\hat{\Psi}(\mathbf{r},t)=\sum_{{\bf k}_{\parallel},k_{z}}\psi_{{\bf
k}_{\parallel},k_{z}}({\bf r},t)\hat{c}_{{\bf k}_{\parallel},k_{z}}\quad{\rm
and}\quad\hat{\Psi}^{\dagger}(\mathbf{r},t)=\sum_{\mathbf{k}_{\parallel},k_{z}}\psi_{{\bf
k}_{\parallel},k_{z}}^{*}({\bf
r},t)\hat{c}_{\mathbf{k}_{\parallel},k_{z}}^{\dagger},$ (9)

respectively. The operators $\hat{c}_{\mathbf{k}_{\parallel},k_{z}}$ and
$\hat{c}_{{\bf k}_{\parallel},k_{z}}^{{\dagger}}$ are the electron $k$-space
annihilation and creation operators on the state $\psi_{{\bf
k}_{\parallel},k_{z}}$. From Eq. (7) we write the phonon field operator

$\displaystyle\hat{{\bf u}}({\bf r})$ $\displaystyle=$
$\displaystyle\sum_{\xi,{\bf
q}_{\parallel}}\sqrt{\frac{\hbar}{2\rho\omega_{{\bf
q}_{\parallel}\xi}}}e^{i({\bf q}_{\parallel}{\bf r}_{\parallel}-i\omega_{{\bf
q}_{\parallel}\xi}t)}\left[\hat{a}_{{\bf q}_{\parallel}\xi}{\bf w}_{{\bf
q}_{\parallel}\xi}(z)+\hat{a}_{-{\bf q}_{\parallel}\xi}^{{\dagger}}{\bf
w}^{*}_{{\bf q}_{\parallel}\xi}(z)\right],$ (10)

where $\hat{a}_{{\bf q}_{\parallel}\xi}^{{\dagger}}$ and $\hat{a}_{{\bf
q}_{\parallel}\xi}$ are the phonon creation and annihilation operators,
respectively.

###  2.3 Electron-phonon heat flow

We follow the prescription of Ref. [21] to calculate the electron-phonon heat
power flow. We apply the Fermi golden rule to obtain from Eq. (8) the
transition rate $\Gamma_{i\to f}=(2\pi/\hbar)|\langle f|\hat{H}_{\rm
def}|i\rangle|^{2}\delta(E_{f}-E_{i})$ between the initial ($i$) and final
($f$) state, of energies $E_{i}$ and $E_{f}$. Using the transition rates and
assuming Fermi and Bose distributions of the electrons and phonons,
respectively, we calculate the heat power flow, which may be written as (Eqs.
17 of Ref. [21])

$\displaystyle P(T_{e},T_{ph})$ $\displaystyle\equiv$ $\displaystyle
P^{(0)}(T_{e})-P^{(1)}(T_{e},T_{ph})$ (11a) $\displaystyle P^{(0)}(T_{e})$
$\displaystyle\equiv$ $\displaystyle P^{(0)}_{s}(T_{e})+P^{(0)}_{a}(T_{e}),$
(11b) $\displaystyle P^{(1)}(T_{e},T_{ph})$ $\displaystyle\equiv$
$\displaystyle P^{(1)}_{s}(T_{e},T_{ph})+P^{(1)}_{a}(T_{e},T_{ph}),$ (11c)
$\displaystyle P^{(0)}_{\alpha}(T_{e})$ $\displaystyle\equiv$
$\displaystyle\frac{4\pi}{\hbar}\sum_{{\bf k}_{\parallel}{\bf
k}_{\parallel}^{\prime},n,n^{\prime}}^{{\bf
q}_{\parallel},\nu}\hbar\omega_{{\bf q}_{\parallel},\alpha,\nu}|g_{{\bf
q}_{\parallel},\alpha,\nu}^{n^{\prime},n}|^{2}[f(\beta_{e}\epsilon_{\mathbf{k}_{\parallel}-\mathbf{q}_{\parallel},n^{\prime}})-f(\beta_{e}\epsilon_{k_{\parallel},n})]n(\beta_{e}\epsilon_{q_{\parallel},\nu}),$
(11d) $\displaystyle P^{(1)}_{\alpha}(T_{e},T_{ph})$ $\displaystyle\equiv$
$\displaystyle\frac{4\pi}{\hbar}\sum_{{\bf k}_{\parallel}{\bf
k}_{\parallel}^{\prime},n,n^{\prime}}^{{\bf
q}_{\parallel},\nu}\hbar\omega_{{\bf q}_{\parallel},\alpha,\nu}|g_{{\bf
q}_{\parallel},\alpha,\nu}^{n^{\prime},n}|^{2}[f(\beta_{e}\epsilon_{\mathbf{k}_{\parallel}-\mathbf{q}_{\parallel},n^{\prime}})-f(\beta_{e}\epsilon_{k_{\parallel},n})]n(\beta_{ph}\epsilon_{q_{\parallel},\nu}),$
(11e)

where $\beta_{e}=1/(k_{B}T_{e})$, $\beta_{ph}=1/(k_{B}T_{ph})$, $T_{e}$ is the
electron temperature, $T_{ph}$ is the phonon temperature, $k_{B}$ is Boltzmann
constant, $P^{(0)}_{\alpha}$ and $P^{(1)}_{\alpha}$ are the contributions of
the $\alpha$ modes, where $\alpha=s,a$ is the polarization. Purely transverse
waves do not contribute to the electron-phonon heat exchange in our model, so
the $h$ modes do not contribute to $P$ in Eq. (11a). Note also that the terms
$P^{(0)}(T_{e})$ and $P^{(1)}(T_{e},T_{ph})$ are not the heat powers from
electrons to phonons and from phonons to electrons, respectively, since some
terms, which cancel out are not explicitly written in Eq. (11a). Furthermore,
$\omega_{{\bf q}_{\parallel},\alpha,\nu}$ are given by Eq. (6b), with
$q_{l,\nu_{z},\sigma}(q_{\parallel})$ and
$q_{t,\nu_{z},\sigma}(q_{\parallel})$ being the solutions of Eqs. (6). In Eqs.
(11), we also used the notation for the coupling constant

$\displaystyle g_{{\bf q}_{\parallel},\xi}^{n^{\prime},n}$ $\displaystyle=$
$\displaystyle E_{a}N_{q_{\parallel},\xi}\sqrt{\frac{\hbar}{2\rho\omega_{{\bf
q}_{\parallel},\xi}}}\int_{d_{1}}^{d_{2}}\phi_{n^{\prime}}^{*}(z)\phi_{n}(z)\left[i{\bf
q}_{\parallel}\cdot{\bf w}_{{\bf q}_{\parallel},\xi}(z)+\frac{dw_{{\bf
q}_{\parallel},\xi,z}(z)}{dz}\right]dz,$ (12)

where $w_{{\bf q}_{\parallel},\xi,z}$ is the component of ${\bf w}_{{\bf
q}_{\parallel},\xi}$ along the $z$ axis, and the normalization constants are

$\displaystyle\frac{1}{N_{q_{\parallel},s,\nu}^{2}}$ $\displaystyle=$
$\displaystyle
A\left\\{4|q_{t}|^{2}q_{\parallel}^{2}\left|\cos\left(\frac{q_{t}L}{2}\right)\right|^{2}\left[\left(|q_{l}|^{2}+q_{\parallel}^{2}\right)\frac{\sinh(p_{l}L)}{2p_{l}}-\left(|q_{l}|^{2}-q_{\parallel}^{2}\right)\frac{\sin(\bar{q}_{l}L)}{2\bar{q}_{l}}\right]\right.$
(13a)
$\displaystyle+\left|q_{t}^{2}-q_{\parallel}^{2}\right|^{2}\left|\cos\left(\frac{q_{l}L}{2}\right)\right|\bigg{[}\left(|q_{t}|^{2}+q_{\parallel}^{2}\right)\frac{\sinh(p_{t}L)}{2p_{t}}+(|q_{t}|^{2}-q_{\parallel}^{2})\frac{\sin(\bar{q}_{t}L)}{2\bar{q}_{t}}\bigg{]}$
$\displaystyle\left.-4q_{\parallel}^{2}\left|\cos\left(\frac{q_{l}L}{2}\right)\right|^{2}\left[p_{t}(|q_{t}|^{2}+k_{\parallel}^{2})\sinh(p_{t}L)-\bar{q}_{t}(|q_{t}|^{2}-q_{\parallel}^{2})\sin(\bar{q}_{t}L)\right]\right\\},$
$\displaystyle\frac{1}{N_{q_{\parallel},a,\nu}^{2}}$ $\displaystyle=$
$\displaystyle
A\bigg{\\{}4|q_{t}|^{2}q_{\parallel}^{2}\left|\sin\left(\frac{q_{t}L}{2}\right)\right|^{2}\bigg{[}(|q_{l}|^{2}+q_{\parallel}^{2})\frac{\sinh(p_{l}L)}{2p_{l}}+(|q_{l}|^{2}-q_{\parallel}^{2})\frac{\sin(\bar{q}_{l}L)}{2\bar{q}_{l}}\bigg{]}$
(13b)
$\displaystyle+|q_{t}^{2}-q_{\parallel}^{2}|^{2}\left|\sin\left(\frac{q_{l}L}{2}\right)\right|^{2}\bigg{[}(|q_{t}|^{2}+q_{\parallel}^{2})\frac{\sinh(p_{t}L)}{2p_{t}}-(|q_{t}|^{2}-q_{\parallel}^{2})\frac{\sin(\bar{q}_{t}L)}{2\bar{q}_{t}}\bigg{]}$
$\displaystyle-4q_{\parallel}^{2}\left|\sin\left(\frac{q_{l}L}{2}\right)\right|^{2}\left[p_{t}(|q_{t}|^{2}+q_{\parallel}^{2})\sinh(p_{t}L)+\bar{q}_{t}(|q_{t}|^{2}-q_{\parallel}^{2})\sin(\bar{q}_{t}L)\right]\bigg{\\}}.$

In Eqs. (13) $\bar{q}_{t}$ and $\bar{q}_{l}$ are the real and parts of $q_{t}$
and $q_{l}$, respectively. Since $q_{l}$ and $q_{t}$ may be either real or
imaginary, the expressions (13) should be interpreted as a limit, when the
redundant component goes to zero: $\lim_{p_{t/l}\to
0}\sinh(p_{t/l}L)/(2p_{t/l})=L/2$ and $\lim_{\bar{q}_{t/l}\to
0}\sin(\bar{q}_{t/l}L)/(2\bar{q}_{t/l})=L/2$. Combining Eqs. (11), (12) and
(13) we obtain (see, for example, [21])

$\displaystyle P_{s}^{(0)}$ $\displaystyle=$
$\displaystyle\frac{4A}{\pi^{2}L}\frac{E_{a}^{2}}{\rho
c_{l}^{4}}\frac{2m}{\hbar^{2}}\sum_{n}\sum_{n^{\prime}}\sum_{\nu}\int_{0}^{\infty}dx_{\parallel}\,x_{\parallel}\frac{I_{s,\nu}^{(0)}(x_{\parallel})}{2x_{\parallel}}n(\beta_{e}\hbar\omega_{s,\nu,q_{\parallel}})I_{P},$
(14a) $\displaystyle P_{a}^{(0)}$ $\displaystyle=$
$\displaystyle\frac{4A}{\pi^{2}L}\frac{E_{a}^{2}}{\rho
c_{l}^{4}}\frac{2m}{\hbar^{2}}\sum_{n}\sum_{n^{\prime}}\sum_{\nu}\int_{0}^{\infty}dx_{\parallel}\,x_{\parallel}\frac{I_{a,\nu}^{(0)}(x_{\parallel})}{2x_{\parallel}}n(\beta_{e}\hbar\omega_{a,\nu,q_{\parallel}})I_{P},$
(14b)

where we use the dimensionless notations
$y_{\parallel}\equiv(L/2)k_{\parallel}$,
$x_{\parallel}\equiv(L/2)q_{\parallel}$, $x_{l,\xi}\equiv
x_{l,\xi}(q_{\parallel})\equiv q_{l,\xi}(q_{\parallel})(L/2)$,
$x_{t,\xi}\equiv x_{t,\xi}(q_{\parallel})\equiv
q_{t,\xi}(q_{\parallel})(L/2)$,
$\bar{x}_{l,\xi}\equiv\bar{x}_{l,\xi}(q_{\parallel})\equiv\bar{q}_{l,\xi}(q_{\parallel})(L/2)$,
$\bar{x}_{t,\xi}\equiv\bar{x}_{t,\xi}(q_{\parallel})\equiv\bar{q}_{t,\xi}(q_{\parallel})(L/2)$,
$\chi_{l,\xi}\equiv\chi_{l,\xi}(q_{\parallel})\equiv
p_{l,\xi}(q_{\parallel})(L/2)$,
$\chi_{t,\xi}\equiv\chi_{t,\xi}(q_{\parallel})\equiv
p_{t,\xi}(q_{\parallel})(L/2)$,
$z_{\parallel}\equiv\beta_{e}(\hbar^{2}/2m)(2/L)^{2}y_{\parallel}^{2}$,
$z_{1}\equiv\beta_{e}(\hbar^{2}/2m)(n\pi/L)^{2}$, $z_{\rm
min}\equiv\beta_{e}(\hbar^{2}/2m)(2/L)^{2}y_{\rm min}^{2}$,
$z_{ph}\equiv\beta_{e}\hbar\omega_{\xi,q_{\parallel}}$, and
$z_{\epsilon_{F}}\equiv\beta_{e}{\epsilon_{F}}$, and

$\displaystyle y_{\rm min}$ $\displaystyle\equiv$
$\displaystyle\frac{L}{4q_{\parallel}}\left|\frac{2m}{\hbar^{2}}\hbar\omega_{\xi,q_{\parallel}}+q_{\parallel}^{2}+\left({n^{\prime}}^{2}-n^{2}\right)\left(\frac{\pi}{L}\right)^{2}\right|.$
(15)

In Eqs. (14) we have the integral

$I_{P}=\frac{1}{2}\sqrt{k_{B}T\frac{2m}{\hbar^{2}}}\frac{L}{2}\int_{0}^{\infty}\frac{dz^{\prime}_{\parallel}}{\sqrt{z^{\prime}_{\parallel}}}\left\\{\frac{1}{e^{z^{\prime}_{\parallel}-(z_{\epsilon_{F}}+z_{ph}-z_{1}-z_{\rm
min})}+1}-\frac{1}{e^{z^{\prime}_{\parallel}-(z_{\epsilon_{F}}-z_{1}-z_{\rm
min})}+1}\right\\}$ (16a) and the notations $\displaystyle
I_{s,\nu}^{(0)}(x_{\parallel})$ $\displaystyle=$
$\displaystyle\sum_{n}\sum_{n^{\prime}}|x_{t}|^{2}x_{\parallel}^{2}|\cos(x_{t})|^{2}|G_{s,\nu,q_{\parallel}}(n,n^{\prime})|^{2}\hbar\omega_{s,\nu,q_{\parallel}}^{4}$
(16b)
$\displaystyle\times\left\\{4|x_{t}|^{2}x_{\parallel}^{2}|\cos(x_{t})|^{2}\left[(|x_{l}|^{2}+x_{\parallel}^{2})\frac{\sinh(2\chi_{l})}{2\chi_{l}}+(x_{\parallel}^{2}-|x_{l}|^{2})\frac{\sin(2\bar{x}_{l})}{2\bar{x}_{l}}\right]\right.$
$\displaystyle+|x_{\parallel}^{2}-x_{t}^{2}|^{2}|\cos(x_{l})|^{2}\left[(|x_{t}|^{2}+x_{\parallel}^{2})\frac{\sinh(2\chi_{t})}{2\chi_{t}}-(x_{\parallel}^{2}-|x_{t}|^{2})\frac{\sin(2\bar{x}_{t})}{2\bar{x}_{t}}\right]$
$\displaystyle\left.-4x_{\parallel}^{2}|\cos(x_{l})|^{2}\left[\chi_{t}(|x_{t}|^{2}+x_{\parallel}^{2})\sinh(2\chi_{t})+x_{t}(x_{\parallel}^{2}-|x_{t}|^{2})\sin(2\bar{x}_{t})\right]\right\\}^{-1},$
$\displaystyle I_{a,\nu}^{(0)}(x_{\parallel})$ $\displaystyle=$
$\displaystyle\sum_{n}\sum_{n^{\prime}}|x_{t}|^{2}x_{\parallel}^{3}|\sin(x_{t})|^{2}|G_{a,\nu,q_{\parallel}}(n,n^{\prime})|^{2}\hbar\omega^{4}_{a,\nu,q_{\parallel}}$
(16c)
$\displaystyle\times\left\\{4|x_{t}|^{2}x_{\parallel}^{2}|\sin(x_{t})|^{2}\left((|x_{l}|^{2}+q_{\parallel}^{2})\frac{\sinh(2\chi_{l})}{2\chi_{l}}+(|x_{l}|^{2}-x_{\parallel}^{2})\frac{\sin(2\bar{x}_{l})}{2\bar{x}_{l}}\right)\right.$
$\displaystyle+|x_{t}^{2}-x_{\parallel}^{2}|^{2}|\sin(x_{l})|^{2}\left((|x_{t}|^{2}+x_{\parallel}^{2})\frac{\sinh(2\chi_{t})}{2\chi_{t}}-(|x_{t}|^{2}-x_{\parallel}^{2})\frac{\sin(2\bar{x}_{t})}{2\bar{x}_{t}}\right)$
$\displaystyle-4x_{\parallel}^{2}|\sin(x_{l})|^{2}\left(\chi_{t}(|x_{t}|^{2}+x_{\parallel}^{2})\sinh(2\chi_{t})+\bar{x}_{t}(|x_{t}|^{2}-x_{\parallel}^{2})\sin(2\bar{x}_{t})\right)\left.\vphantom{\frac{1}{2}}\right\\}^{-1},$

with

$\displaystyle G_{q_{\parallel},s,\nu}(n,n^{\prime})$ $\displaystyle=$
$\displaystyle\frac{2}{d}\int^{d_{2}}_{d_{1}}dz\sin\left[\left(z-d_{1}\right)\frac{n\pi}{d}\right]\sin\left[\left(z-d_{1}\right)\frac{n^{\prime}\pi}{d}\right]\cos[{q}_{l,s,\nu}(q_{\parallel})z],$
(17a) $\displaystyle=$
$\displaystyle-\frac{8{\pi}^{2}n_{1}n_{2}x_{l}}{\left[\pi^{2}(n_{1}-n_{2})^{2}\left(\frac{L}{d_{2}-d_{1}}\right)^{2}-4x_{l}^{2}\right]\left[\pi^{2}(n_{1}+n_{2})^{2}\left(\frac{L}{d_{2}-d_{1}}\right)^{2}-4x_{l}^{2}\right]}$
$\displaystyle\times\left[(-1)^{n_{1}+n_{2}}\sin\left(\frac{2x_{l}d_{2}}{L}\right)-\sin\left({\frac{2x_{l}d_{1}}{L}}\right)\right]\left(\frac{L}{d_{2}-d_{1}}\right)^{3}$
$\displaystyle G_{q_{\parallel},a,\nu}(n,n^{\prime})$ $\displaystyle=$
$\displaystyle\frac{2}{d}\int^{d_{2}}_{d_{1}}dz\sin\left[\left(z-d_{1}\right)\frac{n\pi}{d}\right]\sin\left[\left(z-d_{1}\right)\frac{n^{\prime}\pi}{d}\right]\sin[{q}_{l,a,\nu}(q_{\parallel})z].$
(17b) $\displaystyle=$
$\displaystyle\frac{8{\pi}^{2}n_{1}n_{2}x_{l}}{\left[\pi^{2}(n_{1}-n_{2})^{2}\left(\frac{L}{d_{2}-d_{1}}\right)^{2}-4x_{l}^{2}\right]\left[\pi^{2}(n_{1}+n_{2})^{2}\left(\frac{L}{d_{2}-d_{1}}\right)^{2}-4x_{l}^{2}\right]}$
$\displaystyle\times\left[(-1)^{n_{1}+n_{2}}\cos\left(2\frac{x_{l}d_{2}}{L}\right)-\cos\left(2\frac{x_{l}d_{1}}{L}\right)\right]\left(\frac{L}{d_{2}-d_{1}}\right)^{3}$

In general, $z_{\epsilon_{F}}-z_{1}-z_{\rm min}\gg 1$ [18, 20, 21], so we can
use the approximation (see the Appendix of Ref. [20])

$\displaystyle I_{P}$ $\displaystyle\approx$
$\displaystyle\frac{1}{2}\sqrt{k_{B}T_{e}\frac{2m}{\hbar^{2}}}\frac{L}{2}\frac{z_{ph}}{\sqrt{z_{\epsilon_{F}}-z_{1}-z_{\rm
min}}}=\sqrt{\frac{2m}{\hbar^{2}}}\frac{L}{4}\frac{\hbar\omega_{\xi,q_{\parallel}}}{\sqrt{{\epsilon_{F}}-\frac{\hbar^{2}}{2m}\left(\frac{2}{L}\right)^{2}\left[\left(\frac{n\pi}{2}\right)^{2}-y_{\rm
min}^{2}\right]}}$ (18)

and observe that $I_{P}$ does not depend on temperature. In such a case, the
only temperature dependence in the expressions (14) is in the phonon
populations $n(\beta_{e}\hbar\omega_{\sigma,\nu,q_{\parallel}})$.

The term $P^{(1)}$ may be calculated similarly as $P^{(0)}$, but replacing
$T_{e}$ by $T_{ph}$ in the phonon populations
$n(\beta_{ph}\epsilon_{q_{\parallel},\nu})$ of Eq. (11e), as shown in detail
in Refs. [18, 20, 21]. Therefore, in the limit $z_{\epsilon_{F}}-z_{1}-z_{\rm
min}\gg 1$, $P^{(1)}_{\alpha}(T_{e},T_{ph})$ remains only a function of
$T_{ph}$, in such a way that we may write in general

$P^{(1)}_{s}(T)=P^{(0)}_{s}(T),\quad P^{(1)}_{a}(T)=P^{(0)}_{a}(T),\quad{\rm
so}\quad P^{(1)}(T)=P^{(0)}(T).$ (19)

Notice that these simplifications are valid only outside the very narrow crest
regions, as they are defined in [18, 20, 21]. Therefore, in the region of
applicability of Eq. (19), Eq. (11a) simplifies to

$P(T_{e},T_{ph})=P^{(0)}(T_{e})-P^{(0)}(T_{ph}).$ (20)

In the low temperature limit, only the lowest phonon band is populated and the
expressions (17) are simplified to

$\displaystyle G_{q_{\parallel},s,\nu}(n,n^{\prime})$ $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}1,&{\rm if}\quad n-n^{\prime}=0,\\\
4\chi_{l}^{2}\frac{(d_{2}-d_{1})^{2}}{\pi^{2}L^{2}}\bigg{\\{}\frac{1}{(n-n^{\prime})^{2}}-\frac{1}{(n+n^{\prime})^{2}}\bigg{\\}},&{\rm
if}\quad n-n^{\prime}=2k,\\\
-\frac{4\chi_{l}^{2}(d_{1}+d_{2})(d_{2}-d_{1})}{\pi^{2}L^{2}}\bigg{\\{}\frac{1}{(n-n^{\prime})^{2}}-\frac{1}{(n+n^{\prime})^{2}}\bigg{\\}},&{\rm
if}\quad n-n^{\prime}=2k+1,\end{array}\right.$ (21d) $\displaystyle
G_{q_{\parallel},a,\nu}(n,n^{\prime})$ $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}i\chi_{l}\frac{d_{2}+d_{1}}{L},&{\rm
if}\quad n-n^{\prime}=0,\\\
\frac{4}{\pi^{2}}i\chi_{l}^{3}\frac{(d_{2}+d_{1})(d_{2}-d_{1})^{2}}{L^{3}}\bigg{\\{}\frac{1}{(n-n^{\prime})^{2}}-\frac{1}{(n+n^{\prime})^{2}}\bigg{\\}},&{\rm
if}\quad n-n=2k,\\\
-\frac{4}{\pi^{2}}i\chi_{l}\frac{d_{2}-d_{1}}{L}\bigg{\\{}\frac{1}{(n-n^{\prime})^{2}}-\frac{1}{(n+n^{\prime})^{2}}\bigg{\\}},&{\rm
if}\quad n-n^{\prime}=2k+1.\end{array}\right.$ (21h)

The main contribution to the heat power flow (especially in the low
temperature limit) comes from the cases $n=n^{\prime}$, since in the other
cases the heat exchange involve phonons of very high energy (for a typical 10
nm thick Cu metallic film, the lowest energy difference between two bands is
$\Delta\epsilon_{k_{\parallel}=0,n_{z}=1}\approx 131$ K [20]).

From Eq. (21d) we observe that in the low temperature limit
$G_{q_{\parallel},s,\nu}(n,n)$, and therefore $P_{s}^{(0)}$, is independent of
the position of the metallic layer in the dielectric membrane. On the other
hand, from Eq. (17b) we notice that $G_{q_{\parallel},a,\nu}(n,n)=0$ for
$d_{1}=-d_{2}$ (when the metallic film is in the middle of the membrane).

##  3 Results

Let us consider a 10 nm thick Cu film at an arbitrary location inside a 100 nm
thick suspended SiNx dielectric slab. The density of SiNx is 3290 kg/m3,
whereas the longitudinal and transversal sound velocities are 10300 m/s and
6200 m/s, respectively. The Fermi energy in Cu is 7 eV and the 10 nm thick Cu
film is outside the crest region [18, 20, 21], so we can use the expression
(18) for $I_{P}$. In the temperature range of interest (from 10 mK to 10 K) we
can use only the terms $n=n^{\prime}$ in the summations (16b) and (16c). In
Fig. 2 we plot $P_{s}^{(0)}$, $P_{a}^{(0)}$, and
$P^{(0)}=P_{s}^{(0)}+P_{a}^{(0)}$ as functions of $T$, for different positions
of the Cu film in the membrane, specified by $(d_{1}+d_{2})/2$. We notice that
in the low temperature range (say, around 100 mK and below) $P_{s}^{(0)}$ is
practically independent of the position of the film, confirming Eq. (21d),
whereas $P_{a}^{(0)}$ strongly depends on it in the whole temperature range
investigated, giving no contribution when the film is exactly in the middle,
$P_{a}^{(0)}=0$ at $d_{1}=-d_{2}$. This can be seen more clearly in Fig. 3,
where we plot $P_{s}^{(0)}$, $P_{a}^{(0)}$, and $P^{(0)}$ as functions of the
Cu film position $(d_{1}+d_{2})/2$ at three different temperatures: $T=0.01$
K, $T=0.1$ K, and $T=10$ K. We notice that in the sub-K temperature range,
there is a crossover from the symmetric-mode domination for close-to-central
metal film locations, to the antisymmetric-mode domination in the opposite
limit.

Figure 2: The heat power flow density between electrons and phonons: (a) the
contribution of the symmetric Lamb-modes, (b) the contribution of the
antisymmetric Lamb-modes, and (c) the total power density. The materials
considered are SiN and Cu, and the system dimensions are $L=100$ nm and
$d=d_{2}-d_{1}=10$ nm. The legends indicate the position of the middle of the
metallic film, $(d_{1}+d_{2})/2$.

Figure 3: The heat power flow density between electrons and phonons as a
function of the position of the metallic Cu film (10 nm thick) inside the
dielectric SiN membrane (100 nm thick), for three temperatures:
$T=0.01,0.1,10$ K; magenta line = total, black line = $s$-mode, blue line =
$a$-mode contribution.

As it was noticed also in Refs. [18, 20, 21], in the low temperature limit,
$P_{s}^{(0)}$ decreases faster than $P_{a}^{(0)}$ with decreasing temperature,
so, for any $d_{1}+d_{2}\neq 0$, there is a crossover temperature
$T_{c}(d_{1}+d_{2})$, such that $P_{s}^{(0)}<P_{a}^{(0)}$ for
$T<T_{c}(d_{1}+d_{2})$. Therefore, at low enough temperatures, the heat power
exchanged by the electrons with the antisymmetric phonons dominates the heat
power exchanged with the symmetric phonons at any $|d_{1}+d_{2}|/2>0$. Due to
this variation of $P^{(0)}_{a}$ with the position of the metallic film, at
$T=10$ mK the total heat exchange power $P^{(0)}$ decreases by as much as an
order of magnitude when moving the metallic film from the surface of the slab
to the middle of it.

In addition, in Fig. 4 we plot the exponent of the temperature dependence for
the different components of the heat power flow, defined as

$x_{s}\equiv\frac{\partial\ln P_{s}^{(0)}(T)}{\partial\ln T},\qquad
x_{a}\equiv\frac{\partial\ln P_{a}^{(0)}(T)}{\partial\ln T},\qquad{\rm
and}\qquad x\equiv\frac{\partial\ln P^{(0)}(T)}{\partial\ln T}.$ (22)

One can show that [18, 20, 21]

$\lim_{T\to 0}x_{s}=4\quad{\rm and}\quad\lim_{T\to 0}x_{a}=3.5,$ (23)

so, at low enough temperatures $x_{s}>x_{a}$, as mentioned above.

Figure 4: The exponents of the temperature dependence of the heat power flows,
Eq. 22, between electrons and (a) symmetric Lamb-modes, (b) antisymmetric
Lamb-modes, and (c) symmetric plus antisymmetric Lamb-modes. The system’s
dimensions are $L=100$ nm (the SiNx membrane) and $d=d_{2}-d_{1}=10$ nm (the
Cu film placed inside the membrane). The legends indicate the distance between
the middle of the metallic Cu film, $(d_{1}+d_{2})/2$, and the middle plane of
the membrane

.

At higher temperatures, the exponents $x_{s}$, $x_{a}$ and $x$ have a non-
monotonous temperature dependence and do not reach the 3D limit $x=5$ even at
$T=10$ K, although the phonon 2D-3D crossover temperature for a 100 nm slab is
$T_{C}\approx 240$ mK [24, 21]. This is due to the fact that although the
phonon gas in the 100 nm thick slab is quasi-3D at 10 K, the energy of an
average phonon is much smaller than the energy difference between the 2D
electronic bands, so in this temperature range the electrons are still
scattered only within the same band, $n=n^{\prime}$. Therefore, the higher
temperature range corresponds here to the heat power exchange between a
collection of 2D electron gases, with $n\leq n_{F}$, and a 3D phonon gas. In
this case, the exponent $x$ approaches four, satisfying the ansatz $x=s+2$,
but with $s$ being the smaller dimensionality of the two subsystems–in our
case, $s=2$ is the dimensionality of the electron subsystem.

##  4 Conclusions

We studied the heat exchange between electrons and phonons in a suspended
geometry, where a Cu film of thickness $d=10$ nm is placed inside a dielectric
SiNx membrane of thickness $L=100$ nm, forming a layered structure. We focused
on investigating on how the location of the metal film influences the power
flow, and found that at low temperatures it can change significantly – at 10
mK it changes by an order of magnitude. At sub-Kelvin temperatures, this metal
film location dependence arises only from the coupling to the antisymmetric
Lamb phonon modes of the membrane, whereas the symmetric Lamb-modes give a
constant, location independent contribution. Moreover, the contribution of the
antisymmetric modes goes to zero, if the metal film is placed at the center of
the membrane. The physical reason for this is that–by definition–the
displacement field in the antisymmetric Lamb-modes is zero in the middle plane
of the membrane.

In the low temperature limit, the temperature dependence of the symmetric mode
contribution is $P^{(0)}_{s}\propto T^{4}$, whereas for the antisymmetric
mode, $P^{(0)}_{a}\propto T^{3.5}$. Therefore, if the metal film is not close
to the center of the membrane, at low enough temperatures $P_{a}$ prevails
over $P_{s}$ and the total heat power flux has the simple temperature
dependence $P(T_{e},T_{ph})\propto T_{e}^{3.5}-T_{ph}^{3.5}$. In the opposite
case, the symmetric mode dominates and $P(T_{e},T_{ph})\propto
T_{e}^{4}-T_{ph}^{4}$. A consequence of this is that electrons and phonons can
be much more efficiently decoupled at low temperatures by placing the metallic
film in the center of the membrane. This may also help considerably for
electron cooling and noise reduction in ultrasensitive nanosensors.

In a wider temperature range, the exponent $x$ of the temperature dependence
has a complicated, non-monotonous dependence on the temperature and on the
metal film location. For the antisymmetric mode, it varies from $\sim 3.5$ to
$\sim 7$, whereas for the symmetric mode, it varies from from $\sim 4$ to
$\sim 5.7$. The bulk 3D limit, corresponding to $x=5$, was not achieved even
at $T=10$ K, due to the high energy difference between the 2D electronic
bands, but instead, the limit of $x=4$ is approached at $T=10$ K.

##  5 Acknowledgments

D.V.A. and M.D. acknowledge financial support by the Ministry of Education,
UEFISCDI projects PN23210101 and PN23210204. I.J.M. acknowledges support by
the Academy of Finland project number 341823.

## References

  * [1] Cryogenic Particle Detection, edited by Ch. Enss (Springer,New York, 2005).
  * [2] F. Giazotto, T. T. Heikkilä, A. Luukanen, A. M. Savin, and J. P. Pekola.  Opportunities for mesoscopics in thermometry and refrigeration: Physics and applications.  Rev. Mod. Phys., 78:217, 2006.
  * [3] P. J. de Visser, S. A..H. de Rooij, V. Murugesan, D. J. Thoen and J. J. A. Baselmans.  Phonon-Trapping-Enhanced Energy Resolution in Superconducting Single-Photon Detectors.  Phys. Rev. Appl., 16:034051, 2021.
  * [4] O. Quaranta, T. W. Cecil, L. Gades, B. Mazin and A. Miceli  X-ray photon detection using superconducting resonators in thermal quasi-equilibrium.  Supercond. Sci. Technol., 26:105021, 2013.
  * [5] D. V. Anghel, A. Luukanen, and J. P. Pekola.  Performance of cryogenic microbolometers and calorimeters with on-chip coolers.  Appl. Phys. Lett., 78:556, 2001.
  * [6] J. T Muhonen, M. Meschke, and J. P Pekola.  Micrometre-scale refrigerators.  Rep. Progr. Phys., 75:046501, 2012.
  * [7] M. M. Leivo, A. J. Manninen, and J. P. Pekola.  Microrefrigeration by normal-metal/insulator/superconductor tunnel junctions.  Appl. Supercond., 5:227, 1997.
  * [8] A. J. Manninen, M. M. Leivo, and J. P. Pekola.  Refrigeration of a dielectric membrane by superconductor/insulator/normal-metal/insulator/superconductor tunneling.  Appl. Phys. Lett., 70:1885, 1997.
  * [9] N. A. Miller, G. C. O’Neil, J. A. Beall, G. C. Hilton, K. D. Irwin, D. R. Schmidt, L. R. Vale, and J. N. Ullom.  High resolution X-ray transition-edge sensor cooled by tunnel junction refrigerators.  Appl. Phys. Lett., 92:163501, 2008.
  * [10] N. Vercruyssen, R. Barends, T. M. Klapwijk, J. T. Muhonen, M. Meschke, and J. P. Pekola.  Substrate-dependent quasiparticle recombination time in superconducting resonators.  Appl. Phys. Lett. 99:062509, 2011.
  * [11] H. Q. Nguyen, M. Meschke, and J. P. Pekola.  A robust platform cooled by superconducting electronic refrigerators.  Appl. Phys. Lett. 106:012601, 2015.
  * [12] M. I. Kaganov, I. M. Lifshitz, and L. V. Tanatarov.  Relaxation between electrons and the crystalline lattice.  Sov. Phys. JETP, 4:173, 1957.
  * [13] P. B. Allen.  Theory of thermal relaxation of electrons in metals.  Phys. Rev. Lett., 59:1460, 1987.
  * [14] F. C. Wellstood, C. Urbina, and J. Clarke.  Hot-electron effects in metals.  Phys. Rev. B, 49:5942, 1994.
  * [15] J. K. Viljas and T. T. Heikkilä.  Electron-phonon heat transfer in monolayer and bilayer graphene.  Phys. Rev. B, 81:245404, 2010.
  * [16] F. W. J. Hekking, A. O. Niskanen, and J. P. Pekola.  Electron-phonon coupling and longitudinal mechanical-mode cooling in a metallic nanowire.  Phys. Rev. B, 77:033401, 2008.
  * [17] Daniel Gall.  Electron mean free path in elemental metals.  J. Appl. Phys., 119:085101, 2016.
  * [18] D.V. Anghel and S. Cojocaru.  Electron-phonon heat exchange in layered nano-systems.  Solid State Commun., 227:56, 2016.
  * [19] S. Cojocaru and D. V. Anghel.  Low-temperature electron-phonon heat transfer in metal films.  Phys. Rev. B, 93:115405, 2016.
  * [20] D. V. Anghel and S. Cojocaru.  Electron–phonon heat exchange in quasi-two-dimensional nanolayers.  Eur. Phys. J. B, 90:260, 2017.
  * [21] D. V. Anghel, C. Caraiani, and Y. M. Galperin.  Crossover temperature in electron–phonon heat exchange in layered nanostructures.  Phys. Scr., 94:105704, 2019.
  * [22] J. T. Karvonen and I. J. Maasilta.  Influence of Phonon Dimensionality on Electron Energy Relaxation.  Phys. Rev. Lett. 99:145503, 2007.
  * [23] O.-P. Saira, M. H. Matheny, L. Wang, J. Pekola, and M. Roukes.  Modification of electron-phonon coupling by micromachining and suspension.  J. Appl. Phys. 127:024307, 2020.
  * [24] T. Kühn, D. V. Anghel, J. P. Pekola, M. Manninen, and Y. M. Galperin.  Heat transport in ultrathin dielectric membranes and bridges.  Phys. Rev. B, 70:125425, 2004.
  * [25] D. V. Anghel and T. Kühn.  Quantization of the elastic modes in an isotropic plate.  J. Phys. A: Math. Theor., 40:10429, 2007.  cond-mat/0611528.
  * [26] B. A. Auld.  Acoustic Fields and Waves in Solids, 2nd Ed. Robert E. Krieger Publishing Company, 1990.
  * [27] J. M. Ziman.  Electrons and Phonons.  Oxford University Press, 1960.